:root {
    --navy-950: #071624;
    --navy-900: #0b2135;
    --navy-800: #12324d;
    --navy-700: #1b4668;
    --orange-600: #d9671f;
    --orange-500: #ef7d2d;
    --orange-100: #fff0e6;
    --green-700: #187448;
    --green-600: #238b57;
    --green-100: #e9f8ef;
    --red-700: #b4232f;
    --red-100: #fff0f1;
    --blue-700: #24689d;
    --blue-100: #eaf5fc;
    --yellow-700: #916b0b;
    --yellow-100: #fff8dd;
    --purple-700: #5a478d;
    --purple-100: #f2effa;
    --gray-950: #111820;
    --gray-800: #2c3742;
    --gray-700: #46525f;
    --gray-600: #66727f;
    --gray-500: #87919c;
    --gray-400: #adb5bd;
    --gray-300: #ced4da;
    --gray-200: #e5e9ed;
    --gray-100: #f3f5f7;
    --gray-50: #f8fafb;
    --white: #fff;
    --shadow: 0 14px 35px rgba(21, 38, 53, .08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 9px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--gray-950); background: var(--gray-50); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; background: linear-gradient(165deg, var(--navy-950), var(--navy-900)); color: var(--white); display: flex; flex-direction: column; z-index: 30; }
.brand, .auth-brand { display: flex; align-items: center; gap: 12px; }
.brand { padding: 0 10px 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand strong, .auth-brand strong { display: block; font-size: 16px; }
.brand span, .auth-brand span { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.65); }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--orange-500); color: white; font-weight: 800; letter-spacing: -.5px; box-shadow: 0 8px 20px rgba(239,125,45,.25); }
.brand-mark.large { width: 52px; height: 52px; border-radius: 16px; font-size: 18px; }
.nav { display: grid; gap: 7px; margin-top: 28px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 11px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 600; transition: .2s ease; }
.nav-link:hover { background: rgba(255,255,255,.08); color: white; }
.nav-link.active { background: rgba(239,125,45,.16); color: #ffb47f; }
.nav-icon { width: 20px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-weight: 700; font-size: 12px; }
.user-info { min-width: 0; }
.user-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { display: block; color: rgba(255,255,255,.55); font-size: 11px; margin-top: 2px; }
.sidebar .link-button { color: rgba(255,255,255,.62); padding: 8px; }

.main-column { min-width: 0; }
.topbar { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 18px 34px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.topbar h1 { margin: 1px 0 0; font-size: 24px; letter-spacing: -.5px; }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; }
.menu-button { display: none; border: 0; background: var(--gray-100); border-radius: 10px; width: 42px; height: 42px; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; color: var(--orange-600); }
.eyebrow.light { color: #ffb47f; }
.content { padding: 30px 34px 60px; max-width: 1600px; margin: 0 auto; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 13px; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--orange-500); color: white; box-shadow: 0 8px 18px rgba(239,125,45,.18); }
.button.primary:hover { background: var(--orange-600); }
.button.secondary { background: var(--navy-900); color: white; }
.button.ghost { background: white; border-color: var(--gray-300); color: var(--gray-700); }
.button.success { background: var(--green-600); color: white; }
.button.danger { background: var(--red-700); color: white; }
.button.danger-outline { color: var(--red-700); background: white; border-color: #e6aab0; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button.wide { width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: var(--orange-600); font-weight: 700; font-size: 12px; }
.text-link, .icon-link { color: var(--orange-600); font-weight: 700; font-size: 12px; }

.panel { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.soft-panel { background: linear-gradient(145deg, #f8fbfd, #f2f6f9); box-shadow: none; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-header h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.3px; }
.helper-text, .muted { color: var(--gray-600); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.compact-grid { margin: 18px 0; }
.metric-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 19px; box-shadow: var(--shadow); }
.metric-card.accent { background: var(--navy-900); color: white; border-color: var(--navy-900); }
.metric-card span { display: block; color: var(--gray-600); font-size: 12px; font-weight: 700; }
.metric-card.accent span, .metric-card.accent small { color: rgba(255,255,255,.65); }
.metric-card strong { display: block; margin: 8px 0 6px; font-size: 26px; letter-spacing: -.8px; }
.metric-card small { color: var(--gray-500); font-size: 11px; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.span-2 { min-width: 0; }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.status-card { border: 1px solid var(--gray-200); border-radius: 13px; padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: .18s ease; }
.status-card:hover { border-color: var(--orange-500); transform: translateY(-1px); }
.status-card strong { font-size: 22px; }

.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.status-neutral { background: var(--gray-100); color: var(--gray-700); }
.status-danger { background: var(--red-100); color: var(--red-700); }
.status-warning { background: var(--yellow-100); color: var(--yellow-700); }
.status-info { background: var(--blue-100); color: var(--blue-700); }
.status-success { background: var(--green-100); color: var(--green-700); }
.status-paid { background: var(--purple-100); color: var(--purple-700); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { text-align: left; padding: 11px 12px; color: var(--gray-500); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 14px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.cell-subtitle { display: block; margin-top: 4px; color: var(--gray-500); font-size: 11px; }
code { background: var(--gray-100); padding: 3px 6px; border-radius: 6px; font-size: 12px; }

.filter-panel { padding: 18px 22px; }
.filter-form { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(200px,1fr) 130px auto auto; gap: 12px; align-items: end; }
.stack-form { display: grid; gap: 15px; }
.compact-form { gap: 10px; }
.separated { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 7px; color: var(--gray-700); font-size: 12px; font-weight: 700; }
label small { color: var(--gray-500); font-weight: 400; line-height: 1.45; }
input, select, textarea { width: 100%; border: 1px solid var(--gray-300); border-radius: 10px; background: white; color: var(--gray-950); padding: 11px 12px; outline: none; transition: border .18s, box-shadow .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(239,125,45,.12); }
textarea { resize: vertical; }
.info-box { padding: 14px; border-radius: 12px; background: var(--blue-100); color: var(--blue-700); display: grid; gap: 4px; font-size: 12px; }
.process-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 15px; }
.process-list li { display: flex; gap: 12px; align-items: center; color: var(--gray-700); font-size: 13px; }
.process-list b { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--orange-100); color: var(--orange-600); display: grid; place-items: center; }
.two-column-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.8fr); gap: 22px; align-items: start; }
.credential-warning { background: var(--yellow-100); color: var(--yellow-700); border-radius: 10px; padding: 12px 14px; margin-bottom: 15px; font-size: 12px; font-weight: 700; }
.error-list { display: grid; gap: 7px; margin-top: 14px; color: var(--red-700); font-size: 12px; }

.closure-hero { background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: white; border-radius: var(--radius-lg); padding: 28px 30px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: var(--shadow); }
.closure-hero h2 { margin: 0; font-size: 25px; }
.closure-hero p { margin: 7px 0 0; color: rgba(255,255,255,.65); font-size: 13px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-value { text-align: right; }
.hero-value span { display: block; color: rgba(255,255,255,.6); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-value strong { display: block; margin-top: 5px; font-size: 30px; }
.detail-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.detail-summary-grid div { padding: 12px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--gray-50); }
.detail-summary-grid span { display: block; color: var(--gray-500); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.detail-summary-grid strong { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; }
.action-panel { position: sticky; top: 114px; }
.alert-box { border-radius: 13px; padding: 15px; display: grid; gap: 4px; margin-bottom: 15px; font-size: 12px; }
.alert-box strong { font-size: 13px; }
.alert-box p { margin: 2px 0; line-height: 1.45; }
.alert-box span { color: inherit; opacity: .8; }
.alert-box.success { background: var(--green-100); color: var(--green-700); }
.alert-box.danger { background: var(--red-100); color: var(--red-700); }
.alert-box.info { background: var(--blue-100); color: var(--blue-700); }
.alert-box.neutral { background: var(--gray-100); color: var(--gray-700); }
.alert-box.paid { background: var(--purple-100); color: var(--purple-700); }
.invoice-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.invoice-card strong, .invoice-card span { display: block; }
.invoice-card strong { font-size: 12px; }
.invoice-card span { color: var(--gray-500); font-size: 10px; margin-top: 3px; }

.sheet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-toolbar strong, .sheet-toolbar span { display: block; }
.sheet-toolbar strong { font-size: 13px; }
.sheet-toolbar span { color: var(--gray-500); font-size: 10px; margin-top: 3px; }
.sheet-chip { border-radius: 999px; padding: 6px 10px; background: var(--gray-100); color: var(--gray-600)!important; }
.sheet-scroll { overflow: auto; max-height: 660px; border: 1px solid var(--gray-300); border-radius: 12px; background: white; }
.sheet-table { border-collapse: collapse; min-width: 1880px; width: max-content; table-layout: auto; font-family: "Segoe UI", Arial, sans-serif; }
.sheet-table th, .sheet-table td { border: 1px solid #d5d9dc; min-width: 88px; max-width: 220px; height: 30px; padding: 5px 7px; font-size: 10px; line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; vertical-align: middle; }
.sheet-table thead th { position: sticky; top: 0; z-index: 2; background: #eef1f4; color: #56616c; text-align: center; }
.sheet-table .row-number { position: sticky; left: 0; z-index: 3; min-width: 42px; width: 42px; background: #eef1f4; color: #65717d; text-align: center; }
.sheet-table thead .row-number { z-index: 4; }
.cell-bold { font-weight: 700; }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding-bottom: 18px; position: relative; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 13px; bottom: 0; width: 1px; background: var(--gray-300); }
.timeline-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--orange-500); margin-top: 3px; z-index: 1; }
.timeline-item strong { font-size: 12px; }
.timeline-item p { margin: 4px 0; color: var(--gray-700); font-size: 12px; line-height: 1.4; }
.timeline-item span { color: var(--gray-500); font-size: 10px; }
.document-list { display: grid; gap: 9px; }
.document-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-200); border-radius: 11px; padding: 10px; }
.document-row:hover { border-color: var(--orange-500); }
.document-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--orange-100); color: var(--orange-600); font-weight: 800; font-size: 10px; }
.document-row strong, .document-row span { display: block; }
.document-row strong { font-size: 11px; }
.document-row span { color: var(--gray-500); font-size: 9px; margin-top: 3px; }

.unit-list { display: grid; gap: 4px; }
.unit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--gray-100); }
.unit-row:last-child { border-bottom: 0; }
.unit-row strong, .unit-row span { display: block; }
.unit-row strong { font-size: 13px; }
.unit-row span { color: var(--gray-500); font-size: 10px; margin-top: 3px; }
.unit-row b { font-size: 13px; }

.welcome-panel { background: linear-gradient(135deg, var(--navy-950), var(--navy-700)); color: white; border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.welcome-panel h2 { margin: 3px 0 6px; font-size: 24px; }
.welcome-panel p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; }
.welcome-steps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.welcome-steps span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); padding: 8px 10px; border-radius: 999px; font-size: 10px; }
.closure-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.closure-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); transition: .18s ease; }
.closure-card:hover { transform: translateY(-3px); border-color: var(--orange-500); }
.closure-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gray-500); font-size: 10px; }
.closure-card h3 { margin: 18px 0 8px; font-size: 16px; }
.closure-value { display: block; font-size: 25px; letter-spacing: -.7px; }
.closure-meta { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; color: var(--gray-500); font-size: 10px; }
.card-action { padding-top: 13px; border-top: 1px solid var(--gray-100); color: var(--orange-600); font-size: 11px; font-weight: 800; }
.driver-action-area { display: grid; gap: 16px; }
.action-copy h2 { margin: 3px 0 6px; font-size: 20px; }
.action-copy p:not(.eyebrow) { margin: 0; color: var(--gray-600); font-size: 13px; }
.confirmation-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hidden-form { display: none; border-top: 1px solid var(--gray-200); padding-top: 16px; }
.hidden-form.visible { display: grid; }
.upload-box { border: 2px dashed var(--gray-300); border-radius: 15px; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: end; background: var(--gray-50); }

.empty-state { padding: 32px 20px; text-align: center; color: var(--gray-500); font-size: 13px; }
.empty-state.compact { padding: 16px 8px; }
.empty-state.large { grid-column: 1 / -1; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); }
.flash-stack { display: grid; gap: 9px; margin-bottom: 18px; }
.flash { padding: 12px 14px; border-radius: 11px; font-size: 12px; font-weight: 650; }
.flash-success { background: var(--green-100); color: var(--green-700); }
.flash-danger { background: var(--red-100); color: var(--red-700); }
.flash-warning { background: var(--yellow-100); color: var(--yellow-700); }
.auth-flashes { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 40; width: min(480px, calc(100% - 30px)); }

.auth-body { min-height: 100vh; background: var(--gray-50); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,1.15fr) minmax(400px,.85fr); }
.auth-hero { padding: 55px 64px; background: radial-gradient(circle at 80% 15%, rgba(239,125,45,.25), transparent 30%), linear-gradient(145deg, var(--navy-950), var(--navy-800)); color: white; display: flex; flex-direction: column; }
.auth-copy { max-width: 680px; margin: auto 0; }
.auth-copy h1 { margin: 10px 0 20px; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -2px; }
.auth-copy p:last-child { max-width: 570px; color: rgba(255,255,255,.68); font-size: 16px; line-height: 1.65; }
.workflow-preview { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; color: rgba(255,255,255,.72); font-size: 11px; }
.workflow-preview span { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); padding: 7px 9px; border-radius: 999px; }
.workflow-preview b { color: var(--orange-500); }
.auth-panel { display: grid; place-items: center; padding: 45px; }
.login-card { width: min(420px, 100%); }
.login-card h2 { margin: 7px 0 6px; font-size: 31px; letter-spacing: -1px; }
.login-card .stack-form { margin-top: 28px; }
.security-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-200); color: var(--gray-500); font-size: 11px; line-height: 1.5; }
.error-page { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; gap: 12px; }
.error-page > strong { font-size: 70px; color: var(--orange-500); }
.auth-error { min-height: 100vh; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .closure-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .filter-form { grid-template-columns: 1fr 1fr 120px; }
    .filter-form .button { align-self: end; }
}

@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: -280px; width: 264px; transition: left .22s ease; box-shadow: 15px 0 40px rgba(0,0,0,.22); }
    .sidebar.open { left: 0; }
    .menu-button { display: grid; place-items: center; }
    .topbar { padding: 16px 20px; }
    .content { padding: 22px 20px 45px; }
    .dashboard-grid, .detail-grid, .two-column-layout { grid-template-columns: 1fr; }
    .action-panel { position: static; }
    .span-2 { grid-column: auto; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-hero { min-height: 420px; padding: 35px 30px; }
    .auth-panel { padding: 45px 24px; }
    .auth-copy h1 { font-size: 42px; }
}

@media (max-width: 680px) {
    .topbar h1 { font-size: 19px; }
    .topbar .eyebrow { display: none; }
    .topbar-actions .button { padding: 9px 11px; font-size: 11px; }
    .metric-grid, .status-grid, .closure-card-grid, .detail-summary-grid, .form-grid { grid-template-columns: 1fr; }
    .filter-form { grid-template-columns: 1fr; }
    .closure-hero, .welcome-panel { align-items: flex-start; flex-direction: column; }
    .hero-value { text-align: left; }
    .welcome-steps { justify-content: flex-start; }
    .upload-box { grid-template-columns: 1fr; }
    .closure-meta { flex-direction: column; }
    .panel { padding: 18px; border-radius: 16px; }
    .content { padding-left: 14px; padding-right: 14px; }
    .auth-hero { min-height: 470px; }
    .workflow-preview { display: none; }
}
.sidebar-links { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 8px; }
.sidebar-links form { margin: 0; }
.password-panel { max-width: 560px; }
.analytics-filter { display: grid; grid-template-columns: minmax(260px,1.5fr) 150px 170px auto; gap: 12px; align-items: end; }
.rank-list { display: grid; }
.rank-row { display: grid; grid-template-columns: 32px minmax(180px,1.2fr) minmax(120px,1fr) 110px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.rank-row:last-child { border-bottom: 0; }
.rank-number { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-100); color: var(--gray-600); font-size: 11px; font-weight: 800; }
.rank-person strong, .rank-person span { display: block; }
.rank-person strong { font-size: 12px; }
.rank-person span { color: var(--gray-500); font-size: 10px; margin-top: 3px; }
.rank-bar { height: 9px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--orange-500); border-radius: inherit; }
.rank-row b { text-align: right; font-size: 12px; }
.extreme-card { padding: 16px; border-radius: 13px; margin-bottom: 12px; }
.extreme-card.high { background: var(--orange-100); color: var(--orange-600); }
.extreme-card.low { background: var(--blue-100); color: var(--blue-700); }
.extreme-card span, .extreme-card strong, .extreme-card p { display: block; }
.extreme-card span { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.extreme-card strong { font-size: 23px; margin: 6px 0 4px; }
.extreme-card p { margin: 0; font-size: 11px; }
.analytics-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.breakdown-list { display: grid; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row strong, .breakdown-row span, .breakdown-row b { display: block; }
.breakdown-row strong, .breakdown-row b { font-size: 12px; }
.breakdown-row span { color: var(--gray-500); font-size: 9px; margin-top: 3px; }
.breakdown-row > div:last-child { text-align: right; }
.alert-list { display: grid; gap: 8px; margin-top: 13px; }
.alert-person { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; border: 1px solid #f0c6a9; background: var(--orange-100); border-radius: 10px; }
.alert-person strong, .alert-person span { display: block; }
.alert-person strong { font-size: 11px; }
.alert-person span { font-size: 9px; margin-top: 3px; color: var(--gray-600); }
.alert-person b { font-size: 11px; color: var(--orange-600); }
@media (max-width: 1180px) { .analytics-grid-3 { grid-template-columns: 1fr 1fr; } .analytics-filter { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .analytics-grid-3, .analytics-filter { grid-template-columns: 1fr; } .rank-row { grid-template-columns: 30px 1fr 90px; } .rank-bar { display:none; } }

/* Importação de planilhas — fluxo em duas etapas */
.import-hero, .review-hero, .success-hero {
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.import-hero { background: linear-gradient(135deg, var(--navy-950), var(--navy-700)); color: white; }
.import-hero h2, .review-hero h2, .success-hero h2 { margin: 3px 0 7px; font-size: 24px; }
.import-hero p:not(.eyebrow), .review-hero p:not(.eyebrow), .success-hero p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; max-width: 720px; }
.import-hero-badge { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #ffb47f; font-size: 16px; font-weight: 900; }
.import-layout { margin-bottom: 22px; }
.upload-drop { min-height: 190px; border: 2px dashed var(--gray-300); border-radius: 16px; padding: 26px; background: var(--gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: .18s ease; cursor: pointer; }
.upload-drop:hover { border-color: var(--orange-500); background: var(--orange-100); }
.upload-drop input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.upload-drop-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--orange-100); color: var(--orange-600); font-size: 23px; margin-bottom: 11px; }
.upload-drop strong { font-size: 15px; color: var(--gray-950); }
.upload-drop small { margin-top: 5px; }
.file-name { margin-top: 14px; padding: 7px 11px; border-radius: 999px; background: white; border: 1px solid var(--gray-200); color: var(--gray-700); font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wide-button { width: 100%; justify-content: center; }
.layout-model-list { display: grid; gap: 10px; }
.layout-model-list article { display: grid; grid-template-columns: 48px 1fr; column-gap: 10px; padding: 12px; border-radius: 12px; background: white; border: 1px solid var(--gray-200); }
.layout-model-list article > span { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--navy-900); color: white; font-size: 10px; font-weight: 900; }
.layout-model-list strong { font-size: 12px; }
.layout-model-list small { margin-top: 3px; color: var(--gray-500); font-size: 10px; }
.layout-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-200); display: grid; gap: 4px; }
.layout-note strong { font-size: 12px; }
.layout-note span { color: var(--gray-600); font-size: 11px; line-height: 1.45; }
.import-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.import-status-pendente { background: var(--yellow-100); color: var(--yellow-700); }
.import-status-importado { background: var(--green-100); color: var(--green-700); }
.import-status-cancelado { background: var(--gray-100); color: var(--gray-600); }
.review-hero { background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: white; }
.review-total { text-align: right; min-width: 190px; }
.review-total span { display: block; color: rgba(255,255,255,.62); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.review-total strong { display: block; margin-top: 6px; font-size: 29px; }
.import-metrics { margin-bottom: 22px; }
.metric-card small { display: block; margin-top: 5px; color: var(--gray-500); font-size: 9px; }
.message-list { display: grid; gap: 8px; }
.message-list div { padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.45; }
.warning-list div { background: var(--yellow-100); color: var(--yellow-700); }
.error-list div { background: var(--red-100); color: var(--red-700); }
.warning-panel { border-left: 4px solid #d6a31d; }
.error-panel { border-left: 4px solid var(--red-700); }
.import-preview-table code { font-size: 10px; font-weight: 800; }
.model-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 9px; font-weight: 900; }
.ignored-panel { margin-bottom: 22px; }
.ignored-panel summary { cursor: pointer; font-size: 13px; font-weight: 800; }
.ignored-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.ignored-grid div { padding: 10px; border: 1px solid var(--gray-200); border-radius: 10px; display: grid; gap: 3px; }
.ignored-grid strong { font-size: 10px; }
.ignored-grid span { color: var(--gray-500); font-size: 9px; }
.confirmation-panel { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.confirmation-panel h2 { margin: 3px 0 6px; }
.confirmation-panel p:not(.eyebrow) { margin: 0; color: var(--gray-600); font-size: 12px; max-width: 620px; }
.confirmation-forms { min-width: 340px; display: grid; gap: 8px; }
.confirm-import-form { display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 10px; align-items: end; }
.success-hero { background: var(--green-100); color: var(--green-700); justify-content: flex-start; }
.success-hero p:not(.eyebrow) { color: rgba(24,116,72,.75); }
.success-icon { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--green-600); color: white; font-size: 28px; font-weight: 900; }
.page-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 980px) {
    .confirmation-panel { align-items: stretch; flex-direction: column; }
    .confirmation-forms { min-width: 0; }
    .ignored-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .import-hero, .review-hero, .success-hero { align-items: flex-start; padding: 21px; }
    .import-hero-badge { display: none; }
    .review-total { text-align: left; min-width: 0; }
    .confirm-import-form { grid-template-columns: 1fr; }
    .ignored-grid { grid-template-columns: 1fr; }
    .page-actions { flex-direction: column; }
}

/* Demonstrativo profissional da quinzena */
.statement-card { border: 1px solid var(--gray-200); border-radius: 18px; overflow: hidden; background: #fff; }
.statement-identification { display: grid; grid-template-columns: 1fr 1fr 2fr 1fr; border-bottom: 1px solid var(--gray-200); background: linear-gradient(180deg,#fff,#f8fafc); }
.statement-id-item { padding: 18px 20px; border-right: 1px solid var(--gray-200); min-width: 0; }
.statement-id-item:last-child { border-right: 0; }
.statement-id-item span { display: block; color: var(--gray-500); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.statement-id-item strong { display: block; margin-top: 5px; color: var(--navy-950); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statement-id-item small { display: block; margin-top: 3px; color: var(--gray-500); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statement-table-wrap { width: 100%; overflow-x: auto; }
.statement-table { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 11px; }
.statement-table th, .statement-table td { padding: 11px 10px; border-right: 1px solid #dbe3ec; border-bottom: 1px solid #e6ebf1; text-align: center; white-space: nowrap; }
.statement-table tbody td { color: var(--navy-950); background: #fff; }
.statement-table thead th { background: var(--navy-900); color: #fff; text-transform: uppercase; font-size: 9px; letter-spacing: .04em; }
.statement-table tbody tr:nth-child(even) { background: #f8fafc; }
.statement-table tbody tr:hover { background: #fff7ed; }
.statement-table tfoot th { background: var(--navy-950); color: #fff; font-size: 12px; }
.statement-table tfoot th:first-child { text-align: right; }
.statement-table .day-total { font-weight: 800; color: var(--navy-950); }
.statement-table .day-net { font-weight: 900; color: var(--green-700); background: var(--green-100); }
.statement-cell-value { display: inline-block; min-width: 18px; color: var(--navy-950); font-size: 11px; font-weight: 800; }
.statement-money { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; color: var(--navy-950); }
.statement-money small { color: var(--gray-500); font-size: 9px; font-weight: 700; }
.statement-money strong { color: var(--navy-950); font-size: 11px; font-weight: 900; }
.statement-row-pending td { background: var(--yellow-100)!important; }
.statement-row-adjusted td { box-shadow: inset 0 2px 0 rgba(239,125,45,.45); }
.money-prefix { color: var(--gray-500); font-size: 9px; }
.statement-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); border-top: 1px solid var(--gray-200); }
.summary-tile { padding: 16px; border-right: 1px solid var(--gray-200); background: #fff; }
.summary-tile:last-child { border-right: 0; }
.summary-tile span { display: block; color: var(--gray-500); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.summary-tile strong { display: block; margin-top: 7px; color: var(--navy-950); font-size: 16px; }
.summary-tile.accent-soft { background: #eef8ee; }
.summary-tile.gold { background: #fff9e8; }
.summary-tile.net { background: #eaf7ed; }
.summary-tile.net strong { color: #177238; font-size: 18px; }
.statement-note { display: flex; gap: 14px; padding: 14px 18px; background: #f8fafc; border-top: 1px solid var(--gray-200); color: var(--gray-500); font-size: 11px; }
.statement-note strong { color: var(--navy-950); }
.statement-warning-list { padding: 14px 18px; display: grid; gap: 6px; color: var(--red-700); background: var(--red-100); font-size: 11px; font-weight: 700; }
.admin-operation-editor { overflow: hidden; }
.admin-operation-list { display: grid; gap: 12px; }
.admin-operation-card { border: 1px solid var(--gray-200); border-radius: 14px; background: #fff; overflow: hidden; }
.admin-operation-card:target { border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(239,125,45,.12); }
.admin-operation-card > summary { display: grid; grid-template-columns: minmax(180px,1fr) minmax(130px,.4fr) auto; align-items: center; gap: 16px; padding: 15px 17px; cursor: pointer; background: var(--gray-50); list-style-position: inside; }
.admin-operation-card[open] > summary { border-bottom: 1px solid var(--gray-200); background: #fff8f2; }
.admin-operation-card > summary span { min-width: 0; }
.admin-operation-card > summary strong, .admin-operation-card > summary small { display: block; }
.admin-operation-card > summary strong { color: var(--navy-950); font-size: 13px; }
.admin-operation-card > summary small { margin-top: 4px; color: var(--gray-500); font-size: 10px; }
.admin-operation-form { display: grid; gap: 18px; padding: 18px; }
.admin-operation-group { display: grid; gap: 12px; }
.admin-operation-group-title { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
.admin-operation-group-title strong { color: var(--navy-950); font-size: 13px; }
.admin-operation-group-title span { color: var(--gray-500); font-size: 10px; }
.admin-operation-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.admin-operation-fields label, .admin-operation-footer label { min-width: 0; }
.admin-operation-fields label > small { display: block; min-height: 14px; margin: 3px 0 5px; color: var(--gray-500); font-size: 9px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.admin-drum-check { align-content: end; }
.admin-drum-check .check-row { min-height: 42px; }
.admin-operation-footer { display: grid; grid-template-columns: minmax(220px,1fr) minmax(300px,1.4fr) auto; align-items: end; gap: 12px; }
.admin-operation-history { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--yellow-100); color: var(--gray-700); font-size: 10px; }
.fuel-details { border-top: 1px solid var(--gray-200); }
.fuel-details summary { cursor: pointer; padding: 15px 18px; color: var(--navy-900); font-size: 12px; font-weight: 800; background: #f8fafc; }
.fuel-details[open] summary { border-bottom: 1px solid var(--gray-200); }
.fuel-details .table-wrap { padding: 0 18px 18px; }
.compact-data-table { min-width: 720px; }
.compact-data-table td { padding-top: 9px; padding-bottom: 9px; }
.nf-panel { align-self: start; }
.nf-gate { display: flex; gap: 12px; align-items: flex-start; padding: 15px; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--gray-50); }
.nf-gate-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-500); color: #fff; font-weight: 800; flex: 0 0 auto; }
.nf-gate strong { display: block; color: var(--navy-950); font-size: 12px; }
.nf-gate p { margin: 4px 0 0; color: var(--gray-500); font-size: 11px; line-height: 1.45; }
.nf-upload-card { display: grid; gap: 11px; padding: 16px; border: 2px dashed var(--orange-400); border-radius: 15px; background: #fff8f1; margin-bottom: 14px; }
.nf-upload-card label span { display: block; font-weight: 800; color: var(--navy-950); }
.nf-upload-card label small { display: block; margin-top: 3px; color: var(--gray-500); }
.nf-upload-card input[type=file] { width: 100%; background: #fff; border: 1px solid var(--gray-300); border-radius: 10px; padding: 9px; font-size: 11px; }
@media (max-width: 1100px) { .statement-identification { grid-template-columns: 1fr 1fr; } .statement-id-item:nth-child(2) { border-right: 0; } .statement-summary { grid-template-columns: repeat(3,minmax(0,1fr)); } .summary-tile:nth-child(3) { border-right: 0; } }
@media (max-width: 1100px) { .admin-operation-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .admin-operation-footer { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .statement-identification { grid-template-columns: 1fr; } .statement-id-item { border-right: 0; } .statement-summary { grid-template-columns: 1fr 1fr; } .summary-tile:nth-child(odd) { border-right: 1px solid var(--gray-200); } .summary-tile:nth-child(even) { border-right: 0; } .admin-operation-card > summary, .admin-operation-fields, .admin-operation-footer { grid-template-columns: 1fr; } .admin-operation-group-title { align-items: flex-start; flex-direction: column; gap: 3px; } }

/* Controles administrativos da versão 2.3 */
.button.tiny { min-height: 30px; padding: 6px 9px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.table-actions form { margin: 0; }
@media (max-width: 680px) {
    .table-actions { justify-content: flex-start; }
}

/* v2.5 — identidade Cargo Handling Express, quinzenas e HEX */
.brand-logo { width: 76px; height: 48px; object-fit: contain; object-position: left center; flex: 0 0 auto; }
.brand-copy { min-width: 0; }
.brand-copy strong { font-size: 13px; line-height: 1.2; }
.auth-logo { width: min(360px, 82%); height: auto; object-fit: contain; object-position: left center; }
.period-list { display: grid; gap: 13px; }
.period-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 22px; border: 1px solid var(--gray-200); border-left: 5px solid var(--green-600); border-radius: 15px; padding: 17px 18px; background: white; }
.period-row.period-open { border-left-color: var(--blue-700); background: linear-gradient(90deg, var(--blue-100), white 16%); }
.period-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.period-title-row > strong { font-size: 15px; }
.period-state { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); }
.period-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; color: var(--gray-600); font-size: 11px; }
.period-meta b { color: var(--gray-800); }
.period-value { text-align: right; min-width: 180px; }
.period-value span { display: block; color: var(--gray-500); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.period-value strong { display: block; margin-top: 4px; font-size: 20px; }
.period-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 250px; }
.period-actions form { margin: 0; }
.robot-panel { background: linear-gradient(155deg, var(--navy-950), var(--navy-800)); color: white; }
.robot-panel .panel-header h2 { font-size: 26px; }
.robot-panel .helper-text { color: rgba(255,255,255,.62); line-height: 1.55; }
.robot-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gray-400); box-shadow: 0 0 0 5px rgba(255,255,255,.06); }
.robot-dot.online { background: #54d48a; box-shadow: 0 0 0 5px rgba(84,212,138,.13); }
.robot-identity { display: flex; align-items: center; gap: 12px; margin: 4px 0 20px; }
.robot-avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--orange-500); color: white; font-size: 18px; font-weight: 900; letter-spacing: -.5px; }
.robot-identity strong, .robot-identity span { display: block; }
.robot-identity strong { font-size: 17px; }
.robot-identity span { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 11px; }
.robot-details { display: grid; gap: 0; margin-bottom: 16px; }
.robot-details div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.robot-details span { color: rgba(255,255,255,.55); font-size: 10px; }
.robot-details strong { font-size: 11px; text-align: right; }
.relaunch-alert span { display: block; }

@media (max-width: 1100px) {
    .period-row { grid-template-columns: 1fr auto; }
    .period-actions { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
}
@media (max-width: 680px) {
    .period-row { grid-template-columns: 1fr; }
    .period-value { text-align: left; min-width: 0; }
    .period-actions { grid-column: auto; }
    .brand-logo { width: 64px; }
}
.brand-logo-shell { display: grid; place-items: center; flex: 0 0 auto; background: white; border-radius: 10px; padding: 6px 8px; }
.brand-logo { width: 104px; height: 31px; }
.auth-logo-shell { display: inline-grid; place-items: center; width: fit-content; background: white; border-radius: 18px; padding: 15px 20px; box-shadow: 0 16px 38px rgba(0,0,0,.18); }
.auth-logo { width: min(360px, 70vw); }

/* v2.7: identidade compacta */
.brand-logo-only { justify-content: center; padding-left: 0; padding-right: 0; }
.brand-logo-only .brand-logo-shell { width: 100%; max-width: 170px; }
.brand-logo-only .brand-logo { width: 150px; height: 44px; }

/* v2.7: cartão do HEX */
@media (max-width: 760px) {
}
@media (max-width: 680px) {
}

/* v2.8 — o mascote fica somente no retrato reservado do cartão HEX. */
.robot-panel { overflow: hidden; }
.robot-panel-top { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 18px; align-items: start; margin-bottom: 14px; }
.robot-panel-copy { min-width: 0; }
.robot-panel-header { margin-bottom: 10px; }
.robot-portrait { width: 118px; height: 118px; border: 2px solid rgba(255,255,255,.28); border-radius: 16px; background: rgba(255,255,255,.055); display: grid; place-items: center; overflow: hidden; }
.robot-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; padding: 5px 4px 0; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); }
.robot-panel .helper-text { padding-right: 0; }
@media (max-width: 720px) {
    .robot-panel-top { grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; }
    .robot-portrait { width: 92px; height: 92px; border-radius: 14px; }
}

/* v2.8.1 — remove visualmente o fundo claro da imagem do mascote HEX. */
.hex-filter-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}
.robot-portrait {
    background: transparent;
}
.robot-portrait img {
    background: transparent;
    filter: url(#hex-remove-white) drop-shadow(0 8px 12px rgba(0,0,0,.25));
}

/* v2.9 — controle operacional do HEX */
.robot-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.robot-title-line h2 { margin: 0; }
.robot-state { display: inline-flex; align-items: center; min-height: 24px; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.robot-state-offline { background: rgba(255,255,255,.12); color: rgba(255,255,255,.78); }
.robot-state-paused { background: rgba(255,196,87,.16); color: #ffd889; }
.robot-state-active { background: rgba(84,212,138,.17); color: #83efb2; }
.robot-state-processing { background: rgba(91,169,255,.18); color: #9dcbff; }
.robot-state-error { background: rgba(255,104,104,.18); color: #ffaaaa; }
.robot-controls { display: grid; margin: 14px 0 12px; }
.robot-controls form { margin: 0; }
.robot-controls .button { width: 100%; justify-content: center; min-height: 42px; border: 0; }
.robot-activate { background: var(--green-600); color: white; }
.robot-activate:hover { background: #14814b; }
.robot-pause { background: var(--yellow-500); color: #3b2a00; }
.robot-pause:hover { background: #e9aa17; }
.robot-error { display: grid; gap: 4px; margin: 12px 0; padding: 11px 12px; border: 1px solid rgba(255,114,114,.38); border-radius: 11px; background: rgba(180,27,27,.18); }
.robot-error strong { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #ffc0c0; }
.robot-error span { font-size: 11px; line-height: 1.45; color: rgba(255,255,255,.82); overflow-wrap: anywhere; }

/* v2.11 — pedágios, tambor e conferência prévia */
.alert-box.warning { background: var(--yellow-100); color: var(--yellow-700); }
.danger-text { color: var(--red-700); }
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.period-row.period-review { border-color: #e8cf7a; background: linear-gradient(90deg, #fffdf4, #fff); }
.period-pending { color: var(--yellow-700)!important; background: var(--yellow-100); border-radius: 999px; padding: 5px 8px; }
.period-date-note { color: var(--gray-600); font-size: 11px; font-weight: 700; padding: 8px 10px; border-radius: 9px; background: var(--gray-100); }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.support-card { border: 1px solid var(--gray-200); border-radius: 16px; padding: 18px; background: var(--gray-50); display: grid; gap: 15px; align-content: start; }
.support-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.support-card-header > div:first-child { display: flex; align-items: flex-start; gap: 10px; }
.support-card-header h3 { margin: 1px 0 3px; font-size: 16px; }
.support-card-header p { margin: 0; color: var(--gray-600); font-size: 11px; line-height: 1.4; }
.support-step { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--orange-100); color: var(--orange-600); font-size: 12px; font-weight: 800; }
.support-current { display: grid; gap: 4px; border-radius: 12px; padding: 13px; background: white; border: 1px solid var(--gray-200); }
.support-current > span { color: var(--gray-500); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.support-current > strong { font-size: 13px; line-height: 1.4; }
.support-current > small { color: var(--gray-600); font-size: 10px; line-height: 1.45; }
.support-form { padding-top: 3px; }
.support-file-list { display: grid; gap: 8px; }
.support-file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 11px; background: white; }
.support-file-row > a, .support-file-row > div { min-width: 0; flex: 1; }
.support-file-row strong, .support-file-row span { display: block; }
.support-file-row strong { font-size: 11px; overflow-wrap: anywhere; }
.support-file-row span { margin-top: 3px; color: var(--gray-500); font-size: 9px; }
.support-file-row.admin-file:hover { border-color: var(--orange-500); }
.support-file-row.admin-file b { color: var(--orange-600); font-size: 10px; }
.support-lock { border-radius: 11px; padding: 12px; background: var(--green-100); color: var(--green-700); font-size: 11px; font-weight: 700; line-height: 1.45; }
.date-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.date-chip-list span { border-radius: 999px; padding: 6px 9px; background: var(--blue-100); color: var(--blue-700); font-size: 10px; font-weight: 700; }
.drum-date-list { display: grid; gap: 8px; }
.drum-date-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--gray-200); border-radius: 10px; background: white; }
.check-row input { width: auto; margin: 0; }
.check-row span { font-size: 12px; }

@media (max-width: 900px) {
    .support-grid { grid-template-columns: 1fr; }
}

/* v2.12 — edição administrativa de etapa e modo de foco do demonstrativo */
.admin-stage-editor { border-top: 1px dashed var(--gray-300); padding-top: 12px; margin-top: 14px; }
.admin-stage-editor summary { cursor: pointer; color: var(--gray-500); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; list-style-position: inside; user-select: none; }
.admin-stage-editor[open] summary { color: var(--navy-900); margin-bottom: 12px; }
.admin-stage-form { padding: 13px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--gray-50); }
.admin-stage-warning { display: grid; gap: 4px; padding: 11px; border-radius: 10px; background: #fff7ed; color: #9a4b13; font-size: 10px; line-height: 1.4; }
.admin-stage-warning strong { font-size: 11px; }
.admin-stage-check { align-items: flex-start; }
.admin-stage-check input { margin-top: 2px; }

.sheet-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sheet-focus-button { white-space: nowrap; }
.focus-close-label { display: none; }
.sheet-focus-hint { display: none; color: var(--gray-500); font-size: 10px; margin: -3px 0 10px; }
.sheet-scroll { outline: none; touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; }
body.sheet-focus-active { overflow: hidden; }
.sheet-focus-shell.is-focus-mode { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; background: #f4f6f8; padding: 16px; }
.sheet-focus-shell.is-focus-mode .sheet-toolbar { flex: 0 0 auto; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: 12px; background: #fff; box-shadow: 0 8px 30px rgba(12,26,45,.12); }
.sheet-focus-shell.is-focus-mode .sheet-focus-hint { display: block; flex: 0 0 auto; }
.sheet-focus-shell.is-focus-mode .sheet-scroll { flex: 1 1 auto; max-height: none; min-height: 0; border-radius: 12px; box-shadow: 0 8px 30px rgba(12,26,45,.12); }
.sheet-focus-shell.is-focus-mode .focus-open-label { display: none; }
.sheet-focus-shell.is-focus-mode .focus-close-label { display: inline; }
.sheet-focus-shell.is-focus-mode .sheet-table { min-width: 1880px; }

@media (max-width: 680px) {
    .sheet-toolbar { align-items: flex-start; flex-direction: column; }
    .sheet-toolbar-actions { width: 100%; justify-content: space-between; }
    .sheet-focus-button { flex: 1; }
    .sheet-focus-shell.is-focus-mode { padding: 8px; }
    .sheet-focus-shell.is-focus-mode .sheet-toolbar { padding: 10px; gap: 8px; }
    .sheet-focus-shell.is-focus-mode .sheet-chip { display: none; }
    .sheet-focus-shell.is-focus-mode .sheet-focus-button { width: 100%; }
    .sheet-focus-shell.is-focus-mode .sheet-scroll { border-radius: 8px; }
}

/* v3.0 — lançamentos diários da Expedição */
.operation-admin-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 27px 30px; margin-bottom: 22px; border-radius: var(--radius-lg); background: linear-gradient(135deg,var(--navy-950),var(--navy-800)); color: #fff; box-shadow: var(--shadow); }
.operation-admin-hero h2 { margin: 4px 0 8px; font-size: 25px; }
.operation-admin-hero p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.7); max-width: 720px; font-size: 13px; line-height: 1.5; }
.operation-privacy-badge { max-width: 310px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.08); }
.operation-privacy-badge strong, .operation-privacy-badge span { display: block; }
.operation-privacy-badge strong { font-size: 12px; }
.operation-privacy-badge span { margin-top: 5px; color: rgba(255,255,255,.68); font-size: 10px; line-height: 1.45; }
.operation-config-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; }
.operation-config-grid .panel { margin-bottom: 0; }
.operation-stat-grid { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
.expedition-user-form { display: grid; grid-template-columns: 1.2fr 100px 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.expedition-account-list { display: grid; gap: 10px; }
.expedition-account-card { border: 1px solid var(--gray-200); border-radius: 14px; background: #fff; overflow: hidden; }
.expedition-account-card.is-inactive { background: var(--gray-50); }
.expedition-account-summary { min-height: 68px; display: grid; grid-template-columns: minmax(180px,1fr) auto auto; align-items: center; gap: 14px; padding: 13px 15px; }
.expedition-account-summary > div:first-child { min-width: 0; }
.expedition-account-summary strong { display: block; color: var(--navy-950); font-size: 13px; }
.expedition-account-summary span:not(.status) { display: block; margin-top: 4px; color: var(--gray-500); font-size: 10px; }
.expedition-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.expedition-account-actions form { margin: 0; }
.expedition-account-edit { grid-template-columns: 1.25fr 100px 1fr 1.15fr 135px auto; gap: 12px; align-items: end; padding: 17px 15px; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.expedition-account-edit.visible { display: grid; }
.expedition-account-edit label { min-width: 0; }
.inline-actions { display: flex; gap: 7px; align-items: center; }
.operation-filter-panel { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 18px 22px; }
.operation-filter-form { display: flex; align-items: end; gap: 12px; }
.operation-filter-form label { min-width: 180px; }
.operation-period-state { display: flex; align-items: center; gap: 10px; color: var(--gray-600); font-size: 12px; }
.operation-mode-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0 0 22px; }
.operation-mode-option { display: grid; gap: 5px; padding: 17px 19px; border: 1px solid var(--gray-200); border-radius: 14px; background: #fff; color: var(--navy-950); box-shadow: 0 8px 24px rgba(15,23,42,.05); text-decoration: none; transition: border-color .18s, box-shadow .18s, transform .18s; }
.operation-mode-option:hover { transform: translateY(-1px); border-color: rgba(239,125,45,.5); box-shadow: 0 10px 28px rgba(15,23,42,.08); }
.operation-mode-option span { font-size: 15px; font-weight: 900; }
.operation-mode-option small { color: var(--gray-600); font-size: 11px; line-height: 1.45; }
.operation-mode-option.is-active { border-color: var(--orange-500); background: linear-gradient(135deg,rgba(239,125,45,.12),#fff 70%); box-shadow: inset 4px 0 0 var(--orange-500), 0 10px 28px rgba(15,23,42,.07); }
.operation-entry-panel { padding-left: 0; padding-right: 0; overflow: hidden; }
.operation-entry-panel > .panel-header { padding: 0 24px; }
.operation-grid-wrap { overflow: auto; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.operation-grid { width: 100%; min-width: 1580px; border-collapse: separate; border-spacing: 0; }
.operation-grid.operation-grid-no-route { min-width: 1380px; }
.operation-grid.operation-grid-odometer { min-width: 1520px; }
.operation-grid th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; background: var(--navy-900); color: #fff; text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.operation-grid td { padding: 9px 8px; border-bottom: 1px solid var(--gray-200); background: #fff; vertical-align: middle; min-width: 110px; }
.operation-grid tbody tr:nth-child(even) td { background: #f8fafc; }
.operation-grid tbody tr.operation-row-active td { box-shadow: inset 0 2px 0 rgba(239,125,45,.14); }
.operation-grid td:first-child { position: sticky; left: 0; z-index: 1; min-width: 220px; box-shadow: 5px 0 12px rgba(15,23,42,.05); }
.operation-grid th:first-child { position: sticky; left: 0; z-index: 3; }
.operation-grid td strong, .operation-grid td span, .operation-grid td small { display: block; }
.operation-grid td strong { font-size: 12px; }
.operation-grid td span { margin-top: 3px; color: var(--gray-700); font-size: 10px; }
.operation-grid td small { margin-top: 3px; color: var(--gray-500); font-size: 9px; }
.operation-grid .grid-input { min-width: 100px; padding: 9px 8px; border-radius: 8px; font-size: 11px; }
.operation-grid .grid-input.is-invalid { border-color: var(--red-700); background: #fff4f4; }
.operation-mode-select { min-width: 92px!important; font-weight: 800; color: var(--navy-900); background: var(--blue-100); border-color: #c9e3f3; }
.operation-grid td[data-mode-field] { transition: opacity .18s, background .18s; }
.operation-grid td[data-mode-field].mode-field-inactive { opacity: .34; background-image: repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(135,145,156,.07) 8px, rgba(135,145,156,.07) 16px); }
.operation-grid td[data-mode-field].mode-field-inactive input { pointer-events: none; }
.grid-check { display: flex; grid-template-columns: none; align-items: center; gap: 7px; }
.grid-check input { width: 18px; height: 18px; }
.model-chip { display: inline-flex!important; margin: 0!important; width: fit-content; padding: 5px 8px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700)!important; font-weight: 800; }
.pending-copy { color: var(--red-700)!important; max-width: 140px; }
.other-mode-copy { margin-top: 7px!important; color: var(--orange-700)!important; max-width: 190px; font-weight: 700; line-height: 1.35; }
.km-calculated { display: block; min-width: 86px; padding: 8px 9px; border: 1px solid #c9e3f3; border-radius: 8px; background: var(--blue-100); color: var(--navy-900); font-size: 12px; font-weight: 900; white-space: nowrap; }
.operation-save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 18px 24px 0; }
.operation-save-bar span { color: var(--gray-500); font-size: 11px; }
.operation-additional-forms { display: grid; gap: 12px; }
.additional-request-card.visible { grid-template-columns: minmax(260px,1.5fr) minmax(160px,.5fr) minmax(260px,1fr) auto; align-items: end; }
.additional-request-card h2 { margin: 3px 0 5px; font-size: 17px; }
.credential-panel { border-color: var(--yellow-700); }
.bulk-stage-bar { display: grid; grid-template-columns: auto minmax(190px,.8fr) minmax(240px,1fr) auto auto; gap: 12px; align-items: end; padding: 14px; margin-bottom: 14px; border-radius: 13px; background: var(--gray-50); border: 1px solid var(--gray-200); }
.bulk-stage-bar > span { align-self: center; color: var(--gray-600); font-size: 11px; white-space: nowrap; }
.compact-check { min-height: 42px; white-space: nowrap; }
.filter-form:has(select[name="period"]) { grid-template-columns: minmax(210px,1.2fr) minmax(190px,.8fr) 120px minmax(190px,.8fr) auto auto; }

@media (max-width: 1050px) {
    .operation-config-grid { grid-template-columns: 1fr; }
    .expedition-user-form { grid-template-columns: 1fr 1fr; }
    .expedition-user-form .button { align-self: end; }
    .expedition-account-edit { grid-template-columns: 1fr 1fr; }
    .additional-request-card.visible { grid-template-columns: 1fr 1fr; }
    .bulk-stage-bar { grid-template-columns: 1fr 1fr; }
    .filter-form:has(select[name="period"]) { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    .operation-admin-hero, .operation-filter-panel { align-items: stretch; flex-direction: column; }
    .operation-privacy-badge { max-width: none; }
    .operation-filter-form { display: grid; grid-template-columns: 1fr; width: 100%; }
    .operation-filter-form label { min-width: 0; }
    .operation-mode-switch { grid-template-columns: 1fr; }
    .expedition-user-form, .additional-request-card.visible { grid-template-columns: 1fr; }
    .expedition-account-summary { grid-template-columns: 1fr auto; }
    .expedition-account-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .expedition-account-edit { grid-template-columns: 1fr; }
    .bulk-stage-bar, .filter-form:has(select[name="period"]) { grid-template-columns: 1fr; }
    .operation-entry-panel > .panel-header { padding: 0 18px; }
    .operation-save-bar { align-items: stretch; flex-direction: column; padding-left: 18px; padding-right: 18px; }
}
