/* CredSide — official online brand system (brand_tokens.json) */

:root {
  /* Core palette */
  --midnight: #070B12;
  --navy: #0B1424;
  --navy2: #101B2D;
  --ivory: #F7F3E8;
  --white: #FFFFFF;
  --positive: #32F078;
  --positive-deep: #14B85F;
  --blue: #20B7FF;
  --steel: #8A94A6;
  --slate: #4D5668;
  --line-brand: #253044;
  --red: #FF4D4D;
  --gold: #F2C75C;

  /* App tokens */
  --bg-deep: var(--midnight);
  --bg-elevated: var(--navy);
  --surface: rgba(16, 27, 45, 0.78);
  --surface-solid: var(--navy2);
  --surface-hover: rgba(16, 27, 45, 0.95);
  --line: rgba(37, 48, 68, 0.95);
  --line-strong: var(--line-brand);
  --text: var(--ivory);
  --text-secondary: var(--steel);
  --text-tertiary: var(--slate);
  --emerald: var(--positive);
  --emerald-bright: var(--positive);
  --emerald-dim: rgba(50, 240, 120, 0.12);
  --positive-muted: rgba(50, 240, 120, 0.08);
  --positive-border: rgba(50, 240, 120, 0.18);
  --positive-border-strong: rgba(50, 240, 120, 0.35);
  --positive-glow: rgba(50, 240, 120, 0.35);
  --positive-on-dark: #07100b;
  --ivory-soft: rgba(247, 243, 232, 0.95);
  --rose: var(--red);
  --rose-dim: rgba(255, 77, 77, 0.12);
  --gold-dim: rgba(242, 199, 92, 0.12);
  --indigo: var(--blue);
  --indigo-dim: rgba(32, 183, 255, 0.12);
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(50, 240, 120, 0.1), 0 24px 60px rgba(50, 240, 120, 0.08);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --font-ui: "Inter", Arial, Helvetica, sans-serif;
  --font-display: "Inter", Arial, Helvetica, sans-serif;
  --sidebar-width: 292px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }

.hidden { display: none !important; }

/* Ambient background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.ambient-orb-a {
  width: 55vw;
  height: 55vw;
  top: -18vw;
  right: -12vw;
  background: radial-gradient(circle, rgba(50, 240, 120, 0.18), transparent 68%);
}

.ambient-orb-b {
  width: 45vw;
  height: 45vw;
  bottom: -20vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(32, 183, 255, 0.12), transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black, transparent);
}

/* Banners */
.demo-banner,
.live-banner {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 11px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.demo-banner {
  background: rgba(50, 240, 120, 0.06);
}

.live-banner {
  background: rgba(32, 183, 255, 0.08);
}

.demo-banner strong { color: var(--positive); }
.live-banner strong { color: var(--blue); }
.demo-banner span,
.live-banner span {
  color: var(--text-secondary);
  max-width: 920px;
  line-height: 1.45;
}

/* App shell */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 24px;
  border-right: 1px solid var(--line-brand);
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.96), rgba(11, 20, 36, 0.92));
  backdrop-filter: blur(28px) saturate(140%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 8px 18px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.brand-wordmark {
  width: min(100%, 148px);
  height: auto;
  display: block;
}

.hero-split-label {
  display: flex;
  justify-content: space-between;
  max-width: 360px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--steel);
  margin-bottom: 8px;
}

.hero-split-label .text-positive-side {
  color: var(--positive);
}

.hero-split-label .text-negative-side {
  color: var(--red);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-name .cred { color: var(--ivory); }
.brand-name .side { color: var(--positive); }

.tag {
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.35;
  max-width: 180px;
  margin-top: 2px;
}

.nav-group-label {
  padding: 14px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-compact { margin-bottom: 4px; }

.nav-item {
  position: relative;
  text-align: left;
  padding: 11px 14px 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition);
  font-weight: 600;
  font-size: 14px;
}

.nav-glow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--positive), var(--positive-deep));
  transition: height var(--transition), box-shadow var(--transition);
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.nav-item.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(50, 240, 120, 0.1), rgba(32, 183, 255, 0.05));
  border-color: rgba(50, 240, 120, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-item.active .nav-glow {
  height: 18px;
  box-shadow: 0 0 16px rgba(50, 240, 120, 0.55);
}

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(16, 22, 34, 0.95), rgba(8, 11, 17, 0.95));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.sidebar-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 15px;
}

.sidebar-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.sidebar-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.status-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--positive);
  background: var(--emerald-dim);
  border: 1px solid rgba(50, 240, 120, 0.16);
}

/* Main content */
.main {
  padding: 24px 32px 48px;
  max-width: 1280px;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.topbar-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.topbar-title {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}

.ghost-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-btn.full { width: 100%; margin-top: 8px; }

/* Screens */
.screen { display: none; }
.screen.active {
  display: block;
  animation: screenIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.mini-label,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--positive);
  font-size: 11px;
  font-weight: 700;
}

.hero-logo {
  width: min(100%, 360px);
  height: auto;
  margin-bottom: 8px;
  border-radius: 20px;
}

h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}

h1 em {
  font-style: normal;
}

.text-negative {
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 77, 77, 0.22);
}

.text-positive {
  color: var(--positive);
  text-shadow: 0 0 40px rgba(50, 240, 120, 0.18);
}

h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

p { color: var(--text-secondary); line-height: 1.6; margin: 0; }

.section-head {
  margin-bottom: 28px;
  max-width: 820px;
}

.section-head h1 { font-size: clamp(32px, 4vw, 52px); }

/* Hero */
.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 340px);
  gap: 28px;
  align-items: stretch;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--midnight) 0%, var(--navy2) 100%);
  border: 1px solid var(--line-brand);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.premium-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(50, 240, 120, 0.08), transparent 42%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.badge-emerald {
  color: var(--positive);
  background: var(--emerald-dim);
  border-color: rgba(50, 240, 120, 0.22);
}

.hero-copy {
  font-size: 16px;
  max-width: 640px;
  margin-top: 4px;
}

.hero-actions,
.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.trust-strip span {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.trust-strip span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(50, 240, 120, 0.5);
}

/* Readiness ring widget */
.readiness-widget {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(4, 7, 12, 0.65);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.score-ring {
  --score: 0;
  position: relative;
  width: 196px;
  height: 196px;
}

.score-ring-track,
.score-ring-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.score-ring-track {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.score-ring-fill {
  background: conic-gradient(
    from 210deg,
    var(--positive) 0deg,
    var(--positive-deep) calc(var(--score) * 3.6deg),
    rgba(37, 48, 68, 0.65) calc(var(--score) * 3.6deg)
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
  transition: background 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-ring-core {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(14, 19, 28, 0.98), rgba(6, 9, 14, 0.98));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 40px rgba(50, 240, 120, 0.06);
}

.score-ring-core strong {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.score-ring-core span {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.readiness-caption {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  max-width: 220px;
}

.readiness-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.readiness-meta div {
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.readiness-meta small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.readiness-meta strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
}

/* Buttons */
.primary,
.secondary {
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}

.primary {
  color: #07100b;
  background: var(--positive);
  box-shadow: 0 12px 32px rgba(50, 240, 120, 0.22);
}

.primary:hover {
  transform: translateY(-1px);
  background: var(--positive-deep);
  box-shadow: 0 16px 40px rgba(50, 240, 120, 0.28);
}

.primary.glow {
  box-shadow: 0 0 0 1px rgba(50, 240, 120, 0.3), 0 16px 40px rgba(50, 240, 120, 0.25);
}

.primary.compact {
  padding: 10px 18px;
  font-size: 13px;
}

.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.full { width: 100%; margin-top: 12px; }
button:disabled { opacity: 0.55; cursor: wait; }

/* Grid & cards */
.grid {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.metric-card,
.panel,
.notice {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.metric-card:hover,
.panel:hover {
  border-color: var(--line-strong);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.metric-accent-a { box-shadow: inset 0 1px 0 rgba(251, 113, 133, 0.15); }
.metric-accent-b { box-shadow: inset 0 1px 0 rgba(129, 140, 248, 0.15); }
.metric-accent-c { box-shadow: inset 0 1px 0 rgba(50, 240, 120, 0.15); }

.metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--emerald-bright);
  background: var(--emerald-dim);
  border: 1px solid rgba(50, 240, 120, 0.14);
}

.metric-accent-a .metric-icon { color: var(--rose); background: var(--rose-dim); border-color: rgba(251, 113, 133, 0.14); }
.metric-accent-b .metric-icon { color: var(--indigo); background: var(--indigo-dim); border-color: rgba(129, 140, 248, 0.14); }

.metric-card span {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric-card small { color: var(--text-tertiary); font-size: 13px; line-height: 1.45; }

.panel { margin-top: 22px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 4px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.steps div {
  padding: 20px;
  min-height: 130px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  transition: var(--transition);
}

.steps div:hover {
  border-color: rgba(50, 240, 120, 0.18);
  transform: translateY(-2px);
}

.steps b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--emerald-bright);
  background: var(--emerald-dim);
  border: 1px solid rgba(50, 240, 120, 0.16);
}

.steps span { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

/* Forms */
label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 14px 0 0;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 8px;
  color: var(--text);
  background: rgba(4, 7, 12, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(50, 240, 120, 0.35);
  box-shadow: 0 0 0 3px rgba(50, 240, 120, 0.1);
}

textarea { min-height: 130px; resize: vertical; }
input[type="file"] { padding: 12px; }

.waitlist-form,
.feedback-form { display: grid; gap: 4px; max-width: 520px; }

.consent-panel { display: grid; gap: 16px; max-width: 760px; }
.consent-checklist { display: grid; gap: 12px; }

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  transition: var(--transition);
}

.check-row:has(input:checked) {
  border-color: rgba(50, 240, 120, 0.22);
  background: rgba(50, 240, 120, 0.05);
  color: var(--text);
}

.check-row input { margin-top: 3px; width: auto; accent-color: var(--emerald); }

.status-box,
.small-output,
.pricing-output {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(4, 7, 12, 0.85);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  font-size: 13px;
}

.small-output.success {
  color: var(--emerald-bright);
  border-color: rgba(50, 240, 120, 0.28);
  background: rgba(50, 240, 120, 0.08);
}

.small-output.error {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.08);
}

.small-output.busy {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(129, 140, 248, 0.08);
}

.account-feedback {
  margin: 14px 0 4px;
  min-height: 48px;
  font-weight: 600;
}

/* Provider & upload */
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.provider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }

.provider-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  transition: var(--transition);
}

.provider-card:hover {
  border-color: rgba(50, 240, 120, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.provider-card h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.provider-card p { margin: 0; font-size: 13px; }

.connections-list { display: grid; gap: 12px; }

.connection-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(4, 7, 12, 0.7);
  border: 1px solid var(--line);
}

/* Flags & plans */
.flag-list,
.plan-list { display: grid; gap: 16px; }

.client-intel-panel { margin: 16px 0 24px; }
.client-intel-panel h3 { margin: 16px 0 8px; font-size: 1rem; }
.insight-list,
.action-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 8px; }

.assistant-dashboard { margin-bottom: 24px; }
.assistant-dash-head h2 { margin: 0 0 6px; }
.assistant-dash-head p { margin: 0 0 16px; color: var(--muted, #9aa4b2); }
.assistant-dash-metrics { margin: 16px 0; }
.assistant-dash-summary { margin: 16px 0; white-space: pre-wrap; }
.assistant-dash-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0; }
.assistant-dash-columns h3 { margin: 0 0 8px; font-size: 0.95rem; }
.assistant-dash-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.assistant-dash-packet { border-left: 3px solid var(--accent, #34d399); }

.finish-link {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--accent, #34d399);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 12px;
  text-decoration: none;
}
.finish-link:hover { background: rgba(52, 211, 153, 0.14); }

.finish-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(6px);
}
.finish-modal-card {
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 16px;
  background: var(--panel, #0f1623);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.finish-modal-card h2 { margin: 8px 0 12px; }
.finish-checklist { margin: 16px 0; padding-left: 1.25rem; display: grid; gap: 8px; color: var(--muted, #9aa4b2); }
.finish-modal-actions { display: grid; gap: 10px; margin-top: 20px; }

@media (max-width: 720px) {
  .assistant-dash-columns { grid-template-columns: 1fr; }
}

.flag-card,
.plan-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: var(--transition);
}

.flag-card:hover { border-color: var(--line-strong); }
.flag-card.high { border-left: 3px solid var(--rose); }
.flag-card.medium { border-left: 3px solid var(--gold); }
.flag-card.low { border-left: 3px solid var(--emerald); }

.flag-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.flag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.flag-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.flag-upload-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.flag-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.flag-status.success { color: var(--positive); }

.hidden-file { display: none; }

.review-workflow {
  margin-top: 8px;
  color: var(--text-secondary);
  max-width: 760px;
}

.pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pill.high { background: var(--rose-dim); color: var(--rose); }
.pill.medium { background: var(--gold-dim); color: var(--gold); }
.pill.low { background: var(--emerald-dim); color: var(--emerald-bright); }

/* Chat */
.chat-panel {
  max-width: 920px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.chat-messages {
  padding: 24px;
  min-height: 440px;
  max-height: 560px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bubble {
  max-width: 78%;
  padding: 14px 18px;
  border-radius: 20px;
  line-height: 1.55;
  font-size: 14px;
}

.bot {
  background: rgba(4, 7, 12, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.user {
  background: linear-gradient(135deg, var(--ivory-soft), var(--positive));
  color: var(--positive-on-dark);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  font-weight: 500;
}

.chat-input {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 12, 0.9);
}

.chat-input input { margin: 0; }

.letter-panel pre {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  background: rgba(4, 7, 12, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  color: #dce6f5;
  font-size: 13px;
  line-height: 1.6;
}

/* Timeline / proof */
.timeline { display: grid; gap: 14px; }

.timeline-item {
  position: relative;
  padding: 20px 20px 20px 54px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 6px var(--emerald-dim), 0 0 20px rgba(50, 240, 120, 0.35);
}

.timeline-item.open::before {
  background: var(--gold);
  box-shadow: 0 0 0 6px var(--gold-dim), 0 0 20px rgba(242, 199, 92, 0.25);
}

.proof-actions { margin-top: 12px; }

/* Admin */
.admin-table { display: grid; gap: 10px; font-size: 13px; line-height: 1.45; }

.admin-row {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(4, 7, 12, 0.75);
  border: 1px solid var(--line);
}

.checklist-panel ul { color: var(--text-secondary); line-height: 1.75; padding-left: 18px; }

.access-wall {
  border-color: rgba(50, 240, 120, 0.22);
  background: linear-gradient(160deg, rgba(50, 240, 120, 0.08), rgba(14, 19, 28, 0.92));
  box-shadow: var(--shadow-glow);
}

.access-wall-head h2 { margin-top: 12px; }

.access-steps {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.access-steps li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(4, 7, 12, 0.55);
  color: var(--text-secondary);
  font-weight: 600;
}

.access-steps li span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.access-steps li small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.access-steps li.done {
  border-color: rgba(50, 240, 120, 0.18);
  color: var(--text-tertiary);
}

.access-steps li.done span {
  background: var(--emerald-dim);
  color: var(--emerald-bright);
}

.access-steps li.current {
  border-color: rgba(50, 240, 120, 0.35);
  background: rgba(50, 240, 120, 0.08);
  color: var(--text);
}

.access-steps li.current span {
  background: linear-gradient(135deg, var(--ivory-soft), var(--positive));
  color: var(--positive-on-dark);
}

.connect-locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.15);
  user-select: none;
}

.connect-locked::after {
  content: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-panel,
  .premium-hero,
  .grid.three,
  .steps { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-card { margin-top: 12px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-group-label { grid-column: 1 / -1; }
  .main { padding: 20px 18px 40px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .grid.two,
  .upload-grid { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav { grid-template-columns: 1fr; }
  .hero-panel,
  .premium-hero { padding: 22px; border-radius: var(--radius-lg); }
  h1 { font-size: 34px; }
  .bubble { max-width: 92%; }
  .chat-input { flex-direction: column; }
  .trust-strip { flex-direction: column; gap: 8px; }
}
