    :root {
        --primary: #2563eb;
        --primary-2: #1d4ed8;
        --success: #059669;
        --danger: #dc2626;
        --warning: #d97706;
        --info: #0ea5e9;

        --bg: #08101d;
        --bg-soft: #0c1628;
        --card: rgba(15, 23, 42, 0.92);
        --card-2: rgba(20, 32, 54, 0.92);
        --input: #111c31;
        --border: rgba(148, 163, 184, 0.18);
        --border-strong: rgba(96, 165, 250, 0.35);
        --text: #f8fafc;
        --text-soft: #cbd5e1;
        --muted: #94a3b8;
        --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.18);
        --shadow-md: 0 22px 56px rgba(0, 0, 0, 0.28);
        --shadow-lg: 0 36px 90px rgba(0, 0, 0, 0.36);
        --radius-sm: 10px;
        --radius-md: 14px;
        --radius-lg: 20px;
        --transition: 180ms ease;
        --chart-grid: rgba(148, 163, 184, 0.14);
    }

    body[data-theme="light"] {
        --primary: #2563eb;
        --primary-2: #1d4ed8;
        --success: #059669;
        --danger: #dc2626;
        --warning: #d97706;
        --info: #0284c7;

        --bg: #eef4fb;
        --bg-soft: #dde7f5;
        --card: rgba(255, 255, 255, 0.95);
        --card-2: rgba(248, 250, 252, 0.98);
        --input: #ffffff;
        --border: rgba(15, 23, 42, 0.10);
        --border-strong: rgba(37, 99, 235, 0.26);
        --text: #0f172a;
        --text-soft: #334155;
        --muted: #64748b;
        --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
        --shadow-md: 0 22px 56px rgba(15, 23, 42, 0.12);
        --shadow-lg: 0 36px 90px rgba(15, 23, 42, 0.16);
        --chart-grid: rgba(15, 23, 42, 0.08);
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Inter", "Segoe UI", Arial, sans-serif;
    }

    html { scroll-behavior: smooth; }

    body {
        background:
            radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 26%),
            radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.08), transparent 24%),
            linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
        color: var(--text);
        min-height: 100vh;
        overflow-x: hidden;
        transition: background var(--transition), color var(--transition);
    }

    *::-webkit-scrollbar { width: 10px; height: 10px; }
    *::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 999px; }
    *::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.24); border-radius: 999px; }
    *::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.36); }

    h1, h2, h3 { letter-spacing: 0.02em; }
    h2 { font-size: 1.32rem; margin-bottom: 4px; }

    #toast {
        visibility: hidden;
        min-width: 320px;
        background: linear-gradient(135deg, #059669, #10b981);
        color: #fff;
        text-align: center;
        border-radius: 14px;
        padding: 16px 22px;
        position: fixed;
        z-index: 2000;
        left: 50%;
        top: 28px;
        transform: translateX(-50%);
        font-weight: 700;
        box-shadow: var(--shadow-md);
        border: 1px solid rgba(255,255,255,0.16);
        backdrop-filter: blur(8px);
    }
    #toast.show { visibility: visible; animation: fadein 0.35s, fadeout 0.35s 1.5s; }
    @keyframes fadein { from { top: 0; opacity: 0; } to { top: 28px; opacity: 1; } }
    @keyframes fadeout { from { top: 28px; opacity: 1; } to { top: 0; opacity: 0; } }

    #menu-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
        cursor: pointer;
        font-size: 22px;
        color: var(--text);
        background: color-mix(in srgb, var(--card) 92%, transparent);
        padding: 10px 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        display: none;
        transition: transform var(--transition), background var(--transition), border-color var(--transition);
        backdrop-filter: blur(10px);
    }
    #menu-toggle:hover {
        transform: translateY(-1px);
        border-color: var(--border-strong);
    }

    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100%;
        width: 320px;
        background: color-mix(in srgb, var(--card) 96%, transparent);
        border-right: 1px solid var(--border);
        z-index: 1000;
        transition: 0.28s ease;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        backdrop-filter: blur(14px);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.active { left: 0; }
    .sidebar h3 {
        padding: 28px 22px;
        font-size: 13px;
        color: #93c5fd;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        margin-top: 52px;
        border-bottom: 1px solid var(--border);
    }
    .sidebar button {
        background: none;
        color: var(--muted);
        border: none;
        padding: 15px 20px;
        cursor: pointer;
        text-align: left;
        font-size: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        width: 100%;
        display: none;
        transition: all var(--transition);
        position: relative;
    }
    .sidebar button:hover {
        background: rgba(37, 99, 235, 0.08);
        color: var(--text);
        padding-left: 28px;
    }
    .sidebar button:hover::before,
    .sidebar button.active::before {
        content: "";
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 18px;
        border-radius: 999px;
        background: var(--primary);
    }
    .sidebar button.active {
        color: var(--text);
        background: rgba(37, 99, 235, 0.10);
        padding-left: 28px;
    }

    .sidebar-group { border-bottom: 1px solid rgba(255,255,255,0.04); }
    .sidebar-group > button { border-bottom: none; }
    .sidebar-submenu {
        display: none;
        padding: 0 0 10px 0;
        background: rgba(255,255,255,0.02);
    }
    .sidebar-submenu.open { display: block; }
    .sidebar-submenu button {
        display: none;
        padding: 12px 20px 12px 38px;
        font-size: 13px;
        border-bottom: none;
    }
    .sidebar-submenu button:hover,
    .sidebar-submenu button.active {
        padding-left: 44px;
    }

    #overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.72);
        backdrop-filter: blur(3px);
        z-index: 999;
    }

    .main {
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 24px;
    }

    .card-container {
        background: var(--card);
        padding: 30px;
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 1380px;
        box-shadow: var(--shadow-lg);
        display: none;
        max-height: 95vh;
        overflow-y: auto;
        border: 1px solid var(--border);
        backdrop-filter: blur(10px);
        transition: background var(--transition), border-color var(--transition);
    }

    .form-vertical { display: flex; flex-direction: column; gap: 12px; }

    input, select, textarea {
        padding: 14px 15px;
        border-radius: 12px;
        background: var(--input);
        border: 1px solid var(--border);
        color: var(--text);
        font-size: 14px;
        width: 100%;
        outline: none;
        transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    }
    input:focus, select:focus, textarea:focus {
        border-color: rgba(37, 99, 235, 0.62);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }
    input:disabled { opacity: 0.7; cursor: not-allowed; }
    label {
        font-size: 11px;
        color: #93c5fd;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .search-bar {
        margin-bottom: 15px;
        border: 1px solid rgba(59, 130, 246, 0.28);
        background: color-mix(in srgb, var(--input) 92%, transparent);
        padding: 12px 14px;
        border-radius: 14px;
        color: var(--text);
        width: 100%;
    }

    .btn-acao {
        min-height: 48px;
        border-radius: 12px;
        border: 1px solid transparent;
        font-weight: 700;
        cursor: pointer;
        text-transform: uppercase;
        transition: transform var(--transition), filter var(--transition), box-shadow var(--transition), border-color var(--transition);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0 18px;
        box-shadow: var(--shadow-sm);
    }
    .btn-acao:hover { transform: translateY(-1px); filter: brightness(1.03); }
    .btn-acao:active { transform: translateY(0); }
    .btn-acao.ghost {
        background: transparent;
        color: var(--text-soft);
        border-color: var(--border);
        box-shadow: none;
    }
    .primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
    .success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
    .danger { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
    .warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
    .info { background: linear-gradient(135deg, #0284c7, #0ea5e9); color: #fff; }

    .table-wrap {
        overflow-x: auto;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: rgba(8, 15, 28, 0.28);
    }
    table { width: 100%; border-collapse: collapse; margin-top: 0; }
    th {
        background: color-mix(in srgb, var(--card) 98%, transparent);
        color: #93c5fd;
        padding: 14px 12px;
        text-align: left;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 1px solid rgba(59, 130, 246, 0.25);
        font-size: 12px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        backdrop-filter: blur(8px);
    }
    td {
        padding: 13px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 13px;
        color: var(--text-soft);
        vertical-align: top;
    }
    tbody tr:hover { background: rgba(37, 99, 235, 0.06); }

    .dash-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
    .dash-grid.dual { grid-template-columns: 1.2fr 1fr; }
    .chart-box, .summary-box, .kpi, .mini-card {
        background: var(--card-2);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }
    .chart-box {
        padding: 22px;
        border-radius: 16px;
        min-height: 520px;
        position: relative;
    }
    .chart-box canvas { min-height: 460px !important; }
    .summary-box {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 12px;
    }
    .cards-list { display: flex; flex-direction: column; gap: 12px; }
    .mini-card { padding: 16px; border-radius: 16px; }
    .mini-card .actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
    .kpis {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-top: 12px;
        margin-bottom: 20px;
    }
    .kpi {
        padding: 16px;
        border-radius: 16px;
        position: relative;
        overflow: hidden;
    }
    .kpi::after {
        content: "";
        position: absolute;
        right: -18px;
        top: -18px;
        width: 74px;
        height: 74px;
        border-radius: 50%;
        background: rgba(59, 130, 246, 0.08);
    }
    .kpi .n { font-size: 28px; font-weight: 800; margin-top: 8px; line-height: 1; }

    .muted { color: var(--muted); font-size: 12px; }
    .status-box {
        margin-top: 14px;
        padding: 14px 16px;
        border-radius: 14px;
        border: 1px solid transparent;
        display: none;
        font-size: 13px;
        line-height: 1.45;
    }
    .status-ok { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.32); color: #d1fae5; }
    .status-warn { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.32); color: #fde68a; }
    .status-danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.32); color: #fecaca; }

    #p_lista {
        background: rgba(7, 11, 20, 0.82);
        padding: 16px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        border: 1px solid var(--border);
    }
    #p_lista label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
        color: var(--text-soft);
        text-transform: none;
        font-weight: 500;
        letter-spacing: normal;
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 10px;
        transition: background var(--transition);
    }
    #p_lista label:hover { background: rgba(255,255,255,0.04); }
    #p_lista input { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--primary); }

    #loader {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.78);
        z-index: 5000;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(6px);
    }

    .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

    .dashboard-head {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        margin-bottom: 18px;
    }
    .dashboard-filter-card {
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--card-2);
        box-shadow: var(--shadow-sm);
    }
    .selector-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
        margin-top: 12px;
    }
    .selector-item {
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: color-mix(in srgb, var(--input) 92%, transparent);
        cursor: pointer;
        transition: all var(--transition);
    }
    .selector-item:hover,
    .selector-item.active {
        border-color: var(--border-strong);
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }
    .selector-item .title { font-weight: 700; color: var(--text); }
    .selector-item .meta { margin-top: 6px; font-size: 12px; color: var(--muted); }

    .pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.10);
        color: var(--text);
        border: 1px solid rgba(37, 99, 235, 0.16);
        font-size: 12px;
        font-weight: 600;
    }
    .pill.warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.22); }
    .pill.success { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.22); }

    .acoes-inline {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-end;
    }
    .icon-btn {
        width: 38px;
        height: 38px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 12px;
        background: color-mix(in srgb, var(--card) 94%, transparent);
        color: var(--text-soft);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: 0.18s ease;
        box-shadow: 0 8px 20px rgba(0,0,0,0.14);
        padding: 0;
    }
    .icon-btn svg { width: 18px; height: 18px; stroke: currentColor; }
    .icon-btn:hover {
        transform: translateY(-1px);
        border-color: rgba(96, 165, 250, 0.35);
        background: color-mix(in srgb, var(--card-2) 98%, transparent);
        color: var(--text);
    }
    .icon-btn.edit:hover { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); box-shadow: 0 10px 22px rgba(245, 158, 11, 0.12); }
    .icon-btn.delete:hover { color: #ef4444; border-color: rgba(239, 68, 68, 0.35); box-shadow: 0 10px 22px rgba(239, 68, 68, 0.14); }

    .inventory-detail {
        margin-top: 14px;
        padding: 14px;
        border-radius: 14px;
        background: rgba(255,255,255,0.02);
        border: 1px solid var(--border);
        display: none;
    }
    .inventory-detail.open { display: block; }
    .inventory-addresses {
        margin-top: 10px;
        max-height: 180px;
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    .inventory-address {
        padding: 8px 10px;
        border-radius: 10px;
        background: color-mix(in srgb, var(--input) 92%, transparent);
        border: 1px solid var(--border);
        font-size: 12px;
    }

    .section-box {
        background: rgba(255,255,255,0.03);
        padding: 20px;
        border-radius: 16px;
        border: 1px solid var(--border);
    }

    .theme-btn { display: block !important; }
    .footer-spacer { flex-grow: 1; }

    #loginScreen {
        display: block;
        background: color-mix(in srgb, var(--card) 98%, transparent) !important;
        padding: 40px !important;
        border-radius: 24px !important;
        width: 100%;
        max-width: 380px;
        text-align: center;
        border: 1px solid var(--border-strong) !important;
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(12px);
    }
    #loginScreen h1 {
        color: #93c5fd !important;
        margin-bottom: 22px !important;
        letter-spacing: 0.12em !important;
        font-size: 1.6rem;
    }

    #avisoInativo {
        text-align: center;
        padding: 56px 24px !important;
        background: rgba(255,255,255,0.02);
        border: 1px dashed rgba(239,68,68,0.28);
        border-radius: 18px;
    }
    #formColetor .form-vertical {
        background: rgba(255,255,255,0.02);
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 24px;
        box-shadow: var(--shadow-sm);
        max-width: 560px !important;
        margin: 0 auto !important;
    }

    @media (max-width: 1100px) {
        .dash-grid.dual, .grid-2, .grid-3, .grid-4, .kpis { grid-template-columns: 1fr; }
    }
    @media (max-width: 920px) {
        .card-container { padding: 20px; }
        .sidebar { width: 290px; left: -290px; }
        .main { padding: 16px; }
        #loginScreen { padding: 28px !important; }
    }
    @media (max-width: 768px) {
        .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
        .icon-btn svg { width: 17px; height: 17px; }
        .selector-list { grid-template-columns: 1fr; }
    }

    .toggle-group { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    .toggle-group .btn-acao.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-2));
        color:#fff;
        border-color: transparent;
        box-shadow: var(--shadow-sm);
    }
    .list-table { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card-2); }
    .list-table table { margin-top: 0; }
    .inline-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
    body[data-theme="light"] .table-wrap,
    body[data-theme="light"] .list-table,
    body[data-theme="light"] #p_lista,
    body[data-theme="light"] .inventory-detail,
    body[data-theme="light"] .section-box,
    body[data-theme="light"] #avisoInativo,
    body[data-theme="light"] #formColetor .form-vertical,
    body[data-theme="light"] .dashboard-filter-card {
        background: rgba(255,255,255,0.94) !important;
        border-color: rgba(15, 23, 42, 0.08) !important;
    }
    body[data-theme="light"] .search-bar,
    body[data-theme="light"] .selector-item,
    body[data-theme="light"] .inventory-address,
    body[data-theme="light"] .mini-card {
        background: rgba(255,255,255,0.96) !important;
    }
    body[data-theme="light"] #loginScreen {
        background: rgba(255,255,255,0.97) !important;
        color: var(--text) !important;
        border-color: rgba(37,99,235,0.25) !important;
    }
    body[data-theme="light"] .sidebar-submenu {
        background: rgba(15,23,42,0.03);
    }


    /* ===== Figma adaptation fixes ===== */
    .topbar {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 998;
        height: 78px;
        padding: 14px 24px;
        backdrop-filter: blur(14px);
        background: color-mix(in srgb, var(--card) 94%, transparent);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }
    .topbar-inner {
        max-width: 1680px;
        margin: 0 auto;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
    }
    .brand-wrap {
        display:flex;
        align-items:center;
        gap:14px;
        min-width: 260px;
    }
    .brand-icon {
        width: 46px;
        height: 46px;
        border-radius: 16px;
        background: linear-gradient(135deg, var(--primary), var(--primary-2));
        display:flex;
        align-items:center;
        justify-content:center;
        color:#fff;
        font-size:20px;
        box-shadow: var(--shadow-sm);
    }
    .brand-copy h1 {
        margin: 0;
        font-size: 18px;
        color: var(--text);
        letter-spacing: 0.01em;
    }
    .brand-copy p {
        margin: 3px 0 0;
        font-size: 12px;
        color: var(--muted);
    }
    .topbar-search {
        flex: 1;
        max-width: 520px;
        position: relative;
    }
    .topbar-search input {
        padding-left: 42px;
        height: 48px;
        border-radius: 16px;
    }
    .topbar-search .icon {
        position:absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 16px;
        pointer-events: none;
    }
    .topbar-actions {
        display:flex;
        align-items:center;
        gap: 10px;
    }
    .topbar-chip {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: color-mix(in srgb, var(--card-2) 96%, transparent);
        display:flex;
        align-items:center;
        justify-content:center;
        color: var(--text-soft);
        box-shadow: var(--shadow-sm);
    }
    .user-badge {
        min-width: 44px;
        height: 44px;
        border-radius: 999px;
        padding: 0 14px;
        background: linear-gradient(135deg, #059669, #10b981);
        color:#fff;
        display:flex;
        align-items:center;
        justify-content:center;
        font-weight: 800;
        letter-spacing: .04em;
        box-shadow: var(--shadow-sm);
    }
    body.authenticated .topbar { display:block; }
    body.authenticated .main {
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 110px;
    }
    body.authenticated .card-container {
        max-width: 1500px;
        margin: 0 auto;
    }
    body.authenticated #loginScreen { display:none; }
    body[data-theme="light"] .topbar {
        background: color-mix(in srgb, var(--card) 96%, transparent);
    }
    .sidebar h3 {
        margin-top: 0;
        padding-top: 24px;
    }
    .main-centered {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 48px);
    }
    #loginScreen {
        margin: 0 auto !important;
        align-self: center;
    }
    @media (min-width: 1100px) {
        #menu-toggle {
            display: inline-flex !important;
            align-items:center;
            justify-content:center;
            top: 18px;
            left: 18px;
        }
        body.authenticated .sidebar.active ~ .main {
            padding-left: 344px;
        }
        body.authenticated .sidebar.active ~ .topbar {
            left: 320px;
            width: calc(100% - 320px);
        }
        body.authenticated .topbar {
            left: 0;
            width: 100%;
            transition: left var(--transition), width var(--transition);
        }
    }
    @media (max-width: 1099px) {
        .topbar-search { display:none; }
        body.authenticated .main { padding-top: 100px; }
    }


/* ===== Tema Centro de Inteligência / Glass Dark =====
   Aplicado como camada final para dashboards, cards, tabelas e navegação. */
:root {
    --primary: #6366f1;
    --primary-2: #4f46e5;
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --info: #818cf8;

    --bg: #050508;
    --bg-soft: #08080d;
    --card: rgba(255, 255, 255, 0.035);
    --card-2: rgba(255, 255, 255, 0.025);
    --input: rgba(255, 255, 255, 0.045);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(99, 102, 241, 0.38);
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #64748b;
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 22px 56px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
    --radius-lg: 24px;
    --chart-grid: rgba(255, 255, 255, 0.075);
}

body:not(.authenticated) .sidebar,
body:not(.authenticated) #menu-toggle,
body:not(.authenticated) #overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body:not(.authenticated) .main {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    justify-content: center !important;
    align-items: center !important;
    padding-top: 24px !important;
}

body:not(.authenticated) #loginScreen {
    display: block !important;
}

body {
    background:
        radial-gradient(circle at 18% 8%, rgba(99, 102, 241, 0.16), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(16, 185, 129, 0.08), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(99, 102, 241, 0.08), transparent 32%),
        var(--bg) !important;
    color: var(--text-main, var(--text));
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at top, black, transparent 78%);
    opacity: 0.55;
    z-index: -1;
}

.card-container,
.chart-box,
.summary-box,
.kpi,
.mini-card,
.dashboard-filter-card,
.section-box,
.list-table,
.table-wrap,
.selector-item,
.inventory-detail,
#p_lista,
#formColetor .form-vertical {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.022)) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(16px);
}

.card-container {
    border-radius: 24px !important;
    padding: 30px !important;
}

body.authenticated .card-container {
    max-width: 1680px;
}

.dashboard-head h2,
.card-container h2,
.card-container h1 {
    color: var(--text) !important;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.dashboard-head .muted,
.card-container .muted {
    color: var(--muted) !important;
}

.kpis {
    gap: 16px !important;
}

.kpi {
    min-height: 118px;
    border-radius: 22px !important;
    padding: 22px !important;
    overflow: hidden;
    position: relative;
}

.kpi::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.22), transparent 38%);
    opacity: 0.75;
    pointer-events: none;
}

.kpi::after {
    background: rgba(99, 102, 241, 0.12) !important;
}

.kpi .muted {
    color: #64748b !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.kpi .n {
    color: #f8fafc !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 30px !important;
    font-weight: 800 !important;
    position: relative;
    z-index: 1;
}

.sidebar {
    background: rgba(0, 0, 0, 0.62) !important;
    border-right: 1px solid var(--border) !important;
    backdrop-filter: blur(20px) !important;
    padding: 18px 14px !important;
}

.sidebar h3 {
    border-bottom: none !important;
    color: transparent !important;
    background: linear-gradient(90deg, #ffffff, #818cf8 70%, #10b981) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    font-size: 18px !important;
    padding: 18px 10px 28px !important;
}

.sidebar button {
    border-radius: 14px !important;
    border-bottom: 0 !important;
    margin: 4px 0 !important;
    color: #94a3b8 !important;
    font-weight: 700;
}

.sidebar button:hover,
.sidebar button.active {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.20);
}

.sidebar button:hover::before,
.sidebar button.active::before {
    background: #6366f1 !important;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.65);
}

.sidebar-submenu {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    margin: 6px 0 8px;
}

.topbar {
    background: rgba(5, 5, 8, 0.58) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px) !important;
}

.brand-icon,
.topbar-chip,
.user-badge,
#menu-toggle {
    background: rgba(99, 102, 241, 0.13) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    box-shadow: 0 16px 30px rgba(0,0,0,0.35) !important;
    color: #a5b4fc !important;
}

.topbar-search input,
.search-bar,
input,
select,
textarea {
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 14px !important;
}

input:focus,
select:focus,
textarea:focus,
.search-bar:focus {
    border-color: rgba(99, 102, 241, 0.60) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.13) !important;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

th {
    background: transparent !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.16em !important;
    border-bottom: 0 !important;
    padding: 14px 16px !important;
}

td {
    background: rgba(255, 255, 255, 0.022) !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    color: #cbd5e1 !important;
    padding: 18px 16px !important;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

td:first-child {
    border-left: 1px solid var(--border) !important;
    border-radius: 14px 0 0 14px !important;
}

td:last-child {
    border-right: 1px solid var(--border) !important;
    border-radius: 0 14px 14px 0 !important;
}

tbody tr:hover,
tbody tr:hover td {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.30) !important;
    color: #f8fafc !important;
}

.btn-acao {
    border-radius: 13px !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34) !important;
}

.primary,
.btn-acao.success,
.btn-acao.info,
.toggle-group .btn-acao.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.32) !important;
}

.btn-acao.ghost {
    background: rgba(255, 255, 255, 0.035) !important;
    color: #cbd5e1 !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
}

.btn-acao:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 34px rgba(99, 102, 241, 0.26) !important;
}

.pill,
.badge,
.status-box.success {
    background: rgba(99, 102, 241, 0.11) !important;
    border-color: rgba(99, 102, 241, 0.22) !important;
    color: #c7d2fe !important;
}

.pill.success,
.badge.ok {
    background: rgba(16, 185, 129, 0.11) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    color: #6ee7b7 !important;
}

.pill.warn,
.badge.warn {
    background: rgba(245, 158, 11, 0.11) !important;
    border-color: rgba(245, 158, 11, 0.22) !important;
    color: #fbbf24 !important;
}

.chart-box {
    border-radius: 24px !important;
}

#loginScreen {
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)) !important;
    border: 1px solid rgba(99,102,241,0.35) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.58) !important;
}

#toast {
    background: linear-gradient(135deg, #6366f1, #10b981) !important;
}


/* =========================================================
   AJUSTE FINAL: TOPBAR REMOVIDA
   ========================================================= */
.topbar,
#topbar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.authenticated .main {
    padding-top: 32px !important;
}

@media (max-width: 1099px) {
    body.authenticated .main {
        padding-top: 76px !important;
    }
}

/* =========================================================
   PACOTE FINAL: GLASSMORPHISM + LUCIDE ICONS
   Mantém a topbar removida e aplica ícones vetoriais no menu.
   ========================================================= */
body[data-theme="dark"] {
    --primary: #6366f1;
    --primary-2: #4f46e5;
    --bg: #050508;
    --bg-soft: #08080d;
    --card: rgba(255, 255, 255, 0.035);
    --card-2: rgba(255, 255, 255, 0.055);
    --input: rgba(255, 255, 255, 0.045);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(99, 102, 241, 0.35);
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;
    --chart-grid: rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] {
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.10), transparent 32%),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.06), transparent 28%),
        linear-gradient(180deg, #050508 0%, #08080d 100%) !important;
}

.sidebar h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sidebar h3 svg {
    width: 21px;
    height: 21px;
    color: #818cf8;
    stroke-width: 2.2;
    flex-shrink: 0;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.55));
}

.sidebar button,
.btn-acao,
#themeToggleBtn,
#menu-toggle {
    align-items: center;
    gap: 10px;
}

.sidebar button svg,
.btn-acao svg,
#themeToggleBtn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
    flex-shrink: 0;
    color: currentColor;
}

.sidebar-submenu button svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.sidebar button span,
#themeToggleBtn span {
    line-height: 1;
}

#menu-toggle {
    width: 46px;
    height: 46px;
    justify-content: center;
    padding: 0 !important;
}

#menu-toggle svg {
    width: 23px;
    height: 23px;
}

.card-container,
.dashboard-filter-card,
.section-box,
.summary-box,
.table-wrap,
.list-table,
.selector-list,
.chart-box,
#p_lista {
    background: linear-gradient(180deg, rgba(255,255,255,0.050), rgba(255,255,255,0.025)) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
}

.kpi,
.mini-card,
.selector-item,
.inventory-address {
    background: rgba(255, 255, 255, 0.035) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.kpi:hover,
.mini-card:hover,
.selector-item:hover,
.inventory-address:hover {
    border-color: rgba(99, 102, 241, 0.32) !important;
    background: rgba(99, 102, 241, 0.060) !important;
}

#loginScreen h1 {
    background: linear-gradient(135deg, #ffffff, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body[data-theme="light"] .card-container,
body[data-theme="light"] .dashboard-filter-card,
body[data-theme="light"] .section-box,
body[data-theme="light"] .summary-box,
body[data-theme="light"] .table-wrap,
body[data-theme="light"] .list-table,
body[data-theme="light"] .selector-list,
body[data-theme="light"] .chart-box,
body[data-theme="light"] #p_lista {
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

/* ===== Logo no cabeçalho da sidebar ===== */
.sidebar h3.sidebar-brand {
    padding: 18px 10px 26px !important;
    margin: 0 0 8px 0 !important;
    border-bottom: none !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar-logo {
    display: block;
    width: min(220px, 100%);
    max-height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(99, 102, 241, 0.22));
}

@media (max-width: 640px) {
    .sidebar-logo {
        width: 190px;
        max-height: 56px;
    }
}


/* =========================================================
   LOGO DINÂMICA POR TEMA
   - Modo escuro usa logo-header-dark.png
   - Modo claro usa logo-header-light.png
   ========================================================= */
.sidebar-logo-light {
    display: none !important;
}

.sidebar-logo-dark {
    display: block !important;
}

body[data-theme="light"] .sidebar-logo-dark {
    display: none !important;
}

body[data-theme="light"] .sidebar-logo-light {
    display: block !important;
    filter: drop-shadow(0 14px 26px rgba(79, 70, 229, 0.16));
}

body[data-theme="dark"] .sidebar-logo-dark {
    display: block !important;
}

body[data-theme="dark"] .sidebar-logo-light {
    display: none !important;
}


/* =========================================================
   FIX LOGO PNG - evita problema de SVG/MIME/cache na hospedagem
   ========================================================= */
.sidebar-brand {
    min-height: 92px !important;
}

.sidebar-logo {
    display: block;
    width: min(220px, 100%) !important;
    height: auto !important;
    max-height: 74px !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================================
   FIX FINAL: SIDEBAR CLARA NO MODO CLARO + LOGO POR TEMA
   ========================================================= */
body[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.94) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 22px 0 70px rgba(15, 23, 42, 0.10) !important;
    color: #0f172a !important;
    backdrop-filter: blur(18px) !important;
}

body[data-theme="light"] .sidebar h3,
body[data-theme="light"] .sidebar-brand {
    color: #0f172a !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
    -webkit-text-fill-color: initial !important;
}

body[data-theme="light"] .sidebar button {
    color: #475569 !important;
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] .sidebar button svg {
    color: #64748b !important;
}

body[data-theme="light"] .sidebar button:hover,
body[data-theme="light"] .sidebar button.active {
    background: rgba(99, 102, 241, 0.10) !important;
    color: #1e1b4b !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.16) !important;
}

body[data-theme="light"] .sidebar button:hover svg,
body[data-theme="light"] .sidebar button.active svg {
    color: #4f46e5 !important;
}

body[data-theme="light"] .sidebar button:hover::before,
body[data-theme="light"] .sidebar button.active::before {
    background: #6366f1 !important;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35) !important;
}

body[data-theme="light"] .sidebar-submenu {
    background: rgba(15, 23, 42, 0.030) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] .sidebar-group {
    border-bottom-color: rgba(15, 23, 42, 0.07) !important;
}

body[data-theme="light"] #themeToggleBtn,
body[data-theme="light"] #menu-toggle {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #1e293b !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10) !important;
}

body[data-theme="light"] #overlay {
    background: rgba(15, 23, 42, 0.26) !important;
}

body[data-theme="light"] .sidebar-logo-dark {
    display: none !important;
}

body[data-theme="light"] .sidebar-logo-light {
    display: block !important;
}

body[data-theme="dark"] .sidebar-logo-dark {
    display: block !important;
}

body[data-theme="dark"] .sidebar-logo-light {
    display: none !important;
}


/* =========================================================
   SIDEBAR: CABEÇALHO PRESO + ZOOM DA LOGO + BOTÃO DE IDIOMA
   ========================================================= */
.sidebar {
    overflow-y: auto !important;
}

.sidebar h3.sidebar-brand,
.sidebar-brand {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    min-height: 118px !important;
    margin: 0 0 18px 0 !important;
    padding: 20px 0 26px 0 !important;
    background: rgba(0, 0, 0, 0.88) !important;
    backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar-logo {
    width: 270px !important;
    max-width: 270px !important;
    max-height: 112px !important;
    height: auto !important;
    object-fit: contain !important;
    transform: scale(1.18) !important;
    transform-origin: center !important;
}

body[data-theme="light"] .sidebar h3.sidebar-brand,
body[data-theme="light"] .sidebar-brand {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10) !important;
}

body[data-theme="dark"] .sidebar h3.sidebar-brand,
body[data-theme="dark"] .sidebar-brand {
    background: rgba(0, 0, 0, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.language-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    border-top: 1px solid var(--border) !important;
}

.language-btn .lang-flag {
    font-size: 18px !important;
    line-height: 1 !important;
}

.language-btn .lang-label {
    font-weight: 800 !important;
    letter-spacing: 0.4px !important;
}

body[data-theme="light"] .language-btn {
    border-top-color: rgba(15, 23, 42, 0.10) !important;
}

@media (max-width: 640px) {
    .sidebar-logo {
        width: 230px !important;
        max-width: 230px !important;
        transform: scale(1.08) !important;
    }
}

/* =========================================================
   FIX FINAL - LOGO TRANSPARENTE + SIDEBAR SEM BLOCO NO FUNDO
   ========================================================= */

/* fundo escuro sóbrio, sem radial glow */
html,
body,
body[data-theme="dark"] {
    background: #050608 !important;
    background-image: none !important;
}

body[data-theme="dark"] .main {
    background: #050608 !important;
    background-image: none !important;
}

/* sidebar e cabeçalho usam exatamente a mesma cor para não aparecer bloco atrás da logo */
body[data-theme="dark"] .sidebar {
    background: #06070c !important;
    background-image: none !important;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.34) !important;
}

body[data-theme="light"] .sidebar {
    background: #f4f6f8 !important;
    background-image: none !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08) !important;
}

/* mantém preso no topo, mas sem retângulo preto/branco próprio */
.sidebar h3.sidebar-brand,
.sidebar-brand,
body[data-theme="dark"] .sidebar h3.sidebar-brand,
body[data-theme="dark"] .sidebar-brand,
body[data-theme="light"] .sidebar h3.sidebar-brand,
body[data-theme="light"] .sidebar-brand {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 118px !important;
    margin: 0 0 20px 0 !important;
    padding: 20px 0 24px 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.sidebar-brand::before,
.sidebar-brand::after,
.sidebar h3.sidebar-brand::before,
.sidebar h3.sidebar-brand::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* imagem transparente, sem fundo, sem sombra e com zoom */
.sidebar-logo,
.sidebar-brand img,
.sidebar h3.sidebar-brand img {
    display: block !important;
    width: 280px !important;
    max-width: 280px !important;
    max-height: 118px !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: scale(1.12) !important;
    transform-origin: center !important;
}

/* alternância correta das logos por tema */
body[data-theme="dark"] .sidebar-logo-dark {
    display: block !important;
}
body[data-theme="dark"] .sidebar-logo-light {
    display: none !important;
}
body[data-theme="light"] .sidebar-logo-dark {
    display: none !important;
}
body[data-theme="light"] .sidebar-logo-light {
    display: block !important;
}

/* remove glow dos botões e do menu lateral */
.sidebar button,
.sidebar button:hover,
.sidebar button.active,
.btn-acao,
.btn-acao:hover {
    box-shadow: none !important;
    filter: none !important;
}

.sidebar button:hover::before,
.sidebar button.active::before {
    box-shadow: none !important;
}

/* =========================================================
   FIX FINAL - LOGO ÚNICA + DARK MATTE SEM GLOW
   ========================================================= */

html,
body,
body[data-theme="dark"] {
    background: #050608 !important;
    background-image: none !important;
    color: var(--text-main, #f8fafc) !important;
}

body::before,
body::after,
.main::before,
.main::after,
.card-container::before,
.card-container::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
}

body[data-theme="dark"] .main,
.main {
    background: #050608 !important;
    background-image: none !important;
}

body[data-theme="dark"] .sidebar {
    background: #06070c !important;
    background-image: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.34) !important;
}

body[data-theme="light"] .sidebar {
    background: #f4f6f8 !important;
    background-image: none !important;
    border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08) !important;
}

.sidebar h3.sidebar-brand,
.sidebar-brand,
body[data-theme="dark"] .sidebar h3.sidebar-brand,
body[data-theme="dark"] .sidebar-brand,
body[data-theme="light"] .sidebar h3.sidebar-brand,
body[data-theme="light"] .sidebar-brand {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 122px !important;
    margin: 0 0 20px 0 !important;
    padding: 20px 8px 24px 8px !important;
    background: inherit !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.sidebar-brand::before,
.sidebar-brand::after,
.sidebar h3.sidebar-brand::before,
.sidebar h3.sidebar-brand::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Uma única imagem: o src muda por JS conforme o tema */
#sidebarLogo,
.sidebar-brand #sidebarLogo,
.sidebar h3.sidebar-brand #sidebarLogo {
    display: block !important;
    width: 250px !important;
    max-width: calc(100% - 8px) !important;
    max-height: 118px !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: scale(1.08) !important;
    transform-origin: center !important;
}

/* Desativa definitivamente as classes antigas caso alguma imagem antiga fique no cache do HTML */
.sidebar-logo-dark,
.sidebar-logo-light {
    display: none !important;
}

.sidebar button,
.sidebar button:hover,
.sidebar button.active,
.btn-acao,
.btn-acao:hover,
button,
button:hover {
    box-shadow: none !important;
    filter: none !important;
}

.btn-acao.primary,
.btn-acao.success,
button.primary,
button.success {
    box-shadow: none !important;
}

.card-container,
.kpi,
.summary-box,
.section-box,
.dashboard-filter-card,
.chart-box,
.table-wrap,
.cards-list,
.selector-list {
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34) !important;
}

@media (max-width: 640px) {
    #sidebarLogo,
    .sidebar-brand #sidebarLogo {
        width: 220px !important;
        max-width: calc(100% - 8px) !important;
        transform: scale(1.04) !important;
    }
}

/* =========================================================
   FINAL - DARK MATTE + SIDEBAR FIXA + LOGO TRANSPARENTE
   ========================================================= */

html,
body {
    background: #050608 !important;
    background-image: none !important;
    color: var(--text-main, #f8fafc) !important;
}

body::before,
body::after,
.main::before,
.main::after,
.card-container::before,
.card-container::after,
.sidebar::before,
.sidebar::after,
.sidebar-brand::before,
.sidebar-brand::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 320px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1000 !important;
    background: #07080d !important;
    background-image: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 14px 0 35px rgba(0, 0, 0, 0.38) !important;
}

.main {
    margin-left: 320px !important;
    min-height: 100vh !important;
    background: #050608 !important;
    background-image: none !important;
    filter: none !important;
}

.main * {
    filter: none !important;
}

#overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
}

#menu-toggle {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 1300 !important;
}

.sidebar-brand,
.sidebar-brand *,
#sidebarLogo,
.sidebar-logo {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

.sidebar-brand {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 118px !important;
    margin: 0 0 24px 0 !important;
    padding: 22px 10px 24px 10px !important;
    overflow: visible !important;
}

#sidebarLogo,
.sidebar-logo {
    display: block !important;
    width: 250px !important;
    max-width: 250px !important;
    height: auto !important;
    object-fit: contain !important;
}

.card-container,
.kpi,
.summary-box,
.section-box,
.dashboard-filter-card,
.chart-box,
.table-wrap,
.cards-list,
.selector-list {
    background: rgba(13, 15, 22, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38) !important;
    backdrop-filter: blur(10px) !important;
}

button,
.btn-acao {
    box-shadow: none !important;
    filter: none !important;
}

.btn-acao.primary,
.btn-acao.success,
button.primary,
button.success {
    background: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-acao.primary:hover,
.btn-acao.success:hover,
button.primary:hover,
button.success:hover {
    background: #5558e8 !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.sidebar button:hover {
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    box-shadow: none !important;
    transform: translateX(2px);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(99, 102, 241, 0.55) !important;
    box-shadow: none !important;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-theme="light"],
html[data-theme="light"] body {
    background: #f3f4f6 !important;
    background-image: none !important;
    color: #111827 !important;
}

body[data-theme="light"] .main,
html[data-theme="light"] .main {
    background: #f3f4f6 !important;
    background-image: none !important;
}

body[data-theme="light"] .sidebar,
html[data-theme="light"] .sidebar {
    background: #ffffff !important;
    background-image: none !important;
    border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] .card-container,
body[data-theme="light"] .kpi,
body[data-theme="light"] .summary-box,
body[data-theme="light"] .section-box,
body[data-theme="light"] .dashboard-filter-card,
body[data-theme="light"] .chart-box,
body[data-theme="light"] .table-wrap {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08) !important;
}

@media (min-width: 901px) {
    .sidebar {
        transform: none !important;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.25s ease !important;
    }

    .sidebar.active,
    .sidebar.open {
        transform: translateX(0) !important;
    }

    .main {
        margin-left: 0 !important;
    }

    #overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.45) !important;
        z-index: 900 !important;
    }
}

/* =========================================================
   CORREÇÃO FINAL SOLICITADA
   - Sidebar fixa na lateral
   - Logo NÃO fixa/sticky: rola e some junto com a sidebar
   - Overlay não borra a tela no desktop
   ========================================================= */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 320px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    z-index: 1000 !important;
}
.main { margin-left: 320px !important; min-height: 100vh !important; filter: none !important; }
.main, .main * { filter: none !important; }
@media (min-width: 901px) {
    #overlay, #overlay.active {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: transparent !important;
    }
    .sidebar { transform: none !important; }
}
.sidebar h3.sidebar-brand,
.sidebar-brand,
body[data-theme="dark"] .sidebar h3.sidebar-brand,
body[data-theme="dark"] .sidebar-brand,
body[data-theme="light"] .sidebar h3.sidebar-brand,
body[data-theme="light"] .sidebar-brand {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 118px !important;
    margin: 0 0 18px 0 !important;
    padding: 22px 8px 22px 8px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
}
.sidebar-brand::before,
.sidebar-brand::after,
.sidebar h3.sidebar-brand::before,
.sidebar h3.sidebar-brand::after { display: none !important; content: none !important; }
#sidebarLogo,
.sidebar-brand #sidebarLogo,
.sidebar h3.sidebar-brand #sidebarLogo,
.sidebar-logo {
    display: block !important;
    width: 245px !important;
    max-width: calc(100% - 18px) !important;
    height: auto !important;
    max-height: 106px !important;
    object-fit: contain !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}
#menu-toggle { position: fixed !important; top: 20px !important; left: 20px !important; z-index: 1300 !important; }
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%) !important; transition: transform 0.25s ease !important; }
    .sidebar.active, .sidebar.open { transform: translateX(0) !important; }
    .main { margin-left: 0 !important; }
    #overlay.active { display: block !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; position: fixed !important; inset: 0 !important; background: rgba(0, 0, 0, 0.45) !important; z-index: 900 !important; }
}

/* =========================================================
   AJUSTES FINAIS - MODO CLARO + RESPONSIVIDADE REAL
   ========================================================= */

body[data-theme="light"] {
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #475569;
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(37, 99, 235, 0.24);
    --card: #ffffff;
    --card-2: #ffffff;
    --input: #ffffff;
    --chart-grid: rgba(15, 23, 42, 0.08);
}

body[data-theme="light"],
body[data-theme="light"] .main {
    background: #f5f7fb !important;
    background-image: none !important;
    color: #0f172a !important;
}

body[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}

body[data-theme="light"] .card-container,
body[data-theme="light"] .kpi,
body[data-theme="light"] .summary-box,
body[data-theme="light"] .section-box,
body[data-theme="light"] .dashboard-filter-card,
body[data-theme="light"] .chart-box,
body[data-theme="light"] .table-wrap,
body[data-theme="light"] .list-table,
body[data-theme="light"] .mini-card,
body[data-theme="light"] .selector-item,
body[data-theme="light"] .inventory-detail,
body[data-theme="light"] #p_lista,
body[data-theme="light"] #formColetor .form-vertical {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}

body[data-theme="light"] .kpi::before,
body[data-theme="light"] .kpi::after {
    opacity: 0.45 !important;
}

body[data-theme="light"] .sidebar button,
body[data-theme="light"] .sidebar button span,
body[data-theme="light"] .btn-acao.ghost,
body[data-theme="light"] .muted,
body[data-theme="light"] td,
body[data-theme="light"] .selector-item .meta,
body[data-theme="light"] .inline-note,
body[data-theme="light"] .inventory-address,
body[data-theme="light"] .status-box,
body[data-theme="light"] #p_lista label {
    color: #334155 !important;
}

body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] strong,
body[data-theme="light"] .selector-item .title,
body[data-theme="light"] .kpi .n,
body[data-theme="light"] .pill,
body[data-theme="light"] .dashboard-head,
body[data-theme="light"] .card-container {
    color: #0f172a !important;
}

body[data-theme="light"] label,
body[data-theme="light"] th {
    color: #475569 !important;
}

body[data-theme="light"] .sidebar button svg,
body[data-theme="light"] #themeToggleBtn svg,
body[data-theme="light"] #logoutBtn svg,
body[data-theme="light"] .icon-btn svg {
    color: #64748b !important;
}

body[data-theme="light"] .sidebar button:hover,
body[data-theme="light"] .sidebar button.active {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body[data-theme="light"] .sidebar button:hover svg,
body[data-theme="light"] .sidebar button.active svg {
    color: #2563eb !important;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] .search-bar {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: none !important;
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder,
body[data-theme="light"] .search-bar::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

body[data-theme="light"] input:focus,
body[data-theme="light"] select:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="light"] .search-bar:focus {
    border-color: rgba(37, 99, 235, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
}

body[data-theme="light"] .btn-acao,
body[data-theme="light"] .icon-btn,
body[data-theme="light"] #themeToggleBtn,
body[data-theme="light"] #menu-toggle {
    box-shadow: none !important;
}

body[data-theme="light"] tbody tr:hover td {
    background: rgba(37, 99, 235, 0.04) !important;
    border-color: rgba(37, 99, 235, 0.12) !important;
    color: #0f172a !important;
}

body[data-theme="light"] .table-wrap,
body[data-theme="light"] .list-table {
    background: #ffffff !important;
}

body[data-theme="light"] .sidebar-brand,
body[data-theme="light"] .sidebar h3.sidebar-brand {
    background: #ffffff !important;
}

body[data-theme="light"] #overlay.active {
    background: rgba(15, 23, 42, 0.18) !important;
}

@media (min-width: 1800px) {
    .main {
        padding: 32px !important;
    }

    body.authenticated .card-container {
        max-width: 1880px !important;
    }
}

@media (max-width: 1600px) {
    .sidebar {
        width: 300px !important;
    }

    .main {
        margin-left: 300px !important;
        padding: 22px !important;
    }

    body.authenticated .card-container {
        max-width: calc(100vw - 344px) !important;
    }
}

@media (max-width: 1280px) {
    .sidebar {
        width: 280px !important;
    }

    .main {
        margin-left: 280px !important;
        padding: 18px !important;
    }

    body.authenticated .card-container {
        max-width: calc(100vw - 316px) !important;
    }

    .card-container {
        padding: 22px !important;
    }

    .chart-box {
        min-height: 420px !important;
    }

    .chart-box canvas {
        min-height: 360px !important;
    }

    .kpis,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1024px) {
    .main {
        padding: 16px !important;
    }

    .card-container {
        max-height: none !important;
        min-height: auto !important;
        padding: 18px !important;
        border-radius: 18px !important;
    }

    .dashboard-head,
    .dashboard-head > div:last-child {
        align-items: flex-start !important;
    }

    .dashboard-head > div:last-child,
    .toggle-group,
    .mini-card .actions,
    .acoes-inline {
        width: 100%;
        justify-content: flex-start !important;
    }

    .btn-acao {
        min-height: 44px !important;
        padding: 0 14px !important;
        font-size: 12px !important;
    }

    .kpis,
    .grid-3,
    .grid-4,
    .dash-grid.dual {
        grid-template-columns: 1fr !important;
    }

    .table-wrap {
        border-radius: 14px !important;
    }

    th, td {
        padding: 12px 10px !important;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(320px, 86vw) !important;
    }

    .main,
    body.authenticated .main {
        margin-left: 0 !important;
        padding: 72px 14px 14px !important;
    }

    body.authenticated .card-container {
        max-width: 100% !important;
    }

    #menu-toggle {
        display: inline-flex !important;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    .main,
    body.authenticated .main {
        padding: 68px 10px 10px !important;
    }

    .card-container {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .chart-box {
        min-height: 300px !important;
        padding: 14px !important;
    }

    .chart-box canvas {
        min-height: 240px !important;
    }

    .kpi {
        min-height: 96px !important;
        padding: 16px !important;
    }

    .kpi .n {
        font-size: 24px !important;
    }

    .search-bar,
    input,
    select,
    textarea {
        padding: 12px !important;
        font-size: 13px !important;
    }

    th {
        font-size: 10px !important;
        letter-spacing: 0.10em !important;
    }

    td {
        font-size: 12px !important;
    }
}

/* =========================================================
   FINAL: BOTÃO MENU OCULTA/MOSTRA A SIDEBAR NO DESKTOP
   ========================================================= */
@media (min-width: 901px) {
    .sidebar {
        transition: transform 0.25s ease !important;
        will-change: transform !important;
    }

    .sidebar.sidebar-hidden {
        transform: translateX(-100%) !important;
    }

    body.sidebar-collapsed .main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.sidebar-collapsed #overlay,
    body.sidebar-collapsed #overlay.active {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* =========================================================
   MASCOTE DE SAÍDA - "ATÉ A PRÓXIMA, AMIGO!"
   ========================================================= */

#logoutMascotModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(5, 6, 8, 0.82) !important;
    backdrop-filter: blur(10px) !important;
}

#logoutMascotModal.active {
    display: flex !important;
}

.logout-mascot-card {
    width: min(440px, 92vw) !important;
    min-height: 460px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    padding: 26px 24px 30px 24px !important;
    border-radius: 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: #0b0d13 !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55) !important;
    transform: translateY(12px) scale(0.96) !important;
    opacity: 0 !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
}

.logout-mascot-card.ready {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

#logoutMascotStage {
    position: relative !important;
    width: 100% !important;
    height: 320px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    background: transparent !important;
}

#logoutMascotCanvas {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background: transparent !important;
}

#logoutMascotFallback {
    position: absolute !important;
    inset: 0 !important;
    display: grid;
    place-items: center;
    font-size: 132px !important;
    line-height: 1 !important;
    background: transparent !important;
    animation: logoutMascotFloat 1.45s ease-in-out infinite alternate;
}

.logout-mascot-message {
    margin-top: -4px !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    color: #f8fafc !important;
    text-align: center !important;
}

.logout-mascot-submessage {
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: rgba(248, 250, 252, 0.54) !important;
    text-align: center !important;
}

body[data-theme="light"] #logoutMascotModal {
    background: rgba(243, 244, 246, 0.82) !important;
}

body[data-theme="light"] .logout-mascot-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18) !important;
}

body[data-theme="light"] .logout-mascot-message {
    color: #111827 !important;
}

body[data-theme="light"] .logout-mascot-submessage {
    color: rgba(17, 24, 39, 0.55) !important;
}

@keyframes logoutMascotFloat {
    from {
        transform: translateY(8px) rotate(-3deg);
    }
    to {
        transform: translateY(-8px) rotate(3deg);
    }
}

@media (max-width: 520px) {
    .logout-mascot-card {
        min-height: 410px !important;
        padding: 22px 18px 26px 18px !important;
    }

    #logoutMascotStage {
        height: 270px !important;
    }

    #logoutMascotFallback {
        font-size: 104px !important;
    }

    .logout-mascot-message {
        font-size: 21px !important;
    }
}

/* =========================================================
   RESPONSIVIDADE FINAL - NOTEBOOK, COLETOR E SMARTPHONE
   ========================================================= */

.table-wrap,
.list-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.list-table table {
    min-width: 820px;
}

@media (max-width: 1600px) {
    body.authenticated .card-container {
        max-width: calc(100vw - 340px) !important;
    }

    .sidebar {
        width: 288px !important;
    }

    .main {
        margin-left: 288px !important;
        padding: 22px !important;
    }

    #sidebarLogo,
    .sidebar-logo {
        width: 228px !important;
        max-width: calc(100% - 14px) !important;
    }
}

@media (max-width: 1366px) {
    .sidebar {
        width: 264px !important;
        padding: 14px 10px !important;
    }

    .main {
        margin-left: 264px !important;
        padding: 18px !important;
    }

    body.authenticated .card-container {
        max-width: calc(100vw - 296px) !important;
    }

    .card-container {
        padding: 20px !important;
        border-radius: 18px !important;
    }

    .sidebar button {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .sidebar-submenu button {
        padding: 10px 14px 10px 28px !important;
        font-size: 12px !important;
    }

    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .chart-box {
        min-height: 380px !important;
    }

    .chart-box canvas {
        min-height: 320px !important;
    }
}

@media (max-width: 1180px) {
    .sidebar {
        width: min(320px, 86vw) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.25s ease !important;
    }

    .sidebar.active,
    .sidebar.open {
        transform: translateX(0) !important;
    }

    .main,
    body.authenticated .main,
    body.sidebar-collapsed .main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 72px 14px 14px !important;
    }

    body.authenticated .card-container {
        max-width: 100% !important;
    }

    #menu-toggle {
        display: inline-flex !important;
    }

    #overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.42) !important;
        z-index: 900 !important;
    }

    .dashboard-head,
    .dashboard-head > div:last-child,
    .toggle-group,
    .mini-card .actions,
    .acoes-inline {
        width: 100%;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    .selector-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .kpis,
    .grid-2,
    .grid-3,
    .grid-4,
    .dash-grid.dual {
        grid-template-columns: 1fr !important;
    }

    .card-container {
        max-height: none !important;
        overflow: visible !important;
        padding: 16px !important;
    }

    .chart-box {
        min-height: 320px !important;
        padding: 16px !important;
    }

    .chart-box canvas {
        min-height: 250px !important;
    }

    .btn-acao {
        min-height: 44px !important;
        padding: 0 14px !important;
        font-size: 12px !important;
    }

    .table-wrap table,
    .list-table table {
        min-width: 700px;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    .main,
    body.authenticated .main {
        padding: 68px 10px 12px !important;
    }

    .sidebar {
        width: min(320px, 92vw) !important;
    }

    #menu-toggle {
        top: 12px !important;
        left: 12px !important;
        width: 42px !important;
        height: 42px !important;
    }

    .card-container {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .kpi {
        min-height: 92px !important;
        padding: 14px !important;
    }

    .kpi .n {
        font-size: 22px !important;
    }

    .search-bar,
    input,
    select,
    textarea {
        padding: 11px 12px !important;
        font-size: 13px !important;
    }

    .table-wrap table,
    .list-table table {
        min-width: 640px;
    }

    th {
        font-size: 10px !important;
        letter-spacing: 0.08em !important;
    }

    td {
        font-size: 12px !important;
        padding: 11px 9px !important;
    }
}

/* =========================================================
   EXPERIMENTO VISUAL - CLEAN INDUSTRIAL
   Camada final para testar outra direcao sem alterar a estrutura.
   ========================================================= */

:root,
body[data-theme="dark"] {
    --primary: #14b8a6;
    --primary-2: #0f766e;
    --success: #22c55e;
    --danger: #e11d48;
    --warning: #f59e0b;
    --info: #38bdf8;

    --bg: #0b0f12;
    --bg-soft: #111820;
    --card: #121922;
    --card-2: #16202a;
    --input: #0e151d;
    --border: rgba(226, 232, 240, 0.10);
    --border-strong: rgba(20, 184, 166, 0.42);
    --text: #f5f7fa;
    --text-soft: #d3d9e2;
    --muted: #8996a7;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.34);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --chart-grid: rgba(211, 217, 226, 0.10);
}

body[data-theme="light"] {
    --primary: #0f766e;
    --primary-2: #115e59;
    --success: #15803d;
    --danger: #be123c;
    --warning: #b45309;
    --info: #0369a1;

    --bg: #f4f7f6;
    --bg-soft: #e7eeec;
    --card: #ffffff;
    --card-2: #f8fbfa;
    --input: #ffffff;
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 118, 110, 0.28);
    --text: #111827;
    --text-soft: #334155;
    --muted: #64748b;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.07);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.09);
    --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.11);
    --chart-grid: rgba(15, 23, 42, 0.08);
}

html,
body,
body[data-theme="dark"],
body[data-theme="light"],
.main,
body[data-theme="dark"] .main,
body[data-theme="light"] .main {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%) !important;
    background-image: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%) !important;
    color: var(--text) !important;
}

body::before,
body::after,
.main::before,
.main::after,
.card-container::before,
.card-container::after,
.kpi::before {
    display: none !important;
    content: none !important;
}

.sidebar,
body[data-theme="dark"] .sidebar {
    background: #0d1319 !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: 10px 0 28px rgba(0, 0, 0, 0.26) !important;
    backdrop-filter: none !important;
}

body[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.06) !important;
}

.card-container,
.chart-box,
.summary-box,
.kpi,
.mini-card,
.dashboard-filter-card,
.section-box,
.list-table,
.table-wrap,
.selector-item,
.inventory-detail,
.inventory-address,
#p_lista,
#formColetor .form-vertical {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    backdrop-filter: none !important;
}

.card-container {
    padding: 26px !important;
}

.dashboard-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.dashboard-head h2,
.card-container h1,
.card-container h2,
.card-container h3 {
    color: var(--text) !important;
    letter-spacing: 0 !important;
}

.muted,
.dashboard-head .muted,
.card-container .muted {
    color: var(--muted) !important;
}

.kpi {
    min-height: 108px !important;
    padding: 18px !important;
    border-left: 4px solid var(--primary) !important;
}

.kpi::after {
    display: none !important;
}

.kpi .muted {
    color: var(--muted) !important;
    letter-spacing: 0.08em !important;
}

.kpi .n {
    color: var(--text) !important;
    font-family: "JetBrains Mono", "Consolas", monospace !important;
}

.sidebar button {
    border-radius: var(--radius-md) !important;
    color: var(--text-soft) !important;
    font-weight: 700 !important;
}

.sidebar button:hover,
.sidebar button.active {
    background: rgba(20, 184, 166, 0.12) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.sidebar button:hover::before,
.sidebar button.active::before {
    background: var(--primary) !important;
    box-shadow: none !important;
}

.sidebar-submenu {
    background: color-mix(in srgb, var(--card-2) 82%, transparent) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
}

#sidebarLogo,
.sidebar-logo {
    filter: none !important;
}

.btn-acao,
button {
    border-radius: var(--radius-md) !important;
    letter-spacing: 0.02em !important;
    box-shadow: none !important;
}

.btn-acao.primary,
.btn-acao.success,
.btn-acao.info,
.toggle-group .btn-acao.active,
button.primary,
button.success {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.btn-acao.primary:hover,
.btn-acao.success:hover,
.btn-acao.info:hover,
.toggle-group .btn-acao.active:hover,
button.primary:hover,
button.success:hover {
    background: var(--primary-2) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-acao.ghost {
    background: var(--card-2) !important;
    color: var(--text-soft) !important;
    border: 1px solid var(--border) !important;
}

.icon-btn,
#menu-toggle,
#themeToggleBtn,
.language-btn {
    border-radius: var(--radius-md) !important;
    background: var(--card-2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-soft) !important;
    box-shadow: none !important;
}

input,
select,
textarea,
.search-bar,
.topbar-search input {
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
}

input::placeholder,
textarea::placeholder,
.search-bar::placeholder {
    color: var(--muted) !important;
    opacity: 1 !important;
}

input:focus,
select:focus,
textarea:focus,
.search-bar:focus {
    border-color: var(--border-strong) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent) !important;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

th {
    background: transparent !important;
    color: var(--muted) !important;
    letter-spacing: 0.10em !important;
    border: 0 !important;
}

td {
    background: var(--card-2) !important;
    color: var(--text-soft) !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
}

td:first-child {
    border-left: 1px solid var(--border) !important;
    border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}

td:last-child {
    border-right: 1px solid var(--border) !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

tbody tr:hover td {
    background: color-mix(in srgb, var(--primary) 10%, var(--card-2)) !important;
    border-color: var(--border-strong) !important;
    color: var(--text) !important;
}

.pill,
.badge {
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
    border-color: color-mix(in srgb, var(--primary) 34%, transparent) !important;
    color: var(--primary) !important;
}

.pill.warn,
.badge.warn {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: var(--warning) !important;
}

.pill.success,
.badge.ok,
.status-box.success {
    background: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.30) !important;
    color: var(--success) !important;
}

#loginScreen {
    background: var(--card) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
}

#loginScreen h1 {
    color: var(--text) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
}

#toast {
    background: var(--primary) !important;
    border-radius: var(--radius-md) !important;
}

@media (max-width: 1024px) {
    .card-container {
        padding: 18px !important;
    }
}

@media (max-width: 640px) {
    .card-container {
        padding: 14px !important;
    }

    .kpi {
        min-height: 92px !important;
        padding: 14px !important;
    }
}

/* ===== Dashboard de consumo de embalagens ===== */
.consumo-dashboard {
    background: #f8fafc !important;
    color: #111827 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}

.consumo-dashboard .muted,
.consumo-dashboard p,
.consumo-dashboard td {
    color: #4b5563 !important;
}

.consumo-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.consumo-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.consumo-title h2 {
    color: #111827 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    margin: 0;
}

.consumo-title p {
    color: #9ca3af !important;
    font-size: 12px;
    margin: 2px 0 0;
}

.consumo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.consumo-icon svg {
    width: 21px;
    height: 21px;
}

.consumo-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

#embFarol .consumo-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
}

#embFarol .consumo-title {
    flex: 1 1 100%;
    min-width: 0;
}

#embFarol .consumo-filters {
    flex: 1 1 100%;
    justify-content: flex-start;
    min-width: 0;
}

#embFarol .consumo-filters select {
    flex: 0 1 190px;
    max-width: 220px;
}

.consumo-filters > svg {
    width: 15px;
    height: 15px;
    color: #9ca3af;
}

.consumo-filters select,
.consumo-filter-btn,
.consumo-export-btn {
    min-height: 34px;
    border: 1px solid #e5e7eb !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    color: #374151 !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.consumo-filter-btn,
.consumo-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.consumo-filter-btn svg,
.consumo-export-btn svg {
    width: 13px;
    height: 13px;
}

.consumo-export-btn {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.consumo-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.consumo-kpi {
    min-height: 110px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 18px;
}

.consumo-kpi p {
    margin: 0;
    color: #6b7280 !important;
    font-size: 13px;
}

.consumo-kpi strong {
    display: block;
    color: #111827;
    font-size: 26px;
    line-height: 1.2;
    margin-top: 3px;
    font-family: "JetBrains Mono", Consolas, monospace;
}

.consumo-kpi small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 2px;
}

.consumo-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.consumo-kpi-icon svg {
    width: 20px;
    height: 20px;
}

.consumo-kpi-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.consumo-kpi-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.consumo-kpi-icon.cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.consumo-kpi-icon.green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.consumo-kpi-icon.yellow { background: rgba(245, 158, 11, 0.13); color: #f59e0b; }

.consumo-grid-main,
.consumo-grid-two {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.consumo-grid-main {
    grid-template-columns: 2fr 1fr;
}

.consumo-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consumo-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.consumo-panel {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 18px;
    min-height: 230px;
}

.consumo-stack .consumo-panel {
    min-height: 170px;
}

.consumo-panel h3 {
    color: #374151 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.consumo-panel h3 svg {
    width: 16px;
    height: 16px;
    color: #3b82f6;
}

.consumo-panel canvas {
    width: 100% !important;
    height: 220px !important;
    max-height: 260px;
}

#embFarol .farol-evolucao-panel {
    min-height: 430px !important;
}

#embFarol .farol-evolucao-panel #chartFarolEvolucao,
#embFarol .farol-evolucao-canvas {
    height: 360px !important;
    min-height: 360px !important;
    max-height: none !important;
}

.consumo-stack .consumo-panel canvas {
    height: 130px !important;
}

.consumo-search {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
    margin-bottom: 14px;
}

.consumo-table-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    overflow: hidden;
}

.consumo-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

.consumo-table-head h3 {
    color: #374151 !important;
    font-size: 15px !important;
    margin: 0;
}

.consumo-table-head span {
    color: #9ca3af;
    font-size: 12px;
}

.consumo-table-wrap {
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
}

.consumo-table-wrap table {
    min-width: 1040px;
}

.consumo-table-wrap th {
    background: #f9fafb !important;
    color: #6b7280 !important;
    border-bottom: 1px solid #eef2f7 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px !important;
    padding: 12px 14px !important;
}

.consumo-table-wrap td {
    background: #ffffff !important;
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 11px 14px !important;
}

.consumo-table-wrap tr:hover td {
    background: #eff6ff !important;
}

.consumo-table-wrap .mono,
.consumo-table-wrap .muted-cell {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 12px;
}

.consumo-table-wrap .strong {
    color: #111827 !important;
    font-weight: 800;
}

.consumo-produto,
.consumo-turno,
.consumo-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.consumo-produto {
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-family: "JetBrains Mono", Consolas, monospace;
}

.consumo-turno.blue { background: #dbeafe; color: #1d4ed8; }
.consumo-turno.orange { background: #ffedd5; color: #c2410c; }
.consumo-status.ok { background: #dcfce7; color: #15803d; }
.consumo-status.warn { background: #fef3c7; color: #b45309; }
.consumo-status.pending { background: #dbeafe; color: #1d4ed8; }
.consumo-pendente { color: #b45309; font-size: 12px; font-weight: 700; }

body[data-theme="light"] .consumo-dashboard {
    background: #f8fafc !important;
}

@media (max-width: 1200px) {
    .consumo-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .consumo-filters {
        justify-content: flex-start;
    }

    .consumo-kpis,
    .consumo-grid-main,
    .consumo-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .consumo-kpis,
    .consumo-grid-main,
    .consumo-grid-two {
        grid-template-columns: 1fr !important;
    }

    .consumo-filters select,
    .consumo-filter-btn,
    .consumo-export-btn {
        width: 100%;
        justify-content: center;
    }
}

.consumo-dashboard {
    --consumo-bg: #f8fafc;
    --consumo-panel: #ffffff;
    --consumo-panel-soft: #f9fafb;
    --consumo-text: #0f172a;
    --consumo-muted: #64748b;
    --consumo-subtle: #94a3b8;
    --consumo-border: #e5e7eb;
    --consumo-border-soft: #eef2f7;
    --consumo-hover: #eff6ff;
    background: var(--consumo-bg) !important;
    color: var(--consumo-text) !important;
}

body[data-theme="dark"] .consumo-dashboard {
    --consumo-bg: #020617;
    --consumo-panel: #0f172a;
    --consumo-panel-soft: #111827;
    --consumo-text: #e5e7eb;
    --consumo-muted: #94a3b8;
    --consumo-subtle: #64748b;
    --consumo-border: rgba(148, 163, 184, 0.18);
    --consumo-border-soft: rgba(148, 163, 184, 0.12);
    --consumo-hover: rgba(59, 130, 246, 0.10);
}

.consumo-dashboard p,
.consumo-dashboard td,
.consumo-dashboard .muted {
    color: var(--consumo-muted) !important;
}

.consumo-topbar {
    align-items: center !important;
    flex-direction: row !important;
    gap: 14px !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
    border-bottom-color: var(--consumo-border) !important;
}

.consumo-title {
    min-width: 220px !important;
    flex: 0 0 auto;
}

.consumo-title h2 {
    color: var(--consumo-text) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.consumo-filters {
    flex: 1 1 auto;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
}

.consumo-filters select {
    width: 190px !important;
    max-width: 22vw;
    flex: 0 1 190px;
}

.consumo-filters select,
.consumo-filter-btn,
.consumo-export-btn,
.consumo-search {
    background: var(--consumo-panel) !important;
    color: var(--consumo-text) !important;
    border-color: var(--consumo-border) !important;
}

.consumo-filters select option {
    background: var(--consumo-panel);
    color: var(--consumo-text);
}

.consumo-kpi,
.consumo-panel,
.consumo-table-card,
.consumo-table-wrap,
.consumo-table-wrap td {
    background: var(--consumo-panel) !important;
    border-color: var(--consumo-border-soft) !important;
}

.consumo-kpi p,
.consumo-kpi small,
.consumo-table-head span {
    color: var(--consumo-muted) !important;
}

.consumo-kpi strong,
.consumo-panel h3,
.consumo-table-head h3,
.consumo-table-wrap .strong {
    color: var(--consumo-text) !important;
}

.consumo-table-head {
    border-bottom-color: var(--consumo-border-soft) !important;
}

.consumo-table-wrap th {
    background: var(--consumo-panel-soft) !important;
    color: var(--consumo-muted) !important;
    border-bottom-color: var(--consumo-border-soft) !important;
}

.consumo-table-wrap td {
    color: var(--consumo-muted) !important;
    border-bottom-color: var(--consumo-border-soft) !important;
}

.consumo-table-wrap tr:hover td {
    background: var(--consumo-hover) !important;
}

.consumo-resumo {
    color: var(--consumo-muted);
    font-size: 12px;
    margin: -2px 0 12px;
}

body[data-theme="dark"] .consumo-produto {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

body[data-theme="dark"] .consumo-turno.blue {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

body[data-theme="dark"] .consumo-turno.orange {
    background: rgba(249, 115, 22, 0.16);
    color: #fdba74;
}

body[data-theme="dark"] .consumo-status.ok {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

body[data-theme="dark"] .consumo-status.warn {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

body[data-theme="dark"] .consumo-status.pending {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

body[data-theme="dark"] .consumo-pendente {
    color: #fcd34d;
}

@media (max-width: 980px) {
    .consumo-topbar {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .consumo-filters {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .consumo-filters select {
        width: auto !important;
        max-width: none;
        flex: 1 1 180px;
    }
}

.file-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-tile {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--card-2) 82%, transparent);
    color: var(--text);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.upload-tile:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--card-2));
    transform: translateY(-1px);
}

.upload-tile-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    flex: 0 0 auto;
}

.upload-tile-icon svg {
    width: 22px;
    height: 22px;
}

.upload-tile strong {
    display: block;
    font-size: 14px;
    color: var(--text);
}

.upload-tile small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}

.permissions-tree {
    display: grid;
    gap: 10px;
}

.permission-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--card-2) 78%, transparent);
    overflow: hidden;
}

#p_lista .permission-row {
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text);
}

#p_lista .permission-row.child {
    grid-template-columns: 34px 1fr auto;
    padding-left: 30px;
    background: color-mix(in srgb, var(--card) 70%, transparent);
}

.permission-expand {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.permission-expand.placeholder {
    visibility: hidden;
}

.permission-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

#p_lista .permission-row.child .permission-label {
    font-size: 12px;
    font-weight: 650;
    color: var(--text-soft);
}

#p_lista .permission-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.permission-children {
    display: none;
    border-top: 1px solid var(--border);
}

.permission-children.open {
    display: block;
}

body[data-theme="light"] .permission-group,
body[data-theme="light"] .upload-tile {
    background: #ffffff !important;
}

/* =========================================================
   CAMADA FIGMA 2026 - topbar, cards e filtros profissionais
   ========================================================= */
body.authenticated #topbar {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    min-height: 76px !important;
    padding: 12px 22px !important;
    border: 0 !important;
}

body:not(.authenticated) #topbar {
    display: none !important;
}

#topbar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 300px !important;
    z-index: 1080 !important;
    background: color-mix(in srgb, var(--card) 92%, transparent) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    transition: left 0.25s ease, width 0.25s ease, background 0.25s ease !important;
}

body.sidebar-collapsed #topbar {
    left: 0 !important;
}

body.sidebar-collapsed #topbar .topbar-inner {
    padding-left: 58px !important;
}

.topbar-inner {
    width: 100% !important;
    max-width: 1680px !important;
    height: 52px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.topbar-title {
    min-width: 0;
    display: none !important;
    flex-direction: column;
    gap: 2px;
}

.topbar-title strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.1;
    font-weight: 850;
}

.topbar-title span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.topbar-search {
    flex: 1 1 340px !important;
    max-width: 560px !important;
    position: relative !important;
}

.topbar-search .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.topbar-search input {
    width: 100%;
    height: 44px;
    padding-left: 42px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--input) 88%, transparent) !important;
}

.topbar-context-filters:empty {
    display: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.topbar-chip {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: color-mix(in srgb, var(--card-2) 92%, transparent) !important;
    color: var(--text-soft) !important;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-chip:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--primary) 12%, var(--card-2)) !important;
    border-color: var(--border-strong) !important;
    color: var(--text) !important;
}

.topbar-chip svg {
    width: 19px;
    height: 19px;
}

.language-flag-only .lang-flag {
    font-size: 19px;
    line-height: 1;
}

.notify-chip span {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--card);
}

.user-badge {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 850;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

body.sidebar-menu-open #menu-toggle {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-6px) scale(0.92) !important;
}

body.authenticated .main {
    padding-top: 104px !important;
}

.sidebar #themeToggleBtn,
.sidebar #languageToggleBtn {
    display: none !important;
}

.card-container,
.chart-box,
.kpi,
.mini-card,
.section-box,
.list-table,
.table-wrap,
.selector-item,
.inventory-detail,
.inventory-address,
.dashboard-filter-card {
    border-radius: 12px !important;
    border-color: color-mix(in srgb, var(--border) 82%, transparent) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14) !important;
}

.dashboard-head {
    align-items: flex-start;
    gap: 16px;
}

.dashboard-head h2 {
    font-size: clamp(18px, 1.45vw, 24px) !important;
    font-weight: 850 !important;
}

.summary-box {
    background: transparent !important;
    border: 1px dashed color-mix(in srgb, var(--border-strong) 42%, transparent) !important;
    box-shadow: none !important;
    opacity: 0.72;
    font-size: 12px;
}

.summary-box strong {
    color: var(--text-soft);
}

.example-hint {
    padding: 10px 12px;
    border-left: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
    color: color-mix(in srgb, var(--muted) 82%, transparent);
    font-size: 12px;
    background: transparent;
}

.request-count-card {
    max-width: 1040px;
}

.empty-state {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed color-mix(in srgb, var(--border-strong) 38%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--card-2) 72%, transparent);
}

.empty-state svg {
    width: 42px;
    height: 42px;
    color: var(--primary);
}

.empty-state strong {
    color: var(--text);
    font-size: 18px;
}

.empty-state span {
    max-width: 460px;
    font-size: 13px;
}

body.authenticated #dash > #searchDash,
body.authenticated #dashIdsAbertos > #searchDashIds,
body.authenticated #dashDetalheId > #searchDashDetalheId,
body.authenticated #dashUsuario > #searchDashUsuario,
body.authenticated #dashProdutos > #searchDashProdutos,
body.authenticated #gestao > #searchGestao,
body.authenticated #gestaoEnderecos > #searchGestaoEnderecos,
body.authenticated #direcionamento > #searchDirecionamento,
body.authenticated #idsEncerrados > #searchIdsEnc,
body.authenticated #embFarol > #searchFarolBaixa,
body.authenticated #embRelatorio > #searchBaixaEmbalagens,
body.authenticated #estoque > #searchEstoque,
body.authenticated #relInventario > #searchRelInventario,
body.authenticated #wmsOficial > #searchWmsCompare,
body.authenticated #quebraFefo > #searchFefo,
body.authenticated #monitoramentoFefo > #searchMonitorFefo,
body.authenticated #enderecos > #searchMasterEnd,
body.authenticated #enderecosRelatorio > #searchMasterEndRel,
body.authenticated #produtos > #searchMasterProd,
body.authenticated #produtosRelatorio > #searchMasterProdRel,
body.authenticated #usuarios > #searchUser,
body.authenticated #usuariosResponsaveisInsumos > #searchResponsaveisInsumos {
    display: none !important;
}

body[data-theme="light"] #topbar {
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] .card-container,
body[data-theme="light"] .chart-box,
body[data-theme="light"] .kpi,
body[data-theme="light"] .mini-card,
body[data-theme="light"] .section-box,
body[data-theme="light"] .list-table,
body[data-theme="light"] .table-wrap,
body[data-theme="light"] .selector-item,
body[data-theme="light"] .inventory-detail,
body[data-theme="light"] .inventory-address,
body[data-theme="light"] .dashboard-filter-card {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07) !important;
}

@media (max-width: 1600px) {
    #topbar {
        left: 288px !important;
    }
    body.sidebar-collapsed #topbar {
        left: 0 !important;
    }
}

@media (max-width: 1366px) {
    #topbar {
        left: 264px !important;
    }
    body.sidebar-collapsed #topbar {
        left: 0 !important;
    }
}

@media (max-width: 1180px) {
    #topbar {
        left: 0 !important;
        padding-left: 68px !important;
    }

    body.sidebar-menu-open #topbar {
        padding-left: 22px !important;
    }

    .topbar-title {
        display: none;
    }
}

@media (max-width: 760px) {
    body.authenticated .main {
        padding-top: 132px !important;
    }

    body.authenticated #topbar {
        min-height: 116px !important;
    }

    .topbar-inner {
        height: auto !important;
        flex-wrap: wrap;
    }

    .topbar-search {
        order: 3;
        flex-basis: 100% !important;
        max-width: none !important;
    }
}

/* Ajustes finais solicitados - menus em overlay e telas centralizadas */
body.authenticated .main,
body.sidebar-collapsed .main,
body.authenticated .sidebar.active ~ .main {
    margin-left: 0 !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    width: 100% !important;
}

body.authenticated #topbar,
body.sidebar-collapsed #topbar,
body.authenticated .sidebar.active ~ .topbar {
    left: 0 !important;
    width: 100% !important;
}

body.authenticated #topbar .topbar-inner {
    padding-left: 58px !important;
}

body.sidebar-menu-open #topbar .topbar-inner {
    padding-left: 0 !important;
}

.user-badge {
    max-width: 180px;
    padding: 0 14px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0 !important;
    font-size: 13px;
}

.count-dashboard {
    max-width: 1320px !important;
}

.count-dashboard .toggle-group {
    justify-content: flex-start;
    gap: 8px;
}

.count-dashboard .toggle-group .btn-acao {
    min-height: 34px;
    border-radius: 999px !important;
    padding: 7px 14px !important;
}

.count-dashboard .consumo-plain-head {
    margin-bottom: 14px;
}

.count-dashboard .consumo-plain-head h2 {
    color: var(--consumo-text) !important;
}

.count-chart-panel {
    min-height: 330px;
}

.count-chart-panel canvas {
    height: 270px !important;
    max-height: 320px !important;
}

#dash .count-chart-panel {
    min-height: 470px;
}

#dash .count-chart-panel canvas {
    height: 390px !important;
    max-height: 430px !important;
}

#gestaoGerarSessao,
#gestaoSolicitarContagem {
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#gestaoGerarSessao > .section-box,
#gestaoSolicitarContagem > .request-count-card {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

body.authenticated #relatorioPedidosContagem > #searchPedidosContagem {
    display: none !important;
}

/* =========================================================
   FIGMA POLISH 2026 - microinteractions and visual depth
   ========================================================= */
:root {
    --wms-transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --wms-transition-spring: 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

body,
.card-container,
.chart-box,
.summary-box,
.section-box,
.mini-card,
.list-table,
.table-wrap,
.kpi,
.consumo-kpi,
.consumo-panel,
.dashboard-filter-card,
input,
select,
textarea,
button {
    transition:
        background-color 400ms cubic-bezier(0.4, 0, 0.2, 1),
        color 400ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 400ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 400ms cubic-bezier(0.4, 0, 0.2, 1),
        transform var(--wms-transition) !important;
}

@keyframes wms-pulse {
    0%, 100% {
        opacity: 0.78;
        transform: scale(0.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

@keyframes wms-spin {
    to { transform: rotate(360deg); }
}

@keyframes wms-slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wms-page-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wms-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -18px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes wms-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes wms-notification-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.wms-page-transition {
    animation: wms-page-fade-in 360ms ease both;
}

.sidebar,
.sidebar button,
.sidebar-submenu.open button {
    transition:
        transform var(--wms-transition-spring),
        left var(--wms-transition-spring),
        background-color var(--wms-transition),
        border-color var(--wms-transition),
        color var(--wms-transition),
        opacity var(--wms-transition) !important;
}

.sidebar-submenu.open button {
    animation: wms-slide-in 320ms var(--wms-transition-spring) both;
}

.sidebar button svg,
.btn-acao svg,
.topbar-chip svg,
.consumo-filter-btn svg,
.consumo-export-btn svg,
.consumo-kpi-icon svg,
.dashboard-head svg {
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar button:hover svg,
.btn-acao:hover svg,
.topbar-chip:hover svg,
.consumo-filter-btn:hover svg,
.consumo-export-btn:hover svg,
.consumo-kpi:hover .consumo-kpi-icon svg,
.kpi:hover svg {
    transform: scale(1.14) rotate(5deg);
}

.consumo-kpi,
.kpi {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.consumo-kpi::after,
.kpi::after {
    content: "";
    display: block !important;
    position: absolute;
    right: -22px;
    top: -24px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    opacity: 0.6;
    transform: scale(0.9);
    transition: transform var(--wms-transition), opacity var(--wms-transition);
    z-index: -1;
}

.consumo-kpi:hover,
.kpi:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border)) !important;
    box-shadow:
        0 16px 42px color-mix(in srgb, var(--primary) 16%, transparent),
        0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent) !important;
}

.consumo-kpi:hover::after,
.kpi:hover::after {
    opacity: 0.88;
    transform: scale(1.22);
}

.consumo-kpi-icon {
    position: relative;
    overflow: visible;
    animation: wms-pulse 3s ease-in-out infinite;
}

.consumo-kpi-icon::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    background: currentColor;
    opacity: 0.12;
    filter: blur(12px);
    z-index: -1;
}

.consumo-kpi strong,
.kpi .n {
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

.chart-box,
.consumo-panel,
.count-chart-panel {
    position: relative;
    overflow: hidden;
}

.chart-box::before,
.consumo-panel::before,
.count-chart-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.38;
    pointer-events: none;
}

.btn-acao,
.topbar-chip,
.consumo-filter-btn,
.consumo-export-btn {
    position: relative;
    overflow: hidden;
}

.btn-acao::after,
.topbar-chip::after,
.consumo-filter-btn::after,
.consumo-export-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transform: translate(-50%, -50%);
    transition: width 520ms ease, height 520ms ease, opacity 520ms ease;
    opacity: 0;
    pointer-events: none;
}

.btn-acao:active::after,
.topbar-chip:active::after,
.consumo-filter-btn:active::after,
.consumo-export-btn:active::after {
    width: 240px;
    height: 240px;
    opacity: 1;
}

#loader {
    gap: 14px;
    flex-direction: column;
}

#loader::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-top-color: var(--primary);
    animation: wms-spin 800ms linear infinite;
}

#loader h3 {
    letter-spacing: 0.12em;
    font-size: 13px;
}

#toast {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    text-align: left;
    background: color-mix(in srgb, var(--card) 92%, transparent) !important;
    color: var(--text) !important;
    border: 1px solid color-mix(in srgb, var(--success) 34%, var(--border)) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24) !important;
}

#toast.show {
    animation: wms-toast-in 350ms ease both, fadeout 0.35s 1.55s;
}

#toast .toast-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
    flex: 0 0 auto;
}

#toast .toast-message {
    font-weight: 750;
    line-height: 1.25;
}

#toast[data-type="error"] {
    border-color: color-mix(in srgb, var(--danger) 40%, var(--border)) !important;
}

#toast[data-type="error"] .toast-icon {
    background: color-mix(in srgb, var(--danger) 16%, transparent);
    color: var(--danger);
}

#toast[data-type="warning"] {
    border-color: color-mix(in srgb, var(--warning) 44%, var(--border)) !important;
}

#toast[data-type="warning"] .toast-icon {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}

#toast[data-type="info"] {
    border-color: color-mix(in srgb, var(--info) 40%, var(--border)) !important;
}

#toast[data-type="info"] .toast-icon {
    background: color-mix(in srgb, var(--info) 16%, transparent);
    color: var(--info);
}

.notify-chip span {
    animation: wms-notification-pulse 2s ease-in-out infinite;
}

.movimentacao-qualidade-kpis {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    margin-top: 18px;
}

.movimentacao-qualidade-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.movimentacao-qualidade-resumo {
    margin-bottom: 10px;
}

.movimentacao-qualidade-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 0.9fr);
    margin: 14px 0 18px;
}

.movimentacao-qualidade-panel {
    min-height: 260px;
}

.movimentacao-qualidade-panel canvas {
    height: 210px !important;
    max-height: 210px;
    width: 100% !important;
}

.movimentacao-qualidade-wide {
    grid-column: 1 / -1;
    min-height: 180px;
}

.movimentacao-qualidade-list,
.movimentacao-qualidade-hours {
    display: grid;
    gap: 9px;
}

.movimentacao-qualidade-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(110px, 1fr) minmax(90px, auto);
}

.movimentacao-qualidade-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movimentacao-qualidade-bar {
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.movimentacao-qualidade-bar span {
    background: linear-gradient(90deg, #14b8a6, #2563eb);
    display: block;
    height: 100%;
    min-width: 2px;
}

@media (max-width: 920px) {
    .movimentacao-qualidade-kpis,
    .movimentacao-qualidade-grid {
        grid-template-columns: 1fr !important;
    }

    .movimentacao-qualidade-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

.notify-chip.no-alerts span {
    display: none;
}

.notify-chip.has-alerts span {
    align-items: center;
    display: inline-flex;
    font-size: 10px;
    font-weight: 950;
    height: 18px;
    justify-content: center;
    line-height: 1;
    min-width: 18px;
    padding: 0 5px;
    right: -3px;
    top: -4px;
    width: auto;
}

.notification-center-overlay {
    align-items: flex-start;
    background: rgba(2, 6, 23, 0.44);
    display: none;
    inset: 0;
    justify-content: flex-end;
    padding: 76px 28px 28px;
    position: fixed;
    z-index: 3200;
}

.notification-center-overlay.active {
    display: flex;
}

.notification-center-panel {
    background: color-mix(in srgb, var(--card) 96%, #020617);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 104px);
    max-width: 520px;
    overflow: hidden;
    padding: 18px;
    width: min(520px, calc(100vw - 32px));
}

.notification-center-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.notification-center-head h2 {
    color: var(--text);
    font-size: 20px;
    font-weight: 950;
    margin: 0 0 4px;
}

.notification-center-head p {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.notification-center-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-stat {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.notification-stat span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.notification-stat strong {
    color: var(--text);
    font-size: 22px;
    font-weight: 950;
}

.notification-stat.danger { border-color: rgba(239, 68, 68, 0.48); }
.notification-stat.warn { border-color: rgba(245, 158, 11, 0.48); }
.notification-stat.success { border-color: rgba(16, 185, 129, 0.38); }

.notification-center-list {
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.notification-item {
    align-items: center;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 13px;
}

.notification-item.danger { border-left-color: #ef4444; }
.notification-item.warn { border-left-color: #f59e0b; }
.notification-item.info { border-left-color: #3b82f6; }
.notification-item.success { border-left-color: #10b981; }

.notification-item-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-item-main span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.notification-item-main strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 950;
}

.notification-item-main p {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
}

.notification-item .btn-acao {
    flex: 0 0 auto;
}

.notification-center-actions {
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 14px;
}

body[data-theme="light"] .notification-center-panel {
    background: #ffffff;
}

.table-wrap tbody tr,
.list-table > *,
.selector-item,
.inventory-address,
.inventory-detail,
.permission-group,
.upload-tile {
    transition:
        background-color var(--wms-transition),
        border-color var(--wms-transition),
        box-shadow var(--wms-transition),
        transform var(--wms-transition) !important;
}

.table-wrap tbody tr:hover,
.list-table > *:hover,
.selector-item:hover,
.inventory-address:hover,
.inventory-detail:hover,
.permission-group:hover,
.upload-tile:hover {
    transform: translateY(-1px);
}

.wms-shimmer {
    background: linear-gradient(
        90deg,
        var(--card) 25%,
        color-mix(in srgb, var(--card) 92%, white 8%) 50%,
        var(--card) 75%
    );
    background-size: 200% 100%;
    animation: wms-shimmer 1.5s infinite;
}

.wms-figma-dashboard {
    display: none;
}

.wms-figma-dashboard[style*="display: block"] {
    display: block !important;
}

.wms-figma-screen-head {
    margin-bottom: 22px;
}

.wms-figma-screen-head h2 {
    margin: 0;
    color: var(--text) !important;
    font-size: clamp(24px, 2vw, 32px) !important;
    line-height: 1.2;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

.wms-figma-screen-head p {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted) !important;
}

.wms-figma-search {
    position: relative;
    margin-bottom: 24px;
}

.wms-figma-search > svg,
.wms-figma-search > i {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.wms-figma-search .search-bar {
    height: 46px;
    margin: 0 !important;
    padding-left: 44px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--input) 84%, transparent) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.wms-figma-kpis {
    margin-bottom: 24px !important;
}

.wms-figma-chart-card {
    padding: 0 !important;
    border-radius: 14px !important;
    min-height: 0 !important;
}

.wms-figma-chart-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.wms-figma-chart-head h3 {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.wms-figma-chart-head h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.wms-figma-chart-head p {
    margin-top: 4px;
    font-size: 13px;
}

.wms-figma-chart-body {
    padding: 22px 20px 24px;
}

.wms-figma-chart-body canvas {
    width: 100% !important;
    height: 400px !important;
    max-height: 420px !important;
}

.wms-figma-rua-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.wms-figma-rua-card {
    min-height: 154px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.wms-figma-rua-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 14%, transparent);
}

.wms-figma-rua-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wms-figma-rua-card-head strong {
    font-size: 16px;
    line-height: 1.2;
}

.wms-figma-rua-card-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.wms-figma-rua-lines {
    display: grid;
    gap: 7px;
}

.wms-figma-rua-lines div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.wms-figma-rua-lines span {
    color: var(--muted);
}

.wms-figma-rua-lines strong {
    font-weight: 800;
}

.wms-figma-rua-lines .ok {
    color: var(--success);
}

.wms-figma-rua-lines .warn {
    color: var(--warning);
}

.wms-figma-progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-2) 76%, black 8%);
    margin-top: auto;
}

.wms-figma-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 500ms ease;
}

.wms-figma-empty {
    grid-column: 1 / -1;
    min-height: 120px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 22px;
    border: 1px dashed color-mix(in srgb, var(--border-strong) 42%, transparent);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
    background: color-mix(in srgb, var(--card-2) 72%, transparent);
}

.wms-figma-empty strong {
    color: var(--text);
    font-size: 16px;
}

.wms-figma-empty span {
    max-width: 460px;
    font-size: 13px;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 6px;
}

@media (max-width: 760px) {
    .consumo-kpis,
    .kpis {
        gap: 12px !important;
    }

    .consumo-kpi,
    .kpi {
        min-height: 98px;
        padding: 15px !important;
    }

    .wms-figma-rua-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wms-figma-chart-body canvas {
        height: 320px !important;
    }
}

@media (max-width: 480px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body.authenticated .main,
    body.sidebar-collapsed .main,
    body.authenticated .sidebar.active ~ .main {
        padding: 132px 12px 16px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    body.authenticated #topbar,
    body.sidebar-collapsed #topbar,
    body.authenticated .sidebar.active ~ .topbar {
        min-height: 96px !important;
        padding: 12px 10px !important;
        overflow: hidden !important;
    }

    body.authenticated #topbar .topbar-inner,
    body.sidebar-collapsed #topbar .topbar-inner {
        width: 100% !important;
        min-width: 0 !important;
        padding-left: 58px !important;
        padding-right: 8px !important;
        gap: 6px !important;
        justify-content: flex-end !important;
    }

    .topbar-actions {
        min-width: 0 !important;
        gap: 4px !important;
    }

    .topbar-chip {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
    }

    .user-badge {
        display: none !important;
    }

    .count-dashboard,
    body.authenticated .card-container,
    .card-container {
        width: 100% !important;
        max-width: calc(100vw - 24px) !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .dashboard-head,
    .consumo-plain-head {
        min-width: 0 !important;
    }

    .dashboard-head h2,
    .card-container h1,
    .card-container h2 {
        overflow-wrap: anywhere;
    }

    .dashboard-head .muted,
    .card-container .muted {
        overflow-wrap: break-word;
    }

    .consumo-kpis,
    .kpis {
        grid-template-columns: 1fr !important;
    }

    .consumo-kpi {
        width: 100%;
        min-width: 0;
    }

    .consumo-panel,
    .chart-box {
        max-width: 100%;
        overflow-x: auto;
    }

    .wms-figma-dashboard {
        padding: 18px !important;
    }

    .wms-figma-screen-head h2 {
        font-size: 22px !important;
    }

    .wms-figma-search {
        margin-bottom: 18px;
    }

    .wms-figma-rua-grid {
        grid-template-columns: 1fr;
    }

    .wms-figma-chart-head {
        padding: 16px;
    }

    .wms-figma-chart-body {
        padding: 16px;
    }

    .wms-figma-chart-body canvas {
        height: 280px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* MENU/TOPBAR REORG 2026 */
:root {
    --wms-sidebar-width: 320px;
}

@media (max-width: 1600px) {
    :root {
        --wms-sidebar-width: 288px;
    }
}

@media (max-width: 1366px) {
    :root {
        --wms-sidebar-width: 264px;
    }
}

.sidebar-tools {
    display: grid;
    gap: 12px;
    padding: 14px 14px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.sidebar-menu-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-menu-search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}

.sidebar-menu-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 88%, black 4%);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-menu-search input::placeholder {
    color: var(--muted);
}

.sidebar-menu-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.sidebar-menu-filters button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-2) 82%, transparent);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    cursor: pointer;
}

.sidebar-menu-filters button.active,
.sidebar-menu-filters button:hover {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
    background: color-mix(in srgb, var(--primary) 16%, var(--card));
    color: var(--primary);
}

.topbar-brand {
    display: flex;
    align-items: center;
    min-width: 170px;
    gap: 12px;
}

.topbar-logo {
    width: 148px;
    height: 58px;
    object-fit: contain;
    object-position: center;
    flex: 0 0 148px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--card) 84%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    padding: 0;
}

.topbar-context-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar-context-filters::-webkit-scrollbar {
    display: none;
}

.help-honeycomb {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.help-cell {
    min-height: 96px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 86%, var(--primary) 8%);
    color: var(--text);
    clip-path: polygon(12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%);
    display: grid;
    place-items: center;
    padding: 18px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.help-cell:hover,
.help-cell.active {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 22%, var(--card));
}

.help-content ul {
    margin: 12px 0 0;
    padding-left: 22px;
    color: var(--text);
}

#embFarol:fullscreen {
    overflow: auto;
    padding: 22px;
    background: var(--bg);
}

.topbar-filter-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 86%, transparent);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
}

.topbar-filter-btn.active,
.topbar-filter-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 46%, var(--border));
    background: color-mix(in srgb, var(--primary) 14%, var(--card));
    color: var(--primary);
}

.wms-dashboard-status-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 0 18px;
}

.wms-dashboard-status-filters .topbar-filter-btn {
    min-height: 38px;
    padding: 0 14px;
}

.wms-dashboard-period-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.wms-dashboard-period-actions .topbar-filter-btn {
    min-height: 38px;
    padding: 0 14px;
}

.farol-estoque-screen {
    max-width: 1680px;
}

.farol-estoque-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0 12px;
}

.farol-estoque-resumo {
    margin: 0 0 14px;
}

.farol-estoque-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.farol-estoque-card {
    grid-column: span 6;
    position: relative;
    min-height: 360px;
    overflow: visible;
}

.farol-estoque-status-rua-card {
    grid-column: span 8;
}

.farol-estoque-sem-saldo-card {
    grid-column: span 4;
    margin-top: 34px;
}

.farol-estoque-card h3,
.farol-estoque-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 900;
}

.farol-estoque-card h3 > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.farol-estoque-card h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.farol-estoque-filter-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    background: color-mix(in srgb, var(--card-2) 92%, transparent);
    color: var(--text-soft);
    cursor: pointer;
}

.farol-estoque-filter-btn:hover,
.farol-estoque-filter-btn.active {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: color-mix(in srgb, var(--primary) 14%, var(--card));
    color: var(--primary);
}

.farol-estoque-filter-btn svg {
    width: 17px !important;
    height: 17px !important;
}

.farol-estoque-filter-popover {
    position: absolute;
    top: 52px;
    right: 18px;
    z-index: 40;
    width: min(320px, calc(100% - 28px));
    display: none;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
    border-radius: 8px;
    background: var(--card);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.farol-estoque-filter-popover.active {
    display: block;
}

.farol-estoque-filter-search {
    width: 100%;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 12px;
}

.farol-estoque-filter-list {
    max-height: 220px;
    overflow: auto;
    display: grid;
    gap: 6px;
    padding-right: 2px;
}

.farol-estoque-filter-option {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.farol-estoque-filter-option input {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.farol-estoque-filter-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.farol-estoque-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.farol-estoque-filter-actions button {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
}

.farol-estoque-card canvas {
    width: 100% !important;
    height: 240px !important;
    max-height: 240px !important;
}

.farol-estoque-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.farol-estoque-list-row,
.farol-estoque-virtual-row {
    position: relative;
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 88%, transparent);
    overflow: hidden;
}

.farol-estoque-list-row span,
.farol-estoque-virtual-row span {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-weight: 800;
}

.farol-estoque-list-row strong,
.farol-estoque-virtual-row strong {
    position: relative;
    z-index: 1;
    color: var(--text);
    font-weight: 900;
    white-space: nowrap;
}

.farol-estoque-list-row i,
.farol-estoque-virtual-row i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    display: block;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.farol-estoque-table {
    max-height: 430px;
    overflow: auto;
}

.farol-estoque-table table {
    min-width: 980px;
}

.farol-estoque-ruas {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 10px;
}

.farol-estoque-rua-card {
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 88%, transparent);
}

.farol-estoque-rua-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.farol-estoque-rua-card strong {
    color: var(--text);
    font-size: clamp(24px, 2.2vw, 34px);
    font-weight: 900;
}

.farol-estoque-wide {
    grid-column: 1 / -1;
    min-height: 300px;
}

#menu-toggle {
    top: 16px !important;
    width: 42px !important;
    height: 42px !important;
}

#menu-toggle svg {
    width: 21px !important;
    height: 21px !important;
}

.home-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.home-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.home-kpi {
    min-height: 118px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 88%, transparent);
}

.home-kpi-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
}

.home-kpi-icon.blue { color: #2563eb; background: color-mix(in srgb, #2563eb 14%, transparent); }
.home-kpi-icon.green { color: #16a34a; background: color-mix(in srgb, #16a34a 14%, transparent); }
.home-kpi-icon.yellow { color: #d97706; background: color-mix(in srgb, #d97706 16%, transparent); }
.home-kpi-icon.red { color: #dc2626; background: color-mix(in srgb, #dc2626 14%, transparent); }

.home-kpi p,
.home-base-item span {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-kpi strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: clamp(24px, 2.2vw, 34px);
    font-weight: 900;
}

.home-kpi small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 700;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.home-panel {
    min-height: 260px;
}

.home-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 16px;
}

.home-wide {
    grid-column: 1 / -1;
    min-height: 0;
}

.home-list,
.home-shortcuts,
.home-base-grid {
    display: grid;
    gap: 10px;
}

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

.home-priority,
.home-shortcut,
.home-base-item {
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 86%, transparent);
}

.home-priority {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-left-width: 4px;
}

.home-priority strong,
.home-base-item strong {
    color: var(--text);
    font-weight: 900;
}

.home-priority span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.home-priority.success { border-left-color: #16a34a; }
.home-priority.info { border-left-color: #2563eb; }
.home-priority.warn { border-left-color: #d97706; }
.home-priority.danger { border-left-color: #dc2626; }

.home-shortcut {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--text);
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.home-shortcut:hover {
    border-color: color-mix(in srgb, var(--primary) 46%, var(--border));
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
}

.home-base-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-base-item {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.home-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-panel-title-row h3 {
    margin-bottom: 0;
}

.home-select {
    min-width: 220px;
    max-width: 420px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-weight: 800;
}

.home-sla-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.home-sla-card,
.home-gargalo-row,
.home-rua-card,
.home-timeline-item {
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 86%, transparent);
}

.home-sla-card {
    display: grid;
    gap: 6px;
    min-height: 138px;
    padding: 14px;
    border-left-width: 4px;
}

.home-sla-card span,
.home-rua-label,
.home-gargalo-row span,
.home-timeline-item small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-sla-card strong {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.home-sla-card p,
.home-timeline-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.home-sla-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.home-sla-card.success { border-left-color: #16a34a; }
.home-sla-card.warn { border-left-color: #d97706; }
.home-sla-card.danger { border-left-color: #dc2626; }

.home-gargalo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 12px;
    border-left-width: 4px;
}

.home-gargalo-row > div:first-child {
    display: grid;
    gap: 3px;
}

.home-gargalo-row strong,
.home-timeline-item strong,
.home-rua-card strong {
    color: var(--text);
    font-weight: 900;
}

.home-gargalo-row.success { border-left-color: #16a34a; }
.home-gargalo-row.warn { border-left-color: #d97706; }
.home-gargalo-row.danger { border-left-color: #dc2626; }

.home-gargalo-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.home-gargalo-stats span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.home-rua-map {
    display: grid;
    grid-template-columns: repeat(13, minmax(82px, 1fr));
    gap: 8px;
}

.home-rua-card {
    display: grid;
    gap: 6px;
    min-height: 128px;
    padding: 12px;
    border-top-width: 4px;
}

.home-rua-top,
.home-rua-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.home-rua-top span,
.home-rua-foot span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.home-rua-main {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.home-rua-card.idle { border-top-color: #94a3b8; opacity: .78; }
.home-rua-card.success { border-top-color: #16a34a; }
.home-rua-card.warn { border-top-color: #d97706; }
.home-rua-card.danger { border-top-color: #dc2626; }

.home-timeline {
    display: grid;
    gap: 10px;
    max-height: 380px;
    overflow: auto;
    padding-right: 4px;
}

.home-timeline-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    min-height: 72px;
    padding: 12px;
}

.home-timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.home-timeline-item.success .home-timeline-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }
.home-timeline-item.warn .home-timeline-dot { background: #d97706; box-shadow: 0 0 0 4px rgba(217, 119, 6, .16); }
.home-timeline-item.danger .home-timeline-dot { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }

.home-inline-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.home-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.home-action-card {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-left-width: 4px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 86%, transparent);
}

.home-action-card > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.home-action-card strong {
    color: var(--text);
    font-weight: 900;
}

.home-action-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.home-action-card.success { border-left-color: #16a34a; }
.home-action-card.info { border-left-color: #2563eb; }
.home-action-card.warn { border-left-color: #d97706; }
.home-action-card.danger { border-left-color: #dc2626; }

.home-fila-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.home-fila-summary span,
.home-status-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-fila-summary span {
    color: var(--muted);
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
}

.home-status-pill.success { color: #16a34a; background: rgba(22, 163, 74, .12); }
.home-status-pill.info { color: #2563eb; background: rgba(37, 99, 235, .12); }
.home-status-pill.warn { color: #d97706; background: rgba(217, 119, 6, .14); }
.home-status-pill.danger { color: #dc2626; background: rgba(220, 38, 38, .12); }

.home-fila-table {
    max-height: 520px;
    overflow: auto;
}

.home-fila-table table {
    min-width: 1080px;
}

.home-fila-row td {
    vertical-align: middle;
}

.home-fila-row td:first-child strong {
    color: var(--text);
    font-weight: 900;
}

.home-fila-row td span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.home-fila-row.danger td:first-child {
    border-left: 4px solid #dc2626;
}

.home-fila-row.warn td:first-child {
    border-left: 4px solid #d97706;
}

.home-fila-row.info td:first-child {
    border-left: 4px solid #2563eb;
}

.home-fila-row.success td:first-child {
    border-left: 4px solid #16a34a;
}

.btn-acao.compact {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
}

.home-rua-card[role="button"] {
    cursor: pointer;
}

.home-rua-card[role="button"]:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.home-forecast-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.home-forecast-card,
.home-forecast-block,
.home-forecast-row {
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 86%, transparent);
}

.home-forecast-card {
    display: grid;
    gap: 5px;
    min-height: 118px;
    padding: 14px;
    border-left-width: 4px;
}

.home-forecast-card span,
.home-forecast-card small,
.home-forecast-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-forecast-card strong {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.home-forecast-card.success,
.home-forecast-row.success {
    border-left-color: #16a34a;
}

.home-forecast-card.warn,
.home-forecast-row.warn {
    border-left-color: #d97706;
}

.home-forecast-card.danger,
.home-forecast-row.danger {
    border-left-color: #dc2626;
}

.home-forecast-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.home-forecast-block {
    min-height: 220px;
    padding: 14px;
}

.home-forecast-block h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-forecast-block h4 svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.home-forecast-list {
    display: grid;
    gap: 10px;
}

.home-forecast-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 12px;
    border-left-width: 4px;
}

.home-forecast-row > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.home-forecast-row strong {
    color: var(--text);
    font-weight: 900;
}

.home-forecast-metric {
    display: grid;
    justify-items: end;
    gap: 6px;
    min-width: 90px;
}

.home-forecast-metric strong {
    font-size: 16px;
}

.home-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.home-health-card,
.home-alerts-panel,
.home-shift-panel,
.home-alert-row {
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-2) 86%, transparent);
}

.home-health-card {
    display: grid;
    gap: 5px;
    min-height: 112px;
    padding: 14px;
    border-left-width: 4px;
}

.home-health-card span,
.home-health-card small,
.home-alert-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-health-card strong {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.home-health-card.success,
.home-alert-row.success {
    border-left-color: #16a34a;
}

.home-health-card.info,
.home-alert-row.info {
    border-left-color: #2563eb;
}

.home-health-card.warn,
.home-alert-row.warn {
    border-left-color: #d97706;
}

.home-health-card.danger,
.home-alert-row.danger {
    border-left-color: #dc2626;
}

.home-shift-layout {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 12px;
    align-items: start;
}

.home-alerts-panel,
.home-shift-panel {
    min-height: 280px;
    padding: 14px;
}

.home-alerts-panel h4,
.home-shift-panel h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-alerts-panel h4 svg,
.home-shift-panel h4 svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.home-alert-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.home-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 76px;
    padding: 12px;
    border-left-width: 4px;
}

.home-alert-row > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.home-alert-row strong {
    color: var(--text);
    font-weight: 900;
}

.home-shift-report {
    min-height: 360px;
    max-height: 520px;
    overflow: auto;
    margin: 0;
    padding: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg) 72%, var(--card));
    color: var(--text);
    font: 800 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body[data-theme="light"] .cards-list {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body[data-theme="light"] .home-kpi,
body[data-theme="light"] .home-priority,
body[data-theme="light"] .home-shortcut,
body[data-theme="light"] .home-base-item,
body[data-theme="light"] .home-sla-card,
body[data-theme="light"] .home-gargalo-row,
body[data-theme="light"] .home-rua-card,
body[data-theme="light"] .home-timeline-item,
body[data-theme="light"] .home-action-card,
body[data-theme="light"] .home-forecast-card,
body[data-theme="light"] .home-forecast-block,
body[data-theme="light"] .home-forecast-row,
body[data-theme="light"] .home-health-card,
body[data-theme="light"] .home-alerts-panel,
body[data-theme="light"] .home-shift-panel,
body[data-theme="light"] .home-alert-row {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

body[data-theme="light"] .home-shift-report {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body[data-theme="light"] .home-select {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.farol-estoque-virtual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.farol-estoque-virtual-row {
    min-height: 58px;
}

.farol-estoque-virtual-row > div {
    min-width: 0;
}

.empty-state.compact {
    min-height: 140px;
}

.wms-hidden-dashboard-search {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.dashboard-head h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-head h2 svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: var(--primary);
}

#dashUsuario .count-chart-panel,
#dashProdutos .count-chart-panel {
    min-height: 660px;
}

#dashUsuario .count-chart-panel canvas,
#dashProdutos .count-chart-panel canvas {
    height: 540px !important;
    max-height: none !important;
}

@media (min-width: 1181px) {
    .sidebar {
        z-index: 1200 !important;
    }

    body.authenticated:not(.sidebar-collapsed) #topbar,
    body.authenticated:not(.sidebar-collapsed) .sidebar.active ~ .topbar {
        left: var(--wms-sidebar-width) !important;
        width: calc(100% - var(--wms-sidebar-width)) !important;
    }

    body.authenticated:not(.sidebar-collapsed) #topbar .topbar-inner {
        padding-left: 18px !important;
    }

    body.authenticated:not(.sidebar-collapsed) .main,
    body.authenticated:not(.sidebar-collapsed) .sidebar.active ~ .main {
        margin-left: var(--wms-sidebar-width) !important;
        width: calc(100% - var(--wms-sidebar-width)) !important;
        padding-left: 22px !important;
        padding-right: 22px !important;
    }

    body.authenticated #overlay,
    body.authenticated #overlay.active {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        background: transparent !important;
    }
}

.wms-model-screen {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--card) 94%, white 3%), color-mix(in srgb, var(--card-2) 94%, black 3%));
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    border-radius: 8px;
    box-shadow: 0 18px 42px color-mix(in srgb, black 18%, transparent);
}

.wms-model-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.wms-model-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

.wms-model-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.wms-user-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card) 90%, transparent);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.wms-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 0;
}

.wms-card-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18px;
}

.wms-card-head h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.wms-user-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.wms-user-metric {
    display: grid;
    gap: 7px;
    min-height: 142px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-2) 76%, transparent);
}

.wms-user-metric svg {
    width: 28px;
    height: 28px;
}

.wms-user-metric span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wms-user-metric strong {
    font-size: 30px;
    line-height: 1;
    color: var(--text);
}

.wms-user-metric em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.wms-user-metric.blue {
    border-color: color-mix(in srgb, #3b82f6 28%, var(--border));
    background: color-mix(in srgb, #3b82f6 10%, var(--card));
}

.wms-user-metric.green {
    border-color: color-mix(in srgb, #22c55e 28%, var(--border));
    background: color-mix(in srgb, #22c55e 10%, var(--card));
}

.wms-user-metric.purple {
    border-color: color-mix(in srgb, #a855f7 28%, var(--border));
    background: color-mix(in srgb, #a855f7 10%, var(--card));
}

.wms-user-metric.blue svg { color: #3b82f6; }
.wms-user-metric.green svg { color: #22c55e; }
.wms-user-metric.purple svg { color: #a855f7; }

.wms-user-ranking {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.wms-user-rank-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 240px) auto;
    align-items: center;
    gap: 14px;
    padding: 13px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.wms-user-rank-row:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 12%, transparent);
}

.wms-user-rank-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.wms-user-position {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 14%, var(--card));
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.wms-user-rank-text {
    min-width: 0;
}

.wms-user-rank-text strong,
.wms-user-rank-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wms-user-rank-text span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.wms-user-rank-progress {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: color-mix(in srgb, var(--card-2) 76%, black 6%);
}

.wms-user-rank-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--success));
}

.wms-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.wms-status-pill.success {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 36%, var(--border));
    background: color-mix(in srgb, var(--success) 12%, transparent);
}

.wms-status-pill.warning {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 42%, var(--border));
    background: color-mix(in srgb, var(--warning) 13%, transparent);
}

.wms-status-pill.pending {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 36%, var(--border));
    background: color-mix(in srgb, var(--danger) 10%, transparent);
}

body.authenticated .card-container:not(.wms-figma-dashboard):not(.wms-model-screen) {
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--card) 94%, transparent), color-mix(in srgb, var(--card-2) 92%, transparent));
}

body.authenticated .dashboard-head,
body.authenticated .consumo-plain-head,
body.authenticated .section-box > h3:first-child {
    border-radius: 8px;
}

body.authenticated .table-wrap,
body.authenticated .chart-box,
body.authenticated .consumo-panel,
body.authenticated .summary-box,
body.authenticated .selector-list {
    border-radius: 8px;
}

@media (max-width: 1180px) {
    :root {
        --wms-sidebar-width: 0px;
    }

    .topbar-brand {
        min-width: 0;
    }

    .topbar-logo {
        width: 96px;
        height: 44px;
        flex-basis: 96px;
    }

    .topbar-context-filters {
        width: 100%;
        order: 3;
    }

    .wms-model-head,
    .wms-card-head {
        flex-direction: column;
    }

    .wms-user-metrics,
    .wms-user-rank-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .sidebar-menu-filters {
        grid-template-columns: 1fr 1fr;
    }

    .wms-model-actions {
        width: 100%;
        justify-content: stretch;
    }

    .wms-model-actions .btn-acao {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .wms-user-metrics {
        padding: 14px;
    }

    .wms-user-ranking {
        padding: 0 14px 14px;
    }
}

/* Ajustes 2026-05-20 - Monnarka, FEFO e cards claros */
body.authenticated #topbar {
    min-height: 59px !important;
    padding: 3px 22px !important;
}

body.authenticated #topbar .topbar-inner {
    height: 55px !important;
    gap: 12px !important;
}

body.authenticated .main {
    padding-top: 83px !important;
}

.topbar-brand {
    min-width: 468px !important;
}

.topbar-logo {
    width: 444px !important;
    height: 174px !important;
    flex: 0 0 444px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.login-brand-logo {
    display: block;
    width: 260px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 22px;
}

body[data-theme="light"] #gestao .mini-card,
body[data-theme="light"] #dashIdsAbertos .mini-card,
body[data-theme="light"] #direcionamento .mini-card,
body[data-theme="light"] #idsEncerrados .mini-card,
body[data-theme="light"] #relatorioPedidosContagem .mini-card,
body[data-theme="light"] #listaIdsEncerrados .mini-card,
body[data-theme="light"] #gestaoEnderecos .selector-item {
    background: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] #gestao #listaInventarios.cards-list,
body[data-theme="light"] #direcionamento #listaDirecionamentos.cards-list,
body[data-theme="light"] #idsEncerrados #listaIdsEncerrados.cards-list {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body[data-theme="light"] #gestao .mini-card .muted,
body[data-theme="light"] #dashIdsAbertos .mini-card .muted,
body[data-theme="light"] #direcionamento .mini-card .muted,
body[data-theme="light"] #idsEncerrados .mini-card .muted,
body[data-theme="light"] #relatorioPedidosContagem .mini-card .muted,
body[data-theme="light"] #listaIdsEncerrados .mini-card .muted,
body[data-theme="light"] #gestaoEnderecos .selector-item .meta {
    color: #475569 !important;
}

@media (max-width: 1280px) {
    .home-sla-grid,
    .home-forecast-grid,
    .home-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-rua-map {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    }

    .home-forecast-layout,
    .home-shift-layout {
        grid-template-columns: 1fr;
    }
}

#farolFefo .kpis {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

#farolFefo .kpi {
    min-height: 126px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
}

#farolFefo .kpi .n {
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 900;
}

#farolFefo .section-box h3 {
    font-size: 18px !important;
    font-weight: 900 !important;
}

#embFarol .consumo-title h2 {
    font-size: clamp(28px, 3vw, 46px) !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}

#embFarol .consumo-title p,
#embFarol .consumo-panel h3,
#embFarol .consumo-table-card h3 {
    font-size: 16px !important;
    font-weight: 850 !important;
    color: #111827 !important;
}

#embFarol .consumo-kpi strong {
    font-size: clamp(32px, 3.4vw, 52px) !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}

#embFarol .consumo-kpi p,
#embFarol .consumo-kpi small,
#embFarol .consumo-panel,
#embFarol .consumo-table-card,
#embFarol table,
#embFarol th,
#embFarol td {
    color: #111827 !important;
}

#embFarol th {
    font-size: 13px !important;
    font-weight: 900 !important;
}

#embFarol td {
    font-size: 14px !important;
    font-weight: 700 !important;
}

body[data-theme="dark"] #embFarol .consumo-title h2,
body[data-theme="dark"] #embFarol .consumo-title p {
    color: #f8fafc !important;
}

body[data-theme="dark"] #menu-emb-farol,
body[data-theme="dark"] #menu-emb-farol span,
body[data-theme="dark"] #menu-emb-farol svg {
    color: var(--text-soft) !important;
}

body[data-theme="dark"] #menu-emb-farol:hover,
body[data-theme="dark"] #menu-emb-farol.active,
body[data-theme="dark"] #menu-emb-farol:hover span,
body[data-theme="dark"] #menu-emb-farol.active span,
body[data-theme="dark"] #menu-emb-farol:hover svg,
body[data-theme="dark"] #menu-emb-farol.active svg {
    color: var(--text) !important;
}

body[data-theme="dark"] #embFarol .consumo-panel h3,
body[data-theme="dark"] #embFarol .consumo-table-card h3,
body[data-theme="dark"] #embFarol .consumo-kpi strong,
body[data-theme="dark"] #embFarol .consumo-panel,
body[data-theme="dark"] #embFarol .consumo-table-card,
body[data-theme="dark"] #embFarol table,
body[data-theme="dark"] #embFarol th,
body[data-theme="dark"] #embFarol td {
    color: var(--text) !important;
}

body[data-theme="dark"] #embFarol .consumo-kpi p,
body[data-theme="dark"] #embFarol .consumo-kpi small {
    color: var(--text-soft) !important;
}

.auditoria-screen .dashboard-head {
    align-items: flex-start;
}

.auditoria-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.auditoria-kpis {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    margin-bottom: 18px;
}

.auditoria-kpi.danger {
    border-color: rgba(239, 68, 68, 0.35);
}

.auditoria-kpi.warn {
    border-color: rgba(245, 158, 11, 0.35);
}

.auditoria-kpi.success,
.auditoria-kpi.ok {
    border-color: rgba(16, 185, 129, 0.35);
}

.auditoria-insights {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 1fr) minmax(260px, 0.95fr);
    margin-bottom: 18px;
}

.auditoria-insights .section-box {
    margin: 0;
}

.auditoria-insights h3 {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.auditoria-wide-panel {
    grid-column: 1 / -1;
}

.auditoria-risk-body {
    display: grid;
    gap: 14px;
}

.auditoria-risk-score {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.auditoria-risk-score.ok {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.28);
}

.auditoria-risk-score.warn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.auditoria-risk-score.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.auditoria-risk-score span,
.auditoria-risk-score small,
.auditoria-risk-facts span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auditoria-risk-score strong {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text) !important;
    font-size: 44px;
    line-height: 1;
    padding: 0 !important;
}

.auditoria-risk-facts {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auditoria-risk-facts div {
    background: rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
}

.auditoria-risk-facts strong {
    color: var(--text);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auditoria-risk-body p {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.auditoria-timeline {
    display: grid;
    gap: 10px;
}

.auditoria-timeline-item {
    display: grid;
    gap: 10px;
    grid-template-columns: 12px 1fr;
}

.auditoria-dot {
    border-radius: 999px;
    height: 10px;
    margin-top: 4px;
    width: 10px;
}

.auditoria-timeline-item.danger .auditoria-dot {
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.16);
}

.auditoria-timeline-item.warn .auditoria-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

.auditoria-timeline-item.ok .auditoria-dot {
    background: #10b981;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.16);
}

.auditoria-timeline-item strong,
.auditoria-bar-head strong {
    color: var(--text);
    display: block;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.auditoria-timeline-item small,
.auditoria-timeline-item p {
    color: var(--text-soft);
    display: block;
    font-size: 12px;
    margin: 3px 0 0;
}

.auditoria-bars {
    display: grid;
    gap: 12px;
}

.auditoria-bar-row {
    display: grid;
    gap: 6px;
}

.auditoria-bar-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.auditoria-bar-head span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.auditoria-bar-track {
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.auditoria-bar-track span {
    background: linear-gradient(90deg, var(--accent), #22d3ee);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.auditoria-risk-pill {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 9px;
    text-transform: uppercase;
}

.auditoria-risk-pill.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.34);
    color: #fecaca;
}

.auditoria-risk-pill.warn {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.34);
    color: #fde68a;
}

.auditoria-risk-pill.ok {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.34);
    color: #bbf7d0;
}

.auditoria-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.auditoria-filters .search-bar {
    flex: 1 1 340px;
    margin: 0;
}

.auditoria-filters select {
    flex: 1 1 150px;
    min-height: 44px;
}

.auditoria-table table {
    min-width: 1250px;
}

.auditoria-table td {
    vertical-align: top;
}

.auditoria-table .mono {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 12px;
    white-space: nowrap;
}

.auditoria-compare {
    margin-top: 22px;
}

.auditoria-compare h3 {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.auditoria-compare .inline-note {
    margin: 10px 0 14px;
}

body[data-theme="light"] .auditoria-filters,
body[data-theme="light"] .auditoria-compare,
body[data-theme="light"] .auditoria-insights .section-box {
    background: #ffffff !important;
}

body[data-theme="light"] .auditoria-risk-facts div {
    background: #f8fafc;
}

body[data-theme="light"] .auditoria-risk-pill.danger {
    color: #991b1b;
}

body[data-theme="light"] .auditoria-risk-pill.warn {
    color: #92400e;
}

body[data-theme="light"] .auditoria-risk-pill.ok {
    color: #047857;
}

.roi-screen .dashboard-head {
    align-items: flex-start;
}

.roi-actions,
.roi-config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.roi-config-panel {
    margin-bottom: 18px;
}

.roi-config-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.roi-config-head h3,
.roi-card h3 {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.roi-config-head select {
    min-height: 44px;
    min-width: 180px;
}

.roi-config-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-bottom: 14px;
}

.roi-config-grid label {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    text-transform: uppercase;
}

.roi-config-grid input {
    min-height: 42px;
}

.roi-kpis {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.roi-kpi.success {
    border-color: color-mix(in srgb, var(--success) 38%, var(--border));
}

.roi-kpi.info {
    border-color: color-mix(in srgb, var(--info) 34%, var(--border));
}

.roi-kpi.warn {
    border-color: color-mix(in srgb, var(--warning) 34%, var(--border));
}

.roi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 16px;
}

.roi-card {
    min-height: 260px;
}

.roi-bars {
    display: grid;
    gap: 14px;
}

.roi-bar-row {
    display: grid;
    gap: 8px;
}

.roi-bar-row > div,
.roi-top-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.roi-bar-row span,
.roi-top-row span,
.roi-fact span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.roi-bar-row strong,
.roi-top-row em {
    color: var(--text);
    font-style: normal;
    font-weight: 900;
}

.roi-bar-row i,
.roi-top-row i {
    background: var(--primary);
    border-radius: 999px;
    display: block;
    height: 10px;
    min-width: 18px;
}

.roi-bar-row.success i {
    background: var(--success);
}

.roi-bar-row.warn i {
    background: var(--warning);
}

.roi-bar-row.danger i {
    background: var(--danger);
}

.roi-narrativa {
    display: grid;
    gap: 10px;
}

.roi-note {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
    line-height: 1.45;
    padding: 12px;
}

.roi-facts {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roi-fact {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 12px;
}

.roi-fact strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.roi-top-list {
    display: grid;
    gap: 12px;
}

.roi-top-row {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.roi-top-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.roi-top-row > div {
    display: grid;
    flex: 1;
    gap: 5px;
}

.roi-table table {
    min-width: 1050px;
}

body[data-theme="light"] .roi-config-panel,
body[data-theme="light"] .roi-card {
    background: #ffffff !important;
}

.executivo-actions,
.executivo-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.executivo-toolbar {
    justify-content: space-between;
    margin-bottom: 16px;
}

.executivo-toolbar label {
    color: var(--muted);
    display: grid;
    flex: 1 1 220px;
    font-size: 11px;
    font-weight: 900;
    gap: 7px;
    letter-spacing: .06em;
    max-width: 280px;
    text-transform: uppercase;
}

.executivo-toolbar select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    min-height: 42px;
    padding: 0 12px;
}

.executivo-hero {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    margin-bottom: 16px;
}

.executivo-score-card {
    align-content: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 175px;
    padding: 18px;
    text-align: center;
}

.executivo-score-card span,
.executivo-stock-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.executivo-score-card strong {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text);
    font-size: clamp(52px, 6vw, 82px);
    font-weight: 950;
    line-height: .9;
    padding: 0 !important;
}

.executivo-score-card strong.success {
    color: var(--success);
}

.executivo-score-card strong.warn {
    color: var(--warning);
}

.executivo-score-card strong.danger {
    color: var(--danger);
}

.executivo-score-card small {
    color: var(--text-soft);
    font-weight: 800;
}

.executivo-narrativa,
.executivo-list {
    display: grid;
    gap: 10px;
}

.executivo-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.executivo-panel h3 {
    align-items: center;
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
}

.executivo-item {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.executivo-item strong {
    color: var(--text);
    font-weight: 900;
}

.executivo-item span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.executivo-item.success {
    border-left-color: var(--success);
}

.executivo-item.warn {
    border-left-color: var(--warning);
}

.executivo-item.danger {
    border-left-color: var(--danger);
}

.executivo-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.executivo-kpi.success {
    border-color: rgba(16, 185, 129, 0.34);
}

.executivo-kpi.warn {
    border-color: rgba(245, 158, 11, 0.34);
}

.executivo-kpi.danger {
    border-color: rgba(239, 68, 68, 0.34);
}

.executivo-stock-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.executivo-stock-card {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 7px;
    padding: 12px;
}

.executivo-stock-card strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.executivo-table table {
    min-width: 1080px;
}

body[data-theme="light"] .executivo-toolbar,
body[data-theme="light"] .executivo-hero,
body[data-theme="light"] .executivo-panel {
    background: #ffffff !important;
}

.system-health-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.system-health-hero {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    margin-bottom: 16px;
}

.system-health-score {
    align-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(20, 184, 166, 0.12));
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 165px;
    padding: 18px;
    text-align: center;
}

.system-health-score span,
.system-health-fact span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.system-health-score strong {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text);
    font-size: clamp(52px, 6vw, 76px);
    font-weight: 950;
    line-height: .9;
    padding: 0 !important;
}

.system-health-score strong.success,
.system-health-pill.success {
    color: var(--success);
}

.system-health-score strong.warn,
.system-health-pill.warn {
    color: var(--warning);
}

.system-health-score strong.danger,
.system-health-pill.danger {
    color: var(--danger);
}

.system-health-score small {
    color: var(--text-soft);
    font-weight: 800;
}

.system-health-summary,
.system-health-checks,
.system-health-recommendations {
    display: grid;
    gap: 10px;
}

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

.system-health-check,
.system-health-recommendation {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.system-health-check span,
.system-health-recommendation span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.system-health-check strong,
.system-health-recommendation strong {
    color: var(--text);
    font-weight: 900;
}

.system-health-check.success,
.system-health-recommendation.success {
    border-left-color: var(--success);
}

.system-health-check.warn,
.system-health-recommendation.warn,
.system-health-recommendation.info {
    border-left-color: var(--warning);
}

.system-health-check.danger,
.system-health-recommendation.critical {
    border-left-color: var(--danger);
}

.system-health-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 16px;
}

.system-health-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.system-health-panel h3 {
    align-items: center;
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
}

.system-health-facts {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-health-fact {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 12px;
}

.system-health-fact strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.system-health-fact small {
    color: var(--text-soft);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.system-health-table table {
    min-width: 980px;
}

.system-health-table small {
    color: var(--muted);
    font-weight: 700;
}

.system-health-pill {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 9px;
}

body[data-theme="light"] .system-health-hero,
body[data-theme="light"] .system-health-panel {
    background: #ffffff !important;
}

.backup-system-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.backup-system-hero {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1.55fr);
    margin-bottom: 16px;
}

.backup-system-score {
    align-items: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(20, 184, 166, 0.34);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 148px;
    padding: 20px;
    text-align: center;
}

.backup-system-score span,
.backup-system-fact span,
.backup-system-check span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.backup-system-score strong {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--primary);
    font-size: 52px;
    font-weight: 950;
    line-height: 1;
    padding: 0 !important;
}

.backup-system-score strong.success {
    color: var(--success);
}

.backup-system-score strong.warn {
    color: var(--warning);
}

.backup-system-score strong.danger {
    color: var(--danger);
}

.backup-system-score small {
    color: var(--muted);
    font-weight: 800;
}

.backup-system-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backup-system-fact,
.backup-system-check {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 7px;
    padding: 14px;
}

.backup-system-fact strong,
.backup-system-check strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.backup-system-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.backup-system-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    margin-bottom: 16px;
}

.backup-system-panel h3 {
    align-items: center;
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
}

.backup-system-modules {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backup-system-modules label {
    align-items: center;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    display: flex;
    font-weight: 800;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
}

.backup-system-modules input {
    accent-color: var(--primary);
    height: 16px;
    width: 16px;
}

.backup-system-checklist {
    display: grid;
    gap: 10px;
}

.backup-system-table table {
    min-width: 980px;
}

.backup-system-table small {
    color: var(--muted);
    font-weight: 700;
}

.backup-system-pill {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 9px;
}

.backup-system-fact.success,
.backup-system-check.success,
.backup-system-pill.success {
    border-color: rgba(16, 185, 129, 0.38);
    color: #10b981;
}

.backup-system-fact.warn,
.backup-system-check.warn,
.backup-system-pill.warn {
    border-color: rgba(245, 158, 11, 0.45);
    color: #f59e0b;
}

.backup-system-fact.danger,
.backup-system-check.danger,
.backup-system-pill.danger {
    border-color: rgba(239, 68, 68, 0.45);
    color: #ef4444;
}

body[data-theme="light"] .backup-system-hero,
body[data-theme="light"] .backup-system-panel {
    background: #ffffff !important;
}

.data-quality-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.data-quality-hero {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    margin-bottom: 16px;
}

.data-quality-score {
    align-content: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(14, 165, 233, 0.12));
    border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 165px;
    padding: 18px;
    text-align: center;
}

.data-quality-score span,
.data-quality-summary-item span,
.data-quality-area-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.data-quality-score strong {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text);
    font-size: clamp(52px, 6vw, 76px);
    font-weight: 950;
    line-height: .9;
    padding: 0 !important;
}

.data-quality-score strong.success { color: var(--success); }
.data-quality-score strong.info { color: var(--info); }
.data-quality-score strong.warn { color: var(--warning); }
.data-quality-score strong.danger { color: var(--danger); }

.data-quality-score small {
    color: var(--text-soft);
    font-weight: 800;
}

.data-quality-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-quality-summary-item,
.data-quality-area-card,
.data-quality-guide div {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 13px;
}

.data-quality-summary-item strong,
.data-quality-area-card strong {
    color: var(--text);
    font-size: 19px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.data-quality-summary-item.success,
.data-quality-area-card.success { border-color: rgba(16, 185, 129, 0.38); }
.data-quality-summary-item.info,
.data-quality-area-card.info { border-color: rgba(59, 130, 246, 0.38); }
.data-quality-summary-item.warn,
.data-quality-area-card.warn { border-color: rgba(245, 158, 11, 0.45); }
.data-quality-summary-item.danger,
.data-quality-area-card.danger { border-color: rgba(239, 68, 68, 0.45); }

.data-quality-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 16px;
}

.data-quality-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    margin-bottom: 16px;
}

.data-quality-panel h3,
.data-quality-table-head h3 {
    align-items: center;
    display: flex;
    gap: 9px;
    margin: 0;
}

.data-quality-areas {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-quality-area-card small {
    color: var(--text-soft);
    font-weight: 800;
}

.data-quality-guide {
    display: grid;
    gap: 10px;
}

.data-quality-guide div {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
}

.data-quality-guide strong {
    align-items: center;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-weight: 950;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.data-quality-guide span {
    color: var(--text);
    font-weight: 800;
}

.data-quality-table-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.data-quality-table-head select {
    max-width: 180px;
}

.data-quality-table table {
    min-width: 1120px;
}

.data-quality-table small {
    color: var(--muted);
    font-weight: 700;
}

.data-quality-pill {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 9px;
}

.data-quality-pill.danger { border-color: rgba(239, 68, 68, 0.45); color: var(--danger); }
.data-quality-pill.warn { border-color: rgba(245, 158, 11, 0.45); color: var(--warning); }
.data-quality-pill.info { border-color: rgba(59, 130, 246, 0.38); color: var(--info); }

.data-quality-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 360px;
}

.data-quality-samples span {
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    max-width: 170px;
    overflow: hidden;
    padding: 4px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-theme="light"] .data-quality-hero,
body[data-theme="light"] .data-quality-panel {
    background: #ffffff !important;
}

@media print {
    .sidebar,
    #topbar,
    #menu-toggle,
    #overlay,
    .executivo-actions,
    .executivo-toolbar {
        display: none !important;
    }

    body,
    body.authenticated .main {
        background: #ffffff !important;
        color: #0f172a !important;
        padding: 0 !important;
    }

    .card-container {
        box-shadow: none !important;
        display: none !important;
        max-width: none !important;
        padding: 0 !important;
    }

    #relatorioExecutivo {
        display: block !important;
    }
}

@media (max-width: 1180px) {
    body.authenticated #topbar {
        min-height: 39px !important;
    }

    body.authenticated #topbar .topbar-inner {
        height: 32px !important;
    }

    body.authenticated .main {
        padding-top: 69px !important;
    }

    .topbar-brand {
        min-width: 210px !important;
    }

    .topbar-logo {
        width: 200px !important;
        height: 82px !important;
        flex-basis: 200px !important;
    }
}

@media (max-width: 760px) {
    body.authenticated #topbar {
        min-height: 43px !important;
    }

    body.authenticated #topbar .topbar-inner {
        height: auto !important;
        gap: 8px !important;
    }

    body.authenticated .main {
        padding-top: 75px !important;
    }

    .topbar-logo {
        width: 148px !important;
        height: 58px !important;
        flex-basis: 148px !important;
    }

    #farolFefo .kpis {
        grid-template-columns: 1fr;
    }

    .farol-estoque-kpis,
    .farol-estoque-grid {
        grid-template-columns: 1fr;
    }

    .farol-estoque-card {
        grid-column: auto;
        min-height: 320px;
    }

    .farol-estoque-sem-saldo-card {
        margin-top: 0;
    }

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

    .farol-estoque-virtual {
        grid-template-columns: 1fr;
    }

    .home-actions {
        justify-content: stretch;
    }

    .home-actions .btn-acao,
    .home-shortcuts {
        width: 100%;
    }

    .home-kpis,
    .home-grid,
    .home-shortcuts,
    .home-base-grid,
    .home-sla-grid,
    .home-rua-map,
    .home-forecast-grid,
    .home-forecast-layout,
    .home-health-grid,
    .home-shift-layout {
        grid-template-columns: 1fr;
    }

    .home-panel-title-row,
    .home-gargalo-row,
    .home-rua-top,
    .home-rua-foot,
    .home-action-card,
    .home-inline-controls,
    .home-forecast-row,
    .home-alert-row {
        align-items: stretch;
        flex-direction: column;
    }

    .home-select,
    .home-inline-controls .btn-acao,
    .home-action-card .btn-acao,
    .home-alert-row .btn-acao {
        width: 100%;
        max-width: none;
    }

    .home-action-grid {
        grid-template-columns: 1fr;
    }

    .auditoria-kpis,
    .auditoria-filters,
    .auditoria-insights,
    .auditoria-risk-facts,
    .roi-kpis,
    .roi-grid,
    .roi-config-grid,
    .executivo-kpis,
    .executivo-grid,
    .executivo-hero,
    .executivo-stock-grid,
    .system-health-kpis,
    .system-health-grid,
    .system-health-hero,
    .system-health-summary,
    .system-health-facts,
    .backup-system-kpis,
    .backup-system-grid,
    .backup-system-hero,
    .backup-system-summary,
    .backup-system-modules,
    .data-quality-kpis,
    .data-quality-grid,
    .data-quality-hero,
    .data-quality-summary,
    .data-quality-areas {
        grid-template-columns: 1fr !important;
    }

    .roi-config-head,
    .roi-actions,
    .roi-config-actions,
    .auditoria-actions,
    .executivo-actions,
    .executivo-toolbar,
    .system-health-actions,
    .backup-system-actions,
    .data-quality-actions,
    .data-quality-table-head {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-center-overlay {
        padding: 64px 12px 12px;
    }

    .notification-center-panel {
        max-height: calc(100vh - 76px);
        width: calc(100vw - 24px);
    }

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

    .notification-item,
    .notification-center-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .executivo-toolbar label {
        max-width: none;
        width: 100%;
    }

    .home-forecast-metric {
        justify-items: start;
    }

    #menu-toggle {
        top: 10px !important;
        width: 40px !important;
        height: 40px !important;
    }
}
