﻿/* ============================================================
   CLIENTS BASE — self-contained design tokens & base styles
   No dependency on style.css. All /clients/ pages load only this file.
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary:   #0a0a0f;
  --bg-secondary: #101018;
  --bg-tertiary:  #1a1a24;
  --bg-elevated:  #22222e;
  --bg-surface:   #2a2a38;

  --accent-primary:       #EE3D43;
  --accent-primary-hover: #F55B60;
  --accent-primary-glow:  rgba(238, 61, 67, 0.25);
  --accent-blue:          #4A8FCA;
  --accent-blue-hover:    #6aaad9;
  --accent-orange:        #F5871F;
  --accent-green:         #7DC242;
  --accent-magenta:       #C8378B;
  --accent-red:           #EE3D43;

  --text-primary:   #E8ECF7;
  --text-secondary: #B8BFD2;
  --text-muted:     #8896AD;

  --border-subtle: rgba(125, 211, 252, 0.12);
  --border-hover:  rgba(125, 211, 252, 0.25);
  --border:        rgba(125, 211, 252, 0.12);
  --card-bg:       rgba(255, 255, 255, 0.02);

  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  padding-top: 80px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-primary-hover); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; color: var(--text-primary); letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { color: var(--text-secondary); margin-bottom: 1rem; }
ul { list-style: none; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Utilities --- */
.hidden          { display: none; }
.color-inherit   { color: inherit; }
.mt-2rem         { margin-top: 2rem; }
.buy-btn-error   { color: #EE3D43; font-size: 0.875rem; margin-top: 0.5rem; }
.mono-tag        { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); }
.mono-status     { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); }
.link-accent     { color: var(--accent-blue); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.fade-in         { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.icon      { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; fill: currentColor; overflow: visible; }
@keyframes icon-spin { to { transform: rotate(360deg); } }
.icon-spin { animation: icon-spin 2s linear infinite; }

/* --- Container --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.01em; border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none; line-height: 1;
}
.btn-primary { background: #D63540; color: #fff; }
.btn-primary:hover { background: var(--accent-primary-hover); color: #fff; box-shadow: 0 0 40px var(--accent-primary-glow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hover); font-weight: 500; }
.btn-ghost:hover { background: var(--card-bg); border-color: var(--accent-orange); color: var(--text-primary); }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
@media (max-width: 480px) { .btn { width: 100%; justify-content: center; } }

/* --- Gradient accent line --- */
.gradient-line { height: 2px; background: linear-gradient(90deg, var(--accent-red), var(--accent-orange), var(--accent-green), var(--accent-blue)); }

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,15,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle); transition: all var(--transition);
}
.navbar .container    { display: flex; align-items: center; gap: 36px; height: 72px; }
.navbar-brand         { display: flex; align-items: center; text-decoration: none; }
.navbar-brand img     { height: 32px; width: auto; }
.nav-links            { display: flex; align-items: center; gap: 28px; flex: 1; }
.nav-links a          { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; position: relative; padding: 4px 0; transition: color var(--transition); }
.nav-links a::after   { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--accent-primary); transition: width var(--transition); }
.nav-links a:hover, .nav-links a.active            { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta              { margin-left: auto; }
.nav-cta a            { padding: 11px 20px; font-family: var(--font); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; text-transform: none; color: #fff; }
.nav-cta a::after     { display: none !important; }
.nav-cta a:hover      { color: #fff; }
.nav-logout-form      { display: contents; }
.nav-logout-btn       { padding: 11px 20px; font-family: var(--font); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; text-transform: none; color: #fff; background: none; border: none; cursor: pointer; }
.nav-logout-btn::after { display: none !important; }
.nav-logout-btn:hover { color: #fff; opacity: 0.8; }

/* Nav dropdown */
.nav-dropdown           { position: relative; }
.nav-dropdown-trigger   { background: none; border: none; cursor: pointer; color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; padding: 4px 0; transition: color var(--transition); min-height: 44px; }
.nav-dropdown-trigger span          { position: relative; padding-bottom: 2px; }
.nav-dropdown-trigger span::after   { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--accent-primary); transition: width var(--transition); }
.nav-dropdown-trigger:hover, .nav-dropdown-trigger.active                     { color: var(--text-primary); }
.nav-dropdown-trigger:hover span::after, .nav-dropdown-trigger.active span::after { width: 100%; }
.nav-dropdown-chevron   { transition: transform var(--transition); margin-top: 1px; }
.nav-dropdown.open .nav-dropdown-chevron { transform: rotate(180deg); }
.nav-dropdown.nav-dropdown-small .nav-dropdown-menu { min-width: 220px; }
.nav-dropdown-menu      { position: absolute; top: calc(100% + 12px); left: 0; min-width: 200px; background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 6px 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity var(--transition), transform var(--transition), visibility var(--transition); z-index: 1001; }
.nav-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a    { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; transition: color var(--transition), background var(--transition); }
.nav-dropdown-menu a::after { display: none !important; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { color: var(--accent-primary); background: rgba(238,61,67,0.06); }
.nav-dropdown-divider   { display: block; border: none; border-top: 1px solid var(--border-subtle); margin: 4px 8px; }

/* Language dropdown */
.nav-lang-dropdown { margin-left: 8px; }
.nav-lang-trigger  { display: inline-flex; align-items: center; gap: 8px; }
.nav-lang-flag     { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 14.7px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--border-subtle); flex-shrink: 0; }
.nav-lang-flag svg { width: 100%; height: 100%; display: block; }
.nav-lang-trigger .nav-lang-flag { width: 34px; height: 22.7px; }
.nav-lang-menu     { min-width: 200px; right: 0; left: auto; }
.nav-lang-item     { display: flex !important; align-items: center; gap: 12px; font-family: inherit !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; }
.nav-lang-item .nav-lang-flag { width: 24px; height: 16px; }
.nav-lang-item .nav-lang-name { font-weight: 500; }
.nav-lang-item.active          { background: rgba(255,255,255,0.04); }
.nav-lang-item.active .nav-lang-name { color: var(--accent-primary); }

/* Mobile toggle */
.nav-toggle             { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 1001; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-toggle span        { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: all var(--transition); border-radius: 2px; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Minimal auth navbar back-link */
.navbar-auth-links { margin-left: auto; }
.navbar-auth-back  { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-muted); text-decoration: none; letter-spacing: 0.04em; transition: color var(--transition); }
.navbar-auth-back:hover { color: var(--text-primary); }

/* --- Footer --- */
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); letter-spacing: 0.06em; flex-wrap: wrap; gap: 8px; }
@media (max-width: 768px) { .footer-bottom { flex-direction: column; align-items: flex-start; } }

/* --- Page hero (auth + checkout pages) --- */
.page-hero { padding: 48px 0 24px; text-align: center; border-bottom: 1px solid var(--border-subtle); margin-bottom: 0; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .subtitle { color: var(--text-secondary); font-size: 1.1rem; }
.contact-form-section { padding: 60px 0; }

/* Checkout result box */
.enquiry-success-box { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-top: 3px solid var(--accent-green); border-radius: var(--radius-md); padding: 48px 40px; text-align: center; max-width: 640px; margin: 0 auto; animation: fadeInUp 0.4s ease-out; }
.enquiry-success-icon   { font-size: 52px; color: var(--accent-green); margin-bottom: 20px; line-height: 1; }
.enquiry-success-box h3 { font-size: 22px; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
.enquiry-success-lead   { color: var(--text-secondary); font-size: 15px; margin-bottom: 28px; line-height: 1.6; }

/* --- Forms (auth pages) --- */
.form-refined { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-top: 3px solid var(--accent-primary); border-radius: var(--radius-md); padding: 48px; max-width: 560px; margin: 0 auto; }
.form-refined input,
.form-refined select,
.form-refined textarea { width: 100%; background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-primary); padding: 14px; font-family: var(--font); font-size: 16px; transition: border-color var(--transition), background var(--transition); }
.form-refined input:focus,
.form-refined select:focus,
.form-refined textarea:focus { outline: none; border-color: var(--accent-primary); background: var(--bg-tertiary); }
.form-refined textarea { min-height: 150px; resize: vertical; }
.form-group  { margin-bottom: 24px; text-align: left; }
.form-hint   { font-size: 0.875rem; color: var(--text-muted); margin-top: 6px; }
.form-error  { color: #EE3D43; font-size: 0.875rem; margin-bottom: 16px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.mono-label  { display: block; font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.10em; }
.mono-label::before { content: "[ "; }
.mono-label::after  { content: " ]"; }
.totp-input  { letter-spacing: 0.25em; font-size: 1.4rem; text-align: center; }
@media (max-width: 768px) { .form-refined { padding: 24px 16px; } }

/* --- Responsive nav --- */
@media (max-width: 991px) {
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-links { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--bg-secondary); flex: none; flex-direction: column; align-items: flex-start; padding: 90px 28px 28px; gap: 0; border-left: 1px solid var(--border-subtle); transition: right var(--transition); }
  .nav-links.open { right: 0; }
  .nav-links a { padding: 16px 0; font-size: 1rem; width: 100%; border-bottom: 1px solid var(--border-subtle); }
  .nav-links a::after { display: none; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-trigger { width: 100%; justify-content: space-between; padding: 16px 0; font-size: 1rem; border-bottom: 1px solid var(--border-subtle); min-height: 0; }
  .nav-dropdown-trigger span::after { display: none; }
  .nav-dropdown-menu { position: static; opacity: 1; visibility: hidden; transform: none; background: transparent; border: none; border-radius: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height var(--transition), visibility var(--transition); }
  .nav-dropdown.open .nav-dropdown-menu { visibility: visible; max-height: 720px; }
  .nav-cta { margin-left: 0; margin-top: 16px; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; }
  .nav-overlay.active { display: block; }
  body { padding-top: 65px; }
}

/* ============================================================
   END CLIENTS BASE
   ============================================================ */

/* Sticky footer — keeps footer pinned to bottom even on short pages */
body.portal-page { min-height: 100vh; display: flex; flex-direction: column; }
body.portal-page main { flex: 1; }

/* Portal-specific styles — loaded only on portal pages (dashboard, account) */

/* Page header — compact, replaces marketing hero on portal pages */
.portal-page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid rgba(125,211,252,0.08);
}
.portal-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin: 0;
}

/* Content wrapper — replaces contact-form-section on portal pages */
.portal-content { padding-bottom: 3rem; }

/* Section label — like vc-eyebrow but without the pulsing red dot */
.portal-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

/* Back-navigation link (account → dashboard) */
.portal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.portal-back-link:hover { color: var(--text-primary); }

/* Email-row read-only note */
.dash-account-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* --- Portal nav --- */
/* Truncate long email addresses in the account dropdown trigger */
.nav-portal-email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  opacity: 0.75;
}
/* Sign-out button styled as a dropdown menu item */
.nav-logout-btn--menu {
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
}
.nav-logout-btn--menu::after { display: none !important; }
.nav-logout-btn--menu i { color: var(--accent-primary); }
.nav-logout-btn--menu:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.portal-footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.portal-footer-links a { color: var(--text-muted); font-size: 14px; font-family: var(--font-mono); letter-spacing: 0.06em; text-decoration: none; }
.portal-footer-links a:hover { color: var(--text-primary); }

/* ============================================================
   CLIENT PORTAL DASHBOARD
   ============================================================ */

/* Grid — single column; tiles stack vertically */
.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

/* Base tile card */
.dash-tile {
  background: var(--bg-secondary);
  border: 1px solid rgba(125,211,252,0.12);
  border-radius: 6px;
  overflow: hidden;
}
.dash-tile.dash-tile--highlight {
  border-color: var(--accent-green, #7DC242);
  box-shadow: 0 0 0 1px var(--accent-green, #7DC242);
  animation: dash-highlight-fade 3s ease forwards;
}
@keyframes dash-highlight-fade {
  0%   { box-shadow: 0 0 20px rgba(125,194,66,0.35), 0 0 0 1px #7DC242; }
  100% { box-shadow: 0 0 0 1px #7DC242; }
}

/* Tile header */
.dash-tile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(125,211,252,0.08);
  flex-wrap: wrap;
}
.dash-tile-header-left { flex: 1; min-width: 0; }
.dash-tile-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-tile-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.dash-status-badge {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
}
.dash-status-badge--active   { background: rgba(125,194,66,0.15);  color: #7DC242; }
.dash-status-badge--trialing { background: rgba(74,143,202,0.15);  color: #4A8FCA; }
.dash-status-badge--past_due { background: rgba(245,135,31,0.15);  color: #F5871F; }
.dash-status-badge--canceled { background: rgba(125,211,252,0.08); color: var(--text-muted); }
.dash-status-badge--default  { background: rgba(125,211,252,0.08); color: var(--text-muted); }

/* Section divider within a tile */
.dash-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(125,211,252,0.06);
}
.dash-section:last-child { border-bottom: none; }
.dash-section-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* Scan launch form */
.dash-scan-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.dash-scan-form-target { flex: 1; min-width: 220px; }
.dash-scan-form-profile { width: 140px; }
.dash-scan-form label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.dash-scan-form input,
.dash-scan-form select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.15);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.dash-scan-form input:focus,
.dash-scan-form select:focus { border-color: rgba(125,211,252,0.4); }
.dash-scan-form select { cursor: pointer; }
.dash-scan-form-actions { display: flex; align-items: flex-end; gap: 0.5rem; }

/* Scan / sessions table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.dash-table th {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(125,211,252,0.08);
  white-space: nowrap;
}
.dash-table th:first-child { padding-left: 0; }
.dash-table td {
  padding: 0.65rem 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(125,211,252,0.04);
  vertical-align: middle;
  white-space: nowrap;
}
.dash-table td:first-child { padding-left: 0; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table td.mono { font-family: var(--font-mono); font-size: 0.875rem; }
.dash-table-target {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.dash-table-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

/* Inline status chips in table */
.dash-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}
.dash-chip--done     { background: rgba(125,194,66,0.12);  color: #7DC242; }
.dash-chip--scanning { background: rgba(74,143,202,0.12);  color: #4A8FCA; }
.dash-chip--queued   { background: rgba(125,211,252,0.08); color: var(--text-muted); }
.dash-chip--analyzing{ background: rgba(245,135,31,0.12);  color: #F5871F; }
.dash-chip--failed   { background: rgba(238,61,67,0.12);   color: #EE3D43; }

/* Risk score pill */
.dash-risk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  width: 36px;
  height: 22px;
  border-radius: 3px;
}
.dash-risk--low    { background: rgba(125,194,66,0.15);  color: #7DC242; }
.dash-risk--med    { background: rgba(245,135,31,0.15);  color: #F5871F; }
.dash-risk--high   { background: rgba(238,61,67,0.15);   color: #EE3D43; }
.dash-risk--none   { background: rgba(125,211,252,0.06); color: var(--text-muted); }

/* Sites list (session recorder) */
.dash-sites-list { display: flex; flex-direction: column; gap: 0.5rem; }
.dash-site-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.08);
  border-radius: 4px;
  flex-wrap: wrap;
}
.dash-site-domain {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-site-count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.dash-site-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* Embed code block */
.dash-embed-block {
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.1);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.dash-embed-pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #4A8FCA;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 0.75rem;
}
.dash-embed-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Add-site inline form */
.dash-add-site-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.1);
  border-radius: 4px;
}
.dash-add-site-form label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.dash-add-site-form input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid rgba(125,211,252,0.15);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.dash-add-site-form input:focus { border-color: rgba(125,211,252,0.4); }
.dash-add-site-form-field { flex: 1; min-width: 180px; }

/* Sessions sub-panel */
.dash-sessions-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.08);
  border-radius: 4px;
}
.dash-sessions-panel-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

/* Empty state inside a tile section */
.dash-empty {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.dash-empty i { font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 0.4; }

/* Loading spinner inside tiles */
.dash-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}
.dash-loading i { animation: spin 1s linear infinite; }

/* Error message inside tiles */
.dash-error {
  font-size: 0.875rem;
  color: #EE3D43;
  padding: 0.5rem 0;
}

/* btn-sm variant */
.btn-sm {
  font-size: 0.875rem;
  padding: 0.35rem 0.9rem;
}

/* All subscribe buttons are always red, regardless of ghost/primary class */
button[data-subscribe-plan] {
  background: #D63540;
  color: #fff;
  border-color: transparent;
}
button[data-subscribe-plan]:hover {
  background: var(--accent-primary-hover);
  color: #fff;
  box-shadow: 0 0 40px var(--accent-primary-glow);
  transform: translateY(-2px);
  border-color: transparent;
}

/* btn-danger variant — solid red for high-urgency destructive actions */
.btn-danger {
  background: #EE3D43;
  border: 1px solid #EE3D43;
  color: #fff;
}
.btn-danger:hover {
  background: var(--accent-primary-hover, #c93038);
  border-color: var(--accent-primary-hover, #c93038);
}

/* btn-outline-danger variant — outlined red for lower-urgency destructive triggers */
.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(238,61,67,0.45);
  color: #EE3D43;
}
.btn-outline-danger:hover {
  background: rgba(238,61,67,0.08);
  border-color: #EE3D43;
}

/* Spinner keyframes (reused by dash-loading) */
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty dashboard (no subscriptions) */
.dash-no-subs {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(125,211,252,0.08);
  border-radius: 6px;
}
.dash-no-subs-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}
.dash-no-subs h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
.dash-no-subs p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.buy-btn-error {
  width: 100%;
  color: var(--accent-red, #EE3D43);
  font-size: 0.875rem;
  margin: 0.2rem 0 0;
}

/* Findings severity labels */
.dash-sev-col { color: var(--text-muted); }
.dash-sev-c   { color: #EE3D43; }
.dash-sev-h   { color: #F5871F; }
.dash-sev-m   { color: #F5871F; opacity: .7; }
.dash-sev-l   { color: var(--text-muted); }

/* Session-recorder tile section header */
.dash-srec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-srec-header .dash-section-title { margin: 0; }

/* Generic muted text in tile body */
.dash-section-muted { color: var(--text-muted); font-size: 0.875rem; }

/* ── Available modules grid ── */
.dash-modules-wrap {
  padding-top: 2.5rem;
  border-top: 1px solid rgba(125,211,252,0.08);
  margin-top: 0.5rem;
  padding-bottom: 2rem;
}
.dash-modules-wrap .portal-section-eyebrow { margin-bottom: 1.25rem; }
.dash-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.dash-module-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(125,211,252,0.12);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s;
}
.dash-module-card:hover { border-color: rgba(125,211,252,0.25); }
.dash-module-header     { padding: 1.25rem 1.5rem 1rem; flex: 1; }
.dash-module-name       { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0 0 0.4rem; }
.dash-module-desc       { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.dash-module-plans      { border-top: 1px solid rgba(125,211,252,0.08); }
.dash-module-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(125,211,252,0.06);
  flex-wrap: wrap;
}
.dash-module-plan:last-child   { border-bottom: none; }
.dash-module-plan-info         { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.dash-module-plan-name         { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.dash-module-plan-price        { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.dash-module-plan-interval     { font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.dash-module-plan--enquire     { justify-content: flex-end; }

@media (max-width: 640px) {
  .dash-module-grid            { grid-template-columns: 1fr; }
  .dash-module-plan            { flex-direction: column; align-items: flex-start; }
  .dash-module-plan--enquire   { align-items: flex-start; }
  .dash-scan-form              { flex-direction: column; }
  .dash-scan-form-profile      { width: 100%; }
  .dash-table                  { font-size: 0.875rem; }
  .dash-site-row               { flex-direction: column; align-items: flex-start; }
  .dash-tile-header            { flex-direction: column; align-items: flex-start; }
}

/* ── Pre-checkout consent modal
   ============================================================ */

.checkout-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.checkout-consent-overlay.hidden {
  display: none;
}
.checkout-consent-modal {
  background: var(--bg-secondary);
  border: 1px solid rgba(125,211,252,0.2);
  border-radius: 8px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}
.checkout-consent-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
}
.checkout-consent-section {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(125,211,252,0.08);
}
.checkout-consent-section:last-of-type {
  border-bottom: none;
}
.checkout-consent-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.checkout-consent-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.checkout-consent-text a,
.checkout-consent-row a {
  color: var(--accent-blue);
  text-decoration: underline;
}
.checkout-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.checkout-consent-checkbox {
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-red, #EE3D43);
}
.checkout-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1.25rem;
}

@media (max-width: 480px) {
  .checkout-consent-modal { padding: 1.5rem 1.25rem; }
  .checkout-consent-actions { flex-direction: column-reverse; align-items: stretch; }
}

/* ── Subscription management ─────────────────────────────────────────────── */
.dash-manage-wrap {
  border-top: 1px solid rgba(125,211,252,0.08);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dash-manage-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.dash-manage-cancel-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--accent-orange, #F5871F);
}
.dash-manage-cancel-notice svg,
.dash-manage-cancel-notice .fa-circle-exclamation { color: var(--accent-orange, #F5871F); }
.dash-manage-feedback {
  font-size: 0.875rem;
  color: var(--accent-red, #EE3D43);
  padding: 0.25rem 0;
}
.dash-manage-feedback.hidden { display: none; }

.btn-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--text-secondary); }

.dash-plan-list {
  margin-top: 0.5rem;
  border: 1px solid rgba(125,211,252,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.dash-plan-list.hidden { display: none; }
.dash-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(125,211,252,0.06);
  flex-wrap: wrap;
}
.dash-plan-row:last-child { border-bottom: none; }
.dash-plan-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dash-plan-row-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}
.dash-plan-row-price {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.dash-confirm-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  width: 100%;
}

/* ── Client-facing event log ────────────────────────────────────────────── */
.dash-event-log-wrap {
  margin-top: 2.5rem;
}
.dash-event-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(125,211,252,0.15);
  margin-left: 0.625rem;
  padding-bottom: 0.5rem;
}
.dash-event-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0 0.75rem 1.25rem;
  position: relative;
}
.dash-event-row:not(:last-child) {
  border-bottom: 1px solid rgba(125,211,252,0.06);
}
.dash-event-dot {
  position: absolute;
  left: -0.45rem;
  top: 1.1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: rgba(125,211,252,0.35);
  border: 2px solid var(--bg-primary);
  flex-shrink: 0;
}

.dash-event-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.dash-event-desc {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.45;
}
.dash-event-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.dash-event-hm {
  opacity: 0.7;
}

/* ── Account settings ─────────────────────────────────────────────────────── */
.dash-account-wrap {
  margin-top: 2.5rem;
}
.dash-account-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(125,211,252,0.12);
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
}
.dash-account-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgba(125,211,252,0.08);
}
.dash-account-row:first-child {
  border-top: none;
}
.dash-account-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-width: 6rem;
  flex-shrink: 0;
}
.dash-account-value {
  font-size: 0.875rem;
  color: var(--text-primary);
}
.dash-changepw-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.25rem 0.5rem;
  border-top: 1px solid rgba(125,211,252,0.08);
}
.dash-changepw-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.dash-changepw-field label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.dash-changepw-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.dash-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #7DC242;
  padding: 0.625rem 1.25rem 0.875rem;
}
.dash-success.hidden { display: none; }



/* -- Security: 2FA + sessions ----------------------------------------------- */
.dash-2fa-badge         { font-size: 0.875rem; padding: 2px 8px; }
.dash-2fa-badge--off    { opacity: 0.55; }
.dash-2fa-panel         { padding: 12px 1.25rem 4px; }
.dash-totp-hint         { margin-bottom: 8px; }
.dash-totp-key          { word-break: break-all; }
.dash-totp-codefield    { margin-top: 12px; }
.dash-totp-input        { max-width: 160px; }
.dash-totp-pw-input     { max-width: 280px; }
.dash-totp-backup-done-btn { margin-top: 12px; }
.dash-sessions-section  { margin-top: 28px; }
.dash-session-row       { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 1.25rem; border-bottom: 1px solid var(--border); }
.dash-session-row:last-child { border-bottom: none; }
.dash-session-meta      { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.dash-session-device    { display: flex; align-items: center; gap: 8px; }
.dash-session-device svg { color: var(--text-muted); flex-shrink: 0; }
.dash-session-browser   { font-size: 0.875rem; color: var(--text-primary); font-weight: 500; }
.dash-session-details   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-session-location  { font-size: 0.8rem; color: var(--text-muted); }
.dash-session-sep       { font-size: 0.75rem; color: var(--text-muted); }
.dash-session-time      { font-size: 0.8rem; color: var(--text-muted); }
.dash-session-current-badge { font-size: 0.75rem; flex-shrink: 0; }
#dash-sessions-loading  { padding: 12px 1.25rem; }
#dash-sessions-list > p { padding: 12px 1.25rem; }
.dash-backup-codes      { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dash-backup-code       { font-family: var(--font-mono); background: rgba(255,255,255,0.06); padding: 4px 10px; border-radius: 4px; letter-spacing: 0.1em; font-size: 0.875rem; }
.totp-input             { letter-spacing: 0.25em; font-size: 1.4rem; text-align: center; }

/* ── Form inputs + selects ────────────────────────────────────────────────── */
.dash-scan-form-select,
.dash-field-input,
.dash-changepw-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid rgba(125,211,252,0.15);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.dash-scan-form-select:focus,
.dash-field-input:focus,
.dash-changepw-input:focus  { border-color: rgba(125,211,252,0.4); }
.dash-scan-form-select      { cursor: pointer; }
.dash-changepw-input        { resize: vertical; min-height: 120px; }

.support-feedback           { display: none; font-size: 0.875rem; padding: 0.375rem 0; }
.support-feedback--ok       { color: #7DC242; }
.support-feedback--error    { color: #EE3D43; }
