/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    color-scheme: dark;

    /* backgrounds */
    --bg:       #080c18;
    --surface:  #0f1426;
    --surface2: #151c33;
    --surface3: #1c243e;
    --surface4: #222c48;

    /* borders */
    --border:      #1f2a48;
    --border-soft: #2a3660;

    /* text */
    --text:       #e8ecfa;
    --text-muted: #6b7fba;
    --text-dim:   #3d4f82;

    /* brand */
    --indigo:       #6366f1;
    --indigo-light: #818cf8;
    --indigo-dark:  #4f46e5;
    --indigo-glow:  rgba(99,102,241,.22);

    /* semantic */
    --red:    #f43f5e;
    --green:  #10b981;
    --teal:   #06b6d4;
    --yellow: #f59e0b;
    --orange: #f97316;
    --blue:   #3b82f6;
    --slate:  #475569;

    /* shadows */
    --shadow-xs: 0 1px 3px rgba(0,0,0,.4);
    --shadow-sm: 0 2px 8px  rgba(0,0,0,.45);
    --shadow:    0 4px 20px rgba(0,0,0,.55);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.65);

    /* misc */
    --radius:    10px;
    --radius-sm: 6px;
    --t: 140ms cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font: 13.5px/1.55 'Inter', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ============================================================
   BACKGROUND DECORATION
   ============================================================ */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 600px;
    background:
        radial-gradient(ellipse 60% 300px at 20% 0, rgba(99,102,241,.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 250px at 85% 0,  rgba(6,182,212,.07)  0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.page { position: relative; z-index: 1; }

/* ============================================================
   PAGE / TOPBAR
   ============================================================ */
.page {
    width: min(100%, 1800px);
    margin: 0 auto;
    padding: 28px 28px 64px;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.025em;
    margin-top: 6px;
}

h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
button,
.home-link {
    align-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 600;
    gap: 7px;
    height: 38px;
    letter-spacing: .01em;
    padding: 0 16px;
    position: relative;
    text-decoration: none;
    transition: opacity var(--t), transform var(--t), box-shadow var(--t);
    white-space: nowrap;
    user-select: none;
}

button:hover, .home-link:hover {
    opacity: .88;
    transform: translateY(-1px);
}

button:active, .home-link:active {
    transform: translateY(0);
    opacity: .95;
}

/* colour variants */
button {
    background: linear-gradient(160deg, var(--surface3), var(--surface2));
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

button:hover { color: var(--text); }

button.primary {
    background: linear-gradient(145deg, #6366f1, #4f46e5);
    border: 1px solid #5254cc;
    box-shadow: 0 2px 12px var(--indigo-glow);
    color: #fff;
}

button.danger {
    background: linear-gradient(145deg, #f43f5e, #e11d48);
    border: 1px solid #c01740;
    box-shadow: 0 2px 12px rgba(244,63,94,.22);
    color: #fff;
}

button.success {
    background: linear-gradient(145deg, #10b981, #059669);
    border: 1px solid #047857;
    box-shadow: 0 2px 12px rgba(16,185,129,.2);
    color: #fff;
}

button.info {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    border: 1px solid #1d4ed8;
    box-shadow: 0 2px 12px rgba(59,130,246,.2);
    color: #fff;
}

button.warning {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border: 1px solid #b45309;
    box-shadow: 0 2px 12px rgba(245,158,11,.22);
    color: #fff;
}

button.row-action {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border: 1px solid #b45309;
    box-shadow: 0 2px 10px rgba(245,158,11,.18);
    color: #fff;
    font-size: 11px;
    height: 30px;
    padding: 0 10px;
}

button.row-action:hover {
    color: #fff;
}

.home-link {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border: 1px solid #b45309;
    box-shadow: 0 2px 12px rgba(245,158,11,.22);
    color: #fff;
}

.logout-link {
    background: linear-gradient(145deg, var(--red), #e11d48);
    border: 1px solid #c01740;
    box-shadow: 0 2px 12px rgba(244,63,94,.2);
    color: #fff;
    text-decoration: none;
}

.topbar-right {
    align-items: center;
    display: flex;
    gap: 10px;
}

.topbar-user {
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
}

.topbar-user-icon {
    color: var(--indigo-light);
    font-size: 14px;
    line-height: 1;
}

.topbar-user-name {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================
   FILTER CARD
   ============================================================ */
.filters-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.filters-card-head {
    align-items: center;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    gap: 10px;
    padding: 14px 22px;
}

.filters-card-head-icon {
    width: 3px;
    height: 16px;
    background: linear-gradient(to bottom, var(--indigo), var(--teal));
    border-radius: 2px;
    flex-shrink: 0;
}

.filters-card-head span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px 32px;
    padding: 22px 22px;
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
label {
    color: var(--text-muted);
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    position: relative;
    text-transform: uppercase;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
    appearance: none;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: block;
    font-size: 13px;
    height: 38px;
    margin-top: 6px;
    outline: 0;
    padding: 0 12px;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]):hover, select:hover {
    border-color: var(--border-soft);
}

input:not([type="checkbox"]):not([type="radio"]):focus, select:focus {
    background: var(--surface3);
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}

input[type="checkbox"],
input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--indigo);
    cursor: pointer;
}

input::placeholder { color: var(--text-dim); font-style: italic; }

/* date inputs */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(.5) sepia(1) hue-rotate(180deg) brightness(1.5);
    cursor: pointer;
    opacity: .5;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: .9; }

/* select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7fba' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ============================================================
   FIELD WRAP (autocomplete com ícone)
   ============================================================ */
.field-wrap {
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 0;
    margin-top: 6px;
    position: relative;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.field-wrap:hover { border-color: var(--border-soft); }

.field-wrap:focus-within {
    background: var(--surface3);
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}

.field-icon {
    color: var(--text-dim);
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1;
    padding: 0 0 0 11px;
    pointer-events: none;
    transition: color var(--t);
}

.field-wrap:focus-within .field-icon { color: var(--indigo-light); }

.field-wrap input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    height: 38px;
    margin: 0;
    padding: 0 12px;
}

.field-wrap input:focus { box-shadow: none; background: transparent; border-color: transparent; }

.field-wrap .suggestions {
    top: calc(100% + 3px);
    z-index: 200;
}

/* ============================================================
   MULTI-SELECT (Solicitação) — componente moderno
   ============================================================ */
.ms-wrap {
    margin-top: 6px;
    position: relative;
}

/* ── campo disparador ── */
.ms-field {
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 40px;
    padding: 5px 32px 5px 10px;
    position: relative;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    user-select: none;
}

.ms-field:hover { border-color: var(--border-soft); }

.ms--open .ms-field {
    background: var(--surface3);
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}

.ms-caret {
    color: var(--text-dim);
    font-size: 9px;
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform var(--t), color var(--t);
}

.ms--open .ms-caret {
    color: var(--indigo-light);
    transform: translateY(-50%) rotate(180deg);
}

.ms-placeholder {
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
    padding: 4px 2px;
}

/* ── chips ── */
.ms-chip {
    align-items: stretch;
    background: var(--surface4);
    border: 1px solid rgba(99,102,241,.4);
    border-radius: 5px;
    display: inline-flex;
    max-width: 210px;
    overflow: hidden;
    transition: border-color var(--t);
}

.ms-chip:hover { border-color: var(--indigo-light); }

.ms-chip-id {
    align-items: center;
    background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    padding: 3px 7px;
    white-space: nowrap;
}

.ms-chip-nm {
    align-items: center;
    border-left: 1px solid rgba(99,102,241,.3);
    color: var(--text-muted);
    display: flex;
    font-size: 10px;
    max-width: 110px;
    overflow: hidden;
    padding: 3px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-chip-x {
    align-items: center;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.08);
    border-radius: 0;
    box-shadow: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    font-size: 10px;
    height: auto;
    justify-content: center;
    min-height: auto;
    padding: 0 6px;
    transform: none;
    transition: background var(--t), color var(--t);
}

.ms-chip-x:hover {
    background: rgba(244,63,94,.2);
    box-shadow: none;
    color: #fca5a5;
    opacity: 1;
    transform: none;
}

.ms-overflow {
    align-items: center;
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.28);
    border-radius: 12px;
    color: var(--indigo-light);
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ── painel dropdown ── */
.ms-panel {
    animation: fadeSlide 130ms ease both;
    background: var(--surface2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 200;
}

/* barra de busca */
.ms-search-row {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 9px;
    padding: 10px 13px;
}

.ms-si {
    color: var(--text-dim);
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.ms-search {
    background: transparent;
    border: 0;
    color: var(--text);
    flex: 1;
    font-size: 13px;
    height: auto;
    margin: 0;
    min-width: 0;
    outline: 0;
    padding: 0;
    width: 100%;
}

.ms-search::placeholder { color: var(--text-dim); font-style: italic; }

/* lista */
.ms-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 4px 0;
}

/* grupo por mês */
.ms-grp {
    color: var(--text-dim);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .1em;
    padding: 10px 14px 4px;
    text-transform: uppercase;
}

/* item */
.ms-item {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    gap: 10px;
    height: auto;
    min-height: auto;
    padding: 9px 13px;
    text-align: left;
    transform: none;
    transition: background var(--t);
    width: 100%;
}

.ms-item:hover { background: var(--surface3); box-shadow: none; opacity: 1; transform: none; }
.ms-on { background: rgba(99,102,241,.1); }
.ms-on:hover { background: rgba(99,102,241,.16) !important; }

/* checkbox */
.ms-ck {
    align-items: center;
    border: 1.5px solid var(--border-soft);
    border-radius: 4px;
    color: transparent;
    display: flex;
    flex-shrink: 0;
    font-size: 11px;
    height: 17px;
    justify-content: center;
    margin-top: 3px;
    transition: all var(--t);
    width: 17px;
}

.ms-ck-on {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
    border-color: var(--indigo-dark);
    color: #fff;
}

/* conteúdo do item */
.ms-ib { display: flex; flex-direction: column; flex: 1; gap: 2px; min-width: 0; }
.ms-irow { align-items: center; display: flex; gap: 10px; }

.ms-iid {
    color: var(--indigo-light);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.ms-idate {
    color: var(--text-dim);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ms-iname {
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* estados */
.ms-empty,
.ms-loading {
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.ms-loading { align-items: center; display: flex; justify-content: center; gap: 8px; }

.ms-spin {
    animation: spin 600ms linear infinite;
    border: 2px solid rgba(99,102,241,.2);
    border-radius: 50%;
    border-top-color: var(--indigo);
    display: inline-block;
    flex-shrink: 0;
    height: 13px;
    width: 13px;
}

/* rodapé stats */
.ms-foot {
    align-items: center;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    display: flex;
    font-size: 11px;
    gap: 12px;
    justify-content: space-between;
    padding: 7px 14px;
}

/* ============================================================
   SUGGESTIONS DROPDOWN
   ============================================================ */
.suggestions {
    animation: fadeSlide 120ms ease both;
    background: var(--surface2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    left: 0;
    max-height: 240px;
    overflow: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 3px);
    z-index: 200;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.suggestions button {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--text);
    display: flex;
    font-size: 13px;
    font-weight: 400;
    gap: 10px;
    height: auto;
    min-height: 38px;
    padding: 9px 14px 9px 12px;
    text-align: left;
    transform: none;
    transition: background var(--t), border-left-color var(--t);
    width: 100%;
}

.suggestions button:last-child { border-bottom: 0; }

.suggestions button::before {
    background: var(--indigo);
    border-radius: 50%;
    content: '';
    flex-shrink: 0;
    height: 5px;
    opacity: 0;
    transition: opacity var(--t);
    width: 5px;
}

.suggestions button:hover {
    background: var(--surface3);
    border-left-color: var(--indigo);
    box-shadow: none;
    opacity: 1;
    transform: none;
}

.suggestions button:hover::before { opacity: 1; }

.suggestions button:active {
    background: var(--surface4);
    transform: none;
}

/* ============================================================
   ACTION BUTTONS ROW
   ============================================================ */
.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 22px;
}

/* ============================================================
   SUMMARY CARDS
   ============================================================ */
.summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    padding: 18px 20px 16px;
    position: relative;
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.summary-card:nth-child(1)::before { background: linear-gradient(90deg, var(--indigo), var(--indigo-light)); }
.summary-card:nth-child(2)::before { background: linear-gradient(90deg, var(--green), #34d399); }
.summary-card:nth-child(3)::before { background: linear-gradient(90deg, var(--teal), #67e8f9); }
.summary-card:nth-child(4)::before { background: linear-gradient(90deg, var(--orange), #fb923c); }

.summary-card:hover {
    border-color: var(--border-soft);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.summary-icon {
    color: var(--text-dim);
    font-size: 18px;
    line-height: 1;
    margin-bottom: 10px;
    display: block;
}

.summary-card:nth-child(1) .summary-icon { color: var(--indigo-light); }
.summary-card:nth-child(2) .summary-icon { color: var(--green); }
.summary-card:nth-child(3) .summary-icon { color: var(--teal); }
.summary-card:nth-child(4) .summary-icon { color: var(--orange); }

.summary-value {
    display: block;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
}

.summary-card:nth-child(1) .summary-value { color: var(--indigo-light); }
.summary-card:nth-child(2) .summary-value { color: var(--green); }
.summary-card:nth-child(3) .summary-value { color: var(--teal); }
.summary-card:nth-child(4) .summary-value { color: var(--orange); }

.summary-label {
    color: var(--text-muted);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    margin-top: 6px;
    text-transform: uppercase;
}

.summary-note {
    color: var(--text-dim);
    display: block;
    font-size: 10px;
    font-style: italic;
    font-weight: 400;
    letter-spacing: .02em;
    margin-top: 5px;
    opacity: .75;
}

/* ============================================================
   RESULT SECTION
   ============================================================ */
.result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.result-head {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 20px;
}

#status {
    color: var(--text-muted);
    font-size: 12px;
}

.table-wrap {
    max-height: 58vh;
    overflow: auto;
}

table {
    border-collapse: collapse;
    min-width: 1180px;
    width: 100%;
}

thead th {
    background: var(--surface2);
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 10px 12px;
    position: sticky;
    text-align: left;
    text-transform: uppercase;
    top: 0;
    white-space: nowrap;
    z-index: 1;
}

td {
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 12.5px;
    padding: 10px 12px;
    white-space: nowrap;
}

tbody tr:nth-child(even) td { background: rgba(255,255,255,.018); }

tbody tr:hover td {
    background: var(--surface2) !important;
}

tbody tr:last-child td { border-bottom: 0; }

/* first column (ID) badge style */
tbody td:first-child {
    color: var(--indigo-light);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

/* ============================================================
   BADGES (tipo, turno, etc.)
   ============================================================ */
.badge {
    border-radius: 4px;
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 2px 7px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-alug {
    background: rgba(99,102,241,.18);
    color: var(--indigo-light);
    border: 1px solid rgba(99,102,241,.3);
}

.badge-muni {
    background: rgba(16,185,129,.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,.28);
}

.badge-manha {
    background: rgba(245,158,11,.13);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,.25);
}

.badge-tarde {
    background: rgba(249,115,22,.13);
    color: #fb923c;
    border: 1px solid rgba(249,115,22,.25);
}

.badge-noite {
    background: rgba(139,92,246,.15);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,.28);
}

.badge-turno {
    background: rgba(107,114,186,.12);
    color: var(--text-muted);
    border: 1px solid rgba(107,114,186,.2);
}

.badge-sitio {
    background: rgba(16,185,129,.13);
    color: #34d399;
    border: 1px solid rgba(16,185,129,.28);
}

.badge-urbano {
    background: rgba(59,130,246,.12);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,.25);
}

.solicitante-cell {
    color: var(--text-muted);
    font-size: 12px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* número de passageiros/acompanhantes */
.num-cell {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -.01em;
    text-align: center;
}

.num-vagas { color: var(--indigo-light); }
.num-pass  { color: var(--green); }
.num-acom  { color: var(--teal); }

/* veiculo */
.veiculo-cell {
    color: var(--text-muted);
    font-size: 12px;
}

.veiculo-stack {
    align-items: flex-start;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
}

.veiculo-model {
    color: var(--text-dim);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Placa Mercosul ── */
.placa {
    border-radius: 3px;
    display: inline-flex;
    flex-direction: column;
    font-size: 0;
    overflow: hidden;
    vertical-align: middle;
    white-space: nowrap;
}

.placa-msul {
    border: 1.5px solid #2048b8;
    box-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.placa-msul .placa-h {
    background: linear-gradient(90deg, #1540a8, #1e52cc);
    color: #fff;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .14em;
    padding: 2px 6px 1px;
    text-align: center;
}

.placa-msul .placa-b {
    background: #f0f0f0;
    color: #111;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
    padding: 2px 8px 3px;
    text-align: center;
}

/* ── Placa Antiga / cinza ── */
.placa-old {
    border: 1.5px solid #888;
    box-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.placa-old .placa-b {
    background: #c8c8c8;
    color: #111;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
    padding: 3px 8px 4px;
    text-align: center;
}

/* data */
.date-cell {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

/* ============================================================
   LOADING SPINNER (no botão)
   ============================================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    opacity: .7 !important;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 600ms linear infinite;
    margin-right: 4px;
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--surface4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-soft); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
    .page { padding: 18px 16px 48px; }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .filters { grid-template-columns: 1fr; }
    .summary { grid-template-columns: repeat(2, 1fr); }

    h1 { font-size: 18px; }
}

/* ---------- Celular: cabeçalho compacto, alvos de toque maiores ---------- */
@media (max-width: 600px) {
    .page { padding: 14px 12px 40px; }

    .topbar { gap: 10px; margin-bottom: 20px; padding-bottom: 16px; }
    .topbar-right { flex-wrap: wrap; gap: 8px; width: 100%; }
    .topbar-user { order: 3; width: 100%; }

    h1 { font-size: 17px; margin-top: 4px; }
    .crumb { font-size: 10px; }

    .home-link, .logout-link { height: 42px; padding: 0 14px; flex: 1; justify-content: center; }

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

    input, select { height: 42px; font-size: 14px; }
}
