* {
    box-sizing: border-box;
}

:root {
    --bg: #020a13;
    --sidebar: #041322;
    --sidebar-deep: #03101c;

    --surface: #071727;
    --surface-2: #081b2d;
    --surface-3: #061421;

    --line: #153652;
    --line-soft: #102a40;

    --text: #f5f9ff;
    --muted: #8caac7;
    --muted-2: #5f7f9d;

    --blue: #0c91ff;
    --blue-light: #32b5ff;
    --cyan: #28c9ff;

    --success: #35d99a;
    --danger: #ff6476;

    --radius: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    color: var(--text);

    background:
        radial-gradient(
            circle at 55% -20%,
            rgba(0, 116, 204, .15),
            transparent 38%
        ),
        var(--bg);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 14px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}


/* ==========================================================
   ESTRUTURA
   ========================================================== */

.shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        255px minmax(0, 1fr);
}


/* ==========================================================
   SIDEBAR
   ========================================================== */

.sidebar {
    position: fixed;

    inset:
        0 auto 0 0;

    width: 255px;

    padding:
        23px 15px 18px;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #061a2d 0%,
            var(--sidebar) 42%,
            var(--sidebar-deep) 100%
        );

    border-right:
        1px solid #123451;

    z-index: 30;
}

.brand {
    height: 64px;

    padding:
        0 13px 18px;

    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: white;

    font-size: 20px;
    font-weight: 900;

    background:
        linear-gradient(
            145deg,
            #29c5ff,
            #087ee7
        );

    box-shadow:
        0 10px 30px
        rgba(5, 141, 255, .27);
}

.brand-copy strong,
.brand-copy span {
    display: block;
}

.brand-copy strong {
    font-size: 21px;

    letter-spacing:
        .025em;
}

.brand-copy span {
    margin-top: 2px;

    color: var(--cyan);

    font-size: 10px;
    font-weight: 900;

    letter-spacing:
        .17em;
}

.nav {
    display: grid;
    gap: 6px;

    margin-top: 16px;
}

.nav-item {
    width: 100%;

    min-height: 45px;

    padding:
        0 14px;

    display: flex;
    align-items: center;
    gap: 12px;

    border:
        1px solid transparent;

    border-radius: 9px;

    color: #d4e3f2;

    background: transparent;

    text-decoration: none;

    font-weight: 520;

    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease;
}

.nav-icon {
    width: 18px;

    color: #31adff;

    text-align: center;

    font-weight: 800;
}

.nav-item:hover {
    background:
        rgba(12, 145, 255, .08);
}

.nav-item.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            #087ddd,
            #119cff
        );

    border-color:
        rgba(67, 187, 255, .42);

    box-shadow:
        0 10px 28px
        rgba(0, 105, 200, .20);

    font-weight: 800;
}

.nav-item.active
.nav-icon {
    color: white;
}

.sidebar-footer {
    margin-top: auto;

    padding-top: 15px;

    border-top:
        1px solid #12314b;
}

.sidebar-footer form {
    margin: 0;
}

.logout {
    border: 0;

    text-align: left;
}


/* ==========================================================
   WORKSPACE / TOPBAR
   ========================================================== */

.workspace {
    grid-column: 2;

    min-width: 0;
}

.topbar {
    height: 76px;

    padding:
        0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    background:
        rgba(4, 19, 33, .94);

    border-bottom:
        1px solid #143550;

    position: sticky;
    top: 0;

    z-index: 20;

    backdrop-filter:
        blur(16px);
}

.global-search {
    width:
        min(610px, 48vw);

    height: 44px;

    padding:
        0 10px 0 14px;

    display: flex;
    align-items: center;
    gap: 10px;

    border:
        1px solid #1b4669;

    border-radius: 9px;

    background:
        #071a2c;
}

.search-icon {
    color: #7fbff1;

    font-size: 19px;
}

.global-search input {
    min-width: 0;
    flex: 1;

    padding: 0;

    border: 0;
    outline: 0;

    color: #eaf5ff;

    background:
        transparent;
}

.global-search input::placeholder {
    color: #718eaa;
}

kbd {
    padding:
        4px 7px;

    border:
        1px solid #194266;

    border-radius: 5px;

    color: #7da3c4;

    background:
        #09213a;

    font-family: inherit;

    font-size: 11px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-button {
    position: relative;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 0;

    color: #9dcdf5;

    background: transparent;

    font-size: 21px;
}

.notification-dot {
    position: absolute;

    top: 6px;
    right: 6px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--blue);
}

.top-divider {
    width: 1px;
    height: 36px;

    background:
        #16334d;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: white;

    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #087ddd,
            #22b2ff
        );
}

.profile-copy strong,
.profile-copy span {
    display: block;
}

.profile-copy strong {
    font-size: 13px;
}

.profile-copy span {
    margin-top: 2px;

    color: #7898b7;

    font-size: 10px;
}

.profile-chevron {
    margin-left: 4px;

    color: #78a7cd;
}


/* ==========================================================
   CONTEUDO
   ========================================================== */

.content {
    padding:
        25px 30px 38px;

    max-width:
        1600px;

    margin:
        0 auto;
}

.page-heading {
    min-height: 82px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.page-heading h1 {
    margin:
        0 0 5px;

    font-size: 31px;

    letter-spacing:
        -.025em;
}

.page-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 15px;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.btn {
    min-height: 42px;

    padding:
        0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 800;

    transition:
        transform .15s ease,
        background .15s ease;
}

.btn:hover {
    transform:
        translateY(-1px);
}

.btn-primary {
    color: white;

    border:
        1px solid #179fff;

    background:
        linear-gradient(
            135deg,
            #087ee6,
            #129eff
        );

    box-shadow:
        0 8px 22px
        rgba(4, 122, 225, .18);
}

.btn-outline {
    color: #eaf6ff;

    border:
        1px solid #168fe8;

    background:
        rgba(5, 31, 52, .72);
}

.btn-outline:hover {
    background:
        rgba(12, 145, 255, .12);
}

.btn.compact {
    min-height: 37px;

    padding:
        0 14px;
}


/* ==========================================================
   DASHBOARD
   ========================================================== */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(330px, .85fr)
        minmax(470px, 1.25fr)
        minmax(360px, .95fr);

    gap: 14px;

    align-items: start;
}

.center-column {
    display: grid;
    gap: 14px;
}

.card {
    padding: 18px;

    border:
        1px solid #173b59;

    border-radius:
        var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(8, 28, 47, .97),
            rgba(5, 20, 34, .98)
        );

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, .15);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 16px;
}

.card-heading h2 {
    margin:
        0 0 4px;

    font-size: 17px;
}

.card-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}

.heading-icon {
    margin-right: 7px;

    color: var(--blue);
}

.count-badge {
    padding:
        5px 8px;

    border:
        1px solid #1468a5;

    border-radius: 6px;

    color: #46b8ff;

    background:
        rgba(4, 115, 205, .13);

    font-size: 11px;
}


/* ==========================================================
   TAREFAS HOJE
   ========================================================== */

.today-card {
    min-height: 690px;
}

.timeline {
    margin-top: 8px;
}

.timeline-row {
    min-height: 61px;

    display: grid;

    grid-template-columns:
        57px 1fr;

    gap: 9px;
}

.timeline-row time {
    padding-top: 2px;

    color: #8fb2d3;

    font-size: 11px;
}

.timeline-line {
    border-top:
        1px solid #173852;
}


/* ==========================================================
   LONGO PRAZO
   ========================================================== */

.long-card {
    min-height: 365px;
}

.task-filters {
    display: grid;

    grid-template-columns:
        1fr 88px 108px;

    gap: 8px;
}

input,
select,
textarea {
    width: 100%;

    border:
        1px solid #173a57;

    border-radius: 8px;

    outline: none;

    color: #eaf5ff;

    background:
        #051421;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

input,
select {
    min-height: 41px;

    padding:
        0 11px;
}

textarea {
    padding:
        12px;

    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color:
        var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(12, 145, 255, .08);
}

input::placeholder,
textarea::placeholder {
    color: #637f99;
}

.field-with-icon {
    min-height: 41px;

    padding-left: 12px;

    display: flex;
    align-items: center;
    gap: 8px;

    border:
        1px solid #173a57;

    border-radius: 8px;

    color: #719abb;

    background:
        #051421;
}

.field-with-icon:focus-within {
    border-color:
        var(--blue);
}

.field-with-icon input {
    min-height: 38px;

    padding:
        0 10px 0 0;

    border: 0;

    box-shadow: none;

    background:
        transparent;
}

.field-with-icon.full {
    width: 100%;
}

.empty-state {
    min-height: 235px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.empty-circle {
    width: 50px;
    height: 50px;

    margin-bottom: 13px;

    display: grid;
    place-items: center;

    border:
        1px solid #17476e;

    border-radius: 50%;

    color: var(--blue);

    background:
        rgba(12, 145, 255, .10);
}

.empty-circle.small {
    width: 43px;
    height: 43px;
}

.empty-state strong {
    margin-bottom: 5px;

    font-size: 16px;
}

.empty-state span {
    color: var(--muted);

    font-size: 13px;
}


/* ==========================================================
   REGISTRO RAPIDO
   ========================================================== */

.quick-card {
    min-height: 495px;
}

.quick-form textarea {
    min-height: 104px;
}

.quick-options {
    margin-top: 8px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;
}

.quick-submit {
    margin-top: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quick-submit small {
    max-width: 210px;

    color: #7292af;

    font-size: 10px;

    line-height: 1.4;
}

.section-divider {
    margin:
        17px 0;

    border-top:
        1px solid #173852;
}

.today-log-title h3 {
    margin:
        0 0 13px;

    font-size: 16px;
}

.today-empty {
    min-height: 130px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--muted);

    text-align: center;
}

.today-empty strong {
    margin:
        4px 0;

    color: #edf7ff;

    font-size: 13px;
}

.today-empty span {
    font-size: 11px;
}


/* ==========================================================
   HISTORICO
   ========================================================== */

.history-card {
    min-height: 310px;
}

.history-filters {
    margin-top: 8px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;
}

.history-list,
.today-log-list {
    margin-top: 12px;

    display: grid;
    gap: 8px;

    max-height: 270px;

    overflow: auto;
}

.history-entry,
.today-entry {
    padding: 10px;

    display: grid;

    grid-template-columns:
        4px minmax(0, 1fr);

    gap: 10px;

    border:
        1px solid #143550;

    border-radius: 8px;

    background:
        rgba(3, 14, 24, .54);
}

.entry-dot {
    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            var(--cyan),
            var(--blue)
        );
}

.entry-body {
    min-width: 0;
}

.entry-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.entry-heading strong {
    overflow-wrap: anywhere;

    font-size: 12px;
}

.entry-heading time {
    flex:
        0 0 auto;

    color: #6f94b6;

    font-size: 10px;
}

.chips {
    margin-top: 7px;

    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chips span {
    padding:
        3px 7px;

    border-radius: 20px;

    color: #8ed3ff;

    background:
        rgba(12, 145, 255, .10);

    font-size: 9px;
}

.history-entry[hidden] {
    display: none;
}

.history-empty,
.empty-history {
    min-height: 85px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #7594b1;

    font-size: 11px;
}

.empty-search {
    margin-bottom: 7px;

    color: var(--blue);

    font-size: 22px;
}


/* ==========================================================
   ALERTAS
   ========================================================== */

.alert {
    margin-bottom: 14px;

    padding:
        11px 13px;

    border-radius: 8px;

    font-size: 12px;
}

.alert.success {
    color: #9bf2d4;

    border:
        1px solid #216a55;

    background:
        rgba(23, 105, 80, .20);
}

.alert.error {
    color: #ffc0c7;

    border:
        1px solid #763442;

    background:
        rgba(108, 32, 45, .22);
}


/* ==========================================================
   LOGIN / SETUP
   ========================================================== */

.auth-body {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at 50% 0%,
            #0b3458 0,
            #050b14 48%
        );
}

.auth-card {
    width:
        min(440px, 100%);

    padding: 30px;

    border:
        1px solid #173b59;

    border-radius: 18px;

    background:
        #071727;

    box-shadow:
        0 30px 80px
        rgba(0, 0, 0, .4);
}

.auth-brand {
    margin-bottom: 32px;

    display: flex;
    gap: 13px;
    align-items: center;
}

.auth-brand .brand-icon {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: white;

    font-weight: 900;

    background:
        linear-gradient(
            145deg,
            #29c5ff,
            #087ee7
        );
}

.auth-brand h1 {
    margin: 0;

    font-size: 22px;
}

.auth-brand p {
    margin:
        3px 0 0;

    color: var(--cyan);

    font-size: 11px;
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h2 {
    margin:
        8px 0 6px;

    font-size: 24px;
}

.auth-heading p {
    margin: 0;

    color: var(--muted);
}

.first-badge {
    color: var(--cyan);

    font-size: 10px;
    font-weight: 900;

    letter-spacing:
        .12em;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 7px;

    font-size: 13px;
    font-weight: 700;
}

.auth-form button {
    width: 100%;

    min-height: 43px;

    margin-top: 4px;

    border:
        1px solid #179fff;

    border-radius: 8px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #087ee6,
            #129eff
        );

    font-weight: 800;
}

.security-note {
    margin-top: 18px;

    color: #7f96ad;

    text-align: center;

    font-size: 11px;
}


/* ==========================================================
   RESPONSIVO
   ========================================================== */

@media (max-width: 1350px) {

    .dashboard-grid {
        grid-template-columns:
            minmax(300px, .8fr)
            minmax(430px, 1.2fr);
    }

    .quick-card {
        grid-column:
            1 / -1;
    }

}

@media (max-width: 980px) {

    .shell {
        grid-template-columns:
            1fr;
    }

    .sidebar {
        display: none;
    }

    .workspace {
        grid-column: 1;
    }

    .dashboard-grid {
        grid-template-columns:
            1fr;
    }

    .quick-card {
        grid-column: auto;
    }

    .today-card {
        min-height: auto;
    }

}

@media (max-width: 700px) {

    .topbar {
        padding:
            0 16px;
    }

    .global-search {
        width: 100%;
    }

    .top-actions {
        display: none;
    }

    .content {
        padding:
            20px 16px 30px;
    }

    .page-heading {
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .task-filters,
    .quick-options,
    .history-filters {
        grid-template-columns:
            1fr;
    }

}


/* ==========================================================
   NEXO - TAREFAS V1
   ========================================================== */

.today-task-list,
.long-task-list {
    display: grid;
    gap: 10px;
}

.today-task-list {
    margin-top: 8px;
}

.long-task-list {
    margin-top: 16px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 3px;
}

.task-item {
    border: 1px solid #17415f;
    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            rgba(8, 31, 51, .96),
            rgba(4, 20, 34, .96)
        );

    transition:
        border-color .15s ease,
        transform .15s ease,
        background .15s ease;
}

.task-item:hover {
    border-color: #1c70a8;

    background:
        linear-gradient(
            145deg,
            rgba(9, 39, 64, .98),
            rgba(5, 24, 41, .98)
        );

    transform: translateY(-1px);
}

.today-task {
    display: grid;

    grid-template-columns:
        58px minmax(0, 1fr);

    gap: 10px;

    padding: 12px;
}

.long-task {
    padding: 12px;
}

.task-time {
    color: #55bdff;

    font-size: 12px;
    font-weight: 800;
}

.task-body {
    min-width: 0;
}

.task-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.task-title-row strong {
    min-width: 0;

    color: #f4f9ff;

    font-size: 13px;

    overflow-wrap: anywhere;
}

.task-description {
    margin: 7px 0 0;

    color: #8aa9c4;

    font-size: 11px;

    line-height: 1.5;
}

.priority {
    flex: 0 0 auto;

    padding: 3px 7px;

    border-radius: 20px;

    font-size: 9px;
    font-weight: 800;
}

.priority-low {
    color: #94d4ff;

    background:
        rgba(31, 143, 216, .12);
}

.priority-medium {
    color: #7fd6ff;

    background:
        rgba(12, 145, 255, .13);
}

.priority-high {
    color: #ffc56d;

    background:
        rgba(224, 147, 29, .13);
}

.priority-urgent {
    color: #ff8795;

    background:
        rgba(225, 65, 84, .15);
}

.task-meta {
    margin-top: 9px;

    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.task-meta span {
    padding: 3px 7px;

    border-radius: 20px;

    color: #83bde7;

    background:
        rgba(12, 145, 255, .08);

    font-size: 9px;
}

.task-meta .status-running {
    color: #71d4ff;

    background:
        rgba(26, 166, 229, .14);
}

.task-meta .status-done {
    color: #7ce5bb;

    background:
        rgba(40, 180, 126, .13);
}

.task-actions {
    margin-top: 10px;

    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-actions form {
    margin: 0;
}

.task-action {
    min-height: 29px;

    padding: 0 9px;

    border-radius: 6px;

    font-size: 10px;
    font-weight: 800;
}

.secondary-action {
    color: #9edaff;

    border:
        1px solid #176da4;

    background:
        rgba(12, 145, 255, .08);
}

.complete-action {
    color: #a2efd1;

    border:
        1px solid #247b61;

    background:
        rgba(36, 145, 105, .11);
}

.tasks-empty {
    min-height: 470px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #7899b6;

    text-align: center;
}

.tasks-empty > span {
    width: 49px;
    height: 49px;

    margin-bottom: 12px;

    display: grid;
    place-items: center;

    border:
        1px solid #17476e;

    border-radius: 50%;

    color: #27aeff;

    background:
        rgba(12, 145, 255, .08);

    font-size: 20px;
}

.tasks-empty strong {
    color: #eaf5ff;

    font-size: 14px;
}

.tasks-empty small {
    margin-top: 5px;

    color: #6f8ba5;
}


/* ==========================================================
   MODAL NOVA TAREFA
   ========================================================== */

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 100;

    padding: 25px;

    display: grid;
    place-items: center;

    background:
        rgba(0, 6, 12, .78);

    backdrop-filter:
        blur(7px);
}

.modal-backdrop[hidden] {
    display: none;
}

.task-modal {
    width: min(720px, 100%);

    max-height:
        calc(100vh - 50px);

    overflow-y: auto;

    border:
        1px solid #1a527b;

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            #092039,
            #051522
        );

    box-shadow:
        0 30px 100px
        rgba(0, 0, 0, .55);
}

.modal-header {
    padding: 21px 22px 17px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    border-bottom:
        1px solid #163a56;
}

.modal-kicker {
    color: #29b7ff;

    font-size: 9px;
    font-weight: 900;

    letter-spacing:
        .17em;
}

.modal-header h2 {
    margin:
        4px 0;

    font-size: 23px;
}

.modal-header p {
    margin: 0;

    color: #7e9db9;

    font-size: 12px;
}

.modal-close {
    width: 35px;
    height: 35px;

    padding: 0;

    border:
        1px solid #1a486b;

    border-radius: 8px;

    color: #9fc4df;

    background:
        #071a2b;

    font-size: 22px;
}

.task-form {
    padding: 20px 22px 22px;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span {
    color: #b9cee0;

    font-size: 11px;
    font-weight: 800;
}

.full-field {
    margin-bottom: 14px;
}

.task-form textarea {
    min-height: 90px;
}

.form-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 13px;
}

.modal-footer {
    margin-top: 21px;
    padding-top: 17px;

    display: flex;
    justify-content: flex-end;
    gap: 9px;

    border-top:
        1px solid #163a56;
}

@media (max-width: 700px) {

    .modal-backdrop {
        padding: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .today-task {
        grid-template-columns: 1fr;
    }

    .task-time {
        margin-bottom: -3px;
    }

}


/* ==========================================================
   NEXO 5B - GERENCIAMENTO DE TAREFAS
   ========================================================== */

.task-openable {
    cursor: pointer;
}

.task-openable:focus-visible {
    outline: 2px solid #28aef4;
    outline-offset: 2px;
}

.long-heading-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.closed-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    display: inline-grid;
    place-items: center;

    border-radius: 20px;

    background: rgba(37, 174, 244, .15);

    font-size: 9px;
}


/* DETALHES */

.task-detail-modal {
    width: min(1040px, 100%);
}

.task-detail-loading {
    min-height: 240px;

    display: grid;
    place-items: center;

    color: #7fa2be;

    font-size: 13px;
}

.task-detail-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;
}

.task-detail-main {
    min-width: 0;
}

.task-edit-form {
    padding: 20px 22px 22px;
}

.task-runtime {
    margin-top: 20px;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 8px;
}

.task-runtime > div {
    min-width: 0;

    padding: 10px;

    border: 1px solid #163e5d;
    border-radius: 9px;

    background: rgba(4, 19, 32, .65);
}

.task-runtime span {
    display: block;

    margin-bottom: 4px;

    color: #6487a5;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .06em;
}

.task-runtime strong {
    display: block;

    color: #ddecf8;

    font-size: 11px;

    overflow-wrap: anywhere;
}


/* TIMELINE */

.task-timeline-panel {
    padding: 20px;

    border-left: 1px solid #163a56;

    background:
        rgba(2, 13, 23, .42);
}

.timeline-heading {
    margin-bottom: 18px;
}

.timeline-heading span {
    display: block;

    color: #26aff8;

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .15em;
}

.timeline-heading strong {
    display: block;

    margin-top: 3px;

    color: #edf7ff;

    font-size: 15px;
}

.task-timeline {
    display: grid;
    gap: 0;
}

.timeline-entry {
    position: relative;

    display: grid;

    grid-template-columns:
        15px minmax(0, 1fr);

    gap: 8px;

    padding-bottom: 18px;
}

.timeline-entry:not(:last-child)::before {
    content: "";

    position: absolute;

    left: 4px;
    top: 10px;
    bottom: 0;

    width: 1px;

    background: #174565;
}

.timeline-dot {
    position: relative;
    z-index: 1;

    width: 9px;
    height: 9px;

    margin-top: 3px;

    border: 2px solid #0c91ff;
    border-radius: 50%;

    background: #071a2b;
}

.timeline-entry strong {
    display: block;

    color: #d9e9f6;

    font-size: 10px;
    line-height: 1.45;
}

.timeline-entry span {
    display: block;

    margin-top: 3px;

    color: #63839d;

    font-size: 9px;
}

.timeline-empty {
    color: #6f8ca5;

    font-size: 11px;
}


/* ACOES */

.task-detail-footer {
    align-items: center;
    justify-content: space-between;
}

.task-lifecycle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.task-lifecycle-actions form {
    margin: 0;
}

.btn-success {
    color: #a6efd4;

    border: 1px solid #287d63;

    background: rgba(40, 157, 112, .12);
}

.btn-danger {
    color: #ff9da8;

    border: 1px solid #7e3340;

    background: rgba(192, 55, 74, .11);
}


/* ENCERRADAS */

.closed-tasks-modal {
    width: min(650px, 100%);
}

.closed-task-list {
    padding: 16px;

    display: grid;
    gap: 8px;

    max-height: 520px;
    overflow-y: auto;
}

.closed-task-item {
    width: 100%;

    padding: 13px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;

    border: 1px solid #17415f;
    border-radius: 10px;

    color: inherit;

    background:
        rgba(5, 25, 42, .85);

    text-align: left;

    cursor: pointer;
}

.closed-task-item:hover {
    border-color: #2376ad;

    background:
        rgba(8, 36, 59, .95);
}

.closed-task-item strong {
    display: block;

    color: #eaf5ff;

    font-size: 12px;
}

.closed-task-item > div > span {
    display: block;

    margin-top: 5px;

    color: #718fa8;

    font-size: 9px;
}

.closed-empty {
    padding: 50px 20px;

    color: #718fa8;

    text-align: center;

    font-size: 12px;
}


@media (max-width: 900px) {

    .task-detail-layout {
        grid-template-columns: 1fr;
    }

    .task-timeline-panel {
        border-left: 0;
        border-top: 1px solid #163a56;
    }

    .task-runtime {
        grid-template-columns:
            1fr 1fr;
    }

}


@media (max-width: 600px) {

    .task-runtime {
        grid-template-columns: 1fr;
    }

    .task-detail-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .task-lifecycle-actions {
        width: 100%;
    }

    .long-heading-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

}



/* ==========================================================
   NEXO - FIX HIDDEN DOS DETALHES DE TAREFA
   ========================================================== */

.task-detail-loading[hidden],
#task-detail-content[hidden] {
    display: none !important;
}



/* ==========================================================
   NEXO 6B - ADMINISTRACAO
   ========================================================== */

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-summary-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-summary-card span {
    color: var(--muted);
    font-size: 13px;
}

.admin-summary-card strong {
    font-size: 30px;
    line-height: 1;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-card {
    display: grid;
    grid-template-columns:
        minmax(230px, 1.4fr)
        minmax(300px, 1fr)
        auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,.018);
}

.admin-user-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-user-avatar,
.admin-profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(43, 139, 255, .45);
    background: rgba(43, 139, 255, .12);
    font-weight: 800;
}

.admin-profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 22px;
}

.admin-user-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-email {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-role-badge,
.admin-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-role-badge {
    border: 1px solid rgba(43, 139, 255, .5);
    background: rgba(43, 139, 255, .12);
}

.admin-status.active {
    border: 1px solid rgba(68, 211, 151, .4);
    background: rgba(68, 211, 151, .1);
}

.admin-status.inactive {
    border: 1px solid rgba(255, 100, 100, .35);
    background: rgba(255, 100, 100, .08);
}

.admin-user-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.admin-user-stats > div {
    text-align: center;
}

.admin-user-stats strong,
.admin-user-stats span {
    display: block;
}

.admin-user-stats strong {
    font-size: 17px;
}

.admin-user-stats span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-user-actions form {
    margin: 0;
}

.admin-btn-danger {
    border: 1px solid rgba(255, 100, 100, .35);
    background: rgba(255, 100, 100, .08);
}

.admin-new-user-modal {
    width: min(520px, calc(100vw - 32px));
}

.admin-flashes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-flash {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.admin-flash-success {
    border-color: rgba(68, 211, 151, .4);
}

.admin-flash-error {
    border-color: rgba(255, 100, 100, .4);
}

.admin-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-profile-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-profile-name h1 {
    margin: 0;
}

.admin-profile-header p {
    margin: 5px 0 0;
    color: var(--muted);
}

.admin-activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.admin-activity-item:last-child {
    border-bottom: 0;
}

.admin-activity-item strong,
.admin-activity-item span {
    display: block;
}

.admin-activity-item span,
.admin-activity-item time {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.admin-task-status {
    white-space: nowrap;
}

.admin-events-panel {
    margin-top: 18px;
}

.admin-event-timeline {
    display: flex;
    flex-direction: column;
}

.admin-event-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.admin-event-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: .8;
}

.admin-event-item strong,
.admin-event-item span {
    display: block;
}

.admin-event-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1100px) {

    .admin-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-user-card {
        grid-template-columns: 1fr;
    }

    .admin-user-stats {
        max-width: 480px;
    }

    .admin-activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .admin-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-user-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-user-actions {
        flex-wrap: wrap;
    }
}
