/* ============================================================
   Advanced Technologies — Onboarding Portal (PHP edition)
   Styles ported from the design prototype.
   ============================================================ */

:root {
  --accent: #2f6df4;
  --accent-hover: #1f5be0;
  --accent-soft: #e8efff;
  --accent-ring: rgba(47, 109, 244, 0.22);

  --ink-900: #0b1220;
  --ink-800: #11192a;
  --ink-700: #1a2238;

  --text: #0f172a;
  --text-muted: #5b6577;
  --text-subtle: #8893a6;

  --line: #e5e8ee;
  --line-strong: #d6dbe4;
  --bg: #f7f8fa;
  --bg-panel: #ffffff;
  --bg-soft: #f3f5f8;
  --bg-inset: #fafbfc;

  --warn: #b4540c;
  --warn-soft: #fff4e6;
  --ok: #117a48;
  --ok-soft: #e6f5ed;
  --err: #b42318;
  --err-soft: #fde8e6;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.18), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); }

/* ============ App layout ============ */
.app { min-height: 100vh; display: grid; }
.app.has-sidebar { grid-template-columns: 320px 1fr; }
.app.no-sidebar { grid-template-columns: 1fr; }

/* ============ Sidebar ============ */
.sidebar {
  background: var(--ink-900);
  color: #c8d0df;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #6c9bff);
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 14px; }
.brand-sub  { font-size: 12px; color: #6e7891; margin-top: 2px; }

.steplist {
  display: flex; flex-direction: column; gap: 2px;
  list-style: none; padding: 0; margin: 0;
}
.step-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  color: #8a93a8;
  position: relative;
  cursor: default;
  transition: background 120ms, color 120ms;
}
.steplist .step-item:hover { background: rgba(255,255,255,0.03); color: #c8d0df; }
.step-item.active { background: rgba(255,255,255,0.06); color: #fff; }
.step-item.done { color: #c8d0df; }
.step-item .ring {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #3a445e;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 500;
  color: #6e7891;
  background: var(--ink-900);
}
.step-item.active .ring { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-item.done .ring   { border-color: var(--ok); background: var(--ok); color: #fff; }
.step-item .step-title { font-size: 13px; font-weight: 500; }
.step-item .step-sub   { font-size: 11.5px; color: #6e7891; margin-top: 2px; line-height: 1.3; }
.step-item:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 36px; bottom: -2px; width: 1.5px; background: #2a3349;
}
.admin-steplist .step-item::after { display: none !important; }
.admin-steplist .step-item { grid-template-columns: 24px 1fr; padding: 8px 10px; align-items: center; }
.admin-nav-ic {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: #6e7891;
}
.admin-steplist .step-item.active .admin-nav-ic { color: #fff; }
.admin-steplist .step-item:hover .admin-nav-ic { color: #c8d0df; }
.admin-steplist .step-item .step-title {
  padding-top: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-steplist .step-item a { color: inherit; text-decoration: none; display: block; }
.admin-steplist .step-item.active a { color: #fff; }
.admin-nav-section {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e7891;
  padding: 12px 10px 4px;
}

/* Collapsible admin nav groups */
.admin-nav-group {
  margin-bottom: 2px;
}
.admin-nav-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 6px;
  transition: background 100ms, color 100ms;
}
.admin-nav-group > summary::-webkit-details-marker { display: none; }
.admin-nav-group > summary:hover { color: #c8d0df; background: rgba(255,255,255,0.03); }
.admin-nav-chev {
  font-size: 11px;
  color: #6e7891;
  transition: transform 160ms ease;
  margin-right: 6px;
}
.admin-nav-group[open] > summary .admin-nav-chev { transform: rotate(180deg); }
.admin-nav-group > .admin-steplist { margin-top: 2px; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #1d2540;
  font-size: 12px;
  color: #6e7891;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer a { color: #a3acc1; }
.admin-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #8a93a8;
  text-decoration: none;
  font-size: 12.5px;
  padding: 8px 10px;
  border: 1px solid #1d2540;
  border-radius: 8px;
  margin-top: 6px;
  transition: color 120ms, border-color 120ms, background 120ms;
}
.admin-back-link:hover { color: #fff; border-color: #2a3349; background: rgba(255,255,255,0.03); }

/* ============ Main + topbar ============ */
.main { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.crumb-sep { color: var(--text-subtle); }
.contact-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 12.5px;
}
.contact-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d3dcef, #b3c2e3);
  color: #1a2238;
  display: grid; place-items: center;
  font-size: 10.5px;
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 36px 48px 140px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}
.app.no-sidebar .content { max-width: 480px; padding-top: 8vh; }
.admin-content { max-width: 1240px; }

/* ============ Headers ============ */
.step-header { margin-bottom: 28px; }
.step-eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 10px;
}
.step-title-h {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.step-desc { color: var(--text-muted); max-width: 620px; margin: 0; }

.admin-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}

/* ============ Cards ============ */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.card-sub { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.empty-card { padding: 32px 24px; background: var(--bg-inset); text-align: center; }
.big-help { color: var(--text-muted); max-width: 460px; margin: 0 auto 18px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:disabled { background: #b4c4e5; border-color: #b4c4e5; cursor: not-allowed; }
.btn-secondary { background: var(--bg-panel); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger-ghost { background: transparent; color: var(--err); }
.btn-danger-ghost:hover { background: var(--err-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }

/* ============ Form primitives ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-row    { display: grid; grid-template-columns: 1fr 1fr;     gap: 16px; }
.field-row-3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label { font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--err); }
.help { font-size: 12px; color: var(--text-muted); margin: 0; }
.error-text { font-size: 12px; color: var(--err); margin: 4px 0 0; }
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--err); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  height: 40px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.textarea { padding: 10px 12px; height: auto; min-height: 84px; line-height: 1.45; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' stroke='%23667085' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle-track {
  width: 32px; height: 18px; background: var(--line-strong); border-radius: 999px; position: relative;
  transition: background 140ms;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; background: #fff; border-radius: 50%;
  transition: transform 140ms;
  box-shadow: 0 1px 2px rgba(15,23,42,0.2);
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }
.toggle-label { font-size: 13px; }

/* Check / radio cards */
.check {
  display: inline-flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel);
  cursor: pointer;
  user-select: none;
  transition: border-color 120ms, background 120ms;
}
.check:hover { border-color: var(--line-strong); }
.check input { display: none; }
.check-box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  display: grid; place-items: center;
  margin-top: 1px; flex-shrink: 0;
}
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translate(0px, -1px);
}
.check-radio {
  width: 16px; height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  margin-top: 1px; flex-shrink: 0;
  display: grid; place-items: center;
}
.check input:checked + .check-radio {
  background: var(--accent); border-color: var(--accent);
}
.check input:checked + .check-radio::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}
.check.selected { border-color: var(--accent); background: var(--accent-soft); }
.check.elevated { border-color: var(--warn); background: var(--warn-soft); }
.check-content { font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; flex: 1; }
.check-title { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.check-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

.radio-grid       { display: grid; grid-template-columns: 1fr 1fr;     gap: 8px; }
.radio-grid-3     { grid-template-columns: 1fr 1fr 1fr; }
.radio-grid-4     { grid-template-columns: 1fr 1fr 1fr 1fr; }
.radio-stack      { grid-template-columns: 1fr; }
.checkbox-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-stack   { display: grid; grid-template-columns: 1fr; gap: 6px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
}
.badge-synced { background: var(--accent-soft); color: var(--accent); }
.badge-custom { background: #f3e8ff; color: #6b21a8; }
.badge-required { background: var(--bg-soft); color: var(--text-muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-overridden { background: var(--warn-soft); color: var(--warn); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Banner */
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent-ring);
  background: var(--accent-soft);
  color: #1a3a8a;
  margin-bottom: 16px;
}
.banner strong { color: inherit; }
.banner-warn { border-color: rgba(180,84,12,0.25); background: var(--warn-soft); color: #6b3504; }
.banner-ok { border-color: rgba(17,122,72,0.25); background: var(--ok-soft); color: #0a4a2c; }

/* ============ Footer nav ============ */
.footer-nav {
  position: fixed;
  left: 320px;
  right: 0; bottom: 0;
  height: 72px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  z-index: 20;
}
.app.no-sidebar .footer-nav { left: 0; }
.progress-info { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 13px; }
.progress-track { width: 220px; height: 4px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--accent); border-radius: 999px; transition: width 240ms ease; width: 20%; }
.footer-actions { display: flex; gap: 8px; align-items: center; }

/* ============ Step pages (JS hides non-active steps) ============ */
.onboard-form.js-on .step { display: none; }
.onboard-form.js-on .step.active { display: block; }

/* ============ Org picker grid ============ */
.org-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.org-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.org-card:hover { border-color: var(--line-strong); }
.org-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.org-card input { display: none; }
.org-card-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6c9bff);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.org-card-text { flex: 1; min-width: 0; }
.org-card-name { font-size: 13.5px; font-weight: 600; }
.org-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.org-card-id   { font-family: "Geist Mono", monospace; font-size: 11px; color: var(--text-subtle); margin-top: 4px; }

/* ============ Workstation needs-device toggle ============ */
.needs-device-toggle {
  display: flex; flex-direction: column; gap: 12px;
}
.toggle-group { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.seg-control { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg-soft); border-radius: 8px; }
.seg {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 120ms, color 120ms, box-shadow 120ms;
}
.seg input { display: none; }
.seg.on { background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-sm); }

/* ============ Thanks page ============ */
.thanks { text-align: center; padding: 60px 20px; }
.thanks-seal {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center;
  font-size: 28px; margin: 0 auto 18px;
}
.thanks h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 10px; }
.thanks p { color: var(--text-muted); max-width: 460px; margin: 0 auto 18px; }
.thanks-ref {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}
.thanks-actions { margin-top: 22px; }

/* ============ Login + install ============ */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 22px; letter-spacing: -0.01em; margin-top: 0; }
.page-install { background: var(--bg); padding: 36px 20px; }
.install-wrap { max-width: 720px; margin: 0 auto; }
.install-wrap .card h2 { font-size: 18px; margin: 0 0 10px; }
.install-wrap .card h3 { font-size: 13px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
code { font-family: "Geist Mono", monospace; font-size: 0.92em; background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; }

/* ============ Admin: stats + toolbar + table ============ */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-tile { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat-tile .stat-val { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat-tile .stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-tile.ok .stat-val { color: var(--ok); }
.stat-tile.warn .stat-val { color: var(--warn); }
.stat-tile.err .stat-val { color: var(--err); }

.admin-toolbar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 14px;
  padding: 8px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 10px;
}
.search-wrap { flex: 0 0 260px; position: relative; }
.search-input {
  width: 100%; height: 32px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--bg-panel);
  padding: 0 12px;
  font-size: 13px; outline: none;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.filter-pill select {
  appearance: none;
  height: 32px; padding: 0 28px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--bg-panel);
  font-size: 12.5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' stroke='%23667085' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center;
  cursor: pointer;
}

.admin-table {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 12px; overflow-x: auto;
}
.admin-row {
  display: grid;
  grid-template-columns: 88px 96px 132px minmax(140px, 1.4fr) minmax(120px, 1fr) minmax(160px, 1.6fr) 100px 150px;
  align-items: center; gap: 12px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  transition: background 100ms;
  min-width: 1020px;
}
.admin-row > * { min-width: 0; }
.admin-row > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-row .cell-name,
.admin-row .cell-email,
.admin-row .cell-mono {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Status rail — first thing the eye catches when scanning the list */
.admin-row.is-new      { border-left-color: var(--warn); }
.admin-row.is-resolved { border-left-color: var(--ok); }
.admin-row.is-other    { border-left-color: var(--line-strong); }
.admin-row.admin-row-head { border-left-color: transparent; padding-left: 20px; }
.admin-row:last-child { border-bottom: none; }
.admin-row:hover { background: var(--bg-inset); }
.admin-row-head {
  background: var(--bg-inset);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.cell-name { font-weight: 500; font-size: 13.5px; }
.cell-email { font-size: 12px; color: var(--text-muted); }
.cell-mono { font-family: "Geist Mono", monospace; font-size: 12.5px; color: var(--text-muted); }

.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
}
.status-badge .status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 22%, transparent);
}
.status-active { background: var(--ok-soft); color: var(--ok); }
.status-invited { background: var(--warn-soft); color: var(--warn); }
.status-suspended { background: var(--err-soft); color: var(--err); }

/* Review/details grids */
.review-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  row-gap: 10px;
  font-size: 13px;
}
.review-grid dt { color: var(--text-muted); }
.review-grid dd { margin: 0; }

/* Audit list */
.audit-list { display: flex; flex-direction: column; }
.audit-event {
  display: grid;
  grid-template-columns: 28px 132px minmax(0, 1fr) 116px 92px;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.audit-event > * { min-width: 0; }
.audit-event:last-child { border-bottom: none; }
.audit-tick { display: flex; justify-content: center; padding-top: 4px; }
.audit-tick-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 3px var(--accent-ring);
}
.audit-event.fail .audit-tick-dot { background: var(--err); box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 3px rgba(180,35,24,0.18); }
.audit-time { font-size: 12.5px; color: var(--text-muted); }
.audit-headline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.audit-headline > strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.audit-action {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.audit-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.audit-ip { font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.pager-pages { display: flex; align-items: center; gap: 4px; }
.pager-num {
  display: inline-grid;
  place-items: center;
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.pager-num:hover { background: var(--bg-soft); color: var(--text); }
.pager-num.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-ring);
  font-weight: 600;
}
.pager-gap { color: var(--text-subtle); padding: 0 2px; }
.btn.is-disabled { opacity: 0.4; pointer-events: none; }

/* NinjaOne integration */
.connection-hero {
  display: flex; align-items: center; gap: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fafbff 0%, #f3f5fc 100%);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.connection-hero-status { display: flex; align-items: center; gap: 14px; }
.connection-pulse { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
.pulse-dot {
  width: 12px; height: 12px; background: var(--ok); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(17, 122, 72, 0.18);
  position: relative; z-index: 2;
}
.pulse-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(17, 122, 72, 0.35);
  animation: pulseGrow 1.8s ease-out infinite;
}
@keyframes pulseGrow {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}
.connection-hero-stats { display: flex; gap: 36px; }
.conn-k { font-family: "Geist Mono", monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.conn-v { font-size: 13.5px; margin-top: 2px; font-weight: 500; }

/* Two-column card grid (used by integration page) */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .admin-grid-2 { grid-template-columns: 1fr; } }

/* Scope rows (NinjaOne granted scopes) */
.scope-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel);
}
.scope-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.scope-dot[data-on="1"] { background: var(--ok); border-color: var(--ok); }

/* Sync activity table */
.sync-table {
  display: grid;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow-x: auto;
}
.sync-row {
  display: grid;
  grid-template-columns: 90px 140px 100px 80px 110px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  min-width: 760px;
}
.sync-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-row:last-child { border-bottom: none; }
.sync-row-head {
  background: var(--bg-inset);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* Auth/kind chip used inside sync table */
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1100px) {
  .app.has-sidebar { grid-template-columns: 280px 1fr; }
  .footer-nav { left: 280px; }
  .content { padding: 28px 28px 140px; }
  .field-row, .field-row-3, .org-grid, .radio-grid, .checkbox-grid, .field-row .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app.has-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .footer-nav { left: 0; padding: 0 16px; }
  .content { padding: 20px 16px 140px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ============ Hub / Request center ============ */
.hub {
  max-width: 960px;
  margin: 0 auto;
}
.hub-header {
  margin-bottom: 28px;
}

.hub-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.hub-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 28px -14px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}
.hub-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}
.hub-card-offboard .hub-icon {
  background: var(--warn-soft);
  color: var(--warn);
}

.hub-card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}
.hub-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.hub-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hub-card-bullets li {
  font-size: 12.5px;
  color: var(--text-muted);
  position: relative;
  padding-left: 18px;
  line-height: 1.4;
}
.hub-card-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hub-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: gap 140ms ease;
}
.hub-card-offboard .hub-card-cta { color: var(--warn); }
.hub-card:hover .hub-card-cta { gap: 10px; }

.hub-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}
.hub-context-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

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