/* =====================================================================
   LevoZap — Design system do painel (sem build step)
   Marca: amarelo #FFC107 · preto #0F1115 · verde WhatsApp #25D366 · cinza #E5E7EB · Montserrat
   ===================================================================== */
:root {
    --brand: #FFC107;
    --brand-600: #E0A800;
    --brand-50: #FFF8E1;
    --ink: #0F1115;
    --ink-2: #374151;
    --muted: #6B7280;
    --line: #E5E7EB;
    --line-2: #F3F4F6;
    --bg: #F6F7F9;
    --card: #ffffff;
    --side: #0F1115;
    --side-2: #1A1D24;
    --side-ink: #D1D5DB;
    --whatsapp: #25D366;
    --green: #16a34a; --green-50: #dcfce7;
    --blue: #2563eb; --blue-50: #dbeafe;
    --red: #dc2626; --red-50: #fee2e2;
    --orange: #ea580c; --orange-50: #ffedd5;
    --purple: #7c3aed; --purple-50: #ede9fe;
    --cyan: #0891b2; --cyan-50: #cffafe;
    --gray-50: #f1f5f9;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
    --side-w: 252px;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px; line-height: 1.5; color: var(--ink); background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0 0 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--side-w); background: var(--side); color: var(--side-ink);
    position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40;
    transition: transform .2s ease;
}
.sidebar .brand { display: flex; align-items: center; padding: 18px 16px 14px; color: #fff; }
.sidebar .brand:hover { text-decoration: none; }

/* ---------- Logo LevoZap ---------- */
.lz-logo { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); }
.lz-mark { height: 34px; width: auto; flex: none; }
.lz-text { display: flex; flex-direction: column; min-width: 0; }
.lz-name { font-weight: 800; font-size: 19px; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.lz-name b { color: var(--brand); font-weight: 800; }
.lz-text small { font-size: 8.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lz-dark { color: #fff; }
.lz-dark .lz-text small { color: #9CA3AF; }
.lz-lg .lz-mark { height: 54px; }
.lz-lg .lz-name { font-size: 30px; }
.lz-lg .lz-text small { font-size: 10.5px; }
.text-brand { color: var(--brand); }
.sidebar nav { flex: 1; overflow-y: auto; padding: 6px 10px 20px; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 10px 6px; }
.nav-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
    color: var(--side-ink); font-weight: 500; cursor: pointer; user-select: none;
}
.nav-link:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(255, 193, 7, .14); color: var(--brand); }
.nav-link i { font-size: 18px; width: 20px; text-align: center; }
.nav-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.nav-link .chev { margin-left: auto; font-size: 14px; transition: transform .15s; }
.nav-group.open > .nav-link .chev { transform: rotate(90deg); }
.nav-sub { display: none; padding: 2px 0 4px 30px; }
.nav-group.open .nav-sub { display: block; }
.nav-sub a { display: block; padding: 5px 10px; border-radius: 6px; color: #94a3b8; font-size: 13px; }
.nav-sub a:hover { color: #fff; text-decoration: none; background: var(--side-2); }
.nav-sub a.active { color: var(--brand); }
.sidebar .side-foot { padding: 12px 16px; border-top: 1px solid #1A1D24; font-size: 12px; color: #6B7280; }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: var(--card); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input { padding-left: 34px; background: var(--gray-50); border-color: transparent; }
.topbar .search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar .spacer { flex: 1; }
.icon-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; font-size: 18px;
}
.icon-btn:hover { background: var(--gray-50); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.user-chip:hover { border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: pulse 2s infinite; }
.live-pill.off .pulse { background: #94a3b8; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

.content { padding: 22px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-full { grid-column: 1 / -1; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head .muted { font-weight: 400; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }

.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.stat .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; flex: none; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.alert { border-color: #fecaca; background: #fff7f7; }
a.card:hover { text-decoration: none; border-color: #cbd5e1; }
.ico.yellow { background: var(--brand-50); color: var(--brand-600); }
.ico.green { background: var(--green-50); color: var(--green); }
.ico.blue { background: var(--blue-50); color: var(--blue); }
.ico.red { background: var(--red-50); color: var(--red); }
.ico.orange { background: var(--orange-50); color: var(--orange); }
.ico.purple { background: var(--purple-50); color: var(--purple); }
.ico.cyan { background: var(--cyan-50); color: var(--cyan); }
.ico.gray { background: var(--gray-50); color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge-green { background: var(--green-50); color: #15803d; }
.badge-blue { background: var(--blue-50); color: #1d4ed8; }
.badge-red { background: var(--red-50); color: #b91c1c; }
.badge-orange { background: var(--orange-50); color: #c2410c; }
.badge-yellow { background: var(--brand-50); color: #a16207; }
.badge-purple { background: var(--purple-50); color: #6d28d9; }
.badge-cyan { background: var(--cyan-50); color: #0e7490; }
.badge-gray { background: var(--gray-50); color: #475569; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-slate { background: #e2e8f0; color: #1e293b; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--gray-50); color: var(--ink-2); font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--gray-50); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn i { font-size: 17px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline-danger { color: var(--red); border-color: #fecaca; }
.btn-outline-danger:hover { background: var(--red-50); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn-sm i { font-size: 15px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 9px 9px 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .error, .error-text { font-size: 12px; color: var(--red); margin-top: 4px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date],
input[type=datetime-local], input[type=time], input[type=search], input[type=url], input[type=color], select, textarea {
    width: 100%; height: 38px; padding: 0 11px; border: 1px solid #d5dbe5; border-radius: 9px; background: #fff;
    font: inherit; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; }
input[type=color] { padding: 3px; width: 60px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 193, 7, .25); }
.is-invalid { border-color: var(--red) !important; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.input-group { display: flex; }
.input-group > * { border-radius: 0 !important; }
.input-group > :first-child { border-radius: 9px 0 0 9px !important; }
.input-group > :last-child { border-radius: 0 9px 9px 0 !important; margin-left: -1px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 650; font-size: 14px; margin-bottom: 10px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.filters .field { margin: 0; min-width: 140px; }
.filters .field.wide { flex: 1; min-width: 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 18px 0; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.chip:hover { text-decoration: none; background: var(--gray-50); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { margin-left: 4px; opacity: .7; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcff; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 600; }
.table tr.row-alert td { background: #fff8f8; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); }
.route-cell { max-width: 320px; }
.route-cell div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-cell i { font-size: 13px; }

/* ---------- Description lists ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); padding: 0 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-weight: 600; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- Alerts / flashes ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid; margin-bottom: 16px; }
.alert i { font-size: 19px; flex: none; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: slidein .2s ease; }
.toast.error { background: #7f1d1d; }
.toast.success { background: #14532d; }
.toast a { color: var(--brand); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Modal / dropdown ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal.lg { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 220px; z-index: 50; padding: 6px; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 7px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); text-decoration: none; }
.dropdown-menu .sep { height: 1px; background: var(--line-2); margin: 6px 0; }
.notif-panel { width: 360px; max-height: 460px; overflow: auto; padding: 0; }
.notif-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.notif-item:hover { background: var(--gray-50); text-decoration: none; }
.notif-item.unread { background: #fffbeb; }
.notif-item small { color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--muted); }
.timeline .dot.green { background: var(--green); } .timeline .dot.blue { background: var(--blue); } .timeline .dot.red { background: var(--red); }
.timeline .dot.orange { background: var(--orange); } .timeline .dot.yellow { background: var(--brand); } .timeline .dot.purple { background: var(--purple); }
.timeline .dot.cyan { background: var(--cyan); } .timeline .dot.gray { background: #94a3b8; }
.timeline .dot.amber { background: #f59e0b; } .timeline .dot.slate { background: #334155; }
.timeline .t-title { font-weight: 600; }
.timeline .t-meta { font-size: 12px; color: var(--muted); }
.timeline .t-note { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* ---------- Progress stepper (status da corrida) ---------- */
.stepper { display: flex; gap: 0; padding: 16px 18px; overflow-x: auto; }
.step { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 12px; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .bubble { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; margin: 0 auto 6px; position: relative; z-index: 1; font-size: 15px; }
.step.done .bubble { background: var(--green); border-color: var(--green); color: #fff; }
.step.done::before, .step.current::before { background: var(--green); }
.step.current .bubble { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.step.current { color: var(--ink); font-weight: 600; }
.step.cancel .bubble { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty i { font-size: 40px; color: #cbd5e1; display: block; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.strong { font-weight: 650; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-orange { color: var(--orange); } .text-blue { color: var(--blue); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.kpi-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.kpi-bar > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.map { height: 420px; border-radius: 0 0 var(--radius) var(--radius); z-index: 0; }
.map.full { height: calc(100vh - 60px - 44px - 64px); min-height: 480px; border-radius: var(--radius); }
.health-dot { font-size: 18px; }
.matrix th, .matrix td { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #efeae2; min-height: 360px; max-height: 60vh; overflow-y: auto; }
.bubble-msg { max-width: 78%; padding: 8px 11px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; }
.bubble-msg.out { align-self: flex-end; background: #d9fdd3; }
.bubble-msg .meta { display: block; font-size: 10.5px; color: var(--muted); text-align: right; margin-top: 3px; }
.bubble-msg .btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bubble-msg .btns span { border: 1px solid #b7e4b0; color: #027eb5; border-radius: 6px; padding: 2px 8px; font-size: 12px; background: #fff; }
.leaflet-container { font: inherit; }
.marker-driver { border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: grid; place-items: center; color: #fff; font-size: 14px; }
.marker-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: grid; place-items: center; }
.marker-pin i { transform: rotate(45deg); color: #fff; font-size: 14px; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.map-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; background: var(--c); vertical-align: -1px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination .pages a, .pagination .pages span { min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; background: #fff; }
.pagination .pages a:hover { background: var(--gray-50); text-decoration: none; }
.pagination .pages .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .pages .disabled { opacity: .45; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { position: relative; overflow: hidden; background: radial-gradient(900px 520px at 15% 0%, #23262e, var(--side)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero::after { content: ""; position: absolute; right: -140px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; border: 70px solid rgba(255, 193, 7, .06); pointer-events: none; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -.03em; max-width: 480px; line-height: 1.1; }
.auth-hero p { color: #9CA3AF; max-width: 440px; font-size: 15px; }
.auth-hero .features { display: grid; gap: 12px; margin-top: 26px; }
.auth-hero .features div { display: flex; gap: 10px; align-items: center; color: #cbd5e1; }
.auth-hero .features i { color: var(--brand); font-size: 20px; }
.auth-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.auth-form .box { width: 100%; max-width: 380px; }

.map-layout { grid-template-columns: minmax(0, 1fr) 320px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .grid-main, .grid-3, .map-layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; }
    .auth { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
}
@media (max-width: 720px) {
    .grid-2, .grid-4, .grid-6, .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .span-2, .span-3 { grid-column: auto; }
    .content { padding: 14px; }
    .topbar { padding: 0 12px; }
    .topbar .search, .live-pill span.txt, .user-chip .name { display: none; }
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dd { margin-bottom: 8px; }
    .table th, .table td { padding: 9px 10px; }
    .notif-panel { width: calc(100vw - 24px); }
}
@media print {
    .sidebar, .topbar, .page-head .actions, .filters, .btn { display: none !important; }
    .main { margin: 0; }
}

form.inline { display: inline-flex; margin: 0; }
.page-head .actions form { display: inline-flex; margin: 0; }

.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.list-item:hover { background: var(--gray-50); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------
   Mobile (área do motorista e páginas públicas)
---------------------------------------------------------------- */
.m-body { background: var(--bg); min-height: 100vh; }
.m-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.m-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--ink); color: #fff; }
.m-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.m-brand:hover { text-decoration: none; }
.m-brand .lz-mark { height: 30px; }
.m-brand .lz-name { font-size: 17px; }
.m-content { flex: 1; padding: 14px; padding-bottom: 90px; display: flex; flex-direction: column; gap: 12px; }
.m-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.m-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.m-nav a i { font-size: 22px; }
.m-nav a.active { color: var(--ink); font-weight: 600; }
.m-nav a.active i { color: var(--brand-600); }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; }
.m-card h2 { font-size: 17px; }
.m-hero { border-radius: 16px; padding: 16px; color: #fff; background: linear-gradient(135deg, var(--ink), #23262e); }
.m-hero .big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.m-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.m-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.m-status.online .dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
.m-status.busy .dot { background: #f59e0b; }
.m-status.paused .dot { background: #3b82f6; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-actions .full { grid-column: 1 / -1; }
.btn-xl { padding: 15px 16px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.m-offer { border: 2px solid var(--brand); background: var(--brand-50); animation: m-pulse 1.6s ease-in-out infinite; }
@keyframes m-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,.45); } 50% { box-shadow: 0 0 0 10px rgba(255,193,7,0); } }
.m-timer { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-route { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.m-route .pt { display: flex; gap: 10px; align-items: flex-start; }
.m-route .pt i { font-size: 18px; margin-top: 1px; }
.m-route .pt .addr { font-weight: 600; line-height: 1.35; }
.m-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-kv > div { background: var(--gray-50); border-radius: 10px; padding: 8px 10px; }
.m-kv .k { font-size: 11px; color: var(--muted); }
.m-kv .v { font-weight: 700; }
.m-map { height: 220px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.m-list { display: flex; flex-direction: column; }
.m-list > .item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.m-list > .item:last-child { border-bottom: 0; }
.m-stars { display: flex; gap: 6px; justify-content: center; }
.m-stars button { background: none; border: 0; font-size: 34px; color: #cbd5e1; cursor: pointer; padding: 0 2px; }
.m-stars button.on { color: var(--brand); }
.m-otp { letter-spacing: .5em; font-size: 26px; text-align: center; font-weight: 700; }
.m-progress { display: flex; gap: 4px; }
.m-progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.m-progress span.on { background: var(--green); }
.m-seg { display: flex; gap: 6px; overflow-x: auto; }
.m-seg a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.m-seg a.active { background: var(--ink); color: #fff; border-color: var(--ink); }