/* Flottzen · sistema de diseño (sin compilación) */
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --brand: #0052FF; --brand-600: #0047DB; --brand-50: #EEF3FF; --brand-100: #DCE6FF;
  --grafito: #1E2229; --pizarra: #4A5568; --niebla: #F7FAFC;
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #FAFBFC; --hover: #F2F4F7;
  --border: #E6E8EC; --border-strong: #D5D9E0;
  --text: #12151A; --text-2: #4A5568; --text-3: #8A94A6;
  --ok: #0F9F6E; --ok-bg: #E7F7F0; --warn: #C27803; --warn-bg: #FEF5E1; --bad: #DC2626; --bad-bg: #FDECEC; --info: #0052FF; --info-bg: #EEF3FF; --violet: #7C3AED; --violet-bg: #F3EEFF;
  --side: #15181D; --side-2: #1E2229; --side-text: #A4ACB9; --side-text-strong: #F3F5F8; --side-border: #262A32;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 8px 24px -6px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 24px 60px -12px rgba(16,24,40,.25);
  --ring: 0 0 0 4px rgba(0,82,255,.14);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #3B7BFF; --brand-600: #5B8FFF; --brand-50: rgba(59,123,255,.12); --brand-100: rgba(59,123,255,.22);
  --bg: #0D0F13; --surface: #14171C; --surface-2: #181B21; --hover: #1C2027;
  --border: #23272F; --border-strong: #2E333C;
  --text: #EEF0F3; --text-2: #A7AFBC; --text-3: #6B7486;
  --ok: #34D399; --ok-bg: rgba(52,211,153,.12); --warn: #FBBF24; --warn-bg: rgba(251,191,36,.12); --bad: #F87171; --bad-bg: rgba(248,113,113,.12); --info: #6E9BFF; --info-bg: rgba(59,123,255,.14); --violet: #A78BFA; --violet-bg: rgba(167,139,250,.14);
  --side: #0A0C0F; --side-2: #14171C; --side-border: #1C2027;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px -6px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "ss03"; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[x-cloak] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
::selection { background: var(--brand-100); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; border-right: 1px solid var(--side-border); z-index: 40; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.side__brand img { height: 26px; width: auto; }
.side__org { margin: 4px 12px 10px; padding: 9px 10px; border-radius: 10px; background: var(--side-2); border: 1px solid var(--side-border); display: flex; align-items: center; gap: 10px; color: var(--side-text-strong); }
.side__org-logo { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #0052FF, #4C8BFF); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.side__org small { display: block; color: var(--side-text); font-size: 11.5px; }
.plan-pill { margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 2px 7px; border-radius: 99px; color: #9DBBFF; background: rgba(0,82,255,.18); border: 1px solid rgba(0,82,255,.35); }
.side__search { margin: 0 12px 8px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--side-border); color: var(--side-text); background: transparent; cursor: pointer; transition: .15s; width: calc(100% - 24px); text-align: left; }
.side__search:hover { background: var(--side-2); color: var(--side-text-strong); }
.side__search kbd { margin-left: auto; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: #2a2f38 transparent; }
.nav-group { margin-top: 14px; }
.nav-group__title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #646C7A; padding: 0 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-text); font-weight: 500; transition: background .15s, color .15s; position: relative; }
.nav-link svg { width: 17px; height: 17px; opacity: .85; flex-shrink: 0; }
.nav-link:hover { background: var(--side-2); color: var(--side-text-strong); }
.nav-link.is-active { background: linear-gradient(90deg, rgba(0,82,255,.22), rgba(0,82,255,.06)); color: #fff; }
.nav-link.is-active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-link .count { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: rgba(220,38,38,.18); color: #FCA5A5; }
.nav-link .soon { margin-left: auto; font-size: 10px; font-weight: 600; color: #6B7486; border: 1px solid #2A2F38; padding: 0 6px; border-radius: 99px; }
.side__user { border-top: 1px solid var(--side-border); padding: 12px; display: flex; align-items: center; gap: 10px; }
.side__user .name { color: var(--side-text-strong); font-weight: 600; font-size: 13px; line-height: 1.2; }
.side__user small { font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.topbar__crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-weight: 500; }
.topbar__crumbs b { color: var(--text); font-weight: 600; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn.burger { display: none; }
.content { padding: 28px; max-width: 1440px; width: 100%; margin: 0 auto; animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Primitives ---------- */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--b); font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs); transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 1px 2px rgba(0,82,255,.3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--hover); }
.btn--danger { color: var(--bad); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn--lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }

kbd { font: 600 11px/1 "Inter", sans-serif; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--side-border); background: rgba(255,255,255,.04); color: inherit; }
.main kbd { border-color: var(--border-strong); background: var(--surface-2); color: var(--text-3); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card__head h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card__head p { margin: 2px 0 0; color: var(--text-3); font-size: 12.5px; }
.card__head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card__body { padding: 16px 18px 18px; }
.card--flush .card__body { padding: 0; }
.link { color: var(--brand); font-weight: 550; font-size: 13px; }
.link:hover { text-decoration: underline; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 12.5px; } .strong { font-weight: 600; }
.mt-0 { margin-top: 0; }

.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi__label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 550; font-size: 13px; }
.kpi__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi__icon svg { width: 16px; height: 16px; }
.kpi__value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.delta { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 99px; }
.delta--up { color: var(--ok); background: var(--ok-bg); } .delta--down { color: var(--bad); background: var(--bad-bg); }
.kpi svg.spark { position: absolute; right: 18px; top: 62px; width: 90px; height: 34px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--hover); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--plain::before { display: none; }
.b-pendiente { background: var(--warn-bg); color: var(--warn); }
.b-confirmado { background: var(--info-bg); color: var(--info); }
.b-realizado { background: var(--violet-bg); color: var(--violet); }
.b-cobrado, .b-ok, .b-vigente, .b-comunicado { background: var(--ok-bg); color: var(--ok); }
.b-cancelado { background: var(--hover); color: var(--text-3); text-decoration: line-through; }
.b-pronto, .b-revisar { background: var(--warn-bg); color: var(--warn); }
.b-caducado, .b-bad { background: var(--bad-bg); color: var(--bad); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.tag--taxi { background: #FFF6D6; color: #8A6100; } .tag--vtc { background: #E9EEFF; color: #2347B8; }
:root[data-theme="dark"] .tag--taxi { background: rgba(250,204,21,.14); color: #FACC15; } :root[data-theme="dark"] .tag--vtc { background: rgba(99,140,255,.16); color: #9DB7FF; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; color: #fff; background: linear-gradient(135deg, #3B6CFF, #7C5CFF); flex-shrink: 0; letter-spacing: .02em; }
.avatar--sm { width: 24px; height: 24px; font-size: 10px; } .avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr[data-href] { cursor: pointer; }
.table .right { text-align: right; }
.cell-main { font-weight: 600; } .cell-sub { color: var(--text-3); font-size: 12.5px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); transition: border-color .15s, box-shadow .15s; outline: none; }
.textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A94A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder { color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.error { color: var(--bad); font-size: 12.5px; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search-input .input { padding-left: 34px; }

/* Segmented control and tabs */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hover); border: 1px solid var(--border); gap: 2px; }
.seg a, .seg button { padding: 5px 12px; border-radius: 7px; font-weight: 550; font-size: 13px; color: var(--text-2); border: 0; background: none; cursor: pointer; transition: .15s; }
.seg .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 12px; font-weight: 550; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); border-color: var(--brand); }
.tabs a .badge { margin-left: 4px; height: 18px; font-size: 11px; }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 13px; border: 1px solid transparent; }
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert--warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.alert--info { background: var(--info-bg); color: var(--info); }
.alert--bad { background: var(--bad-bg); color: var(--bad); }
.alert ul { margin: 0; padding-left: 16px; }

/* Lists */
.list { display: flex; flex-direction: column; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); transition: background .12s; }
.list__item:first-child { border-top: 0; }
a.list__item:hover { background: var(--hover); }
.list__item .grow { flex: 1; min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 46px; }

.empty { text-align: center; padding: 56px 24px; }
.empty__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-50); color: var(--brand); }
.empty__icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--text-2); max-width: 460px; margin: 6px auto 0; }
.feature-list { list-style: none; padding: 0; margin: 18px auto 0; max-width: 460px; text-align: left; display: grid; gap: 8px; }
.feature-list li { display: flex; gap: 8px; color: var(--text-2); }
.feature-list svg { width: 16px; height: 16px; color: var(--ok); flex-shrink: 0; margin-top: 3px; }

/* Bars chart */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 300px; padding-top: 10px; }
.bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars__stack { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 7px 7px 3px 3px; overflow: hidden; position: relative; transform-origin: bottom; animation: grow .7s var(--ease) both; }
.bars__stack:hover .tip { opacity: 1; transform: translate(-50%, -6px); }
.bars__seg { width: 100%; }
.bars__label { font-size: 12px; color: var(--text-3); font-weight: 550; }
.bars__col.is-current .bars__label { color: var(--text); }
.tip { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 0); opacity: 0; transition: .15s; background: var(--grafito); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.meter { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); animation: grow-x .8s var(--ease) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }

/* ---------- Agenda ---------- */
.agenda-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.agenda-toolbar h2 { font-size: 17px; font-weight: 650; }
.cal { --hour: 64px; --start: 6; display: grid; overflow: auto; max-height: calc(100vh - 230px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); position: relative; }
.cal__head { position: sticky; top: 0; z-index: 5; display: grid; background: var(--surface); border-bottom: 1px solid var(--border); }
.cal__head > div { padding: 10px 12px; border-left: 1px solid var(--border); display: flex; align-items: center; gap: 8px; min-width: 0; }
.cal__head > div:first-child { border-left: 0; }
.cal__head .t1 { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__head .t2 { font-size: 11.5px; color: var(--text-3); }
.cal__body { display: grid; position: relative; }
.cal__hours { position: relative; }
.cal__hour { height: var(--hour); font-size: 11px; color: var(--text-3); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal__col { position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour)); min-width: 150px; }
.cal__col:hover { background-color: color-mix(in srgb, var(--brand-50) 35%, transparent); }
.cal__slot { position: absolute; left: 0; right: 0; height: calc(var(--hour) / 2); cursor: pointer; }
.cal__slot:hover::after { content: "+ Nuevo servicio"; position: absolute; inset: 2px 6px; border-radius: 6px; border: 1.5px dashed var(--brand); color: var(--brand); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; padding-left: 8px; background: var(--brand-50); }
.ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-left: 3px solid var(--c); box-shadow: var(--shadow-xs); transition: transform .12s var(--ease), box-shadow .15s; z-index: 2; }
.ev:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); z-index: 3; }
.ev__t { font-weight: 700; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 80%, var(--text)); }
.ev__r { color: var(--text); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev__m { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.is-pendiente { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 10%, var(--surface)) 0 6px, color-mix(in srgb, var(--c) 4%, var(--surface)) 6px 12px); border-style: dashed; border-left-style: solid; }
.ev.is-cobrado { opacity: .7; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #EF4444; z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #EF4444; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week__day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: 380px; display: flex; flex-direction: column; overflow: hidden; }
.week__day.is-today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.week__head { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 6px; }
.week__head b { font-size: 20px; letter-spacing: -.02em; }
.week__head span { color: var(--text-3); font-size: 12px; text-transform: capitalize; }
.week__list { padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 560px; }
.week__list .ev { position: static; }

/* ---------- Drawer, modal, palette ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,12,16,.45); backdrop-filter: blur(3px); z-index: 80; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 90; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { font-size: 17px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer__foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.t-enter { transition: transform .32s var(--ease), opacity .2s; } .t-from { transform: translateX(40px); opacity: 0; } .t-to { transform: none; opacity: 1; }
.palette { position: fixed; top: 14vh; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 95; overflow: hidden; }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.palette__input svg { width: 18px; height: 18px; color: var(--text-3); }
.palette__input input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; }
.palette__results { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette__group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 10px 4px; }
.palette__item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.palette__item.is-sel { background: var(--brand-50); }
.palette__item .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--hover); color: var(--text-2); }
.palette__item .ico svg { width: 15px; height: 15px; }
.palette__foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--grafito); color: #fff; padding: 11px 16px; border-radius: 12px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); z-index: 100; font-weight: 550; animation: toast .4s var(--ease) both; }
.toast svg { width: 18px; height: 18px; color: #4ADE80; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px) scale(.97); } }

.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; z-index: 50; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu svg { width: 16px; height: 16px; color: var(--text-3); }
.rel { position: relative; }

/* Detail */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; }
.dl dt { color: var(--text-3); font-weight: 500; } .dl dd { margin: 0; font-weight: 550; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--text-3); flex-shrink: 0; }
.timeline .tl-dot svg { width: 13px; height: 13px; }
.timeline li.done .tl-dot { background: var(--ok-bg); color: var(--ok); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 10% 10%, #1B3FA8 0%, transparent 55%), radial-gradient(900px 600px at 90% 100%, #0052FF 0%, transparent 50%), #0B0E14; color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth__art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.auth__art > * { position: relative; z-index: 1; }
.auth__art h2 { font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; margin-top: auto; max-width: 520px; }
.auth__art h2 span { background: linear-gradient(90deg, #8FB2FF, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__art p { color: #AAB6CC; font-size: 16px; max-width: 460px; }
.auth__mock { margin-top: 34px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 16px; backdrop-filter: blur(10px); max-width: 480px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.auth__mock .r { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.auth__mock .r:first-child { border-top: 0; }
.auth__form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth__box { width: 100%; max-width: 380px; }
.auth__box h1 { font-size: 26px; font-weight: 750; }
.demo-users { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.demo-users button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 10px 6px; cursor: pointer; font-weight: 600; font-size: 12.5px; transition: .15s; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.demo-users button:hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.demo-users svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 22px 0 10px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Driver app (PWA) ---------- */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); background: var(--bg); }
.app__top { position: sticky; top: 0; z-index: 20; padding: calc(14px + env(safe-area-inset-top)) 18px 12px; display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.app__top h1 { font-size: 22px; font-weight: 750; }
.app__top small { display: block; color: var(--text-3); font-size: 12.5px; }
.app__body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; animation: rise .3s var(--ease) both; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%); z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--border); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 6px 0; border-radius: 10px; transition: color .15s; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--brand); }
.tabbar .fab { margin-top: -22px; width: 54px; height: 54px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(0,82,255,.6); justify-self: center; padding: 0; }
.tabbar .fab svg { width: 26px; height: 26px; }
.trip { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); }
.trip--next { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: 0 0 0 4px var(--brand-50), var(--shadow-md); }
.trip__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.trip__time { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.trip__route { padding: 12px 16px; display: grid; grid-template-columns: 18px 1fr; gap: 0 10px; }
.trip__route .pin { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.trip__route .pin i { width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--brand); background: var(--surface); }
.trip__route .pin i.b { border-color: var(--text); background: var(--text); border-radius: 3px; }
.trip__route .pin span { width: 2px; flex: 1; min-height: 18px; background: repeating-linear-gradient(to bottom, var(--border-strong) 0 3px, transparent 3px 6px); margin: 3px 0; }
.trip__route p { margin: 0 0 12px; font-weight: 600; line-height: 1.3; }
.trip__route p:last-child { margin-bottom: 0; }
.trip__route p small { display: block; color: var(--text-3); font-weight: 500; font-size: 12px; }
.trip__meta { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.trip__actions { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.trip__actions .btn { height: 46px; border-radius: 12px; }
.steps { display: flex; gap: 6px; padding: 0 16px 4px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--border); }
.steps i.on { background: var(--brand); }
.hero { border-radius: 20px; padding: 18px; color: #fff; background: radial-gradient(400px 200px at 100% 0%, #3B7BFF, transparent 60%), linear-gradient(135deg, #0B1E5B, #0052FF); box-shadow: 0 16px 40px -12px rgba(0,82,255,.55); position: relative; overflow: hidden; }
.hero small { color: #BFD0FF; font-weight: 550; }
.hero .big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero .row { color: #DCE6FF; font-size: 13px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--text-3); font-weight: 550; }
.section-title { font-size: 13px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 8px 2px -4px; }
.upload { border: 2px dashed var(--border-strong); border-radius: 16px; padding: 26px; text-align: center; cursor: pointer; display: block; transition: .15s; background: var(--surface); }
.upload:hover { border-color: var(--brand); background: var(--brand-50); }
.upload svg { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--brand); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips label { cursor: pointer; }
.chips input { display: none; }
.chips span { display: inline-flex; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 550; transition: .15s; }
.chips input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.clock { text-align: center; padding: 26px 18px; }
.clock .big { font-size: 46px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(15,159,110,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(15,159,110,0); } 100% { box-shadow: 0 0 0 0 rgba(15,159,110,0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } .week { grid-template-columns: repeat(7, 220px); overflow-x: auto; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .btn.burger { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth__art { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
}
@media (max-width: 560px) { .g-4 { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi__value { font-size: 22px; } .kpi svg.spark { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .topbar, .page-head__actions { display: none !important; } .shell { display: block; } }
