:root {
  color-scheme: dark;
  --bg: #111426;
  --panel: #191d35;
  --panel-soft: #202545;
  --line: #30395e;
  --text: #f2f4ff;
  --muted: #b2bad8;
  --faint: #8590b5;
  --pink: #a78bfa;
  --pink-bright: #c4b5fd;
  --lilac: #67c8ff;
  --danger: #ff8298;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); position: relative; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.page-glow { pointer-events: none; position: absolute; z-index: -1; width: 480px; height: 480px; border-radius: 50%; filter: blur(110px); opacity: .22; }
.page-glow-one { top: 40px; left: -230px; background: #743dff; }
.page-glow-two { top: 360px; right: -260px; background: #087bff; }
.site-header { height: 78px; max-width: 1180px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: -.3px; }
.brand i { color: var(--pink); font-style: normal; }
.brand-logo { display: block; width: 40px; height: 40px; flex: 0 0 auto; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.nav-button { border: 0; padding: 10px 15px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 10px; cursor: pointer; }
.nav-button:hover, .nav-button.active { color: var(--text); background: rgba(255,255,255,.07); }
.nav-button span { color: var(--pink); margin-left: 3px; }
.hero { position: relative; max-width: 1180px; margin: auto; padding: 88px 28px 72px; text-align: center; }
.eyebrow, .section-kicker { color: var(--pink); font-size: 10px; font-weight: 700; letter-spacing: 1.65px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 23px; background: linear-gradient(100deg, rgba(132,87,255,.13), rgba(54,149,255,.13), rgba(63,215,203,.1)); border: 1px solid rgba(148,145,255,.3); border-radius: 99px; letter-spacing: .8px; font-size: 11px; padding: 9px 13px; }
.eyebrow-star { font-size: 13px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 17px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(36px, 5.3vw, 61px); line-height: 1.13; letter-spacing: -1.7px; }
h1 em { color: transparent; background: linear-gradient(100deg, #bba2ff, #65bfff 55%, #66e0d1); background-clip: text; -webkit-background-clip: text; font-weight: 600; }
.hero > p { color: var(--muted); font-size: 14px; }
.hero-decoration { position: absolute; inset: auto 0 30px; color: #bca3ff; opacity: .8; font-size: 17px; }
.hero-decoration span { position: absolute; }
.hero-decoration span:first-child { left: 18%; bottom: 8px; }
.hero-decoration span:nth-child(2) { right: 19%; bottom: 28px; color: #5bc8ff; font-size: 12px; }
.hero-decoration span:last-child { left: 74%; bottom: 4px; font-size: 12px; }
.content-section { max-width: 1124px; margin: 0 auto; padding: 15px 28px 80px; }
.section-heading, .admin-heading, .responses-heading, .questions-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-heading { margin-bottom: 24px; }
h2 { font-family: "Playfair Display", Georgia, serif; font-size: 27px; letter-spacing: -.4px; margin: 8px 0 0; }
.soft-label { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); color: var(--muted); border-radius: 99px; font-size: 11px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8ed3b2; box-shadow: 0 0 10px #8ed3b255; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.public-card, .login-card { border: 1px solid var(--line); background: linear-gradient(140deg, rgba(31,36,68,.96), rgba(22,27,51,.96)); border-radius: 16px; }
.public-card { padding: 23px; }
.card-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.card-number { color: var(--pink); font-family: "Playfair Display", Georgia, serif; font-size: 19px; }
.card-tag { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.public-card h3 { font-family: "Playfair Display", Georgia, serif; font-size: 22px; margin: 0 0 8px; }
.card-description { color: var(--muted); font-size: 13px; line-height: 1.65; white-space: pre-wrap; margin: 0 0 20px; }
.public-question { margin: 18px 0; }
.public-question > label, .stack-form label, .editor-fields > label, .schedule-fields label { display: block; color: #e6dce9; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.required-mark { color: var(--pink); margin-left: 3px; }
.input-control, .stack-form input, .editor-fields input:not([type=checkbox]), .editor-fields textarea, .question-card input[type=text], .question-card textarea, .question-card select { display: block; width: 100%; margin-top: 8px; border: 1px solid #3a456f; outline: 0; border-radius: 9px; background: #12162a; color: var(--text); padding: 11px 12px; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.input-control:focus, .stack-form input:focus, .editor-fields input:focus, .editor-fields textarea:focus, .question-card input:focus, .question-card textarea:focus, .question-card select:focus { border-color: #748dff; box-shadow: 0 0 0 3px rgba(102,146,255,.15); }
textarea.input-control, .editor-fields textarea, .question-card textarea { resize: vertical; min-height: 85px; }
.input-control::placeholder, input::placeholder, textarea::placeholder { color: #766b7e; }
.choice-list { display: grid; gap: 9px; margin-top: 11px; }
.choice-item { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; cursor: pointer; }
.choice-item input, .toggle-row input, .required-toggle input { accent-color: #8d78ff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 39px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { background: linear-gradient(110deg, #9a72ff, #5c9dff); color: #fff; box-shadow: 0 5px 17px rgba(90,105,255,.18); }
.button-primary:hover { background: linear-gradient(110deg, #ae8dff, #74b3ff); }
.button-outline { border-color: #51425c; color: #e4d7e9; background: transparent; }
.button-outline:hover { background: rgba(255,255,255,.06); }
.button-quiet { color: var(--muted); background: transparent; }
.button-danger { color: #f0a0aa; background: rgba(229,139,155,.08); border-color: rgba(229,139,155,.2); }
.button-danger:hover { background: rgba(229,139,155,.16); }
.full-button { width: 100%; }
.submit-response { margin-top: 8px; min-width: 145px; }
.empty-state { min-height: 145px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1px dashed #493c53; border-radius: 14px; color: var(--muted); padding: 22px; grid-column: 1/-1; }
.empty-state p { font-size: 13px; margin: 6px 0 0; line-height: 1.6; }
.loading-mark, .empty-icon { color: var(--lilac); font-size: 25px; }
.empty-icon { font-size: 31px; }
.login-card { width: min(100%, 410px); margin: 28px auto; padding: 30px; text-align: center; }
.login-icon { width: 47px; height: 47px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 14px; background: linear-gradient(140deg, #302a62, #1d4670); font-size: 19px; }
.login-card h2 { margin: 9px 0; }
.login-card > p { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.stack-form { text-align: left; }
.stack-form label { margin-bottom: 16px; }
.stack-form input { padding: 12px; }
.form-message { min-height: 16px; margin: 10px 0 0; color: var(--pink); font-size: 12px; }
.hidden { display: none !important; }
.admin-heading { align-items: center; margin: 25px 0; }
.admin-layout { display: grid; grid-template-columns: 235px minmax(0,1fr); gap: 18px; align-items: start; }
.admin-sidebar, .admin-workspace { border: 1px solid var(--line); border-radius: 14px; background: rgba(33,26,41,.86); }
.admin-sidebar { padding: 15px; }
.sidebar-title { margin: 23px 4px 10px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.admin-form-list { display: grid; gap: 6px; }
.admin-form-item { width: 100%; padding: 11px 9px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 8px; cursor: pointer; }
.admin-form-item:hover, .admin-form-item.selected { background: #30243a; border-color: #49364f; }
.admin-form-name { display: block; overflow: hidden; color: #eee3f0; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.admin-form-meta { display: flex; gap: 6px; align-items: center; margin-top: 7px; color: var(--faint); font-size: 10px; }
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: #8ed3b2; }
.mini-dot.off { background: #877c8b; }
.admin-empty { min-height: 310px; border: 0; }
.admin-empty h3 { margin: 12px 0 0; font-family: "Playfair Display", Georgia, serif; font-size: 20px; color: var(--text); }
.admin-workspace { padding: 22px; min-width: 0; }
.editor-title-row { margin-bottom: 18px; }
.editor-title-row h3, .responses-heading h3 { font-family: "Playfair Display", Georgia, serif; font-size: 22px; margin: 6px 0 0; }
.editor-fields { display: grid; gap: 15px; }
.editor-fields > label { margin: 0; }
.editor-fields input:not([type=checkbox]), .editor-fields textarea { font-weight: 400; }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.schedule-fields input { color-scheme: dark; }
.toggle-row { display: flex !important; align-items: center; gap: 10px; width: fit-content; color: var(--muted) !important; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-ui { position: relative; width: 34px; height: 19px; border-radius: 99px; background: #51465a; transition: background .2s; }
.toggle-ui::after { content: ""; position: absolute; width: 13px; height: 13px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .2s; }
.toggle-row input:checked + .toggle-ui { background: linear-gradient(90deg, #916bff, #4f9dff); }
.toggle-row input:checked + .toggle-ui::after { transform: translateX(15px); }
.questions-heading { align-items: center; margin: 27px 0 13px; }
.questions-heading h4 { margin: 5px 0 0; font-family: "Playfair Display", Georgia, serif; font-size: 18px; }
.question-editor { display: grid; gap: 10px; }
.question-card { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 160px; gap: 9px 13px; padding: 14px; border: 1px solid #403348; border-radius: 10px; background: rgba(19,15,24,.4); }
.question-card > label { min-width: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.question-card input[type=text], .question-card textarea, .question-card select { font-size: 12px; }
.question-card .question-text-label { grid-column: 1; }
.question-card .question-type-label { grid-column: 2; grid-row: 1; }
.question-card .options-label { grid-column: 1/-1; }
.question-bottom { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; }
.required-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.required-toggle input { accent-color: #dc91b6; }
.remove-question { padding: 5px 8px; border: 0; background: transparent; color: #dc91a0; font-size: 11px; cursor: pointer; }
.editor-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.responses-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.responses-heading { align-items: center; margin-bottom: 15px; }
.responses-heading h3 { display: flex; align-items: center; gap: 10px; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; color: var(--pink); background: rgba(240,168,201,.12); font-family: "DM Sans", sans-serif; font-size: 10px; }
.responses-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.responses-actions .button { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #3c3045; border-radius: 9px; }
.responses-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.responses-table th, .responses-table td { min-width: 120px; max-width: 240px; padding: 11px 12px; border-bottom: 1px solid #342a3c; vertical-align: top; overflow-wrap: anywhere; }
.responses-table th { color: var(--faint); background: #241d2a; font-size: 9px; letter-spacing: .6px; text-transform: uppercase; }
.responses-table td { color: #d9cddd; }
.responses-table tr:last-child td { border-bottom: 0; }
.delete-response { border: 0; color: #e993a2; background: transparent; cursor: pointer; font-size: 11px; }
.table-empty { padding: 25px; text-align: center; color: var(--muted); font-size: 12px; }
.site-footer { max-width: 1124px; margin: 0 auto; padding: 21px 28px 26px; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.07); color: var(--faint); font-size: 11px; }
.footer-spark { color: #64caff; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 32px)); padding: 13px 17px; border: 1px solid #515e9a; border-radius: 10px; background: #202747; color: var(--text); font-size: 12px; box-shadow: 0 10px 35px #0005; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 700px) {
  .site-header { height: auto; min-height: 68px; padding: 12px 17px; gap: 8px; }
  .brand { gap: 7px; font-size: 12px; }
  .brand-logo { width: 34px; height: 34px; }
  .main-nav { gap: 0; }
  .nav-button { padding: 9px 8px; font-size: 11px; }
  .hero { padding: 64px 19px 57px; }
  h1 { font-size: clamp(34px, 8.7vw, 48px); letter-spacing: -1.2px; }
  .hero > p { max-width: 310px; margin: auto; font-size: 13px; line-height: 1.6; }
  .content-section { padding: 12px 17px 56px; }
  .section-heading { align-items: flex-start; }
  h2 { font-size: 23px; }
  .soft-label { padding: 7px 9px; font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .public-card { padding: 19px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { padding: 12px; }
  .admin-form-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sidebar-title { margin-top: 16px; }
  .admin-workspace { padding: 17px; }
  .responses-heading { align-items: flex-start; flex-direction: column; }
  .responses-actions { width: 100%; }
  .schedule-fields { grid-template-columns: 1fr; gap: 0; }
  .question-card { grid-template-columns: 1fr; }
  .question-card .question-text-label, .question-card .question-type-label, .question-card .options-label, .question-bottom { grid-column: 1; grid-row: auto; }
  .questions-heading { align-items: flex-start; flex-direction: column; }
  .site-footer { padding: 18px 17px 22px; gap: 12px; font-size: 10px; }
}

@media (max-width: 390px) {
  .brand { max-width: 145px; font-size: 11px; }
  .nav-button { font-size: 10px; padding: 8px 6px; }
  .section-heading { flex-direction: column; gap: 12px; }
  .admin-heading { align-items: flex-start; }
  .admin-heading h2 { font-size: 22px; }
}
