/* =============================================================
   Corlido Group — ISO 27001 Vragenlijst Portaal
   Brand: Oranje #FF7F00 | Navy #0E2D46 | Blauw #5BC1F3
   ============================================================= */

:root {
  --primary:      #FF7F00;
  --primary-dark: #e07000;
  --navy:         #0E2D46;
  --navy-dark:    #091f30;
  --blue:         #5BC1F3;
  --bg:           #F1F5FD;
  --white:        #ffffff;
  --text:         #363636;
  --muted:        #6c757d;
  --border:       #dde3ee;
  --success:      #28a745;
  --danger:       #dc3545;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 2px 10px rgba(14,45,70,0.09);
  --shadow-lg:    0 8px 36px rgba(14,45,70,0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth Page ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 60%, #0d2840 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,127,0,0.06);
  top: -200px; right: -100px;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(91,193,243,0.05);
  bottom: -150px; left: -100px;
  pointer-events: none;
}

.auth-container { width: 100%; max-width: 440px; padding: 1.25rem; position: relative; z-index: 1; }

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo img { height: 42px; }

.auth-title { text-align: center; color: var(--navy); font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-subtitle { text-align: center; color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Form Controls ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

label { font-size: 0.875rem; font-weight: 600; color: var(--navy); }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
select,
textarea {
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,127,0,0.14);
}

textarea { resize: vertical; min-height: 100px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.25rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.15s; text-decoration: none; white-space: nowrap;
}

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled)   { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,127,0,0.3); }

.btn-navy      { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover:not(:disabled)      { background: var(--navy-dark); }

.btn-outline   { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-outline:hover:not(:disabled)   { border-color: var(--navy); background: var(--bg); }

.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled)    { background: #c82333; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-azure {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
  width: 100%;
  margin-top: 0.75rem;
  position: relative;
}

.badge-soon {
  position: absolute; top: -9px; right: -9px;
  background: var(--blue); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Auth divider ────────────────────────────────────────────── */
.auth-divider { text-align: center; margin: 1.25rem 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { position: relative; background: var(--white); padding: 0 0.75rem; color: var(--muted); font-size: 0.8125rem; }

.auth-help { text-align: center; margin-top: 1.5rem; font-size: 0.8125rem; color: var(--muted); }
.auth-help a { color: var(--primary); text-decoration: none; }
.auth-help a:hover { text-decoration: underline; }

.error-message {
  background: #fdecea; color: var(--danger);
  padding: 0.625rem 0.875rem; border-radius: var(--radius);
  font-size: 0.875rem; border-left: 3px solid var(--danger);
}

.success-message {
  background: #e9f7ef; color: #1e7e34;
  padding: 0.625rem 0.875rem; border-radius: var(--radius);
  font-size: 0.875rem; border-left: 3px solid var(--success);
}

/* ── App Layout ──────────────────────────────────────────────── */
.app-layout { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  background: var(--navy);
  color: #fff;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-brand { display: flex; align-items: center; gap: 1rem; }

.header-logo { height: 34px; }

.header-sep { width: 1px; height: 32px; background: rgba(255,255,255,0.2); margin: 0 0.25rem; }

.header-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.header-title small { display: block; font-size: 0.75rem; font-weight: 400; opacity: 0.65; }

.header-right { display: flex; align-items: center; gap: 0.875rem; }

.user-chip {
  display: flex; align-items: center; gap: 0.625rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
  padding: 0.3rem 0.875rem 0.3rem 0.3rem;
}

.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8125rem; color: #fff;
  flex-shrink: 0;
}

.user-name { font-size: 0.875rem; opacity: 0.9; }

.admin-badge {
  background: var(--primary); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8125rem; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

/* ── Questionnaire ───────────────────────────────────────────── */
.app-main { flex: 1; padding: 2rem; max-width: 860px; margin: 0 auto; width: 100%; }

.intro-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--primary);
  display: flex; align-items: flex-start; gap: 1rem;
}

.intro-icon { font-size: 2rem; flex-shrink: 0; }

.intro-card h2 { color: var(--navy); font-size: 1.2rem; margin-bottom: 0.25rem; }
.intro-card p  { color: var(--muted); font-size: 0.9rem; }
.intro-card .period-tag {
  display: inline-block;
  background: var(--navy); color: #fff;
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  margin-top: 0.5rem;
}

.progress-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1rem 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
  position: sticky; top: 64px; z-index: 10;
}

.progress-meta { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.4rem; }
.progress-meta strong { color: var(--navy); }

.progress-bar { height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--blue)); border-radius: 4px; transition: width 0.35s ease; }

.section-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem 2rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}

.section-label {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--primary);
  margin-bottom: 1.5rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg);
}

.question-block { margin-bottom: 2rem; }
.question-block:last-child { margin-bottom: 0; }

.q-label {
  display: flex; align-items: flex-start; gap: 0.625rem;
  font-size: 0.9875rem; font-weight: 600; color: var(--navy);
  margin-bottom: 0.875rem; line-height: 1.5;
}

.q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

.options-list { display: flex; flex-direction: column; gap: 0.5rem; }

.option-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.option-item:hover { border-color: #aac0d8; background: rgba(14,45,70,0.02); }
.option-item.checked { border-color: var(--primary); background: rgba(255,127,0,0.05); }

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0; margin-top: 2px;
  accent-color: var(--primary);
  border: none; box-shadow: none;
}

.option-text { font-size: 0.9375rem; color: var(--text); line-height: 1.45; }

/* Confirmation */
.confirm-card {
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
}

.confirm-card h3 { margin-bottom: 1rem; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }

.confirm-item {
  display: flex; align-items: flex-start; gap: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  cursor: pointer; transition: background 0.15s;
  user-select: none;
}

.confirm-item:hover { background: rgba(255,255,255,0.15); }
.confirm-item.checked { background: rgba(255,127,0,0.25); border-color: var(--primary); }
.confirm-item input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; margin-top: 1px; }
.confirm-item p { font-size: 0.9rem; opacity: 0.95; line-height: 1.5; }

.form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; padding-bottom: 3rem; }

/* Success state */
.state-success {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 4rem 2rem; text-align: center;
}

.success-circle {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; font-size: 2.75rem;
}

.state-success h2 { color: var(--navy); font-size: 1.5rem; margin-bottom: 0.625rem; }
.state-success p  { color: var(--muted); max-width: 420px; margin: 0 auto; }
.state-success .ts { margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted); }

/* Loading state */
.state-loading { text-align: center; padding: 4rem; color: var(--muted); }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.75s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin Dashboard ─────────────────────────────────────────── */
.admin-wrap { flex: 1; padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.page-head h1 { color: var(--navy); font-size: 1.5rem; font-weight: 700; }
.page-head p  { color: var(--muted); font-size: 0.875rem; margin-top: 0.2rem; }

.period-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--navy); color: #fff;
  padding: 0.375rem 0.875rem; border-radius: 20px;
  font-size: 0.8125rem; font-weight: 600;
  white-space: nowrap;
}

.period-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }

.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
  border-top: 4px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.c-orange { border-top-color: var(--primary); }
.stat-card.c-green  { border-top-color: var(--success); }
.stat-card.c-red    { border-top-color: var(--danger); }
.stat-card.c-blue   { border-top-color: var(--blue); }

.stat-val  { font-size: 2.5rem; font-weight: 800; color: var(--navy); line-height: 1; margin-bottom: 0.25rem; }
.stat-lbl  { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; }

.tab-btn {
  padding: 0.75rem 1.375rem;
  border: none; background: none;
  font-size: 0.9375rem; font-weight: 600; font-family: inherit;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover:not(.active) { color: var(--navy); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Table */
.table-box { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }

.table-toolbar {
  padding: 1.125rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}

.toolbar-left  { display: flex; align-items: center; gap: 0.75rem; flex: 1; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 0.75rem; }

.search-wrap { position: relative; flex: 1; min-width: 180px; max-width: 280px; }
.search-wrap svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap input { padding-left: 2.25rem; }

.filter-select { width: auto; min-width: 130px; padding: 0.5rem 2rem 0.5rem 0.75rem; font-size: 0.875rem; }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.75rem 1.25rem;
  text-align: left; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); background: var(--bg);
  border-bottom: 1px solid var(--border);
}

tbody td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable:hover { background: rgba(14,45,70,0.03); cursor: pointer; }

.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.2rem 0.625rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700;
}
.badge-green   { background: #e6f4ea; color: #1e7e34; }
.badge-red     { background: #fdecea; color: #c0392b; }
.badge-orange  { background: #fff3e0; color: #e65100; }
.badge-blue    { background: #e3f2fd; color: #1565c0; }
.badge-navy    { background: #e8eef4; color: var(--navy); }

/* Table empty */
.table-empty { text-align: center; padding: 3.5rem 2rem; color: var(--muted); }
.table-empty-icon { font-size: 2.75rem; margin-bottom: 0.75rem; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(9,31,48,0.55);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 1000; padding: 2rem 1rem; overflow-y: auto;
}
.modal-bg.hidden { display: none; }

.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 780px;
  box-shadow: var(--shadow-lg); margin: auto;
}

.modal-head {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: #fff;
}

.modal-head h3 { font-size: 1rem; }
.modal-head p  { font-size: 0.8rem; opacity: 0.7; margin-top: 0.2rem; }

.modal-close {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-body { padding: 1.75rem 2rem; max-height: 72vh; overflow-y: auto; }

.answer-block { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.answer-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.answer-q { font-size: 0.8125rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.375rem; }
.answer-a { color: var(--navy); font-size: 0.9375rem; line-height: 1.5; }
.answer-a.list li { margin-bottom: 0.25rem; }

/* Form card */
.form-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem 2rem; box-shadow: var(--shadow); margin-bottom: 1.25rem;
}

.form-card h3 { color: var(--navy); font-size: 1rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--bg); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.csv-hint { font-size: 0.8125rem; color: var(--muted); margin-top: 0.375rem; }
.csv-hint code { background: var(--bg); padding: 0.1rem 0.375rem; border-radius: 4px; font-family: monospace; font-size: 0.8rem; }

/* Period list */
.period-list { display: flex; flex-direction: column; gap: 0.75rem; }

.period-row {
  background: var(--white); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-left: 4px solid var(--border);
}
.period-row.active-period { border-left-color: var(--success); }
.period-row h4 { color: var(--navy); font-size: 0.9375rem; }
.period-row p  { color: var(--muted); font-size: 0.8125rem; margin-top: 0.2rem; }

/* ── Responsive ──────────────────────────────────────────────── */
/* ── Questionnaire Builder ───────────────────────────────────── */
.q-view-section { margin-bottom: 1.25rem; }
.q-view-section-title {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--primary);
  margin-bottom: 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg);
}

.q-view-item {
  display: flex; gap: 0.875rem;
  padding: 0.875rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); margin-bottom: 0.5rem; background: var(--bg);
}
.q-view-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.q-view-text { font-size: 0.9rem; font-weight: 600; color: var(--navy); margin-bottom: 0.375rem; }
.q-view-opts { font-size: 0.8125rem; color: var(--muted); }
.q-view-opts li { margin-bottom: 0.15rem; }

.q-builder-item {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white);
}
.q-builder-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.q-builder-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.q-builder-head input[type="text"] { flex: 1; min-width: 0; font-size: 0.875rem; }
.q-builder-head select { width: auto; min-width: 170px; font-size: 0.875rem; }
.q-remove-btn {
  background: none; border: none; color: var(--muted);
  font-size: 1.25rem; cursor: pointer; line-height: 1;
  padding: 0.25rem; border-radius: 4px; flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.q-remove-btn:hover { color: var(--danger); background: #fdecea; }

.q-builder-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.875rem; }
.q-builder-body textarea { font-size: 0.9375rem; }

.q-options-builder { display: flex; flex-direction: column; gap: 0.5rem; }
.q-option-row { display: flex; gap: 0.5rem; align-items: center; }
.q-option-row input { flex: 1; font-size: 0.875rem; }
.q-opt-remove {
  background: none; border: none; color: var(--muted);
  font-size: 1rem; cursor: pointer; padding: 0.25rem 0.5rem;
  border-radius: 4px; flex-shrink: 0;
  transition: color 0.15s;
}
.q-opt-remove:hover { color: var(--danger); }
.q-add-opt-btn {
  background: none; border: 1px dashed var(--border);
  color: var(--primary); font-size: 0.8125rem; font-weight: 600;
  padding: 0.375rem 0.75rem; border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s; align-self: flex-start;
}
.q-add-opt-btn:hover { border-color: var(--primary); background: rgba(255,127,0,0.05); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .app-header { padding: 0 1rem; }
  .app-main, .admin-wrap { padding: 1rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .user-name { display: none; }
  .table-toolbar { flex-direction: column; }
  .search-wrap { max-width: 100%; }
  .modal-body { padding: 1.25rem; }
}
