/* Synthora MVP preview — shared stylesheet (self-contained, no external fonts/CDN) */
:root {
  --color-primary: #0F172A;
  --color-secondary: #1E293B;
  --color-text: #111827;
  --color-bg: #F8FAFC;
  --color-border: #CBD5E1;
  --color-caution: #F59E0B;
  --color-caution-bg: #FEF3C7;
  --color-caution-text: #92400E;
  --color-muted-bg: #EEF2F7;
  --color-muted-text: #475569;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  min-width: 320px;
  line-height: 1.5;
}
a { color: var(--color-primary); }
h1, h2, h3, h4 { color: var(--color-primary); margin: 0 0 8px; }
p { margin: 0 0 12px; }
.mono { font-family: var(--font-mono); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 12px;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.topbar .brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.topbar .spacer { flex: 1; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.topbar-hold {
  display: none;
}
@media (min-width: 860px) {
  .topbar-hold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-caution);
    color: var(--color-primary);
  }
}

/* ---------- Layout ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
}
.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--color-secondary);
  padding: 16px 10px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 15;
}
.sidebar.open { transform: translateX(0); }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: #E2E8F0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav-link:hover { background: rgba(255,255,255,0.08); }
.nav-link.active { background: #fff; color: var(--color-primary); font-weight: 700; }
.nav-icon { width: 18px; text-align: center; }
.sidebar-note {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 12px;
}
.sidebar-note strong { color: #FCD34D; }

.content {
  flex: 1;
  width: 100%;
  padding: 16px;
}
@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .sidebar { transform: translateX(0); position: sticky; height: calc(100vh - 56px); }
  .content { padding: 24px 32px; margin-left: 0; }
  .layout { }
}
@media (min-width: 860px) {
  .layout { display: flex; }
}
.overlay {
  display: none;
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(15,23,42,0.4);
  z-index: 12;
}
.overlay.show { display: block; }
@media (min-width: 860px) {
  .overlay { display: none !important; }
}

/* ---------- Hold banner ---------- */
.hold-banner {
  border: 1px solid var(--color-caution);
  background: var(--color-caution-bg);
  color: var(--color-caution-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.hold-banner strong { color: var(--color-caution-text); }
.hold-banner a { color: var(--color-caution-text); text-decoration: underline; }
.hold-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-caution { background: var(--color-caution-bg); color: var(--color-caution-text); }
.badge-muted { background: var(--color-muted-bg); color: var(--color-muted-text); }
.badge-primary { background: var(--color-primary); color: #fff; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}
.card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted-text); margin-bottom: 6px; }
.kpi-value { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--color-primary); }
.kpi-sub { font-size: 12px; color: var(--color-muted-text); margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #1E293B; }
.btn-outline { background: #fff; color: var(--color-primary); border: 1px solid var(--color-border); }
.btn-outline:hover { background: var(--color-muted-bg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
tr:last-child td { border-bottom: none; }
th { background: var(--color-muted-bg); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted-text); }

/* ---------- Pipeline stepper ---------- */
.stepper { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}
.step-dot {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--color-primary); color: #fff;
}
.step-dot.pending { background: var(--color-muted-bg); color: var(--color-muted-text); border: 1px solid var(--color-border); }
.step-body strong { display: block; }
.step-body span { font-size: 13px; color: var(--color-muted-text); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input[type="text"], .field input[type="number"], .field input[type="email"], .field select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 9px 11px;
  font-family: var(--font-mono);
  font-size: 14px;
  background: #fff;
  color: var(--color-text);
}
.field input:disabled { background: var(--color-muted-bg); color: var(--color-muted-text); }
.field-source { margin-top: 5px; }

/* toggle switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.switch-row:last-child { border-bottom: none; }
.switch-text strong { display: block; font-size: 14px; }
.switch-text span { font-size: 12px; color: var(--color-muted-text); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--color-border); border-radius: 999px; transition: 0.15s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s; }
.switch input:checked + .slider { background: var(--color-primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

/* ---------- Panels (locked/unlocked) ---------- */
.panel { position: relative; }
.panel.locked .panel-inner { opacity: 0.35; pointer-events: none; filter: blur(0.3px); }
.panel-lock-note {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--color-muted-bg);
}
.panel.locked .panel-lock-note { display: flex; }

/* ---------- Details / accordion ---------- */
details.acc { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px; background: #fff; }
details.acc + details.acc { margin-top: 10px; }
details.acc summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.acc[open] summary { margin-bottom: 8px; }

/* ---------- Pricing ---------- */
.plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-price { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--color-primary); }
.plan-list { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--color-text); }
.plan-list li { padding: 4px 0; }

/* ---------- Footer ---------- */
.mvp-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--color-border); font-size: 12px; color: var(--color-muted-text); }

/* ---------- Utility ---------- */
.section { margin-bottom: 28px; }
.text-muted { color: var(--color-muted-text); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
