:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #14213d;
  --muted: #5b6472;
  --border: #d9e2ec;
  --primary: #1d4ed8;
  --primary-2: #0f766e;
  --success: #166534;
  --danger: #b91c1c;
  --warning: #b45309;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #edf4ff 0, var(--bg) 220px);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hidden { display: none !important; }
.app-shell { max-width: 1180px; margin: 0 auto; padding: 16px; }
.hero {
  margin: 10px 0 18px;
  padding: 22px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 50%, #0f766e 100%);
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 8px; font-size: .9rem; opacity: .9; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { margin: 0 0 10px; font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.15; }
.hero-copy { margin: 0; line-height: 1.55; max-width: 860px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hero-badges span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  font-size: .92rem;
}
.tabs, .section-jumps, .toolbar-actions, .sticky-bar, .stats-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tab, .btn, .jump-link {
  border: none; border-radius: 14px; font-weight: 700; cursor: pointer; min-height: 48px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.tab, .jump-link { background: #e5eefc; color: #163ea9; padding: 12px 16px; text-decoration: none; }
.tab.active { background: var(--primary); color: #fff; }
.btn { padding: 13px 18px; color: #fff; background: var(--primary); box-shadow: 0 10px 20px rgba(29,78,216,.16); }
.btn-light { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.tab:hover, .btn:hover, .jump-link:hover { transform: translateY(-1px); }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.panel.compact { padding: 16px; }
.stats-grid .stat-card {
  flex: 1 1 180px; min-width: 180px; padding: 14px; border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.stat-label { color: var(--muted); font-size: .92rem; margin-bottom: 6px; }
.stat-value { font-size: 1.65rem; font-weight: 800; }
.section-card {
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border: 1px solid var(--border); border-radius: 20px; padding: 18px; margin-bottom: 16px;
}
.section-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.section-desc { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.field { margin-bottom: 16px; }
.field label, .toolbar-grid label { display: block; font-weight: 700; }
.field label span, .toolbar-grid label span { display: block; margin-bottom: 8px; }
input[type="text"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.12); }
.option-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.option-pill {
  display: flex; gap: 10px; align-items: flex-start; min-height: 56px; padding: 12px 14px;
  border-radius: 16px; border: 1px solid #cbd5e1; background: #fff;
}
.option-pill input { width: 18px; height: 18px; margin-top: 2px; }
.required { color: #dc2626; }
.sticky-bar {
  position: sticky; bottom: 10px; z-index: 10; padding: 12px; background: rgba(245,247,251,.94);
  border: 1px solid var(--border); border-radius: 18px; backdrop-filter: blur(6px);
}
.toolbar-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom: 14px; }
.response-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 14px;
}
.response-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.response-title { margin: 0; font-size: 1.05rem; }
.response-meta { color: var(--muted); font-size: .92rem; }
.response-preview { line-height: 1.55; margin: 12px 0; }
.response-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.empty-state { text-align: center; padding: 22px; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 18px; }
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { padding: 14px 16px; border-radius: 16px; color: #fff; font-weight: 700; box-shadow: var(--shadow); }
.toast.info { background: var(--primary); }
.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); }
.toast.danger { background: var(--danger); }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .62); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 80;
}
.modal { width: min(980px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 22px; padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.detail-item { border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: #fbfdff; }
.detail-item strong { display: block; margin-bottom: 6px; }
.tag { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #dff7f2; color: #0f766e; font-size: .86rem; }
@media (max-width: 860px) {
  .tab, .btn, .jump-link { width: 100%; }
  .toolbar-grid { grid-template-columns: 1fr; }
  .sticky-bar { display: grid; grid-template-columns: 1fr; }
}
