:root {
  --bg: #0a0c0f;
  --bg2: #111318;
  --bg3: #181c23;
  --bg4: #1e2330;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --text: #e8eaf0;
  --text2: #8b90a0;
  --text3: #555b6e;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --red: #ef4444;
  --red2: #fca5a5;
  --amber: #f59e0b;
  --amber2: #fcd34d;
  --green: #10b981;
  --green2: #6ee7b7;
  --teal: #14b8a6;
  --purple: #8b5cf6;
  --glow-blue: rgba(59,130,246,0.15);
  --glow-red: rgba(239,68,68,0.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* GRID NOISE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* HEADER */
header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(10,12,15,0.95);
  backdrop-filter: blur(20px);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent2); }
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--green2);
  font-family: 'DM Mono', monospace;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: livepulse 1.5s ease-in-out infinite;
}
@keyframes livepulse {
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:0.5;transform:scale(0.8)}
}
.canara-badge {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  border: 1px solid var(--border2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* MAIN LAYOUT */
main {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* HERO */
.hero {
  text-align: center;
  padding: 48px 0 40px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--accent2);
  margin-bottom: 20px;
  letter-spacing: 0.08em;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 16px;
}
.hero h1 .highlight {
  color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero p {
  font-size: 16px;
  color: var(--text2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 300;
}

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border2); }
.stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-val.red { color: var(--red); }
.stat-val.green { color: var(--green); }
.stat-val.blue { color: var(--accent2); }
.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ANALYZER PANEL */
.analyzer {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  margin-top: 8px;
}

.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-kicker,
.analysis-time {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.panel-body { padding: 20px; }

/* UPLOAD ZONE */
.upload-zone {
  border: 1.5px dashed rgba(59,130,246,0.3);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(59,130,246,0.03);
  margin-bottom: 16px;
  position: relative;
}
.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.07);
}
.upload-zone.drag-over {
  border-color: var(--teal);
  background: rgba(20,184,166,0.07);
}
.upload-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
  filter: grayscale(0.3);
}
.upload-zone h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.upload-zone p {
  font-size: 12px;
  color: var(--text3);
}
.upload-zone p span { color: var(--accent2); }
#fileInput { display: none; }

/* OR DIVIDER */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text3);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* TEXT INPUT */
.text-input-wrap { position: relative; }
textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  resize: vertical;
  min-height: 160px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
textarea:focus { border-color: var(--accent); }
textarea::placeholder { color: var(--text3); }
.case-fields-wrap { margin-top: 12px; }
.case-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.case-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  outline: none;
  min-width: 0;
}
.case-input:focus { border-color: var(--accent); }

/* DOC TYPE SELECTOR */
.doc-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.doc-type-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-size: 11px;
  color: var(--text2);
  font-family: 'DM Mono', monospace;
}
.doc-type-btn:hover {
  border-color: var(--border2);
  background: var(--bg4);
}
.doc-type-btn.active {
  border-color: var(--accent);
  background: rgba(59,130,246,0.1);
  color: var(--accent2);
}
.doc-type-btn .dt-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.sample-docs { margin-top: 20px; }
.sample-label {
  font-size: 10px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.sample-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sample-btn {
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text2);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sample-risk-high:hover { border-color: rgba(239,68,68,0.4); }
.sample-risk-clean:hover { border-color: rgba(16,185,129,0.4); }
.sample-risk-medium:hover { border-color: rgba(245,158,11,0.4); }

/* ANALYZE BUTTON */
.analyze-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}
.analyze-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
}
.analyze-btn:hover { background: #2563eb; transform: translateY(-1px); }
.analyze-btn:active { transform: translateY(0); }
.analyze-btn:disabled {
  background: var(--bg4);
  color: var(--text3);
  cursor: not-allowed;
  transform: none;
}

/* RESULT PANEL */
.result-initial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  gap: 16px;
  color: var(--text3);
}
.result-initial .big-icon { font-size: 48px; opacity: 0.3; }
.result-initial p { font-size: 13px; font-family: 'DM Mono', monospace; }
.initial-hint {
  font-size: 11px;
  opacity: 0.6;
}

/* LOADING */
.loading-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
  text-align: center;
}
.loading-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
}
.scan-animation {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  position: relative;
}
.scan-animation::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  animation: spin-reverse 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}
.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--text3);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.loading-step.active {
  color: var(--accent2);
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.05);
}
.loading-step.done {
  color: var(--green2);
  border-color: rgba(16,185,129,0.2);
  background: rgba(16,185,129,0.05);
}
.step-icon { font-size: 14px; }

/* TRUST SCORE */
.trust-score-section {
  display: none;
  flex-direction: column;
  gap: 0;
}
.forensic-council {
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.council-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.agent-card {
  min-height: 126px;
  background: var(--bg3);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  padding: 13px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.agent-card.analyzing {
  animation: councilPulse 1.35s ease-in-out infinite;
}
.agent-card.complete {
  animation: agentFlip 0.48s ease both;
}
.agent-card.risk-high {
  border-color: rgba(239,68,68,0.65);
  background: linear-gradient(135deg, rgba(239,68,68,0.09), var(--bg3));
  box-shadow: 0 0 24px rgba(239,68,68,0.08);
}
.agent-card.risk-medium {
  border-color: rgba(245,158,11,0.7);
  background: linear-gradient(135deg, rgba(245,158,11,0.08), var(--bg3));
}
.agent-card.risk-low,
.agent-card.risk-clear {
  border-color: rgba(16,185,129,0.62);
  background: linear-gradient(135deg, rgba(16,185,129,0.08), var(--bg3));
}
.agent-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.agent-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  font-size: 17px;
}
.agent-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.agent-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(96,165,250,0.18);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.agent-verdict {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.agent-card.risk-high .agent-verdict { color: var(--red2); }
.agent-card.risk-medium .agent-verdict { color: var(--amber2); }
.agent-card.risk-low .agent-verdict,
.agent-card.risk-clear .agent-verdict { color: var(--green2); }
.agent-finding {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
}
.verdict-agent-card {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(59,130,246,0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.05));
  overflow: hidden;
}
.verdict-agent-card.show {
  display: block;
  animation: verdictRise 0.55s cubic-bezier(.2,.9,.2,1) both;
}
.verdict-agent-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 0;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--text);
}
.confidence-line,
.recommendation-line {
  margin-top: 7px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.recommendation-line { color: var(--accent2); }
.verdict-reasoning {
  padding: 0 16px 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text2);
}
@keyframes councilPulse {
  0%, 100% { border-color: rgba(59,130,246,0.22); box-shadow: 0 0 0 rgba(59,130,246,0); }
  50% { border-color: rgba(96,165,250,0.82); box-shadow: 0 0 24px rgba(59,130,246,0.12); }
}
@keyframes agentFlip {
  0% { opacity: 0.65; transform: rotateX(-9deg) translateY(4px); }
  100% { opacity: 1; transform: rotateX(0) translateY(0); }
}
@keyframes verdictRise {
  0% { opacity: 0; transform: translateY(12px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.trust-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.score-ring-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.score-ring-wrap svg {
  transform: rotate(-90deg);
}
.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-number {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--red);
}
.score-arc { transition: stroke-dashoffset 1s ease, stroke 0.5s; }
.score-max {
  font-size: 10px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}
.score-info { flex: 1; }
.score-verdict {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}
.score-summary {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

/* CHECKS */
.checks-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.checks-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.check-item:last-child { border-bottom: none; }
.check-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 1px;
}
.check-badge.fail { background: rgba(239,68,68,0.15); color: var(--red); }
.check-badge.warn { background: rgba(245,158,11,0.15); color: var(--amber); }
.check-badge.pass { background: rgba(16,185,129,0.15); color: var(--green); }
.check-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.check-detail { font-size: 11px; color: var(--text2); line-height: 1.4; }

/* AI INSIGHT */
.ai-insight {
  margin: 16px 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(139,92,246,0.05) 100%);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  padding: 16px;
}
.ai-insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ai-pulse {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: livepulse 1.5s infinite;
}
.ai-insight-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.ai-insight-text strong { color: var(--accent2); font-weight: 500; }

/* UNDERWRITER ACTION */
.underwriter-action {
  margin: 0 20px 20px;
  display: flex;
  gap: 10px;
}
.action-btn {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
  text-align: center;
}
.action-btn.reject {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: var(--red2);
}
.action-btn.reject:hover { background: rgba(239,68,68,0.2); }
.action-btn.hold {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
  color: var(--amber2);
}
.action-btn.hold:hover { background: rgba(245,158,11,0.2); }
.action-btn.approve {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: var(--green2);
}
.action-btn.approve:hover { background: rgba(16,185,129,0.2); }

/* HEATMAP */
.heatmap-section { padding: 16px 20px; border-top: 1px solid var(--border); }
.heatmap-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}
.hm-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}
.hm-cell:hover { transform: scale(1.3); z-index: 2; }
.hm-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}
.hm-legend-item { display: flex; align-items: center; gap: 4px; }
.hm-dot { width: 8px; height: 8px; border-radius: 2px; }
.hm-red { background: #ef4444; }
.hm-amber { background: #f59e0b; }
.hm-green { background: #10b981; }

/* HISTORY */
.history-section {
  margin-top: 20px;
  display: none;
}
.history-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.history-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.history-card:hover {
  border-color: var(--border2);
  background: var(--bg3);
}
.history-doc { font-size: 12px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; }
.history-score {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0 2px;
}

/* NOTIFICATION TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  z-index: 1000;
  transform: translateY(80px);
  transition: transform 0.3s;
  max-width: 300px;
}
.toast.show { transform: translateY(0); }

/* FOOTER */
footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text3);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  margin-top: 48px;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* SEVERITY BANNER */
.severity-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.05em;
  animation: fadeIn 0.4s ease;
}
.severity-banner.red { background: rgba(239,68,68,0.08); color: var(--red2); border-color: rgba(239,68,68,0.2); }
.severity-banner.amber { background: rgba(245,158,11,0.08); color: var(--amber2); border-color: rgba(245,158,11,0.2); }
.severity-banner.green { background: rgba(16,185,129,0.08); color: var(--green2); border-color: rgba(16,185,129,0.2); }
.case-id {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.7;
  cursor: pointer;
  border: 1px solid currentColor;
  padding: 2px 8px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.case-id:hover { opacity: 1; }

/* REPORT BUTTON */
.report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text2);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
}
.report-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--accent); }
#reportBtn { display: none; }

/* PRINT STYLES */
@media print {
  body { background: white; color: black; }
  header, .hero, .stats-row, .upload-zone, .doc-types, textarea,
  #loanId, #applicantName, .analyze-btn, .history-section,
  footer, .toast, .panel:first-child, .underwriter-action { display: none !important; }
  .analyzer { grid-template-columns: 1fr !important; }
  .panel { border: 1px solid #ddd !important; background: white !important; }
  .score-verdict, .check-name, .ai-insight-text { color: black !important; }
  .ai-insight { background: #f5f5f5 !important; border: 1px solid #ddd !important; }
}

/* MOBILE */
@media (max-width: 768px) {
  .analyzer { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .agent-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; letter-spacing: -1px; }
}
