:root {
  --bg: #f4f9ff;
  --bg2: #eef6ff;
  --card: rgba(255,255,255,.82);
  --card-strong: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(148,163,184,.25);
  --accent: #0284c7;
  --accent-2: #06b6d4;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 14px 40px rgba(15,23,42,.08);
  --radius: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(2,132,199,.12), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height: 100vh;
}
.app-shell { max-width: 1400px; margin: 0 auto; padding: 22px; }
.hero {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  padding: 26px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(6,182,212,.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(16,185,129,.15), transparent 28%),
    rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow);
}
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
h1 { margin: 10px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.hero-copy p { margin: 0; color: var(--muted); font-size: 15px; max-width: 900px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge-pill {
  padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.25); font-weight: 600; font-size: 13px;
}
.metric-card, .metric-box, .card, .footer-note { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric-card { border-radius: 24px; padding: 18px; }
.metric-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metric-value { margin-top: 6px; font-size: 14px; font-weight: 700; }
.metric-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.metric-box { border-radius: 20px; padding: 16px; text-align: center; }
.metric-box-value { font-size: 26px; font-weight: 800; }
.metric-box-label { font-size: 12px; color: var(--muted); }
.tabs {
  margin: 20px 0 18px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
  background: rgba(255,255,255,.85); border: 1px solid var(--line); padding: 8px; border-radius: 22px; box-shadow: var(--shadow);
}
.tab-btn {
  border: 0; background: transparent; border-radius: 16px; padding: 14px 10px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: .2s ease;
}
.tab-btn.active { background: linear-gradient(135deg, rgba(2,132,199,.12), rgba(6,182,212,.08)); color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { border-radius: 28px; overflow: hidden; }
.card-header { padding: 22px 22px 10px; }
.card-header h2 { margin: 0; font-size: 22px; }
.card-header p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.card-body { padding: 0 22px 22px; }
.row-between { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wrap-gap { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.input, .textarea, .select {
  width: 100%; border: 1px solid rgba(148,163,184,.35); background: white; color: var(--text);
  border-radius: 18px; padding: 14px 16px; font: inherit; outline: none;
}
.textarea { resize: vertical; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.big-textarea { min-height: 540px; }
.team-list { display: grid; gap: 12px; max-height: 560px; overflow: auto; margin-top: 14px; padding-right: 4px; }
.team-item, .option-btn {
  width: 100%; text-align: left; border: 1px solid rgba(148,163,184,.28); background: white; border-radius: 20px;
  padding: 16px; cursor: pointer; transition: .18s ease;
}
.team-item:hover, .option-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.team-item.active, .option-btn.active { border-color: rgba(2,132,199,.55); background: rgba(2,132,199,.08); }
.team-item .sub, .subtle, .muted { color: var(--muted); font-size: 13px; }
.mission-summary {
  border: 1px solid rgba(148,163,184,.24); background: linear-gradient(135deg, rgba(248,250,252,.9), rgba(241,245,249,.7));
  padding: 18px; border-radius: 22px; margin-bottom: 16px;
}
.mission-summary .title { font-weight: 700; margin-bottom: 6px; }
.tag-row { display:flex; flex-wrap:wrap; gap:8px; margin-top: 10px; }
.tag { font-size: 12px; border-radius: 999px; padding: 7px 10px; border: 1px solid rgba(148,163,184,.25); background: white; }
.question-card { border: 1px solid rgba(148,163,184,.22); border-radius: 22px; padding: 16px; margin-bottom: 14px; background: rgba(255,255,255,.65); }
.question-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom: 12px; }
.question-title { font-weight: 600; line-height: 1.45; }
.points { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(15,23,42,.06); white-space: nowrap; }
.option-grid { display:grid; gap: 10px; }
.manual-points { max-width: 180px; margin-top: 12px; }
.mission-progress-box { border: 1px solid rgba(148,163,184,.22); border-radius: 22px; padding: 16px; background: rgba(248,250,252,.8); margin: 18px 0; }
.progress { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(148,163,184,.18); margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s ease; }
.action-row { display:flex; gap: 12px; align-items:center; }
.compact-bottom { margin-bottom: 12px; }
.btn {
  border: 1px solid rgba(148,163,184,.3); background: white; color: var(--text);
  border-radius: 18px; padding: 12px 16px; font: inherit; font-weight: 700; cursor: pointer; transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border-color: transparent; }
.btn.danger { background: linear-gradient(135deg, #ef4444, var(--danger)); color: white; border-color: transparent; }
.file-btn { display:inline-flex; align-items:center; }
.hidden { display: none !important; }
.score-card {
  border-radius: 24px; padding: 18px; border: 1px solid rgba(148,163,184,.25); background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,250,252,.75)); margin-bottom: 14px;
}
.score-top { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom: 10px; }
.score-name { font-size: 18px; font-weight: 700; }
.score-specialist { color: var(--muted); font-size: 13px; }
.score-value { text-align:right; }
.score-value strong { display:block; font-size: 26px; }
.mission-mini { border: 1px solid rgba(148,163,184,.22); border-radius: 20px; padding: 14px; margin-bottom: 12px; }
.recent-item { border: 1px solid rgba(148,163,184,.22); border-radius: 20px; padding: 14px; margin-bottom: 12px; }
.stats-top { display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 18px; }
.stat-pill { border-radius: 24px; padding: 18px; background: var(--card); border:1px solid var(--line); box-shadow: var(--shadow); }
.stat-pill .big { font-size: 28px; font-weight: 800; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width:100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid rgba(148,163,184,.22); text-align:left; font-size:14px; }
th { color: var(--muted); font-weight: 700; }
.switch-row { display:flex; justify-content:space-between; gap: 16px; align-items:flex-start; border: 1px solid rgba(148,163,184,.22); padding: 18px; border-radius: 22px; }
.switch-row small { display:block; color: var(--muted); margin-top: 4px; }
.switch-row input { width: 22px; height: 22px; }
.footer-note { margin-top: 18px; border-radius: 24px; padding: 18px 20px; color: var(--muted); }
.empty-state { color: var(--muted); font-size: 14px; }
.special-cyan { background: linear-gradient(135deg, rgba(6,182,212,.12), rgba(14,165,233,.08)); }
.special-violet { background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(217,70,239,.08)); }
.special-emerald { background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(132,204,22,.08)); }
@media (max-width: 1080px) {
  .hero, .grid-2, .stats-top { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .app-shell { padding: 12px; }
  .hero, .card-header, .card-body { padding-left: 16px; padding-right: 16px; }
  .metric-grid { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr; }
  .action-row { flex-wrap: wrap; }
}
