/* ==========================================================================
   Discovery Control Center — admin design system
   Desktop-first (target ~1600x900), tablet-aware. Independent of the
   customer app stylesheet; shares only the Discovery brand colours.
   ========================================================================== */

:root {
  --a-primary: #0f5132;
  --a-primary-dark: #0a3d26;
  --a-primary-soft: #e8f3ee;
  --a-accent: #faff64;
  --a-bg: #ffffff;
  --a-surface: #f7f8f6;
  --a-text: #1f1f1f;
  --a-muted: #6c757d;
  --a-border: #e5e8e5;
  --a-success: #19b56b;
  --a-success-soft: #e4f6ee;
  --a-warning: #f4c43d;
  --a-warning-soft: #fef6dc;
  --a-error: #f04444;
  --a-error-soft: #fde8e8;
  --a-info: #63b7e8;
  --a-info-soft: #e7f3fb;

  --a-radius: 14px;
  --a-radius-sm: 10px;
  --a-radius-pill: 999px;
  --a-shadow: 0 1px 2px rgba(15, 81, 50, 0.05), 0 4px 14px rgba(31, 31, 31, 0.04);
  --a-shadow-pop: 0 12px 36px rgba(31, 31, 31, 0.16);

  --a-sidebar-w: 264px;
  --a-sidebar-w-collapsed: 76px;
  --a-header-h: 68px;
  --a-font: 'Poppins', 'Noto Sans Georgian', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--a-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--a-text);
  background: var(--a-surface);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- gate (shown while access is verified) ---------- */
.adm-gate {
  min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px;
  text-align: center; padding: 24px; color: var(--a-muted); background: var(--a-surface);
}
.adm-gate-card {
  background: var(--a-bg); border: 1px solid var(--a-border); border-radius: var(--a-radius);
  box-shadow: var(--a-shadow); padding: 32px; max-width: 440px; width: 100%; display: grid; gap: 14px; justify-items: center;
}
.adm-gate-card h2 { font-size: 18px; color: var(--a-text); }
.adm-gate-card p { font-size: 13px; color: var(--a-muted); }
.adm-spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--a-primary-soft);
  border-top-color: var(--a-primary); animation: adm-spin 0.8s linear infinite;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ---------- app frame ---------- */
.adm-app { display: grid; grid-template-columns: var(--a-sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.adm-app.is-collapsed { grid-template-columns: var(--a-sidebar-w-collapsed) minmax(0, 1fr); }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-content { padding: 24px 32px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; max-width: 1760px; width: 100%; }

/* ---------- sidebar ---------- */
.adm-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--a-primary); color: rgba(255, 255, 255, 0.82); z-index: 40;
}
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; min-height: var(--a-header-h); }
.adm-brand-tile {
  width: 36px; height: 36px; border-radius: 10px; background: var(--a-accent); color: var(--a-primary-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; letter-spacing: -0.02em;
}
.adm-brand-text { display: grid; line-height: 1.15; min-width: 0; }
.adm-brand-text strong { color: #fff; font-size: 14px; letter-spacing: 0.1em; font-weight: 600; }
.adm-brand-text span { font-size: 9.5px; letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.6); margin-top: 3px; }

.adm-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.adm-nav-label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); padding: 16px 12px 6px; font-weight: 500; white-space: nowrap; }
.adm-nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; margin: 1px 0;
  border-radius: var(--a-radius-sm); font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.82); text-align: left;
  transition: background 0.15s ease, color 0.15s ease; white-space: nowrap;
}
.adm-nav-item:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.adm-nav-item.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; }
.adm-nav-item.is-active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--a-accent);
}
.adm-nav-item.is-soon { color: rgba(255, 255, 255, 0.42); cursor: default; }
.adm-nav-item.is-soon:hover { background: transparent; color: rgba(255, 255, 255, 0.42); }
.adm-nav-item .adm-nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.adm-chip-soon { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.adm-nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--a-radius-pill); background: var(--a-accent); color: var(--a-primary-dark);
  font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; line-height: 1;
}
.adm-nav-chevron { width: 16px; height: 16px; transition: transform 0.2s ease; opacity: 0.7; }
.adm-nav-parent[aria-expanded='true'] .adm-nav-chevron { transform: rotate(180deg); }
.adm-subnav { display: grid; padding: 2px 0 6px 20px; margin-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.adm-subnav[hidden] { display: none; }
.adm-subnav .adm-nav-item { padding: 7px 12px; font-size: 13px; }
.adm-subnav .adm-nav-item.is-active::before { left: -21px; top: 6px; bottom: 6px; }

.adm-sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 10px 12px; }
.adm-collapse-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: var(--a-radius-sm); color: rgba(255,255,255,.7); font-size: 13px; }
.adm-collapse-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.adm-collapse-btn .icon { transition: transform 0.2s ease; }

.adm-app.is-collapsed .adm-brand { padding-left: 20px; }
.adm-app.is-collapsed .adm-brand-text,
.adm-app.is-collapsed .adm-nav-text,
.adm-app.is-collapsed .adm-nav-label,
.adm-app.is-collapsed .adm-nav-chevron,
.adm-app.is-collapsed .adm-chip-soon,
.adm-app.is-collapsed .adm-collapse-btn span { display: none; }
.adm-app.is-collapsed .adm-nav-item { justify-content: center; padding: 10px; }
.adm-app.is-collapsed .adm-nav-badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
.adm-app.is-collapsed .adm-subnav { margin-left: 0; padding-left: 0; border-left: 0; }
.adm-app.is-collapsed .adm-nav-item.is-active::before { left: -12px; }
.adm-app.is-collapsed .adm-collapse-btn { justify-content: center; }
.adm-app.is-collapsed .adm-collapse-btn .icon { transform: rotate(180deg); }

.adm-tip {
  position: fixed; z-index: 100; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: var(--a-text); color: #fff;
  font-size: 12px; white-space: nowrap; box-shadow: var(--a-shadow-pop); transform: translateY(-50%);
}

/* ---------- header ---------- */
.adm-header {
  position: sticky; top: 0; z-index: 30; height: var(--a-header-h); display: flex; align-items: center; gap: 16px;
  padding: 0 32px; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--a-border); backdrop-filter: saturate(1.2) blur(6px);
}
.adm-menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--a-radius-sm); align-items: center; justify-content: center; }
.adm-menu-btn:hover { background: var(--a-surface); }
.adm-title { min-width: 0; flex: 1; }
.adm-title h1 { font-size: 18px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-title p { font-size: 12px; color: var(--a-muted); }
.adm-header-right { display: flex; align-items: center; gap: 12px; }
.adm-live {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--a-radius-pill);
  font-size: 12px; font-weight: 500; background: var(--a-surface); color: var(--a-muted); border: 1px solid var(--a-border);
}
.adm-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #adb5bd; }
.adm-live[data-state='live'] { background: var(--a-success-soft); color: #0d7d49; border-color: transparent; }
.adm-live[data-state='live']::before { background: var(--a-success); }
.adm-live[data-state='offline'] { background: var(--a-error-soft); color: #b42323; border-color: transparent; }
.adm-live[data-state='offline']::before { background: var(--a-error); }
.adm-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--a-border); }
.adm-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--a-primary-soft); color: var(--a-primary); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.adm-user-meta { display: grid; line-height: 1.2; min-width: 0; }
.adm-user-meta strong { font-size: 13px; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-meta span { font-size: 11px; color: var(--a-muted); }
.adm-icon-btn { width: 38px; height: 38px; border-radius: var(--a-radius-sm); display: inline-grid; place-items: center; color: var(--a-muted); }
.adm-icon-btn:hover { background: var(--a-surface); color: var(--a-text); }
.adm-scrim { position: fixed; inset: 0; background: rgba(15, 30, 22, 0.45); z-index: 35; }

/* ---------- surfaces ---------- */
.adm-card { background: var(--a-bg); border: 1px solid var(--a-border); border-radius: var(--a-radius); box-shadow: var(--a-shadow); }
.adm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.adm-card-head h2 { font-size: 15px; font-weight: 600; }
.adm-card-head p { font-size: 12px; color: var(--a-muted); margin-top: 2px; }
.adm-card-body { padding: 16px 20px 20px; }
.adm-card-body.is-flush { padding: 12px 0 0; }
.adm-grid { display: grid; gap: 20px; }
.adm-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-grid.main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.adm-kpi { padding: 18px 20px; display: grid; gap: 6px; }
.adm-kpi-label { font-size: 12px; color: var(--a-muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.adm-kpi-label .icon { width: 16px; height: 16px; color: var(--a-primary); }
.adm-kpi-value { font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.adm-kpi-sub { font-size: 12px; color: var(--a-muted); }

/* ---------- buttons / inputs ---------- */
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--a-radius-sm);
  font-size: 13px; font-weight: 500; border: 1px solid var(--a-border); background: var(--a-bg); color: var(--a-text); white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.adm-btn:hover { background: var(--a-surface); }
.adm-btn:focus-visible, .adm-input:focus-visible, .adm-select:focus-visible, .adm-textarea:focus-visible, .adm-nav-item:focus-visible, .adm-icon-btn:focus-visible {
  outline: 2px solid var(--a-primary); outline-offset: 2px;
}
.adm-btn .icon { width: 16px; height: 16px; }
.adm-btn.is-primary { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.adm-btn.is-primary:hover { background: var(--a-primary-dark); }
.adm-btn.is-danger { background: var(--a-error); border-color: var(--a-error); color: #fff; }
.adm-btn.is-danger:hover { background: #d63636; }
.adm-btn.is-ghost { border-color: transparent; background: transparent; }
.adm-btn.is-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.adm-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.adm-field { display: grid; gap: 6px; }
.adm-label { font-size: 12px; font-weight: 500; color: var(--a-muted); }
.adm-input, .adm-select, .adm-textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--a-radius-sm); border: 1px solid var(--a-border); background: var(--a-bg); font-size: 13.5px;
}
.adm-textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.adm-input::placeholder { color: #9aa3ab; }
.adm-field-error { font-size: 12px; color: var(--a-error); }

/* ---------- badges / status ---------- */
.adm-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--a-radius-pill); font-size: 11.5px; font-weight: 500; background: var(--a-surface); color: var(--a-muted); white-space: nowrap; }
.adm-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.adm-badge.is-success { background: var(--a-success-soft); color: #0d7d49; }
.adm-badge.is-warning { background: var(--a-warning-soft); color: #8a6a00; }
.adm-badge.is-error { background: var(--a-error-soft); color: #b42323; }
.adm-badge.is-info { background: var(--a-info-soft); color: #23739e; }
.adm-badge.is-primary { background: var(--a-primary-soft); color: var(--a-primary); }

/* ---------- table ---------- */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 20px; background: var(--a-surface); border-top: 1px solid var(--a-border); border-bottom: 1px solid var(--a-border); white-space: nowrap; }
.adm-table td { padding: 12px 20px; border-bottom: 1px solid var(--a-border); vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr.is-clickable { cursor: pointer; }
.adm-table tbody tr.is-clickable:hover td { background: var(--a-surface); }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-mono { font-variant-numeric: tabular-nums; }
.adm-muted { color: var(--a-muted); }

.adm-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.adm-toolbar .adm-input, .adm-toolbar .adm-select { width: auto; min-width: 150px; }
.adm-search { position: relative; }
.adm-search .icon { position: absolute; left: 12px; bottom: 12px; pointer-events: none; width: 16px; height: 16px; color: var(--a-muted); }
.adm-search .adm-input { padding-left: 36px; min-width: 260px; }

/* ---------- states ---------- */
.adm-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; color: var(--a-muted); }
.adm-empty .icon { width: 32px; height: 32px; opacity: 0.5; }
.adm-empty strong { color: var(--a-text); font-size: 14px; }
.adm-error-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--a-radius-sm); background: var(--a-error-soft); color: #9b2020; font-size: 13px; }
.adm-skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef0ee 25%, #f6f7f6 37%, #eef0ee 63%); background-size: 400% 100%; animation: adm-shimmer 1.4s ease infinite; }
@keyframes adm-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- toast ---------- */
.adm-toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 10px; z-index: 120; }
.adm-toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: var(--a-radius-sm); background: var(--a-text); color: #fff; font-size: 13px; box-shadow: var(--a-shadow-pop); }
.adm-toast.is-success { background: #0d7d49; }
.adm-toast.is-error { background: #b42323; }

/* ---------- login ---------- */
.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--a-surface); }
.adm-login-card { width: 100%; max-width: 420px; background: var(--a-bg); border: 1px solid var(--a-border); border-radius: 18px; box-shadow: var(--a-shadow); padding: 36px 32px 28px; display: grid; gap: 22px; }
.adm-login-brand { display: flex; align-items: center; gap: 12px; }
.adm-login-brand .adm-brand-tile { width: 44px; height: 44px; font-size: 22px; background: var(--a-primary); color: var(--a-accent); }
.adm-login-brand strong { display: block; font-size: 15px; letter-spacing: 0.1em; color: var(--a-primary); }
.adm-login-brand span { font-size: 10px; letter-spacing: 0.22em; color: var(--a-muted); }
.adm-login-panel { display: grid; gap: 22px; }
.adm-login-panel h1 { font-size: 20px; font-weight: 600; }
.adm-login-panel p { font-size: 13px; color: var(--a-muted); margin-top: 4px; }
.adm-login form { display: grid; gap: 16px; }
.adm-login .adm-btn { height: 44px; }
.adm-btn.is-block { width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .adm-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid.main-side { grid-template-columns: minmax(0, 1fr); }
  .adm-content { padding: 20px 24px 40px; }
  .adm-header { padding: 0 24px; }
}
@media (max-width: 1100px) {
  .adm-user-meta { display: none; }
}
@media (max-width: 820px) {
  .adm-app, .adm-app.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .adm-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--a-sidebar-w); transform: translateX(-100%); transition: transform 0.22s ease; }
  .adm-app.is-drawer-open .adm-sidebar { transform: translateX(0); box-shadow: var(--a-shadow-pop); }
  .adm-app.is-collapsed .adm-brand-text, .adm-app.is-collapsed .adm-nav-text, .adm-app.is-collapsed .adm-nav-label, .adm-app.is-collapsed .adm-chip-soon, .adm-app.is-collapsed .adm-collapse-btn span, .adm-app.is-collapsed .adm-nav-chevron { display: revert; }
  .adm-app.is-collapsed .adm-nav-item { justify-content: flex-start; padding: 9px 12px; }
  .adm-app.is-collapsed .adm-nav-badge { position: static; min-width: 20px; height: 20px; font-size: 11px; padding: 0 6px; }
  .adm-collapse-btn { display: none; }
  .adm-menu-btn { display: inline-flex; }
  .adm-grid.cols-4, .adm-grid.cols-3, .adm-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .adm-content { padding: 16px 16px 32px; }
  .adm-header { padding: 0 16px; }
  .adm-live { display: none; }
}

/* ---------- page furniture ---------- */
.adm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-page-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.adm-page-actions { display: flex; align-items: center; gap: 12px; }
.adm-small { font-size: 12px; }
.adm-pad { padding: 4px 0; }
.adm-right { text-align: right; }
.adm-subhead { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); font-weight: 500; margin: 22px 0 8px; }

/* skeletons */
.adm-sk-line { height: 22px; width: 100%; }
.adm-sk-block { height: 140px; width: 100%; }
.adm-sk-chart { height: 220px; width: 100%; }

/* live operations tallies */
.adm-tally-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.adm-tally { padding: 14px 16px; border-radius: var(--a-radius-sm); background: var(--a-surface); display: grid; gap: 2px; }
.adm-tally strong { font-size: 24px; font-weight: 600; line-height: 1.15; }
.adm-tally span { font-size: 12px; color: var(--a-muted); }
.adm-tally.is-warning { background: var(--a-warning-soft); }
.adm-tally.is-warning strong { color: #8a6a00; }

/* stacked bar + legend */
.adm-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--a-surface); gap: 2px; }
.adm-stack span { display: block; min-width: 4px; }
.adm-legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.adm-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.adm-legend li span:nth-child(2) { flex: 1; color: var(--a-muted); }
.adm-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* lists */
.adm-list { list-style: none; margin: 0; padding: 0; }
.adm-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--a-border); }
.adm-list li:last-child { border-bottom: 0; }
.adm-card-body:not(.is-flush) .adm-list li { padding-left: 0; padding-right: 0; }

/* horizontal bars (popular products) */
.adm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.adm-bars-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.adm-bars-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar { height: 8px; border-radius: 999px; background: var(--a-primary-soft); overflow: hidden; }
.adm-bar span { display: block; height: 100%; border-radius: 999px; background: var(--a-primary); }

/* stats */
.adm-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.adm-stat { display: grid; gap: 2px; }
.adm-stat span { font-size: 12px; color: var(--a-muted); }
.adm-stat strong { font-size: 20px; font-weight: 600; line-height: 1.2; }
.adm-stat em { font-style: normal; font-size: 11.5px; color: var(--a-muted); }

/* alerts */
.adm-alerts { padding: 16px 20px 20px; border-top: 1px solid var(--a-border); }
.adm-alerts h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); font-weight: 500; margin-bottom: 8px; }
.adm-alerts ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: #8a6a00; }

@media (max-width: 1280px) { .adm-tally-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .adm-tally-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- order drawer ---------- */
.adm-drawer-host { position: fixed; inset: 0; z-index: 90; }
.adm-drawer-scrim { position: absolute; inset: 0; background: rgba(15, 30, 22, 0.4); }
.adm-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--a-bg); box-shadow: var(--a-shadow-pop); display: flex; flex-direction: column; animation: adm-drawer-in 0.18s ease-out; }
@keyframes adm-drawer-in { from { transform: translateX(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.adm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--a-border); }
.adm-drawer-head h2 { font-size: 18px; font-weight: 600; }
.adm-drawer-head .adm-small { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.adm-drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 32px; }
.adm-drawer-sec { padding: 18px 0; border-bottom: 1px solid var(--a-border); }
.adm-drawer-sec:last-child { border-bottom: 0; }
.adm-drawer-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); font-weight: 500; margin-bottom: 10px; }
.adm-drawer-sec .adm-list li { padding-left: 0; padding-right: 0; }

.adm-kv { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 13px; }
.adm-kv span { color: var(--a-muted); flex-shrink: 0; }
.adm-kv strong { font-weight: 500; text-align: right; word-break: break-word; }
.adm-kv.is-total { border-top: 1px solid var(--a-border); margin-top: 6px; padding-top: 10px; font-size: 14px; }
.adm-kv.is-total strong { font-weight: 600; }
.adm-sums { margin-top: 12px; }
.adm-table-tight th, .adm-table-tight td { padding-left: 10px; padding-right: 10px; }
.adm-table-tight th:first-child, .adm-table-tight td:first-child { padding-left: 0; }
.adm-table-tight th:last-child, .adm-table-tight td:last-child { padding-right: 0; }

.adm-timeline { list-style: none; margin: 0 0 8px; padding: 0 0 0 16px; border-left: 2px solid var(--a-primary-soft); display: grid; gap: 14px; }
.adm-timeline li { position: relative; font-size: 13px; }
.adm-timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--a-primary); border: 2px solid var(--a-bg); }
.adm-timeline li > span { display: block; font-size: 11.5px; color: var(--a-muted); }

.adm-actions { display: grid; gap: 16px; }
.adm-inline { display: flex; gap: 8px; }
.adm-inline .adm-select { flex: 1; }

/* ---------- filter chips + pagination ---------- */
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { height: 32px; padding: 0 14px; border-radius: var(--a-radius-pill); border: 1px solid var(--a-border); background: var(--a-bg); font-size: 12.5px; font-weight: 500; color: var(--a-muted); }
.adm-chip:hover { background: var(--a-surface); }
.adm-chip.is-active { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.adm-chip .adm-chip-n { margin-left: 6px; opacity: 0.75; }
.adm-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--a-border); font-size: 12.5px; color: var(--a-muted); }
.adm-pager-btns { display: flex; gap: 8px; }
.adm-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.adm-filters .adm-search .adm-input { min-width: 0; }
.adm-row-warn td:first-child { box-shadow: inset 3px 0 0 var(--a-warning); }
.adm-age-warn { color: #8a6a00; font-weight: 500; }
.adm-list li.is-clickable { cursor: pointer; }
.adm-list li.is-clickable:hover { background: var(--a-surface); }

/* ---------- menu management ---------- */
.adm-thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--a-surface); border: 1px solid var(--a-border); object-fit: cover; display: grid; place-items: center; color: var(--a-muted); overflow: hidden; flex: none; }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-thumb .icon { width: 18px; height: 18px; }
.adm-thumb.is-lg { width: 96px; height: 96px; border-radius: 14px; }
.adm-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-cell strong { font-weight: 500; }
.adm-switch { position: relative; width: 40px; height: 22px; border-radius: 999px; border: 0; background: #cfd6d1; cursor: pointer; padding: 0; transition: background 0.15s; flex: none; }
.adm-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 0.15s; }
.adm-switch[aria-checked="true"] { background: var(--a-success); }
.adm-switch[aria-checked="true"]::after { transform: translateX(18px); }
.adm-switch:disabled { opacity: 0.5; cursor: wait; }
.adm-switch:focus-visible { outline: 2px solid var(--a-primary); outline-offset: 2px; }
.adm-form { display: grid; gap: 16px; padding-top: 18px; }
.adm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-hint { font-size: 12px; color: var(--a-muted); }
.adm-form-actions { display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--a-bg); padding: 14px 0 0; border-top: 1px solid var(--a-border); margin-top: 6px; }
.adm-check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.adm-photo-row { display: flex; gap: 14px; align-items: flex-start; }
.adm-photo-row .adm-field { flex: 1; }
.adm-danger-zone { margin-top: 8px; padding: 14px 16px; border: 1px solid #f6c9c9; background: #fff6f6; border-radius: var(--a-radius-sm); display: grid; gap: 10px; }
.adm-danger-zone h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #b42323; font-weight: 500; }
.adm-danger-zone p { font-size: 12.5px; color: var(--a-muted); }
.adm-danger-zone .adm-inline { gap: 10px; flex-wrap: wrap; }
.adm-order-btns { display: inline-flex; flex-direction: column; gap: 2px; }
.adm-order-btns .adm-icon-btn { width: 24px; height: 20px; border-radius: 6px; }
.adm-order-btns .icon { width: 14px; height: 14px; }
.adm-order-btns .is-up .icon { transform: rotate(180deg); }
.adm-order-btns .is-down .icon { transform: none; }
tr.is-hidden-item td { opacity: 0.55; }
tr.is-hidden-item td:last-child, tr.is-hidden-item td:nth-last-child(2) { opacity: 1; }
@media (max-width: 720px) { .adm-form-row { grid-template-columns: 1fr; } }

/* ---------- people pages ---------- */
.adm-link { color: var(--a-primary); text-decoration: none; }
.adm-link:hover { text-decoration: underline; }
.adm-table .adm-cell .adm-avatar { flex: none; }
tr.is-clickable .adm-muted { white-space: nowrap; }

/* ---------- content management ---------- */
.adm-contentbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 20px; position: sticky; top: 8px; z-index: 5; }
.adm-contentbar-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-phone { width: 390px; max-width: 100%; height: 720px; margin: 16px auto 0; border: 8px solid #1f1f1f; border-radius: 34px; overflow: hidden; background: #fff; }
.adm-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.adm-sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-sec-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); background: var(--a-bg); }
.adm-sec-item .adm-order-btns { flex: none; }
.adm-sec-item strong { font-weight: 500; }
.adm-sec-item > div:nth-child(2) { flex: 1; min-width: 0; }
.adm-sec-item.is-off { opacity: 0.6; }
.adm-banner-card { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); }
.adm-banner-card .adm-thumb.is-lg { width: 120px; height: 72px; border-radius: 10px; }
.adm-actions-col { display: grid; gap: 6px; justify-items: end; }
.adm-rank { width: 28px; height: 28px; border-radius: 50%; background: var(--a-primary-soft); color: var(--a-primary); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
@media (max-width: 720px) { .adm-banner-card { grid-template-columns: 1fr; } .adm-actions-col { justify-items: start; } }
.adm-vstack { display: grid; gap: 10px; min-width: 0; }

/* ---------- reports ---------- */
.adm-rangebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-range-custom { align-items: center; }
.adm-range-custom .adm-input { width: 150px; }
.adm-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-hbars li { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.adm-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hbar-label em { display: block; font-style: normal; font-size: 11.5px; color: var(--a-muted); }
.adm-hbar-track { height: 10px; border-radius: 999px; background: var(--a-surface); overflow: hidden; }
.adm-hbar-track span { display: block; height: 100%; background: var(--a-primary); border-radius: 999px; }
.adm-notavail { border: 1px dashed var(--a-border); border-radius: var(--a-radius-sm); padding: 14px 16px; background: var(--a-surface); display: grid; gap: 4px; }
.adm-notavail strong { font-size: 13px; }
.adm-notavail span { font-size: 12.5px; color: var(--a-muted); }
.adm-seg { display: inline-flex; border: 1px solid var(--a-border); border-radius: 999px; overflow: hidden; }
.adm-seg button { border: 0; background: var(--a-bg); padding: 6px 14px; font-size: 12.5px; color: var(--a-muted); }
.adm-seg button.is-active { background: var(--a-primary); color: #fff; }
.adm-json { margin: 0; padding: 12px; background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.adm-push { border: 1px solid var(--a-border); border-radius: 16px; padding: 14px 16px; background: #fff; box-shadow: var(--a-shadow); display: grid; gap: 3px; max-width: 360px; }
.adm-push-app { font-size: 10.5px; letter-spacing: 0.14em; color: var(--a-primary); font-weight: 600; }
.adm-push strong { font-size: 14px; font-weight: 600; word-break: break-word; }
.adm-push span { font-size: 13px; color: var(--a-muted); word-break: break-word; }

/* three-column card rows wrap to two columns on narrower desktops/tablets */
@media (max-width: 1100px) { .adm-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-hbars li { grid-template-columns: minmax(70px, 1.2fr) minmax(0, 2fr) auto; }
.adm-hbars li > * { min-width: 0; }
