@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #101827;
    --bg-secondary: #1f2937;
    --bg-card: #273548;
    --sidebar-bg: rgba(10,14,28,0.92);
    --accent-a: rgba(59,130,246,0.18);
    --accent-b: rgba(0,255,179,0.12);
    --hero-a: rgba(59,130,246,0.18);
    --hero-b: rgba(0,255,179,0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --field-text: #ffffff;
    --button-text: #ffffff;
    --sidebar-text: #ffffff;
    --border-color: rgba(255,255,255,0.08);
    --success: #00ffb3;
    --danger: #ff4d6d;
    --warning: #ffb703;
    --info: #3b82f6;
    --shadow-card: 0 0 0 1px rgba(255,255,255,0.03), 0 10px 30px rgba(0,0,0,0.45);
    --brand: #00d5ff;
    --brand-strong: #2563ff;
    --brand-rgb: 0,213,255;
    --brand-strong-rgb: 37,99,255;
    --panel-a-rgb: 8,27,55;
    --panel-b-rgb: 3,13,31;
    --sidebar-a-rgb: 2,10,24;
    --sidebar-b-rgb: 3,18,39;
}

:root[data-theme="light"] {
    --bg-primary: #d8e2ee;
    --bg-secondary: #c6d3e2;
    --bg-card: #edf3f9;
    --sidebar-bg: rgba(15,23,42,0.96);
    --accent-a: rgba(37,99,235,0.10);
    --accent-b: rgba(20,184,166,0.09);
    --hero-a: rgba(37,99,235,0.10);
    --hero-b: rgba(20,184,166,0.08);
    --text-primary: #172033;
    --text-secondary: #536176;
    --field-text: #172033;
    --button-text: #ffffff;
    --sidebar-text: #ffffff;
    --border-color: rgba(15,23,42,0.16);
    --success: #059669;
    --danger: #dc2626;
    --warning: #b45309;
    --info: #2563eb;
    --shadow-card: 0 0 0 1px rgba(15,23,42,0.05), 0 10px 24px rgba(15,23,42,0.10);
    --brand: #2563eb;
    --brand-strong: #14b8a6;
    --brand-rgb: 37,99,235;
    --brand-strong-rgb: 20,184,166;
    --panel-a-rgb: 237,243,249;
    --panel-b-rgb: 222,231,241;
    --sidebar-a-rgb: 15,23,42;
    --sidebar-b-rgb: 30,41,59;
}

:root[data-theme="emerald"] {
    --bg-primary: #071b18;
    --bg-secondary: #11352f;
    --bg-card: #183d36;
    --sidebar-bg: rgba(5,21,18,0.94);
    --accent-a: rgba(16,185,129,0.22);
    --accent-b: rgba(245,158,11,0.12);
    --hero-a: rgba(16,185,129,0.18);
    --hero-b: rgba(245,158,11,0.10);
    --text-primary: #f8fffc;
    --text-secondary: #a8c7bd;
    --field-text: #f8fffc;
    --button-text: #ffffff;
    --sidebar-text: #ffffff;
    --border-color: rgba(255,255,255,0.09);
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --info: #38bdf8;
    --brand: #34d399;
    --brand-strong: #fbbf24;
    --brand-rgb: 52,211,153;
    --brand-strong-rgb: 251,191,36;
    --panel-a-rgb: 24,61,54;
    --panel-b-rgb: 10,37,33;
    --sidebar-a-rgb: 5,21,18;
    --sidebar-b-rgb: 9,36,31;
}

:root[data-theme="graphite"] {
    --bg-primary: #0f1115;
    --bg-secondary: #1b1f27;
    --bg-card: #242936;
    --sidebar-bg: rgba(8,10,14,0.94);
    --accent-a: rgba(148,163,184,0.16);
    --accent-b: rgba(96,165,250,0.10);
    --hero-a: rgba(148,163,184,0.14);
    --hero-b: rgba(96,165,250,0.10);
    --text-primary: #f8fafc;
    --text-secondary: #a6adbb;
    --field-text: #f8fafc;
    --button-text: #ffffff;
    --sidebar-text: #ffffff;
    --border-color: rgba(255,255,255,0.08);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #eab308;
    --info: #93c5fd;
    --brand: #94a3b8;
    --brand-strong: #60a5fa;
    --brand-rgb: 148,163,184;
    --brand-strong-rgb: 96,165,250;
    --panel-a-rgb: 36,41,54;
    --panel-b-rgb: 20,24,32;
    --sidebar-a-rgb: 8,10,14;
    --sidebar-b-rgb: 24,28,36;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: radial-gradient(circle at top left, var(--hero-a), transparent 30%),
                radial-gradient(circle at bottom right, var(--hero-b), transparent 30%),
                var(--bg-primary);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.dashboard-container { display: flex; align-items: flex-start; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 20px;
    width: 282px;
    min-height: calc(100vh - 40px);
    margin: 20px 0 20px 20px;
    background:
        linear-gradient(180deg, rgba(var(--sidebar-a-rgb),0.96), rgba(var(--sidebar-b-rgb),0.96)),
        var(--sidebar-bg);
    border: 1px solid rgba(var(--brand-rgb),0.20);
    border-radius: 18px;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--sidebar-text);
    box-shadow: 0 20px 44px rgba(0,0,0,0.34), inset 0 0 0 1px rgba(255,255,255,0.02);
}
.sidebar-top {
    padding: 0 2px 10px;
    border: none;
    background: transparent;
}
.logo-area { display: flex; align-items: center; gap: 14px; margin-bottom: 0; }
.logo-circle {
    width: 52px; height: 52px; border-radius: 15px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb),0.95), rgba(var(--brand-strong-rgb),0.68));
    display: flex; align-items: center; justify-content: center; font-size: 23px;
    box-shadow: 0 14px 30px rgba(var(--brand-rgb),0.22);
}
.mini-title, .card-mini-title, .kpi-label {
    color: var(--text-secondary); font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.logo-text h1 { font-size: 21px; font-weight: 800; line-height: 1.1; }
.sidebar-menu { display: flex; flex-direction: column; gap: 10px; }
.sidebar-menu a {
    position: relative;
    min-height: 50px;
    padding: 13px 14px 13px 16px; border-radius: 13px; display: flex; align-items: center; gap: 14px;
    transition: 0.25s ease; font-size: 14px; font-weight: 700; border: 1px solid transparent;
    color: rgba(255,255,255,0.76);
}
.sidebar-menu a i {
    width: 24px;
    font-size: 16px;
    color: rgba(226,232,240,0.82);
    transition: 0.25s ease;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(var(--brand-rgb),0.34), rgba(var(--brand-strong-rgb),0.24));
    border-color: rgba(var(--brand-rgb),0.16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 12px 22px rgba(8,145,178,0.10);
}
.sidebar-menu a.active::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 14px var(--brand);
}
.sidebar-menu a.active::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 10px var(--brand);
}
.sidebar-menu a:hover i, .sidebar-menu a.active i { color: var(--brand); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.support-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(var(--brand-rgb),0.16);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb),0.10), rgba(var(--sidebar-b-rgb),0.42));
}
.support-details {
    display: block;
}
.support-details summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.support-details summary::-webkit-details-marker { display: none; }
.support-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    color: var(--brand);
    background: rgba(var(--brand-rgb),0.13);
}
.support-card .support-chevron {
    width: 24px;
    height: 24px;
    font-size: 11px;
    border-radius: 8px;
    color: rgba(226,232,240,0.72);
    background: rgba(255,255,255,0.05);
    transition: 0.2s ease;
}
.support-details[open] .support-chevron {
    transform: rotate(180deg);
    color: var(--brand);
}
.support-card strong { display: block; font-size: 13px; }
.support-card span { display: block; color: rgba(226,232,240,0.66); font-size: 12px; margin-top: 3px; line-height: 1.35; }
.support-contact {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.support-contact a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.86);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.support-contact a i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 11px;
}
.sidebar-version {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(226,232,240,0.52);
    font-size: 11px;
    padding: 0 4px;
}
.sidebar-version small { color: rgba(226,232,240,0.42); }
.main-content { flex: 1; padding: 20px clamp(18px, 2vw, 34px) clamp(18px, 2vw, 34px); min-width: 0; max-width: 100%; overflow-x: hidden; }
.topbar {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 102px;
    margin-bottom: 18px;
    gap: 18px;
    padding: 22px 26px;
    border-radius: 16px;
    border: 1px solid rgba(var(--brand-rgb),0.18);
    background:
        linear-gradient(100deg, rgba(var(--panel-b-rgb),0.96), rgba(var(--panel-a-rgb),0.88)),
        radial-gradient(circle at 85% 40%, rgba(var(--brand-rgb),0.18), transparent 30%);
    box-shadow: var(--shadow-card);
}
.topbar::after {
    content: "";
    position: absolute;
    right: -8%;
    bottom: 22px;
    width: 58%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb),0.60), transparent);
    box-shadow: 0 -18px 0 rgba(var(--brand-strong-rgb),0.15), 0 16px 0 rgba(var(--brand-rgb),0.16);
    transform: skewY(-8deg);
}
.page-tag {
    display: inline-flex; padding: 8px 14px; border-radius: 999px;
    background: rgba(var(--brand-rgb),0.15); border: 1px solid rgba(var(--brand-rgb),0.25);
    color: var(--brand); font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.topbar-left { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.topbar-left h2 { font-size: 34px; font-weight: 800; }
.topbar-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--brand-rgb),0.28), rgba(var(--brand-strong-rgb),0.22));
    border: 1px solid rgba(var(--brand-rgb),0.20);
    color: var(--brand);
    font-size: 22px;
}
.avatar-status {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid rgba(var(--panel-b-rgb),1);
}
.topbar-right { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.live-status, .user-card {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px;
    background: rgba(var(--brand-rgb),0.08); border: 1px solid rgba(var(--brand-rgb),0.14); color: var(--brand); font-size: 13px; font-weight: 800;
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 15px var(--success); }
.user-info h3 { font-size: 15px; color: var(--text-primary); }
.user-info span { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
.user-card form { margin: 0; }
.logout-btn, .mini-action {
    border: 1px solid rgba(var(--brand-rgb),0.10); background: rgba(255,255,255,0.08); color: var(--button-text); padding: 10px 16px;
    border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
}
.hero-card {
    background: linear-gradient(135deg, rgba(var(--panel-a-rgb),0.92), rgba(var(--panel-b-rgb),0.96)),
                radial-gradient(circle at top right, rgba(var(--brand-rgb),0.20), transparent 38%);
    border: 1px solid rgba(var(--brand-rgb),0.16); border-radius: 24px; padding: 42px;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px;
}
.hero-tag {
    display: inline-flex; padding: 8px 14px; border-radius: 999px; background: rgba(var(--brand-rgb),0.12);
    color: var(--brand);
    margin-bottom: 18px; font-size: 12px; font-weight: 700;
}
.hero-content h1 { font-size: clamp(30px, 3vw, 44px); font-weight: 800; margin-bottom: 18px; overflow-wrap: anywhere; }
.hero-content p { color: var(--text-secondary); max-width: 700px; line-height: 1.8; }
.hero-side-info { color: var(--brand); font-size: 14px; font-weight: 600; }
.dashboard-hero {
    position: relative;
    overflow: hidden;
    min-height: 184px;
    border: 1px solid rgba(var(--brand-rgb),0.18);
    border-radius: 20px;
    padding: clamp(28px, 4vw, 44px) clamp(28px, 5vw, 56px);
    margin-bottom: 18px;
    background:
        linear-gradient(100deg, rgba(var(--panel-b-rgb),0.96) 0%, rgba(var(--panel-a-rgb),0.92) 48%, rgba(var(--brand-strong-rgb),0.22) 100%),
        radial-gradient(circle at 78% 55%, rgba(var(--brand-rgb),0.32), transparent 32%);
    box-shadow: var(--shadow-card);
}
.standard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(22px, 4vw, 46px);
    padding: clamp(28px, 3vw, 36px) clamp(30px, 4vw, 46px);
}
.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: auto -12% 18% 42%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb),0.65), transparent);
    box-shadow: 0 28px 0 rgba(var(--brand-strong-rgb),0.28), 0 -26px 0 rgba(var(--brand-rgb),0.22);
    transform: skewY(-9deg);
}
.dashboard-hero-copy { position: relative; z-index: 1; max-width: 560px; }
.dashboard-hero-copy h1 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; margin-bottom: 14px; }
.dashboard-hero-copy p { color: var(--text-secondary); line-height: 1.7; max-width: 560px; }
.hero-process-visual {
    position: relative;
    z-index: 1;
    min-height: 126px;
    border-radius: 18px;
    border: 1px solid rgba(var(--brand-rgb),0.16);
    background:
        linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.20), rgba(var(--panel-b-rgb),0.28)),
        radial-gradient(circle at 78% 36%, rgba(var(--brand-rgb),0.32), transparent 34%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025);
    overflow: hidden;
}
.hero-process-visual::before {
    content: "";
    position: absolute;
    inset: 30% -8% auto 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb),0.85), transparent);
    box-shadow:
        0 24px 0 rgba(var(--brand-strong-rgb),0.34),
        0 -22px 0 rgba(var(--brand-rgb),0.24);
    transform: skewY(-10deg);
}
.hero-process-visual i {
    position: absolute;
    right: 24px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--brand);
    font-size: 26px;
    background: rgba(var(--brand-rgb),0.12);
    border: 1px solid rgba(var(--brand-rgb),0.22);
}
.hero-process-visual span {
    position: absolute;
    left: 24px;
    height: 8px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb),0.26);
}
.hero-process-visual span:nth-of-type(1) { top: 30px; width: 42%; }
.hero-process-visual span:nth-of-type(2) { top: 52px; width: 58%; background: rgba(var(--brand-strong-rgb),0.28); }
.hero-process-visual span:nth-of-type(3) { top: 74px; width: 34%; }
.hero-vehicle-art {
    position: absolute;
    right: clamp(30px, 6vw, 92px);
    bottom: 22px;
    width: clamp(190px, 28vw, 380px);
    height: clamp(110px, 15vw, 190px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--brand-rgb),0.86);
    font-size: clamp(112px, 16vw, 220px);
    opacity: 0.42;
    filter: drop-shadow(0 0 28px rgba(var(--brand-rgb),0.35));
}
.vehicle-hero {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    column-gap: 24px;
    min-height: 184px;
}
.vehicle-hero .dashboard-hero-copy h1 { font-size: clamp(28px, 3vw, 38px); }
.vehicle-hero-icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: var(--brand);
    font-size: 34px;
    background: rgba(var(--brand-strong-rgb),0.10);
    border: 1px solid rgba(var(--brand-rgb),0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.vehicle-hero-icon::before,
.vehicle-hero-icon::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px solid rgba(var(--brand-rgb),0.45);
    border-left-color: transparent;
    border-bottom-color: transparent;
    border-radius: 10px;
}
.vehicle-hero-icon::after {
    inset: 12px;
    transform: rotate(180deg);
}
.laudo-hero .dashboard-hero-copy { max-width: 580px; }
.hub-panel {
    background: linear-gradient(135deg, rgba(var(--panel-a-rgb),0.96), rgba(var(--panel-b-rgb),0.96));
    border: 1px solid rgba(var(--brand-rgb),0.16);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-card);
}
.dashboard-hero + .hub-panel { padding: 26px; }
.dashboard-hero + .hub-panel > div:first-child { margin-bottom: 14px; }
.dashboard-hero + .hub-panel h3 { font-size: 24px; }
.hub-panel-title { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hub-panel-title h3 { font-size: 20px; margin-top: 3px; }
.icon-tile,
.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: var(--brand);
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.35), rgba(var(--brand-rgb),0.18));
}
.icon-tile.small {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
    margin-right: 10px;
    vertical-align: middle;
}
.vehicle-filter-card,
.vehicle-results-card,
.vehicle-detail-card {
    border-color: rgba(var(--brand-rgb),0.18);
}
.vehicle-filter-card .card-header > div,
.vehicle-results-card .card-header > div,
.vehicle-detail-card .card-header > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 8px;
}
.vehicle-filter-card .card-header h3,
.vehicle-results-card .card-header h3,
.vehicle-detail-card .card-header h3 {
    width: 100%;
    margin-left: 44px;
    margin-top: -2px;
    font-size: 18px;
}
.vehicle-filters {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px 22px;
}
.vehicle-actions {
    margin-top: 8px;
    justify-content: flex-end;
}
.export-btn.primary {
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.92), rgba(var(--brand-rgb),0.66));
    border-color: rgba(var(--brand-rgb),0.42);
    box-shadow: 0 12px 26px rgba(var(--brand-strong-rgb),0.20);
}
.export-btn.ghost {
    background: rgba(var(--panel-b-rgb),0.36);
    border-color: rgba(var(--brand-rgb),0.16);
}
.vehicle-workspace {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
}
.vehicle-detail-card .detail-list {
    margin-top: 10px;
}
.dashboard-filter { margin: 0; }
.dashboard-metric-panel {
    margin-bottom: 22px;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(var(--brand-rgb),0.16);
    background: linear-gradient(135deg, rgba(var(--panel-a-rgb),0.58), rgba(var(--panel-b-rgb),0.42));
    box-shadow: var(--shadow-card);
}
.dashboard-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}
.dashboard-section-heading h3 {
    margin-top: 4px;
    font-size: 22px;
}
.dashboard-section-heading p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}
.metric-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 122px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(var(--brand-rgb),0.16);
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.14), rgba(var(--panel-b-rgb),0.72));
    box-shadow: var(--shadow-card);
}
.metric-card p { color: var(--text-secondary); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.metric-card h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1; margin-bottom: 8px; }
.metric-card small { color: var(--text-secondary); font-size: 12px; }
.metric-copy { min-width: 0; }
.metric-card.success .metric-icon { color: var(--success); background: rgba(0,255,179,0.12); }
.metric-card.danger .metric-icon { color: var(--warning); background: rgba(249,115,22,0.14); }
.metric-card.warning .metric-icon { color: #a78bfa; background: rgba(124,58,237,0.18); }
.process-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.process-strip > div {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(var(--brand-rgb),0.14);
    background: linear-gradient(135deg, rgba(var(--panel-a-rgb),0.58), rgba(var(--panel-b-rgb),0.44));
}
.process-strip strong { display: block; margin: 12px 0 6px; }
.process-strip p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}
.dashboard-bottom-grid.single { grid-template-columns: minmax(0, 1fr); }
.status-list { display: flex; flex-direction: column; gap: 10px; }
.phase-status-group {
    border: 1px solid rgba(var(--brand-rgb),0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}
.phase-status-group summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto);
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    list-style: none;
}
.phase-status-group summary::-webkit-details-marker { display: none; }
.phase-status-group summary > div strong {
    display: block;
    font-size: 15px;
}
.phase-status-group summary > div small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.phase-summary-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}
.phase-summary-meta b {
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
}
.phase-summary-meta i {
    color: var(--brand);
    transition: transform 0.2s ease;
}
.phase-status-group[open] .phase-summary-meta i {
    transform: rotate(180deg);
}
.phase-status-motion {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transform: translateY(-4px);
    transition: grid-template-rows 0.28s ease, opacity 0.22s ease, transform 0.28s ease;
}
.phase-status-group[open] .phase-status-motion {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}
.phase-status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    padding: 0 14px 14px;
    overflow: hidden;
}
.status-row {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.04);
}
.status-row:hover {
    background: rgba(var(--brand-rgb),0.08);
    border-color: rgba(var(--brand-rgb),0.18);
}
.status-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.status-row small { display: block; color: var(--text-secondary); margin-top: 4px; }
.status-row b { font-size: 18px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); box-shadow: 0 0 14px var(--info); }
.status-dot.success { background: var(--success); box-shadow: 0 0 14px var(--success); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 14px var(--warning); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 14px var(--danger); }
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.quick-actions a {
    min-height: 82px;
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    background: rgba(var(--brand-strong-rgb),0.10);
    border: 1px solid rgba(var(--brand-rgb),0.14);
}
.quick-actions a:hover { background: rgba(var(--brand-strong-rgb),0.18); }
.quick-actions i { color: var(--brand); font-size: 20px; grid-row: span 2; }
.quick-actions span { font-weight: 800; }
.quick-actions small { color: var(--text-secondary); margin-top: 4px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-bottom: 30px; }
.kpi-card, .table-card, .detail-card {
    background: linear-gradient(135deg, rgba(var(--panel-a-rgb),0.96), rgba(var(--panel-b-rgb),0.94));
    border-radius: 20px; padding: 28px; border: 1px solid rgba(var(--brand-rgb),0.14);
    box-shadow: var(--shadow-card); min-width: 0;
}
.kpi-card h2 { font-size: 42px; font-weight: 800; margin: 14px 0; }
.kpi-card p { color: var(--text-secondary); font-size: 14px; }
.kpi-card.success { border-color: rgba(0,255,179,0.15); }
.kpi-card.danger { border-color: rgba(255,77,109,0.15); }
.kpi-card.warning { border-color: rgba(255,183,3,0.15); }
.filters-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 16px; margin-bottom: 30px; }
.filters-section.compact {
    align-items: end; padding: 18px; border: 1px solid rgba(var(--brand-rgb),0.14);
    border-radius: 16px; background: rgba(var(--panel-b-rgb),0.28); margin-bottom: 20px;
}
.laudo-filter-card {
    padding: 22px 24px;
    background:
        linear-gradient(135deg, rgba(var(--panel-a-rgb),0.94), rgba(var(--panel-b-rgb),0.98)),
        radial-gradient(circle at top right, rgba(var(--brand-strong-rgb),0.18), transparent 34%);
}
.laudo-filter-card .card-header {
    margin-bottom: 14px;
}
.laudo-filter-card .card-header > div,
.laudo-results-card .card-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.laudo-filter-card .card-header h3,
.laudo-results-card .card-header h3,
.laudo-selected-card h3 {
    font-size: 20px;
    margin: 0;
}
.laudo-filter-card .card-mini-title,
.laudo-results-card .card-mini-title,
.laudo-selected-card .card-mini-title {
    display: none;
}
.laudo-filters {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    align-items: end;
    gap: 18px 22px;
    padding: 0;
    border: 0;
    background: transparent;
    margin-bottom: 18px;
}
.laudo-completion-filter { grid-column: auto; max-width: none; justify-self: stretch; width: 100%; }
.laudo-filter-card .form-actions {
    margin-top: 10px;
}
.laudo-results-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.95fr);
    gap: 18px;
}
.laudo-results-card,
.laudo-selected-card {
    padding: 26px;
}
.laudo-results-card .table-wrapper {
    border-radius: 14px;
}
.laudo-results-card th,
.laudo-results-card td {
    font-size: 12px;
    padding: 12px 10px;
}
.laudo-results-card .status-badge,
.laudo-selected-card .status-badge {
    font-size: 10px;
    padding: 6px 10px;
    white-space: normal;
}
.laudo-selected-card .selected-vehicle {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 22px;
}
.laudo-selected-card .selected-vehicle > div {
    min-height: 88px;
    padding: 14px;
}
.laudo-selected-card .selected-vehicle span {
    font-size: 12px;
}
.laudo-selected-card .selected-vehicle strong {
    font-size: 14px;
}
.logs-filter-form .filters-section { margin-bottom: 0; }
.logs-filter-actions { justify-content: flex-end; margin-top: 24px; }
.logs-filter-actions .export-btn { min-height: 48px; }
.sales-filters { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.filter-group { display: flex; flex-direction: column; min-width: 0; }
.filter-group label { color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.field-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px 8px 12px;
    border: 1px solid rgba(var(--brand-rgb),0.20);
    border-radius: 999px;
    background: rgba(var(--brand-rgb),0.10);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.filter-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filter-chip button {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(var(--brand-rgb),0.14);
    color: var(--text-primary);
    cursor: pointer;
}
.empty-state {
    padding: 22px 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}
.audit-summary-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.035);
}
.audit-summary-card span {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.audit-summary-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 24px;
    overflow-wrap: anywhere;
}
.audit-summary-card small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
}
.status-filter {
    position: relative;
}
.status-filter-toggle {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(var(--brand-rgb),0.16);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: var(--field-text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.status-filter-toggle:hover,
.status-filter-toggle[aria-expanded="true"] {
    border-color: rgba(var(--brand-rgb),0.48);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb),0.12);
}
.status-filter-toggle i {
    color: var(--brand);
    font-size: 12px;
    transition: transform 0.18s ease;
}
.status-filter-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}
.status-filter-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(var(--brand-rgb),0.18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(var(--panel-a-rgb),0.98), rgba(var(--panel-b-rgb),0.98)),
        var(--bg-card);
    box-shadow: 0 18px 42px rgba(0,0,0,0.42), 0 0 0 1px rgba(var(--brand-rgb),0.08);
}
.status-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}
.status-filter-option:hover {
    background: rgba(var(--brand-rgb),0.12);
}
.status-filter-option input {
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    accent-color: var(--brand);
}
:root[data-theme="light"] .status-filter-toggle {
    background: #e7eef7;
    border-color: rgba(30,41,59,0.16);
}
.check-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.check-filter input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}
.sales-origin-toggle {
    align-self: end;
}
input, select {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(var(--brand-rgb),0.12); color: var(--field-text);
    padding: 12px; border-radius: 12px; outline: none; font-size: 14px; min-width: 0;
}
textarea {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(var(--brand-rgb),0.12); color: var(--field-text);
    padding: 12px; border-radius: 12px; outline: none; font-size: 14px; resize: vertical;
    font-family: 'Inter', sans-serif; width: 100%;
}
option { color: #111827; }
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
    background: #e7eef7;
    border-color: rgba(30,41,59,0.16);
}
:root[data-theme="light"] .live-status,
:root[data-theme="light"] .user-card {
    background: rgba(237,243,249,0.86);
}
:root[data-theme="light"] .export-btn {
    background: var(--brand);
    color: #ffffff;
    border: 1px solid rgba(var(--brand-strong-rgb),0.75);
    box-shadow: 0 8px 18px rgba(var(--brand-rgb),0.18);
}
:root[data-theme="light"] .export-btn:hover {
    filter: brightness(0.92);
}
:root[data-theme="light"] .mini-action,
:root[data-theme="light"] .logout-btn {
    background: #dce7f3;
    color: #172033;
    border: 1px solid #b7c6d8;
}
:root[data-theme="light"] .mini-action:hover,
:root[data-theme="light"] .logout-btn:hover {
    background: #cfdeed;
}
:root[data-theme="light"] thead {
    background: #dbe6f2;
}
:root[data-theme="light"] th {
    color: #45556b;
}
:root[data-theme="light"] td {
    border-top-color: #cbd6e4;
    color: #172033;
}
:root[data-theme="light"] tbody tr:hover {
    background: #e2ebf5;
}
:root[data-theme="light"] .table-sort-btn:hover {
    color: #111827;
}
:root[data-theme="light"] .sort-pill-btn,
:root[data-theme="light"] .status-sort-btn {
    background: var(--brand);
    border-color: rgba(var(--brand-strong-rgb),0.75);
    color: #ffffff;
}
:root[data-theme="light"] .sort-pill-btn:hover,
:root[data-theme="light"] .status-sort-btn:hover {
    filter: brightness(0.92);
    border-color: rgba(var(--brand-strong-rgb),0.9);
}
:root[data-theme="light"] .status-badge.success {
    background: #d1fae5;
    color: #047857;
}
:root[data-theme="light"] .status-badge.danger {
    background: #fee2e2;
    color: #b91c1c;
}
:root[data-theme="light"] .status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}
:root[data-theme="light"] .status-badge.info {
    background: #dbeafe;
    color: var(--brand);
}
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr); gap: 24px; margin-bottom: 24px; align-items: start; }
.content-grid.single { grid-template-columns: 1fr; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.card-header h3, .detail-card h3 { font-size: clamp(24px, 2vw, 28px); font-weight: 800; margin-top: 6px; overflow-wrap: anywhere; }
.export-btn {
    border: 1px solid rgba(var(--brand-rgb),0.18); background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.25), rgba(var(--brand-rgb),0.15));
    color: var(--button-text); padding: 14px 20px; border-radius: 16px; cursor: pointer; font-weight: 600;
    display: inline-flex; align-items: center; gap: 10px;
}
.table-wrapper { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: max-content; }
thead { background: rgba(255,255,255,0.03); }
th { padding: 16px; text-align: left; color: var(--text-secondary); font-size: 13px; font-weight: 700; white-space: nowrap; }
.table-sort-btn { border: none; background: transparent; color: var(--text-secondary); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.table-sort-btn:hover { color: white; }
.sort-pill-btn,
.status-sort-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 92px; padding: 10px 16px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.28), rgba(var(--brand-rgb),0.12));
    border: 1px solid rgba(var(--brand-rgb),0.45);
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
    color: var(--button-text); transition: 0.2s ease;
}
.sort-pill-btn:hover,
.status-sort-btn:hover {
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.38), rgba(var(--brand-rgb),0.18));
    border-color: rgba(var(--brand-rgb),0.7);
    transform: translateY(-1px);
}
#sort-lote,
#sort-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 92px !important;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.28), rgba(var(--brand-rgb),0.12)) !important;
    border: 1px solid rgba(var(--brand-rgb),0.45) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.16) !important;
    color: var(--button-text) !important;
}
#sort-lote:hover,
#sort-status:hover {
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.38), rgba(var(--brand-rgb),0.18)) !important;
    border-color: rgba(var(--brand-rgb),0.7) !important;
    transform: translateY(-1px);
}
td { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; white-space: nowrap; }
:root[data-density="compact"] th { padding: 10px 12px; }
:root[data-density="compact"] td { padding: 9px 12px; font-size: 12px; }
.vehicles-result-table th, .vehicles-result-table td { text-align: center; vertical-align: middle; }
.vehicles-result-table .status-badge { min-width: 170px; max-width: 260px; white-space: normal; }
.logs-table th, .logs-table td { font-size: 12px; white-space: normal; vertical-align: top; }
.logs-table td { max-width: 180px; overflow-wrap: anywhere; }
.sales-table th, .sales-table td { font-size: 12px; white-space: normal; vertical-align: top; }
.sales-table td { max-width: 220px; overflow-wrap: anywhere; }
.sales-workspace {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.85fr);
}
.sales-results-card,
.sales-detail-card {
    min-width: 0;
}
.sales-table tbody tr.active-row {
    background: rgba(var(--brand-rgb),0.10);
    outline: 1px solid rgba(var(--brand-rgb),0.26);
}
.sales-detail-card .detail-list {
    margin-top: 18px;
}
.sales-origin-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(var(--brand-rgb),0.18);
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.16), rgba(var(--panel-b-rgb),0.34));
}
.sales-origin-card > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.sales-origin-card article {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
}
.sales-origin-card article span {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sales-origin-card article strong {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.sales-detail-card .detail-item strong {
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: right;
}
.disabled-link { opacity: 0.45; pointer-events: none; cursor: not-allowed; }
tbody tr:hover { background: rgba(255,255,255,0.02); cursor: pointer; }
.status-badge {
    display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px;
    border-radius: 999px; font-size: 12px; font-weight: 700;
}
.status-badge.success { background: rgba(0,255,179,0.12); color: var(--success); }
.status-badge.danger { background: rgba(255,77,109,0.12); color: var(--danger); }
.status-badge.warning { background: rgba(255,183,3,0.12); color: var(--warning); }
.status-badge.info { background: rgba(59,130,246,0.12); color: var(--info); }
.progress-cell { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.progress-track { width: 90px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--info), var(--success)); }
.progress-cell strong { font-size: 12px; color: var(--text-secondary); }
.detail-list { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; }
.detail-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.detail-item span { color: var(--text-secondary); }
.selected-vehicle-card .detail-list { margin-top: 22px; }
.selected-vehicle-card { min-width: 0; overflow: hidden; }
.selected-vehicle { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 24px; max-width: 100%; }
.selected-vehicle > div,
.label-summary-card {
    border: 1px solid var(--border-color); border-radius: 14px; padding: 14px;
    background: rgba(255,255,255,0.035);
}
.selected-vehicle span,
.label-summary-card span,
.summary-progress span { display: block; color: var(--text-secondary); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.selected-vehicle strong { display: block; overflow-wrap: anywhere; word-break: break-word; font-size: 14px; line-height: 1.35; }
.label-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.label-summary-card strong { font-size: clamp(22px, 4vw, 28px); }
.label-summary-card.success strong { color: var(--success); }
.label-summary-card.warning strong { color: var(--warning); }
.summary-progress { margin-top: 18px; }
.summary-progress > strong { float: right; margin-top: -28px; }
.summary-progress .progress-track { width: 100%; margin-top: 10px; }
.selected-vehicle-actions { margin-top: 18px; }
.selected-vehicle-actions .export-btn { width: 100%; justify-content: center; }
.text-success { color: var(--success); }
.cartela-link { color: var(--brand); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cartela-link:hover { filter: brightness(1.18); }
.empty-state { color: var(--text-secondary); }
.label-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.label-pill { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.label-pill.missing { background: rgba(255,77,109,0.12); color: var(--danger); border: 1px solid rgba(255,77,109,0.18); }
.label-pill.present { background: rgba(0,255,179,0.12); color: var(--success); border: 1px solid rgba(0,255,179,0.18); }
.user-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: center; }
.user-form > .export-btn { grid-column: 1 / -1; justify-self: flex-end; }
.form-field { display: flex; flex-direction: column; gap: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.form-field input, .form-field select { width: 100%; }
.user-summary-grid { margin-bottom: 24px; }
.new-user-panel summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    cursor: pointer; list-style: none;
}
.new-user-panel summary::-webkit-details-marker { display: none; }
.new-user-panel summary strong { display: block; font-size: 24px; margin-top: 6px; }
.new-user-panel .user-form { margin-top: 22px; }
.users-workspace { display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr); gap: 28px; align-items: start; }
.users-list-card, .user-editor-card { min-height: 520px; }
.user-search { margin: 16px 0 18px; }
.user-select-list { display: grid; gap: 10px; max-height: 620px; overflow: auto; padding-right: 4px; }
.user-select-item {
    display: grid; grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center; gap: 10px; width: 100%; text-align: left;
    border: 1px solid var(--border-color); border-radius: 14px; padding: 14px;
    background: rgba(255,255,255,0.03); color: var(--text-main); cursor: pointer;
}
.user-select-item:hover, .user-select-item.active {
    border-color: rgba(var(--brand-rgb),0.55);
    background: rgba(var(--brand-strong-rgb),0.12);
}
.user-select-item small { display: block; color: var(--text-secondary); margin-top: 4px; overflow-wrap: anywhere; }
.user-editor-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; margin-top: 24px; }
.user-editor-form .form-actions, .user-editor-form .form-message { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.pagination-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; color: var(--text-secondary); }
.pagination-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.form-message, .form-error { color: var(--danger); margin: 12px 0; font-weight: 700; }
.form-success { color: var(--success); margin: 12px 0; font-weight: 700; }
.form-info { color: var(--info); margin: 12px 0; font-weight: 700; }
.row-message { display: block; min-width: 160px; margin-top: 8px; font-size: 12px; line-height: 1.35; }
.form-section-title { margin: 24px 0 16px; }
.form-section-title h3 { font-size: 24px; margin-top: 6px; }
.form-textarea-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.login-page { display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-container {
    width: min(1100px, 100%); min-height: 680px; display: grid; grid-template-columns: 1.2fr 0.8fr;
    background: rgba(10,14,28,0.92); border: 1px solid var(--border-color); border-radius: 24px; overflow: hidden;
}
.login-banner { display: flex; align-items: flex-start; padding: 96px 56px 56px; background: linear-gradient(135deg, rgba(59,130,246,0.35), rgba(0,255,179,0.14)); }
.banner-content h1 { font-size: 52px; margin-bottom: 16px; }
.banner-content p { color: var(--text-secondary); max-width: 520px; line-height: 1.7; }
.banner-cards { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.mini-card { display: inline-flex; align-items: center; gap: 10px; padding: 14px 18px; background: rgba(255,255,255,0.08); border-radius: 16px; }
.login-box { padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.login-header h2 { font-size: 34px; margin-bottom: 8px; }
.login-header p { color: var(--text-secondary); margin-bottom: 28px; }
.input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.input-wrapper { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-color); border-radius: 14px; padding: 0 14px; }
.input-wrapper input { border: none; background: transparent; width: 100%; }
.password-wrapper { padding-right: 8px; }
.password-peek {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.password-peek:hover, .password-peek.active {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(255,255,255,0.06);
}
.caps-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 0;
    color: var(--warning);
    font-size: 13px;
    font-weight: 800;
}
.caps-warning[hidden] { display: none; }
.login-btn { width: 100%; justify-content: center; border: none; color: white; padding: 16px; border-radius: 14px; cursor: pointer; font-weight: 800; background: linear-gradient(135deg, var(--brand-strong), var(--brand)); display: flex; align-items: center; gap: 10px; }
.login-footer { color: var(--text-secondary); margin-top: 24px; text-align: center; }

@media (max-width: 1500px) {
    .content-grid { grid-template-columns: 1fr; }
    .laudo-results-grid { grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.9fr); }
    .sales-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.9fr); }
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    .dashboard-bottom-grid { grid-template-columns: 1fr; }
    .vehicle-workspace { grid-template-columns: 1fr; }
    .vehicle-filters { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
    .detail-card { width: 100%; }
    .detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
    .detail-card .form-actions { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
    .content-grid { grid-template-columns: 1fr; }
    .laudo-results-grid { grid-template-columns: 1fr; }
    .sales-workspace { grid-template-columns: 1fr; }
    .vehicle-hero { grid-template-columns: 78px minmax(0, 1fr); }
    .topbar { align-items: flex-start; flex-direction: column; }
    .laudo-filters { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .laudo-completion-filter { grid-column: auto; max-width: none; }
    .users-workspace { grid-template-columns: 1fr; }
    .selected-vehicle { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .form-actions { flex-wrap: wrap; }
    .form-actions .export-btn { flex: 1 1 180px; justify-content: center; }
    .hero-vehicle-art { opacity: 0.28; right: 18px; }
    .process-strip { grid-template-columns: 1fr; }
    .vehicle-filters { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 900px) {
    .dashboard-container, .login-container { grid-template-columns: 1fr; flex-direction: column; }
    .sidebar { position: static; width: auto; min-height: auto; margin: 14px; padding: 18px; }
    .sidebar-top { padding: 0 2px 10px; }
    .sidebar-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .sidebar-menu a.active::before { left: 8px; top: auto; right: 8px; bottom: -2px; width: auto; height: 3px; }
    .sidebar-footer { display: none; }
    .login-banner { min-height: 280px; }
    .hero-card { flex-direction: column; align-items: flex-start; }
    .hero-content h1 { font-size: 32px; }
    .label-summary-grid { grid-template-columns: 1fr; }
    .user-select-item, .user-editor-form { grid-template-columns: 1fr; }
    .kpi-card, .table-card, .detail-card, .hero-card { padding: 22px; border-radius: 18px; }
    .dashboard-kpi-grid, .quick-actions { grid-template-columns: 1fr; }
    .dashboard-hero, .hub-panel { border-radius: 18px; }
    .hero-vehicle-art { display: none; }
    .standard-hero { grid-template-columns: 1fr; }
    .vehicle-hero { grid-template-columns: 1fr; }
    .vehicle-hero-icon { margin-bottom: 18px; }
    .vehicle-filters { grid-template-columns: 1fr; }
    .topbar-left h2 { font-size: 28px; }
    .pagination-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------------
   Painel de importacao: formularios de upload, dropzones e relatorio de import
   --------------------------------------------------------------------------- */
.upload-form { align-items: end; }
.upload-actions { justify-content: flex-end; }
.upload-actions .export-btn { width: 100%; justify-content: center; }

.file-input {
    width: 100%; padding: 12px 14px; border-radius: 14px;
    border: 1px dashed rgba(var(--brand-rgb),0.34);
    background: rgba(var(--panel-b-rgb),0.34);
    color: var(--field-text); font: inherit; cursor: pointer;
}
.file-input:hover:not(:disabled) { border-color: rgba(var(--brand-rgb),0.62); }
.file-input:disabled { opacity: 0.45; cursor: not-allowed; }
.file-input::file-selector-button {
    margin-right: 12px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(var(--brand-rgb),0.24);
    background: linear-gradient(135deg, rgba(var(--brand-strong-rgb),0.25), rgba(var(--brand-rgb),0.15));
    color: var(--button-text); font: inherit; font-weight: 600;
}

.file-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 16px; margin-bottom: 22px;
}
.file-field { display: flex; flex-direction: column; min-width: 0; }
.file-field label {
    color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-bottom: 10px;
}

.header-hint {
    padding: 16px 18px; border-radius: 16px; margin: 18px 0;
    border: 1px solid rgba(var(--brand-rgb),0.18);
    background: rgba(var(--brand-rgb),0.07);
    color: var(--text-secondary); font-size: 14px; line-height: 1.6;
}
.header-hint strong { color: var(--text-primary); display: block; margin-bottom: 8px; }
.header-hint code {
    display: block; overflow-x: auto; padding: 10px 12px; border-radius: 10px;
    background: rgba(var(--panel-b-rgb),0.55); color: var(--brand);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: pre;
}

.import-report { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.import-report h4 {
    font-size: 15px; font-weight: 700; margin: 10px 0 4px; color: var(--text-primary);
}
.import-report-row {
    display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
    padding: 10px 14px; border-radius: 12px; font-size: 14px;
    background: rgba(var(--panel-b-rgb),0.34); border-left: 3px solid transparent;
}
.import-report-row.error { border-left-color: var(--danger); }
.import-report-row.duplicate { border-left-color: var(--warning); }
.import-report-line {
    font-weight: 700; color: var(--text-primary); white-space: nowrap; min-width: 90px;
}

.shortcut-grid .metric-card { text-decoration: none; color: inherit; transition: transform 0.15s ease; }
.shortcut-grid .metric-card:hover { transform: translateY(-3px); }

.senhas-form { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.senhas-form .input-wrapper { position: relative; }
