/* ─────────────────────────────────────────────────────────
   Fleet Dashboard — Onsite IT brand refresh
   Drop-in replacement for fleet.onsitegroup.co.za/style.css
   Class names preserved 1:1 with original markup.

   Defaults to LIGHT (brand standard).
   `body.dark` opt-in dark variant.
   The legacy `body.light` toggle is also honored (no-op when
   light is already default) so existing JS keeps working.
   ───────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,400..600&family=DM+Mono:wght@400;500&display=swap');

/* ─────────── TOKENS — LIGHT (default) ─────────── */
:root {
  /* Brand */
  --green:        #00a651;
  --green-dark:   #007a3d;
  --green-tint:   #f0faf5;
  --green-soft:   #c8e6d4;

  /* Surfaces */
  --bg:           #f2f2f7;        /* page */
  --surface:      #ffffff;        /* cards, topbar, sidebar */
  --surface2:     #f9f9fb;        /* soft alt bg, hover rows */
  --border:       #e5e5ea;
  --border-soft:  rgba(229,229,234,0.6);

  /* Text */
  --text:         #1c1c1e;        /* primary */
  --text2:        #48484a;        /* body */
  --text3:        #8e8e93;        /* caption */

  /* Accents — semantic */
  --accent:       #00a651;        /* brand green = primary interaction */
  --accent-ink:   #ffffff;        /* contrast on green CTAs */
  --accent2:      #007AFF;        /* secondary (info) */
  --warn:         #F59E0B;
  --danger:       #EF4444;
  --success:      #009B3A;

  /* Tints (for soft badge / status fills) */
  --accent-tint:  rgba(0,166,81,0.10);
  --accent2-tint: rgba(0,122,255,0.10);
  --warn-tint:    rgba(245,158,11,0.12);
  --danger-tint:  rgba(239,68,68,0.10);

  /* Type */
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono:  'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-sm:  8px;
  --r:     14px;
  --r-lg:  22px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow:    0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);

  /* Motion */
  --ease-out:      cubic-bezier(0,0,0.2,1);
  --ease-spring:   cubic-bezier(0.175,0.885,0.32,1.28);
  --ease-standard: cubic-bezier(0.4,0,0.2,1);
}

/* Honor the legacy `.light` class — light is already default,
   so this is a no-op but documents intent. */
body.light { /* tokens already match :root */ }

/* ─────────── TOKENS — DARK opt-in ─────────── */
body.dark {
  --bg:          #0e1014;
  --surface:     #15181f;
  --surface2:    #1c2029;
  --border:      #262b36;
  --border-soft: rgba(38,43,54,0.7);

  --text:        #f0f1f5;
  --text2:       #b5bac6;
  --text3:       #6f7689;

  --accent:      #1ec872;       /* slightly brighter green for dark */
  --accent-ink:  #00210f;
  --accent-tint: rgba(30,200,114,0.12);
  --accent2-tint:rgba(0,122,255,0.18);
  --warn-tint:   rgba(245,158,11,0.18);
  --danger-tint: rgba(239,68,68,0.18);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  --shadow:    0 4px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55);
}

/* ─────────── RESET ─────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.2s ease;
}

/* The original noise overlay & grid — toned way down for the brand */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ─────────── THEME TOGGLE ─────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s var(--ease-standard);
  white-space: nowrap;
}
.theme-toggle:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}
.theme-toggle .theme-icon { font-size: 13px; line-height: 1; }

/* ─────────── LOGIN ─────────── */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.login-bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.45;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.login-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,166,81,0.10), transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);    /* brand signature device */
  border-radius: var(--r);
  padding: 44px 44px 40px;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.5s var(--ease-out) both;
}
.login-card::before { content: none; } /* drop legacy gradient strip */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.login-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 50%;                       /* the brand "green O" */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,166,81,0.25);
}
.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.login-logo span { color: var(--green); }

.login-subtitle {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* ─────────── FORM FIELDS ─────────── */
.field-group { margin-bottom: 16px; }

.field-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.field-input,
.subdomain-wrap {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field-input { padding: 11px 14px; }

.field-input:focus,
.subdomain-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,166,81,0.12);
}

.subdomain-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
}
.subdomain-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}
.subdomain-suffix {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  padding-right: 14px;
  white-space: nowrap;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text2);
  transition: all 0.15s var(--ease-standard);
  border: none;
  background: none;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ─────────── BUTTONS ─────────── */
.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.18s var(--ease-spring);
  letter-spacing: 0.005em;
}
.login-btn:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,166,81,0.22);
}
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.login-error {
  background: var(--danger-tint);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--danger);
  margin-top: 16px;
  display: none;
}

/* ─────────── DASHBOARD SHELL ─────────── */
#dashboard-page { display: none; flex-direction: column; min-height: 100vh; position: relative; z-index: 1; }
#dashboard-page.visible { display: flex; }

.topbar {
  height: 56px;
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
body.dark .topbar { background: rgba(21,24,31,0.78); }

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-logo .dot { color: var(--green); }

.topbar-server-wrap { position: relative; }

.topbar-server {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;             /* brand pill chip */
  padding: 5px 12px 5px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.topbar-server:hover,
.topbar-server[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--text);
}
.server-switcher-caret {
  font-size: 9px;
  margin-left: 2px;
  color: var(--text3);
  transition: transform 0.15s;
}
.topbar-server[aria-expanded="true"] .server-switcher-caret { transform: rotate(180deg); }

.server-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 1000;
  font-family: var(--sans);
  font-size: 12px;
}
.server-switcher-menu[hidden] { display: none; }
.server-switcher-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
}
.server-switcher-item:hover { background: var(--surface2); color: var(--text); }
.server-switcher-item.active { color: var(--green); background: var(--accent-tint); }
.server-switcher-item.active::before { content: '●'; font-size: 7px; }
.server-switcher-item:not(.active)::before { content: '○'; font-size: 7px; opacity: 0.4; }
.server-switcher-item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.server-switcher-item-sub { color: var(--text3); opacity: 0.7; font-size: 11px; font-family: var(--mono); }
.server-switcher-divider { height: 1px; background: var(--border); margin: 4px 0; }
.server-switcher-manage {
  display: block;
  padding: 8px 10px;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: 12px;
}
.server-switcher-manage:hover { background: var(--surface2); color: var(--green); }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(0,155,58,0.15);
  animation: pulse 2.4s var(--ease-standard) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

.topbar-spacer { flex: 1; }

/* ─────────── TOPBAR DROPDOWN MENUS ─────────── */
.topbar-menu { position: relative; }
.topbar-menu-trigger {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.15s, color 0.15s;
}
.topbar-menu-trigger:hover,
.topbar-menu.open .topbar-menu-trigger {
  border-color: var(--green);
  color: var(--text);
}
.topbar-menu-caret { font-size: 9px; color: var(--text3); transition: transform 0.15s; }
.topbar-menu.open .topbar-menu-caret { transform: rotate(180deg); }

.topbar-menu-items {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 1000;
  font-family: var(--sans);
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s, transform 0.14s, visibility 0.14s;
}
.topbar-menu:hover .topbar-menu-items,
.topbar-menu.open .topbar-menu-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.topbar-menu::before {
  content: '';
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 8px;
}
.topbar-menu-item {
  display: block;
  padding: 8px 10px;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 500;
}
.topbar-menu-item:hover { background: var(--surface2); color: var(--green); }
.topbar-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─────────── REPLICATE (icon button + modal) ─────────── */
.replicate-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  margin-left: 8px;
  opacity: 0.45;
  font-size: 13px;
  padding: 2px 5px;
  line-height: 1;
  border-radius: 4px;
  vertical-align: middle;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
tr:hover .replicate-btn { opacity: 0.85; }
.replicate-btn:hover { opacity: 1; color: var(--green); background: var(--accent-tint); }

.repl-modal[hidden],
.repl-modal-bg[hidden] { display: none !important; }

.repl-modal-bg {
  position: fixed; inset: 0;
  background: rgba(28,28,30,0.45);
  backdrop-filter: blur(3px);
  z-index: 9000;
}
.repl-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(580px, 92vw);
  max-height: 86vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--text);
}
.repl-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.repl-modal-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text2);
}
.repl-modal-sub { margin-top: 6px; font-size: 13px; color: var(--text); }
.repl-modal-sub b { color: var(--green); font-weight: 600; }
.repl-modal-close {
  background: none; border: none;
  color: var(--text3); font-size: 22px;
  cursor: pointer; padding: 0 6px; line-height: 1;
}
.repl-modal-close:hover { color: var(--text); }

.repl-modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.repl-modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface2);
}

.repl-mode-row { display: flex; gap: 18px; font-size: 13px; color: var(--text2); }
.repl-mode-row label { cursor: pointer; display: flex; align-items: center; gap: 6px; }

.repl-targets {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
  background: var(--bg);
}
.repl-empty { padding: 14px; color: var(--text3); font-size: 12px; }
.repl-target-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  margin-bottom: 3px;
}
.repl-target-row:hover { border-color: var(--green); }
.repl-target-row input[type="checkbox"] { cursor: pointer; accent-color: var(--green); }
.repl-target-row .repl-target-name { flex: 0 0 auto; min-width: 130px; font-weight: 600; }
.repl-target-row .repl-target-sub { color: var(--text3); font-size: 11px; font-family: var(--mono); }
.repl-target-row .repl-scope-wrap { flex: 1; display: flex; align-items: center; gap: 6px; }
.repl-target-row .repl-scope-label { color: var(--text3); font-size: 11px; }
.repl-target-row select {
  flex: 1; min-width: 120px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: var(--sans);
  font-size: 12px;
}
.repl-target-row select:disabled { opacity: 0.4; }
.repl-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); cursor: pointer; }

/* ─────────── TOPBAR BUTTONS ─────────── */
.topbar-refresh,
.logout-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s var(--ease-standard);
}
.topbar-refresh:hover { border-color: var(--green); color: var(--green); }

/* Refresh button — icon + countdown label. The label updates every
   second via updateRefreshLabel() in app.js. */
#refresh-btn { display: inline-flex; align-items: center; gap: 7px; min-width: 110px; justify-content: center; }
#refresh-btn .refresh-icon  { font-size: 13px; line-height: 1; transition: transform .4s var(--ease-standard); }
#refresh-btn:disabled { opacity: 0.7; cursor: not-allowed; }
#refresh-btn:disabled .refresh-icon { animation: refreshSpin 1.1s linear infinite; }
@keyframes refreshSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.logout-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ─────────── LAYOUT ─────────── */
.layout {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* ─────────── SIDEBAR ─────────── */
.sidebar {
  width: 232px;
  min-width: 232px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 0;
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-standard);
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text2);
  font-size: 16px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  margin-right: 4px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,28,30,0.45);
  backdrop-filter: blur(2px);
  z-index: 49;
}
.sidebar-overlay.active { display: block; }

.sidebar-section { margin-bottom: 10px; }

.sidebar-section-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text3);
  text-transform: uppercase;
  padding: 10px 20px 8px;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.15s;
}
.sidebar-section-label:hover { color: var(--text2); }
.sidebar-section.expanded .sidebar-section-label { color: var(--text); }

.sidebar-section-label::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.55;
  transition: transform 0.2s var(--ease-standard);
}
.sidebar-section.expanded .sidebar-section-label::after {
  transform: rotate(45deg);
  opacity: 0.9;
}

.sidebar-section-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s var(--ease-standard);
}
.sidebar-section.expanded .sidebar-section-items {
  max-height: 1000px;
  transition: max-height 0.28s var(--ease-standard);
}
.sidebar-section:not(.expanded) .sidebar-section-items { pointer-events: none; }
.sidebar-section.expanded .sidebar-section-items { pointer-events: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1px 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border-radius: var(--r-sm);
  position: relative;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }

.nav-item.active {
  background: var(--accent-tint);
  color: var(--green);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--green);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  font-size: 18px;          /* drives the Phosphor <i> glyph size */
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  line-height: 1;
}
/* Phosphor Icons rendered via <i class="ph ph-…"> — inherit nav text color */
.nav-icon i.ph {
  font-size: inherit;
  color: inherit;
  line-height: 1;
  display: inline-block;
}
/* SF Symbols / Lucide outline style — kept for any leftover inline SVG icons */
.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.nav-item.active .nav-icon { color: var(--green); }

.nav-badge {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  background: var(--danger-tint);
  color: var(--danger);
  border-radius: 12px;
  padding: 1px 7px;
}
.nav-badge.warn { background: var(--warn-tint); color: var(--warn); }

/* ─────────── MAIN ─────────── */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  background: var(--bg);
}

.page-header { margin-bottom: 28px; }

.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.page-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text2);
  margin-top: 6px;
  line-height: 1.55;
}

/* ─────────── PANELS ─────────── */
.panel { display: none; }
.panel.active { display: block; }

/* ─────────── STAT CARDS ─────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s var(--ease-out) both;
  transition: transform 0.18s var(--ease-standard), box-shadow 0.18s, border-color 0.18s;
}
.stat-card::after { content: none; }   /* drop bottom accent strip */

.stat-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
}

/* Brand: green is signal, not wallpaper — stat values stay ink. */
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.warn   .stat-value { color: var(--warn); }
.stat-card.blue   .stat-value { color: var(--accent2); }
.stat-card        .stat-value { color: var(--text); }

.stat-sub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
  margin-top: 8px;
}

.stat-card[onclick] { cursor: pointer; }
.stat-card[onclick]:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ─────────── SECTION BLOCKS ─────────── */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.section-grid.full   { grid-template-columns: 1fr; }
.section-grid.thirds { grid-template-columns: 1fr 1fr 1fr; }

.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.5s var(--ease-out) both;
}

.block-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.block-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.block-subtitle {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px;
}

.block-action {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s;
}
.block-action:hover { color: var(--green-dark); }

.block-body { padding: 18px 22px; }

/* ─────────── DATA TABLES ─────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text3);
  text-transform: uppercase;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); color: var(--text); }

/* ─────────── BADGES ─────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok     { background: var(--accent-tint);  color: var(--success); border-color: rgba(0,155,58,0.2); }
.badge-warn   { background: var(--warn-tint);    color: var(--warn);    border-color: rgba(245,158,11,0.25); }
.badge-danger { background: var(--danger-tint);  color: var(--danger);  border-color: rgba(239,68,68,0.22); }
.badge-info   { background: var(--accent2-tint); color: var(--accent2); border-color: rgba(0,122,255,0.22); }

/* ─────────── BAR CHARTS ─────────── */
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-item {}
.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.bar-name { font-size: 13px; font-weight: 500; color: var(--text); }
.bar-val  { font-family: var(--mono); font-size: 12px; color: var(--text3); }

.bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--green);
  transition: width 0.8s var(--ease-standard);
}
.bar-fill.warn   { background: var(--warn); }
.bar-fill.danger { background: var(--danger); }
.bar-fill.blue   { background: var(--accent2); }

/* ─────────── LOADING ─────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  flex-direction: column;
  gap: 20px;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text2);
  letter-spacing: 0.04em;
}

/* ─────────── DONUT ─────────── */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-svg { flex-shrink: 0; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text2);
}
.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-val { margin-left: auto; color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 12px; }

/* ─────────── RISK HEATMAP ─────────── */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.risk-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 12px;
  text-align: center;
}
.risk-score {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.risk-name {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}
.score-high { color: var(--danger); }
.score-med  { color: var(--warn); }
.score-low  { color: var(--success); }

/* ─────────── EMPTY STATE ─────────── */
.empty-state {
  text-align: center;
  padding: 48px 32px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text3);
}

/* ─────────── SEARCH BAR ─────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,166,81,0.12);
}

/* ─────────── SCROLLBAR ─────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--text3); background-clip: padding-box; }

/* ─────────── TOAST ─────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--r-sm);
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  z-index: 300;
  transform: translateX(120%);
  transition: transform 0.3s var(--ease-standard);
  max-width: 320px;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--danger); }

/* ─────────── DRAWER ─────────── */
.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,28,30,0.42);
  backdrop-filter: blur(3px);
  z-index: 400;
}
.drawer-overlay.active { display: block; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(860px, 100vw);
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 401;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  /* Shadow only when .open — see .side-drawer for the same reason.
     A fixed-position panel translated off-screen still casts its
     shadow into the viewport without this. */
  transition: transform 0.32s var(--ease-standard),
              box-shadow 0.2s ease-out;
  overflow: hidden;
}
.drawer.open {
  transform: translateX(0);
  box-shadow: var(--shadow-lg);
}

.drawer-topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  flex-shrink: 0;
}

.drawer-back {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s var(--ease-standard);
  display: flex;
  align-items: center;
  gap: 6px;
}
.drawer-back:hover { border-color: var(--green); color: var(--green); }

.drawer-device-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-device-type {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
}

.drawer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text2);
}

.drawer-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
  flex-shrink: 0;
}
.drawer-tabs::-webkit-scrollbar { height: 2px; }
.drawer-tab {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  padding: 14px 14px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s var(--ease-standard);
}
.drawer-tab:hover { color: var(--text); }
.drawer-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }

.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }

.drawer-tab-panel { display: none; }
.drawer-tab-panel.active { display: block; }

/* ─────────── DETAIL GRID ─────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.detail-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.detail-block.full { grid-column: 1 / -1; }

.detail-block-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text2);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
}
.detail-block-icon { font-size: 13px; color: var(--green); }

.kv-list { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: baseline;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-soft);
  gap: 10px;
}
.kv-row:last-child { border-bottom: none; }
.kv-key {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  min-width: 150px;
  flex-shrink: 0;
}
.kv-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
}
.kv-val.highlight { color: var(--text); font-weight: 600; }
.kv-val.ok     { color: var(--success); }
.kv-val.warn   { color: var(--warn); }
.kv-val.danger { color: var(--danger); }

.device-link {
  color: var(--green);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.device-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ─────────── COMPLIANCE BAR ─────────── */
.compliance-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.compliance-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.compliance-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--green);
  transition: width 0.6s var(--ease-standard);
}
.compliance-fill.warn   { background: var(--warn); }
.compliance-fill.danger { background: var(--danger); }
.compliance-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  min-width: 36px;
  text-align: right;
}

/* ─────────── NOTIFICATIONS ─────────── */
.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.notif-card:last-child { border-bottom: none; }
.notif-icon {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-icon.error { background: var(--danger-tint); color: var(--danger); }
.notif-icon.warn  { background: var(--warn-tint);   color: var(--warn); }
.notif-icon.info  { background: var(--accent2-tint);color: var(--accent2); }
.notif-content { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.notif-desc  { font-family: var(--sans); font-size: 13px; color: var(--text2); line-height: 1.55; }
.notif-time  { font-family: var(--mono); font-size: 11px; color: var(--text3); white-space: nowrap; }

/* ─────────── APNS STATUS ─────────── */
.apns-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.apns-status.ok     { border-color: rgba(0,155,58,0.25); background: var(--accent-tint); }
.apns-status.warn   { border-color: rgba(245,158,11,0.3); background: var(--warn-tint); }
.apns-status.danger { border-color: rgba(239,68,68,0.25); background: var(--danger-tint); }
.apns-status-icon  { font-size: 22px; }
.apns-status-text  { flex: 1; }
.apns-status-title { font-size: 14px; font-weight: 700; color: var(--text); }
.apns-status-sub   { font-family: var(--sans); font-size: 13px; color: var(--text2); margin-top: 3px; }

/* ─────────── STATUS PILLS ─────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.completed { background: var(--accent-tint);  color: var(--success); border-color: rgba(0,155,58,0.2); }
.status-pill.failed    { background: var(--danger-tint);  color: var(--danger);  border-color: rgba(239,68,68,0.22); }
.status-pill.pending   { background: var(--warn-tint);    color: var(--warn);    border-color: rgba(245,158,11,0.25); }

/* ─────────── MDM COMMAND CARDS ─────────── */
.cmd-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cmd-card.cmd-danger { border-color: rgba(239,68,68,0.22); background: var(--danger-tint); }
.cmd-card-title { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; letter-spacing: -0.01em; }
.cmd-card-desc  { font-size: 13px; color: var(--text2); margin-bottom: 14px; line-height: 1.55; }
.cmd-card label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}
.cmd-card .field-input { width: 100%; font-size: 13px; margin-bottom: 10px; }

.cmd-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.18s var(--ease-spring);
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}
.cmd-btn:hover:not(:disabled) {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,166,81,0.22);
}
.cmd-btn.warn   { border-color: var(--warn);   background: var(--warn);   color: #fff; }
.cmd-btn.warn:hover:not(:disabled)   { background: #d97f00; border-color: #d97f00; }
.cmd-btn.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.cmd-btn.danger:hover:not(:disabled) { background: #c93030; border-color: #c93030; }
.cmd-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.cmd-result {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--success);
  min-height: 14px;
}
.cmd-result.error { color: var(--danger); }

/* ─────────── EDIT USER MODAL ─────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28,28,30,0.45);
  z-index: 900;
  backdrop-filter: blur(3px);
}
.modal-card {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  z-index: 901;
  width: min(620px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text2);
}
.modal-close {
  background: none; border: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  line-height: 1;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-section { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-section:last-of-type { border-bottom: none; }
.modal-section-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; }
.modal-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
}
.modal-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  position: sticky; bottom: 0;
}
.ldap-result-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ldap-result-item {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.15s var(--ease-standard);
  display: flex; flex-direction: column; gap: 2px;
}
.ldap-result-item:hover {
  border-color: var(--green);
  background: var(--accent-tint);
}
.ldap-result-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ldap-result-sub  { font-size: 11px; font-family: var(--mono); color: var(--text3); }

.edit-user-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--surface);
  margin-bottom: 14px;
  transition: all 0.18s var(--ease-standard);
}
.edit-user-btn:hover { border-color: var(--green); color: var(--green); background: var(--accent-tint); }

/* ─────────── CSV EXPORT BUTTON ─────────── */
.csv-export-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--surface);
  white-space: nowrap;
  transition: all 0.18s var(--ease-standard);
  margin-left: auto;
}
.csv-export-btn:hover { border-color: var(--green); color: var(--green); }

/* ─────────── REPORT BUILDER ─────────── */
.rp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 0 16px;
  flex-wrap: wrap;
}
.rp-toolbar-left, .rp-toolbar-right { display: flex; align-items: center; gap: 10px; }
.rp-toolbar-label { font-family: var(--sans); font-size: 12px; color: var(--text2); }
.rp-count         { font-family: var(--sans); font-size: 12px; color: var(--text3); }

.rp-device-select,
.rp-cat-select,
.rp-filter-select,
.rp-filter-input {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rp-device-select:focus,
.rp-cat-select:focus,
.rp-filter-select:focus,
.rp-filter-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,166,81,0.10);
}
.rp-filter-input { width: 170px; flex-shrink: 0; cursor: text; }

.rp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.rp-card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.rp-card-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text2);
}
.rp-card-hint { font-family: var(--sans); font-size: 12px; color: var(--text3); }
.rp-card-body { padding: 18px; }

.rp-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.rp-cat-col { display: flex; flex-direction: column; gap: 6px; }
.rp-cat-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
}
.rp-cat-select { width: 100%; }
.rp-cat-select:hover:not(:disabled) { border-color: var(--green); }
.rp-cat-select:disabled { opacity: 0.4; cursor: default; }

.rp-pills-wrap {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.rp-pills-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin-bottom: 10px;
}
.rp-pills { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; align-items: center; }
.rp-pills-empty { font-family: var(--sans); font-size: 12px; color: var(--text3); }

.rp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.15s var(--ease-standard);
}
.rp-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.rp-pill:hover { border-color: var(--green); background: var(--accent-tint); }
.rp-pill-label { line-height: 1; }
.rp-pill-remove {
  background: none; border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 12px;
  line-height: 1;
  width: 16px; height: 16px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.rp-pill-remove:hover { color: #fff; background: var(--danger); }

.rp-add-filter {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s var(--ease-spring);
  white-space: nowrap;
}
.rp-add-filter:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-1px);
}
.rp-filters-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.rp-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-filter-remove {
  font-size: 12px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.rp-filter-remove:hover { color: var(--danger); }

.rp-card .data-table { border-radius: 0; }

/* ─────────── FOCUS RING (brand) ─────────── */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
    width: 260px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle  { display: block; }
  .main         { width: 100%; padding: 20px 18px; }
  .section-grid { grid-template-columns: 1fr !important; }
  .stat-grid    { grid-template-columns: repeat(2, 1fr); }
  .topbar-server { display: none; }
}

@media (max-width: 600px) {
  .detail-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
}

@media (max-width: 560px) {
  .topbar     { padding: 0 14px; gap: 10px; }
  .main       { padding: 18px 14px; }
  .stat-grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 28px; }
  .page-title { font-size: 22px; }
  .login-card { padding: 32px 22px; margin: 16px; }
  .block-body { padding: 14px 16px !important; }

  .data-table th,
  .data-table td { padding: 9px 9px; font-size: 12px; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) { display: none; }

  .topbar-refresh { display: none; }
}

/* ════════════════════════════════════════════════════════════
   Onsite-IT richer tenant components — graduated from preview.
   Tenant switcher, swatches, scope crumb, tenant grid, agg KPIs.
   ════════════════════════════════════════════════════════════ */

/* ── Tenant swatch — letter chip or grid icon used in switcher / cards ── */
.tenant-swatch {
  width: 18px; height: 18px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.tenant-swatch.all    { background: var(--text); color: var(--surface); border-radius: 5px; }
.tenant-swatch.indigo { background: #5856D6; }
.tenant-swatch.orange { background: #FF9500; }
.tenant-swatch.blue   { background: #007AFF; }
.tenant-swatch.teal   { background: #5AC8FA; color: #0e2c3a; }
.tenant-swatch.sand   { background: #8A7A5C; }
.tenant-swatch.pink   { background: #FF2D55; }
.tenant-swatch.lime   { background: #34C759; color: #0a3a18; }
.tenant-swatch svg {
  width: 11px; height: 11px;
  stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Topbar tenant switcher (replaces the simple .topbar-server) ── */
.tenant-switcher { min-width: 260px; padding: 6px 14px 6px 12px; }

.switcher-menu-wide {
  min-width: 360px;
  max-width: 420px;
  padding: 8px;
}
.switcher-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}
.switcher-search svg {
  width: 14px; height: 14px; stroke: var(--text3); stroke-width: 1.75;
  fill: none; stroke-linecap: round;
}
.switcher-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--sans); font-size: 13px; color: var(--text);
}
.switcher-search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px;
}

.switcher-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 10px 4px;
}
.switcher-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text);
  transition: background 0.12s;
}
.switcher-row:hover { background: var(--surface2); }
.switcher-row.active { background: var(--accent-tint); }
.switcher-row.active .switcher-row-name { color: var(--green); }
.switcher-row-main { flex: 1; min-width: 0; }
.switcher-row-name {
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.switcher-row-sub {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.switcher-row-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.switcher-count {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
}
.switcher-check {
  width: 14px; height: 14px; stroke: var(--green); stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.health-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}
.health-dot.warn   { background: var(--warn); }
.health-dot.danger { background: var(--danger); }

/* ── Scope crumb (breadcrumb under page header) ── */
.scope-crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 12px; color: var(--text3);
  margin-bottom: 6px;
}
.scope-crumb .crumb-sep { color: var(--text3); opacity: 0.5; }
.scope-crumb b { color: var(--text); font-weight: 600; }
.scope-crumb svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 1.75; fill: none;
}

/* ── Tenant grid + tenant card (All Tenants overview) ── */
.tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tenant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s var(--ease-standard), box-shadow 0.18s, border-color 0.18s;
  display: flex; flex-direction: column; gap: 14px;
}
.tenant-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tenant-card-head { display: flex; align-items: center; gap: 12px; }
.tenant-card-head .tenant-swatch {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  font-size: 14px;
}
.tenant-card-title { flex: 1; min-width: 0; }
.tenant-card-name {
  font-size: 15px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tenant-card-host {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tenant-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tenant-kpi-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3);
}
.tenant-kpi-value {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.1; margin-top: 4px;
}
.tenant-kpi-value.warn   { color: var(--warn); }
.tenant-kpi-value.danger { color: var(--danger); }
.tenant-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: 11px; color: var(--text3);
}
.tenant-card-foot .last-sync { display: inline-flex; align-items: center; gap: 6px; }

/* ── Aggregate KPI strip — slightly larger than per-tenant stat-card ── */
.agg-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.agg-grid .stat-value { font-size: 40px; }
.agg-grid .stat-card { padding: 22px 24px; }
.agg-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--success);
  margin-top: 10px;
}
.agg-trend.down { color: var(--danger); }
.agg-trend svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Tenant name link inside attention table ── */
.tenant-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.tenant-link:hover { color: var(--green); }
.tenant-link .tenant-swatch {
  width: 22px; height: 22px; font-size: 11px; border-radius: 5px;
}

/* ════════════════════════════════════════════════════════════
   In-app modal + management screen helpers (graduated from
   the design preview supplied 2026-05-13).
   Used by future Manage Tenants / Team / Account in-app panels.
   ════════════════════════════════════════════════════════════ */

.page-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* Solid-fill primary button used inside modals. Distinct from .topbar-refresh
   which is the surface-chip nav button. */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s ease-out;
  font-family: inherit;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark, #008f46); }
.btn-ghost   { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.94); }
.btn-danger:disabled { background: var(--surface2); color: var(--text3); cursor: not-allowed; }

/* Small inline button for table rows (Edit / Remove / Sync) */
.row-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px; font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer; font-family: inherit;
}
.row-btn:hover { background: var(--surface2); }
.row-btn.danger { color: var(--danger); border-color: transparent; }
.row-btn.danger:hover { background: var(--danger-tint); }

/* Search-style text input inside a block header */
.block-search {
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 13px; min-width: 220px;
  background: var(--surface); color: var(--text);
  font-family: inherit;
}
.block-search:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,166,81,0.12);
}

/* Three-column stat grid for the new in-app screens */
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Tenant-manage table row */
.tm-tenant  { display: flex; align-items: center; gap: 12px; }
.tm-name    { font-size: 13px; font-weight: 600; color: var(--text); }
.tm-sub     { font-size: 11px; color: var(--text3); margin-top: 2px; }
.tm-actions { text-align: right; white-space: nowrap; }
.tm-actions .row-btn { margin-left: 6px; }
.tenant-manage-table td { vertical-align: middle; }
.tenant-manage-table code {
  font-size: 12px;
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--text2);
  font-family: var(--mono);
}

/* Extra tenant-swatch colour variants for SaaS-team palette */
.tenant-swatch.sky    { background: #dbeafe; color: #1d4ed8; }
.tenant-swatch.violet { background: #ede9fe; color: #6d28d9; }
.tenant-swatch.amber  { background: #fef3c7; color: #b45309; }

/* ── Refresh button with countdown — the label updates every second
       via updateRefreshLabel() in app.js. ── */
#refresh-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 130px; justify-content: center;
  font-variant-numeric: tabular-nums;     /* keeps numerals same width as they tick */
}
#refresh-btn .refresh-icon {
  font-size: 13px; line-height: 1;
  transition: transform .4s var(--ease-standard);
}
#refresh-btn:disabled { opacity: 0.7; cursor: not-allowed; }
#refresh-btn:disabled .refresh-icon { animation: refreshSpin 1.1s linear infinite; }
@keyframes refreshSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════
   Pagination bar — sits below every data table, persists the
   chosen page size globally (localStorage 'fleetiq.pageSize').
   Wired up by applyPagination() in app.js.
   ════════════════════════════════════════════════════════════ */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  flex-wrap: wrap;
}
.pagination-info b { color: var(--text); font-weight: 600; }

.pagination-nav { display: inline-flex; gap: 8px; align-items: center; }
.pagination-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  transition: border-color .15s, color .15s;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination-btn:disabled            { opacity: 0.35; cursor: not-allowed; }
.pagination-page {
  min-width: 110px; text-align: center;
  color: var(--text); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pagination-size { display: inline-flex; gap: 8px; align-items: center; }
.pagination-size select {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.pagination-size select:focus { outline: none; border-color: var(--accent); }

@media (max-width: 720px) {
  .pagination-bar { gap: 10px; padding: 10px 12px; }
  .pagination-info { order: 3; flex: 1 1 100%; text-align: center; }
}

/* ─── Slide-in side drawer (Phase O.2) ────────────────────────
   Shared chrome for Add/Edit drawers and user-detail drawers used
   by the in-SPA settings panels (servers / security-cloud / admin).
   Distinct from the device-detail .drawer which is also a slide-in
   but uses different DOM ids + content shape. */
.side-drawer-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s; z-index: 99;
}
.side-drawer-bg.open { opacity: 1; visibility: visible; }
.side-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 520px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  /* No shadow when closed — the off-screen drawer was casting a 60px
     dark band into the right edge of the viewport. Shadow only paints
     when the drawer is actually open. */
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.2s ease-out;
  z-index: 100; display: flex; flex-direction: column;
}
.side-drawer.open {
  transform: translateX(0);
  box-shadow: -20px 0 40px rgba(0,0,0,0.15);
}
.side-drawer-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.side-drawer-head h2 {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--text);
}
.side-drawer-head .meta {
  font-family: var(--sans); font-size: 12px; color: var(--text3);
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px;
}
.side-drawer-close {
  background: transparent; border: none; color: var(--text2);
  cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px;
  flex-shrink: 0;
}
.side-drawer-close:hover { color: var(--accent); }
.side-drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.side-drawer-foot {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px;
}
.side-drawer-foot .btn { flex: 1; justify-content: center; }

.side-drawer-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  padding: 0 24px; flex-shrink: 0;
}
.side-drawer-tab {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  padding: 10px 14px; cursor: pointer;
  color: var(--text3); border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
  background: transparent; border-top: none; border-left: none; border-right: none;
}
.side-drawer-tab:hover { color: var(--text2); }
.side-drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.side-drawer-pane { display: none; padding: 18px 24px; }
.side-drawer-pane.active { display: block; }

@media (max-width: 520px) { .side-drawer { max-width: 100%; } }

/* Subdomain input with jamfcloud.com suffix (servers panel) */
.subdomain-wrap {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.subdomain-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.subdomain-wrap input {
  border: none; background: transparent; flex: 1; padding: 11px 14px;
  font-family: var(--mono); font-size: 13px; color: var(--text);
}
.subdomain-wrap input:focus { outline: none; }
.subdomain-suffix {
  padding: 0 14px; color: var(--text2);
  font-family: var(--mono); font-size: 12px; white-space: nowrap;
}

/* Active "filter chip" — used in admin user filters */
.row-btn.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}
