/* =========================================================
   Encuesta Estudiantil - Deutsche Schule Los Ángeles
   Sistema de diseño institucional
   ========================================================= */

:root{
  --bg:            #F1F3F6;
  --surface:       #FFFFFF;
  --surface-alt:   #F7F9FC;
  --navy:          #12233F;
  --navy-2:        #22406B;
  --navy-soft:     #E8EDF5;
  --red:           #C8102E;
  --gold:          #E8B800;
  --ink:           #161A20;
  --muted:         #626C7C;
  --muted-2:       #8B95A5;
  --line:          #E2E6EC;
  --ok:            #12805C;
  --ok-soft:       #E7F5EF;
  --warn:          #D97706;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 1px 2px rgba(18,35,63,.05), 0 10px 30px rgba(18,35,63,.07);
  --shadow-sm:     0 1px 2px rgba(18,35,63,.06), 0 4px 12px rgba(18,35,63,.05);
  --font:          "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background-color:var(--bg);
  background-image:
    radial-gradient(1200px 420px at 50% -180px, rgba(34,64,107,.13), rgba(34,64,107,0) 70%);
  background-repeat:no-repeat;
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

.wrap{ max-width:940px; margin:0 auto; padding:0 16px; }

/* ---------------- Encabezado ---------------- */

.topbar{
  background:var(--surface);
  border-top:3px solid var(--navy);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 3px rgba(18,35,63,.04);
  position:sticky; top:0; z-index:50;
}
.topbar-in{
  max-width:940px; margin:0 auto; padding:10px 16px;
  display:flex; align-items:center; gap:14px;
}
.topbar img.logo{ width:46px; height:auto; display:block; flex:0 0 auto; }
.brand{ min-width:0; flex:1 1 auto; }
.brand .b1{
  font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2); line-height:1.2;
}
.brand .b2{
  font-size:17px; font-weight:700; color:var(--navy); line-height:1.25;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* ---------------- Botones ---------------- */

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font); font-size:15px; font-weight:600;
  padding:11px 20px; border-radius:10px; border:1.5px solid transparent;
  cursor:pointer; text-decoration:none; transition:.15s ease;
  -webkit-appearance:none; appearance:none;
}
.btn-primary{ background:var(--navy); color:#fff; }
.btn-primary:hover{ background:var(--navy-2); }
.btn-primary:active{ transform:translateY(1px); }
.btn-ghost{ background:#fff; color:var(--navy); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--navy); background:var(--surface-alt); }
.btn-lg{ font-size:17px; padding:15px 30px; border-radius:12px; width:100%; max-width:420px; }
.btn-sm{ font-size:13px; padding:7px 14px; border-radius:8px; }
.btn:disabled{ opacity:.45; cursor:default; }

/* ---------------- Tarjeta base ---------------- */

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

/* ---------------- Bloque de la pregunta ---------------- */

.q-shell{ padding:22px 0 60px; max-width:720px; margin:0 auto; }

.q-head{ margin-bottom:16px; }

.q-meta{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); margin-bottom:8px;
}
.q-meta .pct{ color:var(--navy); letter-spacing:0; font-size:13px; }

.progress{
  height:8px; border-radius:99px; background:var(--line);
  overflow:hidden; margin-bottom:20px;
}
.progress > i{
  display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg, var(--navy), var(--navy-2));
  transition:width .45s cubic-bezier(.2,.8,.2,1);
}

.q-text{
  margin:0; font-size:23px; line-height:1.35; font-weight:700; color:var(--navy);
  letter-spacing:-.01em;
}
.q-text .num{
  display:inline-block; background:var(--navy-soft); color:var(--navy);
  font-size:13px; font-weight:700; padding:3px 10px; border-radius:99px;
  vertical-align:middle; margin-right:10px; letter-spacing:.02em;
}

/* ---------------- Tira de profesores ---------------- */

.tstrip{
  display:flex; align-items:center; gap:10px;
  margin:20px 0 14px; padding:4px 2px 10px;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.tstrip::-webkit-scrollbar{ height:5px; }
.tstrip::-webkit-scrollbar-thumb{ background:#CFD6E0; border-radius:99px; }

.tdot{
  position:relative; flex:0 0 auto; width:40px; height:40px; padding:0;
  border-radius:50%; border:2px solid var(--line); background:#fff;
  cursor:pointer; overflow:visible; transition:.18s ease;
}
.tdot img{
  width:100%; height:100%; border-radius:50%; object-fit:cover; display:block;
  filter:grayscale(100%); opacity:.55; transition:.18s ease;
}
.tdot:hover img{ opacity:.85; }
.tdot.done{ border-color:var(--ok); }
.tdot.done img{ filter:none; opacity:1; }
.tdot.now{
  border-color:var(--navy); transform:scale(1.16);
  box-shadow:0 0 0 4px rgba(18,35,63,.10);
}
.tdot.now img{ filter:none; opacity:1; }
.tdot .tick{
  position:absolute; right:-3px; bottom:-3px; width:16px; height:16px;
  border-radius:50%; background:var(--ok); border:2px solid #fff;
  display:none; align-items:center; justify-content:center;
}
.tdot.done .tick{ display:flex; }
.tdot .tick svg{ width:8px; height:8px; }

.tcount{
  flex:0 0 auto; margin-left:4px; font-size:12px; font-weight:700;
  color:var(--muted); white-space:nowrap;
}

/* ---------------- Tarjeta del profesor ---------------- */

.tcard{ display:none; padding:22px; animation:cardIn .28s ease both; }
.tcard.on{ display:block; }

@keyframes cardIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:none; }
}

.tprof{ display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.tprof .ph{
  width:82px; height:82px; flex:0 0 auto; border-radius:14px; overflow:hidden;
  border:1px solid var(--line); background:var(--surface-alt);
}
.tprof .ph img{ width:100%; height:100%; object-fit:cover; display:block; }
.tprof .nm{ min-width:0; }
.tprof .nm h3{
  margin:0 0 5px; font-size:19px; font-weight:700; color:var(--navy); line-height:1.25;
}
.tprof .nm .sub{ font-size:13px; color:var(--muted); line-height:1.45; }
.tprof .nm .sub span{
  display:inline-block; background:var(--surface-alt); border:1px solid var(--line);
  border-radius:99px; padding:2px 9px; margin:2px 4px 2px 0; font-size:12px;
  color:var(--muted); white-space:nowrap;
}

/* ---------------- Opciones ---------------- */

.opts{ display:flex; flex-direction:column; gap:9px; }

.opt{
  display:flex; align-items:center; gap:13px; width:100%; text-align:left;
  font-family:var(--font); font-size:16px; font-weight:600; color:var(--ink);
  background:#fff; border:1.5px solid var(--line); border-radius:12px;
  padding:13px 15px; min-height:56px; cursor:pointer; transition:.14s ease;
  -webkit-appearance:none; appearance:none; -webkit-tap-highlight-color:transparent;
}
.opt:hover{ border-color:var(--navy-2); background:var(--surface-alt); }
.opt .mark{
  flex:0 0 auto; width:22px; height:22px; border-radius:50%;
  border:2px solid #C6CEDA; background:#fff; position:relative; transition:.14s ease;
}
.opt .mark::after{
  content:''; position:absolute; inset:4px; border-radius:50%;
  background:#fff; transform:scale(0); transition:.14s ease;
}
.opt .lb{ flex:1 1 auto; }
.opt .pts{
  flex:0 0 auto; font-size:11px; font-weight:700; color:var(--muted-2);
  background:var(--surface-alt); border:1px solid var(--line);
  border-radius:99px; padding:2px 8px;
}
.opt.sel{ border-color:var(--navy); background:var(--navy); color:#fff; }
.opt.sel .mark{ border-color:#fff; }
.opt.sel .mark::after{ transform:scale(1); }
.opt.sel .pts{ color:#fff; background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.28); }
.opt.na{ border-style:dashed; color:var(--muted); font-weight:600; }
.opt.na.sel{ color:#fff; border-style:solid; }

.opt .faces{ flex:0 0 auto; display:flex; gap:3px; }
.opt .faces svg{ width:26px; height:26px; display:block; }
.opt .face-ok{ color:var(--ok); }
.opt .face-no{ color:var(--warn); }
.opt.sel .face-ok, .opt.sel .face-no{ color:#fff; }

/* ---------------- Navegación / estados ---------------- */

.qnav{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:18px;
}
.qnav .spacer{ flex:1 1 auto; }

.saving{
  display:inline-flex; align-items:center; gap:7px;
  font-size:13px; font-weight:600; color:var(--muted); min-height:22px;
}
.spin{
  width:15px; height:15px; border-radius:50%;
  border:2px solid var(--line); border-top-color:var(--navy);
  animation:spin .7s linear infinite; display:inline-block;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

.done-panel{
  display:none; text-align:center; padding:34px 22px;
  border:1px solid var(--line); border-radius:var(--radius);
  background:linear-gradient(180deg, var(--ok-soft), #fff 60%);
  box-shadow:var(--shadow-sm);
}
.done-panel.on{ display:block; animation:cardIn .3s ease both; }
.done-panel .ico{
  width:52px; height:52px; border-radius:50%; background:var(--ok); color:#fff;
  display:flex; align-items:center; justify-content:center; margin:0 auto 14px;
}
.done-panel .ico svg{ width:26px; height:26px; }
.done-panel h3{ margin:0 0 6px; font-size:20px; color:var(--navy); font-weight:700; }
.done-panel p{ margin:0 0 20px; font-size:14px; color:var(--muted); }

.note{
  margin-top:26px; padding:14px 18px; border-radius:12px;
  background:#fff; border:1px solid var(--line); border-left:4px solid var(--gold);
  font-size:13.5px; color:var(--muted); line-height:1.55;
}
.note b{ color:var(--navy); }

/* ---------------- Comentarios finales ---------------- */

.fin-head{ text-align:center; padding:34px 0 8px; }
.fin-head h2{ margin:0 0 10px; font-size:26px; font-weight:700; color:var(--navy); letter-spacing:-.01em; }
.fin-head p{ margin:0 auto; max-width:620px; font-size:15px; color:var(--muted); }
.fin-head .warn{
  display:inline-block; margin-top:14px; padding:9px 16px; border-radius:10px;
  background:#FEF2F3; border:1px solid #F6CDD3; color:var(--red);
  font-size:13.5px; font-weight:600;
}

.cgrid{ display:flex; flex-direction:column; gap:12px; margin:24px auto; max-width:720px; }

.ccard{ padding:16px 18px; }
.ccard .hd{ display:flex; align-items:center; gap:12px; margin-bottom:11px; }
.ccard .hd img{
  width:42px; height:42px; border-radius:50%; object-fit:cover;
  border:1px solid var(--line); flex:0 0 auto;
}
.ccard .hd .n{ font-size:15px; font-weight:700; color:var(--navy); }
.ccard .hd .o{ font-size:12px; color:var(--muted-2); font-weight:600; }

textarea.ta{
  width:100%; font-family:var(--font); font-size:15px; color:var(--ink);
  border:1.5px solid var(--line); border-radius:10px; padding:11px 13px;
  background:var(--surface-alt); resize:vertical; min-height:76px;
  transition:.14s ease; line-height:1.5;
}
textarea.ta:focus{ outline:none; border-color:var(--navy); background:#fff; }
textarea.ta::placeholder{ color:var(--muted-2); }

.ccard.general{ border-left:4px solid var(--navy); }

.fin-send{ text-align:center; padding:8px 0 60px; }

.thanks{ text-align:center; padding:70px 20px; }
.thanks .ico{
  width:76px; height:76px; border-radius:50%; background:var(--ok); color:#fff;
  display:flex; align-items:center; justify-content:center; margin:0 auto 22px;
}
.thanks .ico svg{ width:38px; height:38px; }
.thanks h2{ margin:0 0 10px; font-size:27px; color:var(--navy); font-weight:700; }
.thanks p{ margin:0; font-size:16px; color:var(--muted); }

/* ---------------- Login ---------------- */

.login-wrap{
  min-height:calc(100vh - 74px);
  display:flex; align-items:center; justify-content:center; padding:36px 16px 60px;
}
.login-card{ width:100%; max-width:412px; padding:34px 30px; text-align:center; }
.login-card img.lg{ width:96px; height:auto; margin:0 auto 18px; display:block; }
.login-card h1{ margin:0 0 6px; font-size:22px; font-weight:700; color:var(--navy); letter-spacing:-.01em; }
.login-card .sub{
  font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2); margin-bottom:26px;
}
.field{ text-align:left; margin-bottom:18px; }
.field label{
  display:block; font-size:12px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted); margin-bottom:7px;
}
.field input{
  width:100%; font-family:var(--font); font-size:19px; letter-spacing:.02em;
  padding:13px 15px; border:1.5px solid var(--line); border-radius:11px;
  background:var(--surface-alt); color:var(--ink); transition:.14s ease;
  -webkit-appearance:none; appearance:none;
}
.field input:focus{ outline:none; border-color:var(--navy); background:#fff; }
.field .hint{ font-size:12.5px; color:var(--muted-2); margin-top:7px; }

.alert{
  display:flex; align-items:flex-start; gap:10px; text-align:left;
  background:#FEF2F3; border:1px solid #F6CDD3; color:#8E1523;
  border-radius:11px; padding:12px 14px; font-size:13.5px; font-weight:600;
  margin-bottom:20px; line-height:1.45;
}

.foot{
  text-align:center; font-size:12px; color:var(--muted-2);
  padding:26px 16px 34px;
}

/* ---------------- Responsive ---------------- */

@media (max-width:600px){
  body{ font-size:15px; }
  .topbar-in{ padding:9px 14px; gap:11px; }
  .topbar img.logo{ width:38px; }
  .brand .b2{ font-size:15px; }
  .brand .b1{ font-size:10px; }
  .q-shell{ padding:16px 0 48px; }
  .q-text{ font-size:19px; }
  .tcard{ padding:16px 15px; }
  .tprof{ gap:13px; margin-bottom:16px; }
  .tprof .ph{ width:64px; height:64px; border-radius:12px; }
  .tprof .nm h3{ font-size:16.5px; }
  .opt{ font-size:15px; padding:12px 13px; min-height:54px; gap:11px; }
  .opt .faces svg{ width:22px; height:22px; }
  .tdot{ width:36px; height:36px; }
  .btn-lg{ font-size:16px; padding:14px 22px; }
  .fin-head h2{ font-size:21px; }
  .login-card{ padding:28px 22px; }
}

@media print{ .topbar,.qnav{ display:none; } }
