:root {
  --navy: #172554;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --sidebar: #0f172a;
  --sidebar-deep: #0a0f1d;
  --sidebar-text: #cbd5e1;
  --hover: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --sidebar-w: 256px;
  --top-h: 64px;
  color-scheme: light;
}

html.dark {
  --navy: #0f172a;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --bg: #090d16;
  --card: #0f172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #1e293b;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --hover: #1e293b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
button, input, textarea { font: inherit; color: inherit; }
select, select option {
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
  color: #0f172a;
  background-color: #ffffff;
}
html.dark select, html.dark select option {
  color: #f8fafc;
  background-color: #0f172a;
}
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }

.icon { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.icon.lg { width: 20px; height: 20px; }
.icon.sm { width: 14px; height: 14px; }

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.shell { min-height: 100vh; background: var(--bg); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  border-right: 1px solid #1e293b;
  transition: transform 0.2s ease, width 0.2s ease;
}
.shell.is-collapsed { --sidebar-w: 80px; }
.main {
  min-height: 100vh;
  padding-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition: padding-left 0.2s ease;
}
.content {
  width: auto;
  margin: 0;
  padding: 28px 24px 48px;
}

.brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  background: var(--sidebar-deep);
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: white;
  display: grid; place-items: center;
  font-weight: 700; letter-spacing: -0.04em;
  flex: 0 0 auto;
}
.logo span { color: #bfdbfe; font-size: 11px; margin-left: 1px; }
.brand-name { color: white; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { color: #94a3b8; font-size: 11px; }
.pill {
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd; background: rgba(37, 99, 235, 0.18);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: #94a3b8;
}
.icon-btn:hover { background: #1e293b; color: white; }
.icon.is-flipped { transform: rotate(180deg); transition: transform 0.2s ease; }
.icon-btn.on-light { color: var(--muted); }
.icon-btn.on-light:hover { background: var(--hover); color: var(--text); }

.nav-scroll { flex: 1; overflow: auto; padding: 14px 10px 18px; }
.nav-node { position: relative; border-radius: 12px; margin-bottom: 6px; }
.nav-head, .nav-link, .nav-sub button, .flyout button {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  text-align: left; color: inherit; border-radius: 10px;
}
.nav-head, .nav-link {
  padding: 9px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #94a3b8;
}
.nav-link { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; color: #cbd5e1; }
.nav-link.active, .nav-link:hover, .nav-head:hover { background: rgba(30, 41, 59, 0.7); color: white; }
.nav-link.active { background: var(--accent); }
.nav-node.open {
  background: #131d33;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 22px -6px rgba(37, 99, 235, 0.45);
  animation: ambientGlow 4s ease-in-out infinite;
}
.nav-node.open > .nav-head { color: #93c5fd; }
.nav-node.has-active { background: rgba(30, 41, 59, 0.3); border: 1px solid #1e293b; }
.nav-node.has-active > .nav-head { color: #93c5fd; }
.wave, .ripple-layer { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; }
.wave { background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.28), transparent 62%); animation: liquidWash 0.7s ease-out; }
.ripple {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.85); animation: stoneRing 0.9s ease-out forwards;
}
.ripple.late { animation-delay: 0.18s; border-color: rgba(147, 197, 253, 0.55); }
.nav-sub { position: relative; padding: 0 8px 10px 18px; display: grid; gap: 2px; }
.nav-guide {
  position: absolute; left: 6px; top: 4px; bottom: 10px; width: 2px; border-radius: 2px;
  background: linear-gradient(#60a5fa, transparent); animation: guideIn 0.55s ease-out;
}
.wave-item { animation: waveItem 0.42s ease-out both; }
.nav-sub a, .flyout a {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; font-size: 13px; color: #cbd5e1; border-radius: 8px;
}
.nav-sub a.active, .flyout a.active {
  background: rgba(37, 99, 235, 0.35);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.nav-sub a:hover, .flyout a:hover { background: rgba(37, 99, 235, 0.16); color: white; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count {
  font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 6px;
  background: rgba(37, 99, 235, 0.3); color: #bfdbfe; border: 1px solid rgba(59, 130, 246, 0.4);
}
.count.rose { background: rgba(244, 63, 94, 0.28); color: #fecdd3; border-color: rgba(244, 63, 94, 0.45); }
.chev { transition: transform 0.2s ease; }
.nav-node.open .chev { transform: rotate(180deg); }
.hub {
  padding: 12px; border-top: 1px solid #1e293b; background: var(--sidebar-deep); font-size: 12px;
}
.hub-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.hub small { display: block; color: #64748b; font-size: 10px; }
.tag { font-size: 10px; background: #1e293b; color: #94a3b8; border-radius: 4px; padding: 2px 6px; }

.shell.is-collapsed .brand-copy,
.shell.is-collapsed .nav-head .nav-label,
.shell.is-collapsed .nav-link .nav-label,
.shell.is-collapsed .chev,
.shell.is-collapsed .hub-copy,
.shell.is-collapsed .tag,
.shell.is-collapsed .nav-sub { display: none; }
.shell.is-collapsed .nav-head, .shell.is-collapsed .nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
.shell.is-collapsed .hub-row { justify-content: center; }
.shell.is-collapsed .nav-node { overflow: visible; }
.flyout {
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  width: 248px;
  background: #131d33;
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 14px;
  padding: 8px;
  z-index: 50;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.shell.is-collapsed .flyout { position: fixed; left: 90px; top: 16px; }
.shell.is-collapsed .nav-node:hover .flyout,
.shell.is-collapsed .nav-node:focus-within .flyout { display: block; }
.flyout-bridge { position: absolute; top: 0; bottom: 0; left: -16px; width: 16px; }
.flyout-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; }
.flyout-head > div { min-width: 0; flex: 1; }
.flyout-head .count { flex: 0 0 auto; white-space: nowrap; }
.flyout-icon {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(37, 99, 235, 0.2); color: #93c5fd; flex: 0 0 auto;
}
.flyout-title { color: white; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.flyout-meta { color: #64748b; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 500; margin-top: 2px; }
@keyframes stoneRing { to { transform: scale(8); opacity: 0; } }
@keyframes liquidWash { from { opacity: 0; } to { opacity: 1; } }
@keyframes guideIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes waveItem { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes ambientGlow {
  0%, 100% { box-shadow: 0 0 16px -8px rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 0 26px -4px rgba(37, 99, 235, 0.55); }
}

.backdrop { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; min-width: 0; }
.crumbs strong { color: var(--text); font-weight: 650; }
.search-btn, .menu-btn, .select-btn {
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px; color: var(--muted);
}
.search-btn {
  flex: 1; max-width: 440px; display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; font-size: 12px;
}
.search-btn span { display: flex; align-items: center; gap: 8px; }
kbd { border: 1px solid var(--line); background: var(--card); border-radius: 4px; padding: 1px 5px; font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.select-btn, .menu-btn { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: var(--text); font-size: 12px; font-weight: 600; }
.menu { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12); padding: 6px; z-index: 40;
}
.dropdown button, .dropdown .drop-item {
  width: 100%; text-align: left; border-radius: 8px; padding: 8px 10px; display: block;
}
.dropdown button:hover { background: var(--hover); }
.drop-label { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; font-weight: 700; }
.drop-title { font-weight: 650; font-size: 13px; }
.drop-meta { color: var(--muted); font-size: 12px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: white;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.only-mobile { display: none; }

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; letter-spacing: -0.03em; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 13px; max-width: 680px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 8px;
  padding: 8px 12px; font-size: 12px; font-weight: 650; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
html.dark .btn-danger { background: rgba(127, 29, 29, 0.35); border-color: #7f1d1d; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.chips { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.chips button { border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.chips button.active { background: var(--accent); color: white; }

.kpi-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.kpi-grid.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: left; box-shadow: var(--shadow); min-width: 0;
}
.kpi.is-click { cursor: pointer; }
.kpi.is-click:hover { border-color: #cbd5e1; }
.kpi-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.kpi strong { display: block; margin-top: 8px; font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; font-weight: 650; }
.up { color: var(--success); } .down { color: var(--danger); } .flat { color: var(--muted); }
.kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 14px; }
.card-b { padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.stack { display: grid; gap: 14px; }

.alert {
  border-radius: var(--radius); padding: 14px; border: 1px solid #fecaca; background: #fff1f2;
}
html.dark .alert { background: rgba(136, 19, 55, 0.25); border-color: #9f1239; }
.alert h3 { font-size: 14px; color: #9f1239; }
html.dark .alert h3 { color: #fecdd3; }
.alert p { color: #be123c; font-size: 12px; margin-top: 2px; }
html.dark .alert p { color: #fda4af; }

.table-scroll { overflow-x: auto; }
.oh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.oh-table th { text-align: left; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
.oh-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.oh-table tr:hover td { background: rgba(148, 163, 184, 0.08); }
.oh-table button.link { color: var(--accent); font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; border: 1px solid var(--line);
  padding: 2px 8px; font-size: 12px; font-weight: 650; background: var(--hover); white-space: nowrap;
}
.badge-blue { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.badge-indigo { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
.badge-amber { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.badge-sky { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.badge-green { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.badge-red { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.badge-orange { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.badge-slate { color: #334155; background: #f8fafc; border-color: #e2e8f0; }
html.dark .badge-blue { color: #93c5fd; background: rgba(30, 58, 138, 0.45); border-color: #1e3a8a; }
html.dark .badge-indigo { color: #a5b4fc; background: rgba(49, 46, 129, 0.45); border-color: #312e81; }
html.dark .badge-amber { color: #fcd34d; background: rgba(120, 53, 15, 0.4); border-color: #78350f; }
html.dark .badge-sky { color: #7dd3fc; background: rgba(12, 74, 110, 0.45); border-color: #0c4a6e; }
html.dark .badge-green { color: #86efac; background: rgba(20, 83, 45, 0.45); border-color: #14532d; }
html.dark .badge-red { color: #fda4af; background: rgba(136, 19, 55, 0.4); border-color: #881337; }
html.dark .badge-orange { color: #fdba74; background: rgba(124, 45, 18, 0.4); border-color: #7c2d12; }
html.dark .badge-slate { color: #cbd5e1; background: #1e293b; border-color: #334155; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.field, .select {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; }
.field input, .area { outline: none; background: transparent; border: 0; width: 100%; color: inherit; }
.select { width: auto; min-width: 150px; flex: 0 1 180px; background-color: var(--card); color: var(--text); }
.field:focus-within, .select:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.bulk {
  display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px;
}
html.dark .bulk { background: rgba(30, 58, 138, 0.35); border-color: #1e3a8a; }
.pager { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; color: var(--muted); font-size: 12px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 36px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 4px; }
.bar.alt { background: #93c5fd; }
.bar-col span { font-size: 11px; color: var(--muted); }
.meter { height: 8px; background: var(--hover); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }

.timeline { display: grid; gap: 0; }
.tl {
  display: grid; grid-template-columns: 16px 1fr; gap: 12px;
}
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 4px; }
.tl-dot.wait { background: var(--line); }
.tl-line { width: 2px; flex: 1; background: var(--line); }
.tl-body { padding-bottom: 16px; }
.tl-body strong { display: block; font-size: 13px; }
.tl-body p { color: var(--muted); font-size: 12px; }

.backdrop-modal, .drawer-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 60;
}
.modal, .drawer {
  position: fixed; z-index: 70; background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.modal { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; border-radius: 16px; }
.drawer { top: 0; right: 0; height: 100%; width: min(440px, 100%); border-left: 1px solid var(--line); overflow: auto; }
.modal-h, .drawer-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.modal-b, .drawer-b { padding: 16px; display: grid; gap: 12px; }
.modal-f, .drawer-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; }
.modal-f { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); }
label.lbl { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
label.lbl input, label.lbl select, label.lbl textarea {
  border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; color: var(--text); font-weight: 500;
}
.form-grid { display: grid; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }

.toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: flex; align-items: center; gap: 8px; max-width: min(420px, calc(100% - 32px));
  background: #0f172a; color: white; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.toast button { color: #94a3b8; }

.courier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.courier-card { padding: 16px; display: grid; gap: 12px; }
.courier-top { display: flex; justify-content: space-between; gap: 8px; }
.mark {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: white; font-weight: 800; font-size: 12px;
}
.mark.trax { background: #2563eb; } .mark.tcs { background: #dc2626; } .mark.postex { background: #059669; }
.mark.leopards { background: #d97706; } .mark.call { background: #0891b2; } .mark.mp { background: #ea580c; }
.stat-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.stat-row b { color: var(--text); }

.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.login-top { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 86%, transparent); }
.login-main { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; position: relative; overflow: hidden; }
.login-card:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #2563eb, #4f46e5, #0ea5e9); }
.login-card h1 { text-align: center; font-size: 24px; letter-spacing: -0.03em; }
.login-card .lede { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.quick { display: grid; gap: 8px; margin-top: 14px; }
.quick button { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.quick button:hover { background: var(--hover); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a, .tabs button { padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 650; color: var(--muted); }
.tabs a.active, .tabs button.active { background: var(--card); color: var(--text); border: 1px solid var(--line); }

#blazor-error-ui {
  background: #fef3c7; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
  display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000; color: #0f172a;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

@media (max-width: 1200px) {
  .kpi-grid, .kpi-grid.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2, .courier-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-105%); }
  .sidebar.open { transform: translateX(0); }
  .shell.is-collapsed { --sidebar-w: 256px; }
  .main { padding-left: 0; }
  .backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); z-index: 35; }
  .only-desktop { display: none; }
  .only-mobile { display: inline-flex; }
  .crumbs { display: none; }
  .search-btn { display: none; }
  .content { padding: 20px 16px 40px; }
}
@media (max-width: 720px) {
  .page-head { flex-direction: column; }
  .kpi-grid, .kpi-grid.seven, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-top { padding: 0 14px; }
  .hide-sm { display: none; }
}
