:root {
  --bg: #0b0e17;
  --panel: #141826;
  --panel-2: #1b2030;
  --field: #10131f;
  --line: #262c3d;
  --text: #eef1f7;
  --muted: #8b93ab;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --ok: #34d399;
  --radius: 16px;
  --shadow: 0 12px 34px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(900px 520px at 0% 0%, rgba(99,102,241,.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 26px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,14,23,.85); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .dot {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(99,102,241,.5);
}
.brand h1 { font-size: 19px; margin: 0; letter-spacing: -.2px; }
.brand p { margin: 0; font-size: 12.5px; color: var(--muted); }
.actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

button {
  font: inherit; cursor: pointer; border-radius: 10px;
  border: 1px solid transparent; padding: 8px 14px; transition: .12s; color: var(--text);
}
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
button.primary.big { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; }
button.ghost { background: var(--panel-2); border-color: var(--line); }
button.ghost:hover { background: #232a3d; }
button.ghost.small { padding: 6px 11px; font-size: 13px; }
.hidden { display: none !important; }

main { max-width: 680px; margin: 30px auto 0; padding: 0 20px 60px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 26px 22px;
}
.intro {
  color: var(--muted); font-size: 14.5px; margin: 0 0 22px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}

.survey { display: flex; flex-direction: column; gap: 24px; }
.q { display: flex; flex-direction: column; gap: 9px; }
.q-label { font-size: 15.5px; font-weight: 650; letter-spacing: -.1px; }
.q-label .req { color: var(--brand-2); margin-left: 3px; }

.field {
  width: 100%; font: inherit; color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .12s, box-shadow .12s;
}
textarea.field { min-height: 92px; resize: vertical; }
.field::placeholder { color: #59617a; }
.field:hover { border-color: #39415a; }
.field:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
  background: #131829;
}

/* Radio choices */
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  flex: 1; min-width: 90px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; text-align: center; cursor: pointer;
  background: var(--field); transition: .12s; font-weight: 600;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: #39415a; }
.choice.sel { border-color: var(--brand); background: rgba(99,102,241,.16); color: #fff; }

.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 24px; }
.form-actions .spacer { flex: 1; }

/* Thank-you */
.thanks { text-align: center; margin-top: 18px; }
.thanks .check {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 16px;
  display: grid; place-items: center; font-size: 32px; color: #fff;
  background: linear-gradient(135deg, var(--ok), #10b981);
  box-shadow: 0 10px 26px rgba(16,185,129,.4);
}
.thanks p { font-size: 16px; margin: 0 0 22px; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(4,6,12,.62);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 9vh 16px; overflow-y: auto;
}
.modal-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
  width: 100%; max-width: 440px; padding: 24px; position: relative;
}
.close {
  position: absolute; top: 12px; right: 12px; background: transparent;
  border: 0; font-size: 22px; color: var(--muted); line-height: 1;
  width: 32px; height: 32px; border-radius: 8px;
}
.close:hover { background: var(--panel-2); color: var(--text); }
.modal-card h2 { margin: 0 0 4px; font-size: 20px; }
.form { display: flex; flex-direction: column; gap: 13px; margin-top: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.form input {
  font: inherit; color: var(--text); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.form input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.muted { color: var(--muted); font-size: 13px; }
.statusline { margin: 14px 0 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }

.resp-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }
.resp {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--field);
}
.resp .rhead { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.resp .rname { font-weight: 700; }
.resp .rts { color: var(--muted); font-size: 12px; }
.resp .rbody { margin-top: 6px; font-size: 13px; color: #c7cde0; }
.resp .rbody b { color: var(--muted); font-weight: 600; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.badge.ok { background: rgba(52,211,153,.16); color: var(--ok); }
.badge.pend { background: rgba(251,191,36,.16); color: #fbbf24; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 26px 40px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #0b0e18; border: 1px solid var(--line); color: #fff;
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; font-size: 14px;
}
