/* ==============================================================
   Obsidian Portal — UI clarity
   Sharper type, clearer nav, richer chrome.
   Keeps the brutalist system: 0 radius, hairline borders, no shadow.
   Does not restyle webmail (Outlook shell).
   ============================================================== */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-synthesis: none;
}

/* Windows Chrome uses ClearType. Grayscale AA + RDP makes 10–12px type mushy. */
html.ua-windows {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

body,
.app-header,
.app-nav,
.panel-card,
.settings-card,
.btn,
.form-input,
.form-select,
.form-textarea,
.nav-link,
.tab-btn {
  font-family: var(--font-sans);
}

.mono,
code,
kbd,
pre,
samp,
.session-info,
.stat-value,
.role-badge {
  font-variant-numeric: tabular-nums;
}

/* ── Chrome ───────────────────────────────────────────────── */

.app-header {
  height: 52px !important;
}

.app-nav {
  top: 52px !important;
  min-height: 56px;
  padding: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.app-content > .view.active {
  animation: none;
}

.header-brand {
  font-size: 14px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.header-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--muted);
}

.session-info {
  font-size: 12px;
  color: var(--muted);
  max-width: min(340px, 42vw);
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

/* ── Navigation ───────────────────────────────────────────── */

.nav-gap {
  width: 1px;
  align-self: stretch;
  margin: 10px 0;
  background: var(--border2);
  flex: 0 0 1px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 8px 2px 7px;
  border-bottom-width: 2px;
  text-align: center;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--text);
  background: var(--surface);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--text);
}

.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  flex-shrink: 0;
}

.nav-ico img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ui-ico {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.page-kicker:has(.ui-ico) {
  display: flex;
  align-items: center;
}

.page-kicker .ui-ico {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -2px;
}

.stat-kicker .ui-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -3px;
}

.admin-aap-launch-mark .ui-ico {
  width: 20px;
  height: 20px;
}

.modal-title .ui-ico {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
}

.metric-ico .ui-ico {
  width: 14px;
  height: 14px;
}

.tok-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tok-type-pill .ui-ico {
  width: 12px;
  height: 12px;
}

.nav-icon-credit {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  white-space: nowrap;
  opacity: 0.7;
}

.nav-icon-credit:hover {
  color: var(--text);
  opacity: 1;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: max(4px, 12%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  margin-left: 0;
  padding: 0 3px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  color: #111;
  background: var(--amber);
}

.nav-badge.is-bad {
  background: var(--red);
  color: #fff;
}

.nav-badge[hidden] {
  display: none !important;
}

/* ── Page titles ──────────────────────────────────────────── */

.page-title,
.admin-banner-title,
.workspace-hero .admin-banner-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
}

.page-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1;
  margin-bottom: 4px;
}

.page-header,
.page-header:has(.page-header-desc) {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.page-header-main {
  flex: 1 1 220px;
  min-width: 0;
}

.page-header-main + *:not(.page-header-aside) {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-header-aside {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 420px;
  min-width: 0;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.metric-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.metric-strip:empty {
  display: none;
}

.metric-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-left-width: 2px;
  background: var(--bg);
  white-space: nowrap;
  line-height: 1.2;
}

.metric-chip .metric-ico {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}

.metric-chip b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text);
}

.metric-chip span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1;
}

.metric-chip.tone-ok { border-left-color: var(--green); }
.metric-chip.tone-ok b { color: var(--green); }
.metric-chip.tone-ga { border-left-color: var(--amber); }
.metric-chip.tone-ga b { color: var(--amber); }
.metric-chip.tone-whfb { border-left-color: var(--purple); }
.metric-chip.tone-whfb b { color: var(--purple); }
.metric-chip.tone-res { border-left-color: var(--blue); }
.metric-chip.tone-res b { color: var(--blue); }
.metric-chip.tone-prt { border-left-color: var(--green); }
.metric-chip.tone-prt b { color: var(--green); }
.metric-chip.tone-fail { border-left-color: var(--red); }
.metric-chip.tone-fail b { color: var(--red); }
.metric-chip.tone-pending { border-left-color: var(--amber); }
.metric-chip.tone-pending b { color: var(--amber); }
.metric-chip.tone-bots { border-left-color: #f97316; }
.metric-chip.tone-bots b { color: #f97316; }
.metric-chip.tone-total {
  background: var(--surface);
  border-left-color: var(--border2);
}
.metric-chip.tone-total b { color: var(--muted); }

.page-header-desc,
.view-desc,
.admin-banner-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0;
}

.admin-banner {
  padding: 18px 20px;
  background: var(--surface);
  border-color: var(--border2);
}

.panel-card-title,
.settings-card-title,
.section-label,
.data-table th,
.tok-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Stats ────────────────────────────────────────────────── */

.stat-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .stat-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat-card {
  padding: 16px 18px 14px;
  background: var(--surface);
}

.stat-card.stat-link {
  text-align: left;
  border-left: 2px solid transparent;
}

.stat-card.stat-link:hover {
  background: var(--card-hover);
  border-left-color: var(--text);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0;
  text-transform: none;
}

.stat-card.accent .stat-value { color: var(--green); }
#admin-stat-authorized { color: var(--blue); }
#admin-stat-tokens { color: #c4b5fd; }
#admin-stat-prt { color: var(--green); }
#admin-stat-whfb { color: var(--purple); }

/* ── Tables / lists ───────────────────────────────────────── */

.data-table th,
.data-table td {
  font-size: 12px;
}

.data-table tbody td {
  color: var(--text);
}

.account-card {
  padding: 10px 16px;
}

.btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.btn.sm {
  font-size: 11px;
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  font-size: 13px;
}

.form-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

/* ── Tenant impersonation bar ─────────────────────────────── */

.acting-tenant-bar {
  padding: 10px var(--page-x);
}

.acting-tenant-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.acting-tenant-name {
  font-size: 14px;
  font-weight: 700;
}

.acting-tenant-hint {
  font-size: 12px;
}

/* ── Admin tenants ────────────────────────────────────────── */

#view-admin-users {
  --tn-avatar: 36px;
  --tn-status: 44px;
  --tn-plan: 72px;
  --tn-left: 64px;
  --tn-num: 56px;
  --tn-actions: 320px;
  --tn-cols: var(--tn-avatar) minmax(140px, 1.15fr) var(--tn-status) var(--tn-plan) var(--tn-left) var(--tn-num) var(--tn-num) var(--tn-num) var(--tn-num) var(--tn-num) var(--tn-num) var(--tn-num) var(--tn-actions);
}

#view-admin-users .page-header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

#view-admin-users .page-header-main {
  gap: 2px;
}

#view-admin-users .page-kicker {
  margin-bottom: 0;
}

#view-admin-users .page-header-desc {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-admin-users .admin-tenants-toolbar {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
  min-height: 44px;
}

#view-admin-users .admin-tenants-toolbar .list-toolbar-main {
  width: 100%;
  padding: 8px 12px;
  gap: 10px 14px;
}

#view-admin-users .admin-toolbar-field {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--section-label);
  white-space: nowrap;
}

#view-admin-users .admin-toolbar-field .form-select {
  width: 168px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--text);
}

#view-admin-users .admin-tenants-search {
  margin-left: auto;
  min-width: 180px;
  max-width: 280px;
  flex: 1 1 180px;
}

.admin-ops {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-ops #admin-users-kpi {
  flex: 1 1 420px;
  min-width: 0;
  align-content: center;
}

.admin-aap-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 280px;
  margin: 0;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-aap-launch:hover {
  border-color: var(--text);
}

.admin-aap-launch-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.admin-aap-launch-copy {
  flex: 1;
  min-width: 0;
}

.admin-aap-board-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--section-label);
}

.admin-aap-board-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--dim);
}

#view-admin-users .admin-user-aap-host {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-admin-users .admin-user-metric.is-none .admin-user-aap-host {
  color: var(--red);
}

#view-admin-users #admin-users-kpi {
  justify-content: flex-start;
  padding: 0;
}

button.metric-chip {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
}

button.metric-chip.is-active {
  border-color: var(--text);
}

.admin-sub-alerts,
.admin-license-desk {
  border: 1px solid var(--amber-border);
  background: var(--amber-bg);
}

.admin-license-desk.is-critical {
  border-color: var(--red-border);
  background: var(--red-bg);
}

.admin-desk-bar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 8px 10px;
}

.admin-desk-ident {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.admin-desk-ico {
  font-size: 18px;
  line-height: 1;
}

.admin-desk-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.admin-desk-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.admin-desk-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
}

.admin-desk-count {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  cursor: pointer;
}

.admin-desk-count b {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-desk-count span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.admin-desk-count.is-warn b { color: var(--amber); }
.admin-desk-count.is-bad b { color: var(--red); }
.admin-desk-count.is-none b { color: var(--red); }
.admin-desk-count:hover { border-color: var(--text); }

.admin-desk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.admin-desk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
  border-top: 1px solid var(--border);
}

.admin-desk-item {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 4px 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.admin-desk-pill {
  appearance: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.admin-desk-pill-ico {
  font-size: 13px;
  line-height: 1;
}

.admin-desk-pill-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.admin-desk-pill-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

.admin-desk-item.is-expired .admin-desk-pill-meta,
.admin-desk-item.is-none .admin-desk-pill-meta {
  color: var(--red);
}

.admin-sub-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid var(--amber-border);
  background: var(--amber-bg);
  font-size: 12px;
  cursor: pointer;
}

.admin-sub-alert.is-expired {
  border-color: var(--red-border);
  background: var(--red-bg);
}

.admin-tenants-board {
  overflow-x: auto;
}

.admin-tenants-board .account-list {
  border: none;
  overflow: visible;
}

.admin-tenant-head,
#view-admin-users .admin-user-row.account-card {
  display: grid !important;
  grid-template-columns: var(--tn-cols) !important;
  gap: 8px 12px;
  align-items: center;
  min-width: 1260px;
}

.admin-tenant-head {
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--section-label);
}

.admin-tenant-head > :nth-child(n+5):nth-child(-n+12) {
  text-align: right;
}

.admin-tenant-head > :last-child {
  text-align: right;
}

.admin-tenant-head button {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--section-label);
  cursor: pointer;
  text-align: inherit;
}

.admin-tenant-head button:hover,
.admin-tenant-head button.is-active {
  color: var(--text);
}

.admin-tenant-head .th-ico {
  margin-right: 4px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

#view-admin-users .admin-user-row.account-card {
  padding: 8px 14px;
  cursor: pointer;
}

#view-admin-users .admin-user-row.is-expiring {
  box-shadow: inset 3px 0 0 var(--amber);
  background: var(--amber-bg);
}

#view-admin-users .admin-user-row.is-expired,
#view-admin-users .admin-user-row.is-nolicense {
  box-shadow: inset 3px 0 0 var(--red);
  background: var(--red-bg);
}

#view-admin-users .admin-user-row.is-flash {
  outline: 1px solid var(--amber);
  background: var(--amber-bg);
}

#view-admin-users .admin-user-row:last-child {
  border-bottom: none;
}

#view-admin-users .admin-user-row-off {
  opacity: 0.7;
}

#view-admin-users .admin-user-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

#view-admin-users .admin-user-avatar .status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  background: var(--dim);
  border: 2px solid var(--surface);
}

#view-admin-users .admin-user-avatar .status-dot.is-on {
  background: var(--green);
}

#view-admin-users .admin-user-ident {
  min-width: 0;
}

#view-admin-users .admin-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

#view-admin-users .admin-user-user {
  font-size: 10px;
  color: var(--dim);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-admin-users .admin-user-status,
#view-admin-users .admin-user-plan,
#view-admin-users .admin-user-left {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}

#view-admin-users .admin-user-status.is-on {
  color: var(--green);
}

#view-admin-users .admin-user-status.is-off {
  color: var(--red);
}

#view-admin-users .admin-user-plan.is-life,
#view-admin-users .admin-user-left.is-life {
  color: var(--purple);
}

#view-admin-users .admin-user-plan.is-none,
#view-admin-users .admin-user-left.is-none,
#view-admin-users .admin-user-left.is-dead {
  color: var(--red);
}

#view-admin-users .admin-user-left {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#view-admin-users .admin-user-left.is-warn {
  color: var(--amber);
}

#view-admin-users .admin-user-metric {
  text-align: right;
  min-width: 0;
}

#view-admin-users .admin-user-metric-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

#view-admin-users .admin-user-metric.is-hot .admin-user-metric-val,
#view-admin-users .admin-user-metric.is-prt .admin-user-metric-val {
  color: var(--green);
}

#view-admin-users .admin-user-metric.is-whfb .admin-user-metric-val {
  color: var(--purple);
}

#view-admin-users .admin-user-metric.is-life .admin-user-metric-val {
  color: var(--purple);
}

#view-admin-users .admin-user-metric.is-none .admin-user-metric-val {
  color: var(--red);
}

#view-admin-users .admin-user-metric.is-ga .admin-user-metric-val {
  color: var(--amber);
}

#view-admin-users .admin-user-metric-lbl {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

#view-admin-users .admin-user-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}

#view-admin-users .admin-user-actions .btn {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 720px) {
  #view-admin-users .page-header-desc {
    white-space: normal;
  }
}

/* ── Overview panels ──────────────────────────────────────── */

.overview-panels .panel-card {
  min-height: 320px;
}

.overview-layout {
  gap: 14px;
}

.admin-ov-kpi .stat-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}

.admin-ov-kpi .stat-label {
  font-size: 10px;
}

#view-admin-overview .admin-license-desk {
  margin: 0;
}

/* ── Token rows in tenant workspace ───────────────────────── */

.tok-header-row .tok-th,
.tok-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.token-card .tok-name,
.account-name {
  font-weight: 700;
}

/* ── Do not touch Outlook webmail chrome ──────────────────── */

.app-content:has(#view-webmail.active) {
  font-synthesis: initial;
}

/* ── Forced admin 2FA gate ────────────────────────────────── */

body.admin-2fa-gate .app-nav .nav-link:not([data-view="settings"]) {
  display: none;
}

body.admin-2fa-gate #acting-tenant-bar,
body.admin-2fa-gate .workspace-hero {
  display: none !important;
}

.admin-2fa-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

#twofa-disabled-panel:not([hidden]) {
  display: block;
  margin-top: 12px;
}

#btn-twofa-setup {
  display: inline-flex;
  align-items: center;
}

/* ── Filter / settings tab headers ─────────────────────────── */

.tab-bar {
  gap: 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 10px 12px;
}

.tab-btn .ui-ico {
  width: 13px;
  height: 13px;
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
  padding: 1px 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  line-height: 1.3;
}

.tab-count:empty {
  display: none;
}

.list-toolbar-meta:empty {
  display: none;
}

.tab-btn.active .tab-count {
  color: var(--text);
  border-color: var(--border2);
}

.tab-btn[data-token-filter="active"].active,
.tab-btn[data-filter="authorized"].active,
.tab-btn[data-token-filter="prt"].active {
  border-bottom-color: var(--green);
}

.tab-btn[data-token-filter="winhello"].active {
  border-bottom-color: var(--purple);
}

.tab-btn[data-token-filter="ga"].active,
.tab-btn[data-filter="pending"].active {
  border-bottom-color: var(--amber);
}

.tab-btn[data-filter="failed"].active {
  border-bottom-color: var(--red);
}

.tab-btn[data-lure-filter="active"].active {
  border-bottom-color: var(--green);
}

.tab-btn[data-lure-filter="inactive"].active {
  border-bottom-color: var(--dim);
}

.list-toolbar {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0 10px 0 4px;
  min-height: 42px;
}

.list-toolbar .list-toolbar-main {
  align-items: stretch;
}

.list-toolbar .tab-bar.inline {
  align-self: stretch;
}

.list-toolbar .tab-btn {
  align-self: stretch;
}

.list-toolbar .form-input,
.list-toolbar .form-select,
.list-toolbar .list-toolbar-meta {
  align-self: center;
}

.view-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.view-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
}

@media (max-width: 920px) {
  .page-header-aside {
    flex: 1 1 100%;
  }
  .metric-strip {
    max-width: none;
  }
}

/* ── Lures dashboard ──────────────────────────────────────── */

#view-lures .page-header,
#view-antibot .page-header,
#view-guide .page-header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

#view-lures .page-header-main,
#view-antibot .page-header-main,
#view-guide .page-header-main {
  gap: 2px;
}

#view-guide .page-header-main {
  flex: 1 1 100%;
  max-width: none;
}

#view-lures .page-kicker,
#view-antibot .page-kicker {
  margin-bottom: 0;
}

#view-lures .page-header-desc,
#view-antibot .page-header-desc {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-antibot .lures-board .list-card-wrap {
  margin: 0;
  border: none;
}

.lures-board {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.lures-board .lures-toolbar {
  border: none;
  border-bottom: 1px solid var(--border);
}

.lures-board .lures-table-wrap {
  border: none;
}

.lures-board .empty-state {
  border: none;
  background: transparent;
}

.lures-toolbar .lures-search {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  margin-left: auto;
}

.lures-table-wrap {
  min-width: 0;
}

.lures-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1120px;
}

.lures-col-num { width: 40px; }
.lures-col-campaign { width: 180px; }
.lures-col-tpl { width: 110px; }
.lures-col-url { width: auto; }
.lures-col-doc { width: 170px; }
.lures-col-route { width: 100px; }
.lures-col-kill { width: 76px; }
.lures-col-actions { width: 268px; }

.lures-table thead th {
  padding: 8px 10px;
  cursor: default;
  white-space: nowrap;
  vertical-align: middle;
}

.lures-table thead th:hover {
  color: var(--section-label);
}

.lures-th-num,
.lures-table td.lure-num {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.lures-table thead th.lures-th-actions {
  text-align: right;
  padding-right: 14px;
}

.lures-table tbody td {
  padding: 6px 10px;
  vertical-align: middle;
  min-height: 48px;
}

.lure-row.is-inactive {
  opacity: 0.48;
}

.lure-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.lure-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.lure-slug {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.lure-url-cell {
  min-width: 0;
}

.lure-url-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.lure-url-row > .lure-pill {
  margin-top: 1px;
  flex-shrink: 0;
}

.lure-url-row > .lure-url-text {
  min-width: 0;
  flex: 1;
}

.lure-url {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--blue);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lure-url:hover {
  text-decoration: underline;
}

.lure-url-origin {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lure-pill-cf {
  background: rgba(244, 129, 32, 0.12);
  color: #fb923c;
  border-color: rgba(244, 129, 32, 0.35);
}

.lure-pill-aws {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.lure-pill-cp {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.lure-pill-aap {
  background: rgba(20, 184, 166, 0.12);
  color: #2dd4bf;
  border-color: rgba(20, 184, 166, 0.35);
}

.lure-doc {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lure-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 252px;
}

.lure-actions .btn {
  padding: 5px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lure-act-kill {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.2;
}

.lure-act-kill:hover {
  background: rgba(239, 68, 68, 0.22);
}

.lure-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.3;
  border: 1px solid transparent;
}

.lure-pill-live {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.lure-pill-local,
.lure-pill-wait {
  background: var(--surface2);
  color: var(--dim);
  border-color: var(--border);
}

.lure-pill-direct {
  background: rgba(107, 114, 128, 0.12);
  color: var(--dim);
  border-color: var(--border);
}

.lure-pill-geo,
.lure-pill-global {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.lure-pill-custom {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.25);
}

.lure-pill-tpl {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}

.lure-pill-tpl-onedrive {
  background: rgba(0, 120, 212, 0.12);
  color: #60a5fa;
  border-color: rgba(0, 120, 212, 0.28);
}

.lure-pill-tpl-onenote {
  background: rgba(120, 86, 255, 0.12);
  color: #a78bfa;
  border-color: rgba(120, 86, 255, 0.28);
}

.lure-pill-tpl-adobe {
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.28);
}

.lure-pill-tpl-docusign {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.lure-pill-tpl-teams {
  background: rgba(70, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(70, 130, 246, 0.28);
}

.lure-kill {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lure-kill-off { color: var(--dim); }
.lure-kill-expired { color: #f87171; }
.lure-kill-soon { color: #fbbf24; }
.lure-kill-ok { color: #4ade80; }

.lure-muted { color: var(--dim); font-size: 11px; }

@media (max-width: 720px) {
  #view-lures .page-header-desc,
  #view-antibot .page-header-desc {
    white-space: normal;
  }
  .lures-toolbar .lures-search {
    margin-left: 0;
    max-width: none;
  }
}

.app-content:has(#view-attachments.active) {
  padding-top: 10px;
}

#view-attachments.view.active {
  flex: 0 0 auto;
  display: block;
  height: auto;
  min-height: 0;
}

#attachment-file-type {
  display: none !important;
}

#view-attachments .att-page {
  flex: 0 0 auto;
  gap: 0;
}

#view-attachments .page-header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

#view-attachments .page-header-main {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

#view-attachments .page-title {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  margin: 0;
  line-height: 1;
}

#view-attachments .page-header-desc {
  margin: 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.3;
}

.att-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.att-type-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.att-type-btn {
  flex: 1 1 0;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted, #9a9a9a);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.att-type-btn:hover {
  color: var(--text);
}

.att-type-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--blue, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
}

.att-type-hint {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim, #71717a);
}

.att-type-btn.is-active .att-type-hint {
  color: var(--blue, #60a5fa);
}

.attachment-form {
  padding: 12px 14px 14px;
}

.att-url-row,
.att-generate-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.4fr);
  gap: 8px 12px;
  align-items: end;
}

.att-url-row .form-field,
.att-generate-row .form-field {
  margin-bottom: 0;
}

.att-obfuscate {
  margin: 8px 0 0;
}

.att-generate-row {
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.att-generate-actions {
  margin: 0;
  padding-bottom: 1px;
}

#attachment-pdf-panel,
#attachment-html-panel,
#attachment-svg-panel {
  margin-top: 10px;
}

#attachment-pdf-panel .form-field,
#attachment-html-panel .form-field,
#attachment-svg-panel .form-field {
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  #view-attachments .page-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  #view-attachments .page-title {
    border-right: 0;
    padding-right: 0;
  }

  .att-url-row,
  .att-generate-row {
    grid-template-columns: 1fr;
  }
}

.deploy-target-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  flex-shrink: 0;
  background: var(--surface);
}

.modal-card.modal-deploy {
  max-width: 500px;
  width: min(96vw, 500px);
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}

.deploy-panes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.deploy-pane {
  padding: 14px 16px 16px;
  max-width: none;
}

.deploy-cpanel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.9fr);
  gap: 10px 12px;
  margin-bottom: 10px;
}

.deploy-cpanel-grid .form-field {
  margin: 0;
}

#deploy-pane-cpanel .deploy-pane-head,
#deploy-pane-domain .deploy-pane-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#deploy-pane-cpanel .deploy-landing-box {
  margin-top: 10px;
}

#deploy-pane-cpanel .deploy-pane-actions {
  flex-direction: row;
  margin-top: 12px;
}

#deploy-pane-cpanel .deploy-pane-actions .btn {
  width: auto;
  min-width: 160px;
}

@media (max-width: 560px) {
  .deploy-cpanel-grid {
    grid-template-columns: 1fr;
  }
}

#deploy-pane-domain .form-select {
  width: 100%;
}

.field-hint-inline {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
  margin-left: 6px;
}

.deploy-domain-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.deploy-domain-empty[hidden] {
  display: none;
}

.deploy-host-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.deploy-host-row .form-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.deploy-host-apex {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--input-border, var(--border));
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--r-md);
  border-bottom-right-radius: var(--r-md);
  white-space: nowrap;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deploy-folder-row {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.deploy-folder-row .form-input {
  flex: 1;
  min-width: 0;
  width: auto;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.deploy-folder-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
  outline: none;
}

.deploy-folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 8px;
  margin-top: 8px;
}

.deploy-folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

.deploy-folder-chip button {
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 12px;
}

.deploy-folder-chip button:hover {
  color: var(--text);
}

.deploy-landing-box {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--r-md);
}

#deploy-pane-domain .deploy-pane-actions {
  flex-direction: row;
  justify-content: flex-start;
}

#deploy-pane-domain .deploy-pane-actions .btn {
  width: auto;
  min-width: 168px;
}

.deploy-landing-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

.deploy-pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.deploy-pane-ico {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.deploy-ico-cf { background: rgba(249, 115, 22, 0.1); color: #fb923c; border-color: rgba(249, 115, 22, 0.25); }
.deploy-ico-aws { background: rgba(234, 179, 8, 0.1); color: #fbbf24; border-color: rgba(234, 179, 8, 0.25); }
.deploy-ico-dom { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.25); }
.deploy-ico-zip { background: var(--surface2); color: var(--muted); }

.deploy-pane-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.deploy-pane-sub {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
}

.deploy-url-preview {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--blue);
  margin-top: 2px;
  word-break: break-all;
  min-height: 14px;
}

.deploy-pane-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.hosting-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 20px;
}

.hosting-add-card {
  border: 1px solid var(--border);
  padding: 14px;
  background: var(--bg);
}

#view-domains .page-stack {
  gap: 0;
}

#view-domains .page-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

#view-domains .page-header-main {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

#view-domains .page-title {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  line-height: 1;
  margin: 0;
}

#view-domains .page-header-desc {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domains-board {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: stretch;
  padding-top: 12px;
}

.domains-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.domains-col .hosting-add-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}

#view-domains .form-field {
  margin-bottom: 8px;
}

#view-domains .form-lbl {
  margin-bottom: 3px;
}

#view-domains .view-desc:empty {
  display: none;
}

.domains-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.domains-col-desc {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.hosting-add-card-primary {
  border-color: var(--border2);
}

.hosting-add-card-secondary {
  background: var(--surface);
}

.domains-form-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
}

.domains-form-creds {
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.15fr);
}

.domains-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 2px 0 10px;
}

.domains-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.domains-col .hosting-panels-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.domains-col-aapanel .hosting-panels-list:empty {
  display: none;
}

.cpanel-saved-list {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.cpanel-table {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
}

.cpanel-table th:last-child,
.cpanel-table td:last-child {
  text-align: right;
}

.cpanel-row.is-editing td {
  background: var(--surface);
}

.cpanel-row-host {
  font-size: 12px;
  color: var(--text);
}

.cpanel-row-domains {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
}

.cpanel-row-err {
  font-size: 11px;
  color: var(--red);
  margin-top: 2px;
}

.cpanel-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.domains-empty {
  font-size: 12px;
  color: var(--dim);
  padding: 10px 0 0;
  border: 0;
  background: transparent;
}

.domains-assigned-row {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  margin: 0;
}

.domains-assigned-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.domain-health-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.domain-health-engine {
  border: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface);
  min-width: 0;
}

.domain-health-engine.is-clean {
  border-color: var(--green-border);
}

.domain-health-engine.is-flagged,
.domain-health-engine.is-partial {
  border-color: var(--red);
}

.domain-health-engine-name {
  display: block;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.domain-health-engine-status {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
  color: var(--text);
}

.domain-health-engine.is-clean .domain-health-engine-status {
  color: var(--green);
}

.domain-health-engine.is-flagged .domain-health-engine-status,
.domain-health-engine.is-partial .domain-health-engine-status {
  color: var(--red);
}

.domain-health-engine-detail {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}

.hosting-domain-item .domain-health-result {
  flex: 1 1 100%;
}

.domains-assigned-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.domains-assigned-meta {
  font-size: 11px;
  color: var(--dim);
  margin-top: 3px;
}

.domains-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.domains-order-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.domains-order-price {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.domains-order-note {
  font-size: 11px;
  color: var(--dim);
}

#domains-aap-order-status {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.hosting-panels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hosting-panel-row {
  border: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--bg);
}

.hosting-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hosting-panel-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.hosting-panel-sub {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.hosting-panel-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.hosting-domain-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hosting-domain-item {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hosting-domain-item b {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 800px) {
  .hosting-add-grid,
  .domains-board {
    grid-template-columns: 1fr;
  }
  .domains-form-creds {
    grid-template-columns: 1fr;
  }
}

.deploy-result {
  border-top: 2px solid var(--green-border);
  background: var(--green-bg);
  flex-shrink: 0;
}

.deploy-result.is-error {
  border-top-color: var(--red-border);
  background: var(--red-bg);
}

.deploy-result-head {
  padding: 10px 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deploy-result-head #deploy-result-icon {
  font-size: 16px;
}

.deploy-result-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--green);
}

.deploy-result.is-error .deploy-result-title {
  color: var(--red);
}

.deploy-result-meta {
  font-size: 10px;
  color: var(--dim);
  margin-left: 4px;
}

.deploy-result-row {
  padding: 10px 20px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deploy-result-url-wrap {
  flex: 1;
  min-width: 0;
}

.deploy-result-url {
  width: 100%;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
  background: var(--bg);
  border: 1px solid var(--green-border);
  padding: 10px 14px;
  outline: none;
  cursor: text;
}

.deploy-result.is-error .deploy-result-url {
  color: var(--red);
  border-color: var(--red-border);
}

.deploy-result-copy.is-copied {
  opacity: 0.85;
}

/* ── Light theme: solid tinted chips, readable on white ───── */

[data-theme="light"] .btn.primary {
  background: #27272a;
  color: #fafafa;
  border-color: #27272a;
}

[data-theme="light"] .btn.primary:hover:not(:disabled) {
  background: #18181b;
  border-color: #18181b;
  color: #fafafa;
}

[data-theme="light"] .metric-chip {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="light"] .metric-chip.tone-ok,
[data-theme="light"] .metric-chip.tone-prt {
  background: var(--green-bg);
  border-color: var(--green-border);
}

[data-theme="light"] .metric-chip.tone-ga,
[data-theme="light"] .metric-chip.tone-pending {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

[data-theme="light"] .metric-chip.tone-whfb {
  background: var(--purple-bg);
  border-color: var(--purple-border);
}

[data-theme="light"] .metric-chip.tone-res {
  background: var(--blue-bg);
  border-color: var(--blue-border);
}

[data-theme="light"] .metric-chip.tone-fail {
  background: var(--red-bg);
  border-color: var(--red-border);
}

[data-theme="light"] .metric-chip.tone-bots {
  background: #ffedd5;
  border-color: #fdba74;
}
[data-theme="light"] .metric-chip.tone-bots b {
  color: #c2410c;
}

[data-theme="light"] .metric-chip.tone-total {
  background: #e4e4e7;
  border-color: #d4d4d8;
}

[data-theme="light"] .lure-pill-local,
[data-theme="light"] .lure-pill-wait {
  color: #3f3f46;
  background: #e4e4e7;
  border-color: #d4d4d8;
}

[data-theme="light"] .lure-pill-cf {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

[data-theme="light"] .lure-pill-aws {
  color: #92400e;
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

[data-theme="light"] .lure-pill-cp,
[data-theme="light"] .lure-pill-tpl-onedrive,
[data-theme="light"] .lure-pill-tpl-teams {
  color: #1e40af;
  background: var(--blue-bg);
  border-color: var(--blue-border);
}

[data-theme="light"] .lure-pill-aap {
  color: #115e59;
  background: #ccfbf1;
  border-color: #5eead4;
}

[data-theme="light"] .lure-pill-live,
[data-theme="light"] .lure-pill-geo,
[data-theme="light"] .lure-pill-global,
[data-theme="light"] .lure-pill-tpl-docusign {
  color: #14532d;
  background: var(--green-bg);
  border-color: var(--green-border);
}

[data-theme="light"] .lure-pill-custom,
[data-theme="light"] .lure-pill-tpl,
[data-theme="light"] .lure-pill-tpl-onenote {
  color: #5b21b6;
  background: var(--purple-bg);
  border-color: var(--purple-border);
}

[data-theme="light"] .lure-pill-tpl-adobe,
[data-theme="light"] .lure-kill-expired {
  color: var(--red);
}

[data-theme="light"] .lure-act-kill {
  color: #991b1b;
  background: var(--red-bg);
  border-color: var(--red-border);
}

[data-theme="light"] .lure-kill-ok {
  color: #166534;
}

[data-theme="light"] .lure-kill-soon {
  color: var(--amber);
}

[data-theme="light"] .status-badge.ok,
[data-theme="light"] .tok-type-pill.type-prt,
[data-theme="light"] .tok-type-pill.type-resurrected,
[data-theme="light"] .status-badge.tok-resurrect-badge {
  color: #14532d;
  background: var(--green-bg);
  border-color: var(--green-border);
}

[data-theme="light"] .status-badge.fail,
[data-theme="light"] .tok-type-pill.type-failed {
  color: #991b1b;
  background: var(--red-bg);
  border-color: var(--red-border);
}

[data-theme="light"] .tok-type-pill.type-winhello,
[data-theme="light"] .status-badge.beta {
  color: #6b21a8;
  background: var(--purple-bg);
  border-color: var(--purple-border);
}

[data-theme="light"] .tok-type-pill.type-oauth,
[data-theme="light"] .status-badge.pending {
  color: #1e40af;
  background: var(--blue-bg);
  border-color: var(--blue-border);
}

[data-theme="light"] .status-badge.ga,
[data-theme="light"] .status-badge.warn,
[data-theme="light"] .tok-type-pill.type-enrolling,
[data-theme="light"] .tok-ga-cell.yes {
  color: #92400e;
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

[data-theme="light"] .tok-ga-cell.yes {
  background: transparent;
  border-color: transparent;
  font-weight: 800;
}

[data-theme="light"] .deploy-ico-cf {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

[data-theme="light"] .deploy-ico-aws {
  color: #92400e;
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

[data-theme="light"] .deploy-ico-dom {
  color: #1e40af;
  background: var(--blue-bg);
  border-color: var(--blue-border);
}

[data-theme="light"] .admin-2fa-banner {
  color: #92400e;
  border-color: var(--amber-border);
  background: var(--amber-bg);
}

[data-theme="light"] #admin-stat-tokens {
  color: var(--purple);
}

[data-theme="light"] .redir-stat-pill.pill-pass,
[data-theme="light"] .rsa-stat-green .rsa-stat-num,
[data-theme="light"] .rsa-log-outcome.pass,
[data-theme="light"] .template-card-head .status-badge.ok {
  color: #14532d;
  background: var(--green-bg);
  border-color: var(--green-border);
}

[data-theme="light"] .redir-stat-pill.pill-deny,
[data-theme="light"] .rsa-stat-red .rsa-stat-num,
[data-theme="light"] .rsa-log-outcome.deny {
  color: #991b1b;
}

[data-theme="light"] .redir-stat-pill.pill-invalid,
[data-theme="light"] .rsa-stat-amber .rsa-stat-num,
[data-theme="light"] .rsa-log-outcome.inval {
  color: #92400e;
}

[data-theme="light"] .redir-stat-pill.pill-views,
[data-theme="light"] .rsa-stat-blue .rsa-stat-num,
[data-theme="light"] .redir-dest-chip.mx-ms,
[data-theme="light"] .redir-dest-chip.mx-ms .dest-label,
[data-theme="light"] .template-card-head .status-badge.info {
  color: #1e40af;
}

[data-theme="light"] .redir-stat-pill.pill-leads,
[data-theme="light"] .rsa-stat-purple .rsa-stat-num,
[data-theme="light"] .template-card-head .status-badge.warn {
  color: #6b21a8;
}

[data-theme="light"] .redir-dest-chip.mx-google,
[data-theme="light"] .redir-dest-chip.mx-google .dest-label,
[data-theme="light"] .rsa-mx-google .rsa-mx-num {
  color: #a16207;
}

[data-theme="light"] .rsa-mx-ms .rsa-mx-num {
  color: #1e40af;
}

[data-theme="light"] .tok-status-dot.active,
[data-theme="light"] .tok-status-dot.tok-status-resurrect {
  color: #15803d;
  font-weight: 700;
}

[data-theme="light"] .tok-status-dot.inactive {
  color: #b91c1c;
  font-weight: 700;
}

[data-theme="light"] .tok-status-dot.tok-status-stored {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .account-card.token-card.tok-inactive {
  border-left-color: #a1a1aa;
}

/* ── Sign-in ──────────────────────────────────────────────── */

.login-stage {
  width: min(420px, calc(100% - 32px));
}

.login-card {
  max-width: none;
  width: 100%;
  padding: 40px 36px 28px;
}

.login-card-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo {
  width: 52px;
  height: 52px;
}

.login-brand {
  font-size: 20px;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.login-kicker {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 18px;
  line-height: 1;
}

.login-desc {
  margin-bottom: 22px;
  color: var(--muted);
}

.login-card .form-field {
  margin-bottom: 12px;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  height: 40px;
}

.login-otp {
  letter-spacing: 0.28em;
  text-align: center;
  font-size: 18px;
  height: 46px;
}

.login-caps {
  font-size: 11px;
  color: var(--amber);
  margin: 0 0 6px;
}

.login-error {
  min-height: 18px;
}

.login-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.login-foot strong {
  color: var(--muted);
  font-weight: 600;
}

#login-2fa-panel {
  margin-bottom: 8px;
}

#login-2fa-panel .btn.ghost {
  margin: 0 0 10px;
}

.secret-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
}

.secret-input .form-input {
  border: 0;
  box-shadow: none;
  background: transparent;
  flex: 1 1 auto;
  min-width: 0;
}

.secret-input .form-input:focus {
  box-shadow: none;
  border: 0;
}

.secret-input:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 14%, transparent);
}

.secret-toggle {
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface2, var(--bg));
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
  cursor: pointer;
}

.secret-toggle:hover {
  color: var(--text);
}

/* ── Settings ─────────────────────────────────────────────── */

.settings-view .page-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  margin-bottom: 0;
}

.settings-view .page-header-main {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.settings-view .page-title {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  line-height: 1;
}

.settings-view .page-header-desc {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-view .page-header-aside {
  flex: 0 0 auto;
}

.settings-view .page-stack > .tab-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0 4px;
}

.settings-account-grid {
  display: flex;
  flex-direction: column;
  gap: var(--page-gap);
}

.settings-identity-card {
  padding-top: 18px;
  padding-bottom: 18px;
}

.settings-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface2, var(--bg));
  color: var(--accent, var(--text));
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.settings-identity-copy {
  min-width: 0;
  flex: 1 1 160px;
}

.settings-identity-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.2;
}

.settings-identity-user {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.settings-identity-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--page-gap);
}

.settings-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.settings-metric-wide {
  grid-column: 1 / -1;
}

.settings-metric-lbl {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

.settings-metric-val {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.settings-pw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.settings-pw-current,
.settings-pw-totp {
  grid-column: 1 / -1;
}

.settings-password-card .form-actions {
  margin-top: 14px;
  align-items: center;
  gap: 12px;
}

.settings-tg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

#stab-telegram .form-actions {
  margin-top: 14px;
  align-items: center;
  gap: 12px;
}

#stab-telegram .panel-card + .panel-card {
  margin-top: var(--page-gap);
}

@media (max-width: 760px) {
  .settings-tg-grid {
    grid-template-columns: 1fr;
  }
}

#settings-pw-status {
  margin: 0;
}

.settings-view .tab-panel .panel-card {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .settings-facts,
  .settings-pw-grid,
  .settings-metric-grid {
    grid-template-columns: 1fr;
  }

  .settings-signin-stats.settings-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-view .page-header,
  .settings-view .page-header-main,
  .settings-signin-head > div {
    flex-wrap: wrap;
  }

  .settings-view .page-header-desc,
  .settings-signin-head .view-desc {
    white-space: normal;
  }

  .settings-metric-wide,
  .settings-pw-current,
  .settings-pw-totp {
    grid-column: auto;
  }

  .settings-identity-meta {
    margin-left: 0;
    width: 100%;
  }
}

/* ── Settings sign-ins ────────────────────────────────────── */

.settings-signin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.settings-signin-head > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.settings-signin-head .panel-card-title {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.settings-signin-head .view-desc {
  margin: 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-signin-metrics {
  margin-bottom: 8px;
}

.settings-signin-stats.settings-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.settings-signin-filters {
  margin: 4px 0 8px;
}

.settings-signin-list {
  margin-top: 4px;
}

.settings-signin-empty {
  font-size: 12px;
  color: var(--dim);
  padding: 16px 4px;
}

.settings-signin-empty.is-error {
  color: var(--red);
}

.signin-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 160px) minmax(0, 1fr) 150px;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}

.signin-row.is-admin {
  grid-template-columns: 92px minmax(110px, 160px) minmax(110px, 150px) minmax(0, 1fr) 150px;
}

.signin-head {
  padding: 6px 4px 8px;
  border-bottom: 1px solid var(--border);
}

.signin-head span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.signin-ip,
.signin-who {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signin-device {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signin-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.signin-rel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.signin-abs {
  font-size: 10px;
  color: var(--dim);
}

.admin-user-status.is-locked {
  color: var(--red);
  font-weight: 700;
}

#view-store .page-header {
  align-items: center;
}

.store-rate {
  color: var(--text);
  font-weight: 600;
}

.store-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-catalog {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-group {
  border: 1px solid var(--border);
  background: var(--surface);
}

.store-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.store-group-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-group-emoji {
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1;
}

.store-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 80px 88px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}

.store-row:last-child {
  border-bottom: 0;
}

.store-row:hover {
  background: var(--row-hover);
}

.store-row.is-soon {
  opacity: 0.78;
}

.store-row-name {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.store-row-emoji {
  flex: 0 0 22px;
  width: 22px;
  text-align: center;
  font-size: 15px;
  line-height: 1.3;
}

.store-row-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-row-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.store-row-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.store-pill.ok {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green);
}

.store-row-usd,
.store-row-pts {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
}

.store-row-usd {
  font-weight: 700;
  color: var(--text);
}

.store-per {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
}

.store-row-pts {
  color: var(--muted);
}

.store-row-action {
  display: flex;
  justify-content: flex-end;
}

.store-row-action .btn {
  min-width: 76px;
}

.store-orders-card {
  padding: 0;
}

.store-orders-card .panel-card-title {
  padding: 8px 12px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.store-orders-card .data-table-wrap {
  margin: 0;
}

#nav-store-pts {
  margin-left: 6px;
}

#nav-user .nav-link.is-locked {
  opacity: 0.45;
}

@media (max-width: 760px) {
  .store-row {
    grid-template-columns: minmax(0, 1fr) 88px;
    grid-template-areas:
      "name action"
      "usd pts";
  }

  .store-row-name { grid-area: name; }
  .store-row-usd { grid-area: usd; text-align: left; }
  .store-row-pts { grid-area: pts; }
  .store-row-action { grid-area: action; }
}

@media (max-width: 760px) {
  .signin-row,
  .signin-row.is-admin {
    grid-template-columns: 92px 1fr;
  }

  .signin-device,
  .signin-head span:nth-child(n+3) {
    display: none;
  }

  .signin-time {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
  }
}

.app-content:has(#view-admin-store.active),
.app-content:has(#view-admin-domains.active) {
  padding-top: 10px;
}

#view-admin-store.view.active,
#view-admin-domains.view.active {
  flex: 0 0 auto;
  display: block;
  height: auto;
  min-height: 0;
}

#view-admin-store .page-stack,
#view-admin-domains .page-stack {
  gap: 8px;
  flex: 0 0 auto;
  min-height: 0;
}

#view-admin-store .page-header,
#view-admin-domains .page-header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

#view-admin-store .page-header-aside,
#view-admin-domains .page-header-aside {
  flex: 1 1 auto;
  min-width: 0;
}

#view-admin-store .metric-strip,
#view-admin-domains .metric-strip {
  flex: 0 0 auto;
  justify-content: flex-end;
}

#view-admin-store .data-table-wrap,
#view-admin-domains .data-table-wrap {
  flex: 0 0 auto;
  min-height: 0;
}

#admin-domains-table {
  table-layout: fixed;
  width: 100%;
}

#admin-domains-table th:nth-child(1),
#admin-domains-table td:nth-child(1) { width: 28%; }
#admin-domains-table th:nth-child(2),
#admin-domains-table td:nth-child(2) { width: 16%; }
#admin-domains-table th:nth-child(3),
#admin-domains-table td:nth-child(3) { width: 24%; }
#admin-domains-table th:nth-child(4),
#admin-domains-table td:nth-child(4) { width: 14%; }
#admin-domains-table th:nth-child(5),
#admin-domains-table td:nth-child(5) { width: 18%; }

#admin-domains-table td {
  vertical-align: middle;
}

.admin-domain-hostcell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-domain-host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.admin-domain-hostcell .admin-order-pill {
  flex: 0 0 auto;
}

.admin-domain-account,
.admin-domain-owner {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.admin-domain-account-user,
.admin-domain-owner-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-domain-account-meta,
.admin-domain-owner-user {
  font-size: 11px;
  color: var(--muted, #9a9a9a);
}

.admin-domain-row-tenant {
  width: 100%;
  max-width: 240px;
}

.admin-domain-notes {
  color: var(--muted, #9a9a9a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#admin-domains-table .admin-row-actions-cell {
  width: 18%;
}

#view-admin-store .table-empty td,
#view-admin-domains .table-empty td {
  padding: 12px 10px;
}

#admin-store-catalog-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#admin-store-catalog-card .data-table-wrap {
  margin: 0;
}

#view-admin-aap.view.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#view-admin-aap .aap-dash {
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
}

#view-admin-aap .aap-dash .page-header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

#view-admin-aap .aap-dash-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  border: 1px solid var(--border);
  background: var(--surface);
}

#view-admin-aap .aap-mgr {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.admin-cat-group td {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--bg);
  padding: 6px 10px;
}

.admin-product-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-product-name {
  font-weight: 600;
}

.admin-product-sku {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.admin-product-edit-name,
.admin-product-edit-usd,
.admin-product-edit-desc,
.admin-product-edit-sale {
  width: 100%;
}

.admin-product-edit-usd {
  max-width: 88px;
}

.admin-product-edit-desc {
  margin-top: 4px;
}

.admin-sales-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-sales-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-sales-chip:hover {
  background: var(--row-hover);
}

.admin-sales-kicker,
.admin-sales-hint {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.admin-sales-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.admin-order-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
}

.admin-order-pill.is-pending {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.admin-order-pill.is-fulfilled,
.admin-order-pill.is-aapanel {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.admin-order-pill.is-cancelled {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.admin-order-pill.is-cpanel {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.35);
}

.admin-domain-add {
  margin-bottom: 0;
  padding: 8px 10px;
}

.admin-domain-add .domains-col-head {
  margin-bottom: 8px;
}

.admin-domain-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) 88px minmax(110px, 0.8fr) minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(110px, 0.8fr) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 0;
}

.admin-domain-form.is-aap .admin-domain-creds,
.admin-domain-form.is-aap #btn-admin-domain-test {
  display: none;
}

.admin-domain-form .form-actions {
  margin: 0;
  display: flex;
  gap: 6px;
}

.admin-domain-test-result {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted, #9a9a9a);
}

.admin-domain-test-result.is-ok {
  color: var(--green, #4ade80);
}

.admin-domain-test-result.is-err {
  color: var(--red, #f87171);
}

.aap-mgr-pending {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border, #2a2a2a);
  font-size: 12px;
  color: var(--muted, #9a9a9a);
}

.aap-mgr-pending-title {
  margin-bottom: 6px;
}

.aap-mgr-pending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1100px) {
  .admin-sales-strip,
  .admin-domain-form {
    grid-template-columns: 1fr 1fr;
  }

  .admin-domain-host-field,
  .admin-domain-form .form-actions {
    grid-column: 1 / -1;
  }
}
