/* =========================================================================
   SylForge Labs — design system
   Hand-crafted, dependency-free. Dark / electric-blue brand.
   ========================================================================= */

:root {
  /* Surfaces */
  --bg:           #0a0d14;
  --bg-2:         #0c1018;
  --surface:      #10141f;
  --surface-2:    #141a28;
  --surface-3:    #1a2133;
  --border:       #222a3d;
  --border-bright:#33405b;

  /* Text */
  --text:    #f6f8fc;
  --text-2:  #c6cee0;
  --muted:   #8b94ab;
  --faint:   #69728a;

  /* Brand */
  --accent:        #3b82f6;
  --accent-2:      #60a5fa;
  --accent-3:      #22d3ee;
  --accent-deep:   #2563eb;
  --glow:          rgba(59, 130, 246, 0.45);
  --glow-soft:     rgba(59, 130, 246, 0.18);

  /* Type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Geometry */
  --maxw: 1120px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(59,130,246,0.16), transparent 60%),
    radial-gradient(700px 500px at 8% 4%, rgba(34,211,238,0.10), transparent 55%),
    radial-gradient(1000px 800px at 50% 120%, rgba(37,99,235,0.10), transparent 60%);
  pointer-events: none;
}
/* Faint grid texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
  opacity: 0.6;
}

a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Accessibility helpers */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 14px; top: -60px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }

/* Eyebrow / labels */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 1px var(--glow);
}
.eyebrow.muted { color: var(--muted); }
.eyebrow.muted::before { background: var(--muted); box-shadow: none; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  --_bg: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid var(--border-bright);
  background: var(--_bg);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn:active { transform: translateY(0); }

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover {
  border-color: transparent;
  box-shadow: 0 14px 34px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.03); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* =========================================================================
   Top navigation
   ========================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(10, 13, 20, 0.9); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand .word { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand .word b { color: var(--accent-2); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-staff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.nav-staff:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 8px 22px -10px var(--glow);
}
.nav-staff svg { width: 15px; height: 15px; opacity: 0.85; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner { height: 62px; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding: clamp(64px, 12vw, 132px) 0 clamp(48px, 8vw, 92px); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px 1px rgba(52, 211, 153, 0.7);
}
.hero h1 {
  font-size: clamp(40px, 7.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 24px;
  max-width: 14ch;
}
.gradient-text {
  background: linear-gradient(120deg, var(--accent-2) 10%, var(--accent-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-2);
  max-width: 56ch;
  margin: 0 0 36px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 9px; }
.hero-meta span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--glow);
}

/* =========================================================================
   Section scaffolding
   ========================================================================= */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 16px 0 14px;
}
.section-head p { font-size: clamp(16px, 2vw, 18px); color: var(--muted); margin: 0; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); border: 0; margin: 0; }

/* =========================================================================
   Product cards
   ========================================================================= */
.products { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .products { grid-template-columns: 1fr 1fr; } }

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius-lg);
  padding: 30px 30px 26px;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.product:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,0.8), 0 0 0 1px rgba(59,130,246,0.12);
}
.product:hover::before { opacity: 1; }

.product-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.product-monogram {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-2);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.25);
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
}
.pill-live { color: #6ee7b7; background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.28); }
.pill-live::before { content:""; width:6px; height:6px; border-radius:50%; background:#34d399; box-shadow:0 0 8px rgba(52,211,153,0.8); }
.pill-soon { color: var(--accent-2); background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.25); }

.product h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.product .kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; margin: 0 0 14px; }
.product p.desc { color: var(--text-2); font-size: 15.5px; margin: 0 0 22px; flex: 1; }
.product .features { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; }
.product .features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.product .features li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent-2); }
.product-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--accent-2);
  align-self: flex-start;
}
.product-link svg { width: 16px; height: 16px; transition: transform 0.18s var(--ease); }
.product:hover .product-link svg { transform: translate(3px, -3px); }

/* =========================================================================
   Approach / value grid
   ========================================================================= */
.value-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .value-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }
.value {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.value:hover { border-color: var(--border-bright); background: var(--surface-2); }
.value .ic {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.22);
  color: var(--accent-2);
  margin-bottom: 16px;
}
.value .ic svg { width: 20px; height: 20px; }
.value h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 7px; letter-spacing: -0.01em; }
.value p { font-size: 14px; color: var(--muted); margin: 0; }

/* =========================================================================
   Founder note
   ========================================================================= */
.founder {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(59,130,246,0.10), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(32px, 5vw, 56px);
}
.founder blockquote {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--text);
  max-width: 40ch;
}
.founder blockquote .gradient-text { font-weight: 700; }
.founder-by { display: flex; align-items: center; gap: 14px; }
.founder-by .avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid; place-items: center;
  font-weight: 800; color: #061018; font-size: 16px;
}
.founder-by .who b { display: block; font-size: 15px; }
.founder-by .who span { font-size: 13px; color: var(--muted); }

/* =========================================================================
   Contact band
   ========================================================================= */
.cta-band {
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(800px 400px at 50% -40%, rgba(59,130,246,0.22), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: clamp(40px, 6vw, 72px) 28px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 4.6vw, 46px); letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.cta-band p { font-size: clamp(16px,2vw,18px); color: var(--text-2); margin: 0 auto 30px; max-width: 50ch; }
.cta-band .hero-cta { justify-content: center; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px 28px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer .brand { margin-bottom: 16px; }
.footer .tagline { color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer h4 {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--faint); margin: 0 0 16px; font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer ul a, .footer ul span { color: var(--text-2); font-size: 14px; transition: color 0.15s; }
.footer ul a:hover { color: var(--accent-2); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 12.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.03em;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text-2); }

/* =========================================================================
   Scroll reveal (progressive enhancement)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* =========================================================================
   Auth pages (login)
   ========================================================================= */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: 38px 34px 32px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9);
}
.auth-card .brand { justify-content: center; margin: 0 auto 22px; }
.auth-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; text-align: center; margin: 0 0 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 14.5px; margin: 0 0 28px; }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-2);
  margin-bottom: 7px; letter-spacing: 0.01em;
}
.field input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-bright);
  border-radius: 11px;
  padding: 13px 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-soft);
}
.auth-msg {
  font-size: 13.5px;
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  display: none;
}
.auth-msg.show { display: block; }
.auth-msg.err { color: #fecaca; background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.32); }
.auth-msg.ok  { color: #a7f3d0; background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.32); }
.auth-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--text-2); }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Staff portal
   ========================================================================= */
.staff-shell { min-height: 100vh; display: flex; flex-direction: column; }
.staff-top {
  border-bottom: 1px solid var(--border);
  background: rgba(10,13,20,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.staff-top .nav-inner { height: 66px; }
.staff-user { display: flex; align-items: center; gap: 12px; }
.staff-user .who { text-align: right; line-height: 1.3; }
.staff-user .who b { font-size: 13.5px; display: block; }
.staff-user .who span { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.staff-user .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid; place-items: center; font-weight: 800; color: #061018; font-size: 15px;
}
.staff-main { flex: 1; padding: clamp(32px, 6vw, 60px) 0 80px; }
.staff-hello { margin-bottom: 40px; }
.staff-hello h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; }
.staff-hello p { color: var(--muted); margin: 0; font-size: 16px; }

.tool-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tool:hover { transform: translateY(-3px); border-color: var(--border-bright); box-shadow: 0 18px 40px -22px rgba(0,0,0,0.8); }
.tool .ic {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.22);
  color: var(--accent-2); margin-bottom: 16px;
}
.tool .ic svg { width: 21px; height: 21px; }
.tool h3 { font-size: 16px; font-weight: 700; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; }
.tool h3 .ext { width: 14px; height: 14px; color: var(--muted); }
.tool p { font-size: 13.5px; color: var(--muted); margin: 0; }
.tool .lbl {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 12px;
}

.staff-section-title {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 10px;
}
.staff-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Loading gate */
.gate {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 0.3s var(--ease);
}
.gate .spinner { width: 28px; height: 28px; border-width: 3px; border-top-color: var(--accent-2); }
.gate.hide { opacity: 0; pointer-events: none; }

/* =========================================================================
   Sales hub
   ========================================================================= */
.sales-hello { margin-bottom: 26px; }
.sales-hello .eyebrow { margin-bottom: 12px; }
.sales-hello h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; }
.sales-hello p { color: var(--muted); margin: 0; font-size: 15.5px; }

.stat-row {
  display: grid; gap: 14px; margin-bottom: 36px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(6, 1fr); } }
.stat {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius-sm);
  padding: 16px 16px 14px;
}
.stat .n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.stat.hot .n { color: #fb7185; } .stat.warm .n { color: #fbbf24; } .stat.cool .n { color: #94a3b8; }
.stat.won .n { color: #34d399; }

/* Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--muted);
  padding: 12px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .pill-n { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 7px; }
.panel { display: none; }
.panel.active { display: block; animation: fadein 0.3s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .search {
  flex: 1 1 240px; min-width: 0;
  font-family: var(--sans); font-size: 14.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-bright); border-radius: 10px;
  padding: 11px 14px;
}
.toolbar .search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow-soft); }
.toolbar select {
  font-family: var(--sans); font-size: 13.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border-bright); border-radius: 10px;
  padding: 10px 12px; cursor: pointer;
}
.toolbar select:focus { outline: none; border-color: var(--accent); }
.lead-count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.lead-count b { color: var(--text); }

/* Lead cards */
.lead-list { display: grid; gap: 14px; }
.lead {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.18s var(--ease);
}
.lead:hover { border-color: var(--border-bright); }
.lead.s-won { border-left: 3px solid #34d399; }
.lead.s-interested { border-left: 3px solid #a78bfa; }
.lead.s-contacted { border-left: 3px solid var(--accent); }
.lead.s-lost { opacity: 0.6; }
.lead-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.lead-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0; flex: 1 1 auto; }
.badge { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.badge-hot { color: #fb7185; background: rgba(244,63,94,0.12); border: 1px solid rgba(244,63,94,0.3); }
.badge-warm { color: #fbbf24; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); }
.badge-cool { color: #94a3b8; background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.28); }
.badge-build { color: var(--accent-2); background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); }
.badge-deal { color: #6ee7b7; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22); }
.lead-sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lead-sub span { display: inline-flex; align-items: center; gap: 6px; }
.lead-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lead-contact a, .lead-contact .nolink {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border-bright); background: var(--surface-2);
  color: var(--text-2);
}
.lead-contact a:hover { border-color: var(--accent); color: var(--text); }
.lead-contact svg { width: 14px; height: 14px; opacity: 0.8; }
.lead-oppo { font-size: 14px; color: var(--text-2); margin: 0 0 12px; padding: 11px 14px; background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.16); border-radius: 9px; }
.lead-oppo b { color: var(--accent-2); font-weight: 600; }
.gap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gap { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(251,113,133,0.1); border: 1px solid rgba(251,113,133,0.25); color: #fda4af; }
.lead-more { font-size: 13px; color: var(--muted); }
.lead-more summary { cursor: pointer; color: var(--accent-2); font-weight: 500; padding: 4px 0; user-select: none; }
.lead-more p { margin: 8px 0; }
.lead-more a { color: var(--accent-2); word-break: break-all; }
.lead-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.status-wrap { display: flex; flex-direction: column; gap: 5px; }
.status-wrap label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.status-select { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--surface-3); border: 1px solid var(--border-bright); border-radius: 9px; padding: 8px 12px; cursor: pointer; }
.status-select.v-won { color: #34d399; } .status-select.v-interested { color: #c4b5fd; }
.status-select.v-contacted { color: var(--accent-2); } .status-select.v-lost { color: #fca5a5; }
.notes-wrap { flex: 1 1 220px; display: flex; flex-direction: column; gap: 5px; }
.notes-wrap label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.notes-wrap textarea {
  font-family: var(--sans); font-size: 13.5px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border-bright); border-radius: 9px; padding: 9px 12px; resize: vertical; min-height: 40px; width: 100%;
}
.notes-wrap textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow-soft); }
.save-state { font-size: 11.5px; color: var(--muted); height: 14px; }
.save-state.ok { color: #6ee7b7; }

/* Resource docs (rendered markdown) */
.doc { max-width: 820px; font-size: 15px; color: var(--text-2); line-height: 1.7; }
.doc h1, .doc h2, .doc h3 { color: var(--text); letter-spacing: -0.01em; line-height: 1.25; }
.doc h1 { font-size: 26px; margin: 0 0 16px; }
.doc h2 { font-size: 20px; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 16px; margin: 22px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--accent-2); }
.doc strong { color: var(--text); }
.doc code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; color: var(--accent-2); }
.doc blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.doc th, .doc td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* Mockups panel */
.mock-intro { max-width: 70ch; color: var(--text-2); margin: 0 0 22px; }
.mock-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mock-grid { grid-template-columns: 1fr 1fr; } }
.mock {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 16px 18px; transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.mock:hover { transform: translateY(-2px); border-color: var(--accent); }
.mock .mi { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.mock h3 { font-size: 15.5px; margin: 0 0 3px; }
.mock p { font-size: 13px; color: var(--muted); margin: 0; }

/* =========================================================================
   Lead list rows (clickable) + dedicated lead detail view
   ========================================================================= */
.lead-row {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.lead-row:hover { border-color: var(--accent); transform: translateX(2px); box-shadow: 0 6px 18px -12px rgba(0,0,0,0.7); }
.lead-row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.score-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--border-bright); }
.score-dot.d-hot  { background: #fb7185; box-shadow: 0 0 8px rgba(244,63,94,0.6); }
.score-dot.d-warm { background: #fbbf24; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.score-dot.d-cool { background: #94a3b8; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.lead-row:hover .chev { color: var(--accent-2); }

.status-pill { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--border-bright); color: var(--muted); }
.status-pill.p-contacted  { color: var(--accent-2); border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.08); }
.status-pill.p-interested { color: #c4b5fd; border-color: rgba(167,139,250,0.4); background: rgba(167,139,250,0.08); }
.status-pill.p-won  { color: #34d399; border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.08); }
.status-pill.p-lost { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.06); }

/* Detail */
.lead-detail { animation: fadein 0.25s var(--ease); }
.detail-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.detail-pager { display: flex; align-items: center; gap: 8px; }
.detail-pager .pos { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 4px; }
.btn.icon { padding: 0; width: 38px; height: 38px; }
.btn.icon svg { width: 18px; height: 18px; }
#detail-back svg { width: 16px; height: 16px; }
.detail-head { margin-bottom: 22px; }
.detail-name { font-size: clamp(23px, 3.5vw, 32px); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 10px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.detail-loc { color: var(--muted); font-size: 14px; margin: 0; }
.contact-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 26px; }
@media (min-width: 560px) { .contact-actions { grid-template-columns: repeat(3, 1fr); } }
.contact-btn {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border-bright); background: var(--surface-2);
  border-radius: 12px; padding: 14px 16px; color: var(--text);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.contact-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-btn.disabled { opacity: 0.55; pointer-events: none; }
.contact-btn > svg { width: 20px; height: 20px; color: var(--accent-2); flex: none; }
.contact-btn span { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.contact-btn span b { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 1px; }

.detail-section { margin-bottom: 24px; }
.detail-section > h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.detail-work { border: 1px solid var(--border-bright); border-radius: var(--radius); padding: 20px; background: rgba(59,130,246,0.04); }
.work-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.work-row .notes-wrap { flex: 1 1 240px; }
.work-row .notes-wrap textarea { min-height: 92px; }
.detail-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
@media (min-width: 560px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-field { display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; background: var(--surface); }
.detail-field .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.detail-field .v { font-size: 14px; color: var(--text-2); }
.detail-section .research { font-size: 14.5px; color: var(--text-2); line-height: 1.7; margin: 0 0 12px; }
.detail-section .sources { font-size: 13px; color: var(--muted); margin: 0; }
.detail-section .sources a { color: var(--accent-2); word-break: break-all; }

/* =========================================================================
   Quote builder
   ========================================================================= */
.q-intro { color: var(--text-2); font-size: 15px; max-width: 72ch; margin: 0 0 18px; }
.q-modes { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 24px; }
.q-mode { appearance: none; border: 0; background: transparent; cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--muted); padding: 9px 16px; border-radius: 9px; transition: background 0.15s, color 0.15s; }
.q-mode.active { background: var(--surface-3); color: var(--text); }
.q-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 860px) { .q-grid { grid-template-columns: 1.5fr 1fr; } }
.q-section > h3 { font-size: 14px; font-weight: 700; margin: 22px 0 10px; letter-spacing: -0.01em; }
.q-section > h3:first-child { margin-top: 0; }
.qopts { display: grid; gap: 10px; }
.qopt { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 11px; padding: 13px 15px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.qopt:hover { border-color: var(--border-bright); }
.qopt input[type="radio"], .qopt input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; cursor: pointer; }
.qopt:has(input:checked) { border-color: var(--accent); background: rgba(59,130,246,0.07); }
.qopt-body { flex: 1; min-width: 0; }
.qopt-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.qopt-name { font-size: 14.5px; font-weight: 600; }
.qopt-price { font-size: 13.5px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.qopt-price em { font-style: normal; color: var(--muted); font-weight: 500; }
.qopt-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.qopt-desc em { font-style: normal; color: var(--accent-2); }
.tag-pop { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #6ee7b7; background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); padding: 2px 6px; border-radius: 999px; vertical-align: middle; }
.qopt-qty .qty { width: 58px; align-self: center; font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border-bright); border-radius: 8px; padding: 7px 8px; }

.q-summary { border: 1px solid var(--border-bright); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); padding: 22px; position: sticky; top: 86px; }
.q-summary > h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.q-lines { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.q-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.q-lines .q-l-price { color: var(--text); font-weight: 600; white-space: nowrap; }
.q-empty { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.q-totals { border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 8px; margin-bottom: 14px; }
.q-total { display: flex; justify-content: space-between; align-items: baseline; }
.q-total span { font-size: 13px; color: var(--muted); }
.q-total b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.q-total.mo b { color: var(--accent-2); }
.q-note { font-size: 11.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.q-sched { border-top: 1px dashed var(--border); padding-top: 12px; margin-bottom: 14px; }
.q-sched h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 9px; }
.q-sched ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.q-sched li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.q-sched li b { color: var(--accent-2); white-space: nowrap; font-weight: 700; }
.qopt-desc select {
  font-family: var(--sans); font-size: 13px; color: var(--text);
  background: var(--surface-3); border: 1px solid var(--border-bright); border-radius: 7px;
  padding: 4px 8px; margin: 0 2px; cursor: pointer;
}
.qopt-desc select:focus { outline: none; border-color: var(--accent); }

/* Number of locations (custom tab) */
.q-locs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-loc { appearance: none; cursor: pointer; font-family: var(--sans); font-size: 14.5px; font-weight: 700;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  min-width: 44px; padding: 9px 14px; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.q-loc:hover { border-color: var(--border-bright); }
.q-loc.active { border-color: var(--accent); background: rgba(59,130,246,0.1); color: var(--text); }
.q-loc-input { width: 72px; font-family: var(--sans); font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-bright); border-radius: 9px; padding: 9px 10px; }
.q-loc-input:focus { outline: none; border-color: var(--accent); }
.q-loc-note { font-size: 12px; color: var(--muted); margin: 9px 0 0; line-height: 1.5; }
.q-loc-note b { color: var(--accent-2); font-weight: 700; }

/* Star a lead (Leads list + detail) */
.lead-star { appearance: none; border: 0; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); padding: 4px 6px; border-radius: 8px; flex: none; transition: color 0.15s, transform 0.1s; }
.lead-star:hover { color: #f5c518; }
.lead-star.on { color: #f5c518; }
.lead-star:active { transform: scale(1.25); }
.detail-star { font-size: 22px; padding: 2px 6px; vertical-align: middle; }
.stat.star .n { color: #f5c518; }

/* Manager/owner discount on a pending deal */
.deal-discount { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 12px 0 2px; font-size: 13.5px; color: var(--text-2); }
.deal-discount label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.disc-input { width: 64px; font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border-bright); border-radius: 8px; padding: 6px 8px; }
.disc-input:focus { outline: none; border-color: var(--accent); }
.disc-preview { color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.disc-note { color: var(--muted); font-size: 11.5px; }

/* Site traffic dashboard (staff) */
.traffic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.traffic-card { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.traffic-card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.traffic-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.traffic-card li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.traffic-card li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traffic-card li b { color: var(--text); white-space: nowrap; font-weight: 700; }
.traffic-card .muted { color: var(--muted); font-size: 13px; margin: 0; }

/* Your account / profile (staff) */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.profile-grid > div { display: flex; flex-direction: column; gap: 3px; }
.profile-grid .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.profile-grid .v { font-size: 15px; color: var(--text); font-weight: 600; word-break: break-word; }
.pw-details summary { cursor: pointer; color: var(--accent-2); font-weight: 600; padding: 4px 0; }
.pw-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.pw-form input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 220px; }

/* Clickable lead stat cards + de-emphasized lost rows (sales hub) */
#stats .stat { cursor: pointer; transition: border-color .12s ease, transform .12s ease; }
#stats .stat:hover { border-color: var(--accent-2, #3b82f6); transform: translateY(-1px); }
#stats .stat:focus-visible { outline: 2px solid var(--accent-2, #3b82f6); outline-offset: 2px; }
.lead-row.is-lost { opacity: .5; }
.lead-row.is-lost:hover { opacity: .85; }

/* Feedback tab (rep form + admin inbox) */
.fb-form { display: flex; flex-direction: column; gap: 8px; max-width: 580px; }
.fb-form label { font-weight: 600; font-size: 14px; margin-top: 6px; }
.fb-form select, .fb-form textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.fb-form textarea { resize: vertical; }
.fb-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.fb-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; max-width: 580px; }
.fb-item-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.fb-cat { font-weight: 700; color: var(--text); }
.fb-seen { color: var(--accent-2, #3b82f6); }
.fb-msg { font-size: 14px; white-space: pre-wrap; }
.fb-admin { border: 1px solid var(--border); border-left: 3px solid var(--accent-2, #3b82f6); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.fb-admin.seen { border-left-color: var(--border); opacity: .65; }
.fb-admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.fb-admin-msg { font-size: 14px; white-space: pre-wrap; color: var(--text); }
.fb-seen-tag { color: var(--muted); font-size: 12px; }
.fb-mark { padding: 5px 12px; font-size: 12.5px; }

/* =========================================================================
   Demo sites (shareable)
   ========================================================================= */
.demo-tip { font-size: 13px; color: var(--muted); margin: 14px 0 0; padding: 11px 14px; background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.16); border-radius: 9px; }
.demo-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .demo-grid { grid-template-columns: 1fr 1fr; } }
.demo-card { display: flex; gap: 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 16px; }
.demo-card .mi { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.demo-info { flex: 1; min-width: 0; }
.demo-info h3 { font-size: 15.5px; margin: 0 0 3px; }
.demo-info p { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.demo-actions { display: flex; gap: 8px; }
.demo-actions .btn { padding: 8px 14px; font-size: 13.5px; }
.copy-link.copied { border-color: #34d399; color: #6ee7b7; }
.demo-url { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================================
   Billing workflow: rep notice, bill-this-deal form, deals + approvals
   ========================================================================= */
.flow-note {
  border: 1px solid rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.07);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 28px;
}
.flow-note b { color: var(--text); }

.bill-box {
  margin-top: 26px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 22px;
}
.bill-box h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.bill-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.bill-grid { display: grid; grid-template-columns: 1fr; gap: 12px 14px; margin-bottom: 16px; }
@media (min-width: 700px) { .bill-grid { grid-template-columns: 1fr 1fr; } }
.bill-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bill-actions .save-state { font-size: 13px; height: auto; }

.deal-list { display: grid; gap: 14px; }
.deal-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--radius);
  padding: 18px 20px;
}
.deal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.deal-head b { font-size: 16px; letter-spacing: -0.01em; }
.deal-sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.deal-amts { font-size: 14px; color: var(--text-2); margin: 0 0 10px; }
.deal-amts b { color: var(--accent-2); }
.deal-sched { list-style: none; padding: 10px 14px; margin: 0 0 10px; display: grid; gap: 6px; background: rgba(59,130,246,0.05); border: 1px solid rgba(59,130,246,0.14); border-radius: 9px; }
.deal-sched li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.deal-sched li b { color: var(--text); white-space: nowrap; }
.deal-extra { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.deal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.deal-actions .save-state { height: auto; }
.bill-lead-hint {
  font-size: 12.5px; color: #6ee7b7; margin: 0 0 14px;
  padding: 8px 12px; background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25); border-radius: 8px;
}
.deal-comm { font-size: 13px; color: #6ee7b7; margin: 0 0 10px; }

/* =========================================================================
   Two-factor auth: enrollment, re-auth modal, recovery control
   ========================================================================= */
.twofa-steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.twofa-steps li { margin-bottom: 6px; }
.qr-box {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 12px; padding: 14px; width: 208px; height: 208px;
  margin: 0 auto 14px; box-sizing: border-box;
}
.qr-box svg, .qr-box img { width: 180px; height: 180px; display: block; }
.twofa-manual { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0 0 18px; line-height: 1.7; }
.twofa-manual code {
  font-family: var(--mono); font-size: 13px; color: var(--accent-2); letter-spacing: 1px;
  background: var(--surface-3); padding: 4px 8px; border-radius: 6px; word-break: break-all;
}

.reauth-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(5,8,14,0.72); backdrop-filter: blur(3px); padding: 20px;
}
.reauth-overlay[hidden] { display: none; }
.reauth-modal {
  width: 100%; max-width: 380px; background: var(--surface-2, #12161f);
  border: 1px solid var(--border-bright, #2a3340); border-radius: 16px; padding: 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.reauth-modal h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.reauth-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.reauth-modal input {
  width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 22px; letter-spacing: 8px;
  text-align: center; padding: 12px; border-radius: 10px; border: 1px solid var(--border-bright);
  background: var(--surface-3); color: var(--text); margin-bottom: 16px;
}
.reauth-modal input:focus { outline: none; border-color: var(--accent); }
.reauth-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Account modal behind the avatar (reuses the reauth modal shell) */
.reauth-modal.profile-modal { max-width: 460px; position: relative; }
.profile-modal .modal-x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px; }
.profile-modal .modal-x:hover { color: var(--text); }
#user-avatar { cursor: pointer; transition: transform .12s ease; }
#user-avatar:hover { transform: scale(1.05); }

.sec-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: 13.5px; color: var(--text-2);
}
.sec-tools .sec-label { color: var(--muted); }
.sec-tools select {
  font-family: var(--sans); font-size: 13.5px; color: var(--text);
  background: var(--surface-3); border: 1px solid var(--border-bright); border-radius: 8px;
  padding: 7px 10px; cursor: pointer;
}
.sec-tools select:focus { outline: none; border-color: var(--accent); }

/* Manager team view */
.panel-h { font-size: 17px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.panel-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.team-list { display: grid; gap: 10px; }
.team-member {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 18px;
}
.team-member .tm-id { font-size: 14px; }
.member-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.member-state { font-size: 12px; }
.member-state.ok { color: #6ee7b7; }
.deal-comm b { color: #34d399; }
.comm-details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.comm-details summary {
  cursor: pointer; user-select: none; padding: 13px 18px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.comm-details[open] summary { border-bottom: 1px solid var(--border); }
.comm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.comm-table th, .comm-table td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.comm-table th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.comm-table td b { color: #34d399; }
.comm-table tfoot td { color: var(--text-2); }
.comm-table tfoot tr:last-child td { border-bottom: none; }
.comm-table tfoot tr:last-child td b { color: var(--accent-2); }
