/* DASH admin — design tokens */
:root {
  --navy: #022e5b;
  --navy-deep: #011a35;
  --navy2: #06437f;
  --teal: #03b8ad;
  --teal-dark: #029990;
  --teal-soft: #e3f7f5;
  --gold: #f9c614;
  --gold-soft: #fff7d9;
  --gold-ink: #8a6a00;
  --blue-soft: #e8f0fa;
  --wash: #f3f6fa;
  --surface: #ffffff;
  --ink: #0b2340;
  --muted: #687b90;
  --stroke: #e4eaf1;
  --stroke-strong: #d3dce7;
  --danger: #d93a34;
  --danger-soft: #fdeeed;
  --green: #11804a;
  --green-soft: #e4f6ec;
  --ring: 0 0 0 3px rgba(3, 184, 173, 0.32);
  --shadow-sm: 0 1px 2px rgba(2, 46, 91, 0.06);
  --shadow: 0 1px 2px rgba(2, 46, 91, 0.04), 0 8px 24px rgba(2, 46, 91, 0.06);
  --shadow-lg: 0 24px 60px rgba(2, 30, 61, 0.22);
  --radius: 14px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--wash);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3 { color: var(--navy); letter-spacing: -0.01em; }
h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; }
h3 { font-weight: 800; }
a { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; background: var(--wash); border: 1px solid var(--stroke); padding: 2px 6px; border-radius: 6px; color: var(--navy); }
.muted { color: var(--muted); font-weight: 500; }
.error { color: var(--danger); font-size: 13.5px; font-weight: 600; margin: 0; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Form controls */
input, select, textarea {
  font: inherit;
  font-size: 14px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #9aa9b9; }
input:hover, select:hover, textarea:hover { border-color: #b9c7d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23687b90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
}
input[type='checkbox'] { accent-color: var(--teal); width: 16px; height: 16px; padding: 0; }

/* Buttons */
button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(2, 46, 91, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
button:hover { background: var(--teal-dark); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, .stat.link:focus-visible { outline: none; box-shadow: var(--ring); }
button.ghost { background: var(--surface); color: var(--navy); border-color: var(--stroke-strong); box-shadow: var(--shadow-sm); }
button.ghost:hover { background: var(--wash); border-color: #b9c7d6; }
button.danger { background: var(--danger); }
button.danger:hover { background: #bf2f2a; }
button.ok { background: var(--green); }
button.ok:hover { background: #0d6b3d; }
button:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 15px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font-size: 18px; font-weight: 800; letter-spacing: 3px; line-height: 1.1; }
.brand small { display: block; color: var(--teal); font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 2px; }
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, var(--teal), #02857d);
  color: #fff; font-weight: 800; font-size: 21px;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(3, 184, 173, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
}
.mark::after { content: ''; position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid var(--navy); }

/* ---------------------------------------------------------------- Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login-art {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(3, 184, 173, 0.35), transparent 60%),
    radial-gradient(500px 360px at 0% 100%, rgba(249, 198, 20, 0.16), transparent 60%),
    linear-gradient(150deg, var(--navy-deep), var(--navy) 55%, var(--navy2));
  display: flex; align-items: center; padding: 56px;
}
.login-art::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%);
}
.login-art-inner { position: relative; max-width: 460px; }
.login-art h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; font-weight: 800; margin: 44px 0 26px; letter-spacing: -0.02em; }
.brand-light b { color: #fff; }
.login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.login-points li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.login-points svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(3, 184, 173, 0.22); color: #5ee6dc; stroke-width: 2.4; }
.login-side { display: grid; place-items: center; padding: 32px 20px; background: var(--wash); }
.login-card {
  width: min(420px, 100%); background: var(--surface); border-radius: 24px; padding: 34px;
  display: grid; gap: 16px; border: 1px solid var(--stroke); box-shadow: var(--shadow);
}
.login-card .brand { color: var(--navy); }
.login-card .mark::after { border-color: #fff; }
.login-head h1 { margin: 10px 0 4px; font-size: 26px; font-weight: 800; }
.login-head p { margin: 0; }
.login-card label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: var(--navy); }
.login-card input { padding: 12px 14px; }
.login-foot { text-align: center; font-size: 12px; margin: 2px 0 0; }

/* ---------------------------------------------------------------- Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex-shrink: 0; color: #fff;
  background:
    radial-gradient(280px 220px at 100% 0%, rgba(3, 184, 173, 0.18), transparent 70%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 55%, #053a6e 100%);
  padding: 20px 14px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; z-index: 15;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar .brand { padding: 4px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 6px; }
.sidebar .brand b { color: #fff; }
#nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.nav-group { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); padding: 16px 12px 6px; font-weight: 700; }
#nav button {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; text-align: left;
  background: transparent; color: rgba(255, 255, 255, 0.72); font-weight: 600; padding: 10px 12px; border-radius: 12px;
  box-shadow: none; border: 0;
}
#nav button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
#nav button:focus-visible { box-shadow: 0 0 0 2px rgba(94, 230, 220, 0.6); }
#nav button.active {
  background: linear-gradient(90deg, rgba(3, 184, 173, 0.26), rgba(3, 184, 173, 0.08));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(3, 184, 173, 0.28), 0 8px 20px rgba(0, 0, 0, 0.12);
}
#nav button.active::before {
  content: ''; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--teal); box-shadow: 0 0 12px rgba(3, 184, 173, 0.9);
}
#nav .ic { width: 20px; height: 20px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.6); transition: color 0.15s; }
#nav button:hover .ic { color: #fff; }
#nav button.active .ic { color: #5ee6dc; }
#nav .badge {
  margin-left: auto; font-style: normal; background: var(--gold); color: var(--navy);
  font-size: 11px; font-weight: 800; min-width: 22px; padding: 1px 7px; border-radius: 20px; text-align: center;
  box-shadow: 0 2px 8px rgba(249, 198, 20, 0.35);
}
.side-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.07);
}
.side-avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.side-who { min-width: 0; }
.side-who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-who small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 28px; min-height: 68px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--stroke); position: sticky; top: 0; z-index: 10;
}
.title-block { flex: 1; min-width: 0; }
.crumb { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; color: var(--muted); text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; padding: 0; background: var(--surface); color: var(--navy); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-sm); }
.icon-btn:hover { background: var(--wash); }
.menu-toggle { display: none; }
.sidebar-scrim { position: fixed; inset: 0; background: rgba(1, 26, 53, 0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 14; animation: fade 0.2s var(--ease); }

.account { position: relative; }
.avatar-btn {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  background: linear-gradient(145deg, var(--teal), var(--navy2)); color: #fff; font-weight: 800; font-size: 14px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--stroke-strong), 0 4px 12px rgba(2, 46, 91, 0.15);
}
.avatar-btn:hover { background: linear-gradient(145deg, var(--teal-dark), var(--navy)); }
.menu {
  position: absolute; right: 0; top: 52px; width: 272px; background: var(--surface); color: var(--navy);
  border-radius: 16px; border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); padding: 8px; z-index: 30;
  transform-origin: top right; animation: pop 0.16s var(--ease);
}
.menu-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--stroke); margin-bottom: 6px; }
.menu-who { min-width: 0; }
.menu-head b { display: block; font-size: 14px; }
.menu-head small { color: var(--muted); font-size: 12px; word-break: break-all; }
.menu-avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, var(--navy), var(--navy2)); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.menu-item { display: flex; justify-content: flex-start; gap: 10px; width: 100%; text-align: left; background: transparent; color: var(--navy); font-weight: 600; padding: 10px 12px; border-radius: 10px; box-shadow: none; }
.menu-item svg { width: 18px; height: 18px; color: var(--muted); }
.menu-item:hover { background: var(--wash); }
.menu-item.danger-text, .menu-item.danger-text svg { color: var(--danger); }
.menu-item.danger-text:hover { background: var(--danger-soft); }

main { padding: 28px; width: 100%; max-width: 1280px; margin: 0 auto; }
.view { animation: rise 0.25s var(--ease); }

/* ---------------------------------------------------------------- Overview */
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.welcome h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.welcome p { margin: 2px 0 0; }
.live-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow-sm); }
.live-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(3, 184, 173, 0.2); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.stat {
  position: relative; background: var(--surface); border-radius: var(--radius-lg); padding: 18px 18px 20px;
  border: 1px solid var(--stroke); box-shadow: var(--shadow); cursor: default; overflow: hidden;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.stat.link { cursor: pointer; }
.stat.link:hover { transform: translateY(-2px); border-color: rgba(3, 184, 173, 0.45); box-shadow: 0 2px 4px rgba(2, 46, 91, 0.04), 0 14px 32px rgba(2, 46, 91, 0.1); }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chip { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); }
.chip.navy { background: var(--blue-soft); color: var(--navy2); }
.chip.gold { background: var(--gold-soft); color: #b58d00; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--danger-soft); color: var(--danger); }
.chip.slate { background: #eef1f5; color: #546679; }
.go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--wash); transition: background-color 0.15s, color 0.15s, transform 0.18s var(--ease); }
.go svg { width: 16px; height: 16px; }
.stat.link:hover .go { background: var(--teal); color: #fff; transform: translateX(2px); }
.stat b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--navy); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .lbl, .stat > span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 6px; }
.stat.accent { background: radial-gradient(260px 180px at 100% 0%, rgba(3, 184, 173, 0.35), transparent 70%), linear-gradient(145deg, var(--navy), var(--navy2)); border-color: transparent; color: #fff; box-shadow: 0 12px 30px rgba(2, 46, 91, 0.28); }
.stat.accent b { color: #fff; }
.stat.accent .lbl, .stat.accent > span { color: rgba(255, 255, 255, 0.75); }
.stat.accent .chip { background: rgba(255, 255, 255, 0.14); color: #fff; }
.stat.accent .go { background: rgba(255, 255, 255, 0.14); color: #fff; }
.stat.warn { background: linear-gradient(180deg, #fffbea, #fff 70%); border-color: #f5dd7c; }
.stat.warn::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--gold); }
.stat.warn b { color: #9a7400; }
.stat.warn .chip { background: var(--gold); color: var(--navy); }

/* Summary strip in list views */
.stats.small { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats.small .stat { padding: 14px 16px; border-radius: var(--radius); display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats.small .stat > span { margin: 4px 0 0; font-size: 12px; }
.stats.small .stat b { font-size: 22px; }

/* ---------------------------------------------------------------- Toolbars & tables */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.count { display: inline-block; font-size: 13px; font-weight: 700; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: #8a9bad; pointer-events: none; }
.search input { padding-left: 38px; min-width: 290px; }

.table-wrap {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  overflow: auto; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); min-height: 160px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #c9d4e0 transparent;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th {
  text-align: left; padding: 12px 16px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  border-bottom: 1px solid var(--stroke); white-space: nowrap; background: #f8fafc;
}
.table-wrap th { position: sticky; top: 0; z-index: 1; }
td { padding: 13px 16px; border-bottom: 1px solid var(--stroke); white-space: nowrap; vertical-align: middle; color: var(--ink); }
td b { font-weight: 700; color: var(--navy); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background-color 0.12s; }
tbody tr.static { cursor: default; }
tbody tr:nth-child(even) td { background: #fbfcfe; }
tbody tr:hover td { background: #f0f8f8; }
td.muted, td.error { text-align: center; padding: 36px 16px; }
.who { display: flex; align-items: center; gap: 12px; }
.av {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--teal-soft); color: var(--teal-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--stroke);
}
.av.t1 { background: var(--blue-soft); color: var(--navy2); }
.av.t2 { background: var(--gold-soft); color: #9a7400; }
.av.t3 { background: #f1ecfb; color: #6a48b5; }
.av.t4 { background: var(--green-soft); color: var(--green); }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pager button { padding: 8px 14px; font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: #eef2f6; color: #44586d; text-transform: capitalize; white-space: nowrap; line-height: 1.5;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.75; }
.pill.approved, .pill.active, .pill.ok { background: var(--green-soft); color: var(--green); }
.pill.rejected, .pill.suspended, .pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.pending, .pill.warn { background: var(--gold-soft); color: var(--gold-ink); }
.pill.driver { background: var(--teal-soft); color: #027a72; }
.pill.rider { background: var(--blue-soft); color: var(--navy2); }
td .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 1px; }
td.wrap { white-space: normal; min-width: 220px; max-width: 360px; }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.amount.neg { color: var(--danger); }
.amount.pos { color: var(--green); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

/* ---------------------------------------------------------------- Drivers */
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; padding: 4px; background: #e8edf3; border-radius: 14px; max-width: 100%; }
.tabs button { background: transparent; color: var(--muted); border: 0; box-shadow: none; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.tabs button:hover { background: rgba(255, 255, 255, 0.6); color: var(--navy); }
.tabs button.active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(2, 46, 91, 0.12); }
.msg { margin: 0 0 14px; font-size: 13px; }

.card { background: var(--surface); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--stroke); }
.head .av { width: 60px; height: 60px; font-size: 19px; border-radius: 18px; border-width: 3px; }
.head h3 { margin: 0 0 2px; font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head .muted { font-size: 13px; word-break: break-word; }
.alert { display: block; margin: 14px 0 0; padding: 12px 14px 12px 16px; border-radius: 12px; font-size: 13.5px; border: 1px solid transparent; border-left-width: 4px; }
.alert.bad { background: var(--danger-soft); color: #9b2c27; border-color: #f6cfcc; border-left-color: var(--danger); }
.alert.ok { background: var(--green-soft); color: var(--green); border-color: #c5ead5; border-left-color: var(--green); }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.compare { width: 100%; margin-top: 4px; border: 1px solid var(--stroke); border-radius: 14px; overflow: hidden; table-layout: fixed; }
.compare th, .compare td { white-space: normal; word-break: break-word; padding: 11px 12px; }
.compare th { text-transform: none; letter-spacing: 0; font-size: 12px; }
.compare td:first-child { font-weight: 700; color: var(--muted); width: 26%; font-size: 12.5px; }
.compare th:first-child { width: 26%; }
.compare th:last-child, .compare td:last-child { width: 56px; text-align: center; }
.compare tbody tr { cursor: default; }
.mk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; }
.mk svg { width: 15px; height: 15px; stroke-width: 2.6; }
.mk.yes { background: var(--green-soft); color: var(--green); }
.mk.no { background: var(--danger-soft); color: var(--danger); }
.mk.na { background: #eef1f5; color: #9aa9b9; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); margin: 22px 0 10px; font-weight: 800; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--stroke); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.kv > div { background: #f8fafc; border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; word-break: break-word; }
.kv b { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; margin-bottom: 2px; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.doc { border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; background: var(--surface); transition: box-shadow 0.18s, transform 0.18s var(--ease); }
.doc:hover { box-shadow: 0 10px 26px rgba(2, 46, 91, 0.1); transform: translateY(-1px); }
.doc a.thumb { display: block; height: 150px; background: repeating-linear-gradient(45deg, #f3f6fa, #f3f6fa 10px, #eef2f7 10px, #eef2f7 20px); color: var(--navy); font-weight: 800; text-decoration: none; overflow: hidden; }
.doc img { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.doc a.thumb:hover img { transform: scale(1.04); }
.doc .body { padding: 12px 14px; font-size: 12.5px; display: grid; gap: 6px; }
.doc .body .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.doc .body .row:first-child { padding-bottom: 6px; border-bottom: 1px dashed var(--stroke); margin-bottom: 2px; }
.doc .body .row:first-child b { font-size: 13px; color: var(--navy); }
.doc .body .row span:first-child { color: var(--muted); }
.doc .body .row span:last-child { text-align: right; font-weight: 600; }
.doc .body .row .pill { font-weight: 700; }
.actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--stroke); flex-wrap: wrap; }

/* ---------------------------------------------------------------- Drawer */
.drawer { position: fixed; inset: 0; background: rgba(1, 26, 53, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 20; display: flex; justify-content: flex-end; animation: fade 0.2s var(--ease); }
.drawer-panel { width: min(780px, 100%); height: 100%; background: var(--wash); overflow: auto; padding: 60px 24px 24px; position: relative; box-shadow: -20px 0 50px rgba(1, 26, 53, 0.25); animation: slide-in 0.28s var(--ease); }
.close { position: absolute; top: 14px; right: 16px; background: var(--surface); color: var(--navy); border: 1px solid var(--stroke-strong); width: 38px; height: 38px; padding: 0; border-radius: 50%; box-shadow: var(--shadow-sm); }
.close:hover { background: var(--wash); }
.close svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- Dialogs */
dialog { border: 1px solid var(--stroke); border-radius: 22px; padding: 26px; width: min(480px, 92vw); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog[open] { animation: pop 0.18s var(--ease); }
dialog::backdrop { background: rgba(1, 26, 53, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 16px; font-size: 19px; }
dialog label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
dialog textarea { width: 100%; resize: vertical; font-weight: 500; }
fieldset { border: 1px solid var(--stroke); border-radius: 14px; margin: 6px 0 18px; padding: 10px 14px 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
fieldset label { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--wash); cursor: pointer; color: var(--ink); }
fieldset label:hover { background: #e8edf3; }
menu { display: flex; justify-content: flex-end; gap: 10px; padding: 0; margin: 0; }

/* ---------------------------------------------------------------- Motion */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-side { min-height: 100vh; background: radial-gradient(500px 360px at 90% 0%, rgba(3, 184, 173, 0.3), transparent 60%), linear-gradient(150deg, var(--navy-deep), var(--navy) 55%, var(--navy2)); }
  .login-card { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3); border: 0; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; height: 100dvh; transform: translateX(-100%); transition: transform 0.28s var(--ease), box-shadow 0.28s; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 24px 0 60px rgba(1, 26, 53, 0.4); }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 18px; }
  main { padding: 20px 18px; }
}
@media (max-width: 700px) {
  .topbar { gap: 10px; padding: 10px 16px; min-height: 60px; }
  .topbar h1 { font-size: 18px; }
  .crumb { font-size: 10.5px; }
  main { padding: 16px; }
  .welcome h2 { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; border-radius: 16px; }
  .stat-top { margin-bottom: 12px; }
  .chip { width: 36px; height: 36px; border-radius: 10px; }
  .chip svg { width: 18px; height: 18px; }
  .stat b { font-size: 22px; }
  .stat .lbl { font-size: 12px; }
  .stats.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar h2 { font-size: 19px; }
  .filters { width: 100%; }
  .filters > * { flex: 1 1 140px; }
  .search { flex-basis: 100%; }
  .search input { min-width: 0; width: 100%; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex-shrink: 0; }
  .card { padding: 16px; border-radius: 16px; }
  .drawer-panel { padding: 58px 12px 16px; }
  .login-card { padding: 26px 22px; }
  .pager { justify-content: space-between; }
  .table-wrap { max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); }
  .actions button { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Real DASH brand mark (favicon.svg) instead of the letter tile */
img.mark.logo { background: #fff; padding: 0; object-fit: contain; box-shadow: 0 6px 16px rgba(2, 46, 91, 0.25); }
