/* ─────────────────────────────────────────────────────────────
   adeos.css — ADEOS Enterprise Command Center theme
   Warm-cream premium design system. Light-only (matches mockup).
   Redefines the legacy --xa-* tokens so existing page markup
   (.xa-card/.kpi/.xa-tab/…) adopts the premium theme automatically.
   Pair with /adeos-shell.js (injects sidebar + topbar + legend).
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;

  /* ── Unified XoomAI palette (was warm-cream ADEOS — now matches
        xoomai-ui.css cool-grey so every page shares ONE theme) ── */
  --ad-bg:        #efeee8;   /* cool grey canvas (= --xa-bg) */
  --ad-surface:   #faf9f5;   /* white cards */
  --ad-surface-2: #eceae2;   /* cool fill (KPI tiles) */
  --ad-surface-3: #eceae2;   /* faint hover */
  --ad-border:    #e3e1d8;   /* cool hairline */
  --ad-border-2:  #d4d1c6;
  --ad-text:      #26251e;   /* near-black ink */
  --ad-text-muted:#9d9b8e;
  --ad-text-dim:  #6b6a5f;

  --ad-green:  #16a34a;  --ad-green-soft:  rgba(22,163,74,0.10);
  --ad-amber:  #d97706;  --ad-amber-soft:  rgba(217,119,6,0.10);
  --ad-purple: #6c5ce7;  --ad-purple-soft: rgba(108,92,231,0.10);
  --ad-red:    #dc2626;  --ad-red-soft:    rgba(220,38,38,0.10);

  --ad-accent: #6c5ce7;  --ad-accent-soft: rgba(108,92,231,0.10);  --ad-accent-ring: rgba(108,92,231,0.30);

  --ad-sidebar-w: 250px;
  --ad-topbar-h:  62px;
  --ad-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ad-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

  /* ── legacy --xa-* token bridge (so old page CSS themes itself) ── */
  --xa-bg: var(--ad-bg);
  --xa-surface: var(--ad-surface);
  --xa-surface-2: var(--ad-surface-2);
  --xa-border: var(--ad-border);
  --xa-border-2: var(--ad-border-2);
  --xa-text: var(--ad-text);
  --xa-text-muted: var(--ad-text-muted);
  --xa-text-dim: var(--ad-text-dim);
  --xa-accent: var(--ad-accent);
  --xa-accent-2: #8B83E8;
  --xa-accent-hover: #4940b3;
  --xa-accent-soft: var(--ad-accent-soft);
  --xa-accent-ring: var(--ad-accent-ring);
  --xa-ok: var(--ad-green);   --xa-ok-bg: var(--ad-green-soft);   --xa-ok-soft: var(--ad-green-soft);
  --xa-warn: var(--ad-amber); --xa-warn-bg: var(--ad-amber-soft); --xa-warn-soft: var(--ad-amber-soft);
  --xa-err: var(--ad-red);    --xa-err-bg: var(--ad-red-soft);    --xa-err-soft: var(--ad-red-soft);
  --xa-info: var(--ad-purple);--xa-info-soft: var(--ad-purple-soft);
  --xa-radius: 14px;  --xa-radius-sm: 10px;  --xa-radius-lg: 18px;
  --xa-shadow: 0 1px 2px rgba(28,26,20,.05);
  --xa-shadow-md: 0 4px 16px rgba(28,26,20,.07);
  --xa-shadow-lg: 0 12px 36px rgba(28,26,20,.10);
  --xa-font: var(--ad-font);
  --xa-mono: var(--ad-mono);
  --xa-sidebar-w: var(--ad-sidebar-w);
  --xa-topbar-h: var(--ad-topbar-h);
}

/* ── Unify with shell.js: drop ADEOS-only dev chrome so adeos pages match
   the clean XoomAI sidebar (status dots, legend footer, org pill). ── */
.ad-dot { display: none !important; }
.ad-legend { display: none !important; }
.ad-org-pill { display: none !important; }
.ad-nav-item { gap: 10px; }   /* tighten now that the leading dot is gone */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ad-bg);
  color: var(--ad-text);
  font-family: var(--ad-font);
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ════════════════ SHELL LAYOUT ════════════════ */

.ad-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--ad-topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: var(--ad-bg); border-bottom: 1px solid var(--ad-border);
  z-index: 50;
}
.ad-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.ad-logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ad-text); color: var(--ad-bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; letter-spacing: -.02em;
}
.ad-logo-word { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--ad-text); }
.ad-logo-sub  { font-size: 14px; color: var(--ad-text-dim); margin-left: 2px; }
.ad-top-spacer { flex: 1; }
.ad-org-pill {
  display: flex; align-items: center; gap: 7px; padding: 6px 13px;
  border: 1px solid var(--ad-border); border-radius: 999px; background: var(--ad-surface);
  font-size: 13px; color: var(--ad-text-muted); cursor: pointer;
}
.ad-org-pill svg { width: 14px; height: 14px; }
.ad-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #DCE6F5; color: #2E5C9A;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}

.ad-sidebar {
  position: fixed; top: var(--ad-topbar-h); left: 0; bottom: 0; width: var(--ad-sidebar-w);
  background: var(--ad-bg); border-right: 1px solid var(--ad-border);
  display: flex; flex-direction: column; z-index: 40;
}
.ad-nav { flex: 1; overflow-y: auto; padding: 14px 12px 8px; scrollbar-width: thin; }
.ad-nav::-webkit-scrollbar { width: 7px; }
.ad-nav::-webkit-scrollbar-thumb { background: var(--ad-border-2); border-radius: 7px; }
.ad-nav-group { margin-bottom: 6px; }
.ad-nav-group-label {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ad-text-dim); padding: 6px 10px; border-radius: 7px; margin-bottom: 2px;
}
.ad-nav-group-label:hover { background: var(--ad-surface-3); color: var(--ad-text-muted); }
.ad-nav-chevron { margin-left: auto; width: 13px; height: 13px; transition: transform .15s ease; flex: 0 0 auto; }
.ad-nav-group.is-collapsed .ad-nav-chevron { transform: rotate(-90deg); }
.ad-nav-group.is-collapsed .ad-nav-group-items { display: none; }
.ad-nav-group.is-hidden { display: none; }
.ad-nav-item.is-hidden { display: none; }

/* sidebar search */
.ad-search-wrap { position: relative; margin: 0 4px 12px; }
.ad-search {
  width: 100%; height: 36px; padding: 0 28px 0 32px; font: inherit; font-size: 13px;
  border: 1px solid var(--ad-border); border-radius: 10px; background: var(--ad-surface); color: var(--ad-text);
}
.ad-search::placeholder { color: var(--ad-text-dim); }
.ad-search:focus { outline: none; border-color: var(--ad-accent); box-shadow: 0 0 0 3px var(--ad-accent-ring); }
.ad-search-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ad-text-dim); pointer-events: none; }
.ad-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: none; background: none; color: var(--ad-text-dim); cursor: pointer; display: none; padding: 0; }
.ad-search-wrap.has-text .ad-search-clear { display: inline-flex; align-items: center; justify-content: center; }
.ad-nav-empty { padding: 16px 12px; font-size: 12.5px; color: var(--ad-text-dim); text-align: center; }
.ad-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 1px;
  border-radius: 9px; text-decoration: none; color: var(--ad-text);
  font-size: 13.5px; cursor: pointer; transition: background .12s ease;
}
.ad-nav-item:hover { background: var(--ad-surface-3); }
.ad-nav-item.is-active { background: #E8E5DB; font-weight: 600; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--ad-text-dim); }
.ad-dot--live    { background: var(--ad-green); }
.ad-dot--partial { background: var(--ad-amber); }
.ad-dot--new     { background: var(--ad-purple); }
.ad-nav-ic { width: 17px; height: 17px; flex: 0 0 auto; color: var(--ad-text-muted); }
.ad-nav-item.is-active .ad-nav-ic { color: var(--ad-text); }
.ad-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ad-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px;
  border-top: 1px solid var(--ad-border); font-size: 11px; color: var(--ad-text-dim);
}
.ad-legend span { display: flex; align-items: center; gap: 6px; }

.ad-content {
  margin-left: var(--ad-sidebar-w); padding-top: var(--ad-topbar-h);
  min-height: 100vh;
}
/* the page's own inner <main class="xa-content"> just flows */
.xa-content { display: block; max-width: 1180px; }

/* off-canvas on narrow screens */
.ad-mobile-toggle { display: none; }
@media (max-width: 980px) {
  .ad-sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--xa-shadow-lg); }
  .ad-sidebar.is-open { transform: translateX(0); }
  .ad-content { margin-left: 0; }
  .ad-mobile-toggle { display: inline-flex; }
}
@media (max-width: 620px) {
  .ad-logo-sub { display: none; }
  .ad-org-pill { display: none; }
  .ad-topbar { gap: 8px; padding: 0 12px; }
  .xa-content { padding: 18px 16px !important; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .kpi-row { grid-template-columns: 1fr; } }

/* ════════════════ COMPONENTS (.xa-*) ════════════════ */

.xa-h1 { font-size: clamp(22px, 2.6vw, 29px); font-weight: 700; letter-spacing: -.026em; line-height: 1.15; margin: 0; color: var(--ad-text); }
.xa-h2 { font-size: clamp(17px, 2vw, 21px); font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--ad-text); }
.xa-muted { color: var(--ad-text-muted); }

.xa-card {
  background: var(--ad-surface); border: 1px solid var(--ad-border);
  border-radius: var(--xa-radius-lg);
}
.xa-card--flat { box-shadow: none; }

.xa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xa-table th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ad-text-dim); padding: 12px 16px; border-bottom: 1px solid var(--ad-border);
}
.xa-table td { padding: 13px 16px; border-bottom: 1px solid var(--ad-border); color: var(--ad-text); }
.xa-table tr:last-child td { border-bottom: 0; }
.xa-table tbody tr:hover { background: var(--ad-surface-3); }

.xa-btn {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--ad-text); background: var(--ad-surface); border: 1px solid var(--ad-border-2);
  border-radius: 10px; padding: 8px 14px; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
.xa-btn:hover { background: var(--ad-surface-3); border-color: var(--ad-text-dim); }
.xa-btn:active { transform: scale(.98); }
.xa-btn--primary { background: var(--ad-accent); border-color: var(--ad-accent); color: #fff; font-weight: 600; }
.xa-btn--primary:hover { background: #4940b3; border-color: #4940b3; }
.xa-btn--ghost { background: transparent; border-color: transparent; color: var(--ad-text-muted); }
.xa-btn--ghost:hover { background: var(--ad-surface-3); color: var(--ad-text); }
.xa-btn--danger { color: var(--ad-red); border-color: var(--ad-red-soft); background: var(--ad-red-soft); }
.xa-btn--danger:hover { background: #f3dcd9; }
.xa-btn--sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.xa-btn:disabled { opacity: .5; cursor: not-allowed; }

.xa-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--ad-surface-2); color: var(--ad-text-muted);
}
.xa-badge--ok   { background: var(--ad-green-soft);  color: #0F6E52; }
.xa-badge--warn { background: var(--ad-amber-soft);  color: #8a5e10; }
.xa-badge--err  { background: var(--ad-red-soft);    color: #8f2519; }
.xa-badge--accent, .xa-badge--info { background: var(--ad-purple-soft); color: #463fae; }

.xa-tabs { display: flex; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--ad-border); overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
.xa-tabs::-webkit-scrollbar { display: none; }
.xa-tab { padding: 11px 16px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--ad-text-dim); white-space: nowrap; }
.xa-tab:hover { color: var(--ad-text-muted); }
.xa-tab--active { color: var(--ad-text); border-bottom-color: var(--ad-accent); font-weight: 600; }
.xa-tab-panel { display: none; padding-top: 20px; }
.xa-tab-panel--active { display: block; }

.xa-progress { width: 100%; height: 7px; background: var(--ad-surface-2); border-radius: 999px; overflow: hidden; }
.xa-progress > div { height: 100%; background: var(--ad-accent); border-radius: 999px; }

.xa-stat { display: flex; flex-direction: column; gap: 4px; }
.xa-stat-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ad-text); }
.xa-stat-label { font-size: 12.5px; color: var(--ad-text-muted); }

.xa-input {
  font: inherit; font-size: 14px; color: var(--ad-text); background: var(--ad-surface);
  border: 1px solid var(--ad-border-2); border-radius: 10px; padding: 8px 12px; height: 38px;
}
.xa-input:focus { outline: none; border-color: var(--ad-accent); box-shadow: 0 0 0 3px var(--ad-accent-ring); }
select.xa-input { cursor: pointer; }

.xa-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 48px 24px; text-align: center; color: var(--ad-text-dim); font-size: 14px;
}

/* ── mockup-accurate refinements (descendant + !important beats page-local) ── */
.ad-content .kpi {
  background: var(--ad-surface-2) !important; border: 1px solid transparent !important;
  box-shadow: none !important; border-radius: var(--xa-radius) !important;
}
.ad-content .kpi.hi, .ad-content .kpi--hi {
  background: var(--ad-accent-soft) !important; border-color: var(--ad-accent-ring) !important;
}
.ad-content .sec-title { color: var(--ad-text-dim); }

/* ── toast (exposed via window.xaToast) ── */
.ad-toast-area { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.ad-toast {
  background: var(--ad-text); color: var(--ad-bg); font-size: 13px; padding: 10px 15px; border-radius: 10px;
  box-shadow: var(--xa-shadow-lg); max-width: 320px;
}
.ad-toast--err  { background: var(--ad-red); color: #fff; }
.ad-toast--warn { background: var(--ad-amber); color: #2a1d05; }

/* ════════ topbar account dropdown ════════ */
.ad-acct { position: relative; }
.ad-acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: 12px;
  box-shadow: var(--xa-shadow-lg); padding: 6px; display: none; z-index: 60;
}
.ad-acct-menu.is-open { display: block; }
.ad-acct-head { padding: 8px 10px; border-bottom: 1px solid var(--ad-border); margin-bottom: 4px; }
.ad-acct-head .nm { font-size: 13px; font-weight: 600; }
.ad-acct-head .em { font-size: 12px; color: var(--ad-text-dim); }
.ad-acct-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--ad-text); padding: 8px 10px; border-radius: 8px; text-decoration: none;
}
.ad-acct-item:hover { background: var(--ad-surface-3); }
.ad-acct-item svg { width: 15px; height: 15px; color: var(--ad-text-muted); }
.ad-acct-item--danger { color: var(--ad-red); }
.ad-acct-item--danger svg { color: var(--ad-red); }

/* ════════ ⌘K command palette ════════ */
.ad-cmdk-overlay {
  position: fixed; inset: 0; background: rgba(20,18,14,.45); z-index: 200;
  display: none; align-items: flex-start; justify-content: center; padding-top: 14vh;
}
.ad-cmdk-overlay.is-open { display: flex; }
.ad-cmdk {
  width: 560px; max-width: 92vw; background: var(--ad-surface);
  border: 1px solid var(--ad-border); border-radius: 14px; box-shadow: var(--xa-shadow-lg);
  overflow: hidden;
}
.ad-cmdk-input {
  width: 100%; height: 52px; border: none; border-bottom: 1px solid var(--ad-border);
  background: none; color: var(--ad-text); font: inherit; font-size: 16px; padding: 0 18px; outline: none;
}
.ad-cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.ad-cmdk-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  cursor: pointer; font-size: 13.5px; color: var(--ad-text);
}
.ad-cmdk-item .grp { margin-left: auto; font-size: 11px; color: var(--ad-text-dim); }
.ad-cmdk-item svg { width: 16px; height: 16px; color: var(--ad-text-muted); }
.ad-cmdk-item.is-sel, .ad-cmdk-item:hover { background: var(--ad-accent-soft); }
.ad-cmdk-empty { padding: 22px; text-align: center; color: var(--ad-text-dim); font-size: 13px; }
.ad-cmdk-hint { padding: 8px 14px; border-top: 1px solid var(--ad-border); font-size: 11px; color: var(--ad-text-dim); display: flex; gap: 12px; }

/* ════════ breadcrumb ════════ */
.ad-crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ad-text-dim); margin-left: 4px; }
.ad-crumb .sep { opacity: .6; }
.ad-crumb .cur { color: var(--ad-text); font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .ad-crumb { display: none; } }

/* ════════ sortable tables ════════ */
.xa-table thead th { cursor: pointer; user-select: none; white-space: nowrap; }
.xa-table thead th:hover { color: var(--ad-text-muted); }
.xa-table thead th.is-sorted::after { content: "▲"; font-size: 9px; margin-left: 5px; color: var(--ad-accent); }
.xa-table thead th[data-sort="desc"]::after { content: "▼"; }
.ad-content .xa-table tbody tr { cursor: pointer; }

/* ════════ detail drawer (row drill-down) ════════ */
.ad-drawer { position: fixed; inset: 0; background: rgba(20,18,14,.4); z-index: 150; display: none; }
.ad-drawer.is-open { display: block; }
.ad-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 90vw;
  background: var(--ad-surface); border-left: 1px solid var(--ad-border); box-shadow: var(--xa-shadow-lg);
  display: flex; flex-direction: column; animation: adSlide .2s ease;
}
@keyframes adSlide { from { transform: translateX(20px); opacity: .4; } to { transform: none; opacity: 1; } }
.ad-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--ad-border); font-size: 15px; font-weight: 600; }
.ad-drawer-body { padding: 8px 18px 18px; overflow-y: auto; }
.ad-drawer-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ad-border); font-size: 13.5px; }
.ad-drawer-row .k { color: var(--ad-text-dim); min-width: 110px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 1px; }
.ad-drawer-row .v { color: var(--ad-text); flex: 1; }

/* ════════ a11y focus rings + content fade-in ════════ */
a:focus-visible, button:focus-visible, .xa-btn:focus-visible, input:focus-visible, select:focus-visible, .ad-nav-item:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ad-accent); outline-offset: 2px; border-radius: 6px;
}
.ad-content { animation: adFade .26s ease; }
@keyframes adFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ════════ polish pass ════════ */
/* top navigation progress bar */
.ad-loadbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--ad-accent); z-index: 300; opacity: 0; box-shadow: 0 0 8px var(--ad-accent); transition: width .2s ease, opacity .3s ease; pointer-events: none; }
.ad-loadbar.go { opacity: 1; }
/* smooth micro-interactions */
.kpi, .xa-card, .xa-panel { transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.kpi:hover { box-shadow: var(--xa-shadow); }
.xa-tab { transition: color .14s ease, border-color .14s ease; }
.ad-nav-item, .chip-ex, .ad-cmdk-item { transition: background .12s ease, color .12s ease, border-color .12s ease; }
.xa-btn { transition: background .14s ease, border-color .14s ease, transform .08s ease, color .14s ease; }
/* skeleton shimmer utility */
.ad-skel { background: linear-gradient(90deg, var(--ad-surface-2) 25%, var(--ad-surface-3) 50%, var(--ad-surface-2) 75%); background-size: 200% 100%; animation: adShimmer 1.3s infinite; border-radius: var(--xa-radius-md); }
@keyframes adShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
/* refined empty state */
.xa-empty svg { width: 28px; height: 28px; opacity: .5; }
/* scrollbar polish */
.ad-content ::-webkit-scrollbar, .ad-drawer-body::-webkit-scrollbar { width: 8px; height: 8px; }
.ad-content ::-webkit-scrollbar-thumb, .ad-drawer-body::-webkit-scrollbar-thumb { background: var(--ad-border-2); border-radius: 8px; }
/* table polish: numeric cols tabular, sticky header */
.xa-table thead th { position: sticky; top: 0; background: var(--ad-surface); z-index: 1; }
/* pagination control */
.ad-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--ad-border); font-size: 13px; color: var(--ad-text-muted); }
.ad-pager button { font: inherit; font-size: 13px; background: none; border: 1px solid var(--ad-border-2); border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--ad-text); }
.ad-pager button:disabled { opacity: .45; cursor: default; }

/* ════════ extra components (for converted legacy pages) ════════ */
.xa-grid { display: grid; gap: 14px; }
.xa-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xa-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xa-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .xa-grid--2, .xa-grid--3, .xa-grid--4 { grid-template-columns: 1fr; } }

.xa-section { margin-bottom: 22px; }
.xa-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.xa-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--ad-text-dim); margin: 0; }

.xa-panel { background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: var(--xa-radius-lg); overflow: hidden; }
.xa-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ad-border); }
.xa-panel-title { font-size: 14px; font-weight: 600; margin: 0; color: var(--ad-text); }
.xa-panel-body { padding: 18px; }

.xa-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ad-border); }
.xa-card-title { font-size: 14px; font-weight: 600; margin: 0; }
.xa-card-body { padding: 18px; }
.xa-card-footer { padding: 12px 18px; border-top: 1px solid var(--ad-border); }

.xa-stat-delta { font-size: 12.5px; font-weight: 600; }
.xa-stat-delta--up { color: var(--ad-green); }
.xa-stat-delta--down { color: var(--ad-red); }

.xa-table-wrap { overflow-x: auto; border: 1px solid var(--ad-border); border-radius: var(--xa-radius-lg); }
.xa-table-wrap .xa-table { border: 0; }

.xa-kbd { font: 11px var(--ad-mono); background: var(--ad-surface-2); border: 1px solid var(--ad-border); border-radius: 6px; padding: 2px 6px; color: var(--ad-text-muted); }
.xa-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--ad-surface-2); color: var(--ad-text-muted); }
.xa-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--ad-border); background: var(--ad-surface); color: var(--ad-text-muted); font-weight: 600; }
.xa-link { color: var(--ad-accent); text-decoration: none; }
.xa-link:hover { text-decoration: underline; }
.xa-badge--no-dot::before { display: none; }
.xa-divider { height: 1px; background: var(--ad-border); border: 0; margin: 16px 0; }

/* ── common page helpers (so fresh ADEOS pages stay lean) ── */
.page-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 22px; }
.page-header h1 { margin: 0; }
.page-header .hactions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 0 0 22px; }
.kpi { background: var(--ad-surface-2); border-radius: var(--xa-radius); padding: 16px 18px; }
.kpi .kval { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ad-text); }
.kpi .klbl { font-size: 11px; color: var(--ad-text-dim); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.kpi .kdelta { font-size: 12px; font-weight: 600; margin-top: 4px; }
.kpi.hi { background: var(--ad-accent-soft); }
.sec-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ad-text-dim); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--ad-border); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* generic legacy section/heading helpers some pages use bare */
.xa-content h1 { font-size: clamp(22px, 2.6vw, 29px); font-weight: 700; letter-spacing: -.026em; }
.xa-content h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.xa-content h3 { font-size: 16px; font-weight: 600; }
.xa-content a:not(.xa-btn):not(.ad-nav-item) { color: var(--ad-accent); }
