:root {
  --bg: #FFFDF7;
  --fg: #1a1410;
  --muted: #8a7e74;
  --surface: #f0ebe3;
  --accent: #C45C2E;
  --accent-hover: #a84e25;
  --green: #4A7C59;
  --green-light: #e8f0e9;
  --border: #ddd6cb;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  background: rgba(255, 253, 247, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 96px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-large { padding: 16px 32px; font-size: 1.05rem; }

.hero-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Hero Visual */
.url-input-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
}

.url-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.url-row input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
}

.scan-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
}

.scan-btn:hover { background: var(--accent-hover); }

.scan-progress {
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.scan-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.scan-status {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* DEMO */
.demo {
  background: var(--surface);
  padding: 80px 48px;
}

.demo-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

.demo-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}

.demo-chat {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.bot-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.bot-name { font-weight: 600; font-size: 0.92rem; }

.bot-status { font-size: 0.78rem; color: var(--green); }

.chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 82%;
}

.msg.visitor {
  background: var(--surface);
  color: var(--fg);
  align-self: flex-end;
}

.msg.bot {
  background: #1a1410;
  color: #fff;
  align-self: flex-start;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px 16px;
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--bg);
}

.send-btn {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.send-btn:hover { background: var(--accent-hover); }

.lead-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px 14px;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
}

/* Demo Stats */
.demo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* FEATURES */
.features {
  padding: 96px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.features-header {
  text-align: center;
  margin-bottom: 64px;
}

.features-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--fg);
  max-width: 560px;
  margin: 0 auto 16px;
}

.features-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--fg);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

/* PROOF */
.proof {
  background: var(--fg);
  color: white;
  padding: 80px 48px;
}

.proof-header { text-align: center; margin-bottom: 56px; }

.proof-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.proof-logos img {
  height: 28px;
  width: auto;
  opacity: 0.6;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.proof-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.proof-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.quote-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.quote-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
  font-style: italic;
}

.quote-meta { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; }

.quote-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: white;
  margin-bottom: 2px;
}

.quote-company {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}

.quote-stat {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

/* PROCESS */
.process {
  padding: 96px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.process-header {
  text-align: center;
  margin-bottom: 64px;
}

.process-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(33.33% - 12px);
  right: calc(33.33% - 12px);
  height: 1px;
  background: var(--border);
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.5;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* CLOSING */
.closing {
  text-align: center;
  padding: 96px 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--fg);
  max-width: 560px;
  margin: 0 auto 20px;
}

.closing p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.closing-meta {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* FOOTER */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 24px 48px;
    gap: 48px;
  }
  .hero-visual { order: -1; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-stats { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .proof-cards { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; gap: 32px; }
  .process-steps::before { display: none; }
  .features, .process, .closing { padding: 64px 24px; }
  .proof { padding: 64px 24px; }
  footer { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero-headline { font-size: 2rem; }
  .demo-stats { grid-template-columns: 1fr 1fr; }
}

/* ===== APP SHELL ===== */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  background: var(--fg);
  color: white;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.07);
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-new-btn {
  display: block;
  margin: 14px 16px 0;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
}

.sidebar-new-btn:hover { background: var(--accent-hover); }

.sidebar-conversations {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.convo-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.convo-item:hover { background: rgba(255,255,255,0.08); color: white; }
.convo-item.active { background: rgba(255,255,255,0.12); color: white; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.78rem;
}

.sidebar-footer .user-email {
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer form button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.sidebar-footer form button:hover { color: white; }

/* Upgrade badge in sidebar */
.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.free-badge {
  display: inline-flex;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
}

/* Main content */
.app-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Chat header */
.chat-header {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

.chat-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-model-tag {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 12px;
}

/* Chat messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg-row {
  display: flex;
  gap: 12px;
  max-width: 680px;
}

.msg-row.assistant { align-self: flex-start; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.msg-avatar.assistant-msg {
  background: var(--accent);
  color: white;
}

.msg-avatar.user-msg {
  background: var(--fg);
  color: white;
}

.msg-bubble {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.msg-row.assistant .msg-bubble {
  background: var(--surface);
  color: var(--fg);
  border-bottom-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: var(--fg);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Chat input */
.chat-input-area {
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  background: white;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-row input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.2s;
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover { background: var(--accent-hover); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty state */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
}

.chat-empty-icon {
  width: 56px;
  height: 56px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.4rem;
}

.chat-empty h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.chat-empty p { font-size: 0.88rem; }

/* ===== UPGRADE PROMPT MODAL ===== */
.upgrade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 16, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
  animation: overlayIn 0.25s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upgrade-panel {
  background: white;
  width: 100%;
  max-width: 520px;
  border-radius: 20px 20px 0 0;
  padding: 32px 28px 40px;
  animation: panelUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -4px 40px rgba(0,0,0,0.15);
}

@keyframes panelUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.upgrade-panel-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 24px;
}

.upgrade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.upgrade-panel h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.2;
}

.upgrade-panel .upgrade-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.upgrade-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.upgrade-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--fg);
}

.upgrade-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A7C59' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-upgrade-primary {
  display: block;
  width: 100%;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-upgrade-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-upgrade-secondary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px;
  color: var(--muted);
  font-size: 0.88rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.btn-upgrade-secondary:hover {
  border-color: var(--muted);
  color: var(--fg);
}

.upgrade-price-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== FORMS (login / register) ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 24px;
}

.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 32px;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 6px;
  text-align: center;
}

.auth-card .auth-sub {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  background: #fff0e8;
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  border: 1px solid #f5c9b5;
}

.auth-submit {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.auth-submit:hover { background: var(--accent-hover); }

.auth-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 20px;
}

.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Upgrade page */
.upgrade-page {
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.upgrade-page-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  text-align: center;
}

.upgrade-page-card .pro-badge {
  font-size: 0.8rem;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.upgrade-page-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 12px;
}

.upgrade-page-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 32px; }

.upgrade-page-features {
  text-align: left;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.upgrade-page-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--fg);
}

#upgrade-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  font-family: var(--font-body);
}

#upgrade-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

.upgrade-page-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Upgrade success */
.upgrade-success-page {
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.upgrade-success-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--green);
  font-size: 2rem;
}

.upgrade-success-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 12px;
}

.upgrade-success-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; margin-bottom: 28px; }

/* Pro feature locked buttons */
.pro-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--muted);
  border: 1.5px solid var(--border);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s, color 0.2s;
}

.pro-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pro-btn .lock-icon { font-size: 0.75rem; }

@media (max-width: 640px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .upgrade-panel { max-width: 100%; border-radius: 16px 16px 0 0; }
}
