/* ═══════════════════════════════════════════════════════════
   AGENTIA — Design System 2.0
   Palette : Obsidian · Indigo · Émeraude
   Typo    : Inter (corps) · Fraunces (display)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ─── Backgrounds ──────────────────────────────────────── */
  --bg-deep:     #03040b;
  --bg-surface:  #080b16;
  --bg-elevated: #0d1020;
  --bg-card:     #111426;
  --bg-hover:    rgba(255,255,255,0.04);

  /* ─── Borders ──────────────────────────────────────────── */
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --border-accent: rgba(99,102,241,0.4);

  /* ─── Text ─────────────────────────────────────────────── */
  --text:       #edf0fb;
  --text-muted: #8b94ae;
  --text-soft:  #4e5872;

  /* ─── Brand / Accent ───────────────────────────────────── */
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-soft:  rgba(99,102,241,0.12);
  --accent-glow:  rgba(99,102,241,0.28);

  /* ─── Status ───────────────────────────────────────────── */
  --success: #34d399;
  --warning: #fbbf24;
  --danger:  #f87171;

  /* ─── Gradients ────────────────────────────────────────── */
  --gradient-brand:  linear-gradient(135deg, #6366f1, #818cf8);
  --gradient-hero:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(99,102,241,0.18), transparent 62%),
    radial-gradient(ellipse 40% 30% at 85% 25%, rgba(52,211,153,0.06), transparent 55%);

  /* ─── Typography ───────────────────────────────────────── */
  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  /* ─── Radii ────────────────────────────────────────────── */
  --radius-xs: 4px;
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 30px;

  /* ─── Shadows ──────────────────────────────────────────── */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
  --shadow:     0 12px 40px rgba(0,0,0,0.45);
  --shadow-lg:  0 24px 72px rgba(0,0,0,0.55);
  --shadow-accent: 0 8px 28px rgba(99,102,241,0.28);

  /* ─── Motion ───────────────────────────────────────────── */
  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* ────────────────────────────────────────────────────────────
   RESET & BASE
   ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }

p { margin: 0; }

/* ────────────────────────────────────────────────────────────
   LAYOUT
   ──────────────────────────────────────────────────────────── */
#app { min-height: 100vh; display: flex; flex-direction: column; }

.view {
  flex: 1;
  padding: 2.25rem 2.5rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
   TOPBAR
   ──────────────────────────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem 2rem;
  padding: 0 2.5rem;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(3,4,11,0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
}

.topnav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.topnav a:hover { color: var(--text); background: var(--bg-hover); }
.topnav a.active { color: var(--text); }

.topnav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.topnav-actions .btn-nav-cta {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* Guest mode */
body.is-guest .topnav { display: none; }
body.is-guest .footer-premium .footer-col { display: none; }
body.is-guest .footer-premium .footer-grid { grid-template-columns: 1fr; }
body.is-guest .topbar { grid-template-columns: auto 1fr; }
body.is-guest .topnav-actions { justify-content: flex-end; }

/* ────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────── */
.footer {
  padding: 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
  text-align: center;
}

.footer-premium {
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem 1.75rem;
  background: var(--bg-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-brand-col .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 28ch;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--text-soft);
  font-size: 0.875rem;
  margin-bottom: 0.55rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-link-muted { color: var(--text-soft); }

.footer-bottom {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0.7rem 1.35rem;
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.38);
  filter: brightness(1.06);
}

.btn-primary:active { transform: translateY(0); filter: brightness(0.97); }

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border);
}

.btn-danger {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  color: var(--danger);
}

.btn-danger:hover { background: rgba(248,113,113,0.2); }

.btn-block { width: 100%; }

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-nav-cta { white-space: nowrap; }

.btn-glow { box-shadow: 0 0 20px var(--accent-glow); }
.btn-glow:hover { box-shadow: 0 0 32px rgba(99,102,241,0.45); }

/* ────────────────────────────────────────────────────────────
   FORM INPUTS
   ──────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder, textarea::placeholder { color: var(--text-soft); }

/* ────────────────────────────────────────────────────────────
   CARDS
   ──────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* ────────────────────────────────────────────────────────────
   CHIPS
   ──────────────────────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover,
.chip.active {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-soft);
}

/* ────────────────────────────────────────────────────────────
   HERO / HOME
   ──────────────────────────────────────────────────────────── */
.hero-page {
  background: var(--gradient-hero);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.08);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 16ch;
  background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0 auto 2.75rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-form {
  width: min(680px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.06);
}

.hero-form textarea {
  width: 100%;
  min-height: 110px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 1rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
}

.hero-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Stats / Social proof */
.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3.5rem;
}

.hero-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.hero-logos {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-logos-label {
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Home trust bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
  margin-top: 3rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
}

.trust-item-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   WORKSPACE (3-column)
   ──────────────────────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 310px 1fr 270px;
  gap: 1.25rem;
  min-height: calc(100vh - 140px);
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 520px;
}

.panel-header {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  flex-shrink: 0;
}

.panel-body {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

/* ────────────────────────────────────────────────────────────
   CHAT
   ──────────────────────────────────────────────────────────── */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.msg {
  max-width: 88%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--text);
}

.msg-assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.chat-input-row input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.chat-input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ────────────────────────────────────────────────────────────
   ARCHITECTURE VISUALIZATION
   ──────────────────────────────────────────────────────────── */
.arch-viz {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.1rem;
  min-width: 110px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  animation: nodeAppear 0.45s ease forwards;
  box-shadow: var(--shadow-sm);
}

.flow-node.visible { opacity: 1; transform: none; }

@keyframes nodeAppear {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.flow-arrow {
  color: var(--accent);
  font-size: 1.1rem;
  opacity: 0;
  animation: nodeAppear 0.35s ease forwards;
}

.arch-placeholder {
  text-align: center;
  color: var(--text-soft);
  max-width: 28ch;
}

.arch-placeholder .icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

/* Estimates */
.est-table { width: 100%; border-collapse: collapse; }
.est-table tr { border-bottom: 1px solid var(--border); }
.est-table td { padding: 0.7rem 0.25rem; font-size: 0.88rem; }
.est-table td:first-child { color: var(--text-muted); }
.est-table td:last-child { text-align: right; font-weight: 600; }
.est-highlight { color: var(--success); }

.est-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.est-badge.low  { background: rgba(52,211,153,0.12); color: var(--success); }
.est-badge.mid  { background: rgba(251,191,36,0.12); color: var(--warning); }
.est-badge.high { background: rgba(248,113,113,0.12); color: var(--danger); }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  margin-right: 0.4rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

/* ────────────────────────────────────────────────────────────
   PAGE HEADER
   ──────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ────────────────────────────────────────────────────────────
   TABS
   ──────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.tab:hover { color: var(--text); background: var(--bg-hover); }

.tab.active {
  background: var(--accent-soft);
  color: var(--accent-light);
  font-weight: 600;
}

/* ────────────────────────────────────────────────────────────
   CHECKLIST & ARCH BLOCKS
   ──────────────────────────────────────────────────────────── */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9rem;
}
.checklist li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.arch-blocks { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.arch-block {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  min-width: 140px;
  cursor: pointer;
  transition: all var(--transition);
}

.arch-block:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.arch-block strong { display: block; margin-bottom: 0.2rem; font-size: 0.9rem; }
.arch-block span { font-size: 0.8rem; color: var(--text-muted); }

.action-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ────────────────────────────────────────────────────────────
   EDITOR CANVAS
   ──────────────────────────────────────────────────────────── */
.editor-wrap {
  position: relative;
  height: calc(100vh - 200px);
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 24px 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.editor-block {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  min-width: 160px;
  cursor: grab;
  user-select: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.editor-block:active {
  cursor: grabbing;
  box-shadow: 0 12px 40px var(--accent-glow);
  border-color: var(--accent);
}

.editor-block h4 { margin: 0 0 0.3rem; font-size: 0.9rem; }
.editor-block p { margin: 0; font-size: 0.78rem; color: var(--text-muted); }

/* ────────────────────────────────────────────────────────────
   COCKPIT
   ──────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-strong); }

.stat-card .label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.data-table tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tr[data-idx] { cursor: pointer; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill.active  { background: rgba(52,211,153,0.12); color: var(--success); }
.status-pill.paused  { background: rgba(251,191,36,0.12); color: var(--warning); }

/* ────────────────────────────────────────────────────────────
   MARKETPLACE
   ──────────────────────────────────────────────────────────── */
.marketplace-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.marketplace-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

.marketplace-header p { color: var(--text-muted); font-size: 0.95rem; }

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.25rem;
}

.template-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.template-thumb {
  height: 110px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(52,211,153,0.06));
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.template-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-body h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.template-body p {
  margin: 0 0 1.1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.55;
}

.template-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

/* ────────────────────────────────────────────────────────────
   ARCHITECT PAGE
   ──────────────────────────────────────────────────────────── */
.architect-page { max-width: 860px; margin: 0 auto; }

.architect-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.architect-input textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
}

.architect-input textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.analysis-results { animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 2.25rem;
}

.metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  text-align: center;
}

.metric-card .num {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent-light);
}

.metric-card .lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.proposal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.proposal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

.proposal-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.proposal-card h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.proposal-card p { margin: 0; font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }

/* ────────────────────────────────────────────────────────────
   STATES & LOADERS
   ──────────────────────────────────────────────────────────── */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  color: var(--text-soft);
  padding: 3rem 1rem;
}

.empty-state p { margin-bottom: 1rem; }

/* ────────────────────────────────────────────────────────────
   TOAST
   ──────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  z-index: 300;
  max-width: 360px;
  font-size: 0.88rem;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ────────────────────────────────────────────────────────────
   AUTH SIMPLE (fallback)
   ──────────────────────────────────────────────────────────── */
.auth-page { max-width: 400px; margin: 3rem auto; }

/* ────────────────────────────────────────────────────────────
   AUTH PREMIUM
   ──────────────────────────────────────────────────────────── */
body.page-auth { background: #050509; }
body.page-auth .view { max-width: none; padding: 0; margin: 0; }
body.page-auth .footer-premium { display: none; }

body.page-auth .topbar {
  background: rgba(5,5,9,0.9);
  border-bottom-color: rgba(99,102,241,0.1);
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

body.page-auth .topnav a { color: #a8b3cc; font-size: 0.875rem; }
body.page-auth .topnav a:hover,
body.page-auth .topnav a.active { color: #fff; }
body.page-auth .nav-link-login { color: #e4e9f5 !important; font-weight: 500; font-size: 0.875rem; }

.btn-nav-cta { white-space: nowrap; }
.nav-link-login { color: var(--text-muted) !important; font-size: 0.875rem; white-space: nowrap; }

.auth-premium {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-premium-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.auth-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 12% 55%, rgba(99,51,220,0.26), transparent 55%),
    radial-gradient(ellipse 40% 35% at 88% 15%, rgba(59,130,246,0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(99,102,241,0.07), transparent 50%),
    linear-gradient(180deg, #050509 0%, #060812 50%, #07091a 100%);
}

.auth-nebula {
  position: absolute;
  left: -5%;
  bottom: 8%;
  width: 50%;
  height: 45%;
  background:
    radial-gradient(circle at 35% 55%, rgba(99,51,220,0.42), transparent 42%),
    radial-gradient(circle at 55% 35%, rgba(99,102,241,0.22), transparent 48%),
    radial-gradient(circle at 25% 75%, rgba(124,92,246,0.18), transparent 38%);
  filter: blur(52px);
  opacity: 0.85;
  pointer-events: none;
}

.auth-grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black, transparent);
}

.auth-particles span {
  position: absolute;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: rgba(165,140,250,0.65);
  box-shadow: 0 0 6px rgba(99,102,241,0.7);
  animation: auth-float 8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.35s);
  left: calc((var(--i) * 17 + 7) % 100 * 1%);
  top: calc((var(--i) * 23 + 11) % 100 * 1%);
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.25; }
  50%       { transform: translateY(-22px) scale(1.2); opacity: 0.85; }
}

.auth-neural-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.12);
  animation: auth-ring-pulse 6s ease-in-out infinite;
}

.auth-neural-ring-1 { width: 420px; height: 420px; left: -80px; top: 10%; }
.auth-neural-ring-2 { width: 280px; height: 280px; left: 5%; top: 25%; animation-delay: -2s; }

@keyframes auth-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50%       { transform: scale(1.05); opacity: 0.45; }
}

.auth-premium-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem 3rem;
  align-items: center;
  flex: 1;
  padding: 2.25rem 3rem 1.25rem;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.auth-premium-left { padding-right: 0.5rem; align-self: center; }

.auth-badge {
  display: inline-block;
  padding: 0.32rem 0.85rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(124,92,246,0.38);
  background: rgba(99,51,220,0.08);
  color: #c4b0fd;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-hub { position: relative; margin: 0.25rem 0 1.5rem; max-width: 540px; }
.auth-hub-svg { width: 100%; max-width: 540px; height: auto; display: block; filter: drop-shadow(0 8px 28px rgba(99,51,220,0.14)); }
.auth-hub-glow { position: absolute; inset: 15% 5%; background: radial-gradient(circle, rgba(124,92,246,0.28), transparent 70%); filter: blur(48px); z-index: -1; }

.auth-visual { position: relative; margin-bottom: 1.5rem; }
.auth-visual-svg { width: 100%; max-width: 520px; height: auto; display: block; }
.auth-visual-glow { position: absolute; inset: 20% 10%; background: radial-gradient(circle, rgba(99,102,241,0.22), transparent 70%); filter: blur(40px); z-index: -1; }

.auth-node-pulse { animation: auth-node-pulse 3s ease-in-out infinite; }
.auth-node-delay-1 { animation-delay: 0.4s; }
.auth-node-delay-2 { animation-delay: 0.8s; }
.auth-node-delay-3 { animation-delay: 1.2s; }
.auth-node-delay-4 { animation-delay: 1.6s; }
.auth-node-delay-5 { animation-delay: 2s; }
.auth-node-delay-6 { animation-delay: 2.4s; }
.auth-node-delay-7 { animation-delay: 2.8s; }
.auth-node-delay-8 { animation-delay: 3.2s; }

@keyframes auth-node-pulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1; filter: brightness(1.18); }
}

.auth-line-flow { stroke-dasharray: 8 12; animation: auth-line-flow 2.5s linear infinite; }
.auth-line-delay   { animation-delay: 0.6s; }
.auth-line-delay-2 { animation-delay: 1.2s; }
.auth-line-delay-3 { animation-delay: 1.8s; }

@keyframes auth-line-flow { to { stroke-dashoffset: -40; } }

.auth-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.85rem;
  letter-spacing: -0.03em;
  color: #fff;
}

.auth-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #c4b0fd 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero-sub {
  font-size: 1rem;
  color: #8b94ae;
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 1.75rem;
}

/* ────────────────────────────────────────────────────────────
   PLANS / PRICING
   ──────────────────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.plan-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
}

.plan-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(99,102,241,0.06) 0%, var(--bg-elevated) 100%);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.plan-card.featured::before {
  content: "Populaire";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-name {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0.5rem 0 1rem;
  color: var(--text);
}

.plan-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }

/* ────────────────────────────────────────────────────────────
   AGENT TEST PANEL
   ──────────────────────────────────────────────────────────── */
.agent-test-panel {
  border: 1px solid var(--border-accent);
  background: var(--bg-elevated);
}

.agent-chat {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  min-height: 160px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  scroll-behavior: smooth;
}

.agent-chat-input {
  display: flex;
  gap: 0.5rem;
}

.agent-chat-input input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.agent-chat-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Visibility select */
.agent-visibility-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.28rem 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--transition);
}

.agent-visibility-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ────────────────────────────────────────────────────────────
   SOLUTION / GENERATEUR VISUEL
   ──────────────────────────────────────────────────────────── */
.editor-page {
  max-width: 1100px;
  margin: 0 auto;
}

.editor-page .page-header { margin-bottom: 1.5rem; }

/* ────────────────────────────────────────────────────────────
   AUTH — FEATURES LIST
   ──────────────────────────────────────────────────────────── */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.18);
  display: grid;
  place-items: center;
  color: var(--accent-light);
}

/* Contraindre la taille des SVG inline */
.auth-feature-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.auth-feature-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.auth-feature-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────────────────────────
   AUTH — CARD WRAPPER
   ──────────────────────────────────────────────────────────── */
.auth-premium-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0;
}

.auth-card {
  background: rgba(10,12,26,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.06);
  position: relative;
  overflow: hidden;
}

.auth-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.auth-logos-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3e4a60;
}

.auth-logo-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3e4a60;
  letter-spacing: 0.04em;
}

/* ────────────────────────────────────────────────────────────
   AUTH — CARD INNER
   ──────────────────────────────────────────────────────────── */
.auth-card-glow {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.auth-card { position: relative; }
.auth-card > * { position: relative; z-index: 1; }

.auth-card-header { margin-bottom: 1.5rem; }
.auth-card-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.3rem;
  color: #fff;
}
.auth-card-header p { font-size: 0.85rem; color: #6a7590; margin: 0; }

/* ────────────────────────────────────────────────────────────
   AUTH — OAUTH BUTTONS
   ──────────────────────────────────────────────────────────── */
.auth-oauth { margin-top: 1.25rem; }

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.14);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.auth-oauth-divider span { white-space: nowrap; color: rgba(255,255,255,0.25); }

.auth-oauth-buttons.auth-oauth-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.auth-oauth-buttons.auth-oauth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.auth-oauth-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.auth-oauth-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
}

.auth-oauth-icon { display: flex; align-items: center; width: 18px; height: 18px; flex-shrink: 0; }
.auth-oauth-icon svg { width: 18px; height: 18px; }
.auth-oauth-label { font-size: 0.82rem; }

.auth-oauth-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 1rem;
}

/* ────────────────────────────────────────────────────────────
   AUTH — TRUST BAR (bas de page)
   ──────────────────────────────────────────────────────────── */
.auth-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 3rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-trust-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  display: grid;
  place-items: center;
  color: var(--accent-light);
}

.auth-trust-icon svg { width: 15px; height: 15px; }

.auth-trust-copy { display: flex; flex-direction: column; gap: 0.1rem; }
.auth-trust-copy strong { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.auth-trust-copy span { font-size: 0.76rem; color: var(--text-soft); }

/* ────────────────────────────────────────────────────────────
   AUTH — NATIVE FORM (label > input structure)
   ──────────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Label + input stacked */
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8b94ae;
  letter-spacing: 0.02em;
}

.auth-form label input {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  transition: all var(--transition);
  outline: none;
}

.auth-form label input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}

.auth-form label input::placeholder { color: rgba(255,255,255,0.2); }

/* Password wrapper (.auth-password-wrap / .auth-password-input) */
.auth-form .auth-password-wrap {
  display: flex !important;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-form .auth-password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-form .auth-password-input input {
  flex: 1;
  padding-right: 2.75rem !important;
}

.auth-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color var(--transition);
}

.auth-password-toggle:hover { color: rgba(255,255,255,0.6); }

/* Checkbox + forgot password row */
.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: -0.15rem;
}

.auth-remember {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem !important;
  color: #6a7590 !important;
  font-weight: 400 !important;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0 !important;
}

.auth-remember input[type="checkbox"] {
  width: 15px !important;
  height: 15px !important;
  padding: 0 !important;
  accent-color: var(--accent);
  cursor: pointer;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

.auth-forgot {
  font-size: 0.82rem;
  color: var(--accent-light);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}

.auth-forgot:hover { color: #a5b0ff; }

/* Submit button inside form */
.auth-form .btn {
  margin-top: 0.25rem;
}

/* Footer link under the card */
.auth-link {
  text-align: center;
  font-size: 0.83rem;
  color: #5a6480;
  margin-top: 1.1rem;
}

.auth-link a {
  color: var(--accent-light);
  font-weight: 500;
}

.auth-link a:hover { color: #a5b0ff; }

/* ────────────────────────────────────────────────────────────
   AUTH — FORM ELEMENTS (classes .form-*)
   ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8b94ae;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.form-input {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}

.form-input::placeholder { color: rgba(255,255,255,0.2); }

.form-input-icon-wrap { position: relative; }
.form-input-icon {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.22);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.form-input-icon:hover { color: rgba(255,255,255,0.5); }

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.2rem 0 1.2rem;
  font-size: 0.8rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #6a7590;
  cursor: pointer;
  user-select: none;
}

.form-link { color: var(--accent-light); font-weight: 500; transition: color var(--transition); }
.form-link:hover { color: #a5b0ff; }

.btn-auth {
  display: block;
  width: 100%;
  padding: 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,0.32);
  text-align: center;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(99,102,241,0.42);
  filter: brightness(1.05);
}

.btn-auth:active { transform: translateY(0); }

.auth-switch {
  text-align: center;
  font-size: 0.82rem;
  color: #5a6480;
  margin-top: 1.1rem;
}

.auth-switch a { color: var(--accent-light); font-weight: 500; }
.auth-switch a:hover { color: #a5b0ff; }

.auth-notice {
  text-align: center;
  font-size: 0.73rem;
  color: #3e4a60;
  margin-top: 0.85rem;
  line-height: 1.55;
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .auth-premium-grid { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
  .auth-premium-left { display: none; }
}

@media (max-width: 768px) {
  .view { padding: 1.25rem 1rem; }
  .topbar { padding: 0 1rem; }
  .footer-premium { padding: 2rem 1rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-page { padding: 2.5rem 1rem 4rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: 1fr; }
  .auth-trust-bar { grid-template-columns: 1fr; }
  .auth-logos { display: none; }
}
