/* ============================================================
   DSA Admin Panel — Design System
   Modern · Clean · Minimal
   ============================================================ */

:root {
  /* Neutrals */
  --bg: #f6f8f9;
  --surface: #ffffff;
  --surface-2: #f2f5f6;
  --border: #e4e9ec;
  --border-strong: #d3dade;

  /* Text */
  --text: #0f1c22;
  --text-muted: #5d7280;
  --text-soft: #8b9ba5;

  /* Brand — vibrant lime (#4fc40e) */
  --brand: #4fc40e;
  --brand-hover: #43aa0b;
  --brand-text: #378e07;
  --brand-soft: #f0fae6;
  --brand-ring: rgba(79, 196, 14, 0.25);

  /* Status */
  --success: #17825a;
  --success-soft: #e5f5ee;
  --warning: #a76a06;
  --warning-soft: #fdf3e2;
  --danger: #c0392f;
  --danger-soft: #fdecea;
  --info: #378e07;
  --info-soft: #f0fae6;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(15, 28, 34, 0.05);
  --sh-sm: 0 1px 3px rgba(15, 28, 34, 0.06), 0 1px 2px rgba(15, 28, 34, 0.04);
  --sh-md: 0 6px 20px -6px rgba(15, 28, 34, 0.14);
  --sh-lg: 0 24px 60px -18px rgba(15, 28, 34, 0.28);

  --sidebar-w: 262px;
  --topbar-h: 66px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
svg { flex: 0 0 auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Layout ---------- */
.layout { min-height: 100vh; }

/* ---------- Layout & Header ---------- */
.layout { min-height: 100vh; }
.sidebar { display: none !important; }
.main { margin-left: 0; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 68px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-logo {
  height: 42px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(140deg, #4fc40e, #349906);
  color: #0f1c22;
  display: grid; place-items: center;
  font-weight: 900; font-size: 13.5px;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px -3px rgba(79, 196, 14, 0.4);
}
.brand-text { min-width: 0; }
.brand-text b { display: block; font-size: 14.5px; letter-spacing: -0.02em; }
.brand-text span { display: block; font-size: 10.5px; color: var(--text-soft); letter-spacing: 0.06em; text-transform: uppercase; }

.topbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
  overflow-x: auto;
  height: 68px;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 68px;
  padding: 0 16px;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
  background: transparent;
  transition: all 0.18s var(--ease);
}
.nav-item svg { width: 17px; height: 17px; opacity: 0.85; }
.nav-item:hover { background: transparent; color: var(--text); }
.nav-item.is-active {
  background: transparent !important;
  color: #379a07 !important;
  font-weight: 700;
  border-bottom-color: #379a07 !important;
}
.nav-item.is-active svg { opacity: 1; color: #379a07 !important; }

.topbar__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.user-dropdown { position: relative; }
.user-card {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; text-align: left;
  white-space: nowrap; flex-shrink: 0;
  transition: all 0.18s var(--ease);
}
.user-card:hover {
  background: var(--surface-2); border-color: var(--border-strong);
  box-shadow: var(--sh-xs);
}
.user-dropdown.is-open .user-card {
  background: var(--surface); border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.avatar {
  width: 32px !important; height: 32px !important;
  min-width: 32px !important; min-height: 32px !important;
  max-width: 32px !important; max-height: 32px !important;
  aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
  flex: 0 0 32px !important; flex-shrink: 0 !important; align-self: center !important;
  background: #379a07 !important; color: #ffffff !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 12px !important; font-weight: 700 !important; line-height: 1 !important; text-align: center !important;
  letter-spacing: 0 !important; box-sizing: border-box !important; padding: 0 !important; margin: 0 !important;
  user-select: none;
  overflow: hidden !important;
}
.avatar img, .avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}
.user-card__meta { min-width: 0; white-space: nowrap; }
.user-card__meta b { display: block; font-size: 12.5px; line-height: 1.25; white-space: nowrap; }
.user-card__meta span { display: block; font-size: 11px; color: var(--text-soft); line-height: 1.2; white-space: nowrap; }
.user-card__caret { width: 14px; height: 14px; color: var(--text-soft); transition: transform 0.2s var(--ease); margin-left: 2px; flex-shrink: 0; }
.user-dropdown.is-open .user-card__caret { transform: rotate(180deg); color: #379a07; }

.user-dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 250px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); padding: 8px; z-index: 200;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.user-dropdown.is-open .user-dropdown__menu { opacity: 1; transform: none; pointer-events: auto; }
.user-dropdown__header { display: flex; align-items: center; gap: 12px; padding: 10px 8px; }
.avatar--lg {
  width: 42px !important; height: 42px !important;
  min-width: 42px !important; min-height: 42px !important;
  max-width: 42px !important; max-height: 42px !important;
  aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
  flex: 0 0 42px !important; flex-shrink: 0 !important; align-self: center !important;
  background: #379a07 !important; color: #ffffff !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 14px !important; font-weight: 700 !important; line-height: 1 !important; text-align: center !important;
  letter-spacing: 0 !important; box-sizing: border-box !important; padding: 0 !important; margin: 0 !important;
}
.user-dropdown__header b { display: block; font-size: 13.5px; color: var(--text); line-height: 1.25; white-space: nowrap; }
.user-dropdown__header span { display: block; font-size: 11.5px; color: var(--text-soft); word-break: break-all; }
.user-dropdown__role {
  display: inline-block !important; margin-top: 4px; font-size: 10.5px !important;
  font-weight: 700; color: var(--brand-text) !important; background: var(--brand-soft);
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.user-dropdown__divider { height: 1px; background: var(--border); margin: 6px -8px; }
.user-dropdown__item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 0; background: transparent;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; text-align: left;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.user-dropdown__item svg { width: 16px; height: 16px; color: var(--text-soft); transition: color 0.16s var(--ease); }
.user-dropdown__item:hover { background: var(--surface-2); color: var(--text); }
.user-dropdown__item:hover svg { color: var(--text); }
.user-dropdown__item--danger { color: var(--danger); }
.user-dropdown__item--danger svg { color: var(--danger); }
.user-dropdown__item--danger:hover { background: var(--danger-soft); color: var(--danger); }

.icon-btn {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  border-radius: 50% !important; cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s var(--ease);
}
.icon-btn:hover {
  background: var(--border) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--sh-xs);
}
.icon-btn svg { width: 17px; height: 17px; }
.burger { display: none !important; }

.page { padding: 24px 24px 48px; max-width: 1440px; margin: 0 auto; }
.page > * + * { margin-top: 18px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.page-sub { font-size: 13px; color: var(--text-soft); margin-top: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: #379a07 !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: none !important;
}
.btn--primary:hover { background: #2e8505 !important; color: #ffffff !important; box-shadow: none !important; }
.btn--primary svg { color: #ffffff !important; }
.btn--ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn--subtle { background: var(--surface-2); color: var(--text); }
.btn--subtle:hover { background: var(--border); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #a5322a; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn--block { width: 100%; }

/* ---------- Layout & Grid Helpers ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: center;
}
.dt__filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.card__head h3 { font-size: 15px; }
.card__head p { font-size: 12.5px; color: var(--text-soft); }
.card__body { padding: 18px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 17px 18px;
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stat__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat__label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-soft); }
.stat__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat__icon svg { width: 17px; height: 17px; }
.stat__value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; }
.stat__foot { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12px; color: var(--text-soft); }
.stat__delta { font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.stat__delta svg { width: 13px; height: 13px; }
.up { color: var(--success); }
.down { color: var(--danger); }

.tone-brand { background: var(--brand-soft); color: var(--brand); }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warning { background: var(--warning-soft); color: var(--warning); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: var(--info-soft); color: var(--info); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Data table ---------- */
.dt { display: block; }
.dt__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.dt__search {
  position: relative; flex: 1 1 230px; min-width: 0; max-width: 380px;
}
.dt__search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-soft); pointer-events: none;
}
.input, .textarea {
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--text);
  transition: all 0.18s var(--ease);
}
textarea.textarea {
  height: auto; min-height: 90px; padding: 12px 16px;
}
.input::placeholder, .textarea::placeholder { color: var(--text-soft); font-weight: 400; }
.input:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus { outline: none; border-color: #379a07; background: #ffffff; box-shadow: 0 0 0 3.5px rgba(79, 196, 14, 0.05); }
.dt__search .input { padding-left: 38px; }
.dt__spacer { flex: 1 1 auto; }

.dt__scroll { overflow-x: auto; }
table.dt__table { width: 100%; border-collapse: collapse; min-width: 1080px; }
.dt__table th {
  text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft);
  padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dt__table th.is-sortable { cursor: pointer; user-select: none; }
.dt__table th.is-sortable:hover { color: var(--text); }
.dt__sort { display: inline-flex; align-items: center; gap: 5px; }
.dt__sort i { font-style: normal; opacity: 0.35; font-size: 10px; }
.dt__table th[aria-sort] .dt__sort i { opacity: 1; color: var(--brand); }
.dt__table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; vertical-align: middle;
  white-space: nowrap;
}
.dt__table tbody tr:last-child td { border-bottom: 0; }
.dt__table tbody tr { transition: background 0.15s var(--ease); }
.dt__table tbody tr:hover { background: var(--surface-2); }
.cell-strong { font-weight: 700; }
.cell-muted { color: var(--text-soft); font-size: 12.5px; }
.cell-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; }
.cell-actions { display: flex; gap: 6px; }

.dt__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--border);
}
.dt__count { font-size: 12.5px; color: var(--text-soft); }
.pager { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.pager button {
  min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--text-muted);
  transition: all 0.16s var(--ease);
}
.pager button:hover:not([disabled]) { background: var(--surface-2); color: var(--text); }
.pager button.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.pager button[disabled] { opacity: 0.4; cursor: not-allowed; }
.pager span { display: grid; place-items: center; min-width: 24px; color: var(--text-soft); }

.dt__empty { padding: 46px 20px; text-align: center; }
.dt__empty b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.dt__empty p { font-size: 13px; color: var(--text-soft); }

/* copy link cell */
.link-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-cell code {
  display: block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: var(--r-sm); color: var(--text-muted);
}
.copy-btn {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); color: var(--text-muted);
  transition: all 0.16s var(--ease);
}
.copy-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.copy-btn.is-done { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.copy-btn svg { width: 15px; height: 15px; }

/* ---------- Custom select (no native select anywhere) ---------- */
.select { position: relative; }
.select__trigger {
  width: 100%; height: 35px; min-height: 35px; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; font-size: 13.5px; font-weight: 500;
  transition: all 0.18s var(--ease);
}
.select__trigger:hover { border-color: var(--border-strong); }
.select.is-open .select__trigger { border-color: #379a07; box-shadow: 0 0 0 3.5px rgba(79, 196, 14, 0.18); }
.select__value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__value.is-placeholder { color: var(--text-soft); font-weight: 500; }
.select__caret { width: 15px; height: 15px; color: var(--text-soft); transition: transform 0.2s var(--ease); }
.select.is-open .select__caret { transform: rotate(180deg); }
.select__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: 6px; z-index: 200; max-height: 244px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
.select.is-open .select__menu { opacity: 1; transform: none; pointer-events: auto; }
.select.is-up .select__menu { top: auto; bottom: calc(100% + 6px); }
.select__opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-muted);
}
.select__opt:hover { background: var(--surface-2); color: var(--text); }
.select__opt.is-selected { background: var(--brand-soft); color: var(--brand); }
.select__opt svg { width: 15px; height: 15px; margin-left: auto; opacity: 0; }
.select__opt.is-selected svg { opacity: 1; }
.select--sm .select__trigger { padding: 8px 11px; font-size: 12.5px; }

/* ---------- Field ---------- */
.field { display: block; }
.field__label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 9px; }
.field__hint { display: block; font-size: 11.5px; color: var(--text-soft); margin-top: 5px; }
.field__error { display: none; font-size: 11.5px; color: var(--danger); margin-top: 5px; font-weight: 600; }
.field.has-error .field__error { display: block; }
.field.has-error .input, .field.has-error .select__trigger { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 18px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 28, 34, 0.45); backdrop-filter: blur(3px); }
.modal__panel {
  position: relative; width: 100%; max-width: 520px;
  max-height: calc(100vh - 36px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.24s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.modal__head h3 { font-size: 17px; }
.modal__head p { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; }
.modal__close {
  margin-left: auto; width: 32px; height: 32px; flex: 0 0 auto;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); color: var(--text-muted);
}
.modal__close:hover { background: var(--surface-2); color: var(--text); }
.modal__close svg { width: 16px; height: 16px; }
.modal__body { padding: 18px 20px; }
.modal__foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 0 20px 20px;
}

/* result block inside modal */
.result-box {
  margin-top: 16px; padding: 14px;
  border: 1px dashed var(--brand); background: var(--brand-soft);
  border-radius: var(--r-md);
}
.result-box__label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.result-box__link {
  display: block; margin-top: 8px; word-break: break-all;
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--text);
}

/* ---------- Loader ---------- */
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.spinner--dark { border-color: var(--border); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress__bar { height: 100%; width: 0; border-radius: 999px; background: var(--brand); transition: width 0.3s var(--ease); }

.gen-steps { margin-top: 14px; display: grid; gap: 9px; }
.gen-step { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.gen-step__dot {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border); display: grid; place-items: center;
}
.gen-step__dot svg { width: 10px; height: 10px; opacity: 0; color: #fff; }
.gen-step.is-active .gen-step__dot { border-color: var(--brand); }
.gen-step.is-active { color: var(--text); }
.gen-step.is-done .gen-step__dot { background: var(--success); border-color: var(--success); }
.gen-step.is-done .gen-step__dot svg { opacity: 1; }
.gen-step.is-done { color: var(--text); }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 500;
  display: grid; gap: 9px; max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: #fff;
  padding: 11px 15px; border-radius: var(--r-md);
  box-shadow: var(--sh-lg); font-size: 13px; font-weight: 600;
  animation: toast-in 0.24s var(--ease);
}
.toast svg { width: 16px; height: 16px; }
.toast--success svg { color: #4ade80; }
.toast--error svg { color: #fca5a5; }
.toast.is-out { animation: toast-out 0.2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Charts (pure CSS) ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 8px; }
.bars__col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.bars__stack { width: 100%; max-width: 42px; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.bars__seg { border-radius: 5px; min-height: 3px; animation: rise 0.6s var(--ease) both; }
.bars__x { font-size: 11px; color: var(--text-soft); font-weight: 600; }
@keyframes rise { from { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }

.meter { display: grid; gap: 14px; }
.meter__row b { font-size: 13px; }
.meter__top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.meter__top span { color: var(--text-soft); font-weight: 600; }

/* ---------- Report center ---------- */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; }
.rc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.rc-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.rc-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.rc-card__icon svg { width: 19px; height: 19px; }
.rc-card h4 { font-size: 14.5px; }
.rc-card p { font-size: 12.5px; color: var(--text-soft); }
.rc-card__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--text-soft); }
.rc-card__foot { margin-top: auto; display: flex; gap: 8px; }

.file-row { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
}

/* ---------- Skeleton Loader & Shimmer Animation ---------- */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%) !important;
  background-size: 200% 100% !important;
  animation: skeleton-shimmer 1.4s ease infinite !important;
  border-radius: var(--r-sm);
  display: inline-block;
  pointer-events: none;
}
.skeleton-text {
  height: 14px;
  width: 100%;
  border-radius: 4px;
}
.skeleton-circle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
}
.skeleton-card {
  height: 98px;
  width: 100%;
  border-radius: var(--r-md);
}
.skeleton-row td {
  padding: 14px 16px !important;
}
.page-fade {
  opacity: 0;
  animation: fadeInContent 0.28s var(--ease) forwards;
}
@keyframes fadeInContent {
  to { opacity: 1; }
}

/* ---------- Global Page Loader ---------- */
.global-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s var(--ease), visibility 0.32s var(--ease);
}
.global-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.global-loader__logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  animation: pulseLogo 1.6s infinite ease-in-out;
}
@keyframes pulseLogo {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.97); opacity: 0.85; }
}
.global-loader__bar {
  width: 140px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.global-loader__progress {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 50%;
  background: #379a07;
  border-radius: 999px;
  animation: loaderProgress 1.2s infinite ease-in-out;
}
@keyframes loaderProgress {
  0% { left: -40%; width: 40%; }
  50% { left: 30%; width: 60%; }
  100% { left: 100%; width: 30%; }
}
.global-loader__text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   Auth Split-Screen Layout (Login & Sign Up)
   ============================================================ */
.auth-split {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  background: var(--surface);
  overflow-x: hidden;
}
.auth-sidebar {
  flex: 0 0 440px;
  background: #072118;
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-sidebar::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 196, 14, 0.25) 0%, rgba(7, 33, 24, 0) 70%);
  pointer-events: none;
}
.auth-sidebar__logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.auth-sidebar__hero {
  margin: auto 0;
  padding: 36px 0;
}
.auth-sidebar__hero h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.auth-sidebar__hero p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 10px;
  line-height: 1.5;
}
.auth-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.auth-trust-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.auth-quote-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: 18px 20px;
  backdrop-filter: blur(10px);
}
.auth-quote-card p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}
.auth-quote-card b {
  display: block;
  font-size: 12px;
  margin-top: 10px;
  color: #4fc40e;
}

.auth-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 60px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.auth-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-top-bar a {
  color: #379a07;
  font-weight: 700;
  text-decoration: none;
  margin-left: 6px;
  cursor: pointer;
}
.auth-top-bar a:hover { text-decoration: underline; }

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: auto;
}
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: color 0.18s var(--ease);
}
.auth-tab::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.18s var(--ease);
}
.auth-tab.is-active { color: #379a07; }
.auth-tab.is-active::after { background: #379a07; }

.auth-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}
.otp-box {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: all 0.18s var(--ease);
}
.otp-box:focus {
  outline: none;
  border-color: #379a07;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.phone-prefix-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  height: 42px;
  overflow: hidden;
  transition: all 0.18s var(--ease);
}
.phone-prefix-input:focus-within {
  border-color: #379a07;
  box-shadow: 0 0 0 3.5px rgba(79, 196, 14, 0.18);
}
.phone-prefix {
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border-right: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  height: 100%;
}
.phone-prefix-input input {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
  height: 42px;
}
.auth-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: auto;
}
.auth-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .auth-sidebar { display: none; }
  .auth-content { padding: 24px 20px; }
}

/* ---------- Utilities ---------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.between { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.mt-0 { margin-top: 0 !important; }
.hide-sm { display: initial; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .select { flex: 1 1 165px; min-width: 150px; max-width: 220px; }

.scrim {
  position: fixed; inset: 0; background: rgba(15, 28, 34, 0.4);
  z-index: 55; opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease);
}
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-lg); }
  body.nav-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .burger { display: grid; }
}
@media (max-width: 720px) {
  body { font-size: 13.5px; }
  .page { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar h1 { font-size: 15.5px; }
  .topbar__sub { display: none; }
  .hide-sm { display: none; }
  .stat__value { font-size: 24px; }
  .card__head { grid-template-columns: 1fr; }
  .card__head .row { justify-content: flex-start; }
  .dt__toolbar { padding: 12px; }
  .dt__search { max-width: none; flex: 1 1 100%; }
  .filters .select { max-width: none; flex: 1 1 100%; }
  .link-cell code { max-width: 170px; }
  .modal { padding: 10px; align-items: flex-end; }
  .modal__panel { max-width: none; border-radius: var(--r-xl) var(--r-xl) 12px 12px; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
  .pager { margin-left: 0; }
  .toasts { left: 12px; right: 12px; }
}

/* ============================================================
   Enterprise workspace — Graphite Office
   Space Grotesk + DM Sans / precise, restrained, data-forward
   ============================================================ */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e1e4e8;
  --border-strong: #c8cdd3;
  --text: #202124;
  --text-muted: #5f6368;
  --text-soft: #74787d;
  --brand: #4fc40e;
  --brand-hover: #43aa0b;
  --brand-soft: #f0fae6;
  --brand-ring: rgba(79, 196, 14, 0.25);
  --success: #107c10;
  --success-soft: #edf7ed;
  --warning: #8a5d00;
  --warning-soft: #fff5d9;
  --danger: #c42b1c;
  --danger-soft: #fdf0ef;
  --info: #378e07;
  --info-soft: #f0fae6;
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 6px;
  --r-xl: 8px;
  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --sh-lg: 0 16px 40px rgba(0, 0, 0, 0.16);
  --sidebar-w: 232px;
  --topbar-h: 60px;
}

body { font-family: "DM Sans", "Segoe UI", sans-serif; font-size: 13px; line-height: 1.45; }
h1, h2, h3, h4 { font-family: "Space Grotesk", "Segoe UI", sans-serif; font-weight: 600; letter-spacing: 0; }

.sidebar { box-shadow: none; }
.sidebar__brand { padding: 0 18px; gap: 11px; }
.brand-mark { width: 28px; height: 28px; border-radius: 3px; background: var(--brand); box-shadow: none; }
.brand-mark > span { width: 12px; height: 12px; border: 2px solid var(--surface); display: block; }
.brand-text b { font-family: "Space Grotesk", sans-serif; font-size: 14px; letter-spacing: 0; }
.brand-text span { font-size: 9px; letter-spacing: .08em; }
.sidebar__nav { padding: 14px 10px; }
.nav-label { padding: 14px 10px 5px; font-size: 9px; letter-spacing: .1em; }
.nav-link { min-height: 36px; padding: 8px 10px; margin-bottom: 2px; border-radius: 4px; font-size: 13px; font-weight: 500; }
.nav-link svg { width: 17px; height: 17px; }
.nav-link.is-active { color: #378e07; background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.sidebar__foot { padding: 12px; }
.avatar { width: 32px !important; height: 32px !important; min-width: 32px !important; min-height: 32px !important; max-width: 32px !important; max-height: 32px !important; aspect-ratio: 1 / 1 !important; border-radius: 50% !important; flex: 0 0 32px !important; flex-shrink: 0 !important; align-self: center !important; background: #379a07 !important; color: #ffffff !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 11px !important; font-weight: 700 !important; line-height: 1 !important; text-align: center !important; padding: 0 !important; margin: 0 !important; }
.user-card__meta b { font-size: 12px; font-weight: 600; }
.user-card__meta span { font-size: 10px; }

.topbar { background: var(--surface); backdrop-filter: none; padding: 0 24px; }
.topbar h1 { font-size: 16px; }
.topbar__sub { font-size: 11px; }
.topbar__right { gap: 6px; }
.global-search { position: relative; width: 240px; }
.global-search svg { position: absolute; width: 15px; height: 15px; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.global-search input { width: 100%; height: 32px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); font: inherit; color: var(--text); }
.global-search input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 2px var(--brand-ring); }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--border) !important; background: var(--surface-2) !important; border-radius: 50% !important; }
.icon-btn:hover { background: var(--border) !important; border-color: var(--border-strong) !important; }
.icon-btn svg { width: 17px; height: 17px; }

.page { max-width: none; padding: 24px 28px 44px; }
.page > * + * { margin-top: 18px; }
.btn { min-height: 34px; padding: 7px 13px; border-radius: 4px; font-size: 12.5px; font-weight: 600; }
.btn--primary { background: #379a07 !important; color: #ffffff !important; box-shadow: none !important; }
.btn--primary:hover { background: #2e8505 !important; color: #ffffff !important; box-shadow: none !important; }
.btn--subtle { border-color: var(--border); }
.btn--sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }

.card { border-radius: 6px; box-shadow: none; }
.card__head { padding: 14px 16px; }
.card__head h3 { font-size: 14px; }
.card__head p { font-size: 11.5px; margin-top: 2px; }
.card__body { padding: 16px; }

.stats { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.stat { flex: 1 1 0px; min-width: 0; min-height: 112px; padding: 17px 18px; border: 0; border-right: 1px solid var(--border); border-radius: 0; box-shadow: none; overflow: visible; }
.stat:last-child { border-right: 0; }
.stat:hover { transform: none; box-shadow: inset 0 -2px var(--brand); background: var(--surface-2); }
.stat__label { font-size: 10px; letter-spacing: .07em; }
.stat__icon { width: 28px; height: 28px; border-radius: 4px; }
.stat__icon svg { width: 15px; height: 15px; }
.stat__value { margin-top: 8px; font-family: "Space Grotesk", sans-serif; font-size: 25px; font-weight: 600; letter-spacing: 0; }
.stat__foot { margin-top: 4px; font-size: 11px; }

.badge { padding: 2px 8px; border-radius: 3px; font-size: 10.5px; font-weight: 600; }
.badge::before { width: 4px; height: 4px; }
.chip { border-radius: 3px; padding: 5px 10px; font-size: 12px; }
.chip.is-active { background: var(--brand); border-color: var(--brand); }

.dt__toolbar { padding: 11px 12px; gap: 8px; }
.dt__search { max-width: 320px; }
.input, .textarea { min-height: 34px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; }
.dt__table th { padding: 10px 14px; background: var(--surface-2); font-size: 9.5px; letter-spacing: .07em; }
.dt__table td { padding: 11px 14px; font-size: 12.5px; }
.cell-strong { font-weight: 600; }
.cell-muted { font-size: 11.5px; }
.cell-mono { font-size: 11.5px; }
.dt__foot { padding: 10px 12px; }
.pager button { min-width: 30px; height: 30px; border-radius: 3px; font-size: 12px; }
.pager button.is-active { background: var(--brand); border-color: var(--brand); }
.copy-btn { width: 28px; height: 28px; border-radius: 3px; }
.link-cell code { border-radius: 3px; }

.select__trigger { min-height: 34px; padding: 7px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 500; }
.select__menu { top: calc(100% + 4px); border-radius: 5px; padding: 4px; }
.select__opt { padding: 7px 9px; border-radius: 3px; font-size: 12.5px; font-weight: 500; }
.field__label { font-size: 11.5px; font-weight: 600; }

.modal__backdrop { background: rgba(32, 33, 36, .48); backdrop-filter: none; }
.modal__panel { border: 1px solid var(--border); border-radius: 7px; }
.modal__head { padding: 18px 18px 0; }
.modal__head h3 { font-size: 16px; }
.modal__body { padding: 16px 18px; }
.modal__foot { padding: 0 18px 18px; }
.modal__close { border-radius: 3px; }
.result-box { border-style: solid; border-radius: 4px; }

.bars__seg { border-radius: 2px; }
.legend i { border-radius: 1px; }
.progress, .progress__bar { border-radius: 2px; }
.rc-grid { gap: 12px; }
.rc-card { border-radius: 6px; padding: 16px; box-shadow: none; gap: 10px; }
.rc-card:hover { transform: none; box-shadow: inset 0 -2px var(--brand); }
.rc-card__icon { width: 34px; height: 34px; border-radius: 4px; }
.file-ico { border-radius: 3px; }
.between h3 { font-family: "Space Grotesk", sans-serif; font-weight: 600; }

@media (max-width: 1024px) {
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 720px) {
  .page { padding: 16px 12px 36px; }
  .topbar { padding: 0 12px; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 98px; padding: 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat__value { font-size: 22px; }
  .between { grid-template-columns: 1fr; }
  .between .btn { justify-self: start; }
  .modal__panel { border-radius: 7px 7px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
