/* SupportMind Dashboard — style.css */
:root {
  /* AetherFlow Design Tokens */
  --bg: #0d0d15;
  --surface: #13131b;
  --surface-container: #1f1f27;
  --surface-bright: #393841;
  --primary: #c0c1ff;
  --primary-container: #8083ff;
  --on-primary: #1000a9;
  --secondary: #89ceff;
  --accent: #8b5cf6;
  --text: #e4e1ed;
  --text-dim: #c7c4d7;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  --green: #4ade80;
  --yellow: #facc15;
  --red: #f87171;
  --orange: #fb923c;
  
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Glassmorphism */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.shimmer-border {
  position: relative;
  overflow: hidden;
}

.shimmer-border::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Nav */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(13, 13, 21, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { display: flex; }
.brand-text { font-weight: 700; font-size: 18px; }
.brand-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  background: var(--surface2); color: var(--text2); font-weight: 600;
}
.nav-links { display: flex; gap: 8px; }
.nav-link {
  color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Hero */
.hero {
  position: relative; z-index: 1;
  padding: 120px 40px 80px;
  max-width: 1400px; margin: 0 auto;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-content { text-align: left; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(192, 193, 255, 0.1);
  color: var(--primary);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(48px, 5vw, 72px); font-weight: 800;
  line-height: 1.05; margin-bottom: 24px;
  color: #fff;
  letter-spacing: -0.04em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px; color: var(--text-dim); max-width: 600px; margin: 0 0 48px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 16px; justify-content: flex-start; margin-bottom: 0; }

/* Hero Visual (Bento Preview) */
.hero-visual {
  position: relative;
}

.pipeline-card {
  border-radius: 24px;
  padding: 24px;
  position: relative;
  z-index: 10;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.pipeline-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; opacity: 0.5; }
.dot-red { background: var(--red); }
.dot-amber { background: var(--yellow); }
.dot-green { background: var(--green); }

.pipeline-status { font-family: var(--mono); font-size: 12px; color: #666; }

.pipeline-tiers { display: flex; flex-direction: column; gap: 16px; }

.tier-card {
  padding: 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; justify-content: space-between; align-items: center;
  transition: all 0.3s;
}

.tier-card.active {
  background: rgba(192, 193, 255, 0.08);
  border-color: rgba(192, 193, 255, 0.2);
}

.tier-info { display: flex; align-items: center; gap: 16px; }
.tier-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(192, 193, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}

.tier-name { font-size: 14px; font-weight: 600; color: #fff; }
.tier-meta { font-size: 12px; color: #666; }
.tier-indicator { font-size: 20px; }


/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: 12px; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 24px rgba(192, 193, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(192, 193, 255, 0.3);
  filter: brightness(1.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

/* Stats Section */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px 80px;
}

.stat-card {
  padding: 32px;
  border-radius: 20px;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: rgba(192, 193, 255, 0.2);
  transform: translateY(-4px);
  background: rgba(192, 193, 255, 0.03);
}

.stat-label {
  font-size: 12px; font-weight: 600; color: #666;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 40px; font-weight: 800; color: #fff;
  line-height: 1; margin-bottom: 12px;
}

.stat-delta {
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}

.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 16px; margin-top: 16px; }
.btn-icon { font-size: 20px; }


/* Sections */
.section {
  position: relative; z-index: 1;
  padding: 100px 40px;
  max-width: 1400px; margin: 0 auto;
}
.section-dark { max-width: none; background: #0a0a0f; }
.section-dark > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--primary); background: rgba(192, 193, 255, 0.1);
  padding: 6px 18px; border-radius: 20px; margin-bottom: 16px;
}
.section-title { font-size: 40px; font-weight: 800; margin-bottom: 16px; color: #fff; }
.section-desc { font-size: 17px; color: var(--text-dim); max-width: 700px; margin: 0 auto; }

/* Demo */
.demo-container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.demo-input-panel, .demo-results-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius2); padding: 28px;
}
.input-label { font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 10px; display: block; }
.ticket-textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; color: var(--text);
  font-family: var(--font); font-size: 14px; resize: vertical;
  transition: border-color 0.2s; line-height: 1.6;
}
.ticket-textarea:focus { outline: none; border-color: var(--primary); }
.demo-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.preset-label { font-size: 13px; color: var(--text3); font-weight: 500; }
.preset-btn {
  font-size: 12px; padding: 4px 12px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; font-family: var(--font);
  transition: all 0.2s;
}
.preset-btn:hover { border-color: var(--primary); color: var(--primary2); }

/* Result placeholder */
.result-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 300px; color: var(--text3); text-align: center;
}
.placeholder-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

/* Action badge */
.action-badge-container { text-align: center; margin-bottom: 20px; }
.action-badge {
  display: inline-block; padding: 8px 24px; border-radius: 8px;
  font-size: 18px; font-weight: 800; font-family: var(--mono);
  letter-spacing: 2px;
  animation: badgePop 0.4s ease;
}
@keyframes badgePop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.action-badge.route { background: rgba(74, 222, 128, 0.1); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.2); }
.action-badge.clarify { background: rgba(250, 204, 21, 0.1); color: var(--yellow); border: 1px solid rgba(250, 204, 21, 0.2); }
.action-badge.escalate { background: rgba(248, 113, 113, 0.1); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.2); }
.action-queue { font-size: 13px; color: var(--text2); margin-top: 8px; }

/* Gauges */
.gauge-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.gauge-container { position: relative; }
.gauge-label { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; display: block; }
.gauge-track {
  height: 10px; background: var(--bg); border-radius: 5px;
  overflow: hidden; position: relative;
}
.gauge-fill {
  height: 100%; border-radius: 5px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--green), var(--primary));
  position: relative; z-index: 2;
}
.entropy-fill { background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--red)); }
.gauge-zones { position: absolute; inset: 0; display: flex; opacity: 0.15; }
.zone { height: 100%; }
.zone-red { background: var(--red); }
.zone-yellow { background: var(--yellow); }
.zone-green { background: var(--green); }
.gauge-value { font-size: 20px; font-weight: 700; font-family: var(--mono); margin-top: 6px; }

/* Probability chart */
.prob-chart { margin-bottom: 20px; }
.prob-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  font-size: 12px;
}
.prob-label { width: 130px; color: var(--text2); text-align: right; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prob-bar-track { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.prob-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; background: var(--primary); }
.prob-val { width: 50px; font-family: var(--mono); color: var(--text3); font-size: 11px; }

/* Clarification */
.clarification-box {
  background: rgba(234,179,8,0.06); border: 1px solid rgba(234,179,8,0.2);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.clarify-header { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--yellow); }
.clarify-question { font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
.clarify-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.clarify-options .option-btn {
  padding: 6px 16px; border-radius: 6px; font-size: 13px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; font-family: var(--font);
}
.clarify-gain { font-size: 12px; color: var(--text3); }

/* Signals */
.signals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.signal-card {
  background: var(--bg); border-radius: 8px; padding: 14px; text-align: center;
}
.signal-label { font-size: 11px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.signal-value { font-size: 18px; font-weight: 700; font-family: var(--mono); margin-top: 4px; }
.signal-bar { height: 4px; background: var(--surface); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.signal-fill { height: 100%; border-radius: 2px; background: var(--orange); transition: width 0.6s; }
.result-reason {
  font-size: 13px; color: var(--text3); text-align: center;
  padding: 12px; background: var(--bg); border-radius: 8px;
  font-style: italic;
}

/* Architecture */
.arch-pipeline {
  display: flex; align-items: stretch; gap: 0; margin-bottom: 80px;
  justify-content: center;
}
.arch-stage {
  padding: 32px; flex: 1; max-width: 340px;
  text-align: center; transition: all 0.3s;
  border-radius: 24px;
}
.arch-stage:hover { border-color: var(--primary); transform: translateY(-6px); }
.stage-highlight { border-color: var(--primary); background: rgba(192, 193, 255, 0.05); }
.stage-number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary); font-weight: 800; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stage-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.stage-details { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.tech-tag {
  font-size: 11px; padding: 4px 12px; border-radius: 6px;
  background: rgba(192, 193, 255, 0.1); color: var(--primary); font-weight: 700;
}
.stage-desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.arch-arrow {
  display: flex; align-items: center; font-size: 28px; color: #333;
  padding: 0 16px;
}

/* MC Dropout Viz */
.mc-dropout-viz {
  text-align: center; margin-bottom: 60px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius2); padding: 36px;
}
.viz-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.viz-desc { font-size: 14px; color: var(--text2); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.dropout-grid { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.dropout-col { display: flex; flex-direction: column; gap: 3px; }
.dropout-cell {
  width: 10px; height: 10px; border-radius: 2px; transition: all 0.3s;
}
.dropout-legend { display: flex; gap: 20px; justify-content: center; font-size: 12px; color: var(--text3); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* Competitor Table */
.competitor-table-wrap { overflow-x: auto; }
.competitor-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.competitor-table th {
  text-align: left; padding: 14px 16px; color: var(--text2);
  font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; border-bottom: 1px solid var(--border);
}
.competitor-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cell-no { color: var(--red); }
.cell-yes { color: var(--green); font-weight: 600; }
.cell-partial { color: var(--yellow); }
.row-highlight { background: rgba(99,102,241,0.06); }

/* Benchmarks */
.benchmark-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 48px; }
.bench-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius2); padding: 24px;
}
.bench-metric { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.bench-bar-group { margin-bottom: 8px; }
.bench-label { font-size: 12px; color: var(--text3); margin-bottom: 4px; font-weight: 500; }
.bench-bar { height: 28px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bench-fill {
  height: 100%; border-radius: 6px; display: flex; align-items: center;
  padding-left: 12px; font-size: 13px; font-weight: 700; font-family: var(--mono);
  transition: width 1s ease;
}
.bench-fill.baseline { background: rgba(148,163,184,0.2); color: var(--text2); }
.bench-fill.ours { background: linear-gradient(90deg, var(--primary), var(--accent)); color: white; }
.bench-fill.bad { background: rgba(239,68,68,0.2); color: var(--red); }
.bench-delta { font-size: 14px; font-weight: 700; color: var(--green); margin-top: 8px; text-align: right; }

/* Ops Grid */
.ops-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ops-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.ops-icon { font-size: 28px; margin-bottom: 10px; }
.ops-metric { font-size: 13px; color: var(--text2); font-weight: 600; margin-bottom: 12px; }
.ops-before { font-size: 18px; font-weight: 700; color: var(--text3); font-family: var(--mono); }
.ops-arrow { color: var(--text3); margin: 6px 0; }
.ops-after { font-size: 22px; font-weight: 800; color: white; font-family: var(--mono); }
.ops-delta { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 8px; }
.ops-delta.positive { color: var(--green); }

/* API */
.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.api-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.api-method {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 4px; font-family: var(--mono); margin-bottom: 8px;
}
.api-method.post { background: rgba(99,102,241,0.15); color: var(--primary2); }
.api-method.get { background: rgba(34,197,94,0.15); color: var(--green); }
.api-path { font-family: var(--mono); font-size: 16px; font-weight: 600; display: block; margin-bottom: 8px; }
.api-desc { font-size: 13px; color: var(--text3); }

/* Footer */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border); padding: 80px 40px;
  background: #050508;
}
.footer-brand { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -1px; }
.footer-author { font-size: 14px; color: #666; margin-bottom: 8px; }
.footer-tech { font-size: 14px; color: #666; font-weight: 500; cursor: pointer; }
.footer-tech span:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 900px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .demo-container { grid-template-columns: 1fr; }
  .arch-pipeline { flex-direction: column; align-items: center; }
  .arch-arrow { transform: rotate(90deg); padding: 8px; }
  .benchmark-grid, .ops-grid, .api-grid { grid-template-columns: 1fr; }
  .signals-grid { grid-template-columns: repeat(2, 1fr); }
  .gauge-row { grid-template-columns: 1fr; }
  .navbar { padding: 12px 16px; }
  .nav-links { display: none; }
}

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Loading spinner */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
/* SHAP Interpretability */
.explanation-box {
  background: rgba(192, 193, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease;
}
.explain-header {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.explain-text {
  font-family: var(--font);
  font-size: 15px;
  line-height: 2.2;
  color: var(--text);
  margin-bottom: 16px;
}
.shap-token {
  padding: 2px 4px;
  margin: 0 1px;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s;
}
.explain-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text3);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.highlight-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.highlight-box.pos { background: rgba(74, 222, 128, 0.4); border: 1px solid var(--green); }
.highlight-box.neg { background: rgba(248, 113, 113, 0.4); border: 1px solid var(--red); }

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

@keyframes spin { to { transform: rotate(360deg); } }

