:root {
  --ink: #132d3a; --muted: #637b86; --line: #d9e6e5; --canvas: #f3f8f7;
  --surface: #fff; --brand: #0c7c76; --brand-2: #075f5b; --brand-soft: #e4f3f1;
  --accent: #f59e42; --danger: #c93f3f; --danger-soft: #fff0ee; --success: #187b57;
  --shadow: 0 18px 45px rgba(21, 56, 65, .09); --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--canvas); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 520px) 1fr; background: #fff; }
.login-panel { padding: clamp(30px, 7vw, 88px); display: flex; flex-direction: column; justify-content: center; }
.login-visual { position: relative; overflow: hidden; display: grid; place-items: center; padding: 60px; color: #fff; background: linear-gradient(145deg, #075f5b, #0c7c76 58%, #16a49c); }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; width: 440px; height: 440px; }
.login-visual::before { right: -130px; top: -130px; }.login-visual::after { left: -170px; bottom: -180px; }
.login-copy { z-index: 1; max-width: 520px; }.login-copy h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.05; margin: 24px 0 18px; }.login-copy p { font-size: 18px; line-height: 1.7; opacity: .82; }
.brand { display: flex; align-items: center; gap: 12px; }.brand img { width: 44px; height: 44px; }.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -.5px; }.eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; }
.login-panel h1 { font-size: 34px; margin: 42px 0 8px; letter-spacing: -.8px; }.lead { color: var(--muted); line-height: 1.6; margin: 0 0 28px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; background: #0f2935; color: #d7e8e9; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 0 10px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand small { display: block; color: #86aaa9; font-size: 11px; font-weight: 500; margin-top: 2px; }
.nav-group { margin: 20px 0 6px; padding: 0 12px; color: #6f9799; font-size: 10px; text-transform: uppercase; letter-spacing: 1.7px; font-weight: 800; }
.nav-link { width: 100%; border: 0; color: #c7dbdc; background: transparent; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; text-align: left; margin: 2px 0; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }.nav-link.active { background: #0c7c76; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }.sidebar-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 10px 0; display: flex; gap: 10px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #482208; display: grid; place-items: center; font-weight: 800; }.user-meta { min-width: 0; flex: 1; }.user-meta strong, .user-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }.user-meta small { color: #86aaa9; text-transform: capitalize; }
.logout { border: 0; background: transparent; color: #a9c5c5; font-size: 18px; }

.main { min-width: 0; }.topbar { height: 78px; padding: 0 30px; background: rgba(255,255,255,.9); backdrop-filter: blur(15px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 22px; margin: 0; }.topbar p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }.menu-toggle { display: none; }
.content { padding: 28px; max-width: 1700px; margin: 0 auto; }.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 22px; }.page-head h2 { margin: 4px 0 4px; font-size: 25px; }.page-head p { color: var(--muted); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }.stat { position: relative; background: var(--surface); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand); }.stat.warn::before { background: var(--accent); }.stat-label { color: var(--muted); font-size: 12px; }.stat-value { font-size: 30px; font-weight: 800; margin: 6px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 rgba(20,50,58,.02); margin-bottom: 20px; }.card-title { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 18px; }.card-title h3 { margin: 0; font-size: 17px; }.card-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 20px; }
.field { min-width: 0; }.field label { display: block; font-size: 12px; font-weight: 700; margin: 0 0 7px; }.field small { display: block; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.control { width: 100%; min-height: 44px; border: 1px solid #c9dbdb; background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 12px; outline: none; }.control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(12,124,118,.12); }.control:disabled { background: #edf3f2; color: var(--muted); }.textarea { min-height: 88px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }.btn { border: 1px solid transparent; min-height: 42px; border-radius: 10px; padding: 9px 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }.btn-primary { background: var(--brand); color: #fff; }.btn-primary:hover { background: var(--brand-2); }.btn-soft { background: var(--brand-soft); color: var(--brand-2); }.btn-outline { background: #fff; border-color: #bcd2d1; color: var(--ink); }.btn-danger { background: var(--danger-soft); border-color: #f0b5ae; color: var(--danger); }.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 12px; }.btn:disabled { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; }.toolbar .field { min-width: 170px; }.toolbar .grow { flex: 1; min-width: 220px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }.table { width: 100%; border-collapse: collapse; min-width: 720px; }.table th { background: #eff5f4; color: #56717b; font-size: 10px; letter-spacing: .7px; text-transform: uppercase; text-align: left; padding: 12px 14px; }.table td { border-top: 1px solid var(--line); padding: 13px 14px; font-size: 13px; vertical-align: top; }.table tbody tr:hover { background: #fbfdfd; }.table strong { display: block; }.table small { display: block; color: var(--muted); margin-top: 3px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #edf3f2; color: #4e686e; font-size: 11px; white-space: nowrap; }.badge.success { background: #e4f5ec; color: var(--success); }.badge.warn { background: #fff2e3; color: #a85c13; }.badge.danger { background: var(--danger-soft); color: var(--danger); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }.empty .empty-icon { font-size: 36px; margin-bottom: 8px; }.info { background: #edf7f6; border-left: 4px solid var(--brand); color: #365e61; padding: 13px 15px; border-radius: 8px; font-size: 13px; line-height: 1.55; }.warning { background: #fff4e8; border-left-color: var(--accent); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }.cart-line { display: grid; grid-template-columns: 1fr 110px 48px; gap: 9px; align-items: end; margin-bottom: 10px; }.summary-line { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 11px 0; }.summary-line.total { font-size: 19px; border: 0; font-weight: 800; }

.toast-region { position: fixed; z-index: 100; right: 22px; top: 90px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }.toast { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; animation: toastin .2s ease-out; }.toast.success { border-left: 4px solid var(--success); }.toast.error { border-left: 4px solid var(--danger); }.toast strong { display: block; font-size: 13px; }.toast span { color: var(--muted); font-size: 12px; }.toast-icon { font-size: 20px; }
@keyframes toastin { from { transform: translateY(-8px); opacity: 0; } }
.modal { border: 0; border-radius: 18px; padding: 0; width: min(620px, calc(100vw - 30px)); max-height: 88vh; box-shadow: 0 30px 90px rgba(8,34,42,.28); }.modal::backdrop { background: rgba(5,23,31,.58); backdrop-filter: blur(2px); }.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }.modal-head h3 { margin: 0; }.modal-body { padding: 22px; overflow: auto; max-height: 68vh; }.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 22px; }

.driver-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }.driver-card-head { display: flex; justify-content: space-between; gap: 12px; }.driver-items { color: var(--muted); font-size: 13px; margin: 12px 0; }.scan-box { min-height: 260px; border: 2px dashed #aacac8; border-radius: 14px; background: #eff7f6; display: grid; place-items: center; text-align: center; padding: 24px; }.scan-box video { width: 100%; max-height: 360px; border-radius: 10px; object-fit: cover; }.scan-guide { max-width: 340px; }.scan-guide b { display: block; font-size: 40px; color: var(--brand); }.verification { border: 1px solid #b8dcd5; background: #effaf6; border-radius: 12px; padding: 16px; }

.print-root { display: none; }.voucher-sheet { width: 210mm; min-height: 330mm; padding: 10mm; background: #fff; color: #132d3a; }.voucher-card { width: 100%; height: 70mm; border: 2px solid #0c7c76; border-radius: 4mm; padding: 8mm; display: grid; grid-template-columns: 1fr 42mm; gap: 8mm; page-break-inside: avoid; margin-bottom: 7mm; position: relative; overflow: hidden; }.voucher-card::after { content: "ALTIQ"; position: absolute; font-weight: 900; font-size: 90px; color: rgba(12,124,118,.05); right: -15px; bottom: -30px; }.voucher-card h2 { color: #0c7c76; margin: 0 0 8px; }.voucher-value { font-size: 33px; font-weight: 900; color: #0c7c76; }.voucher-qr { width: 40mm; height: 40mm; object-fit: contain; }.voucher-meta { font-size: 11px; line-height: 1.6; }.receipt { width: 76mm; padding: 4mm; font-family: ui-monospace, monospace; color: #000; background: #fff; }.receipt h2, .receipt p { text-align: center; margin: 3px 0; }.receipt-line { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin: 4px 0; }.receipt hr { border: 0; border-top: 1px dashed #000; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); }.split { grid-template-columns: 1fr; }.grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; }.login-visual { display: none; }.login-panel { padding: 32px 24px; }
  .app-shell { display: block; }.sidebar { position: fixed; z-index: 30; width: 280px; left: -290px; transition: left .2s; box-shadow: 20px 0 50px rgba(0,0,0,.22); }.sidebar.open { left: 0; }.menu-toggle { display: inline-flex; }
  .topbar { height: 68px; padding: 0 16px; }.topbar-title { flex: 1; margin-left: 12px; }.topbar-title p { display: none; }.content { padding: 18px 14px 90px; }.page-head { align-items: flex-start; }.page-head h2 { font-size: 22px; }
  .stats, .grid-2, .grid-3 { grid-template-columns: 1fr; }.card { padding: 16px; border-radius: 14px; }.toolbar { align-items: stretch; }.toolbar .field, .toolbar .grow { min-width: 100%; }.toolbar .btn { width: 100%; }.form-actions { flex-direction: column-reverse; }.form-actions .btn { width: 100%; }.cart-line { grid-template-columns: 1fr 90px 44px; }
  .toast-region { top: 76px; right: 16px; }.table td, .table th { padding: 11px; }
}
@media print {
  @page { size: 210mm 330mm; margin: 0; }
  body * { visibility: hidden !important; }.print-root, .print-root * { visibility: visible !important; }.print-root { display: block !important; position: absolute; inset: 0; }.app-shell, .login-shell, .toast-region, .modal { display: none !important; }
  .voucher-sheet { margin: 0; }.receipt { display: block; }
}
