:root {
    --bg: #0b1020;
    --panel: rgba(20, 29, 56, 0.88);
    --panel-light: rgba(255, 255, 255, 0.08);
    --text: #eef3ff;
    --muted: #a8b3cf;
    --primary: #70a5ff;
    --primary-strong: #4d85ff;
    --success: #20c997;
    --danger: #ff6b81;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Tahoma, Arial, sans-serif; background:
radial-gradient(circle at top right, rgba(112,165,255,0.22), transparent 28%),
radial-gradient(circle at left bottom, rgba(32,201,151,0.15), transparent 22%),
var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
body { min-height: 100vh; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 56px; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; margin-bottom:24px; border:1px solid var(--border); background: var(--panel); backdrop-filter: blur(16px); border-radius: 24px; box-shadow: var(--shadow); }
.brand { font-size: 30px; font-weight: 800; letter-spacing: 0.5px; }
.brand-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.topnav { display:flex; gap:10px; flex-wrap:wrap; }
.topnav a { padding: 10px 16px; border-radius: 999px; background: var(--panel-light); border:1px solid var(--border); }
.flash { border-radius: 18px; padding: 16px 18px; margin-bottom: 18px; }
.flash.success { background: rgba(32,201,151,.12); border: 1px solid rgba(32,201,151,.35); }
.flash.error { background: rgba(255,107,129,.10); border: 1px solid rgba(255,107,129,.35); }
.hero-grid, .panel-grid, .result-layout { display:grid; gap:20px; }
.hero-grid { grid-template-columns: 1.4fr 0.8fr; margin-bottom: 24px; }
.panel-grid, .result-layout { grid-template-columns: 1.4fr 0.8fr; margin-bottom: 24px; }
.panel, .hero-card { border:1px solid var(--border); background: var(--panel); backdrop-filter: blur(14px); border-radius: 28px; box-shadow: var(--shadow); padding: 24px; }
.panel-lg { padding: 28px; }
.hero-card.primary h1 { margin: 8px 0 10px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; }
.hero-card.primary p { color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 760px; }
.hero-actions, .action-row { display:flex; gap:12px; flex-wrap:wrap; margin-top: 18px; }
.btn { border: none; cursor:pointer; padding: 14px 20px; border-radius: 16px; font-weight: 700; transition: .2s ease; display:inline-flex; align-items:center; justify-content:center; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: white; }
.btn-danger { background: linear-gradient(135deg, #ff7f95, var(--danger)); color: white; }
.btn-light { background: #fff; color: #10172d; }
.btn-outline { background: transparent; color: white; border: 1px solid var(--border); }
.eyebrow { font-size: 12px; color: var(--primary); font-weight: 800; letter-spacing: 0.12em; }
.stats { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-box, .metric, .result-card, .mini-note, .mini-stat { background: var(--panel-light); border:1px solid var(--border); border-radius: 20px; padding: 18px; }
.stat-box strong, .metric strong, .mini-stat strong { display:block; font-size: 30px; margin-top: 6px; }
.stat-box span, .metric span, .result-card span, .mini-stat span { color: var(--muted); font-size: 13px; }
.stat-box.full { grid-column: 1 / -1; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 18px; }
.panel-head h1, .panel-head h2 { margin: 8px 0 0; font-size: clamp(24px, 4vw, 36px); }
.wave-box { border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border:1px solid var(--border); }
canvas { width: 100%; height: 220px; display:block; }
canvas { stroke: #7fb0ff; }
.feature-grid, .result-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.metric { min-height: 92px; }
.metric strong { font-size: 26px; }
.hidden { display:none; }
.hint { color: var(--muted); margin-top: 18px; line-height: 1.8; }
.badge, .confidence-pill { padding: 10px 14px; border-radius: 999px; font-weight: 800; }
.badge.idle { background: rgba(255,255,255,.08); }
.badge.live { background: rgba(32,201,151,.18); color: #9af1d7; }
.badge.processing { background: rgba(112,165,255,.18); color: #b9d0ff; }
.confidence-pill { background: linear-gradient(135deg, rgba(112,165,255,.22), rgba(32,201,151,.22)); font-size: 24px; }
.reason-list { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.reason-list li { padding:14px 16px; border-radius:16px; border:1px solid var(--border); background: var(--panel-light); }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align:right; }
thead th { color: var(--muted); font-size: 13px; }
.feedback-form { display:grid; gap:14px; }
.feedback-form label { display:grid; gap:8px; }
.feedback-form select, .feedback-form textarea { width:100%; border:1px solid var(--border); background: rgba(255,255,255,.04); color: white; border-radius: 16px; padding: 14px; }
.feedback-form option { color: #111; }
.note-list { display:grid; gap:12px; margin-top:18px; }
.note-item { padding: 14px 16px; border:1px solid var(--border); border-radius: 16px; background: var(--panel-light); color: var(--text); }
.audio-box { margin-top: 20px; }
audio { width:100%; }
.result-card.accent { background: linear-gradient(135deg, rgba(112,165,255,.14), rgba(32,201,151,.12)); }
.pagination-wrap { margin-top: 18px; }
@media (max-width: 900px) {
    .hero-grid, .panel-grid, .result-layout, .stats, .feature-grid, .result-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; }
    .app-shell { width: min(100% - 20px, 1180px); }
    .panel, .hero-card { padding: 18px; border-radius: 22px; }
    table { min-width: 620px; }
}
