/* Fitt V2 — modo claro con la misma paleta de marca del 7mo semestre (brand board CCC / portal EV4).
 * Regla: la esmeralda (#2CC295) es relleno y acento; para texto chico se usa --esmeralda-txt o --bosque (contraste AA).
 * Contrastes verificados sobre blanco: texto 19.4 · gris 5.8 · esmeralda-txt 5.5 · rojo 5.4 · ámbar-txt 5.9.
 */
:root {
  color-scheme: light;
  --negro: #00100D;          /* tinta principal y texto sobre esmeralda */
  --bg: #F1F7F6;             /* niebla: fondo de todas las interfaces */
  --panel: #FFFFFF;          /* tarjetas, campos, hojas */
  --panel-2: #E4F1ED;        /* superficies secundarias, pistas vacías */
  --bosque: #03624C;
  --esmeralda: #2CC295;
  --esmeralda-txt: #03785C;
  --claro: #00DF81;
  --fondo: #F1F7F6;
  --texto: #00100D;
  --gris: #4D6C64;
  --gris-medio: #9AB5AE;     /* bordes de controles, interruptor apagado (no es texto) */
  --linea: rgba(3, 98, 76, 0.16);
  --sombra: 0 1px 2px rgba(0, 16, 13, .05), 0 6px 18px rgba(0, 16, 13, .05);
  --rojo: #C2334D;
  --ambar: #FFC233;
  --ambar-txt: #8A5A00;
  /* V2.5 · tarjetas por tema (observación del profesor Bauti, 27-oct): cada color dice de qué se trata.
     V2.5c: borde de color y relleno en degradado hacia blanco, como la tarjeta de ausencia (no relleno sólido). */
  --amarillo-bg: #FFF6D9; --amarillo-borde: rgba(230,166,0,.55);   /* atención, recordatorios y datos útiles */
  --azul: #1F6FB2; --azul-bg: #EAF2FB; --azul-borde: rgba(31,111,178,.32); /* ayuda y contacto con el staff */
  --lila: #5B3E99; --lila-bg: #F2EEFA; --lila-borde: rgba(91,62,153,.28);  /* comunidad */
  --menta-bg: #E2F5EE; --menta-borde: rgba(3,120,92,.3);           /* progreso y logros */
  --fd: 'Plus Jakarta Sans', 'Arial', sans-serif;
  --fb: 'Lato', 'Arial', sans-serif;
  --r: 18px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--texto);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--bosque); outline-offset: 2px; }

.app {
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 20px calc(var(--tab-h) + var(--safe-b) + 28px);
  background: radial-gradient(circle at 15% -5%, rgba(44,194,149,.14), transparent 45%), var(--bg);
}
.app.no-tabs { padding-bottom: 32px; }

/* ——— Tipografía ——— */
h1, h2, h3 { font-family: var(--fd); font-weight: 800; margin: 0; line-height: 1.15; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
.eyebrow {
  font-family: var(--fd); font-weight: 800; font-size: 11px; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--esmeralda-txt);
}
.muted { color: var(--gris); }
.small { font-size: 14px; }
.accent { color: var(--esmeralda-txt); }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 22px; }

/* ——— Barra superior ——— */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 14px; }
.topbar h1 { font-size: 22px; flex: 1; }
.back {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--linea);
  background: var(--panel); display: grid; place-items: center; font-size: 20px;
}
.logo { font-family: var(--fd); font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.logo i { font-style: normal; color: var(--esmeralda); }
.version {
  margin-left: auto; font-size: 11px; font-family: var(--fd); font-weight: 700; color: var(--gris-medio);
  border: 1px solid var(--linea); border-radius: 99px; padding: 3px 9px; background: none;
}

/* ——— Tarjetas ——— */
.card {
  background: var(--panel); border: 1px solid var(--linea); border-radius: var(--r); padding: 18px; box-shadow: var(--sombra);
}
.card.hero { background: linear-gradient(145deg, rgba(44,194,149,.24), var(--panel) 72%); border-color: rgba(44,194,149,.45); }
.card.alerta { background: linear-gradient(145deg, #FFF0C7, var(--panel) 75%); border-color: rgba(255,194,51,.6); }
.card.alerta .eyebrow { color: var(--ambar-txt); }
.card-row { display: flex; align-items: center; gap: 14px; }
.card-btn { width: 100%; text-align: left; color: inherit; }
.card-btn:active { transform: scale(.99); }
.chev { margin-left: auto; color: var(--gris); font-size: 20px; }
.ico {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: rgba(44,194,149,.14); border: 1px solid rgba(44,194,149,.35); font-size: 22px;
}

/* ——— Botones ——— */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px;
  border-radius: 16px; border: 0; padding: 14px 18px; font-family: var(--fd); font-weight: 800; font-size: 16px;
  background: var(--esmeralda); color: var(--negro);
}
.btn:active { filter: brightness(.92); }
.btn.secondary { background: var(--panel); color: var(--texto); border: 1.5px solid rgba(3,98,76,.28); }
.btn.ghost { background: none; color: var(--esmeralda-txt); min-height: 44px; }
.btn.danger { background: var(--panel); color: var(--rojo); border: 1.5px solid rgba(194,51,77,.4); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ——— Chips / opciones ——— */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 10px 16px; border-radius: 99px; border: 1.5px solid var(--linea);
  background: var(--panel); font-weight: 700; font-size: 15px;
}
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--esmeralda); color: var(--negro); border-color: var(--esmeralda); }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; min-height: 64px;
  padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--linea); background: var(--panel);
}
.option[aria-checked="true"] { border-color: var(--esmeralda); background: rgba(44,194,149,.14); }
.option .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gris-medio); flex: none; margin-left: auto;
}
.option[aria-checked="true"] .dot { border-color: var(--esmeralda); background: radial-gradient(var(--esmeralda) 45%, transparent 50%); }
.option strong { display: block; font-family: var(--fd); }

/* ——— Formularios ——— */
.field { display: grid; gap: 8px; }
.label { font-family: var(--fd); font-weight: 700; font-size: 15px; }
.hint { font-size: 13px; color: var(--gris); }
.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--linea);
  background: var(--panel); font-size: 16px;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--esmeralda); outline: none; }
.field.invalid .input, .field.invalid .checklist { border-color: var(--rojo); }
.error-msg { display: none; color: var(--rojo); font-size: 14px; font-weight: 700; }
.field.invalid .error-msg { display: block; }
.checklist { display: grid; gap: 0; border: 1.5px solid var(--linea); border-radius: 16px; overflow: hidden; }
.check {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; background: var(--panel);
  border: 0; border-bottom: 1px solid var(--linea); text-align: left; width: 100%;
}
.check:last-child { border-bottom: 0; }
.check .box {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--gris-medio); flex: none;
  display: grid; place-items: center; font-size: 15px; color: var(--negro); font-weight: 900;
}
.check[aria-checked="true"] .box { background: var(--esmeralda); border-color: var(--esmeralda); }
.check small { display: block; color: var(--gris); font-size: 13px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale .chip { padding: 10px 0; border-radius: 12px; text-align: center; }
.scale-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); }
.switch-row { display: flex; align-items: center; gap: 14px; }
.switch-row > div { flex: 1; }
.switch {
  width: 56px; height: 32px; border-radius: 99px; border: 0; background: var(--gris-medio); position: relative; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .18s;
}
.switch[aria-checked="true"] { background: var(--esmeralda); }
.switch[aria-checked="true"]::after { transform: translateX(24px); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--panel); font-size: 20px; }
.stepper output { min-width: 64px; text-align: center; font-family: var(--fd); font-weight: 800; }

/* ——— Onboarding ——— */
.welcome { min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.welcome h1 { font-size: 34px; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots span { height: 6px; flex: 1; border-radius: 99px; background: var(--panel-2); }
.progress-dots span.on { background: var(--esmeralda); }
.promise { display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; }
.promise ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }

/* ——— Métricas / progreso ——— */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--linea); border-radius: 16px; padding: 14px 10px; text-align: center; box-shadow: var(--sombra); }
.stat b { display: block; font-family: var(--fd); font-size: 24px; color: var(--esmeralda-txt); }
.stat span { font-size: 12px; color: var(--gris); }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 130px; margin-top: 14px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: var(--esmeralda); min-height: 4px; }
.bar i.zero { background: var(--panel-2); }
.bar span { font-size: 11px; color: var(--gris); }
.bar em { font-style: normal; font-size: 12px; font-weight: 700; }
.list { display: grid; gap: 10px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: rgba(44,194,149,.16); color: var(--esmeralda-txt);
}
.tag.warn { background: rgba(255,194,51,.25); color: var(--ambar-txt); }

/* ——— Rutinas ——— */
.ex { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.ex:last-child { border-bottom: 0; }
.ex .n { width: 30px; height: 30px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.tip { display: flex; gap: 12px; background: linear-gradient(145deg, rgba(255,194,51,.2), var(--panel) 75%); border: 1px solid rgba(255,194,51,.7); border-radius: 16px; padding: 14px; }
.tip > span { color: var(--ambar-txt); display: flex; flex: none; }

/* ——— Estados (confirmación / error) ——— */
.state { min-height: calc(100vh - 80px); display: flex; flex-direction: column; justify-content: center; gap: 22px; text-align: center; }
.state .big {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 30px; display: grid; place-items: center; font-size: 46px;
  background: rgba(44,194,149,.15); border: 1.5px solid var(--esmeralda);
}
.state.error .big { background: rgba(255,194,51,.2); border-color: var(--ambar); }
.summary { text-align: left; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.summary div:last-child { border-bottom: 0; }
.summary span { color: var(--gris); }

/* ——— Tab bar ——— */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--linea);
  padding-bottom: var(--safe-b); box-shadow: 0 -4px 18px rgba(0,16,13,.05);
}
.tabbar[hidden] { display: none; }
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 440px; height: var(--tab-h); }
.tab {
  background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--gris); font-size: 11px; font-weight: 700; text-decoration: none;
}
.tab .ti { font-size: 21px; line-height: 1; }
.tab[aria-current="page"] { color: var(--esmeralda-txt); }
.tab.plus .ti {
  width: 46px; height: 46px; border-radius: 16px; background: var(--esmeralda); color: var(--negro);
  display: grid; place-items: center; font-size: 26px; font-weight: 800; margin-top: -8px;
}

/* ——— Toast / sheet ——— */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); transform: translateX(-50%);
  z-index: 40; max-width: 400px; width: calc(100% - 32px); background: var(--negro); color: #fff;
  border-radius: 14px; padding: 14px 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,16,13,.25);
  display: flex; align-items: center; gap: 10px;
}
.toast[hidden] { display: none; }
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,16,13,.42); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 440px; max-height: 88vh; overflow: auto; background: var(--panel); border-radius: 24px 24px 0 0;
  border: 1px solid var(--linea); padding: 12px 20px calc(24px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(0,16,13,.12);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--gris-medio); margin: 0 auto 16px; }

/* ——— Panel del moderador (no visible para el participante salvo que se abra) ——— */
.mod-fab {
  position: fixed; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); left: 10px; z-index: 60; border: 1px dashed var(--ambar); color: var(--ambar-txt);
  background: rgba(255,255,255,.95); border-radius: 10px; font-size: 12px; font-weight: 800; padding: 6px 10px;
}
.mod-panel { font-size: 14px; }
.mod-panel h2 { color: var(--ambar-txt); }
.mod-panel .btn { min-height: 44px; font-size: 14px; }
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mod-grid .btn { padding: 8px; }
.mod-log { max-height: 160px; overflow: auto; font-family: ui-monospace, monospace; font-size: 12px; background: var(--panel-2); border-radius: 10px; padding: 10px; color: var(--gris); }
.timer { font-family: var(--fd); font-size: 28px; font-weight: 800; color: var(--ambar-txt); }

/* ═══════════ Sistema Fitt — piezas del sistema ═══════════ */
.daydot { width: 34px; height: 34px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); }
.daydot.on { background: var(--esmeralda); color: var(--negro); font-weight: 900; }
.daydot.today { outline: 2px solid var(--bosque); outline-offset: 2px; }
.llegue { border-color: var(--esmeralda); background: linear-gradient(145deg, rgba(44,194,149,.2), var(--panel) 70%); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qbtn {
  min-height: 84px; border-radius: 16px; border: 1px solid var(--linea); background: var(--panel); box-shadow: var(--sombra); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13px; text-align: center; padding: 8px;
}
.qbtn span { font-size: 24px; }
.ex-btn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--linea); text-align: left; align-items: center; }
.ex-btn:last-child { border-bottom: 0; }
.nfc { width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 56px; position: relative;
  background: radial-gradient(circle, rgba(44,194,149,.25), transparent 70%); border: 2px solid var(--esmeralda); }
.nfc::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(44,194,149,.35); animation: ping 1.8s ease-out infinite; }
.pulse { animation: breathe 1.6s ease-in-out infinite; }
@keyframes ping { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .nfc::after, .pulse { animation: none; } }

/* Estados de socio (status: siempre con texto, nunca solo color) */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.info { color: #1F6FB2; background: rgba(31,111,178,.10); }
.st.ok { color: var(--esmeralda-txt); background: rgba(44,194,149,.16); }
.st.warn { color: var(--ambar-txt); background: rgba(255,194,51,.22); }
.st.serious { color: #B4561B; background: rgba(180,86,27,.10); }
.st.crit { color: var(--rojo); background: rgba(194,51,77,.10); }

/* ——— Escritorio / tablet (recepción, operador, vista sistema) ——— */
.desk { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }
.desk-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.desk-top h1 { font-size: 24px; }
.desk-top .sub { color: var(--gris); font-size: 14px; }
.desk-top .spacer { flex: 1; }
.dtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--linea); }
.dtab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 800; font-family: var(--fd); color: var(--gris); min-height: 44px; }
.dtab[aria-current="page"] { color: var(--texto); border-color: var(--esmeralda); }
.dtab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--ambar); color: var(--negro); font-size: 12px; }
.cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cols, .cols-3 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--linea); border-radius: 16px; padding: 16px; box-shadow: var(--sombra); }
.kpi .v { font-family: var(--fd); font-weight: 800; font-size: 32px; line-height: 1.1; }
.kpi .l { color: var(--gris); font-size: 13px; }
.kpi .d { font-size: 12px; margin-top: 6px; color: var(--gris); }
.panel { background: var(--panel); border: 1px solid var(--linea); border-radius: 18px; padding: 18px; box-shadow: var(--sombra); }
.panel h2 { font-size: 17px; margin-bottom: 4px; }
.panel .hint { margin-bottom: 12px; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow strong { display: block; }
.row .btn { width: auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); font-weight: 800; font-family: var(--fd); }
.alert-card { border-radius: 16px; padding: 14px; border: 1px solid var(--linea); background: var(--panel); display: grid; gap: 8px; box-shadow: var(--sombra); }
.alert-card.regreso { border-color: rgba(44,194,149,.55); background: linear-gradient(145deg, rgba(44,194,149,.16), var(--panel)); }
.alert-card.riesgo { border-color: rgba(255,194,51,.7); background: linear-gradient(145deg, rgba(255,194,51,.14), var(--panel)); }
.alert-card.ayuda { border-color: rgba(31,111,178,.4); background: linear-gradient(145deg, rgba(31,111,178,.08), var(--panel)); }
.alert-card .say { font-style: italic; color: var(--texto); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--gris); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--linea); }
.table td { padding: 10px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 18px; }
.vbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.vbar i { width: 100%; background: var(--esmeralda); border-radius: 4px 4px 0 0; min-height: 2px; }
.vbar span { font-size: 10px; color: var(--gris); margin-top: 4px; }
.vbar:hover i { background: var(--bosque); }
.vbar .tt { display: none; position: absolute; bottom: calc(100% - 10px); background: var(--negro); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; white-space: nowrap; z-index: 2; }
.vbar:hover .tt, .vbar:focus .tt { display: block; }
.hbar { display: grid; grid-template-columns: 170px 1fr 48px; gap: 10px; align-items: center; padding: 8px 0; }
.hbar .track { height: 12px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--esmeralda); border-radius: 99px; }
.hbar b { text-align: right; font-family: var(--fd); }
.funnel { display: grid; gap: 8px; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wizard-steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--panel-2); }
.wizard-steps span.on { background: var(--esmeralda); }
.script { border-left: 3px solid var(--esmeralda); padding: 8px 12px; background: rgba(44,194,149,.10); border-radius: 0 12px 12px 0; font-style: italic; }
.empty { color: var(--gris); text-align: center; padding: 24px 10px; font-size: 14px; }
.desk .input { max-width: 100%; }
.feed-item { display: flex; gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.feed-item time { color: var(--gris); font-variant-numeric: tabular-nums; flex: none; width: 92px; }

/* ——— WhatsApp simulado ——— */
/* Mensajería en tema claro (genérico, sin marca de WhatsApp) */
.wa { max-width: 440px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #EFEAE2; color: #111B21; }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #FFFFFF; border-bottom: 1px solid #E2E5E6; position: sticky; top: 0; z-index: 5; }
.wa-head .avatar { background: var(--negro); color: var(--esmeralda); border-radius: 50%; }
.wa-head small { display: block; color: #667781; font-size: 12px; }
.wa-body { flex: 1; padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 8px;
  background: radial-gradient(circle at 30% 10%, rgba(44,194,149,.08), transparent 50%), #EFEAE2; }
.wa-day { align-self: center; font-size: 12px; background: #FFFFFF; color: #54656F; padding: 4px 10px; border-radius: 8px; margin: 6px 0; box-shadow: 0 1px 1px rgba(11,20,26,.08); }
.bubble { max-width: 84%; padding: 8px 10px 6px; border-radius: 10px; font-size: 15px; line-height: 1.4; position: relative; box-shadow: 0 1px 1px rgba(11,20,26,.1); }
.bubble.in { align-self: flex-start; background: #FFFFFF; border-top-left-radius: 2px; }
.bubble.out { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 2px; }
.bubble .meta { display: block; text-align: right; font-size: 11px; color: #667781; margin-top: 2px; }
.bubble .kind { display: block; font-size: 11px; font-weight: 800; color: var(--esmeralda-txt); margin-bottom: 2px; }
.bubble a { color: #027EB5; }
.wa-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px calc(12px + var(--safe-b)); background: #F0F2F5; border-top: 1px solid #E2E5E6; position: sticky; bottom: 0; }
.wa-replies button { border: 1px solid #D1D7DB; background: #FFFFFF; color: #027EB5; border-radius: 99px; padding: 8px 14px; font-weight: 700; min-height: 40px; }

/* ——— Vista sistema ——— */
.sys-grid { display: grid; grid-template-columns: 380px 380px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1250px) { .sys-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .sys-grid { grid-template-columns: 1fr; } }
.frame { background: var(--panel); border: 1px solid var(--linea); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sombra); }
.frame header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--linea); font-weight: 800; font-family: var(--fd); font-size: 14px; }
.frame header a { margin-left: auto; font-size: 12px; color: var(--esmeralda-txt); }
.frame header .layer { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--gris); }
.frame iframe { border: 0; width: 100%; background: var(--bg); display: block; }
.frame.phone iframe { height: 760px; }
.frame.tablet iframe { height: 760px; }
.frame.wide { grid-column: 1 / -1; }
.frame.wide iframe { height: 820px; }
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 800px) { .layers { grid-template-columns: 1fr; } }
.layer-card { border-radius: 16px; padding: 14px 16px; border: 1px solid var(--linea); background: var(--panel); box-shadow: var(--sombra); }
.layer-card b { font-family: var(--fd); }
.layer-card p { font-size: 13px; color: var(--gris); margin-top: 4px; }
.clock { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clock .btn { width: auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
.clock output { font-family: var(--fd); font-weight: 800; }

/* ——— Imágenes del sistema (generadas para Fitt, ver PROMPTS_IMAGENES.md y PROMPTS_FLOW_MODO_CLARO.md) ——— */
.banner { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--linea); background: var(--panel); }
.banner.tall { height: 240px; }
.banner.wide-banner { height: auto; max-height: 220px; object-fit: contain; background: #F1F7F6; padding: 8px 16px; }
.illus { display: block; width: 100%; border-radius: var(--r); background: #F1F7F6; border: 1px solid var(--linea); }
.illus.small-illus { width: 140px; height: 140px; object-fit: cover; margin: 0 auto; border-radius: 22px; }
.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 18px; flex: none; }
.empty .thumb { display: block; margin: 0 auto 10px; width: 110px; height: 110px; }

/* ——— V2 · Opciones de selección múltiple (casillas) ——— */
.option.multi .dot { border-radius: 7px; display: grid; place-items: center; }
.option.multi[aria-checked="true"] .dot { background: var(--esmeralda); border-color: var(--esmeralda); }
.option.multi[aria-checked="true"] .dot::after { content: '✓'; color: var(--negro); font-weight: 900; font-size: 14px; line-height: 1; }

/* ——— V2 · Rutina propia ——— */
.sheet [hidden] { display: none !important; }
.rt-ex { align-items: flex-start; }
.rt-ex .rt-dosis { min-height: 40px; margin-top: 6px; padding: 8px 12px; font-size: 15px; }
.rt-tools { display: flex; gap: 6px; flex: none; }
.rt-tools .chip { min-height: 40px; min-width: 40px; padding: 6px 10px; }

/* ——— V2 · Testeo remoto (core/testeo.js) ——— */
body.testeo-on .app { padding-top: 84px; }
.ts-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: center;
  background: rgba(3,98,76,.97); backdrop-filter: blur(10px); color: #fff; box-shadow: 0 4px 18px rgba(0,16,13,.15);
}
.ts-bar-inner { width: 100%; max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.ts-bar-inner > div { flex: 1; min-width: 0; }
.ts-bar .eyebrow { color: #BDF5DD; font-size: 10px; }
.ts-bar strong { display: block; font-family: var(--fd); font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-bar .chip { min-height: 38px; padding: 6px 12px; font-size: 13px; background: #fff; color: var(--bosque); border-color: #fff; flex: none; }
.ts-full { position: fixed; inset: 0; z-index: 70; overflow: auto; background: var(--bg); }
.ts-full .app { padding-top: 20px; min-height: 100%; }
.ts-escala { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ts-escala.cinco { grid-template-columns: repeat(5, 1fr); }
.ts-escala .chip { padding: 8px 0; min-width: 0; }
.ts-sus { padding: 14px 0; border-bottom: 1px solid var(--linea); }
.ts-sus:last-child { border-bottom: 0; }
.ts-sus.invalid p { color: var(--rojo); }
.ts-progreso { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.ts-progreso i { display: block; height: 100%; background: var(--esmeralda); }
.ts-sync { font-size: 12px; color: var(--gris); text-align: center; }
a.btn { text-decoration: none; }

/* ——— Iconografía propia de Fitt (V2.5): reemplaza los emojis. Catálogo en /iconos/ ——— */
.fi { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.fi .p { fill: var(--esmeralda); stroke: none; }
.fi.sm { width: 1.2em; height: 1.2em; vertical-align: -0.24em; }
.fi-slot { display: inline-flex; font-style: normal; vertical-align: middle; }
.ico { color: var(--bosque); }
.qbtn span { display: flex; color: var(--bosque); }
.qbtn .fi { width: 28px; height: 28px; }
.state .big { color: var(--bosque); }
.state .big .fi { width: 48px; height: 48px; }
.nfc span { display: flex; color: var(--bosque); }
.nfc .fi { width: 64px; height: 64px; }
.tab .ti { display: flex; }
.tab .ti .fi { width: 24px; height: 24px; }
.tab.plus .ti .fi { stroke-width: 2.4; }
.tip .fi { width: 22px; height: 22px; }
.toast .fi { color: var(--esmeralda); }
.chip[aria-pressed="true"] .fi .p, .chip[aria-checked="true"] .fi .p, .btn .fi .p, .tab.plus .fi .p { fill: var(--negro); }

/* ——— Tarjetas por tema (V2.5) ——— */
.card.amarillo, .qbtn.amarillo { background: linear-gradient(145deg, rgba(255,194,51,.26), var(--panel) 72%); border-color: rgba(255,194,51,.75); }
.card.amarillo .ico { background: rgba(255,194,51,.28); border-color: var(--amarillo-borde); color: var(--ambar-txt); }
.card.amarillo .eyebrow { color: var(--ambar-txt); }
.card.azul, .qbtn.azul { background: linear-gradient(145deg, rgba(31,111,178,.14), var(--panel) 72%); border-color: rgba(31,111,178,.4); }
.card.azul .ico, .qbtn.azul span { background: rgba(31,111,178,.12); border-color: var(--azul-borde); color: var(--azul); }
.qbtn.azul span { background: none; }
.card.azul .eyebrow { color: var(--azul); }
.card.lila, .qbtn.lila { background: linear-gradient(145deg, rgba(91,62,153,.13), var(--panel) 72%); border-color: rgba(91,62,153,.35); }
.card.lila .ico, .qbtn.lila span { background: rgba(91,62,153,.10); border-color: var(--lila-borde); color: var(--lila); }
.qbtn.lila span { background: none; }
.card.lila .eyebrow { color: var(--lila); }
.card.menta { background: linear-gradient(145deg, rgba(44,194,149,.2), var(--panel) 72%); border-color: rgba(44,194,149,.5); }
.card.menta .ico { background: #fff; }
.leyenda-temas { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--gris); }
.leyenda-temas i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid; }

/* V2.5b · íconos con más cuerpo y color propio (pedido del estudiante tras verlo en el celular) */
.fi .f { fill: currentColor; fill-opacity: .16; }
.ico .fi { width: 26px; height: 26px; }
.fi.t-esmeralda { color: var(--esmeralda-txt); }
.fi.t-amarillo { color: #A86A00; }
.fi.t-azul { color: var(--azul); }
.fi.t-lila { color: var(--lila); }
.fi.t-coral { color: var(--rojo); }
.ico:has(> .fi.t-amarillo), .ico.t-amarillo { background: #FFEFC2; border-color: rgba(230,166,0,.5); }
.ico:has(> .fi.t-azul) { background: #E0EDFA; border-color: rgba(31,111,178,.3); }
.ico:has(> .fi.t-lila) { background: #EDE6FA; border-color: rgba(91,62,153,.28); }
.ico:has(> .fi.t-coral) { background: #FCE4E8; border-color: rgba(194,51,77,.28); }
.tab .fi, .btn .fi, .toast .fi, .chip[aria-pressed="true"] .fi, .chip[aria-checked="true"] .fi { color: inherit; }
.toast .fi { color: var(--esmeralda); }
.tab .fi .f { fill-opacity: 0; }
.tab[aria-current="page"] .fi .f { fill-opacity: .18; }
.qbtn .fi { width: 30px; height: 30px; }
