/* ============================================================
   Red Oak | MirrorWeb Communications Supervision
   Modern redesign — Inter font, slate palette, clean whites
   Brand colors are injected as CSS variables from tenant settings:
     --brand-primary  (default #37006E)
     --brand-cta      (default #54117B)
     --brand-accent   (default #a2212e)
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #F1F5F9;
  color: #1E293B;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-accent); text-decoration: none; }
a:hover { color: var(--brand-accent); filter: brightness(0.8); }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.84em;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  padding: 1px 6px;
  color: #334155;
}

/* ── Sticky top wrapper (header + admin banner together) ───── */
.site-sticky-top {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: static;
  background: color-mix(in srgb, var(--brand-primary) 83%, #fff);
  box-shadow: 0 1px 0 rgba(0,0,0,0.18);
}
/* Admin layout: header matches the left nav exactly — no tint */
body.is-admin .site-header {
  background: var(--brand-primary);
}

/* Accent bar no longer needed — header is the brand colour */
.header-accent-bar { display: none; }

.logo-bar {
  background: transparent;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logos {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo { height: auto; width: auto; display: block; }
.logo-redoak    { height: 30px; width: auto; }
.logo-mirrorweb { height: 28px; filter: brightness(0) invert(1); }

.logo-partnership {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.25);
  line-height: 1;
  margin: 0;
  user-select: none;
}

/* Thin vertical divider between logos and product name */
.logo-title-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.18);
  display: inline-block;
  flex-shrink: 0;
  align-self: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-product-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* ── Admin controls in header ── */
/* Match the left nav's typographic feel — plain text links, no button chrome */
.header-admin-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  transition: margin-right 0.25s cubic-bezier(0.4,0,0.2,1);
}
.header-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 7px;
  padding: 0.32rem 0.7rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
}
.header-admin-btn svg { opacity: 0.85; flex-shrink: 0; }
.header-admin-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.38);
}
.header-admin-btn:hover svg { opacity: 1; }
.header-admin-vsep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  flex-shrink: 0;
}
/* Tenant picker trigger: plain text, same size as the other controls */
.header-admin-controls .tenant-picker-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  background: transparent;
  border: none;
  padding: 0;
  min-width: 0;
  max-width: 200px;
  transition: color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.header-admin-controls .tenant-picker-trigger:hover { color: #fff; }
/* Shrink the trigger swatch only — dropdown option swatches keep their full size */
.header-admin-controls .tenant-picker-trigger .tps {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}
/* Strip the standalone-bar padding/width so it sits inline with the other controls */
.header-admin-controls .admin-tenant-bar {
  padding: 0;
  width: auto;
  justify-content: flex-start;
  align-items: center;
}

/* Remove old co-badge and badge-logo rules — replaced above */
.co-badge { display: none; }
.badge-logo { display: none; }

/* Slim accent bar below logos */
.tagline-bar {
  background: #1E293B;
  padding: 0.45rem 2rem;
  border-top: 1px solid #334155;
}

.header-tagline {
  max-width: 860px;
  margin: 0 auto;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
}

/* ── Admin context banner — removed, controls now in header ── */
.admin-context-banner { display: none; }
/* Keep legacy classes inert in case any template still references them */
.admin-context-inner, .admin-context-actions, .admin-context-visit,
.admin-context-pill, .admin-context-logo, .admin-context-name { display: none; }

/* ── Tenant picker (admin header dropdown) ────────────────── */
.tenant-picker { position: relative; }

.tenant-picker-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  background: rgba(0,0,0,0.18);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  min-width: 160px;
  max-width: 300px;
}
.tenant-picker-trigger:hover {
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.55);
}

/* Shared swatch style — used in trigger and options */
.tps {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex-shrink: 0;
  overflow: hidden;
}
.tps img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.tenant-picker-name,
.tenant-picker-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-picker-chevron {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s;
}
.tenant-picker[data-open] .tenant-picker-chevron { transform: rotate(180deg); }

.tenant-picker-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 230px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.16);
  z-index: 9999;
  padding: 0.3rem;
}

.tenant-picker-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.48rem 0.65rem;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.1s;
}
.tenant-picker-option:hover    { background: #f1f5f9; }
.tenant-picker-option.is-active {
  background: #f8fafc;
  font-weight: 700;
}
.tenant-picker-option .tps {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

/* ── Stepper ──────────────────────────────────────────────── */
.stepper {
  background: var(--brand-primary);
  border-bottom: none;
  padding: 0;
}

.stepper ol {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  list-style: none;
  display: flex;
  gap: 0;
  height: 2.75rem;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.42);
  position: relative;
  white-space: nowrap;
  font-weight: 500;
  flex: 0 0 auto;
}

.step + .step::before {
  content: "›";
  color: rgba(255,255,255,0.22);
  margin: 0 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.step.active {
  color: #ffffff;
  font-weight: 600;
}
.step.active .step-num {
  background: var(--brand-accent);
  color: var(--accent-num-color, #fff);
  animation: step-breathe 2.8s ease-in-out infinite;
}

@keyframes step-breathe {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(255,255,255,0.07); }
}

.step.done { color: rgba(255,255,255,0.75); font-weight: 500; }
.step.done .step-num {
  background: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.42);
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.step-label { font-size: 0.75rem; }

/* ── Card badge pill ──────────────────────────────────────── */
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: color-mix(in srgb, var(--brand-cta) 8%, transparent);
  color: var(--brand-cta);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-cta) 20%, transparent);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Scope selector grid ──────────────────────────────────── */
.scope-section { margin-bottom: 1.5rem; }
.scope-section > .fieldset-legend { margin-bottom: 0.65rem; }

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.scope-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 0.9rem 0.9rem 0.9rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #ffffff;
}

.scope-card:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.scope-radio {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  accent-color: var(--brand-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.scope-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #475569;
  transition: background 0.15s, color 0.15s;
}

.scope-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0.1rem 0 0;
  transition: color 0.15s;
}

.scope-desc {
  font-size: 0.77rem;
  color: #64748B;
  line-height: 1.45;
  margin: 0;
}

/* Selected scope card */
.scope-card:has(input:checked) {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 5%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 10%, transparent);
}
.scope-card:has(input:checked) .scope-title { color: var(--brand-primary); }
.scope-card:has(input:checked) .scope-icon-box {
  background: var(--brand-primary);
  color: #ffffff;
}
.scope-card:has(input:checked) .scope-icon-box svg {
  stroke: #ffffff;
}

/* ── Full-width button variant ────────────────────────────── */
.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Platform picker cards ────────────────────────────────── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  background: #FAFAFA;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  gap: 0.4rem;
}

.platform-card:hover {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 4px 16px rgba(55, 0, 110, 0.1);
}

.platform-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}

.platform-icon-other {
  font-size: 2.25rem;
}

.platform-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.platform-desc {
  font-size: 0.78rem;
  color: #64748B;
  margin: 0;
  line-height: 1.4;
}

.platform-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.platform-badge-auto {
  background: #DCFCE7;
  color: #166534;
}

.platform-badge-manual {
  background: #FEF9C3;
  color: #854D0E;
}

@media (max-width: 600px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
}

/* ── JFA display (domain lookup result) ───────────────────── */
.jfa-display {
  margin-top: 1.5rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.jfa-copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.4rem 0 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.1s;
}

.jfa-copy-row:hover .jfa-value {
  border-color: var(--brand-primary);
  background: #F5F3FF;
}

.jfa-copy-row.jfa-copied .jfa-value {
  border-color: #86EFAC;
  background: #F0FDF4;
  color: #166534;
}

.jfa-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1E293B;
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  word-break: break-all;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: all;
}

/* ── Manual setup escape-hatch link ──────────────────────── */
.manual-setup-link {
  font-size: 0.82rem;
  color: #64748B;
  text-decoration: none;
}

.manual-setup-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 2.5rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15,23,42,0.04),
    0 4px 16px rgba(15,23,42,0.06),
    0 12px 40px rgba(15,23,42,0.04);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 540px;
  position: relative;
  overflow: hidden;
}

/* Red gradient accent strip — sits flush at the top of every card */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-accent) 0%, #e05565 55%, rgba(162,33,46,0.25) 100%);
  pointer-events: none;
}

.card-wide { max-width: 760px; }
.card-domains { max-width: 1100px; }

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.success-icon { color: #16A34A; }

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-subtitle {
  color: #64748B;
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* ── Admin Preview Banner ─────────────────────────────────── */
.preview-banner {
  background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
}
.preview-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}
.preview-banner-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  flex-shrink: 0;
}
.preview-banner-msg {
  flex: 1;
  opacity: 0.92;
}
.preview-banner-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  flex-shrink: 0;
  transition: background 0.15s;
}
.preview-banner-exit:hover { background: rgba(255,255,255,0.25); }

/* ── Info / warn banners ──────────────────────────────────── */
.info-banner, .warn-banner {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.info-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E3A5F;
}

.warn-banner {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #78350F;
}

.info-icon { display: flex; align-items: flex-start; flex-shrink: 0; margin-top: 2px; }

/* ── Form elements ────────────────────────────────────────── */
.fieldset {
  border: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fieldset-legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0F172A;
  margin-bottom: 0.65rem;
  display: block;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #fff;
}

.radio-card:hover {
  border-color: #93C5FD;
  background: #F8FBFF;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.radio-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--brand-accent);
  flex-shrink: 0;
}

.radio-card:has(input:checked) {
  border-color: var(--brand-accent);
  background: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(162,33,46,0.08);
}

.radio-card input[type="radio"]:checked ~ .radio-card-body strong {
  color: var(--brand-accent);
}

.radio-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.radio-card-body strong {
  font-size: 0.925rem;
  color: #0F172A;
  font-weight: 600;
}

.radio-desc {
  font-size: 0.82rem;
  color: #64748B;
  line-height: 1.45;
}

/* Recipient block */
.recipient-block {
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

.recipient-block.hidden { display: none; }

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.text-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1E293B;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}

.text-input:focus {
  border-color: #2c67b2;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.12);
}
.text-input.input-error { border-color: var(--brand-accent); }

.field-hint {
  font-size: 0.77rem;
  color: #94A3B8;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.field-required { color: var(--brand-accent); margin-left: 2px; }

.field-error {
  font-size: 0.78rem;
  color: var(--brand-accent);
  margin-top: 0.35rem;
  font-weight: 500;
}

.ndr-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1E293B;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.ndr-input:focus {
  border-color: #2c67b2;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.12);
}
.ndr-input.input-error { border-color: var(--brand-accent); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  color: #fff;
  border-color: var(--brand-cta);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep on all primary buttons */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0)    100%
  );
  transform: skewX(-15deg);
  transition: left 0.45s ease;
  pointer-events: none;
}
.btn-primary:hover:not(:disabled)::after { left: 130%; }

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  border-color: var(--brand-cta);
  filter: brightness(0.9);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
/* Arrow spring — works for both span.btn-arrow and svg.btn-arrow-icon */
.btn-primary .btn-arrow,
.btn-primary .btn-arrow-icon {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-primary:hover:not(:disabled) .btn-arrow,
.btn-primary:hover:not(:disabled) .btn-arrow-icon {
  transform: translateX(5px);
}

.btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
.btn-secondary:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #1E293B;
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid #E2E8F0;
  color: #64748B;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-ghost:hover { background: #F8FAFC; border-color: #CBD5E1; color: #374151; }

/* Subtle ghost — used for "Start Over" / escape-hatch links in advisor flow */
.btn-ghost-subtle {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 0.55rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-ghost-subtle:hover { color: #475569; }

/* Large CTA button for advisor flow primary actions */
.btn-cta {
  font-size: 1.05rem;
  padding: 0.9rem 2.25rem;
  border-radius: 10px;
  background: var(--brand-flow-btn, #16A34A) !important;
  border-color: var(--brand-flow-btn, #16A34A) !important;
  animation: btn-pulse 2.8s ease-in-out infinite;
}
.btn-cta:disabled { animation: none; }
.btn-cta:hover:not(:disabled) { filter: brightness(0.9); animation: none; }

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 0 0 0 color-mix(in srgb, var(--brand-flow-btn, #16A34A) 40%, transparent); }
  50%       { box-shadow: 0 4px 14px rgba(0,0,0,0.18), 0 0 0 6px color-mix(in srgb, var(--brand-flow-btn, #16A34A) 15%, transparent); }
}

/* Danger / destructive action button — used in admin screens only */
.btn-danger {
  background: #EF4444;
  border: 1.5px solid #DC2626;
  color: #fff;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.btn-danger:hover { background: #DC2626; border-color: #B91C1C; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-arrow { font-size: 0.9rem; }

.action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.action-row-spaced {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-saved {
  background: #16A34A !important;
  border-color: #16A34A !important;
  color: #fff !important;
  cursor: default;
  box-shadow: none !important;
}

.btn-error {
  background: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
  color: #fff !important;
}

/* ── Security note ────────────────────────────────────────── */
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #F1F5F9;
  font-size: 0.78rem;
  color: #94A3B8;
}

.lock-icon { display: flex; align-items: center; flex-shrink: 0; }

/* ── Pre-flight review ────────────────────────────────────── */
.review-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.review-section:last-of-type { border-bottom: none; }

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-icon { font-size: 0.9rem; }

.rule-list, .change-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.rule-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  min-width: 0; /* allow flex children to shrink below content size */
}

.rule-item strong {
  flex-shrink: 0; /* rule name stays full width */
}

.rule-detail {
  color: #64748B;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-preserve { background: #DCFCE7; color: #166534; }
.badge-exists   { background: #E0F2FE; color: #0C4A6E; }

.change-item {
  padding: 0.9rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #fff;
}

.change-item.skippable {
  background: #F8FAFC;
  opacity: 0.7;
}

.change-header {
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.change-tag {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #2c67b2;
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
}

.change-detail { color: #475569; line-height: 1.55; }
.change-detail.muted { color: #2c67b2; font-style: italic; }

.change-props {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.25rem;
  color: #475569;
}

.change-props li { font-size: 0.83rem; }

.empty-note { font-size: 0.84rem; color: #94A3B8; font-style: italic; }

/* ── Progress page ────────────────────────────────────────── */
.progress-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid #F1F5F9;
  border-radius: 8px;
  transition: background 0.2s;
}

.progress-step:last-child { border-bottom: none; }

.step-status-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.step-name  { font-weight: 600; font-size: 0.9rem; color: #1E293B; }
.step-detail { font-size: 0.8rem; color: #64748B; word-break: break-all; }

/* State colours */
.progress-step.running  { background: #F0F7FF; padding-left: 0.75rem; }
.progress-step.running  .step-name { color: #2c67b2; }
.progress-step.done     .step-name { color: #15803D; }
.progress-step.error    .step-name { color: var(--brand-accent); }

.step-spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #CBD5E1;
  border-top-color: #2c67b2;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Error block ──────────────────────────────────────────── */
.error-block {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #881337;
}

.error-block.hidden { display: none; }
.error-title { font-weight: 700; margin-bottom: 0.4rem; font-size: 0.95rem; }

/* ── Complete page ────────────────────────────────────────── */
.summary-section { margin-bottom: 1.75rem; }

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0.75rem 0 1rem;
}

.summary-table th,
.summary-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #F1F5F9;
}

.summary-table th {
  width: 26%;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.82rem;
}

.ndr-verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.ndr-verify-ok   { color: #15803D; }
.ndr-verify-fail { color: #a2212e; }

.summary-table td { color: #1E293B; word-break: break-all; }
.summary-table td code { font-size: 0.8rem; word-break: break-all; white-space: normal; }

.setup-token {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2c67b2;
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.token-cell {
  white-space: nowrap;
  min-width: 220px;
}

.token-copy-btn {
  background: none;
  border: 1px solid #CBD5E1;
  border-radius: 5px;
  color: #64748B;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.15s;
  font-family: inherit;
}
.token-copy-btn:hover { background: #EFF6FF; color: #2c67b2; border-color: #93C5FD; }
.token-copy-btn.copied { color: #16A34A; border-color: #86EFAC; background: #F0FDF4; }

.step-log {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.step-log summary {
  cursor: pointer;
  color: #2c67b2;
  font-weight: 600;
  padding: 0.3rem 0;
  font-size: 0.84rem;
}

.log-list { list-style: none; padding: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; }

.log-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
}

.log-icon { flex-shrink: 0; display: flex; align-items: center; }
.log-msg   { color: #334155; }
.log-detail { color: #94A3B8; font-size: 0.78rem; }

.next-steps {
  padding-top: 1.5rem;
  border-top: 1px solid #F1F5F9;
  margin-bottom: 0.5rem;
}

.next-steps p { font-size: 0.875rem; color: #475569; margin-bottom: 1rem; line-height: 1.6; }

.next-steps-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: steps;
}
.next-steps-list > li {
  display: flex;
  gap: 0.85rem;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.6;
  counter-increment: steps;
}
.next-steps-list > li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #2c67b2;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

/* ── Admin pages: strip all main-content / page-layout constraints ── */
body.is-admin .main-content {
  padding: 0;
  display: block;
  justify-content: unset;
}
body.is-admin .page-layout {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  justify-content: flex-start;
}
body.is-admin .card-domains,
body.is-admin .card-wide {
  max-width: none;
}

/* ── Page layout (sidebar + card) ────────────────────────── */
.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* When no sidebar is present, center the card horizontally */
.page-layout:not(:has(.ken-sidebar)) {
  justify-content: center;
}

.page-layout .card-wide {
  flex: 1;
  min-width: 0;
}

/* Without a sidebar the card should stay at its natural max-width */
.page-layout:not(:has(.ken-sidebar)) .card-wide {
  flex: 0 1 760px;
}

/* BD card logo header */
.bd-logo-img {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 0.25rem;
}

/* ── Ken / BD sidebar — uses per-tenant brand colours ──────── */
/*   --brand-primary → header/card gradient start               */
/*   --brand-cta     → gradient end, blockquote border          */
/*   Heading:  #2E3D62  (navy)                                  */
/* ────────────────────────────────────────────────────────────*/
.ken-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ── BD card ─────────────────────────────────────────────── */
.bd-card {
  background: #ffffff;
  border: 1px solid #d8c8e8;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(55,0,110,0.04),
    0 4px 16px rgba(55,0,110,0.08);
  overflow: hidden;
  position: sticky;
  top: 5rem;
}

/* Purple gradient header — mirrors the Tailwind preview */
.bd-card-header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: none;
}

.bd-logo-img {
  height: 42px;
  width: auto;
  display: block;
  /* brighten the logo on the dark purple background */
  filter: brightness(0) invert(1);
}

.bd-id strong {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  line-height: 1.3;
  display: block;
  text-align: center;
  font-family: "Montserrat", "Inter", sans-serif;
  letter-spacing: 0.01em;
}

.bd-description {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.65;
  border-left: 3px solid var(--brand-cta);
  padding: 0.9rem 1.25rem 1.1rem 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bd-description p { margin: 0; }

/* ── Ken card ────────────────────────────────────────────── */
.ken-card {
  background: #ffffff;
  border: 1px solid #d8c8e8;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(55,0,110,0.04),
    0 4px 16px rgba(55,0,110,0.08);
  overflow: hidden;
  position: sticky;
  top: 5rem;
}

/* Cetera purple gradient header for Ken card too */
.ken-header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-cta) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: none;
}

.ken-cetera-logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.ken-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 4px 12px rgba(0,0,0,0.3);
}

.ken-id {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.ken-id strong {
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 700;
  font-family: "Montserrat", "Inter", sans-serif;
}

.ken-id span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.35;
}

.ken-quote {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.65;
  border-left: 3px solid var(--brand-cta);
  padding: 0.9rem 1.1rem 1rem 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ken-quote p { margin: 0; }

.ken-sign-off {
  margin-top: 0.25rem;
  font-style: italic;
  color: #2E3D62;
  font-size: 0.82rem;
}

/* ── BD legacy sidebar (kept for compatibility) ───────────── */
.bd-sidebar { width: 280px; flex-shrink: 0; }

@media (max-width: 900px) {
  .page-layout { flex-direction: column; }
  .ken-sidebar { width: 100%; }
  .ken-card { position: static; }
  .bd-sidebar { width: 100%; order: 3 !important; }
  .bd-card { position: static; }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: #1E293B;
  color: rgba(255,255,255,0.35);
  text-align: center;
  font-size: 0.73rem;
  padding: 1rem;
  margin-top: auto;
}

.site-footer a { color: rgba(255,255,255,0.55); }
.site-footer a:hover { color: rgba(255,255,255,0.9); }

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Pill / tag input ─────────────────────────────────────── */
.pill-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.4rem 0.7rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.pill-box:focus-within {
  border-color: #2c67b2;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.12);
}
.pill-box.pill-box-error { border-color: var(--brand-accent); background: #FFF1F2; }
.pill-placeholder {
  position: absolute;
  left: 0.75rem;
  color: #94A3B8;
  font-size: 0.88rem;
  pointer-events: none;
  user-select: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  border-radius: 999px;
  padding: 0.2rem 0.5rem 0.2rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #93C5FD;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  transition: color 0.15s;
}
.pill-remove:hover { color: var(--brand-accent); }
.pill-text-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1E293B;
  min-width: 200px;
  flex: 1;
  padding: 0.2rem 0;
}
kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid #CBD5E1;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #F8FAFC;
  font-size: 0.75rem;
  font-family: monospace;
  color: #475569;
}

/* ── Preflight existing & new rules blocks ────────────────── */
.existing-rules-block {
  margin: 0.75rem 0 0.5rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}
.existing-rules-label,
.new-rules-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  padding: 0.5rem 0.9rem;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  margin: 0;
}
.existing-rule-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid #F8FAFC;
  transition: background 0.12s;
}
.existing-rule-row:last-child { border-bottom: none; }
.existing-rule-row:hover { background: #F8FAFC; }
.rule-checkbox { width: 15px; height: 15px; accent-color: var(--brand-accent); flex-shrink: 0; }
.existing-rule-email { font-size: 0.875rem; color: #1E293B; }
.new-rules-block {
  margin-top: 0.75rem;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  overflow: hidden;
  background: #EFF6FF;
}
.new-rules-block .new-rules-label {
  background: #DBEAFE;
  border-bottom-color: #BFDBFE;
  color: #1D4ED8;
}
.new-rules-block .change-props {
  padding: 0.5rem 1rem 0.75rem;
  margin: 0;
}
.badge-add {
  display: inline-block;
  background: #2c67b2;
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* ── Preflight specific scope block ──────────────────────── */
.scope-specific-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: #F8FAFC;
  border-left: 3px solid #2c67b2;
  border-radius: 0 8px 8px 0;
}
.scope-specific-note { font-size: 0.82rem; color: #475569; font-weight: 400; }

/* ── Domain dashboard (admin report) ─────────────────────── */
.domain-dashboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--brand-accent);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.domain-dash-left { flex: 1; min-width: 200px; }
.domain-dash-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  display: block;
  margin-bottom: 0.4rem;
}
.domain-dash-numbers {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.domain-dash-complete { font-size: 2rem; font-weight: 800; color: #15803D; line-height: 1; }
.domain-dash-sep      { color: #CBD5E1; font-size: 1.5rem; }
.domain-dash-total    { font-size: 1.5rem; color: #334155; font-weight: 700; }
.domain-dash-pct      { margin-left: 0.5rem; font-size: 0.95rem; color: #64748B; font-weight: 500; }
.domain-dash-track {
  height: 6px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.domain-dash-bar {
  height: 100%;
  background: linear-gradient(90deg, #15803D, #22C55E);
  border-radius: 999px;
  transition: width 0.6s ease;
  min-width: 4px;
}
.domain-dash-sub { font-size: 0.78rem; color: #64748B; }
.domain-dash-btn { white-space: nowrap; }

/* ── Domain status page ───────────────────────────────────── */
.domain-full-track {
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  margin: 1.25rem 0 1.5rem;
}
.domain-full-bar {
  height: 100%;
  background: linear-gradient(90deg, #15803D, #22C55E);
  border-radius: 999px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.add-domain-details {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.add-domain-summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: #2c67b2;
  background: #F8FAFC;
  list-style: none;
  user-select: none;
}
.add-domain-summary::-webkit-details-marker { display: none; }
.add-domain-summary:hover { background: #F1F5F9; }
.add-domain-form { padding: 1rem 1.25rem 0.5rem; }
.add-domain-fields {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.add-domain-field    { flex: 1; min-width: 180px; }
.add-domain-field-sm { flex: 0 0 120px; min-width: 100px; }
.add-domain-field-lg { flex: 2; min-width: 200px; }

.domain-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.domain-search { flex: 1; min-width: 200px; max-width: 416px; }
.domain-filter-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-btn {
  padding: 0.3rem 0.85rem;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  color: #64748B;
  transition: all 0.12s;
  font-family: inherit;
}
.filter-btn:hover { background: #F1F5F9; border-color: #CBD5E1; }
.filter-btn.active {
  background: #1E293B;
  color: #fff;
  border-color: #1E293B;
}

.badge-pending { background: #F5F3FF; color: #6D28D9; border-color: #A78BFA; }

/* ── Inline domain edit ───────────────────────────────────── */
.action-link-edit { color: #2c67b2; margin-right: 0.5rem; }
.action-link-edit:hover { color: #1a4a8a; }

.inline-edit-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.inline-edit-domain {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1E293B;
  min-width: 160px;
}

.inline-edit-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inline-edit-input {
  padding: 0.35rem 0.65rem;
  border: 1.5px solid #2c67b2;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1E293B;
  background: #fff;
  font-family: inherit;
}
.inline-edit-sm     { width: 70px; }
.inline-edit-lg     { width: 220px; }
.inline-edit-select { width: 160px; cursor: pointer; }

.inline-edit-save {
  padding: 0.35rem 0.9rem;
  font-size: 0.83rem;
  align-self: flex-end;
}

.action-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  transition: background 0.12s;
  white-space: nowrap;
  font-family: inherit;
}
.action-link-success { color: #15803D; }
.action-link-success:hover { background: #F0FDF4; }
.action-link-muted { color: #64748B; }
.action-link-muted:hover { background: #F1F5F9; }

/* ── Waitroom ─────────────────────────────────────────────── */
.waitroom-card { max-width: 560px; margin: 0 auto; text-align: center; }
.waitroom-icon {
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--brand-accent);
  transition: color 0.4s ease;
}
.waitroom-icon svg { display: block; }
.waitroom-icon--go { color: #16A34A; }
.waitroom-position-wrap { margin: 1.75rem 0 0.75rem; }
.waitroom-position-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.waitroom-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--brand-accent);
  line-height: 1;
  transition: all 0.4s ease;
  letter-spacing: -0.04em;
}
.waitroom-num-label { font-size: 1.1rem; color: #64748B; font-weight: 500; }
.waitroom-queue-total {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-bottom: 0.25rem;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}
.waitroom-eta { font-size: 0.925rem; color: #475569; min-height: 1.4em; transition: opacity 0.3s ease; }
.waitroom-progress-track {
  height: 5px;
  background: #E2E8F0;
  border-radius: 999px;
  margin: 1.5rem 0 1.25rem;
  overflow: hidden;
}
.waitroom-progress-bar {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--brand-accent), #C0394A);
  border-radius: 999px;
  transition: width 0.8s ease;
}
.waitroom-dots { display: flex; justify-content: center; gap: 0.5rem; }
.waitroom-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-accent);
  opacity: 0.3;
  animation: waitPulse 1.4s ease-in-out infinite;
}
.waitroom-dot:nth-child(2) { animation-delay: 0.25s; }
.waitroom-dot:nth-child(3) { animation-delay: 0.5s; }
@keyframes waitPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
  40%           { opacity: 1;   transform: scale(1.35); }
}
/* Live status message bar */
.waitroom-status-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: #64748B;
  min-height: 1.3em;
}
.waitroom-status-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  flex-shrink: 0;
  animation: liveDotPulse 2.2s ease-in-out infinite;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.4); }
}
.waitroom-status-text {
  transition: opacity 0.4s ease;
}

/* ── Admin ghost link ─────────────────────────────────────── */
.admin-ghost-link {
  position: fixed;
  bottom: 14px;
  right: 18px;
  font-size: 11px;
  opacity: 0.04;
  text-decoration: none;
  color: #1E293B;
  transition: opacity 0.3s ease;
  user-select: none;
  z-index: 999;
}
.admin-ghost-link:hover { opacity: 0.2; }

/* ── Admin login ──────────────────────────────────────────── */
.admin-login-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
}
.admin-login-card { width: 100%; max-width: 380px; text-align: center; }
.admin-lock-icon  { font-size: 2.5rem; margin-bottom: 0.25rem; }
.pin-input-wrap   { display: flex; justify-content: center; margin-top: 1.25rem; }
.pin-input {
  font-size: 2rem;
  font-family: "Inter", monospace;
  letter-spacing: 0.45em;
  text-align: center;
  width: 220px;
  padding: 0.6rem 0.75rem;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1E293B;
}
.pin-input:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(162,33,46,0.12); }
.pin-input.input-error { border-color: var(--brand-accent); background: #FFF1F2; }

.error-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: #881337;
  text-align: left;
}

/* ── Admin report ─────────────────────────────────────────── */
.admin-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-report-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
  width: 100%;
}
.stat-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.stat-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 2px 8px rgba(15,23,42,0.06);
}

/* Full-width on smaller viewports */
@media (max-width: 1024px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; }
}
.stat-card.stat-success  { border-color: #BBF7D0; background: #F0FDF4; }
.stat-card.stat-fail     { border-color: #A78BFA; background: #F5F3FF; }
a.stat-card-link { text-decoration: none; cursor: pointer; }
a.stat-card-link:hover { box-shadow: 0 2px 8px rgba(15,23,42,0.10); transform: translateY(-1px); border-color: #94A3B8; }
a.stat-card-link.stat-success:hover { border-color: #6EE7B7; }
a.stat-card-link.stat-fail:hover    { border-color: #7C3AED; }
.stat-card.stat-card-muted { border-color: #E2E8F0; background: #F8FAFC; border-style: dashed; opacity: 0.7; cursor: default; }
.stat-card.stat-card-muted:hover { box-shadow: none; border-color: #E2E8F0; }
.stat-card.stat-card-active {
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15), 0 2px 8px rgba(15,23,42,0.10);
  outline: none;
  position: relative;
}
.stat-card.stat-card-active::after {
  content: '✓';
  position: absolute;
  top: 0.3rem;
  right: 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0.7;
}
.stat-num { font-size: 1.35rem; font-weight: 800; color: #1E293B; line-height: 1; letter-spacing: -0.02em; }
.stat-card.stat-success .stat-num { color: #15803D; }
.stat-card.stat-fail    .stat-num   { color: #6D28D9; }
.stat-card.stat-fail    .stat-label { color: #7C3AED; }
.stat-card.stat-fail    .stat-pct   { color: #A78BFA; }
.stat-num.stat-num-muted { font-size: 1.5rem; color: #CBD5E1; }
.stat-label {
  font-size: 0.72rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
}
.report-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #F8FAFC;
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.7rem 1rem;
  text-align: left;
  box-shadow: 0 1px 0 #E2E8F0;
  white-space: nowrap;
}
.report-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #F8FAFC;
  color: #334155;
  vertical-align: middle;
}
.report-table tbody tr {
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table tbody tr:hover {
  background: #F0FEFB;
  box-shadow: inset 4px 0 0 var(--brand-accent);
}
.report-table tbody tr:active {
  background: #ECFDFA;
}
.td-mono  { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.78rem; }
.td-muted { color: #94A3B8; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-fail    { background: #FFE4E6; color: #9F1239; }
/* Platform badges — colors driven by CSS vars set in Settings modal */
.badge-gsuite  { background: color-mix(in srgb, var(--plt-google, #15803D) 12%, #fff);
                 color: var(--plt-google, #15803D); font-size: 0.68rem; font-weight: 700;
                 padding: 0.1rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; border-radius: 999px; }
.badge-m365    { background: color-mix(in srgb, var(--plt-m365, #1D4ED8) 12%, #fff);
                 color: var(--plt-m365, #1D4ED8); font-size: 0.68rem; font-weight: 700;
                 padding: 0.1rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; border-radius: 999px; }
.badge-other        { background: color-mix(in srgb, var(--plt-other, #6D28D9) 12%, #fff);
                      color: var(--plt-other, #6D28D9); font-size: 0.68rem; font-weight: 700;
                      padding: 0.1rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; border-radius: 999px; }
.badge-m365-manual  { background: #FEF3C7; color: #92400E; font-size: 0.68rem; font-weight: 700;
                      padding: 0.1rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; border-radius: 999px; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748B;
  font-size: 0.925rem;
}

/* ── NDR detected banner ──────────────────────────────────── */
.ndr-detected-banner {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.25rem;
}
.ndr-detected-icon    { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.05rem; }
.ndr-detected-body    { flex: 1; }
.ndr-detected-label   { font-size: 0.875rem; color: #334155; margin-bottom: 0.3rem; }
.ndr-detected-address { font-size: 1rem; font-weight: 700; color: #1D4ED8; margin-bottom: 0.6rem; }
.ndr-detected-question { font-size: 0.875rem; font-weight: 600; color: #1E293B; margin-bottom: 0.55rem; }
.ndr-detected-choices { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.ndr-choice-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid #BFDBFE;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.855rem;
  color: #334155;
  transition: all 0.12s;
  user-select: none;
}
.ndr-choice-card:hover { border-color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 5%, #fff); }
.ndr-choice-card.ndr-choice-selected {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 7%, #fff);
  color: var(--brand-primary);
  font-weight: 600;
}
.ndr-choice-card input[type="radio"] { accent-color: var(--brand-primary); }
.ndr-choice-label { pointer-events: none; }

/* ── Admin tenant switcher bar ────────────────────────────── */
.admin-tenant-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 1rem 1.5rem 0;
}

.admin-tenant-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.admin-tenant-select {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 2rem 0.35rem 0.75rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-tenant-select:focus {
  outline: none;
  border-color: #37006e;
  box-shadow: 0 0 0 3px rgba(55,0,110,0.12);
}

.admin-tenant-rename-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0.25rem;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.admin-tenant-rename-btn:hover { color: #37006e; }

.admin-tenant-rename-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-tenant-rename-input {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  background: #fff;
  border: 1.5px solid #37006e;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  width: 260px;
  box-shadow: 0 0 0 3px rgba(55,0,110,0.10);
}
.admin-tenant-rename-input:focus { outline: none; }

.admin-tenant-rename-save {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: #37006e;
  border: none;
  border-radius: 7px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.admin-tenant-rename-save:hover { background: #54117b; }

.admin-tenant-rename-cancel {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.4rem;
}
.admin-tenant-rename-cancel:hover { color: #1e293b; }

/* ── Admin two-column layout ──────────────────────────────── */
.admin-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Tenant Home: 3/4 main + 1/4 sidebar via CSS grid */
.admin-layout--home {
  display: grid;
  grid-template-columns: 3fr 1fr;
  align-items: start;
}

.admin-layout--home .admin-main,
.admin-layout--home .admin-sidebar {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: none;
}

/* ── Tenant Settings two-column grid ─────────────────────── */
.ts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.ts-col { min-width: 0; }
.ts-grid-uploads { align-items: flex-start; }

@media (max-width: 900px) {
  .ts-grid { grid-template-columns: 1fr; }
  .admin-sidebar { flex: 0 0 320px; width: 320px; }
}

.sidebar-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.06);
}

.sidebar-title { font-size: 1rem; font-weight: 700; color: #0F172A; margin-bottom: 0.4rem; }

.sidebar-hint {
  font-size: 0.79rem;
  color: #64748B;
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.sidebar-field { margin-bottom: 1.1rem; }

.sidebar-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #1E293B;
  background: #F8FAFC;
  transition: all 0.15s;
  font-family: inherit;
}
.sidebar-input:focus {
  outline: none;
  border-color: #2c67b2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.1);
}

.sidebar-textarea {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #1E293B;
  background: #F8FAFC;
  resize: vertical;
  font-family: inherit;
  transition: all 0.15s;
}
.sidebar-textarea:focus {
  outline: none;
  border-color: #2c67b2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.1);
}

.sidebar-jfa-current { font-size: 0.79rem; color: #64748B; margin-bottom: 0.4rem; }
.sidebar-save-btn { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* ── Google Workspace instructions page ───────────────────── */
.gsuite-paths { display: flex; gap: 1.5rem; margin-top: 1.75rem; align-items: stretch; }

.gsuite-path {
  flex: 1;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.gsuite-path-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E2E8F0;
}

.gsuite-path-icon  { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; background: rgba(55,0,110,0.07); border-radius: 10px; color: var(--brand-primary); margin-bottom: 0.75rem; flex-shrink: 0; }
.gsuite-path-title { font-size: 1rem; font-weight: 700; color: #0F172A; margin-bottom: 0.3rem; }
.gsuite-path-sub   { font-size: 0.83rem; color: #64748B; line-height: 1.5; }
.gsuite-path-links { display: flex; flex-direction: column; gap: 0.75rem; }

.gsuite-link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: #334155;
  transition: all 0.15s;
}
.gsuite-link-card:hover {
  border-color: #2c67b2;
  box-shadow: 0 2px 12px rgba(44,103,178,0.1);
  color: #1E293B;
  transform: translateY(-1px);
}

.gsuite-link-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: rgba(55,0,110,0.06); border-radius: 8px; color: var(--brand-primary); flex-shrink: 0; }
.gsuite-link-card div { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.gsuite-link-card strong { font-size: 0.875rem; }
.gsuite-link-card span  { font-size: 0.77rem; color: #64748B; }
.gsuite-link-arrow { font-size: 1rem; color: #94A3B8; flex-shrink: 0; }
.gsuite-path-note  { font-size: 0.79rem; color: #64748B; line-height: 1.5; margin-top: auto; padding-top: 1rem; }

/* ── Expandable setup video ─────────────────────────────────────────────── */
.setup-video-wrap {
  margin-top: 0.75rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  background: #F8FAFC;
}
.setup-video-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.setup-video-toggle:hover {
  background: rgba(55,0,110,0.04);
  color: var(--brand-primary);
}
.setup-video-toggle[aria-expanded="true"] {
  border-bottom: 1px solid #E2E8F0;
  background: rgba(55,0,110,0.04);
  color: var(--brand-primary);
}
.setup-video-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  flex-shrink: 0;
}
.setup-video-toggle[aria-expanded="true"] .setup-video-toggle-icon {
  background: var(--brand-primary);
}
.setup-video-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  flex-shrink: 0;
  color: #94A3B8;
}
.setup-video-toggle[aria-expanded="true"] .setup-video-chevron {
  transform: rotate(180deg);
}
.setup-video-body {
  padding: 0.85rem;
}
.setup-video-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 7px;
  overflow: hidden;
  background: #000;
}
.setup-video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.gsuite-divider {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
  padding: 0 0.25rem;
}

@media (max-width: 680px) {
  .gsuite-paths { flex-direction: column; }
  .gsuite-divider { flex-direction: row; gap: 0.5rem; }
  .gsuite-divider::before, .gsuite-divider::after {
    content: ''; flex: 1; height: 1px; background: #E2E8F0;
  }
}

/* ── Video + resources two-column layout ─────────────────────────────── */
.domain-resource-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.domain-resource-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.domain-resource-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.domain-resource-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.domain-resource-right .gsuite-path-header {
  margin-bottom: 0;
}
.domain-resource-or {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.5rem 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin: 0.25rem 0;
}
@media (max-width: 700px) {
  .domain-resource-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Provider tabs (Other platform) ─────────────────────────── */
.provider-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 1.5rem;
}
.provider-tab-btn {
  background: none;
  border: none;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0;
}
.provider-tab-btn.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}
.provider-tab-btn:hover:not(.active) {
  color: #334155;
}

/* ── Schedule specialist banner ──────────────────────────────── */
.schedule-specialist {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.schedule-specialist-text { flex: 1; min-width: 180px; }
.schedule-specialist-text strong { display: block; font-size: 0.88rem; color: #334155; margin-bottom: 0.2rem; }
.schedule-specialist-text p { font-size: 0.82rem; color: #64748b; margin: 0; line-height: 1.5; }

/* ── GoDaddy collapsible setup sections ─────────────────────── */
.setup-section {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.setup-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  list-style: none;
  background: #F8FAFC;
  gap: 0.5rem;
}
.setup-section summary::-webkit-details-marker { display: none; }
.setup-section summary::after {
  content: '';
  width: 10px; height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-top: -4px;
}
.setup-section[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.setup-section[open] summary {
  border-bottom: 1px solid #E2E8F0;
  background: #fff;
}
.setup-section-body {
  padding: 0.85rem 1rem 1rem;
}
.setup-section-body ol {
  margin: 0;
  padding-left: 1.3rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 2;
}
.setup-section-body ol li { padding-left: 0.2rem; }
.setup-section-body .info-banner { margin: 0 0 0.75rem; font-size: 0.82rem; }

/* ── Guide panel video toggle — classic tab style ─────────────── */
.guide-mode-btns {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.guide-mode-btn {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  padding: 0.45rem 0.85rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.guide-mode-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.guide-mode-btn:hover:not(.active) {
  color: #475569;
  border-bottom-color: #CBD5E1;
}
.guide-mode-btn.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
  font-weight: 700;
}

/* ── CMS editor ──────────────────────────────────────────── */
.cms-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #E2E8F0;
}
.cms-section:last-child { border-bottom: none; margin-bottom: 0; }

.cms-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cms-section-title { font-size: 1rem; font-weight: 700; color: #0F172A; }

.cms-preview {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem;
}

.cms-field {
  font: inherit;
  color: inherit;
  background: rgba(44, 103, 178, 0.05);
  border: 1.5px dashed rgba(44, 103, 178, 0.3);
  border-radius: 5px;
  width: 100%;
  resize: vertical;
  padding: 3px 6px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s;
  display: block;
}
.cms-field:focus {
  background: #fff;
  border-color: #2c67b2;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(44,103,178,0.1);
}
input.cms-field { resize: none; }

/* ── CMS field errors ─────────────────────────────────────── */
.cms-field-error {
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 4px;
  padding: 0.55rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #991b1b;
  line-height: 1.5;
}
.cms-field-error ul { margin: 0; padding-left: 1.1rem; }
.cms-field-error li { margin-bottom: 2px; }
.cms-field-error li:last-child { margin-bottom: 0; }
.cms-field-error .cms-err-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.cms-field.has-error {
  outline: 2px solid #ef4444 !important;
  outline-offset: 1px;
}

/* ── CMS toolbar (Insert Link button row) ─────────────────── */
.cms-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.cms-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #2c67b2;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  line-height: 1.6;
}
.cms-toolbar-btn:hover { background: #dbeafe; border-color: #93c5fd; }

/* ── CMS link inserter popover ────────────────────────────── */
.cms-link-popover {
  margin-bottom: 6px;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1.5px solid #2c67b2;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(44,103,178,0.12);
}
.cms-link-popover label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cms-link-popover input[type="url"],
.cms-link-popover input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  font-size: 0.83rem;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 0.5rem;
}
.cms-link-popover input:focus { border-color: #2c67b2; }
.cms-link-popover-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.cms-link-insert-btn {
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #2c67b2;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.cms-link-insert-btn:hover { background: #1d4ed8; }
.cms-link-cancel-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
}
.cms-link-cancel-btn:hover { background: #f1f5f9; }

/* ── CMS Editor Guide modal ───────────────────────────────── */
.cms-guide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 9000;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.cms-guide-overlay.open { display: flex; }
.cms-guide-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
  width: 100%;
  max-width: 700px;
  overflow: hidden;
  margin: auto;
}
.cms-guide-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: #310148;
  color: #fff;
}
.cms-guide-modal-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.cms-guide-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.cms-guide-close:hover { background: rgba(255,255,255,0.3); }
.cms-guide-body {
  padding: 1.4rem;
  max-height: 75vh;
  overflow-y: auto;
}
.cms-guide-section {
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #e2e8f0;
}
.cms-guide-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cms-guide-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #310148;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cms-guide-section p, .cms-guide-section li {
  font-size: 0.84rem;
  color: #374151;
  line-height: 1.6;
}
.cms-guide-section code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82rem;
  color: #0f172a;
}
.cms-guide-section pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}
.cms-merge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.4rem;
}
.cms-merge-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #374151;
  padding: 5px 10px;
  text-align: left;
  border: 1px solid #e2e8f0;
}
.cms-merge-table td {
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  vertical-align: top;
}
.cms-merge-table td code { background: #ede9fe; color: #4c1d95; }
.cms-guide-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.cms-guide-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #ede9fe;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4c1d95;
  font-family: monospace;
}
.cms-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: #ede9fe;
  color: #310148;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  margin-left: auto;
}
.cms-guide-btn:hover { background: #ddd6fe; }

/* ── Smart links in CMS-rendered content ──────────────────── */
/* Universal rule: any link inside a CMS-rendered area inherits its
   surrounding text colour, is bold, and is underlined so it's always
   visually distinct without browser-default blue. */
.demo-ribbon a,
.demo-hint-body a,
.setup-section-body a,
.guide-step-text a,
.ken-signin-bubble a,
[data-cms-html] a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}

/* ── Microsoft connect button ─────────────────────────────── */
.btn-ms {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
}
.ms-logo { flex-shrink: 0; }

/* ── Recipient picker ─────────────────────────────────────── */
/* Cards that contain the dropdown picker must allow it to overflow */
.card.has-picker { overflow: visible; }
.card.has-picker::before { border-radius: 15px 15px 0 0; }

.recipient-picker { position: relative; }
.picker-search { width: 100%; box-sizing: border-box; }
.picker-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(15,23,42,0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
}
.picker-item {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.1s;
}
.picker-item:hover { background: #F0F7FF; }
.picker-item-selected { background: #EFF6FF; }
.picker-item-selected:hover { background: #DBEAFE; }
.picker-check {
  margin-left: auto;
  color: #2c67b2;
  font-weight: 700;
  display: none;
  flex-shrink: 0;
}
.picker-item-selected .picker-check { display: block; }
.picker-pill-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.65rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: #fff;
  cursor: text;
  transition: all 0.15s;
}
.picker-pill-box:focus-within { border-color: #2c67b2; box-shadow: 0 0 0 3px rgba(44,103,178,0.1); }
.picker-pill-box .pill { margin: 0; }
.picker-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.picker-item-group .picker-label { color: #2c67b2; }

/* ── Preflight loading spinner ────────────────────────────── */
.preflight-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  gap: 0.75rem;
}
.preflight-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #E2E8F0;
  border-top-color: #2c67b2;
  border-radius: 50%;
  animation: preflight-spin 0.8s linear infinite;
}
@keyframes preflight-spin { to { transform: rotate(360deg); } }
.preflight-loading-msg { font-size: 0.925rem; font-weight: 600; color: #2c67b2; margin: 0; }
.preflight-loading-sub { font-size: 0.82rem; color: #64748B; margin: 0; }

/* ── Preflight checklist ────────────────────────────────────── */
.preflight-checklist {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.preflight-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.preflight-check-item:last-child { border-bottom: none; }
.preflight-check-sub { padding-top: 0.1rem; padding-bottom: 0.6rem; }
.preflight-check-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 1px;
}
.preflight-check-icon.done { background: #dcfce7; color: #16a34a; }
.preflight-check-icon.add  { background: #dbeafe; color: #1d4ed8; }
.preflight-check-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.preflight-check-body strong { font-size: 0.92rem; color: #1e293b; }
.preflight-check-note { font-size: 0.8rem; color: #64748b; }
.preflight-badge-exists {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
  align-self: center;
}
.preflight-untouched-details {
  margin: 0.75rem 0 0;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}

.preflight-untouched-details[open] .untouched-chevron {
  transform: rotate(180deg);
}

.preflight-untouched-note {
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.preflight-untouched-note::-webkit-details-marker { display: none; }

.preflight-untouched-list {
  margin: 0;
  padding: 0 0.75rem 0.6rem 2rem;
  list-style: none;
  border-top: 1px solid #e2e8f0;
}
.preflight-untouched-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}
.preflight-untouched-list li:last-child { border-bottom: none; }

.untouched-rule-name { font-weight: 600; color: #334155; }
.untouched-rule-recip { color: #64748b; font-size: 0.75rem; }
.untouched-rule-scope {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  background: #e2e8f0;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

/* ── Email compose modal ──────────────────────────────────── */
.email-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}
.email-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(15,23,42,0.2), 0 1px 3px rgba(15,23,42,0.1);
  width: 100%;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #F1F5F9;
  background: #F8FAFC;
}
.email-modal-title  { font-weight: 700; font-size: 1rem; color: #0F172A; }
.email-modal-close  {
  background: none; border: none; font-size: 1.4rem; line-height: 1;
  color: #64748B; cursor: pointer; padding: 0 0.2rem;
}
.email-modal-close:hover { color: #0F172A; }
.email-modal-meta {
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid #F1F5F9;
  background: #FAFBFD;
  font-size: 0.845rem;
}
.email-meta-row     { display: flex; gap: 0.6rem; padding: 0.15rem 0; }
.email-meta-label   { font-weight: 600; color: #64748B; min-width: 3.5rem; }
.email-meta-value   { color: #1E293B; }
.email-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: 55vh;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.65;
}
.email-modal-body p { margin: 0 0 0.75rem; }
.email-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.845rem;
}
.email-detail-table th,
.email-detail-table td { padding: 5px 10px; text-align: left; vertical-align: top; }
.email-detail-table th {
  background: #F1F5F9;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  width: 36%;
}
.email-detail-table td { color: #1E293B; word-break: break-all; }
.email-recipients-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
  margin: 1.25rem 0 0.5rem;
}
.email-recipients-count { font-weight: 400; color: #64748B; font-size: 0.82rem; }
.email-recipients-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.email-recipients-table thead tr { background: #2c67b2; color: #fff; }
.email-recipients-table th,
.email-recipients-table td { padding: 5px 10px; text-align: left; border-bottom: 1px solid #F1F5F9; }
.email-recipients-table tbody tr:nth-child(even) { background: #F8FAFC; }
.email-modal-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #F1F5F9;
  background: #FAFBFD;
  flex-wrap: wrap;
}

/* ── NDR screen — compact review summary ──────────────────── */
.ndr-summary {
  background: #F0F7FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}
.ndr-summary-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2c67b2;
  margin-bottom: 0.65rem;
}
.ndr-summary-list  { display: flex; flex-direction: column; gap: 0.4rem; }
.ndr-summary-row   { display: flex; gap: 0.75rem; font-size: 0.875rem; align-items: baseline; }
.ndr-summary-row dt { font-weight: 600; color: #1E293B; min-width: 10rem; flex-shrink: 0; }
.ndr-summary-row dd { color: #334155; }
.ndr-summary-row code { background: #DBEAFE; border-radius: 3px; padding: 0 4px; font-size: 0.82rem; }

/* ── Completion tracker (complete screen) ─────────────────── */
.completion-tracker { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.completion-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
}
.completion-step-done    { background: #F0FDF4; border-color: #BBF7D0; }
.completion-step-pending { background: #FFFBEB; border-color: #FCD34D; }
.completion-num { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.completion-num-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #F59E0B;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.completion-body { flex: 1; }
.completion-body strong { font-size: 0.925rem; color: #0F172A; }
.completion-body p { font-size: 0.845rem; color: #475569; margin-top: 0.2rem; }
.btn-email-action { font-size: 1rem; padding: 0.65rem 1.4rem; }

/* ── Responsive ───────────────────────────────────────────── */

/* Stack the tenant home two-column layout at 1100px. */
@media (max-width: 1100px) {
  .admin-layout--home { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-tagline { display: none; }
  .stepper ol { overflow-x: auto; padding-bottom: 0.5rem; }
  .step-label { display: none; }
  .card { padding: 1.5rem 1.25rem; border-radius: 12px; }
  .action-row-spaced { flex-direction: column-reverse; }
  .btn { width: 100%; justify-content: center; }
  .admin-report-header { flex-direction: column; align-items: flex-start; }
  .stat-row { flex-direction: column; }
}

/* ── Header tenant switcher ───────────────────────────────── */
.header-tenant-switcher {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Override the standalone bar styles when inside the header */
.header-tenant-switcher .admin-tenant-bar {
  width: auto;
  padding: 0;
  justify-content: center;
}

/* ── Color picker row ─────────────────────────────────────── */
.color-picker-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.35rem;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.color-picker-item input[type="color"] {
  width: 40px;
  height: 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: none;
}

.color-picker-item label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

/* ── Asset upload ─────────────────────────────────────────── */
.sidebar-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 1.25rem 0;
}

.asset-preview {
  margin-bottom: 0.5rem;
}

.asset-thumb {
  max-height: 56px;
  max-width: 140px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
}

.asset-thumb-round {
  border-radius: 50%;
  max-height: 56px;
  max-width: 56px;
}

.asset-upload-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.asset-file-input {
  font-size: 0.78rem;
  flex: 1;
  min-width: 0;
}

.asset-feedback {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}

/* ── Maintenance mode card ────────────────────────────────── */
.maintenance-card {
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.maintenance-card.maintenance-on {
  background: #FFF7ED;
  border-color: #FED7AA;
}
.maintenance-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.maintenance-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0F172A;
}
.maintenance-card.maintenance-on .maintenance-title {
  color: #92400E;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  border-radius: 999px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: #EA580C; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Admin shell (left nav + main) ───────────────────────── */
.admin-shell {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;          /* anchor for the full-height bg strip */
  min-height: calc(100vh - var(--sticky-bar-h, 72px));
}

/* Full-height brand-color strip that fills the nav column to the bottom */
.admin-shell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 230px;
  height: 100%;
  background: var(--brand-primary);
  pointer-events: none;
  z-index: 0;
}

/* Left nav — sticky inside the colored column */
.admin-nav {
  width: 230px;
  flex-shrink: 0;
  align-self: flex-start;      /* shrink to content height so sticky works */
  position: sticky;
  top: var(--sticky-bar-h, 72px);   /* clears the sticky header only */
  max-height: calc(100vh - var(--sticky-bar-h, 72px));
  overflow-y: auto;
  background: var(--brand-primary);
  display: flex;
  flex-direction: column;
  z-index: 1;                  /* above the ::before strip */
}

.admin-nav-inner {
  flex: 1;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-nav-footer {
  padding: 1rem 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* Tenant chip */
.admin-nav-tenant {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.6rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  margin-bottom: 1rem;
}

.admin-nav-swatch {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.2);
}

.admin-nav-swatch-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1); /* always white on colored bg */
  padding: 4px;
}

.admin-nav-tenant-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.admin-nav-tenant-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-tenant-slug {
  font-size: 0.68rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: rgba(255,255,255,0.5);
}

/* Nav section label */
.admin-nav-section {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.5rem 0.75rem 0.25rem;
  margin-top: 0.25rem;
}

/* Nav links list */
.admin-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.admin-nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  filter: none;
}

.admin-nav-link.active {
  border-left: 3px solid rgba(255,255,255,0.9);
  padding-left: calc(0.75rem - 3px);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-weight: 600;
  border-radius: 0 9px 9px 0;
}

/* SVG icon inside nav link */
.admin-nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.8;
}
.admin-nav-link:hover .admin-nav-icon,
.admin-nav-link.active .admin-nav-icon { opacity: 1; }

.admin-nav-signout { color: rgba(255,255,255,0.45); font-size: 0.82rem; }
.admin-nav-signout:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.08); }

.admin-nav-user {
  padding: 0.6rem 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.25rem;
}
.admin-nav-user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-nav-user-email {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-copyright {
  margin: 0.6rem 0 0;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Nav section label + divider */
.admin-nav-section-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  padding: 0.6rem 1rem 0.25rem;
  user-select: none;
}
.admin-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 0.5rem 1rem 0.6rem;
}

/* Toggle button (parent items with sub-nav) */
.admin-nav-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.admin-nav-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0.6;
  transition: transform 0.22s ease, opacity 0.15s;
}
.admin-nav-toggle:hover .admin-nav-chevron,
.admin-nav-toggle.active .admin-nav-chevron { opacity: 1; }

/* Sub-nav (e.g. Audit Log under Tenants) */
.admin-subnav {
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem 0;
}
.admin-subnav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem 0.45rem 2.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.admin-subnav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.admin-subnav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  font-weight: 600;
  border-radius: 0 6px 6px 0;
  border-left: 3px solid rgba(255,255,255,0.6);
  padding-left: calc(2.75rem - 3px);
}
.admin-subnav-link .admin-nav-icon {
  width: 13px;
  height: 13px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Main content area beside left nav */
.admin-shell-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem;
  background: #F1F5F9;
  transition: margin-right 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* Responsive: collapse nav on small screens */
@media (max-width: 768px) {
  .admin-nav { display: none; }
  .admin-shell-main { padding: 1rem; }
}

/* ── Chat-open push layout ────────────────────────────────────────────────── */
.admin-nav {
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
}
.admin-shell::before {
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
}

body.chat-open .admin-nav {
  width: 64px;
  overflow: hidden;
}
body.chat-open .admin-shell::before {
  width: 64px;
}
body.chat-open .admin-shell-main {
  margin-right: 380px;
}
body.chat-open .header-admin-controls {
  margin-right: 380px;
  transition: margin-right 0.25s cubic-bezier(0.4,0,0.2,1);
}
body.chat-open .admin-nav-inner {
  padding: 1.1rem 0.5rem;
  align-items: center;
}
body.chat-open .admin-nav-link,
body.chat-open .admin-nav-toggle {
  justify-content: center;
  padding: 0.6rem;
  font-size: 0;          /* hides text node without a wrapper span */
  gap: 0;
  overflow: hidden;
}
body.chat-open .admin-nav-link.active {
  border-left: none;
  border-bottom: 2px solid rgba(255,255,255,0.9);
  padding-left: 0.6rem;
  border-radius: 9px;
}
body.chat-open .admin-nav-icon {
  font-size: initial;    /* reset so SVG size isn't affected */
  width: 20px;
  height: 20px;
  opacity: 0.85;
}
body.chat-open .admin-nav-link:hover .admin-nav-icon,
body.chat-open .admin-nav-link.active .admin-nav-icon { opacity: 1; }
body.chat-open .admin-nav-section-label,
body.chat-open .admin-nav-tenant-text,
body.chat-open .admin-nav-user,
body.chat-open .admin-nav-signout,
body.chat-open .admin-nav-copyright,
body.chat-open .admin-nav-divider,
body.chat-open .admin-nav-chevron,
body.chat-open .admin-subnav { display: none; }
body.chat-open .admin-nav-tenant {
  padding: 0.5rem;
  justify-content: center;
}
body.chat-open .admin-nav-tenant-text { display: none; }
body.chat-open .admin-nav-footer { padding: 0.75rem 0.5rem; }

/* ── Complete page — Ken send-email callout (chatbot style) ─────── */
.ken-pointer {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.ken-pointer-bubble {
  background: #3B1F6E;
  color: #fff;
  border-radius: 0 12px 12px 12px;
  padding: 0.75rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.55;
  flex: 1;
  box-shadow: 0 2px 8px rgba(59,31,110,0.25);
}
.ken-pointer-bubble strong { color: #fff; font-weight: 700; }
.ken-pointer-bubble::after { display: none; }
.ken-pointer-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  object-fit: cover;
  flex-shrink: 0;
  animation: ken-bob 2.2s ease-in-out infinite;
}
@keyframes ken-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Pulsing button below the callout */
@keyframes email-btn-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
  50%       { transform: scale(1.03); box-shadow: 0 6px 22px rgba(0,0,0,0.28); }
}
.btn-email-action { animation: email-btn-pulse 1.9s ease-in-out infinite; }

/* ── M365 automated-setup nudge ──────────────────────────────── */
.auto-nudge {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: #F0F9FF;
  border: 1.5px solid #BAE6FD;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-top: 1.75rem;
}
.auto-nudge-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.auto-nudge-body {
  font-size: 0.875rem;
  color: #0369A1;
  line-height: 1.55;
  flex: 1;
}
.auto-nudge-body strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0C4A6E;
  font-size: 0.9rem;
}
.auto-nudge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.auto-nudge-link:hover {
  opacity: 0.85;
  color: #fff;
  filter: none;
}

/* ── Google Workspace setup steps ───────────────────────────────────────── */
.setup-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.setup-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.setup-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.setup-step-body {
  flex: 1;
}
.setup-step-body strong {
  font-size: 0.97rem;
  display: block;
  margin-bottom: 0.3rem;
}
.setup-step-body p {
  margin: 0.25rem 0;
  font-size: 0.88rem;
  color: #374151;
}
.setup-instructions {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
  font-size: 0.87rem;
  color: #374151;
}
.setup-instructions li {
  margin-bottom: 0.3rem;
}

/* ── Google Workspace 2-column split layout ─────────────────── */
.gsuite-split {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 0;
  width: 100%;
  align-items: flex-start;
}

.gsuite-left {
  min-width: 0;
}

.gsuite-left .card {
  max-width: none !important;
}

/* ── Guide panel (right sticky column) ──────────────────────── */
.gsuite-right {
  position: sticky;
  top: 16px;
}

.guide-panel {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15,23,42,0.04),
    0 4px 16px rgba(15,23,42,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 520px;
}

.guide-panel-header {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid #E2E8F0;
  background: #f8fafc;
  flex-shrink: 0;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(15,23,42,0.07);
}

.guide-panel-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0F172A;
}

.guide-panel-context {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  color: #374151;
  background: rgba(55, 0, 110, 0.04);
  border-bottom: 1px solid #E2E8F0;
  transition: background 0.35s;
  flex-shrink: 0;
  line-height: 1.4;
}

.guide-panel-context.context-done {
  background: rgba(22, 163, 74, 0.06);
}

.guide-panel-frame {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.guide-panel-frame iframe {
  width: calc(100% / 0.82);
  height: calc(100% / 0.82);
  transform: scale(0.82);
  transform-origin: top left;
  border: none;
  display: block;
}

.guide-panel-footer {
  padding: 0.55rem 1rem;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ── Step wizard states ──────────────────────────────────────── */
.setup-step {
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, opacity 0.25s;
  cursor: default;
}

.setup-step.active {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(55, 0, 110, 0.07);
}

.setup-step.done {
  border-color: #86efac;
  background: #f0fdf4;
  cursor: pointer;
}

.setup-step.pending {
  opacity: 0.45;
  pointer-events: none;
}

.setup-step.done .setup-step-num {
  background: #16a34a;
}

.setup-step.pending .setup-step-num {
  background: #94a3b8;
}

/* ── Step header row (title + guide badge) ───────────────────── */
.step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.guide-badge {
  flex-shrink: 0;
  font-size: 0.73rem;
  padding: 0.18rem 0.55rem;
  background: rgba(55, 0, 110, 0.07);
  color: var(--brand-primary);
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.6;
}

.setup-step.done .guide-badge {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

/* ── Collapsible step body ───────────────────────────────────── */
.step-collapsible {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s;
  max-height: 1000px;
  opacity: 1;
}

.setup-step.done .step-collapsible,
.setup-step.pending .step-collapsible {
  max-height: 0;
  opacity: 0;
}

.setup-step.done.expanded .step-collapsible {
  max-height: 1000px;
  opacity: 0.9;
}

/* re-open hint shown on done steps */
.step-reopen-hint {
  font-size: 0.76rem;
  color: #6b7280;
  margin-top: 0.15rem;
  font-style: italic;
}

/* Green "Done, go to step N" button */
.btn-step-done {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 2px 8px rgba(22,163,74,0.2);
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.btn-step-done:hover:not(:disabled) {
  background: #15803d;
  border-color: #166534;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(22,163,74,0.3);
}
.btn-step-done:active:not(:disabled) { transform: translateY(0); }

/* "Mark done" button row */
.step-done-row {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive: stack columns on narrower screens */
@media (max-width: 1100px) {
  .gsuite-split {
    grid-template-columns: 1fr;
  }
  .gsuite-right {
    position: static;
    order: -1;                /* show guide panel above steps on mobile */
  }
  .guide-panel {
    height: 480px;
  }
}
