:root {
    --navy: #06172a;
    --navy-2: #0a223c;
    --navy-3: #12385d;

    --green: #a7cf38;
    --green-dark: #7ba71a;

    --white: #ffffff;

    --bg: #f3f6f9;
    --surface: #ffffff;

    --text: #142233;
    --muted: #6d7886;

    --border: #e2e8ee;

    --red: #d94c4c;
    --blue: #3478c7;
    --orange: #db8732;
    --yellow: #d5aa2d;
    --purple: #8155b6;
    --brown: #98705c;
    --success: #4f9d69;

    --shadow:
        0 18px 45px rgba(12, 31, 52, .08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
}


/* LOGIN */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(420px, 1.1fr)
        minmax(460px, .9fr);
}

.login-brand {
    position: relative;
    overflow: hidden;

    padding: 70px 8% 45px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    color: white;

    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(167,207,56,.18),
            transparent 26%
        ),
        linear-gradient(
            145deg,
            #06172a 0%,
            #0a2745 52%,
            #10395f 100%
        );
}

.login-brand::before {
    content: "";
    position: absolute;

    width: 520px;
    height: 520px;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 50%;

    right: -210px;
    bottom: -180px;
}

.login-brand::after {
    content: "";
    position: absolute;

    width: 220px;
    height: 8px;

    background: var(--green);

    right: 0;
    top: 0;
}

.brand-content {
    position: relative;
    z-index: 2;

    max-width: 620px;
}

.brand-mark,
.mobile-brand,
.sidebar-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-weight: 900;
    letter-spacing: -2px;

    color: var(--green);
}

.brand-mark {
    font-size: 38px;
    margin-bottom: 48px;
}

.brand-eyebrow,
.page-eyebrow,
.panel-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-eyebrow {
    color: var(--green);
}

.login-brand h1 {
    margin: 15px 0 24px;

    font-size: clamp(42px, 5vw, 72px);
    line-height: .98;
    letter-spacing: -3px;

    max-width: 650px;
}

.login-brand h1 span {
    color: var(--green);
}

.brand-description {
    max-width: 550px;

    color: rgba(255,255,255,.72);

    font-size: 17px;
    line-height: 1.7;
}

.brand-features {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 14px;

    margin-top: 42px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 13px;

    color: rgba(255,255,255,.82);
}

.brand-feature span {
    width: 24px;
    height: 24px;

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

    border-radius: 7px;

    color: var(--navy);
    background: var(--green);

    font-weight: 900;
}

.brand-footer {
    position: relative;
    z-index: 2;

    font-size: 12px;

    color: rgba(255,255,255,.35);
}

.login-access {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px;

    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #eef3f7
        );
}

.login-card {
    width: min(430px, 100%);
}

.mobile-brand {
    display: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 11px;

    border-radius: 30px;

    background: #edf5db;
    color: #587a11;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-badge span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green-dark);

    box-shadow:
        0 0 0 4px rgba(167,207,56,.18);
}

.login-heading h2 {
    margin: 21px 0 7px;

    font-size: 38px;
    letter-spacing: -1.5px;
}

.login-heading p {
    margin: 0 0 35px;

    color: var(--muted);
    line-height: 1.6;
}

.alert {
    padding: 13px 15px;
    margin-bottom: 18px;

    border-radius: 10px;

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

.alert-danger {
    color: #9f2929;
    background: #feecec;
}

.alert-success {
    color: #39724a;
    background: #eaf6ed;
}

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 750;

    color: #39495b;
}

.form-control {
    width: 100%;
    height: 52px;

    padding: 0 15px;

    border:
        1px solid #d9e1e8;

    border-radius: 11px;

    background: white;

    color: var(--text);

    font-size: 14px;

    outline: none;

    transition: .2s;
}

.form-control:focus {
    border-color: var(--green-dark);

    box-shadow:
        0 0 0 4px rgba(167,207,56,.13);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 11px;

    transform: translateY(-50%);

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #84909d;

    cursor: pointer;
}

.remember {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 5px 0 23px;

    color: var(--muted);

    font-size: 12px;
}

.btn-primary {
    width: 100%;
    height: 54px;

    border: 0;
    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--navy-2),
            var(--navy-3)
        );

    color: white;

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

    cursor: pointer;

    box-shadow:
        0 12px 24px rgba(6,23,42,.18);

    transition:
        transform .2s,
        box-shadow .2s;
}

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

    box-shadow:
        0 16px 30px rgba(6,23,42,.24);
}

.field-error {
    display: block;

    margin-top: 6px;

    color: var(--red);
}

.security-note {
    display: flex;
    gap: 12px;

    margin-top: 30px;
    padding-top: 25px;

    border-top:
        1px solid var(--border);
}

.security-icon {
    width: 37px;
    height: 37px;

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

    border-radius: 10px;

    background: #edf2f6;
}

.security-note strong {
    display: block;

    margin-bottom: 4px;

    font-size: 12px;
}

.security-note p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.5;
}


/* APP */

.app-shell {
    min-height: 100vh;

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

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 250px;

    display: flex;
    flex-direction: column;

    padding: 24px 17px 18px;

    background:
        linear-gradient(
            180deg,
            #06172a,
            #081e34
        );

    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 8px 25px;

    border-bottom:
        1px solid rgba(255,255,255,.07);
}

.sidebar-logo-mark {
    width: 44px;
    height: 44px;

    border-radius: 12px;

    font-size: 17px;

    letter-spacing: -1px;

    background:
        rgba(167,207,56,.1);
}

.sidebar-logo strong {
    display: block;

    font-size: 14px;
}

.sidebar-logo small {
    display: block;

    margin-top: 3px;

    color: rgba(255,255,255,.45);

    font-size: 10px;
}

.sidebar-nav {
    flex: 1;

    padding-top: 18px;
}

.nav-section {
    margin:
        19px
        10px
        7px;

    color: rgba(255,255,255,.31);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.nav-item {
    min-height: 43px;

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

    padding: 0 12px;

    margin-bottom: 3px;

    border-radius: 9px;

    text-decoration: none;

    color: rgba(255,255,255,.69);

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

.nav-item > span {
    width: 20px;

    color: rgba(255,255,255,.45);

    text-align: center;
}

.nav-item.active {
    color: white;

    background:
        rgba(255,255,255,.07);

    box-shadow:
        inset 3px 0 var(--green);
}

.nav-item.active > span {
    color: var(--green);
}

.nav-item.disabled {
    cursor: default;
}

.nav-item em {
    margin-left: auto;

    color: #6f891f;

    font-style: normal;
    font-size: 7px;
    font-weight: 900;
}

.sidebar-footer {
    padding-top: 15px;

    border-top:
        1px solid rgba(255,255,255,.07);
}

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

.avatar {
    flex-shrink: 0;

    width: 34px;
    height: 34px;

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

    border-radius: 9px;

    background: var(--green);
    color: var(--navy);

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

.avatar.large {
    width: 38px;
    height: 38px;

    border-radius: 11px;
}

.user-mini-info {
    min-width: 0;
}

.user-mini-info strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    max-width: 130px;

    font-size: 10px;
}

.user-mini-info small {
    color: rgba(255,255,255,.4);

    font-size: 8px;
}

.logout-link {
    display: block;

    margin-top: 13px;
    padding: 8px 10px;

    border-radius: 7px;

    text-align: center;
    text-decoration: none;

    color: rgba(255,255,255,.44);

    font-size: 10px;
}

.logout-link:hover {
    background:
        rgba(255,255,255,.05);

    color: white;
}

.main-content {
    grid-column: 2;

    min-width: 0;

    padding:
        0
        35px
        40px;
}

.topbar {
    min-height: 83px;

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

    border-bottom:
        1px solid var(--border);
}

.page-eyebrow {
    color: #95a0ac;

    font-size: 8px;
}

.topbar h1 {
    margin: 4px 0 0;

    font-size: 21px;
    letter-spacing: -.5px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.topbar-user-text {
    text-align: right;
}

.topbar-user-text strong {
    display: block;

    font-size: 10px;
}

.topbar-user-text small {
    color: var(--muted);

    font-size: 9px;
}

.welcome-card {
    position: relative;
    overflow: hidden;

    min-height: 160px;

    margin-top: 28px;
    padding: 32px 35px;

    display: flex;
    align-items: center;

    border-radius: 18px;

    color: white;

    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(167,207,56,.17),
            transparent 25%
        ),
        linear-gradient(
            130deg,
            #071a2f,
            #0c3152
        );

    box-shadow: var(--shadow);
}

.welcome-label {
    color: var(--green);

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.welcome-card h2 {
    margin: 8px 0 7px;

    font-size: 27px;
}

.welcome-card p {
    margin: 0;

    color: rgba(255,255,255,.65);

    font-size: 12px;
}

.welcome-decoration {
    position: absolute;

    right: 40px;

    color: rgba(255,255,255,.035);

    font-size: 115px;
    font-weight: 900;
    letter-spacing: -10px;
}

.stats-grid {
    display: grid;

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

    gap: 15px;

    margin-top: 20px;
}

.stat-card {
    min-height: 105px;

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

    padding: 19px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: var(--surface);

    box-shadow:
        0 8px 24px rgba(15,36,58,.035);
}

.stat-icon {
    width: 43px;
    height: 43px;

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

    flex-shrink: 0;

    border-radius: 12px;

    color: #668219;
    background: #eef5de;

    font-weight: 900;
}

.stat-icon.red {
    color: var(--red);
    background: #fbeaea;
}

.stat-icon.blue {
    color: var(--blue);
    background: #eaf2fb;
}

.stat-icon.orange {
    color: var(--orange);
    background: #fbf0e6;
}

.stat-card span {
    display: block;

    color: var(--muted);

    font-size: 10px;
}

.stat-card strong {
    display: block;

    margin-top: 5px;

    font-size: 25px;
}

.status-grid {
    display: grid;

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

    gap: 12px;

    margin-top: 12px;
}

.status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 16px;

    border-radius: 11px;

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

.status-box strong {
    font-size: 17px;
}

.status-box.waiting {
    color: #8a6b14;
    background: #fbf5df;
}

.status-box.material {
    color: #654590;
    background: #f0eafb;
}

.status-box.third {
    color: #7c5847;
    background: #f4ece8;
}

.status-box.resolved {
    color: #37734c;
    background: #e9f4ed;
}

.content-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(300px, .8fr);

    gap: 17px;

    margin-top: 20px;
}

.panel {
    min-height: 340px;

    padding: 22px;

    border:
        1px solid var(--border);

    border-radius: 15px;

    background: var(--surface);

    box-shadow:
        0 8px 25px rgba(15,36,58,.035);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.panel-eyebrow {
    color: var(--green-dark);

    font-size: 8px;
}

.panel h3 {
    margin: 4px 0 0;

    font-size: 16px;
}

.total-chip {
    padding: 6px 10px;

    border-radius: 20px;

    color: var(--muted);
    background: #f1f4f6;

    font-size: 9px;
}

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

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

    text-align: center;
}

.empty-icon {
    width: 48px;
    height: 48px;

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

    border-radius: 14px;

    color: #62821a;
    background: #edf4df;

    font-weight: 900;
}

.empty-state h4 {
    margin: 14px 0 5px;

    font-size: 14px;
}

.empty-state p {
    max-width: 380px;

    margin: 0;

    color: var(--muted);

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

.pending-row {
    display: grid;

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

    gap: 12px;

    align-items: center;

    padding: 13px 0;

    border-bottom:
        1px solid #edf0f2;
}

.pending-row:last-child {
    border-bottom: 0;
}

.pending-row strong {
    display: block;

    margin-bottom: 3px;

    color: var(--navy-2);

    font-size: 10px;
}

.pending-row div > span {
    color: var(--text);

    font-size: 10px;
}

.pending-client {
    color: var(--muted);

    font-size: 9px;
}

.status-pill {
    padding: 6px 9px;

    border-radius: 30px;

    background: #f0f2f4;
    color: #697481;

    text-align: center;
    text-transform: capitalize;

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

.workflow {
    padding-top: 5px;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workflow-step > span {
    width: 35px;
    height: 35px;

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

    border-radius: 10px;

    color: var(--navy);
    background: #edf1f4;

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

.workflow-step.accent > span {
    background: var(--green);
}

.workflow-step strong {
    display: block;

    font-size: 11px;
}

.workflow-step small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
}

.workflow-line {
    width: 1px;
    height: 25px;

    margin-left: 17px;

    background: #dce2e7;
}


/* MOBILE */

@media (max-width: 1000px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-access {
        min-height: 100vh;
        padding: 32px 22px;
    }

    .mobile-brand {
        display: inline-flex;

        margin-bottom: 35px;

        font-size: 30px;
    }

    .stats-grid,
    .status-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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

}


@media (max-width: 760px) {

    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;

        width: 100%;
        height: auto;

        padding: 14px 18px;
    }

    .sidebar-logo {
        border: 0;
        padding: 0;
    }

    .sidebar-nav,
    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding:
            0
            16px
            30px;
    }

    .topbar-user-text {
        display: none;
    }

    .welcome-card {
        min-height: 150px;

        padding: 25px;
    }

    .welcome-decoration {
        display: none;
    }

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

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

    .pending-row {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 460px) {

    .stats-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .login-heading h2 {
        font-size: 32px;
    }

}


/* CLIENTES */

.action-button,
.secondary-button,
.danger-button {
    min-height: 42px;

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

    padding: 0 17px;

    border: 0;
    border-radius: 9px;

    text-decoration: none;

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}

.action-button {
    color: var(--navy);
    background: var(--green);
}

.secondary-button {
    color: var(--text);
    background: #e9eef2;
}

.danger-button {
    color: #a02d2d;
    background: #feeaea;
}

.header-actions {
    display: flex;
    gap: 9px;
}

.page-intro {
    min-height: 140px;

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

    margin: 25px 0 18px;
    padding: 25px 30px;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #071a2f,
            #0d3558
        );

    color: white;
}

.page-intro h2 {
    margin: 6px 0;

    font-size: 24px;
}

.page-intro p {
    max-width: 650px;

    margin: 0;

    color: rgba(255,255,255,.62);

    font-size: 11px;
    line-height: 1.6;
}

.big-counter {
    font-size: 70px;
    font-weight: 900;

    color: rgba(167,207,56,.25);
}

.client-grid {
    display: grid;

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

    gap: 15px;
}

.client-card {
    display: block;

    padding: 19px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    text-decoration: none;

    color: var(--text);

    transition:
        transform .2s,
        box-shadow .2s,
        border-color .2s;
}

.client-card:hover {
    transform: translateY(-2px);

    border-color: #cbd7df;

    box-shadow:
        0 15px 30px rgba(9,31,52,.08);
}

.client-card-top {
    display: flex;
    justify-content: space-between;
}

.client-initial {
    width: 42px;
    height: 42px;

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

    border-radius: 11px;

    color: var(--navy);
    background: var(--green);

    font-weight: 900;
}

.client-card h3 {
    margin: 18px 0 5px;

    font-size: 15px;
}

.client-card p {
    min-height: 30px;

    margin: 0;

    color: var(--muted);

    font-size: 10px;
}

.client-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 17px;
    padding-top: 13px;

    border-top:
        1px solid #edf0f2;

    color: var(--muted);

    font-size: 9px;
}

.client-card-footer strong {
    color: var(--navy-2);
}

.badge-active,
.badge-inactive {
    display: inline-flex;

    padding: 5px 8px;

    border-radius: 20px;

    font-size: 7px;
    font-weight: 900;
}

.badge-active {
    color: #4b6d10;
    background: #edf5db;
}

.badge-inactive {
    color: #8c3c3c;
    background: #faeaea;
}

.form-panel {
    margin-top: 25px;
    padding: 28px;

    border:
        1px solid var(--border);

    border-radius: 15px;

    background: white;
}

.form-panel.compact {
    margin-bottom: 30px;
}

.form-heading {
    margin-bottom: 25px;
}

.form-heading h2 {
    margin: 6px 0;

    font-size: 22px;
}

.form-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
}

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

.form-grid.two {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.form-grid.four {
    grid-template-columns:
        1.2fr 2fr 1fr 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 22px;
}

.client-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 25px 0 18px;
    padding: 24px;

    border-radius: 15px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #071a2f,
            #103d63
        );
}

.client-profile-main {
    display: flex;
    align-items: center;
    gap: 17px;
}

.client-profile-avatar {
    width: 65px;
    height: 65px;

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

    border-radius: 16px;

    color: var(--navy);
    background: var(--green);

    font-size: 25px;
    font-weight: 900;
}

.client-profile h2 {
    margin: 8px 0 4px;

    font-size: 23px;
}

.client-profile p {
    margin: 0;

    color: rgba(255,255,255,.6);

    font-size: 10px;
}

.detail-grid {
    display: grid;

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

    gap: 17px;
}

.info-list > div,
.unit-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 13px 0;

    border-bottom:
        1px solid #edf0f2;
}

.info-list span {
    color: var(--muted);

    font-size: 10px;
}

.info-list strong {
    font-size: 10px;
}

.unit-row strong {
    display: block;

    font-size: 10px;
}

.unit-row div span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
}

.empty-inline {
    padding: 25px;

    text-align: center;

    color: var(--muted);

    font-size: 10px;
}


@media (max-width: 1100px) {

    .client-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .form-grid.four {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 760px) {

    .client-grid,
    .detail-grid,
    .form-grid.two,
    .form-grid.four {
        grid-template-columns: 1fr;
    }

    .page-intro {
        align-items: flex-start;
    }

    .big-counter {
        font-size: 45px;
    }

    .client-profile {
        align-items: flex-start;
        gap: 20px;
        flex-direction: column;
    }

}


/* PENDENCIAS */

.filter-panel {
    margin-bottom: 18px;
    padding: 18px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: white;
}

.filter-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr 1fr auto;

    gap: 13px;

    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;

    padding-bottom: 19px;
}

.pending-table {
    width: 100%;
}

.pending-table-head,
.pending-table-row {
    display: grid;

    grid-template-columns:
        115px
        minmax(220px, 1.5fr)
        130px
        minmax(180px, 1fr)
        145px
        100px;

    gap: 15px;

    align-items: center;
}

.pending-table-head {
    padding: 0 12px 12px;

    color: var(--muted);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .7px;

    text-transform: uppercase;
}

.pending-table-row {
    min-height: 67px;

    padding: 11px 12px;

    border-top:
        1px solid #edf0f2;

    color: var(--text);

    text-decoration: none;

    transition:
        background .2s;
}

.pending-table-row:hover {
    background: #f8fafb;
}

.pending-code {
    color: var(--navy-2);

    font-size: 10px;
}

.pending-main strong {
    display: block;

    margin-bottom: 3px;

    font-size: 10px;
}

.pending-main span,
.pending-table-row > span {
    color: var(--muted);

    font-size: 9px;
}

.priority-pill {
    display: inline-flex;
    justify-content: center;

    padding: 6px 9px;

    border-radius: 30px;

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

.priority-baixa {
    color: #47795a;
    background: #eaf5ee;
}

.priority-media {
    color: #796719;
    background: #f8f2d9;
}

.priority-alta {
    color: #a25d17;
    background: #fbead9;
}

.priority-critica {
    color: #9c2d2d;
    background: #fbe5e5;
}

.status-aberta {
    color: #a53131;
    background: #fbe7e7;
}

.status-em_analise {
    color: #2f6ba3;
    background: #e8f1fa;
}

.status-em_andamento {
    color: #a7621e;
    background: #fbecde;
}

.status-aguardando_cliente {
    color: #8b7018;
    background: #faf3d9;
}

.status-aguardando_material {
    color: #634598;
    background: #f0eafa;
}

.status-aguardando_terceiro {
    color: #825b46;
    background: #f4eae5;
}

.status-resolvida {
    color: #36744b;
    background: #e8f4ec;
}

.status-cancelada {
    color: #6b727a;
    background: #eceff1;
}

.textarea-control {
    height: auto;
    min-height: 100px;

    padding-top: 13px;
    padding-bottom: 13px;

    resize: vertical;
}

.workflow-tip {
    margin-top: 18px;
    padding: 15px 17px;

    border-left:
        4px solid var(--green);

    border-radius: 8px;

    background: #f3f7e8;
}

.workflow-tip strong {
    display: block;

    margin-bottom: 4px;

    font-size: 10px;
}

.workflow-tip p {
    margin: 0;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.5;
}

.pending-hero {
    position: relative;

    overflow: hidden;

    min-height: 170px;

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

    margin: 25px 0 18px;
    padding: 30px;

    border-radius: 17px;

    color: white;

    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(167,207,56,.16),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #071a2f,
            #10426c
        );
}

.pending-tags {
    display: flex;
    gap: 8px;
}

.pending-hero h2 {
    max-width: 800px;

    margin: 15px 0 6px;

    font-size: 25px;
}

.pending-hero p {
    margin: 0;

    color: rgba(255,255,255,.6);

    font-size: 10px;
}

.pending-code-large {
    color:
        rgba(255,255,255,.05);

    font-size: 56px;
    font-weight: 900;
}

.pending-detail-grid {
    display: grid;

    grid-template-columns:
        minmax(0,1.35fr)
        minmax(320px,.65fr);

    gap: 17px;
}

.description-box {
    margin-top: 20px;
    padding: 18px;

    border-radius: 11px;

    background: #f5f7f9;
}

.description-box span {
    color: var(--green-dark);

    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.description-box p {
    margin: 8px 0 0;

    font-size: 11px;
    line-height: 1.7;

    white-space: pre-line;
}

.current-step {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 22px;
    padding: 17px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #071a2f,
            #0c3558
        );

    color: white;
}

.step-marker {
    width: 39px;
    height: 39px;

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

    flex-shrink: 0;

    border-radius: 10px;

    color: var(--navy);
    background: var(--green);

    font-weight: 900;
}

.current-step small {
    display: block;

    margin-bottom: 3px;

    color: rgba(255,255,255,.45);

    font-size: 7px;
    letter-spacing: 1px;
}

.current-step strong {
    font-size: 11px;
}

.movement-form {
    margin-top: 10px;
}

.full-button {
    width: 100%;
}

.workflow-final {
    padding: 20px;

    border-radius: 10px;

    text-align: center;

    background: #f2f5f7;

    color: var(--muted);

    font-size: 10px;
}

.pending-lower-grid {
    display: grid;

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

    gap: 17px;

    margin-top: 17px;
}

.timeline-item {
    position: relative;

    display: grid;

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

    gap: 11px;

    padding-bottom: 20px;
}

.timeline-item::before {
    content: "";

    position: absolute;

    left: 5px;
    top: 14px;
    bottom: -4px;

    width: 1px;

    background: #dfe5e9;
}

.timeline-item:last-child::before {
    display: none;
}

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

    width: 11px;
    height: 11px;

    margin-top: 3px;

    border:
        3px solid #eaf3d5;

    border-radius: 50%;

    background: var(--green-dark);
}

.timeline-content strong {
    display: block;

    font-size: 10px;
}

.timeline-content span {
    display: block;

    margin-top: 4px;

    color: var(--text);

    font-size: 9px;
}

.timeline-content p {
    margin: 6px 0;

    color: var(--muted);

    font-size: 9px;
}

.timeline-content small {
    color: #9aa4ad;

    font-size: 8px;
}

.comment-item {
    display: flex;
    gap: 11px;

    padding: 13px 0;

    border-bottom:
        1px solid #edf0f2;
}

.comment-avatar {
    width: 31px;
    height: 31px;

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

    flex-shrink: 0;

    border-radius: 9px;

    color: var(--navy);
    background: var(--green);

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

.comment-item strong {
    display: block;

    font-size: 9px;
}

.comment-item p {
    margin: 5px 0;

    color: var(--text);

    font-size: 9px;
    line-height: 1.5;
}

.comment-item small {
    color: var(--muted);

    font-size: 8px;
}

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin: 17px 0 30px;
    padding: 22px;

    border:
        1px solid #f0dada;

    border-radius: 14px;

    background: #fffafa;
}

.danger-zone > div > span {
    color: #b64c4c;

    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}

.danger-zone h3 {
    margin: 5px 0;

    font-size: 14px;
}

.danger-zone p {
    max-width: 620px;

    margin: 0;

    color: var(--muted);

    font-size: 9px;
}

.delete-details {
    min-width: 260px;
}

.delete-details summary {
    list-style: none;
}

.delete-details summary::-webkit-details-marker {
    display: none;
}

.delete-details form {
    margin-top: 13px;
}


@media (max-width: 1150px) {

    .filter-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

    .filter-actions {
        padding-bottom: 0;
    }

    .pending-table-head {
        display: none;
    }

    .pending-table-row {
        grid-template-columns:
            100px
            minmax(0,1fr)
            120px;
    }

    .pending-table-row > span:nth-of-type(2),
    .pending-table-row > span:nth-of-type(3) {
        display: none;
    }

}


@media (max-width: 800px) {

    .filter-grid,
    .pending-detail-grid,
    .pending-lower-grid {
        grid-template-columns: 1fr;
    }

    .pending-code-large {
        display: none;
    }

    .danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

}


@media (max-width: 600px) {

    .pending-table-row {
        grid-template-columns: 1fr;
    }

    .pending-table-row > span {
        display: inline-flex !important;
    }

}


/* AJUSTE FINAL - TABELA DE PENDENCIAS */

.pending-table {
    width: 100%;
    overflow: hidden;
}

.pending-table-head,
.pending-table-row {
    display: grid;

    grid-template-columns:
        130px
        minmax(260px, 1.6fr)
        120px
        minmax(220px, 1.15fr)
        150px
        120px;

    gap: 18px;

    align-items: center;

    width: 100%;
}

.pending-table-head {
    min-height: 48px;

    padding:
        0
        18px;

    border-bottom:
        1px solid #e8edf1;
}

.pending-table-row {
    min-height: 84px;

    padding:
        14px
        18px;

    border-top: 0;
    border-bottom:
        1px solid #edf0f2;
}

.pending-table-row:last-child {
    border-bottom: 0;
}

.pending-table-head > *,
.pending-table-row > * {
    min-width: 0;
}

.pending-main {
    min-width: 0;
}

.pending-main strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-bottom: 6px;
}

.pending-main span {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-table-row > span {
    display: flex;
    align-items: center;

    min-height: 32px;
}

.pending-table-row .status-pill,
.pending-table-row .priority-pill {
    width: 100%;
    max-width: 150px;

    min-height: 36px;

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

    padding:
        8px
        12px;

    white-space: nowrap;

    text-align: center;
}

.pending-table-row .priority-pill {
    max-width: 120px;
}

.pending-code {
    display: flex;
    align-items: center;

    min-height: 32px;
}

.pending-table-head span:nth-child(5),
.pending-table-head span:nth-child(6) {
    text-align: center;
}

.pending-table-row > .status-pill,
.pending-table-row > .priority-pill {
    justify-self: center;
}


/* TABLET */

@media (max-width: 1250px) {

    .pending-table-head,
    .pending-table-row {
        grid-template-columns:
            115px
            minmax(220px, 1.5fr)
            100px
            minmax(180px, 1fr)
            135px
            105px;

        gap: 12px;
    }

}


/* MOBILE / TELAS MENORES */

@media (max-width: 1050px) {

    .pending-table-head {
        display: none;
    }

    .pending-table-row {
        grid-template-columns:
            110px
            minmax(0, 1fr)
            130px;

        gap: 12px;
    }

    .pending-table-row > span:nth-of-type(1),
    .pending-table-row > span:nth-of-type(2) {
        display: none;
    }

}


@media (max-width: 650px) {

    .pending-table-row {
        grid-template-columns: 1fr;

        gap: 9px;

        padding:
            16px;
    }

    .pending-table-row > span {
        display: flex !important;
    }

    .pending-table-row .status-pill,
    .pending-table-row .priority-pill {
        width: auto;
        max-width: 180px;

        justify-self: start;
    }

}


/* ==================================================
   TABELA PENDENCIAS - CORRECAO DEFINITIVA FIX02
   ================================================== */

.pending-table {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.pending-table-head,
.pending-table-row {
    width: 100%;
    max-width: 100%;

    display: grid;

    grid-template-columns:
        minmax(90px, .80fr)
        minmax(220px, 2.25fr)
        minmax(80px, .75fr)
        minmax(190px, 1.75fr)
        minmax(105px, 1fr)
        minmax(90px, .85fr);

    column-gap: 18px;

    align-items: center;

    box-sizing: border-box;
}

.pending-table-head {
    min-height: 52px;

    padding:
        0
        18px;

    border-bottom:
        1px solid #e6ebef;
}

.pending-table-row {
    min-height: 86px;

    padding:
        14px
        18px;

    border-bottom:
        1px solid #edf1f4;

    overflow: visible;
}

.pending-table-row:last-child {
    border-bottom: 0;
}


/* todos os filhos podem encolher sem quebrar o grid */

.pending-table-head > *,
.pending-table-row > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}


/* CABECALHO */

.pending-table-head span {
    overflow: hidden;

    color: #667383;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .8px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-table-head span:nth-child(5),
.pending-table-head span:nth-child(6) {
    text-align: center;
}


/* CODIGO */

.pending-code {
    display: block;

    min-width: 0;
    min-height: auto;

    overflow: hidden;

    color: var(--navy-2);

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

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* CLIENTE + TITULO */

.pending-main {
    min-width: 0;
}

.pending-main strong {
    display: block;

    margin: 0 0 5px;

    overflow: hidden;

    color: var(--text);

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

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-main span {
    display: block;

    overflow: hidden;

    color: var(--muted);

    font-size: 9px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* SISTEMA E ETAPA */

.pending-table-row > span {
    min-width: 0;
    min-height: auto;

    display: block;

    overflow: hidden;

    color: var(--muted);

    font-size: 9px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* STATUS E PRIORIDADE */

.pending-table-row > .status-pill,
.pending-table-row > .priority-pill {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;

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

    justify-self: stretch;

    padding:
        7px
        10px;

    overflow: hidden;

    border-radius: 999px;

    text-align: center;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-table-row > .status-pill {
    max-width: none;
}

.pending-table-row > .priority-pill {
    max-width: none;
}


/* TELAS INTERMEDIARIAS */

@media (max-width: 1200px) {

    .pending-table-head,
    .pending-table-row {
        grid-template-columns:
            minmax(85px, .8fr)
            minmax(190px, 2fr)
            minmax(70px, .7fr)
            minmax(160px, 1.5fr)
            minmax(100px, 1fr)
            minmax(85px, .8fr);

        column-gap: 12px;
    }

}


/* TABLET */

@media (max-width: 950px) {

    .pending-table-head {
        display: none;
    }

    .pending-table-row {
        grid-template-columns:
            100px
            minmax(0, 1fr)
            120px;

        row-gap: 10px;
    }

    .pending-table-row > span:nth-of-type(1),
    .pending-table-row > span:nth-of-type(2) {
        display: none;
    }

}


/* CELULAR */

@media (max-width: 620px) {

    .pending-table-row {
        grid-template-columns: 1fr;

        padding: 16px;

        row-gap: 9px;
    }

    .pending-table-row > span {
        display: block !important;
    }

    .pending-table-row > .status-pill,
    .pending-table-row > .priority-pill {
        width: fit-content;
        min-width: 110px;

        justify-self: start;
    }

}
