:root {
  --bg: #f4f7fb;
  --bg-2: #eef3fa;
  --card: #ffffff;
  --text: #17212b;
  --muted: #667586;
  --line: #dfe6ee;
  --accent: #2459c4;
  --accent-2: #1c49a8;
  --accent-soft: #eef4ff;
  --accent-ring: rgba(36, 89, 196, .13);
  --success: #18794e;
  --success-soft: #eaf7f0;
  --danger: #b42318;
  --warning: #8a6100;
  --warning-soft: #fff7df;
  --shadow: 0 20px 55px rgba(28, 44, 67, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Telugu", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(36,89,196,.08), transparent 31%),
    radial-gradient(circle at 90% 88%, rgba(34,137,94,.05), transparent 30%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 46%, var(--bg-2) 100%);
  padding: clamp(10px, 2.5vw, 26px);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.shell { width: min(780px, 100%); margin: 0 auto; }
.card { background: rgba(255,255,255,.96); border: 1px solid rgba(218,226,235,.95); border-radius: 26px; box-shadow: var(--shadow); backdrop-filter: blur(7px); }
.survey-card { padding: clamp(18px, 4.5vw, 36px); min-height: min(720px, calc(100vh - 68px)); display: flex; flex-direction: column; }
.preview-banner { margin: -6px -6px 18px; padding: 10px 13px; border-radius: 12px; background: var(--warning-soft); color: var(--warning); border: 1px solid #f1df9c; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.preview-dot { width: 8px; height: 8px; border-radius: 50%; background: #c58900; box-shadow: 0 0 0 4px rgba(197,137,0,.10); }
.hidden { display: none !important; }

.topbar { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-bottom: clamp(22px, 4vw, 34px); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.brand-mark svg { width: 27px; height: 27px; }
.eyebrow { display: block; color: var(--accent); font-weight: 800; font-size: 11px; letter-spacing: .055em; text-transform: uppercase; margin-bottom: 2px; }
.compact-title { color: #3d4b5b; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.lang-switch { display: flex; flex-shrink: 0; background: #f3f5f8; border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.lang-btn { border: 0; background: transparent; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-weight: 750; }
.lang-btn.active { background: white; color: var(--accent); box-shadow: 0 1px 5px rgba(16,24,40,.12); }

.intro-panel { text-align: center; max-width: 650px; margin: auto; width: 100%; padding: 6px 0 12px; }
.hero-icon { width: 82px; height: 82px; border-radius: 24px; display: grid; place-items: center; margin: 4px auto 22px; background: linear-gradient(145deg, #edf4ff, #f8fbff); color: var(--accent); border: 1px solid #dbe8fb; box-shadow: 0 10px 30px rgba(36,89,196,.11); }
.hero-icon svg { width: 54px; height: 54px; }
h1 { font-size: clamp(30px, 5.5vw, 46px); line-height: 1.08; letter-spacing: -.025em; margin: 0 auto; max-width: 670px; }
h2 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 34px); line-height: 1.18; }
p { line-height: 1.55; }
.hero-copy { font-size: clamp(16px, 2.5vw, 18px); color: #536274; max-width: 610px; margin: 18px auto 0; }
.quick-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0 24px; }
.fact { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: #fbfcfe; color: #465567; font-size: 13px; font-weight: 700; padding: 10px; }
.fact-icon { color: var(--accent); font-size: 16px; }
.primary, .secondary { border-radius: 13px; padding: 12px 18px; font-weight: 800; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.primary { background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(36,89,196,.18); }
.primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.primary:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary { background: white; color: var(--text); border-color: var(--line); }
.secondary:hover { background: #f8fafc; }
.start-btn { width: min(390px, 100%); min-height: 54px; margin: 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; }
.consent-note { color: var(--muted); font-size: 12px; max-width: 560px; margin: 14px auto 0; }
.about-box { text-align: left; max-width: 560px; margin: 20px auto 0; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.about-box summary { cursor: pointer; width: fit-content; margin: 0 auto; font-size: 12px; font-weight: 750; color: #566579; }
.about-box p { font-size: 12px; margin: 10px 0 0; text-align: center; }

.survey-stage { width: 100%; max-width: 650px; margin: auto; }
.progress-wrap { margin: 0 0 27px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.progress-track { height: 8px; background: #edf1f5; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #4a7ee6); width: 10%; border-radius: inherit; transition: width .25s ease; }
.progress-hint { min-height: 18px; margin-top: 7px; color: var(--success); font-size: 12px; font-weight: 750; text-align: right; }
.question-number { color: var(--accent); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .055em; }
.question-title { font-size: clamp(23px, 4.2vw, 31px); line-height: 1.23; margin: 8px 0 22px; letter-spacing: -.014em; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: flex; align-items: center; gap: 13px; padding: 14px 15px; min-height: 54px; border: 1px solid var(--line); border-radius: 15px; transition: .14s ease; background: #fff; cursor: pointer; }
.option:hover { border-color: #b9c9e5; background: #fcfdff; transform: translateY(-1px); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-ui { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b8c2ce; flex: 0 0 auto; display: grid; place-items: center; background: #fff; }
.option.selected .radio-ui { border-color: var(--accent); }
.option.selected .radio-ui::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.option span.option-label { line-height: 1.36; font-weight: 650; color: #293646; }
.select-wrap select { width: 100%; min-height: 56px; padding: 14px 44px 14px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--text); font-weight: 650; }
.nav-row { display: grid; grid-template-columns: auto minmax(160px, 230px); justify-content: space-between; align-items: center; gap: 14px; margin-top: 27px; }
.back-link { border: 0; background: transparent; color: var(--muted); font-weight: 800; padding: 10px 2px; }
.back-link:hover { color: var(--text); }
.next-btn { min-height: 49px; }
.validation { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: right; }

.completion { text-align: center; max-width: 600px; margin: auto; padding: 28px 10px 18px; }
.checkmark { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 24px; margin: 0 auto 21px; background: var(--success-soft); color: var(--success); font-size: 37px; font-weight: 900; transform: rotate(-3deg); }
.checkmark.muted { background: #f0f2f5; color: #66717d; }
.complete-kicker { color: var(--success); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 900; margin-bottom: 8px; }
.completion p { color: #566579; font-size: 15px; }
.completion-divider { width: 58px; height: 1px; background: var(--line); margin: 23px auto; }
.share-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.share-actions button { min-width: 150px; }
.footer { display: flex; justify-content: center; padding: 13px 5px 0; color: var(--muted); font-size: 11px; text-align: center; }

/* Dashboard */
.dashboard-shell { width: min(1120px, 100%); margin: 0 auto; }
.dashboard-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 20px; }
.dashboard-header h1 { font-size: clamp(24px,4vw,34px); }
.dashboard-controls { display: flex; gap: 8px; align-items: center; }
.dashboard-controls input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 220px; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(5, minmax(0,1fr)); margin-bottom: 16px; }
.metric-card { padding: 18px; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.metric-value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.metric-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.two-col { grid-template-columns: 1fr 1fr; }
.panel { padding: 20px; }
.panel h3 { margin: 0 0 16px; }
.bar-row { margin: 11px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.bar-track { height: 9px; border-radius: 20px; background: #edf0f3; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); }
.status-banner { margin-bottom: 16px; padding: 13px 16px; border-radius: 12px; background: #fff8e8; border: 1px solid #f3dfaa; font-size: 13px; color: #755818; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 760px) {
  body { padding: 8px; }
  .survey-card { border-radius: 20px; min-height: calc(100vh - 42px); padding: 18px 16px 20px; }
  .topbar { align-items: flex-start; margin-bottom: 22px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .eyebrow { font-size: 9.5px; }
  .compact-title { max-width: 210px; font-size: 11px; }
  .lang-switch { border-radius: 10px; }
  .lang-btn { padding: 7px 8px; font-size: 12px; }
  .hero-icon { width: 70px; height: 70px; border-radius: 21px; margin-bottom: 18px; }
  .hero-icon svg { width: 45px; height: 45px; }
  h1 { font-size: clamp(30px, 9vw, 40px); }
  .quick-facts { grid-template-columns: 1fr; gap: 7px; margin: 22px 0 20px; }
  .fact { min-height: 43px; justify-content: flex-start; padding-left: 15px; }
  .survey-stage { margin-top: 4px; }
  .question-title { font-size: clamp(22px, 6.2vw, 28px); }
  .option { min-height: 52px; padding: 13px 14px; }
  .nav-row { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 22%); margin: 24px -2px -2px; padding: 21px 2px 2px; z-index: 2; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .dashboard-header { align-items: flex-start; flex-direction: column; }
  .dashboard-controls { width: 100%; flex-wrap: wrap; }
  .dashboard-controls input { flex: 1; min-width: 0; }
}

@media (max-width: 480px) {
  .brand-lockup { gap: 8px; }
  .compact-title { display: none; }
  .survey-card { min-height: calc(100vh - 30px); }
  .intro-panel { margin-top: 2px; }
  .hero-copy { font-size: 15px; }
  .nav-row { grid-template-columns: 85px 1fr; }
  .next-btn { width: 100%; }
  .share-actions { display: grid; grid-template-columns: 1fr; }
  .share-actions button { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Dashboard v2 */
.admin-login-wrap { min-height: calc(100vh - 52px); display: grid; place-items: center; }
.admin-login-card { width: min(460px, 100%); padding: clamp(26px, 5vw, 42px); text-align: center; }
.admin-lock { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 20px; background: var(--accent-soft); font-size: 28px; }
.admin-login-card h1 { font-size: clamp(28px, 5vw, 38px); margin: 5px 0 10px; }
.admin-login-card > p { color: var(--muted); font-size: 14px; margin: 0 auto 24px; max-width: 360px; }
.admin-login-form { text-align: left; display: grid; gap: 10px; }
.admin-login-form label { color: #465567; font-size: 12px; font-weight: 800; }
.admin-login-form input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; background: #fff; }
.admin-login-form input:focus { outline: 3px solid var(--accent-ring); border-color: var(--accent); }
.admin-login-form .primary { min-height: 50px; margin-top: 4px; }
.login-message { min-height: 20px; color: var(--danger); font-size: 12px; text-align: center; }
.admin-security-note { margin: 8px auto 0 !important; font-size: 11px !important; color: #7a8795 !important; }
.dashboard-caption { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.metrics-six { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-value-small { font-size: 23px; line-height: 1.1; min-height: 31px; display: flex; align-items: center; }
.coverage-summary { display: flex; align-items: baseline; gap: 10px; min-height: 65px; }
.coverage-summary strong { font-size: 42px; line-height: 1; }
.coverage-summary span { color: var(--muted); font-size: 13px; font-weight: 700; }
.panel-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.panel-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-heading-row h3 { margin-bottom: 12px; }
.empty-state { color: var(--muted); font-size: 13px; margin: 0; }
.empty-cell { color: var(--muted); text-align: center; padding: 24px 8px; }
.dashboard-footer { color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; padding: 18px 8px 4px; }

@media (max-width: 900px) {
  .metrics-six { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .metrics-six { grid-template-columns: 1fr; }
  .dashboard-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-controls button { width: 100%; }
}
