:root {
    /* Institucional: navy, neutros e acentos discretos */
    --brand-blue: #0c2340;
    --brand-green: #1e5c4a;
    --brand-teal: #0d5c6b;
    --primary: #0c2340;
    --primary-muted: #1a3a5c;
    --primary-glow: rgba(12, 35, 64, 0.12);
    --secondary: #b8975e;
    --success: #166534;
    --warning: #b45309;
    --danger: #b91c1c;
    --info: #0f5f8a;
    --solicitado: rgba(13, 92, 107, 0.2);
    --bg-page: #eef1f5;
    --bg-subtle: #e4e8ef;
    --sidebar-bg: #0a1929;
    --card-bg: #ffffff;
    --border: #d8dee6;
    --border-strong: #c5cdd8;
    --text-main: #0f172a;
    --text-dim: #64748b;
    --sidebar-width: 272px;
    --glass: #ffffff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-page);
    background-image:
        linear-gradient(180deg, #f8fafc 0%, var(--bg-page) 32%, var(--bg-page) 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 100px;
    border: 2px solid var(--bg-subtle);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-muted);
}

.btn-refresh {
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--border-strong);
    padding: 11px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-refresh:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-refresh:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rotating {
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 22px 22px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-muted) 100%);
    opacity: 0.85;
}

.stat-card i {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 18px;
}

#login-screen {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    background:
        linear-gradient(160deg, #f8fafc 0%, #eef2f7 40%, #e8edf4 100%);
}

#login-screen::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(12, 35, 64, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 100%, rgba(15, 95, 138, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg' opacity='0.05'%3E%3Cpattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/pattern%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)' /%3E%3Cg transform='translate(50, 50)'%3E%3Crect width='300' height='200' rx='12' fill='%23000' fill-opacity='0.05' stroke='%23000' stroke-width='2'/%3E%3Crect x='0' y='0' width='80' height='200' rx='12' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='100' y='20' width='100' height='10' rx='4' fill='%23000' fill-opacity='0.2'/%3E%3Crect x='100' y='50' width='180' height='60' rx='8' fill='%23000' fill-opacity='0.05'/%3E%3Crect x='100' y='130' width='180' height='50' rx='8' fill='%23000' fill-opacity='0.05'/%3E%3C/g%3E%3Cg transform='translate(450, 150)'%3E%3Crect width='250' height='180' rx='12' fill='%23000' fill-opacity='0.02' stroke='%23000' stroke-width='2'/%3E%3Ccircle cx='125' cy='80' r='40' fill='none' stroke='%23000' stroke-width='12' stroke-dasharray='160 100' stroke-opacity='0.4'/%3E%3Ccircle cx='125' cy='80' r='40' fill='none' stroke='%23000' stroke-width='12' stroke-dasharray='80 200' stroke-dashoffset='-170' stroke-opacity='0.15'/%3E%3Crect x='50' y='140' width='150' height='10' rx='4' fill='%23000' fill-opacity='0.2'/%3E%3C/g%3E%3Cg transform='translate(150, 350)'%3E%3Crect width='500' height='200' rx='12' fill='%23000' fill-opacity='0.03' stroke='%23000' stroke-width='2'/%3E%3Cline x1='0' y1='40' x2='500' y2='40' stroke='%23000' stroke-width='2' stroke-opacity='0.5'/%3E%3Crect x='20' y='15' width='80' height='10' rx='4' fill='%23000' fill-opacity='0.3'/%3E%3Crect x='120' y='15' width='60' height='10' rx='4' fill='%23000' fill-opacity='0.15'/%3E%3Crect x='200' y='15' width='60' height='10' rx='4' fill='%23000' fill-opacity='0.15'/%3E%3Cline x1='0' y1='80' x2='500' y2='80' stroke='%23000' stroke-width='1' stroke-opacity='0.2'/%3E%3Cline x1='0' y1='120' x2='500' y2='120' stroke='%23000' stroke-width='1' stroke-opacity='0.2'/%3E%3Cline x1='0' y1='160' x2='500' y2='160' stroke='%23000' stroke-width='1' stroke-opacity='0.2'/%3E%3Crect x='20' y='60' width='120' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='200' y='60' width='80' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='20' y='100' width='100' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='200' y='100' width='140' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='20' y='140' width='140' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='200' y='140' width='90' height='8' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover, cover, auto;
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: center, center, top left;
    z-index: 0;
}

.bg-floating-symbols {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-floating-symbols span {
    position: absolute;
    bottom: -20%;
    color: var(--primary);
    font-weight: 900;
    opacity: 0.04;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-130vh) rotate(360deg);
    }
}

/* Tamanhos, posições e durações variadas para criar um aspecto orgânico */
.bg-floating-symbols span:nth-child(1) {
    left: 10%;
    font-size: 80px;
    animation-duration: 25s;
    animation-delay: 0s;
}

.bg-floating-symbols span:nth-child(2) {
    left: 25%;
    font-size: 120px;
    animation-duration: 32s;
    animation-delay: 5s;
}

.bg-floating-symbols span:nth-child(3) {
    left: 40%;
    font-size: 60px;
    animation-duration: 20s;
    animation-delay: 2s;
}

.bg-floating-symbols span:nth-child(4) {
    left: 55%;
    font-size: 160px;
    animation-duration: 38s;
    animation-delay: 1s;
}

.bg-floating-symbols span:nth-child(5) {
    left: 70%;
    font-size: 90px;
    animation-duration: 28s;
    animation-delay: 8s;
}

.bg-floating-symbols span:nth-child(6) {
    left: 85%;
    font-size: 110px;
    animation-duration: 34s;
    animation-delay: 4s;
}

.bg-floating-symbols span:nth-child(7) {
    left: 15%;
    font-size: 140px;
    animation-duration: 40s;
    animation-delay: 12s;
}

.bg-floating-symbols span:nth-child(8) {
    left: 80%;
    font-size: 70px;
    animation-duration: 24s;
    animation-delay: 6s;
}

.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(40px, 8vw, 88px);
    max-width: 1080px;
    width: 100%;
}

.logo-animada {
    width: min(320px, 85vw);
    filter: drop-shadow(0 8px 24px rgba(12, 35, 64, 0.1));
    animation: flutuar 8s ease-in-out infinite;
}

.login-container {
    background: var(--glass);
    padding: 44px 40px;
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.input-group label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input-group input {
    width: 100%;
    padding: 13px 16px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-size: 15px;
}

.input-group input:hover {
    border-color: var(--border-strong);
}

.input-group input:focus {
    border-color: var(--primary-muted);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-login {
    width: 100%;
    padding: 15px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(12, 35, 64, 0.22);
}

.btn-login:hover:not(:disabled) {
    background: var(--primary-muted);
    box-shadow: 0 6px 20px rgba(12, 35, 64, 0.28);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.forgot-password-link {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

#dashboard-screen {
    display: none;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 36px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 32px rgba(10, 25, 41, 0.35);
}

.sidebar-logo {
    width: 148px;
    margin: 0 auto 36px;
    filter: brightness(1.08) contrast(1.02);
}

.sidebar h2 {
    color: rgba(255, 255, 255, 0.38) !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
}

.sidebar button {
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    border-radius: var(--radius-md);
    text-align: left;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.sidebar button i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s;
}

.sidebar button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar button:hover i {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar>div:last-of-type {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

.topbar .user-info>div:first-child {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-muted) 100%) !important;
    border-radius: var(--radius-md) !important;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 32px clamp(24px, 4vw, 56px) 48px;
    max-width: 1440px;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--card-bg);
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.table-container {
    display: none;
    background: var(--card-bg);
    padding: 28px 32px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 12px;
}

th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    background: #f8fafc;
    font-size: 14px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

td:first-child {
    border-left: 1px solid var(--border);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

tbody tr:hover td {
    background: #f1f5f9;
    border-color: var(--border-strong);
}

.status-badge {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.buttons button {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--card-bg);
    color: var(--text-dim);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.buttons button:hover {
    border-color: var(--primary-muted);
    color: var(--primary);
    background: #f8fafc;
}

.buttons button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 11px;
    border: 1px solid var(--border-strong);
    background: var(--card-bg);
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-muted);
    color: var(--primary);
}

.filter-btn.active {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

/* —— Wizard Abertura de Chamado (institucional) —— */
#chamados.table-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.ch-wizard-page-head {
    margin-bottom: 22px;
}

.ch-wizard-page-head h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 6px;
}

.ch-wizard-page-head p {
    color: var(--text-dim);
    font-size: 14px;
    max-width: 52ch;
    line-height: 1.55;
}

.ch-wizard-shell {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow-x: hidden;
    position: relative;
}

.ch-wizard-shell::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--brand-teal) 45%, var(--secondary) 100%);
    opacity: 0.92;
}

.ch-wizard-trust {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.ch-wizard-trust i {
    color: var(--brand-teal);
    font-size: 16px;
}

.ch-wizard-inner {
    padding: 22px 22px 26px;
}

@media (min-width: 720px) {
    .ch-wizard-inner {
        padding: 28px 32px 32px;
    }
}

.ch-stepper {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    position: relative;
}

.ch-stepper-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.ch-stepper-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.ch-stepper-item--done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--primary), var(--primary-muted));
}

.ch-stepper-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border: 2px solid var(--border-strong);
    background: var(--card-bg);
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.ch-stepper-item--current .ch-stepper-dot {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(12, 35, 64, 0.22);
}

.ch-stepper-item--done .ch-stepper-dot {
    border-color: var(--primary-muted);
    background: var(--primary-muted);
    color: #fff;
    font-size: 12px;
}

.ch-stepper-text {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 112px;
}

.ch-stepper-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-main);
}

.ch-stepper-item--upcoming .ch-stepper-title {
    color: var(--text-dim);
}

.ch-stepper-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    line-height: 1.3;
    opacity: 0.9;
}

.ch-stepper-item--current .ch-stepper-sub {
    color: var(--primary-muted);
}

.ch-wizard-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.ch-wizard-eyebrow strong {
    color: var(--primary);
    font-weight: 800;
}

.chamado-etapa-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chamado-progress-track {
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.chamado-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--brand-teal));
    border-radius: 100px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ch-wizard-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(185, 28, 28, 0.06);
    border: 1px solid rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 20px;
}

.ch-wizard-alert::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    margin-top: 2px;
    opacity: 0.85;
}

.ch-wizard-alert[hidden] {
    display: none !important;
}

/* Toasts (feedback global) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(400px, calc(100vw - 32px));
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast.toast--visible {
    opacity: 1;
    transform: translateX(0);
}

.toast--success {
    background: var(--success);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast--error {
    background: var(--danger);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ch-panel-hero {
    margin-bottom: 22px;
}

.ch-panel-hero h3 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 6px;
}

.ch-panel-hero p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 48ch;
}

.ch-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.ch-choice-card {
    text-align: left;
    padding: 22px 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font: inherit;
    color: inherit;
}

.ch-choice-card:hover {
    border-color: var(--primary-muted);
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ch-choice-card:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ch-choice-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ch-choice-card--novo .ch-choice-icon {
    background: rgba(22, 101, 52, 0.1);
    color: var(--success);
}

.ch-choice-card--reset .ch-choice-icon {
    background: rgba(180, 83, 9, 0.1);
    color: var(--warning);
}

.ch-choice-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.ch-choice-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.ch-banco-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin: 0 0 16px;
}

.ch-banco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.ch-banco-btn {
    padding: 14px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ch-banco-btn:hover {
    border-color: var(--primary);
    background: #f8fafc;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.ch-banco-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ch-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    align-items: center;
}

.ch-wizard-actions--embedded {
    border-top: none;
    margin-top: 16px;
    padding-top: 0;
}

.chamado-wizard {
    margin-top: 0;
}

.chamado-step {
    display: none;
    animation: chFadeIn 0.35s ease;
}

.chamado-step.is-active {
    display: block;
}

@keyframes chFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chamado-substep {
    display: none;
}

.chamado-substep.is-active {
    display: block;
}

.chamado-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    margin-top: 4px;
    padding-top: 4px;
}

.ch-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ch-field-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
}

.chamado-fields-grid input,
.chamado-fields-grid select,
.ch-field-group input,
.ch-field-group select {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fafbfc;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-size: 14px;
}

.chamado-fields-grid input:focus,
.chamado-fields-grid select:focus,
.ch-field-group input:focus,
.ch-field-group select:focus {
    outline: none;
    border-color: var(--primary-muted);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.chamado-fields-grid h3,
.chamado-substep>.ch-section-head h3 {
    margin-bottom: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.ch-section-head {
    grid-column: span 2;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.ch-section-head p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-dim);
    line-height: 1.5;
}

.chamado-fields-grid .chamado-field-full {
    grid-column: span 2;
}

.ch-file-zone {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 14px;
    background: #fafbfc;
    transition: border-color 0.2s, background 0.2s;
}

.ch-file-zone:focus-within {
    border-color: var(--primary-muted);
    background: #fff;
}

.chamado-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding: 20px 0 0;
    border-top: 1px solid var(--border);
    align-items: center;
}

.chamado-nav .btn-chamado-sec,
.ch-wizard-actions .btn-chamado-sec {
    padding: 13px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.chamado-nav .btn-chamado-sec:hover,
.ch-wizard-actions .btn-chamado-sec:hover {
    border-color: var(--primary-muted);
    background: #f8fafc;
}

.chamado-nav .btn-chamado-primary,
.ch-wizard-actions .btn-chamado-primary {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(12, 35, 64, 0.2);
    margin-left: auto;
}

.chamado-nav .btn-chamado-primary:hover:not(:disabled),
.ch-wizard-actions .btn-chamado-primary:hover:not(:disabled) {
    background: var(--primary-muted);
    box-shadow: 0 6px 22px rgba(12, 35, 64, 0.24);
}

.chamado-nav .btn-chamado-primary:disabled,
.ch-wizard-actions .btn-chamado-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.chamado-resumo-box {
    grid-column: span 2;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-main);
}

.chamado-resumo-box dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    font-weight: 700;
    margin-top: 14px;
}

.chamado-resumo-box dt:first-child {
    margin-top: 0;
}

.chamado-resumo-box dd {
    margin: 4px 0 0 0;
    font-weight: 600;
    color: var(--text-main);
}

.chamado-aviso-reset {
    grid-column: span 2;
    font-size: 13px;
    color: var(--text-main);
    background: rgba(245, 158, 11, 0.09);
    border: 1px solid rgba(180, 83, 9, 0.28);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.chamado-aviso-reset strong {
    color: var(--warning);
    font-weight: 800;
}

@media (max-width: 900px) {
    .ch-stepper {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 8px;
        margin-left: -4px;
        margin-right: -4px;
    }

    .ch-stepper-item {
        flex: 0 0 auto;
        min-width: 88px;
    }

    .ch-stepper-item:not(:last-child)::after {
        display: none;
    }

    .ch-stepper-text {
        max-width: 100px;
    }
}

@media (max-width: 600px) {
    .ch-wizard-inner {
        padding: 18px 16px 22px;
    }

    .ch-wizard-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #128c7e;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(18, 140, 126, 0.35);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(18, 140, 126, 0.4);
}

@keyframes flutuar {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* JS / inline escuro → tema claro institucional */
#usuario-logado {
    color: var(--text-main) !important;
}

#area-tabelas-categorias table tbody td:nth-child(1) {
    color: var(--text-main) !important;
    font-weight: 600 !important;
}

#area-tabelas-categorias input[type="text"] {
    background: #fff !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
}

#area-tabelas-categorias input[type="text"]:focus {
    border-color: var(--primary-muted) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.vendas-filtros-bar select:focus {
    outline: none !important;
    border-color: var(--primary-muted) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}
}

/* Ajuste fino para os focus dos filtros de venda */
.vendas-filtros-bar input:focus,
.vendas-filtros-bar select:focus {
    background: var(--card-bg) !important;
}

#botoes-bancos .ch-banco-btn {
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color 0.2s, background 0.2s !important;
}

#botoes-bancos .ch-banco-btn:hover {
    border-color: var(--primary) !important;
    background: #f8fafc !important;
    color: var(--primary) !important;
}

#dashboard-tab .stats-grid .stat-card:nth-child(1) i {
    background: rgba(12, 35, 64, 0.08) !important;
    color: var(--primary) !important;
}

#dashboard-tab .stats-grid .stat-card:nth-child(2) i {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #16a34a !important;
}

#dashboard-tab .stats-grid .stat-card:nth-child(3) i {
    background: rgba(245, 158, 11, 0.12) !important;
    color: var(--warning) !important;
}

#dashboard-tab .stats-grid .stat-card:nth-child(4) i {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #ea580c !important;
}

.stat-card.stat-card--accent-averbado::before {
    background: linear-gradient(90deg, #15803d 0%, #22c55e 100%) !important;
    opacity: 1 !important;
}

.stat-card.stat-card--accent-previsao::before {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%) !important;
    opacity: 1 !important;
}

/* —— Skeleton loaders —— */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-block {
    display: block;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 45%, #e8edf4 90%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.15s ease-in-out infinite;
}

.stat-card__skeleton {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 2px;
}

.stats-grid.is-loading .stat-card__skeleton {
    display: flex;
}

.stats-grid.is-loading .stat-card__content {
    display: none;
}

.skeleton-block--icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
}

.skeleton-block--label {
    width: 72%;
    height: 11px;
    border-radius: 4px;
}

.skeleton-block--value {
    width: 48%;
    height: 26px;
    border-radius: 6px;
    margin-top: 2px;
}

.dashboard-comissoes-skeleton {
    margin-bottom: 8px;
}

.dashboard-comissoes-skeleton[hidden] {
    display: none !important;
}

.dashboard-skeleton-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.skeleton-pill {
    width: 96px;
    height: 36px;
    border-radius: var(--radius-md);
}

.skeleton-pill:nth-child(2) {
    width: 72px;
}

.skeleton-pill:nth-child(3) {
    width: 84px;
}

.skeleton-pill:nth-child(4) {
    width: 110px;
}

.skeleton-search {
    height: 48px;
    border-radius: 14px;
    margin-bottom: 25px;
    width: 100%;
}

.skeleton-table-head {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr;
    gap: 12px;
    padding: 0 4px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.skeleton-table-head .skeleton-block {
    height: 11px;
    border-radius: 4px;
}

.skeleton-table-head .skeleton-block:nth-child(2) {
    width: 80%;
}

.skeleton-table-head .skeleton-block:nth-child(3) {
    width: 60%;
    justify-self: end;
}

.skeleton-table-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 4px;
}

.skeleton-table-row .skeleton-block {
    height: 14px;
}

.skeleton-table-row .skeleton-block:nth-child(1) {
    width: 92%;
}

.skeleton-table-row .skeleton-block:nth-child(2) {
    width: 75%;
}

.skeleton-table-row .skeleton-block:nth-child(3) {
    width: 52%;
    justify-self: end;
}

.skeleton-table--admin .skeleton-table-head,
.skeleton-table--admin .skeleton-table-row {
    grid-template-columns: 1fr 1fr 1fr 0.9fr;
}

.skeleton-table--admin .skeleton-table-head .skeleton-block:nth-child(4) {
    width: 70%;
    justify-self: end;
}

.skeleton-table--admin .skeleton-table-row .skeleton-block:nth-child(4) {
    width: 64%;
    justify-self: end;
}

.skeleton-table--vendas .skeleton-table-head,
.skeleton-table--vendas .skeleton-table-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.skeleton-vendas-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.skeleton-vendas-filtros .skeleton-block {
    height: 44px;
    border-radius: 12px;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .main-container {
        flex-direction: column;
        text-align: center;
    }

    .sidebar {
        width: 72px;
        padding: 24px 8px;
    }

    .sidebar span,
    .sidebar h2,
    .sidebar-logo {
        display: none;
    }

    .sidebar button {
        justify-content: center;
        padding: 14px 10px;
    }

    .sidebar button i {
        margin: 0;
    }

    .main-content {
        margin-left: 72px;
        width: calc(100% - 72px);
        padding: 24px 18px 40px;
    }

    .stat-card::before {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media (max-width: 600px) {
    .login-container {
        padding: 32px 24px;
    }

    .chamado-fields-grid {
        grid-template-columns: 1fr;
    }

    .chamado-fields-grid h3,
    .chamado-substep>h3,
    .chamado-fields-grid .chamado-field-full {
        grid-column: span 1;
    }

    .chamado-nav .btn-chamado-primary {
        margin-left: 0;
        width: 100%;
    }

    .chamado-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
}

/* —— Modo escuro (grafite + texto claro; destaques azul/verde da marca) —— */
.theme-toggle-bar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
}

.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-theme-toggle .theme-icon {
    font-size: 14px;
    color: var(--brand-teal);
}

html[data-theme="dark"] .btn-theme-toggle .theme-icon {
    color: var(--brand-green);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --brand-blue: #5eb0e8;
    --brand-green: #3dd4a8;
    --brand-teal: #4ecdc4;
    --primary: #5eb0e8;
    --primary-muted: #3d8ec4;
    --primary-glow: rgba(94, 176, 232, 0.28);
    --secondary: #d4b87a;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --solicitado: rgba(78, 205, 196, 0.18);
    --bg-page: #1e2228;
    --bg-subtle: #282e38;
    --sidebar-bg: #12161c;
    --card-bg: #2f3640;
    --border: #3d4452;
    --border-strong: #505a6a;
    --text-main: #e8eaef;
    --text-dim: #94a3b8;
    --glass: #2f3640;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] body {
    background-color: var(--bg-page);
    background-image: linear-gradient(180deg, #252b34 0%, var(--bg-page) 32%, var(--bg-page) 100%);
}

html[data-theme="dark"] #login-screen {
    background: linear-gradient(160deg, #1a1e24 0%, #1e2228 45%, #181c22 100%);
}

html[data-theme="dark"] .bg-floating-symbols span {
    opacity: 0.02;
}

html[data-theme="dark"] #login-screen::before {
    background-image:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(94, 176, 232, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 100%, rgba(61, 212, 168, 0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg' opacity='0.04'%3E%3Cpattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/pattern%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)' /%3E%3Cg transform='translate(50, 50)'%3E%3Crect width='300' height='200' rx='12' fill='%23fff' fill-opacity='0.05' stroke='%23fff' stroke-width='2'/%3E%3Crect x='0' y='0' width='80' height='200' rx='12' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='100' y='20' width='100' height='10' rx='4' fill='%23fff' fill-opacity='0.2'/%3E%3Crect x='100' y='50' width='180' height='60' rx='8' fill='%23fff' fill-opacity='0.05'/%3E%3Crect x='100' y='130' width='180' height='50' rx='8' fill='%23fff' fill-opacity='0.05'/%3E%3C/g%3E%3Cg transform='translate(450, 150)'%3E%3Crect width='250' height='180' rx='12' fill='%23fff' fill-opacity='0.02' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='125' cy='80' r='40' fill='none' stroke='%23fff' stroke-width='12' stroke-dasharray='160 100' stroke-opacity='0.4'/%3E%3Ccircle cx='125' cy='80' r='40' fill='none' stroke='%23fff' stroke-width='12' stroke-dasharray='80 200' stroke-dashoffset='-170' stroke-opacity='0.15'/%3E%3Crect x='50' y='140' width='150' height='10' rx='4' fill='%23fff' fill-opacity='0.2'/%3E%3C/g%3E%3Cg transform='translate(150, 350)'%3E%3Crect width='500' height='200' rx='12' fill='%23fff' fill-opacity='0.03' stroke='%23fff' stroke-width='2'/%3E%3Cline x1='0' y1='40' x2='500' y2='40' stroke='%23fff' stroke-width='2' stroke-opacity='0.5'/%3E%3Crect x='20' y='15' width='80' height='10' rx='4' fill='%23fff' fill-opacity='0.3'/%3E%3Crect x='120' y='15' width='60' height='10' rx='4' fill='%23fff' fill-opacity='0.15'/%3E%3Crect x='200' y='15' width='60' height='10' rx='4' fill='%23fff' fill-opacity='0.15'/%3E%3Cline x1='0' y1='80' x2='500' y2='80' stroke='%23fff' stroke-width='1' stroke-opacity='0.2'/%3E%3Cline x1='0' y1='120' x2='500' y2='120' stroke='%23fff' stroke-width='1' stroke-opacity='0.2'/%3E%3Cline x1='0' y1='160' x2='500' y2='160' stroke='%23fff' stroke-width='1' stroke-opacity='0.2'/%3E%3Crect x='20' y='60' width='120' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='200' y='60' width='80' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='20' y='100' width='100' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='200' y='100' width='140' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='20' y='140' width='140' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='200' y='140' width='90' height='8' rx='4' fill='%23fff' fill-opacity='0.1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover, cover, auto;
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: center, center, top left;
}

html[data-theme="dark"] .input-group input {
    background: var(--bg-subtle);
    color: var(--text-main);
}

html[data-theme="dark"] .input-group input:focus {
    background: var(--card-bg);
}

html[data-theme="dark"] td {
    background: var(--bg-subtle);
}

html[data-theme="dark"] tbody tr:hover td {
    background: #363d4a;
    border-color: var(--border-strong);
}

html[data-theme="dark"] .buttons button:hover {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .filter-btn.active {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .ch-wizard-trust {
    background: linear-gradient(180deg, #2a3038 0%, #252b34 100%);
}

html[data-theme="dark"] .ch-choice-card {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .ch-choice-card:hover {
    background: var(--card-bg);
}

html[data-theme="dark"] .ch-banco-btn:hover {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .chamado-fields-grid input,
html[data-theme="dark"] .chamado-fields-grid select,
html[data-theme="dark"] .ch-field-group input,
html[data-theme="dark"] .ch-field-group select {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .chamado-fields-grid input:focus,
html[data-theme="dark"] .chamado-fields-grid select:focus,
html[data-theme="dark"] .ch-field-group input:focus,
html[data-theme="dark"] .ch-field-group select:focus {
    background: var(--card-bg);
}

html[data-theme="dark"] .ch-file-zone {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .ch-file-zone:focus-within {
    background: var(--card-bg);
}

html[data-theme="dark"] .chamado-nav .btn-chamado-sec:hover,
html[data-theme="dark"] .ch-wizard-actions .btn-chamado-sec:hover {
    background: var(--bg-subtle);
}

html[data-theme="dark"] .chamado-resumo-box {
    background: linear-gradient(180deg, #2a3038 0%, #252b34 100%);
}

html[data-theme="dark"] .ch-wizard-alert {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

html[data-theme="dark"] #area-tabelas-categorias input[type="text"] {
    background: var(--bg-subtle) !important;
}


html[data-theme="dark"] #botoes-bancos .ch-banco-btn:hover {
    background: var(--bg-subtle) !important;
}

html[data-theme="dark"] .skeleton-block {
    background: linear-gradient(90deg, #2f3640 0%, #3d4654 45%, #2f3640 90%, #2f3640 100%);
}

html[data-theme="dark"] .chamado-nav .btn-chamado-primary,
html[data-theme="dark"] .ch-wizard-actions .btn-chamado-primary {
    box-shadow: 0 4px 16px rgba(94, 176, 232, 0.28);
}

html[data-theme="dark"] .chamado-nav .btn-chamado-primary:hover:not(:disabled),
html[data-theme="dark"] .ch-wizard-actions .btn-chamado-primary:hover:not(:disabled) {
    box-shadow: 0 6px 22px rgba(94, 176, 232, 0.35);
}

html[data-theme="dark"] .btn-login {
    box-shadow: 0 4px 14px rgba(94, 176, 232, 0.35);
}

html[data-theme="dark"] .btn-login:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(94, 176, 232, 0.42);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #5a6578;
    border-color: var(--bg-subtle);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6b7688;
}

/* Loader Centralizado */
#loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

#loader-overlay.visible {
    display: flex;
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.loader-dots {
    display: inline-block;
    margin-left: 4px;
}

.loader-dots::after {
    content: '.';
    animation: loader-dots 1.5s steps(4, end) infinite;
}

@keyframes loader-dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60% {
        content: '...';
    }

    80%,
    100% {
        content: '';
    }
}

/* ── Botão hamburguer ── */
.btn-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.btn-hamburger:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
}

/* ── Sidebar backdrop (overlay escuro) ── */
#sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 41, 0.55);
    z-index: 99;
    backdrop-filter: blur(2px);
}

#sidebar-backdrop.visible {
    display: block;
    animation: backdropIn 0.25s ease;
}

@keyframes backdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Sync timestamp na topbar ── */
.sync-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    min-width: 0;
}

.sync-timestamp {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
    opacity: 0.8;
    white-space: nowrap;
}

/* ── Layout mobile ≤ 768px ── */
@media (max-width: 768px) {
    .btn-hamburger {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        /* Ignorar o colapso do breakpoint de 1024px */
        width: var(--sidebar-width) !important;
        padding: 36px 16px !important;
    }

    .sidebar--open {
        transform: translateX(0) !important;
    }

    /* Restaurar elementos ocultos pelo breakpoint 1024px */
    .sidebar span,
    .sidebar h2,
    .sidebar-logo {
        display: block !important;
    }

    .sidebar button {
        justify-content: flex-start !important;
        padding: 12px 14px !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px 16px 40px;
    }

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

    .topbar {
        gap: 10px;
    }
}