/* ============================================================
   Arxiom Portal
   styles.css — single source of truth for all portal styling
   ------------------------------------------------------------
   © Arxiom 2026 - present
   All rights reserved.
   Unauthorised copying or reproduction is strictly prohibited.
   ============================================================ */

/* --- Brand tokens -------------------------------------------- */
:root {
  /* --- Arxiom palette --- */
  --ink: #0B0B0C;
  --carbon: #161617;
  --surface: #FFFFFF;

  --grey-600: #3B3D42;
  --grey-500: #6A6E74;
  --grey-400: #9DA1A8;
  --grey-300: #C8CBD1;
  --grey-200: #E4E6E9;

  --platinum: #CDD3DB;
  --steel: #8C94A0;
  --graphite: #474C54;

  --teal: #14B8A6;
  --teal-deep: #0F766E;
  --teal-glow: #2DD4BF;

  --positive: #2FA37A;
  --caution: #BE8A3C;
  --critical: #D24A4A;

  /* Legacy names kept as aliases so existing selectors keep working */
  --steel-blue: var(--ink);
  --bright-blue: var(--teal-deep);
  --soft: #EEF0F2;
  --paper: #F4F5F6;
  --ink: #0B0B0C;
  --muted: var(--grey-500);
  --hairline: var(--grey-200);
  --hairline-soft: rgba(11, 11, 12, 0.08);
  --danger: var(--critical);
  --danger-soft: #FBEAEA;
  --success: var(--positive);
  --success-soft: #E9F4EF;
  --warning: var(--caution);
  --warning-soft: #F7F1E6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(11,11,12,0.06);
  --shadow-pop: 0 4px 8px rgba(0,0,0,0.06), 0 12px 28px rgba(11,11,12,0.12);

  --header-h: 64px;
  --sidebar-w: 240px;
  --max-width: 1200px;
}

/* --- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  /* Archivo, not Montserrat. Montserrat is loaded by NO page in this
     portal, so this line silently fell back to system-ui while every
     page downloaded Archivo and never applied it — the brand face was
     on the wire and unused. index, dashboard, control-room and admin
     all already load Archivo; do not reintroduce a face nothing fetches. */
  font-family: 'Archivo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--steel-blue); text-decoration: none; }
a:hover { color: var(--bright-blue); }
button { font-family: inherit; cursor: pointer; }

/* --- Typography --------------------------------------------- */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--steel-blue);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.75rem, 2.4vw, 2.25rem); letter-spacing: -0.045em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small { color: var(--muted); }

/* --- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--steel-blue); color: white; }
.btn-primary:hover { background: var(--teal-deep); color: white; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: white; color: var(--steel-blue); border-color: var(--hairline); }
.btn-secondary:hover { background: var(--soft); border-color: var(--bright-blue); }
.btn-danger { background: white; color: var(--danger); border-color: var(--hairline); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; padding: 8px 12px; }
.btn-ghost:hover { color: var(--steel-blue); background: var(--soft); }
.btn-success { background: var(--success); color: white; border-color: transparent; }
.btn-success:hover { background: #25805F; color: white; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* --- Forms --------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--steel-blue);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--bright-blue);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.input-prefix-group { display: flex; width: 100%; align-items: stretch; }
.input-prefix-group .prefix {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  background: var(--soft);
  border: 1px solid var(--hairline);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  flex: 0 0 auto;
}
.input-prefix-group input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--hairline);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: white;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-prefix-group input:focus {
  outline: none;
  border-color: var(--bright-blue);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
  position: relative;
  z-index: 1;
}

/* Suffix variant — badge sits on the RIGHT (°, %) and forms a seamless
   pill with the input, mirroring the prefix group. */
.input-suffix-group { display: flex; width: 100%; align-items: stretch; }
.input-suffix-group input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--hairline);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-suffix-group input:focus {
  outline: none;
  border-color: var(--bright-blue);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
  position: relative;
  z-index: 1;
}
.input-suffix-group .suffix {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  background: var(--soft);
  border: 1px solid var(--hairline);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  flex: 0 0 auto;
}

/* --- Auth pages --------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: linear-gradient(180deg, var(--soft) 0%, var(--paper) 100%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 32px;
}
.auth-card .logo { width: 96px; height: auto; margin: 0 auto 24px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: 6px;   letter-spacing: 0.5px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 0.95rem; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-card .auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--muted); }

.portal-logo {
  display: block;
  max-width: 40px;
  margin: 0 auto 20px;
}

/* --- App header --------------------------------------------- */
.app-header {
  background: white;
  border-bottom: 1px solid var(--hairline);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.app-header .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--steel-blue); justify-self: start; }
.app-header .brand img { width: 32px; height: 32px; }
.app-header .brand-divider { width: 1px; height: 22px; background: var(--hairline); }
.app-header .brand-label { font-size: 0.92rem; font-weight: 600; letter-spacing: -0.01em; color: var(--steel-blue); }
.app-header-center { justify-self: center; display: flex; align-items: center; }
/* Pin to the last grid column so the user block always sits on the right,
   even on pages (e.g. admin) that have no centre element and would otherwise
   drop it into the middle `auto` column. */
.app-header .user-block { display: flex; align-items: center; gap: 14px; justify-self: end; grid-column: 3; }
.app-header .user-text { text-align: right; line-height: 1.2; text-decoration: none; }
.app-header .user-text:hover .user-name { color: var(--bright-blue); }
.app-header .user-name { font-weight: 600; font-size: 0.9rem; color: var(--steel-blue); transition: color 0.15s; }
.app-header .user-role { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.btn-signout {
  background: transparent; border: none; padding: 6px 10px;
  font-family: inherit; font-size: 0.85rem; font-weight: 500;
  color: var(--muted); cursor: pointer; border-radius: 6px; transition: all 0.15s;
}
.btn-signout:hover { color: var(--steel-blue); background: var(--soft); }

/* --- Tab navigation ----------------------------------------- */
.tab-nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
  overflow-x: auto;
}
.tab-nav button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab-nav button:hover { color: var(--steel-blue); }
.tab-nav button.active { color: var(--steel-blue); border-bottom-color: var(--bright-blue); }
.tab-nav button .tab-icon { font-size: 1rem; }
/* An SVG tab icon sits exactly where an emoji would: 1em square, on the
   text baseline, and inheriting the tab's own colour through
   currentColor so it dims and darkens with the active state. Scoped to
   svg so the eight emoji tabs are untouched. */
.tab-nav button .tab-icon svg {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* --- Page shell --------------------------------------------- */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 4px; }
.page-header p { color: var(--muted); margin: 0; }

/* --- Stat cards --------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--teal));
}
.stat-card .stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.04em; color: var(--steel-blue); line-height: 1; }
.stat-card .stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* --- Panel / card ------------------------------------------- */
.panel {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}
.panel h2 { margin-top: 0; }
.panel h3 { margin-top: 0; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.panel-header h2, .panel-header h3 { margin: 0; }

.email-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
/* Grid items default to min-width:auto, so the 640px-wide preview iframe would floor
   the 1fr track and blow the layout out sideways on mobile. Let the columns shrink;
   the preview wrap clips (overflow:hidden) and its iframe is scaled to fit by JS. */
.email-content-grid > * { min-width: 0; }

@media (max-width: 768px) {
  .email-content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* --- Tables -------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .actions .btn { padding: 6px 10px; font-size: 0.82rem; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--soft); }

/* --- Pills / badges ----------------------------------------- */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill-admin { background: var(--steel-blue); color: white; }
.pill-builder { background: var(--soft); color: var(--steel-blue); }
.pill-active { background: var(--success-soft); color: var(--success); }
.pill-inactive { background: var(--danger-soft); color: var(--danger); }
.pill-pending { background: var(--warning-soft); color: var(--warning); }
.pill-trial { background: var(--warning-soft); color: var(--warning); }

/* --- Onboarding checklist ------------------------------------ */
.btn-onboarding-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: white;
  color: var(--steel-blue);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-onboarding-toggle:hover { background: var(--soft); border-color: var(--bright-blue); }
.ob-toggle-check { color: var(--success); font-weight: 700; }
.ob-toggle-ring {
  --pct: 0;
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--teal) calc(var(--pct) * 1%), var(--hairline) 0);
}

.ob-card {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.ob-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ob-dismiss { padding: 4px 8px !important; font-size: 0.85rem; line-height: 1; }

.ob-progress-track {
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--soft); margin: 14px 0 6px; overflow: hidden;
}
.ob-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-deep));
  transition: width 0.3s ease;
}
.ob-progress-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 12px; }

.ob-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-item-btn {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px;
  background: transparent; border: none; border-radius: var(--radius-sm);
  text-align: left; font-size: 0.92rem; color: var(--ink);
  transition: background 0.12s;
}
.ob-item-btn:not(:disabled) { cursor: pointer; }
.ob-item-btn:not(:disabled):hover { background: var(--soft); }
.ob-item-btn:disabled { cursor: default; }

.ob-check {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--grey-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: white; font-weight: 700;
}
.ob-item-done .ob-check { border-color: var(--success); background: var(--success); }
.ob-item-done .ob-item-label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--grey-300); }
.ob-item-label { flex: 1; }
.ob-item-arrow { color: var(--muted); font-size: 0.85rem; }

.ob-card-done { display: flex; align-items: center; gap: 16px; }
.ob-done-icon { font-size: 1.8rem; }
.ob-card-done > div:nth-child(2) { flex: 1; }

@media (max-width: 640px) {
  .ob-card { padding: 18px; }
}

/* --- Resource Centre ------------------------------------------ */
.btn-resource-centre {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: white;
  color: var(--steel-blue);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.btn-resource-centre:hover { background: var(--soft); border-color: var(--bright-blue); }
.btn-resource-centre[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--ink); color: white;
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; z-index: 210;
}

#rcOverlay {
  position: fixed; inset: 0; background: rgba(11,11,12,0.32);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  z-index: 200;
}
#rcOverlay.open { opacity: 1; pointer-events: auto; }

#rcDrawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 420px; max-width: 100vw;
  background: white;
  box-shadow: var(--shadow-pop);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 201;
  display: flex; flex-direction: column;
}
#rcDrawer.open { transform: translateX(0); }

.rc-header {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
.rc-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-header-top h2 { margin: 0; font-size: 1.15rem; }
.rc-close {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--soft); color: var(--muted);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rc-close:hover { background: var(--grey-200); color: var(--ink); }

.rc-search {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--hairline); font-family: inherit; font-size: 0.92rem;
  background: var(--paper);
}
.rc-search:focus { outline: none; border-color: var(--teal); background: white; }

.rc-body { flex: 1; overflow-y: auto; padding: 18px 22px 32px; }

.rc-section { margin-bottom: 22px; }
.rc-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 8px;
}
.rc-article-list { display: flex; flex-direction: column; gap: 2px; }
.rc-article-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 10px; border-radius: var(--radius-sm); border: none; background: transparent;
  text-align: left; font-family: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer;
  transition: background 0.12s;
}
.rc-article-row:hover { background: var(--soft); }
.rc-article-arrow { color: var(--muted); font-size: 0.85rem; flex-shrink: 0; }

.rc-empty { color: var(--muted); font-size: 0.9rem; padding: 12px 4px; line-height: 1.6; }

.rc-back {
  background: transparent; border: none; color: var(--muted); font-family: inherit;
  font-size: 0.85rem; cursor: pointer; padding: 0 0 16px; display: block;
}
.rc-back:hover { color: var(--steel-blue); }

.rc-article-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-deep); margin-bottom: 6px; }
.rc-article-detail h3 { margin: 0 0 12px; font-size: 1.1rem; }
.rc-article-detail p { color: var(--grey-600); font-size: 0.92rem; line-height: 1.7; white-space: pre-line; }
.rc-article-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--hairline); font-size: 0.88rem; color: var(--muted); }

.rc-inline-link {
  background: none; border: none; padding: 0; color: var(--bright-blue); font-family: inherit;
  font-size: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.rc-inline-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  #rcDrawer { width: 100vw; }
}

/* --- Alerts -------------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(210,74,74,0.25); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: rgba(47,163,122,0.25); }
.alert-info { background: var(--soft); color: var(--steel-blue); border-color: var(--hairline-soft); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(190,138,60,0.25); }

/* --- CRM integration cards ---------------------------------- */
.crm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.crm-card {
  border: 2px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  text-align: center;
}
.crm-card:hover { border-color: var(--bright-blue); background: var(--soft); }
.crm-card.selected { border-color: var(--bright-blue); background: var(--soft); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }
.crm-card .crm-logo { font-size: 2rem; margin-bottom: 8px; }
.crm-card .crm-name { font-weight: 700; font-size: 0.95rem; color: var(--steel-blue); }
.crm-card .crm-desc { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* --- Pricing config rows ------------------------------------ */
.pricing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.pricing-row:last-child { border-bottom: none; }
.pricing-row .pricing-label { font-weight: 600; font-size: 0.95rem; color: var(--steel-blue); }
.pricing-row .pricing-sub { font-size: 0.8rem; color: var(--muted); }
.pricing-row .pricing-input { width: 130px; }

/* --- Preview panel ------------------------------------------ */
.preview-frame {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.preview-bar {
  background: var(--soft);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hairline);
}
.preview-dots { display: flex; gap: 5px; }
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); display: block; }
.preview-url { font-size: 0.78rem; color: var(--muted); background: white; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--hairline); flex: 1; }
.preview-body { padding: 24px; }

/* --- Split layout ------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.split-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .split, .split-3 { grid-template-columns: 1fr; } }
/* Grid items default to min-width:auto, so a wide child (e.g. an embed-code box with
   long unbroken lines) floors its track and starves the other column. Let them shrink
   — the code box scrolls inside its own half instead of stealing the whole row. */
.split > *, .split-3 > * { min-width: 0; }

/* "How it works" editor rows: [step no.] [title] [body]. Stack on phones so the
   two inputs aren't squeezed into a third of a narrow screen. */
.hiw-edit-row { display: grid; grid-template-columns: auto 1fr 2fr; gap: 10px; align-items: center; }
@media (max-width: 600px) { .hiw-edit-row { grid-template-columns: 1fr; gap: 8px; } }

/* --- Toggle switch (on/off) --------------------------------- */
.arx-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.arx-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.arx-switch-track {
  width: 46px; height: 26px; border-radius: 999px; background: var(--hairline);
  transition: background .2s ease; display: inline-block; position: relative;
}
.arx-switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease;
}
.arx-switch input:checked + .arx-switch-track { background: var(--bright-blue); }
.arx-switch input:checked + .arx-switch-track .arx-switch-thumb { transform: translateX(20px); }
.arx-switch input:focus-visible + .arx-switch-track { outline: 2px solid var(--bright-blue); outline-offset: 2px; }

/* --- Subscription plan card --------------------------------- */
.plan-card {
  background: white;
  border: 2px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.plan-card.current { border-color: var(--bright-blue); }
.plan-card .plan-name { font-weight: 700; font-size: 1.1rem; color: var(--steel-blue); margin-bottom: 4px; }
.plan-card .plan-price { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; color: var(--steel-blue); }
.plan-card .plan-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-card .plan-features { list-style: none; padding: 0; margin: 16px 0; }
.plan-card .plan-features li { padding: 5px 0; font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.plan-card .plan-features li::before { content: '✓'; color: var(--success); font-weight: 700; }
.current-badge {
  position: absolute;
  top: -1px; right: 16px;
  background: var(--bright-blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
}

/* --- Support / contact -------------------------------------- */
.support-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.support-option {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--ink);
}
.support-option:hover { border-color: var(--bright-blue); background: var(--soft); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.support-option .s-icon { font-size: 1.8rem; margin-bottom: 8px; }
.support-option .s-label { font-weight: 700; font-size: 0.95rem; color: var(--steel-blue); }
.support-option .s-desc { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* --- Admin builder list ------------------------------------- */
.builder-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.builder-row:last-child { border-bottom: none; }
.builder-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--steel-blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.builder-name { font-weight: 600; font-size: 0.95rem; color: var(--steel-blue); }
.builder-email { font-size: 0.82rem; color: var(--muted); }

/* --- Modal -------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,11,12,0.35);
  /* flex-start + margin:auto on the child, NOT align-items:center.
     A centred flex child that is taller than its container overflows
     EQUALLY in both directions, and the overflow above the top edge
     cannot be scrolled to — so the modal's heading and its buttons
     were both simply unreachable. It took nine tools in the
     tool-access list to make a modal tall enough to show it. Auto
     margins centre it when it fits and clip nothing when it does not. */
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
  padding: 24px; z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  width: 100%; max-width: 480px;
  margin: auto;            /* see .modal-overlay — this is what centres it */
  box-shadow: var(--shadow-pop);
  transform: translateY(12px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h2 { margin-top: 0; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* --- Spinner ------------------------------------------------ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--hairline);
  border-top-color: var(--bright-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Toast -------------------------------------------------- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--steel-blue); color: white;
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-pop);
  animation: slideIn 0.25s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast.toast-success { background: var(--success); }
.toast.toast-error { background: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(20px); } }

/* --- Footer ------------------------------------------------- */
.app-footer {
  text-align: center; padding: 24px 16px;
  color: var(--muted); font-size: 0.78rem;
  border-top: 1px solid var(--hairline); margin-top: 48px;
}
.app-footer a { color: var(--muted); }

/* --- Tool tiles (builder tools + admin settings) ----------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--teal));
}
.tool-card:hover { border-color: var(--bright-blue); background: var(--soft); transform: translateY(-2px); box-shadow: var(--shadow-card); color: var(--ink); }
.tool-card .tc-icon { font-size: 2rem; margin-bottom: 4px; }
.tool-card .tc-name { font-weight: 700; font-size: 1rem; color: var(--steel-blue); }
.tool-card .tc-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.4; }
.tool-card .tc-badge { margin-top: auto; padding-top: 12px; }
.tool-card .tc-open { font-size: 0.82rem; font-weight: 600; color: var(--bright-blue); }

/* --- Lead-action select ------------------------------------- */
.lead-status {
  padding: 5px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  background: white;
  color: var(--ink);
}

/* --- Messages / tickets ------------------------------------ */
.ticket-list { display: flex; flex-direction: column; gap: 12px; }
.ticket-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: white;
  transition: border-color 0.15s;
}
.ticket-card:hover { border-color: var(--bright-blue); }
.ticket-card.unread { border-left: 3px solid var(--bright-blue); }
.ticket-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ticket-from { font-weight: 700; font-size: 0.92rem; color: var(--steel-blue); }
.ticket-subject { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.ticket-body { font-size: 0.87rem; color: var(--muted); margin-bottom: 10px; }
.ticket-reply { background: var(--soft); border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; display: none; }
.ticket-reply.open { display: block; }
.ticket-reply textarea { width: 100%; min-height: 80px; resize: vertical; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 6px; font-family: inherit; font-size: 0.9rem; }

/* --- Radio button group (CRM vs email) --------------------- */
.radio-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.radio-row:hover { border-color: var(--bright-blue); background: var(--soft); }
.radio-row.selected { border-color: var(--bright-blue); background: rgba(20,184,166,0.05); }
.radio-row input[type="radio"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--bright-blue); }
.radio-row-content .radio-label { font-weight: 700; font-size: 0.95rem; color: var(--steel-blue); }
.radio-row-content .radio-desc { font-size: 0.83rem; color: var(--muted); margin-top: 2px; }

/* --- Toggle switch ----------------------------------------- */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  width: 42px; height: 24px;
  background: var(--hairline);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
  border: none;
  padding: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle[aria-checked="true"] { background: var(--bright-blue); }
.toggle[aria-checked="true"]::after { transform: translateX(18px); }
.toggle-label { font-size: 0.9rem; color: var(--muted); }

/* --- Stripe payment section -------------------------------- */
.stripe-card {
  border: 2px solid #635BFF;
  border-radius: var(--radius);
  padding: 24px;
  background: white;
  margin-bottom: 18px;
}
.stripe-card .stripe-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stripe-card .stripe-logo svg { width: 48px; height: auto; }

/* --- Responsive --------------------------------------------- */
@media (max-width: 600px) {
  .auth-card { padding: 28px 22px; }
  .page { padding: 20px 14px 48px; }
  .panel { padding: 18px; }
  .app-header .brand-divider, .app-header .brand-label { display: none; }
  .app-header-inner { padding: 0 14px; gap: 8px; }
  /* Hide the secondary "Setup guide" / "Show me around" buttons on phones —
     they overflow the header. Still available on desktop; the first-run wizard
     auto-opens regardless. */
  .app-header-center { display: none; }
  .app-header .user-role { display: none; }
  .app-header-center .btn-onboarding-toggle { padding: 6px 10px; font-size: 0; gap: 0; }
  .app-header-center .btn-onboarding-toggle .ob-toggle-ring,
  .app-header-center .btn-onboarding-toggle .ob-toggle-check { font-size: 0.9rem; }
  .tab-nav button { padding: 10px 12px; font-size: 0.82rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .crm-grid { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .pricing-row { grid-template-columns: 1fr; gap: 8px; }
  .pricing-input { width: 100% !important; }
  .modal { padding: 22px 18px; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
  .table { font-size: 0.82rem; }
  .table th, .table td { padding: 8px 10px; }
}
@media (max-width: 420px) {
  .tool-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* Toast — keep within viewport on narrow screens */
@media (max-width: 480px) {
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: 100%; }
}
/* ============================================================
   Welcome Wizard (welcome-wizard.js) — first-run guided setup
   ============================================================ */
.btn-setup-guide {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 7px 14px;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--hairline); border-radius: 999px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-setup-guide:hover { background: #fff; border-color: var(--grey-300); }

body.aw-lock { overflow: hidden; }

#welcomeWizardOverlay {
  position: fixed; inset: 0; z-index: 2000;
}
.aw-backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(3px);
}
.aw-modal {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); overflow: hidden;
  animation: awPop .22s ease;
}
@keyframes awPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.aw-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--hairline);
}
.aw-progress { display: flex; align-items: center; gap: 12px; }
.aw-step-count { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.aw-dots { display: flex; gap: 6px; }
.aw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grey-200); transition: background .2s; }
.aw-dot-done { background: var(--teal); }
.aw-dot-on { background: var(--ink); transform: scale(1.25); }
.aw-skip {
  font: inherit; font-size: 0.8rem; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 4px;
}
.aw-skip:hover { color: var(--ink); text-decoration: underline; }

.aw-body { padding: 28px 24px; overflow-y: auto; }
.aw-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; border-top: 1px solid var(--hairline);
}

/* Hero (welcome + closing) */
.aw-hero { text-align: center; padding: 8px 4px; }
.aw-hero-badge {
  display: inline-block; padding: 5px 14px; margin-bottom: 18px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-deep); background: var(--success-soft); border-radius: 999px;
}
.aw-hero-badge-done { color: var(--teal-deep); background: var(--success-soft); }
.aw-h1 { margin: 0 0 16px; font-size: 1.7rem; line-height: 1.2; color: var(--ink); }
.aw-lead { margin: 0 auto 14px; max-width: 500px; color: var(--grey-600); font-size: 0.96rem; line-height: 1.6; }

.aw-h2 { margin: 0 0 6px; font-size: 1.28rem; color: var(--ink); }
.aw-sub { margin: 0 0 20px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.aw-muted { color: var(--grey-400); font-size: 0.85rem; }

.aw-field { margin-bottom: 18px; }
.aw-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .aw-grid2 { grid-template-columns: 1fr; } }
.aw-label { display: block; margin-bottom: 7px; font-size: 0.85rem; font-weight: 600; color: var(--grey-600); }
.aw-hint { font-weight: 400; color: var(--grey-400); }
.aw-input {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 0.95rem;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--hairline); border-radius: var(--radius-sm);
  transition: border-color .15s; box-sizing: border-box;
}
.aw-input:focus { outline: none; border-color: var(--teal); }
.aw-input:disabled { background: var(--paper); color: var(--muted); }

.aw-note {
  margin-top: 10px; padding: 12px 14px;
  font-size: 0.85rem; line-height: 1.55; color: var(--grey-600);
  background: var(--success-soft); border-radius: var(--radius-sm);
  border-left: 3px solid var(--teal);
}
.aw-note-lg { max-width: 500px; margin: 18px auto; text-align: left; font-size: 0.9rem; }
.aw-note em { font-style: normal; font-weight: 600; color: var(--ink); }

.aw-confirm {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--success-soft);
  border-radius: var(--radius-sm);
}
.aw-confirm-icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--positive); color: #fff; font-weight: 700;
}
.aw-confirm-title { margin: 0; font-weight: 600; color: var(--ink); }

.aw-stripe-box {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--paper);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
}
.aw-stripe-emoji { font-size: 1.6rem; }

.aw-upload {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: 0.88rem; font-weight: 600;
  color: var(--ink); background: var(--paper);
  border: 1.5px dashed var(--grey-300); border-radius: var(--radius-sm); cursor: pointer;
}
.aw-upload:hover { border-color: var(--teal); }

.aw-colours { display: flex; gap: 20px; flex-wrap: wrap; }
.aw-colour { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--grey-600); }
.aw-colour input[type="color"] {
  width: 52px; height: 40px; padding: 2px; cursor: pointer;
  background: none; border: 1.5px solid var(--hairline); border-radius: var(--radius-sm);
}

.aw-preview { margin-top: 22px; }
.aw-preview-label { font-size: 0.74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--grey-400); margin-bottom: 8px; }
.aw-preview-card {
  padding: 22px; text-align: center; background: #fff;
  border: 1px solid var(--hairline); border-top: 4px solid var(--ink);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
}
.aw-preview-logo { height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.aw-preview-logo img { max-height: 40px; max-width: 160px; object-fit: contain; }
.aw-preview-logo span { font-size: 0.8rem; color: var(--grey-400); }
.aw-preview-headline { font-weight: 700; font-size: 1.05rem; margin-bottom: 14px; color: var(--ink); }
.aw-preview-btn { padding: 9px 20px; font: inherit; font-weight: 600; color: #fff; background: var(--ink); border: none; border-radius: var(--radius-sm); cursor: default; }

.aw-maps-msg { margin-top: 10px; padding: 10px 12px; font-size: 0.85rem; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-sm); }

.aw-embed-block { margin-bottom: 16px; }
.aw-embed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.aw-embed-name { font-weight: 600; color: var(--ink); }
.aw-embed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.aw-embed-code {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; line-height: 1.5;
  color: var(--grey-600); background: var(--paper);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); white-space: pre;
}

/* Wizard buttons */
.aw-btn { font: inherit; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1.5px solid transparent; transition: opacity .15s, background .15s; }
.aw-btn-primary { padding: 11px 22px; color: #fff; background: var(--ink); }
.aw-btn-primary:hover { background: var(--carbon); }
.aw-btn-primary:disabled { opacity: .6; cursor: default; }
.aw-btn-secondary { padding: 9px 16px; color: var(--ink); background: #fff; border-color: var(--hairline); }
.aw-btn-secondary:hover { border-color: var(--grey-300); }
.aw-btn-ghost { padding: 11px 18px; color: var(--muted); background: none; }
.aw-btn-ghost:hover { color: var(--ink); }
.aw-btn-sm { padding: 7px 13px; font-size: 0.82rem; }
.aw-btn-teal { padding: 7px 13px; color: #fff; background: var(--teal); border-color: var(--teal); }
.aw-btn-teal:hover { background: var(--teal-deep); border-color: var(--teal-deep); }

/* Radio choice cards (mirador-maps + embed steps) */
.aw-choice-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.aw-choice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--hairline); border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.aw-choice:hover { border-color: var(--grey-300); }
.aw-choice input[type="radio"], .aw-choice input[type="checkbox"] { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--teal); flex: none; cursor: pointer; }
.aw-choice:has(input:checked) { border-color: var(--teal); background: var(--success-soft); }
.aw-choice-main { display: flex; flex-direction: column; gap: 3px; }
.aw-choice-title { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.aw-choice-desc { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

/* Reveal panels shown when their option is selected */
.aw-reveal { display: none; padding: 4px 2px 2px; }
.aw-choice-group:has(#aw_maps_opt2:checked) .aw-maps-panel,
.aw-choice-group:has(#aw_embed_dev:checked) .aw-dev-panel { display: block; }

/* Closing checklist */
.aw-checklist { list-style: none; margin: 22px auto 4px; padding: 0; max-width: 360px; text-align: left; }
.aw-check { display: flex; align-items: flex-start; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--hairline); }
.aw-check:last-child { border-bottom: none; }
.aw-check .tick-icon { width: 24px; height: 24px; color: var(--teal); flex: none; margin-top: 1px; }
.aw-check-main { display: flex; flex-direction: column; gap: 3px; }
.aw-check-name { font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.aw-check-sub { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

/* Celebration confetti canvas (closing step) */
.aw-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }

/* ============================================================
   Spotlight orientation tour (tour.js) + example lead badge
   ============================================================ */
#showTourBtn { margin-left: 8px; }

.lead-example-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--teal-deep); background: var(--success-soft);
  border: 1px solid var(--teal); border-radius: 999px; vertical-align: middle;
}

#portalTourOverlay { position: fixed; inset: 0; z-index: 2100; }

/* Transparent click-blocker so the tour drives navigation, not the user */
.pt-catch { position: absolute; inset: 0; background: transparent; }

/* The bright "hole": a transparent box whose massive box-shadow dims
   everything around it. pointer-events none so it's purely visual. */
.pt-hole {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(11, 11, 12, 0.62);
  outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 2px;
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}

.pt-pop {
  position: fixed; width: 340px; max-width: calc(100vw - 24px);
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 18px 20px;
  animation: awPop .2s ease; pointer-events: auto;
}
.pt-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pt-pop-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.pt-pop-count { flex: none; font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.pt-pop-body { margin: 0 0 16px; color: var(--grey-600); font-size: 0.9rem; line-height: 1.55; }
.pt-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pt-pop-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pt-skip { font: inherit; font-size: 0.8rem; color: var(--muted); background: none; border: none; cursor: pointer; padding: 4px; }
.pt-skip:hover { color: var(--ink); text-decoration: underline; }

.pt-btn { font: inherit; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1.5px solid transparent; transition: background .15s; }
.pt-btn-primary { padding: 9px 18px; color: #fff; background: var(--ink); }
.pt-btn-primary:hover { background: var(--carbon); }
.pt-btn-ghost { padding: 9px 14px; color: var(--muted); background: none; }
.pt-btn-ghost:hover { color: var(--ink); }

/* Post-wizard opt-in prompt (bottom-right) */
.pt-prompt {
  position: fixed; right: 20px; bottom: 20px; z-index: 2050;
  width: 320px; max-width: calc(100vw - 24px);
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); border: 1px solid var(--hairline);
  animation: awPop .22s ease;
}
.pt-prompt-body { padding: 18px 20px; }
.pt-prompt-title { font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.pt-prompt-text { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.pt-prompt-actions { display: flex; align-items: center; gap: 8px; }
