/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0D0F14;
  --surface: #151820;
  --surface-2: #1C2030;
  --surface-3: #252A3D;
  --border: #2A3045;
  --border-light: #1E2335;
  --primary: #00E5CC;
  --primary-dim: #00E5CC99;
  --primary-glow: #00E5CC22;
  --accent: #7B61FF;
  --accent-dim: #7B61FF55;
  --warning: #FFB84D;
  --danger: #FF5757;
  --danger-dim: #FF575744;
  --success: #00E5CC;
  --text: #E8EAF0;
  --text-2: #8B92A8;
  --text-3: #555E78;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 150ms ease;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

::selection { background: var(--primary-glow); color: var(--primary); }

.hidden { display: none !important; }

/* ===== UTILITIES ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.badge {
  background: var(--surface-3);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== TYPOGRAPHY ===== */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 48px;
}
.section-sub { font-size: 1.1rem; color: var(--text-2); max-width: 600px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-xs { padding: 4px 9px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; font-weight: 600; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--primary);
  color: #0D0F14;
  border-color: var(--primary);
  font-weight: 600;
}
.btn-primary:hover { background: #00ffdf; box-shadow: 0 0 20px var(--primary-glow); }
.btn-primary:active { transform: scale(0.97); }

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); background: var(--primary-glow); }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--primary); }
.nav-center { flex: 1; display: flex; justify-content: center; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Agent Selector */
.agent-selector-wrap { position: relative; }
.agent-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-mono);
}
.agent-selector-btn:hover { border-color: var(--primary-dim); background: var(--surface-3); }
.agent-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
  display: none;
}
.agent-dropdown.open { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }
.agent-dropdown-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  color: var(--text-2);
}
.agent-dropdown-list-item:hover, .agent-dropdown-list-item.active { background: var(--surface-2); color: var(--text); }

/* ===== STATUS DOT ===== */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.status-active { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
.status-dot.status-idle { background: var(--text-3); }
.status-dot.status-error { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.status-dot.status-running { background: var(--warning); animation: pulse-dot 1.5s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }
.badge-dot.pulse { animation: pulse-dot 2s ease-in-out infinite; }

/* ===== LANDING PAGE ===== */
.page { min-height: calc(100vh - 60px); }

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 100%);
}
.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 28px;
  font-family: var(--font-mono);
}
.hero-badge span { color: var(--primary); }
.hero-headline {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-headline-accent { color: var(--primary); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.hero-code { max-width: 620px; margin: 0 auto; }

/* Code Window */
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FFBD2E; }
.code-dots span:nth-child(3) { background: #28CA41; }
.code-filename { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-left: 4px; }
.code-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}
.code-keyword { color: #C792EA; }
.code-fn { color: #82AAFF; }
.code-str { color: #C3E88D; }
.code-bool { color: #FF5370; }
.code-num { color: #F78C6C; }
.code-comment { color: var(--text-3); font-style: italic; }
.code-inline { background: var(--surface-3); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; }

/* Sections */
.section-problem, .section-solution, .section-pricing, .section-sdk, .section-cta {
  padding: 80px 0;
}
.section-problem { background: var(--surface); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.section-cta { text-align: center; background: linear-gradient(180deg, transparent, var(--surface) 50%); }
.section-pricing { background: var(--bg); }
.section-sdk { background: var(--surface); border-top: 1px solid var(--border-light); }

/* Pain Cards */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.pain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.pain-card:hover { border-color: var(--danger-dim); transform: translateY(-2px); }
.pain-icon { margin-bottom: 16px; }
.pain-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; font-family: var(--font-mono); }
.pain-card p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* Solution Steps */
.solution-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}
.solution-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  position: relative;
  z-index: 1;
}
.solution-step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.solution-step-content h3 { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.solution-step-content p { color: var(--text-2); font-size: 14px; }
.solution-connector {
  width: 2px;
  height: 20px;
  background: var(--border);
  margin-left: 23px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform var(--transition);
}
.pricing-card:hover { transform: translateY(-3px); }
.pricing-featured { border-color: var(--primary-dim); box-shadow: 0 0 30px var(--primary-glow); }
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.pricing-tier {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.pricing-price {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 24px;
}
.pricing-period { font-size: 1rem; color: var(--text-3); font-weight: 400; }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }

/* SDK Tabs */
.sdk-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; max-width: 500px; }
.sdk-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.sdk-tab:hover { color: var(--text-2); }
.sdk-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sdk-code-window { max-width: 620px; }

/* CTA Section */
.cta-title { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; }
.cta-sub { color: var(--text-2); margin-bottom: 32px; font-size: 1.1rem; }
.cta-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }

/* ===== DASHBOARD ===== */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 52px;
}
.stat-item { display: flex; align-items: center; gap: 8px; }
.stat-label { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.stat-value { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--primary); }
.stat-divider { width: 1px; height: 24px; background: var(--border); margin: 0 24px; }

.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 112px);
}

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-actions { display: flex; gap: 6px; }

.sidebar-filters {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.filter-search {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font-body);
  padding: 6px 10px;
  outline: none;
  transition: border-color var(--transition);
}
.filter-search:focus { border-color: var(--primary-dim); }
.filter-search::placeholder { color: var(--text-3); }
.filter-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 6px 8px;
  outline: none;
  cursor: pointer;
}

.checkpoint-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}
.empty-state p { color: var(--text-3); font-size: 13px; }
.empty-sub { font-size: 12px !important; line-height: 1.5; }
.empty-sub-section { color: var(--text-3); font-size: 13px; padding: 16px 0; font-style: italic; }
.detail-empty { min-height: 300px; }

/* Checkpoint List Items */
.checkpoint-item {
  position: relative;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}
.checkpoint-item:hover { background: var(--surface-2); }
.checkpoint-item.selected {
  background: var(--primary-glow);
  border-left-color: var(--primary);
}
.checkpoint-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.checkpoint-item-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.checkpoint-item-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge-auto { background: var(--accent-dim); color: var(--accent); }
.badge-manual { background: var(--primary-glow); color: var(--primary); }
.checkpoint-item-time {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.checkpoint-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkpoint-item-size { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.checkpoint-item-note {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Timeline connector */
.timeline-connector {
  width: 2px;
  height: 12px;
  background: var(--border);
  margin-left: 27px;
}

/* Detail Panel */
.detail-panel {
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.checkpoint-detail { display: flex; flex-direction: column; height: 100%; }

.detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.detail-id { display: flex; align-items: center; gap: 10px; }
.checkpoint-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}
.detail-actions { display: flex; align-items: center; gap: 6px; }
.detail-meta { display: flex; align-items: center; gap: 16px; }
.detail-timestamp { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.detail-note { font-size: 13px; color: var(--text-2); font-style: italic; }

/* Detail Sections */
.detail-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* State Summary Grid */
.state-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.state-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.state-card-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.state-card-label {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* Tool Log */
.tool-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.tool-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tool-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
}
.tool-item-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.tool-item-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.tool-item-status { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.tool-item-status.completed { color: var(--primary); }
.tool-item-status.running { color: var(--warning); }
.tool-item-status.error { color: var(--danger); }
.tool-item-body {
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
  display: none;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}
.tool-item.expanded .tool-item-body { display: block; }
.tool-item.expanded .tool-chevron { transform: rotate(180deg); }
.tool-chevron { transition: transform var(--transition); }

/* Diff View */
.diff-view {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.diff-line {
  padding: 5px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
}
.diff-line:last-child { border-bottom: none; }
.diff-line:last-child { border-bottom: none; }
.diff-line.added { background: rgba(0,229,204,0.06); }
.diff-line.removed { background: rgba(255,87,87,0.06); }
.diff-line.changed { background: rgba(123,97,255,0.06); }
.diff-sign { width: 14px; font-weight: 700; flex-shrink: 0; }
.diff-sign.added { color: var(--primary); }
.diff-sign.removed { color: var(--danger); }
.diff-sign.changed { color: var(--accent); }
.diff-path { color: var(--text-3); flex-shrink: 0; min-width: 120px; }
.diff-value { color: var(--text); word-break: break-all; }
.diff-value.added-val { color: var(--primary); }
.diff-value.removed-val { color: var(--danger); }
.diff-value.changed-val { color: var(--accent); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: modal-enter 0.2s ease;
}
.modal-danger .modal-header h3 { display: flex; align-items: center; gap: 10px; }
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-light);
}

/* Form Elements */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; font-family: var(--font-mono); }
.form-optional { color: var(--text-3); font-weight: 400; }
.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--primary-dim); }
.form-input::placeholder { color: var(--text-3); }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* Rollback specific */
.rollback-warning { color: var(--danger); font-size: 13px; margin-bottom: 16px; }
.rollback-target { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.settings-divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Rollback Progress Overlay */
.rollback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,15,20,0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rollback-progress {
  text-align: center;
  max-width: 400px;
}
.rollback-spinner { margin-bottom: 24px; display: inline-block; }
.spinner-arc { animation: spin 1s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.rollback-progress-title { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.rollback-progress-sub { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }
.rollback-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: var(--surface);
  border: 1px solid var(--primary-dim);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: var(--primary); flex-shrink: 0; }
.toast.toast-error { border-color: var(--danger-dim); }
.toast.toast-error .toast-icon { color: var(--danger); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-headline { font-size: 2.2rem; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { height: 300px; border-right: none; border-bottom: 1px solid var(--border); }
  .detail-panel { height: auto; }
  .hero-code { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
}
