/* ==========================================================================
   Expo Tech para Negocios 2027 · COPARMEX Hidalgo
   Paleta tomada del logotipo de COPARMEX Hidalgo + acento naranja de Expo Tech
   ========================================================================== */
:root {
  --navy: #0a1a6c;
  --navy-900: #06114a;
  --blue: #0048b4;
  --sky: #0a6ccc;
  --sky-50: #e8f1fc;
  --silver: #a0b0c8;
  --silver-200: #d5dde9;
  --mist: #eef2f8;
  --paper: #ffffff;
  --orange: #ff6401;

  --ink: #0e1838;
  --ink-2: #44506e;
  --ink-3: #7a86a1;
  --line: #dfe5ef;

  --ok: #12805c;
  --danger: #c62f3c;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 26, 108, .06), 0 8px 28px rgba(10, 26, 108, .08);
  --shadow-lg: 0 24px 60px rgba(10, 26, 108, .18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(100% - 32px, 820px); margin-inline: auto; }
.container-wide { width: min(100% - 32px, 1200px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; }

/* ---------- Header con ambos logotipos ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(160, 176, 200, .35);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 76px;
}
.brand-lockup { display: flex; align-items: center; gap: 18px; text-decoration: none; min-width: 0; }
.brand-lockup .logo-expo { height: 46px; width: auto; }
.brand-lockup .divider {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--silver), transparent);
}
.brand-lockup .by { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-lockup .by small {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.brand-lockup .logo-coparmex { height: 52px; width: auto; }
.header-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  background: var(--sky-50); border-radius: 999px; padding: 7px 14px; white-space: nowrap;
}
.header-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

/* ---------- Héroe con ondas plateadas (inspiradas en COPARMEX) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 45%, var(--blue) 100%);
  color: #fff;
  padding: 56px 0 120px;
}
.hero .waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .container { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--silver-200);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px; padding: 6px 12px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -.02em;
  margin: 18px 0 14px; font-weight: 800; max-width: 18ch;
}
.hero p.lead { font-size: clamp(16px, 2vw, 18px); color: #d9e2f2; max-width: 56ch; margin: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: 14px; color: #c7d3ea; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; opacity: .9; }

/* ---------- Formulario ---------- */
.form-wrap { margin-top: -80px; position: relative; z-index: 2; padding-bottom: 64px; }
.progress-sticky {
  position: sticky; top: 76px; z-index: 20;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 20px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.progress-track { flex: 1; height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  border-radius: 999px; transition: width .35s ease;
}
.progress-label { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.q-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin-bottom: 14px;
  border: 2px solid transparent;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.q-card:focus-within { border-color: rgba(10, 108, 204, .35); box-shadow: 0 0 0 6px rgba(10, 108, 204, .08), var(--shadow); }
.q-card.has-error { border-color: rgba(198, 47, 60, .5); }
.q-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.q-num {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--sky-50); color: var(--blue); font-weight: 800; font-size: 14px;
  transition: background .2s, color .2s;
}
.q-card.is-done .q-num { background: var(--blue); color: #fff; }
.q-title { font-size: 18px; font-weight: 700; line-height: 1.35; margin: 4px 0 0; color: var(--navy); }
.q-title .req { color: var(--orange); margin-left: 2px; }
.q-help { font-size: 14px; color: var(--ink-3); margin: 4px 0 0; }
.q-body { padding-left: 48px; }
.q-error { color: var(--danger); font-size: 13px; font-weight: 600; margin: 10px 0 0; display: none; }
.q-card.has-error .q-error { display: block; }

.input, .textarea, .select {
  width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfcfe; padding: 13px 15px; font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--sky); background: #fff; box-shadow: 0 0 0 4px rgba(10, 108, 204, .14);
}
.input::placeholder, .textarea::placeholder { color: #a5afc4; }

/* Chips de opciones */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fbfcfe;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: all .15s; user-select: none; cursor: pointer;
}
.chip span::before {
  content: ""; width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--silver); background: #fff;
  border-radius: 5px; transition: all .15s;
}
.chip input[type=radio] + span::before { border-radius: 50%; }
.chip:hover span { border-color: var(--silver); background: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(10, 108, 204, .2); }
.chip input:checked + span {
  background: var(--sky-50); border-color: var(--sky); color: var(--navy); font-weight: 600;
}
.chip input:checked + span::before {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.chip input[type=radio]:checked + span::before { background: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.other-input { margin-top: 12px; display: none; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-grid .field { display: block; margin: 0; }
.contact-grid .field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.contact-grid .field em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.other-input.show { display: block; animation: fade .2s ease; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 20px;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .1s, box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  box-shadow: 0 8px 22px rgba(0, 72, 180, .3);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(0, 72, 180, .42); }
.btn-lg { padding: 16px 28px; font-size: 17px; border-radius: 14px; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--mist); color: var(--navy); }
.btn-soft { background: var(--sky-50); color: var(--blue); }
.btn-soft:hover { background: #d9e8fa; }
.btn-danger { background: #fdecee; color: var(--danger); }
.btn-danger:hover { background: #fadadd; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn-icon { padding: 8px; border-radius: 9px; }

.submit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 28px;
}
.privacy { font-size: 13px; color: var(--ink-3); margin: 0; max-width: 46ch; }
.form-alert {
  display: none; margin-bottom: 14px; padding: 14px 18px; border-radius: 12px;
  background: #fdecee; color: var(--danger); font-weight: 600; font-size: 14px;
}
.form-alert.show { display: block; }
.hp { position: absolute; left: -9999px; }

/* Pantalla de agradecimiento */
.thanks {
  display: none; text-align: center;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 56px 28px;
}
.thanks.show { display: block; animation: rise .45s ease; }
.thanks .check {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  box-shadow: 0 12px 32px rgba(0, 72, 180, .35);
}
.thanks .check svg { width: 38px; height: 38px; }
.thanks h2 { color: var(--navy); font-size: 28px; margin: 0 0 8px; letter-spacing: -.01em; }
.thanks p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b8c4dc; padding: 32px 0; font-size: 14px; }
.site-footer .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-logos { display: flex; align-items: center; gap: 18px; }
.footer-logos img { height: 34px; width: auto; opacity: .95; }
.footer-logos img + .divider + img { height: 44px; }
.footer-logos .divider { width: 1px; height: 26px; background: rgba(255, 255, 255, .2); }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copyright { margin: 0; }

@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .site-header .bar { height: 64px; }
  .progress-sticky { top: 64px; }
  .brand-lockup { gap: 12px; }
  .brand-lockup .logo-expo { height: 34px; }
  .brand-lockup .logo-coparmex { height: 40px; }
  .brand-lockup .divider { height: 30px; }
  .brand-lockup .by small { display: none; }
  .header-chip { display: none; }
  .hero { padding: 40px 0 110px; }
  .q-card { padding: 20px 18px; }
  .q-body { padding-left: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .q-title { font-size: 17px; }
  .submit-row { padding: 20px 18px; }
  .submit-row .btn { width: 100%; }
  .chip span { font-size: 14px; padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ==========================================================================
   Panel de administración
   ========================================================================== */
.admin body, body.admin { background: #f3f6fb; }
.admin-header .bar { height: 68px; }
.admin-header .brand-lockup .logo-expo { height: 38px; }

.admin-title { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.admin-actions { display: flex; align-items: center; gap: 8px; }

.tabs {
  display: flex; gap: 4px; padding: 4px; background: var(--paper);
  border-radius: 14px; box-shadow: var(--shadow); width: max-content; max-width: 100%; overflow-x: auto;
}
.tab {
  border: 0; background: transparent; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.tab:hover { color: var(--navy); background: var(--mist); }
.tab[aria-selected=true] { background: var(--navy); color: #fff; }
.tab .count { font-size: 12px; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 1px 8px; }
.tab[aria-selected=false] .count { background: var(--mist); }

.security-alert {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 24px;
  background: #fdecee; border: 1.5px solid rgba(198, 47, 60, .35); color: #7d1c25;
  border-radius: 14px; padding: 16px 20px; font-size: 14px;
}
.security-alert[hidden] { display: none; }
.security-alert svg { width: 22px; height: 22px; flex: none; color: var(--danger); margin-top: 1px; }
.security-alert b { display: block; color: var(--danger); margin-bottom: 2px; }
.security-alert code { background: rgba(255, 255, 255, .7); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 20px; }
.admin-top h1 { font-size: 26px; margin: 0; letter-spacing: -.01em; color: var(--navy); }
.admin-top p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.panel { display: none; padding-bottom: 56px; }
.panel.active { display: block; animation: fade .2s ease; }

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); line-height: 1.35; }
.card .sub { margin: 0 0 18px; font-size: 13px; color: var(--ink-3); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 20px 22px; }
.kpi .k-label { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0; }
.kpi .k-value { font-size: 34px; font-weight: 800; color: var(--navy); margin: 6px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .k-foot { font-size: 13px; color: var(--ink-3); margin: 0; }
.kpi .up { color: var(--ok); font-weight: 700; }
.kpi .down { color: var(--danger); font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }

/* Gráfica de columnas (respuestas por día) */
.timeline { position: relative; }
.timeline svg { width: 100%; height: 190px; display: block; overflow: visible; }
.timeline .grid line { stroke: #e9edf4; stroke-width: 1; }
.timeline .grid text, .timeline .axis text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.timeline .col { fill: var(--sky); transition: fill .1s; }
.timeline .hit { fill: transparent; cursor: pointer; }
.timeline .hit:hover + .col, .timeline .col.hover { fill: var(--blue); }

/* Barras horizontales (distribución por pregunta) */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; position: relative; }
.hbar .h-label { font-size: 13px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .h-val { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.hbar .h-val b { color: var(--ink); font-weight: 700; }
.hbar .h-track { grid-column: 1 / -1; height: 10px; background: var(--mist); border-radius: 4px; }
.hbar .h-fill { height: 100%; background: var(--sky); border-radius: 0 4px 4px 0; min-width: 2px; transition: width .5s ease; }
.hbar.is-other .h-fill { background: var(--silver); }
.hbar:hover .h-fill { background: var(--blue); }
.hbar.is-other:hover .h-fill { background: #8698b6; }
.others { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.others p { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag b { color: var(--navy); }
.tag { font-size: 12px; background: var(--mist); color: var(--ink-2); padding: 4px 10px; border-radius: 999px; }

.quotes { display: flex; flex-direction: column; gap: 10px; }
.quote { font-size: 14px; color: var(--ink); background: #f7f9fc; border-left: 3px solid var(--sky); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.quote small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 4px; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--navy-900); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .1s; white-space: nowrap;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-size: 14px; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty svg { width: 44px; height: 44px; color: var(--silver); margin: 0 auto 10px; }
.empty h4 { color: var(--ink-2); margin: 0 0 4px; font-size: 16px; }
.empty p { margin: 0; font-size: 14px; }

/* Respuestas */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search .input { padding-left: 42px; background: var(--paper); }
.resp-list { display: flex; flex-direction: column; gap: 10px; }
.resp {
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  border: 1.5px solid transparent;
}
.resp[open] { border-color: rgba(10, 108, 204, .25); }
.resp summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
}
.resp summary::-webkit-details-marker { display: none; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font-weight: 800; font-size: 15px;
}
.resp .who { min-width: 0; }
.resp .who b { display: block; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resp .who span { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resp .date { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.resp .chev { width: 20px; height: 20px; color: var(--ink-3); transition: transform .2s; }
.resp[open] .chev { transform: rotate(180deg); }
.resp-body { padding: 4px 20px 20px 78px; display: grid; gap: 14px; }
.resp-body dt { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.resp-body dd { margin: 0; font-size: 15px; color: var(--ink); white-space: pre-wrap; }
.resp-body dd.na { color: var(--ink-3); font-style: italic; }
.resp-body .archived dt::after { content: " · pregunta archivada"; text-transform: none; font-weight: 500; letter-spacing: 0; }
.resp-foot { display: flex; justify-content: flex-end; }

/* Preguntas (gestión) */
.limit {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 20px;
}
.limit .meter { flex: 1; height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.limit .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 999px; transition: width .3s; }
.limit.full .meter i { background: var(--orange); }
.limit span { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-item {
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow);
  padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
}
.q-item .q-num { width: 32px; height: 32px; }
.q-item h4 { margin: 0; font-size: 15px; color: var(--navy); line-height: 1.35; }
.q-item .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); }
.badge.blue { background: var(--sky-50); color: var(--blue); }
.badge.orange { background: #fff0e6; color: #b84700; }
.q-item .actions { display: flex; gap: 4px; }
.q-item.archived { opacity: .7; box-shadow: none; border: 1.5px dashed var(--silver-200); background: transparent; }
.section-label { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin: 24px 0 10px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 17, 74, .45);
  backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop.show { display: flex; animation: fade .15s ease; }
.modal { background: var(--paper); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(100%, 600px); }
.modal-head { padding: 22px 26px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 20px; color: var(--navy); }
.modal-body { padding: 18px 26px; display: grid; gap: 16px; }
.modal-foot { padding: 0 26px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.field .input, .field .select, .field .textarea { font-size: 15px; padding: 11px 13px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-grid .chip span { width: 100%; border-radius: 12px; }
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt-row { display: flex; gap: 6px; align-items: center; }
.opt-row .input { padding: 9px 12px; font-size: 14px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--silver-200); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(16px); }
.switches { display: flex; gap: 22px; flex-wrap: wrap; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy) 50%, var(--blue)); }
.login-wrap .waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-card { position: relative; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 36px 32px; width: min(100%, 400px); }
.login-card .logos { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 26px; }
.login-card .logos img:first-child { height: 40px; }
.login-card .logos img:last-child { height: 48px; }
.login-card .logos .divider { width: 1px; height: 34px; background: var(--line); }
.login-card h1 { font-size: 20px; text-align: center; margin: 0 0 4px; color: var(--navy); }
.login-card > p { text-align: center; color: var(--ink-3); font-size: 14px; margin: 0 0 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card .back { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-3); text-decoration: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 120;
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .admin-title { display: none; }
  .resp summary { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .resp .date { display: none; }
  .avatar { width: 40px; height: 40px; }
  .resp-body { padding: 4px 18px 18px; }
  .kpi .k-value { font-size: 28px; }
  .q-item { grid-template-columns: minmax(0, 1fr); }
  .q-item .q-num { display: none; }
}
