:root {
  --header-h: 56px;
  --admin-header-h: 56px;
  --admin-accent: #2563eb;
  --admin-accent-soft: #eff6ff;
  --admin-header-bg: #ffffff;
  --admin-header-border: #e5e7eb;
  --admin-drawer-bg: #ffffff;
  --admin-drawer-w: min(720px, calc(100vw - 16px));
  --admin-muted: #6b7280;
  --admin-text: #111827;
  --admin-rail: #f3f4f6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --purple: #5b4ea8;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --line: #e5e7eb;
  --line-soft: #f0f2f5;
  --text: #111827;
  --muted: #6b7280;
  --ok: #16a34a;
  --ok-bg: #ecfdf3;
  --bad: #ef4444;
  --bad-bg: #fef2f2;
  --warn: #f59e0b;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --font: "Pretendard", "Noto Sans Myanmar", "Myanmar Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-admin-theme="dark"] {
  color-scheme: dark;
  --admin-accent: #60a5fa;
  --admin-accent-soft: #1e3a5f;
  --admin-header-bg: #121214;
  --admin-header-border: #2e2e35;
  --admin-drawer-bg: #1a1a1e;
  --admin-muted: #a1a1aa;
  --admin-text: #f4f4f5;
  --admin-rail: #0c0c0e;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #1e3a5f;
  --purple: #9b8fd4;
  --bg: #121214;
  --panel: #1a1a1e;
  --line: #2e2e35;
  --line-soft: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --ok: #4ade80;
  --ok-bg: #14301c;
  --bad: #f87171;
  --bad-bg: #3f1d1d;
  --warn: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: var(--accent); }

.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.card {
  width: 100%; max-width: 420px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px;
  box-shadow: var(--shadow);
}
.card h1 { margin: 8px 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.req { color: var(--bad); margin-left: 3px; font-weight: 800; }
input, select, textarea {
  width: 100%; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
html[data-admin-theme="dark"] input:focus,
html[data-admin-theme="dark"] select:focus,
html[data-admin-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}
.pwd-wrap { display: flex; gap: 8px; align-items: stretch; }
.pwd-wrap input { flex: 1; min-width: 0; width: auto; }
.pwd-wrap .btn.ghost { margin: 0; height: auto; flex: 0 0 auto; white-space: nowrap; }
.chk { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--muted); }
.chk input { width: auto; }
.delta-pos { color: var(--ok); font-weight: 600; }
.delta-neg { color: var(--bad); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px; padding: 9px 14px; cursor: pointer;
  color: #fff; background: var(--accent); font-weight: 600; font-size: 13px;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.gold { background: var(--purple); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.ghost {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.btn.ghost:hover { background: var(--admin-rail); }
.btn.block { width: 100%; margin-top: 16px; height: 40px; }
.data-table .btn, .btn-sm {
  height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px;
}

#admin-lang-switcher,
#admin-theme-switcher,
.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
#admin-lang-switcher button,
#admin-theme-switcher button,
.lang button {
  border: 0;
  background: transparent;
  color: #e4e4e7;
  border-radius: 999px;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
#admin-lang-switcher button.is-on,
#admin-theme-switcher button.is-on,
.lang button.on,
.lang button.is-on {
  background: #fff;
  color: #18181b;
}
.login-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 16px;
}
.err { color: var(--bad); min-height: 20px; margin-top: 8px; font-size: 13px; }

.shell { min-height: 100vh; background: var(--bg); }
body.admin-has-shell {
  padding-top: var(--admin-header-h);
  box-sizing: border-box;
}

#admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  height: var(--admin-header-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--admin-header-bg);
  border-bottom: 1px solid var(--admin-header-border);
  color: var(--admin-text);
}

#admin-topbar .admin-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--admin-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#admin-topbar .admin-menu-btn:hover { filter: brightness(1.05); }
#admin-topbar .admin-menu-btn svg { width: 16px; height: 16px; }

#admin-topbar .admin-search-btn {
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  min-width: 220px;
  max-width: 420px;
  flex: 1 1 auto;
  padding: 0 12px;
  border: 1px solid var(--admin-header-border);
  border-radius: 10px;
  background: var(--admin-rail);
  color: var(--admin-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
#admin-topbar .admin-search-btn kbd {
  margin-left: auto;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--admin-header-border);
  background: var(--admin-header-bg);
  color: var(--admin-muted);
}
#admin-topbar .admin-search-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

#admin-topbar .admin-top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}
#admin-header-tools {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

#admin-topbar #admin-lang-switcher,
#admin-topbar #admin-theme-switcher {
  box-shadow: none;
  background: var(--admin-rail);
}
#admin-topbar #admin-lang-switcher button,
#admin-topbar #admin-theme-switcher button {
  color: var(--admin-muted);
}
#admin-topbar #admin-lang-switcher button.is-on,
#admin-topbar #admin-theme-switcher button.is-on {
  background: var(--admin-header-bg);
  color: var(--admin-text);
}

#admin-account-menu { position: relative; flex: 0 0 auto; }
#admin-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(200px, 28vw);
  height: 36px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--admin-header-border);
  border-radius: 10px;
  background: var(--admin-header-bg);
  color: var(--admin-text);
  cursor: pointer;
  text-align: left;
}
#admin-account-trigger:hover,
#admin-account-menu.is-open #admin-account-trigger {
  background: var(--admin-rail);
}
.admin-avatar {
  width: 28px; height: 28px; border-radius: 8px; border: 0;
  background: linear-gradient(145deg, #3b5bdb, #1d39c4);
  color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
#admin-account-copy { min-width: 0; display: grid; gap: 1px; line-height: 1.15; }
#admin-account-copy strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; font-weight: 650;
}
#admin-account-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--admin-muted); font-size: 10.5px;
}
#admin-account-chevron {
  width: 12px; height: 12px; color: var(--admin-muted); flex: 0 0 auto;
  transition: transform 140ms ease;
}
#admin-account-menu.is-open #admin-account-chevron { transform: rotate(180deg); }
#admin-account-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 10060;
  min-width: 188px; padding: 6px;
  border: 1px solid var(--admin-header-border); border-radius: 12px;
  background: var(--admin-header-bg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  display: none;
}
#admin-account-menu.is-open #admin-account-dropdown { display: grid; gap: 2px; }
#admin-account-dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 36px;
  padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--admin-text); font: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer; text-align: left;
}
#admin-account-dropdown button:hover { background: var(--admin-rail); }
#admin-account-dropdown .admin-account-logout { color: #b42318; }
html[data-admin-theme="dark"] #admin-account-dropdown .admin-account-logout { color: #f19595; }

#admin-nav-backdrop {
  position: fixed;
  top: var(--admin-header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
#admin-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

#admin-menu-hotzone { position: relative; display: inline-flex; align-items: center; gap: 10px; }

#admin-nav-drawer {
  position: fixed;
  top: var(--admin-header-h);
  left: 8px;
  z-index: 10070;
  width: var(--admin-drawer-w);
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  max-height: calc(100vh - var(--admin-header-h) - 12px);
  background: var(--admin-drawer-bg);
  color: var(--admin-text);
  border: 1px solid var(--admin-header-border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
#admin-nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#admin-nav-drawer .admin-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 12px 14px 8px;
  border-bottom: 1px solid var(--admin-header-border); flex: 0 0 auto;
}
#admin-nav-drawer .admin-drawer-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
#admin-nav-drawer .admin-drawer-head p { margin: 2px 0 0; font-size: 11px; color: var(--admin-muted); }
#admin-nav-drawer .admin-drawer-close {
  width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: transparent; color: var(--admin-muted); cursor: pointer;
  font-size: 18px; line-height: 1;
}
#admin-nav-drawer .admin-drawer-close:hover {
  background: var(--admin-rail); color: var(--admin-text);
}
#admin-nav-drawer .admin-drawer-body {
  flex: 1 1 auto; overflow: auto; padding: 10px 12px 12px;
}
#admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.admin-nav-card {
  border: 1px solid var(--admin-header-border);
  border-radius: 10px;
  padding: 10px 10px 8px;
  background: var(--admin-drawer-bg);
}
.admin-nav-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.admin-nav-card__icon {
  width: 25px; height: 25px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; line-height: 0;
}
.admin-nav-card__icon svg { width: 16px; height: 16px; display: block; }
.admin-nav-card__icon.is-blue { background: #eaf3ff; color: #1b64da; }
.admin-nav-card__icon.is-green { background: #eaf8f2; color: #087f5b; }
.admin-nav-card__icon.is-amber { background: #fff4de; color: #ae6800; }
.admin-nav-card__icon.is-violet { background: #eaf3ff; color: #1b64da; }
.admin-nav-card__icon.is-slate { background: #f1f5f9; color: #475569; }
html[data-admin-theme="dark"] .admin-nav-card__icon.is-blue,
html[data-admin-theme="dark"] .admin-nav-card__icon.is-violet { background: #1e3a5f; color: #93c5fd; }
html[data-admin-theme="dark"] .admin-nav-card__icon.is-green { background: #14301c; color: #86efac; }
html[data-admin-theme="dark"] .admin-nav-card__icon.is-amber { background: #3a2a10; color: #fdba74; }
html[data-admin-theme="dark"] .admin-nav-card__icon.is-slate { background: #27272a; color: #a1a1aa; }
.admin-nav-card__title { font-size: 13px; font-weight: 700; flex: 1 1 auto; }
.admin-nav-card__count { font-size: 11px; color: var(--admin-muted); font-weight: 600; }
.admin-nav-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.admin-nav-card__list button {
  display: block; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px;
  font-size: 12px; text-align: left; background: transparent; color: var(--admin-text); cursor: pointer;
}
.admin-nav-card__list button:hover { background: var(--admin-rail); }
.admin-nav-card__list button.is-active {
  background: var(--admin-accent-soft); color: var(--admin-accent); font-weight: 600;
}

#admin-cmdk {
  position: fixed; inset: 0; z-index: 10080;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh; background: rgba(15, 23, 42, 0.4);
}
#admin-cmdk.is-open { display: flex; }
#admin-cmdk .admin-cmdk-panel {
  width: min(560px, calc(100vw - 24px));
  background: var(--admin-drawer-bg);
  border: 1px solid var(--admin-header-border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  overflow: hidden;
}
#admin-cmdk input {
  width: 100%; border: 0; border-bottom: 1px solid var(--admin-header-border);
  padding: 14px 16px; font-size: 15px; background: transparent; color: var(--admin-text);
  outline: none; box-sizing: border-box; border-radius: 0;
  box-shadow: none;
}
#admin-cmdk .admin-cmdk-list { max-height: 360px; overflow: auto; padding: 8px; }
#admin-cmdk .admin-cmdk-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
  color: var(--admin-text); width: 100%; border: 0; background: transparent; text-align: left;
}
#admin-cmdk .admin-cmdk-item:hover,
#admin-cmdk .admin-cmdk-item.is-on {
  background: var(--admin-accent-soft); color: var(--admin-accent);
}
#admin-cmdk .admin-cmdk-item .grp { color: var(--admin-muted); font-size: 11px; }
#admin-cmdk .admin-cmdk-empty {
  padding: 20px; text-align: center; color: var(--admin-muted); font-size: 13px;
}

.main { padding: 20px 20px 40px; max-width: 1280px; margin: 0 auto; }
.main.is-flush {
  padding: 0;
  max-width: none;
  margin: 0;
  height: calc(100vh - var(--admin-header-h));
  min-height: calc(100vh - var(--admin-header-h));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.main.is-flush #body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.main.is-list .list-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: auto;
}
.main.is-list .list-panel .list-table-card { max-height: calc(100vh - var(--admin-header-h) - 210px); }
.main.is-form #body { overflow: auto; padding: 20px; }
.list-page__hd {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--panel);
}
.list-page__hd h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.list-monitor {
  flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.list-monitor__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px 8px;
  min-height: 56px;
}
.list-monitor__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}
.list-monitor__ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple); color: #fff; flex-shrink: 0;
}
.list-monitor__title h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.list-monitor__title p { margin: 2px 0 0; font-size: 11px; color: var(--muted); font-weight: 600; }
.list-monitor__tabs { display: flex; gap: 6px; flex: 0 0 auto; }
.list-tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px 0 12px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.list-tab.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.list-tab em {
  font-style: normal;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.22); font-size: 10px; font-weight: 800;
}
.list-monitor__search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 280px; min-width: 0; justify-content: flex-end;
}
.list-monitor__search .list-search {
  flex: 1 1 240px; max-width: none; min-width: 180px;
}
.list-monitor__search .btn { height: 30px; padding: 0 14px; font-size: 12px; }
.list-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.list-kpi {
  padding: 10px 16px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.list-kpi:last-child { border-right: 0; }
.list-kpi__label {
  display: block;
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.01em;
}
.list-kpi__value {
  display: block;
  margin-top: 2px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.mail-compose {
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.mail-compose .sub { margin: 0 0 8px; }
.mail-compose__title { font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.mail-compose input, .mail-compose textarea, .mail-compose .row { max-width: 640px; }
.page-head { margin: 0 0 16px; }
.page-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi, .stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.kpi-label, .stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-value { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.kpi-value b, .stat b {
  display: block; font-size: 28px; letter-spacing: -0.03em; color: var(--text); font-weight: 800;
}
.kpi-value small { color: var(--muted); font-weight: 600; }

.ov-devices { margin: 16px 0 0; }
.ov-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.ov-card {
  display: flex;
  gap: 16px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 176px;
}
.ov-card__info { width: min(220px, 42%); flex: 0 0 auto; min-width: 140px; }
.ov-card__chart { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-mark {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--ov, var(--accent));
}
.ov-title { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.ov-value {
  margin-top: 4px; font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.ov-delta {
  display: inline-flex; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: var(--bg); color: var(--muted);
}
.ov-delta.is-up { background: var(--ok-bg); color: var(--ok); }
.ov-delta.is-down { background: var(--bad-bg); color: var(--bad); }
.ov-tabs { display: flex; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.ov-tabs button {
  height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer;
}
.ov-tabs button.is-on { background: var(--ov, var(--accent)); border-color: transparent; color: #fff; }
.ov-hi {
  display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.ov-svg { width: 100%; height: 108px; display: block; margin-top: 4px; }
.ov-svg path {
  fill: none; stroke: var(--ov, var(--accent)); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
}
.ov-svg circle { fill: var(--panel); stroke: var(--ov, var(--accent)); stroke-width: 2; }
.ov-caption { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; text-align: right; }
.ov-card.tone-blue { --ov: var(--accent); }
.ov-card.tone-green { --ov: var(--ok); }
.ov-card.tone-purple { --ov: var(--purple); }
.ov-card.tone-amber { --ov: var(--warn); }
.ov-card.tone-teal { --ov: #0d9488; }

:root {
  --dev-web: #6ba8dc;
  --dev-android: #8b7bc8;
  --dev-ios: #e89b4a;
}
.ov-donut-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  gap: 8px;
}
.ov-donut-svg {
  width: 200px;
  height: 200px;
  flex: 0 0 auto;
}
.ov-donut__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ov-donut-card .ov-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.ov-donut-card .ov-tabs { margin-top: 0; }
.ov-donut-card .ov-tabs button.is-on { background: var(--accent); }
.ov-donut__body {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}
.ov-donut-svg circle { stroke-linecap: butt; }
.ov-donut__table { flex: 1; min-width: 0; }
.ov-donut-table { min-width: 0 !important; }
.ov-donut-card .table-wrap,
.ov-donut__table .table-wrap {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.device-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.device-dot.is-web { background: var(--dev-web); }
.device-dot.is-android { background: var(--dev-android); }
.device-dot.is-ios { background: var(--dev-ios); }
.device-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.device-pill.is-web { color: #2b6cb0; background: color-mix(in srgb, var(--dev-web) 22%, var(--panel)); }
.device-pill.is-android { color: #5b4ea8; background: color-mix(in srgb, var(--dev-android) 22%, var(--panel)); }
.device-pill.is-ios { color: #b45309; background: color-mix(in srgb, var(--dev-ios) 22%, var(--panel)); }
@media (max-width: 720px) {
  .ov-donut__body { flex-direction: column; align-items: stretch; }
  .ov-donut-svg { margin: 0 auto; }
}

.list-panel {
  background: var(--panel);
  overflow: hidden;
}
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 0 0 12px;
}
.list-panel .toolbar {
  margin: 0; padding: 8px 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}
.list-panel .toolbar .btn { height: 30px; padding: 0 12px; font-size: 12px; }
.list-panel .toolbar select {
  height: 30px; padding: 0 8px; min-width: 140px; border-radius: 6px;
}
.toolbar input, .toolbar select { width: auto; min-width: 180px; max-width: 280px; }
.list-search {
  display: flex; align-items: center; gap: 6px; margin: 0;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 0 8px; height: 30px; background: var(--panel); min-width: 200px; flex: 1 1 220px; max-width: 420px;
}
.list-search:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}
.list-search input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 0; min-width: 0; width: 100%; box-shadow: none; border-radius: 0;
}
.list-search__ico { color: var(--muted); display: inline-flex; line-height: 0; }
.multi-select { position: relative; min-width: 200px; }
.multi-select__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; height: 30px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 7px;
  background: color-mix(in srgb, var(--purple) 10%, var(--panel)); color: var(--text);
  cursor: pointer; font: inherit; font-size: 12px; text-align: left;
}
.multi-select__trigger i { color: var(--muted); font-style: normal; font-size: 15px; line-height: 1; }
.multi-select.is-open .multi-select__trigger {
  border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 16%, transparent);
}
.multi-select__menu {
  display: none; position: absolute; top: calc(100% + 7px); left: 0; z-index: 30;
  width: max-content; min-width: 212px; max-height: 320px; overflow: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); box-shadow: 0 12px 30px rgba(15,23,42,.16);
}
.multi-select.is-open .multi-select__menu { display: block; }
.multi-select__option {
  display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 5px 8px;
  border-radius: 7px; color: var(--text); cursor: pointer; white-space: nowrap; font-size: 12px;
}
.multi-select__option:hover { background: var(--admin-rail); }
.multi-select__option input { width: 17px; min-width: 17px; max-width: 17px; height: 17px; margin: 0; accent-color: var(--purple); }
.single-select__option {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 5px 8px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text);
  cursor: pointer; white-space: nowrap; font: inherit; font-size: 12px; text-align: left;
}
.single-select__option:hover { background: var(--admin-rail); }
.single-select__option i { width: 15px; color: transparent; font-style: normal; font-weight: 800; }
.single-select__option.is-on i { color: var(--purple); }
.modal .single-select { width: 100%; margin-top: 6px; }

.table-wrap {
  overflow: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.list-panel .table-wrap {
  border: 0; border-radius: 0; box-shadow: none;
  max-height: none;
}
.list-table-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 220px;
  margin: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.list-table-card .table-wrap {
  flex: 1 1 auto;
  min-height: 160px;
  overflow: auto;
}
table.data-table, .table-wrap table {
  width: 100%; border-collapse: collapse; min-width: 640px;
}
.data-table th, .data-table td,
.table-wrap th, .table-wrap td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.data-table th, .table-wrap th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  background: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky; top: 0; z-index: 1;
}
.data-table td, .table-wrap td {
  font-size: 12px;
  height: 34px;
  color: var(--text);
}
.data-table tbody tr:nth-child(even) td,
.table-wrap tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--purple) 9%, var(--panel));
}
.data-table tbody tr:hover td,
.table-wrap tbody tr:hover td {
  background: var(--admin-rail);
}
.data-table tbody tr:last-child td,
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.td-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.td-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); }
.empty-cell { text-align: center !important; color: var(--muted); padding: 28px 14px !important; }
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 18px; padding: 0 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
}
.status-pill.is-ok { background: var(--ok-bg); color: var(--ok); }
.status-pill.is-ban { background: var(--bad-bg); color: var(--bad); }
.row-actions { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.row-actions .btn {
  height: 26px; padding: 0 8px; font-size: 11px; border-radius: 6px;
}
.voucher-open {
  display: inline-flex; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--admin-rail); cursor: pointer; overflow: hidden;
}
.voucher-open img {
  display: block; width: 48px; height: 48px; object-fit: cover; background: var(--admin-rail);
}
.voucher-none { color: var(--muted); font-size: 12px; }
.modal.voucher-modal { width: min(720px, 100%); }
.modal.accounts-modal { width: min(760px, 100%); }
.modal.accounts-modal .table-wrap { margin-top: 12px; }
.voucher-preview img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: 8px; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  flex-shrink: 0;
  font-size: 12px;
}
.table-footer__total { white-space: nowrap; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; }
.pager__size { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; white-space: nowrap; }
.pager__size select {
  width: 64px; min-width: 64px; height: 32px; padding: 0 8px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.pager__numbers { display: inline-flex; align-items: center; gap: 4px; }
.pager__nav, .pager__page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel); color: var(--text); cursor: pointer;
  font: inherit; font-weight: 600;
}
.pager__nav { font-size: 18px; line-height: 1; }
.pager__page:hover, .pager__nav:hover { border-color: var(--purple); color: var(--purple); }
.pager__page.is-on { border-color: var(--purple); background: var(--purple); color: #fff; }
.pager__nav:disabled { opacity: .35; cursor: not-allowed; color: var(--muted); border-color: var(--line); }
.pager__ellipsis, .pager__max { min-width: 18px; text-align: center; white-space: nowrap; }
.list-summary {
  display: flex;
  align-items: stretch;
  gap: 18px;
  min-height: 72px;
  margin: auto 12px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #342b6e;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(49,38,112,.18);
}
.list-summary__title {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 150px; border-right: 1px solid rgba(255,255,255,.16); padding-right: 18px;
}
.list-summary__title b { font-size: 13px; }
.list-summary__title span { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 10px; }
.list-summary__metrics {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr);
  align-items: stretch; flex: 1; min-width: 0;
}
.list-summary__metric { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 12px; }
.list-summary__metric span { color: rgba(255,255,255,.68); font-size: 10px; white-space: nowrap; }
.list-summary__metric b { margin-top: 3px; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-summary__metric b.is-pos { color: #86efac; }
.list-summary__metric b.is-neg { color: #fda4af; }
html[data-admin-theme="dark"] .list-summary { background: #29234e; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center; padding: 12px; z-index: 10100;
}
.modal {
  width: min(520px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px 16px 12px 12px; padding: 18px; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow);
}
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bottom { display: none; }

@media (max-width: 800px) {
  .main { padding: 14px 12px 24px; }
  .main.is-flush { padding: 0; height: auto; min-height: 0; overflow: visible; }
  .grid { grid-template-columns: 1fr 1fr; }
  table.data-table, .table-wrap table { min-width: 520px; }
  .kpi-value b, .stat b { font-size: 22px; }
  #admin-topbar .admin-search-btn { display: none; }
  #admin-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #admin-nav-drawer {
    left: 0; right: 0; width: 100%; max-width: 100%;
    border-radius: 0 0 12px 12px;
  }
  #admin-account-copy, #admin-account-chevron { display: none; }
  #admin-account-trigger {
    width: 36px; max-width: 36px; padding: 0; justify-content: center;
  }
  .list-monitor__row { flex-wrap: wrap; }
  .list-monitor__search { margin-left: 0; flex: 1 1 100%; }
  .list-kpis { grid-template-columns: 1fr 1fr; }
  .list-kpi:nth-child(2) { border-right: 0; }
  .list-kpi__value { font-size: 18px; }
  .list-table-card { margin: 8px; min-height: 200px; }
  .main.is-list .list-panel .list-table-card { max-height: none; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .pager { width: 100%; justify-content: flex-end; overflow-x: auto; }
  .pager__size > span { display: none; }
  .list-summary { margin: 8px; overflow-x: auto; }
  .list-summary__title { min-width: 128px; }
  .list-summary__metrics { flex: 0 0 auto; }
}
@media (min-width: 801px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .ov-charts { grid-template-columns: 1fr 1fr; }
  .modal-bg { align-items: center; }
  .modal { border-radius: 16px; }
}

.agent-page {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
}
.agent-rail {
  width: 264px;
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--panel);
  box-shadow: none;
}
.agent-rail__hd {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.agent-rail__ico { display: inline-flex; color: var(--accent); }
.agent-rail__title { font-size: 13px; font-weight: 700; }
.agent-rail__count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 9px;
  border-radius: 999px;
}
.agent-tree {
  flex: 1;
  overflow: auto;
  padding: 8px 10px 12px;
  min-height: 0;
}
.agent-treenode { user-select: none; }
.agent-treenode__row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.agent-treenode__row:hover { background: var(--admin-rail); }
.agent-treenode__row.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.agent-treenode__chev {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0;
  transition: transform 120ms;
  background: transparent; border: 0; padding: 0; cursor: pointer;
}
.agent-treenode__chev--empty { visibility: hidden; }
.agent-treenode.is-open > .agent-treenode__row > .agent-treenode__chev {
  transform: rotate(90deg); color: var(--text);
}
.agent-treenode__tier {
  display: inline-flex; align-items: center; justify-content: center;
  height: 18px; padding: 0 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.agent-treenode__tier.is-l1 { background: #fee2e2; color: #991b1b; }
.agent-treenode__tier.is-l2 { background: #ede9fe; color: #5b21b6; }
.agent-treenode__tier.is-l3 { background: #dbeafe; color: #1e40af; }
.agent-treenode__tier.is-l4 { background: #dcfce7; color: #166534; }
.agent-treenode__tier.is-l5,
.agent-treenode__tier.is-l6 { background: var(--bg); color: var(--muted); }
html[data-admin-theme="dark"] .agent-treenode__tier.is-l1 { background: #3f1d1d; color: #fca5a5; }
html[data-admin-theme="dark"] .agent-treenode__tier.is-l2 { background: #2a2640; color: #ddd6ff; }
html[data-admin-theme="dark"] .agent-treenode__tier.is-l3 { background: #1e3a5f; color: #93c5fd; }
html[data-admin-theme="dark"] .agent-treenode__tier.is-l4 { background: #14301c; color: #86efac; }
.agent-treenode__name {
  font-size: 13px; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agent-treenode__code { font-size: 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.agent-treenode__kc {
  margin-left: auto;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.agent-treenode__children {
  display: none;
  padding-left: 14px;
  position: relative;
}
.agent-treenode.is-open > .agent-treenode__children { display: block; }
.agent-treenode__children::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 6px;
  width: 1px; background: var(--line);
}
.agent-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.agent-main .list-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.agent-main .list-table-card { flex: 1 1 auto; max-height: none; }
.agent-main .table-wrap { max-height: none; flex: 1; }
@media (max-width: 900px) {
  .main.is-flush { height: auto; min-height: 0; overflow: visible; }
  .agent-page { flex-direction: column; min-height: 0; height: auto; }
  .agent-rail {
    width: 100%;
    flex-basis: auto;
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .agent-main { padding: 0; }
}

.pk-hand { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pk-card {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 28px; height: 38px; border-radius: 4px; gap: 1px;
  border: 1px solid #d1d5db; background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; line-height: 1;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
}
.pk-rank { font-size: 11px; }
.pk-suit { font-size: 12px; }
.pk-card.is-red { color: #dc2626; }
.pk-card.is-black { color: #111827; }
.pk-empty { color: var(--muted); }
.status-pill.is-off { background: var(--bg); color: var(--muted); }
html[data-admin-theme="dark"] .pk-card {
  background: #1e293b; border-color: #334155;
}
html[data-admin-theme="dark"] .pk-card.is-black { color: #e2e8f0; }
html[data-admin-theme="dark"] .pk-card.is-red { color: #f87171; }

.link-acc {
  background: none; border: 0; padding: 0;
  color: var(--accent); cursor: pointer; font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}
.link-acc:hover { color: var(--accent-hover); }

body.user-drawer-open { overflow: hidden; }

#user-drawer-backdrop {
  position: fixed; inset: 0; z-index: 10980;
  background: rgba(15, 23, 42, 0.48);
}
#user-profile-drawer {
  position: fixed;
  inset: 16px 16px 16px max(16px, calc(100vw - min(1280px, 96vw)));
  z-index: 10990;
  display: flex; flex-direction: column;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.upd-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.upd-bar h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.upd-id { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upd-id p { margin: 0; font-size: 12px; color: var(--muted); }
.upd-bar .btn { flex: 0 0 auto; }
.upd-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  flex: 0 0 auto;
}
.upd-meta div { min-width: 0; }
.upd-meta span { display: block; font-size: 11px; color: var(--muted); }
.upd-meta b { display: block; font-size: 13px; font-weight: 600; word-break: break-all; }
.upd-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  flex: 0 0 auto;
}
.upd-kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  min-width: 0;
}
.upd-kpi span { display: block; font-size: 11px; color: var(--muted); }
.upd-kpi b { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -0.03em; }
.upd-kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.upd-kpi b.is-pos { color: var(--ok); }
.upd-kpi b.is-neg { color: var(--bad); }
.upd-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.upd-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.upd-tab svg { width: 14px; height: 14px; display: block; }
.upd-tab.is-on { background: var(--purple); color: #fff; }
.upd-body {
  flex: 1 1 auto; overflow: auto; padding: 12px 16px 16px;
  min-height: 0;
}
.upd-body .table-footer { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.upd-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 220px; color: var(--muted); text-align: center;
}
.upd-empty svg { width: 36px; height: 36px; opacity: 0.55; }
.upd-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 12px; color: var(--muted); font-size: 12px;
}
.upd-pager .btn:disabled,
.upd-pager .btn:disabled:hover {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  #user-profile-drawer { inset: 8px; border-radius: 12px; }
  .upd-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .upd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upd-meta { grid-template-columns: 1fr; }
}

.receive-page { max-width: 1080px; }
.receive-grid { display: grid; gap: 16px; }
.receive-channel.card { max-width: none; width: 100%; padding: 18px; }
.receive-channel__hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.receive-channel__hd h3 { margin: 0; font-size: 16px; }
.quota-meta { font-variant-numeric: tabular-nums; font-size: 13px; }
.quota-bar {
  margin-top: 6px; height: 6px; border-radius: 99px;
  background: var(--line); overflow: hidden; min-width: 120px;
}
.quota-bar > i { display: block; height: 100%; background: var(--ok); }
.quota-bar.is-low > i { background: var(--warn); }
.quota-bar.is-empty > i { background: var(--bad); }
.receive-channel .row-actions { flex-wrap: wrap; }
