/* ==========================================================================
   Plan de Pautas — Main Studio
   Hoja de estilos. Acá vive TODO lo visual: tipografía, colores, calendario.
   Si querés cambiar cómo se ve algo, es acá. La lógica está en app.js.
   ========================================================================== */

/* --- 1. Tokens: los valores que se repiten, definidos una sola vez ------- */
:root {
  /* Tipografía — geométricas limpias, sin serifas */
  --ui: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Space Grotesk', 'Inter Tight', system-ui, sans-serif;

  /* Color de la marca abierta. Cambia solo al entrar a una marca. */
  --marca: #23D9A0;
  --marca-luz: rgba(35,217,160,.12);

  /* Superficies — neutros levemente fríos, más finos que el gris puro */
  --tinta:    #0A0D12;
  --tinta-2:  #12161D;
  --tinta-3:  #1B2029;
  --papel:    #FFFFFF;
  --fondo:    #F6F7F9;
  --fondo-2:  #EFF1F4;

  /* Texto */
  --texto:  #111823;
  --suave:  #5B6577;
  --tenue:  #97A1B0;

  /* Acentos */
  --verde:      #23D9A0;
  --verde-osc:  #0B7A57;
  --verde-luz:  #E7FBF4;
  --rojo:       #E0304A;
  --rojo-luz:   #FDF0F2;
  --ambar:      #C2790B;
  --ambar-luz:  #FDF6E7;
  --azul:       #2563EB;

  /* Líneas y sombras — capas suaves, nada de bordes duros */
  --linea:    rgba(17,24,35,.09);
  --linea-2:  rgba(17,24,35,.05);
  --s-1: 0 1px 2px rgba(10,13,18,.04);
  --s-2: 0 1px 3px rgba(10,13,18,.05), 0 8px 24px -8px rgba(10,13,18,.10);
  --s-3: 0 2px 6px rgba(10,13,18,.06), 0 20px 44px -16px rgba(10,13,18,.16);
  --s-alto: 0 30px 70px -20px rgba(10,13,18,.32);

  --r-xs: 7px;  --r-ch: 11px;  --r-md: 15px;  --r-gr: 20px;
  --sidebar: 262px;
  --ease: cubic-bezier(.22,.75,.28,1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--ui);
  font-size: 14px;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  padding-left: var(--sidebar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
}

h1, h2, h3, h4 { letter-spacing: -.022em; line-height: 1.2; }

.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--tinta); color: #fff; padding: 13px 22px;
  border-radius: 0 0 var(--r-md) 0; font-weight: 700; font-size: 13px;
}
.saltar:focus { left: 0; }
:focus-visible { outline: 2.5px solid var(--verde-osc); outline-offset: 2px; border-radius: 6px; }

/* --- 2. Barra lateral ---------------------------------------------------- */
.sb {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: linear-gradient(180deg, var(--tinta) 0%, #0D1117 100%);
  overflow-y: auto; padding: 22px 13px 34px;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sb::-webkit-scrollbar { width: 5px; }
.sb::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 3px; }

.sb-logo { padding: 0 8px 4px; }
.sb-logo h1 {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  color: #fff; letter-spacing: -.035em; line-height: 1.1;
}
.sb-logo p {
  color: var(--tenue); font-size: 10px; font-weight: 600; margin-top: 3px;
  letter-spacing: .04em; opacity: .75;
}
.sb-lab {
  color: #4C5665; font-size: 9px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; margin: 22px 0 7px; padding: 0 9px;
}
.nav-b {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; padding: 8px 9px; border-radius: var(--r-ch);
  cursor: pointer; text-align: left; margin-bottom: 2px; font-family: inherit;
  transition: background .18s var(--ease), transform .18s var(--ease);
  position: relative;
}
.nav-b:hover { background: rgba(255,255,255,.055); }
.nav-b[aria-current="page"] { background: rgba(255,255,255,.09); }
.nav-b[aria-current="page"]::before {
  content: ''; position: absolute; left: -13px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--verde);
}
.av {
  width: 29px; height: 29px; border-radius: 9px; color: #fff; font-size: 9.5px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .02em;
}
.nav-b .txt { min-width: 0; }
.nav-b .txt b {
  display: block; color: #E9EDF2; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-b .txt i { display: block; color: #6B7686; font-size: 9.5px; font-style: normal; font-weight: 600; }
.pill {
  margin-left: auto; background: var(--rojo); color: #fff; font-size: 9px;
  font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* --- 3. Estructura ------------------------------------------------------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 30px 34px 90px; }

.top { display: flex; align-items: baseline; gap: 15px; flex-wrap: wrap; margin-bottom: 22px; }
.top h1 { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.042em; }
.top .sub { color: var(--suave); font-size: 13.5px; }

.hero {
  background: linear-gradient(135deg, var(--tinta) 0%, #151B24 100%);
  border-radius: var(--r-gr); padding: 34px 36px; margin-bottom: 20px;
  box-shadow: var(--s-3); position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(35,217,160,.13) 0%, transparent 68%); pointer-events: none;
}
.hero h1 {
  font-family: var(--display); color: #fff; font-size: 40px; font-weight: 700;
  letter-spacing: -.045em; line-height: 1.02;
}
.hero p { color: #93A0B1; font-size: 13.5px; margin-top: 10px; max-width: 620px; line-height: 1.65; }

/* --- 4. Controles -------------------------------------------------------- */
.barra {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  background: var(--papel); border: 1px solid var(--linea);
  border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 18px;
  box-shadow: var(--s-1);
}
.buscar {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px;
  background: var(--fondo); border: 1px solid transparent;
  border-radius: var(--r-ch); padding: 8px 12px; transition: .18s var(--ease);
}
.buscar:focus-within { background: var(--papel); border-color: var(--verde); box-shadow: 0 0 0 3px rgba(35,217,160,.13); }
.buscar input {
  border: 0; background: none; font-family: inherit; font-size: 13.5px;
  width: 100%; color: var(--texto); font-weight: 500;
}
.buscar input:focus { outline: none; }
.buscar input::placeholder { color: var(--tenue); font-weight: 400; }

.btn {
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: var(--papel); border: 1px solid var(--linea); color: var(--suave);
  border-radius: var(--r-ch); padding: 8px 15px;
  transition: all .18s var(--ease); white-space: nowrap;
}
.btn:hover { border-color: rgba(17,24,35,.2); color: var(--texto); transform: translateY(-1px); box-shadow: var(--s-1); }
.btn.on { background: var(--tinta); border-color: var(--tinta); color: var(--verde); }
.btn.icon { padding: 8px 12px; font-size: 15px; line-height: 1; }
.btn.primario { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.btn.primario:hover { background: var(--tinta-2); color: var(--verde); }
.btn.peligro { color: var(--rojo); border-color: rgba(224,48,74,.28); }
.btn.peligro:hover { background: var(--rojo-luz); border-color: var(--rojo); color: var(--rojo); }
.btn.agregar { border-style: dashed; width: 100%; margin-bottom: 14px; padding: 11px; }

.mesnav { display: flex; align-items: center; gap: 6px; }
.mesnav .rot { min-width: 158px; text-align: center; font-size: 14px; font-weight: 700; letter-spacing: -.015em; }

/* --- 5. Tarjetas --------------------------------------------------------- */
.card {
  background: var(--papel); border: 1px solid var(--linea);
  border-radius: var(--r-gr); padding: 24px 28px; margin-bottom: 18px;
  box-shadow: var(--s-2);
}
.card > h2 {
  font-size: 10.5px; font-weight: 800; color: var(--tenue);
  text-transform: uppercase; letter-spacing: .13em; margin-bottom: 16px;
}
.card-cab {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
  margin-bottom: 16px; text-align: left;
}
.card-cab h2 { flex: 1; font-size: 10.5px; font-weight: 800; color: var(--tenue);
  text-transform: uppercase; letter-spacing: .13em; }
.card-cab .cuenta { font-size: 11px; font-weight: 700; color: var(--suave); }
.card-cab .flecha { color: var(--tenue); font-size: 15px; transition: transform .22s var(--ease); }
.card.cerrada .card-cab { margin-bottom: 0; }
.card.cerrada .card-cab .flecha { transform: rotate(-90deg); }
.card.cerrada .card-cuerpo { display: none; }

/* --- 6. Calendario ------------------------------------------------------- */
.leyenda { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 18px; }
.lg {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: var(--suave); background: var(--fondo); border: 1px solid transparent;
  cursor: pointer; font-family: inherit; padding: 5px 11px; border-radius: 20px;
  transition: .16s var(--ease);
}
.lg:hover { background: var(--fondo-2); }
.lg[aria-pressed="false"] { opacity: .32; }
.lg i { width: 8px; height: 8px; border-radius: 50%; display: block; }

.mes.grande .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ch { text-align: center; font-size: 10px; font-weight: 800; color: var(--tenue);
  padding-bottom: 9px; letter-spacing: .08em; }
.cd {
  aspect-ratio: 1; border-radius: var(--r-ch); background: var(--fondo); border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--suave); font-family: inherit;
  position: relative; padding: 0; transition: .16s var(--ease);
}
.cd.out { background: none; visibility: hidden; }
.cd.fin { color: var(--tenue); background: rgba(239,241,244,.5); }
.cd.hit {
  color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 8px -2px currentColor;
}
.cd.hit:hover { transform: translateY(-2px) scale(1.04); z-index: 2; box-shadow: var(--s-3); }
.cd.hoy { box-shadow: inset 0 0 0 2.5px var(--tinta); }
.cd.hit.hoy { box-shadow: inset 0 0 0 2.5px var(--tinta), 0 2px 8px -2px currentColor; }
.cd.pas.hit { opacity: .42; }
.cd-tags { display: flex; gap: 3px; align-items: center; margin-top: 4px; }
.cd-tags i { width: 6px; height: 6px; border-radius: 50%; display: block; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
.cd-tags b { font-size: 8.5px; font-weight: 800; color: rgba(255,255,255,.92); }

/* --- 7. Tareas ----------------------------------------------------------- */
.dsep {
  font-size: 10px; font-weight: 800; color: var(--verde-osc); text-transform: uppercase;
  letter-spacing: .13em; margin: 22px 0 4px; display: flex; align-items: center; gap: 10px;
}
.dsep::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.dsep:first-child { margin-top: 0; }
.dsep .rel { color: var(--tenue); text-transform: none; letter-spacing: 0; font-weight: 600; }

.tarea { border-bottom: 1px solid var(--linea-2); }
.tarea:last-child { border-bottom: 0; }
.tarea.pas { opacity: .48; }
.tarea > summary {
  display: flex; align-items: center; gap: 14px; padding: 13px 6px;
  cursor: pointer; list-style: none; border-radius: var(--r-ch);
  transition: background .16s var(--ease);
}
.tarea > summary::-webkit-details-marker { display: none; }
.tarea > summary:hover { background: var(--fondo); }
.tf { width: 48px; flex-shrink: 0; text-align: center; border-left: 2.5px solid; padding-left: 10px; }
.tf b { display: block; font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.tf span { font-size: 9px; font-weight: 800; color: var(--tenue); text-transform: uppercase; letter-spacing: .06em; }
.tc { flex: 1; min-width: 0; }
.tt { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.012em; }
.tm { display: block; font-size: 11.5px; color: var(--suave); font-weight: 500; margin-top: 1px; }
.tm em { font-style: normal; font-weight: 700; }
.flecha { color: var(--tenue); font-size: 15px; transition: transform .22s var(--ease); flex-shrink: 0; }
.tarea[open] .flecha { transform: rotate(180deg); }
.tbody { padding: 4px 6px 20px 68px; }
.tblock { margin-bottom: 15px; }
.tblock:last-child { margin-bottom: 0; }
.tblock h4 {
  font-size: 9px; font-weight: 800; color: var(--verde-osc); text-transform: uppercase;
  letter-spacing: .13em; margin-bottom: 4px;
}
.tblock p { font-size: 13px; color: #37414F; line-height: 1.62; }
.sindato { color: var(--tenue); font-style: italic; }
.tacciones { display: flex; gap: 8px; margin-top: 15px; }
.chip {
  font-style: normal; font-size: 8.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; padding: 2px 7px; border-radius: 5px; margin-left: 7px;
}
.chip.nuevo { background: var(--verde-luz); color: var(--verde-osc); }
.chip.editado { background: #E8EFFE; color: #1E40AF; }
.chip.movido { background: var(--ambar-luz); color: var(--ambar); }

/* --- 8. Cabecera de marca ------------------------------------------------ */
.vhead {
  background: linear-gradient(135deg, var(--tinta) 0%, #151B24 100%);
  border-radius: var(--r-gr); padding: 28px 30px; margin-bottom: 18px;
  box-shadow: var(--s-3); position: relative; overflow: hidden;
}
.vhead::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px;
  background: radial-gradient(circle, var(--c) 0%, transparent 66%); opacity: .17; pointer-events: none;
}
.vt { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; position: relative; }
.vhead h1 { font-family: var(--display); color: #fff; font-size: 31px; font-weight: 700; letter-spacing: -.04em; }
.vhead .obj { color: #7C8899; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }
.kpis { display: flex; gap: 9px; flex-wrap: wrap; position: relative; }
.kpi {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-ch); padding: 9px 15px; min-width: 92px;
  backdrop-filter: blur(8px);
}
.kpi b { display: block; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.kpi span { display: block; color: #798595; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }

.alerta {
  background: var(--rojo-luz); border: 1px solid rgba(224,48,74,.2);
  border-left: 4px solid var(--rojo); border-radius: var(--r-md);
  padding: 17px 21px; margin-bottom: 18px;
}
.alerta b { display: block; font-size: 13.5px; font-weight: 800; color: #9B1C2E; margin-bottom: 4px; }
.alerta p { font-size: 13px; color: #8A2233; line-height: 1.6; }

.ei { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--linea-2); font-size: 13px; line-height: 1.6; }
.ei:last-child { border-bottom: 0; }
.ei i { font-style: normal; flex-shrink: 0; }
.ei b { font-weight: 700; }
.ei code { background: var(--fondo-2); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* --- 9. Plan a largo plazo ------------------------------------------------ */
.plan-card { background: linear-gradient(150deg, #FBFCFD 0%, var(--papel) 60%); }
.plan-tit { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.04em; margin-bottom: 5px; }
.plan-hor { font-size: 10px; font-weight: 800; color: var(--verde-osc); text-transform: uppercase; letter-spacing: .13em; margin-bottom: 16px; }
.plan-txt p { font-size: 14.5px; line-height: 1.78; color: #2A3442; margin-bottom: 15px; }
.plan-txt p:last-child { margin-bottom: 0; }
.plan-hitos { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--linea); }
.plan-hitos h4 { font-size: 9.5px; font-weight: 800; color: var(--tenue); text-transform: uppercase; letter-spacing: .13em; margin-bottom: 12px; }
.plan-hito { display: flex; gap: 12px; padding: 9px 0; font-size: 13.5px; font-weight: 600; align-items: baseline; }
.plan-hito i { font-style: normal; font-size: 10px; font-weight: 800; color: var(--verde-osc); background: var(--verde-luz); width: 21px; height: 21px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* --- 10. Checklist ------------------------------------------------------- */
.chk { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea-2); }
.chk:last-child { border-bottom: 0; }
.chk input[type="checkbox"] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--verde-osc); cursor: pointer; flex-shrink: 0; }
.chk .c { flex: 1; min-width: 0; }
.chk label { font-size: 13.5px; font-weight: 600; cursor: pointer; display: block; }
.chk .nota { font-size: 12.5px; color: var(--suave); margin-top: 2px; line-height: 1.55; }
.chk.done label { text-decoration: line-through; color: var(--tenue); }
.chk.done .nota { opacity: .5; }
.chk.deuda .c label { color: #8A5A0B; }
.mini { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 8px; border-radius: 5px; color: #fff; white-space: nowrap; }
.prio-alta { background: var(--rojo); } .prio-media { background: var(--ambar); } .prio-baja { background: #94A3B8; }

.progreso { height: 8px; border-radius: 5px; background: var(--fondo-2); overflow: hidden; margin-bottom: 8px; }
.progreso i { display: block; height: 100%; background: linear-gradient(90deg, var(--verde-osc), var(--verde)); transition: width .35s var(--ease); }
.marca-chk { border-left: 4px solid var(--c); }
.chk-head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.chk-head b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.chk-head span { display: block; font-size: 12px; color: var(--suave); font-weight: 500; }
.mini-prog { margin-left: auto; width: 92px; height: 6px; border-radius: 3px; background: var(--fondo-2); overflow: hidden; }
.mini-prog i { display: block; height: 100%; background: var(--verde-osc); }
.sublab { font-size: 9px; font-weight: 800; color: var(--tenue); text-transform: uppercase; letter-spacing: .13em; margin: 18px 0 2px; }

/* --- 11. Requisitos ------------------------------------------------------ */
.solapas { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.mtabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 16px; }
.mtabs::-webkit-scrollbar { height: 4px; }
.mtabs::-webkit-scrollbar-thumb { background: var(--linea); border-radius: 2px; }
.mtab {
  display: flex; align-items: center; gap: 8px; background: var(--papel);
  border: 1px solid var(--linea); border-radius: var(--r-ch); padding: 7px 13px 7px 8px;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: .18s var(--ease);
}
.mtab:hover { transform: translateY(-1px); box-shadow: var(--s-2); }
.mtab.on { background: var(--tinta); border-color: var(--tinta); }
.mtab.on b { color: #fff; } .mtab.on i { color: var(--verde); }
.mtab b { display: block; font-size: 12px; font-weight: 700; color: var(--texto); }
.mtab i { display: block; font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--tenue); }
.av.chico { width: 23px; height: 23px; border-radius: 7px; font-size: 8px; }
.av.gran { width: 46px; height: 46px; border-radius: 13px; font-size: 14px; }

/* Logos: el contenedor recorta y la imagen llena sin deformarse */
.av.conlogo {
  background: #fff; overflow: hidden; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(17,24,35,.10);
}
.av.conlogo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.resumen-req { border-left: 4px solid var(--c); }
.barras { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--fondo-2); margin-top: 12px; }
.barras i { display: block; height: 100%; transition: width .35s var(--ease); }
.b-ok { background: linear-gradient(90deg, var(--verde-osc), var(--verde)); }
.b-falta { background: var(--rojo); }
.b-sin { background: #D3D9E1; }

.req { border-bottom: 1px solid var(--linea-2); }
.req:last-child { border-bottom: 0; }
.req > summary {
  display: flex; align-items: center; gap: 12px; padding: 11px 6px; cursor: pointer;
  list-style: none; border-radius: var(--r-ch); transition: background .16s var(--ease);
}
.req > summary::-webkit-details-marker { display: none; }
.req > summary:hover { background: var(--fondo); }
.rtxt { flex: 1; font-size: 13.5px; font-weight: 600; }
.restado {
  font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  padding: 3px 9px; border-radius: 5px; white-space: nowrap;
}
.req.ok .restado { background: var(--verde-luz); color: var(--verde-osc); }
.req.falta .restado { background: var(--rojo-luz); color: #9B1C2E; }
.req.sin .restado { background: var(--fondo-2); color: var(--suave); }
.req.sin .rtxt { color: var(--suave); font-weight: 500; }
.req[open] .flecha { transform: rotate(180deg); }
.rbody { padding: 2px 6px 16px 42px; }

/* Botón de estado: círculo que cicla listo → falta → sin verificar */
.rtoggle {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linea);
  background: var(--papel); cursor: pointer; flex-shrink: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; transition: .18s var(--ease); color: #fff;
}
.rtoggle:hover { transform: scale(1.14); }
.req.ok .rtoggle { background: var(--verde-osc); border-color: var(--verde-osc); }
.req.falta .rtoggle { background: var(--rojo); border-color: var(--rojo); }
.propio { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ambar); background: var(--ambar-luz); padding: 2px 7px; border-radius: 5px; }

/* --- 12. Panel lateral y formulario -------------------------------------- */
.panel {
  position: fixed; inset: 0 0 0 auto; width: min(460px, 100%); background: var(--papel);
  box-shadow: var(--s-alto); padding: 30px 30px; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s var(--ease); z-index: 40;
}
.panel.on { transform: translateX(0); }
.panel h3 { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.04em; }
.panel .cerrar {
  position: absolute; top: 20px; right: 22px; background: var(--fondo); border: 0;
  width: 32px; height: 32px; border-radius: 50%; font-size: 19px; cursor: pointer;
  color: var(--suave); line-height: 1; transition: .16s var(--ease);
}
.panel .cerrar:hover { background: var(--fondo-2); color: var(--texto); }
.psub { color: var(--suave); font-size: 12.5px; margin-bottom: 18px; }
.velo { position: fixed; inset: 0; background: rgba(10,13,18,.34); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); z-index: 39; }
.velo.on { opacity: 1; pointer-events: auto; }

.borrador-aviso {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--ambar-luz); border: 1px solid rgba(194,121,11,.22);
  border-left: 4px solid var(--ambar); border-radius: var(--r-md);
  padding: 15px 20px; margin-bottom: 18px; font-size: 13px; color: #7A4E08;
}
.borrador-aviso .acciones { margin-left: auto; display: flex; gap: 8px; }

.modal { position: fixed; inset: 0; background: rgba(10,13,18,.46); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 22px; }
.fcard {
  background: var(--papel); border-radius: var(--r-gr); padding: 30px 32px;
  width: min(480px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--s-alto);
}
.fcard h3 { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.04em; margin-bottom: 20px; }
.fcard label {
  display: block; font-size: 9.5px; font-weight: 800; color: var(--tenue);
  text-transform: uppercase; letter-spacing: .13em; margin-bottom: 15px;
}
.fcard input, .fcard select, .fcard textarea {
  display: block; width: 100%; margin-top: 6px; font-family: inherit; font-size: 14px;
  font-weight: 500; text-transform: none; letter-spacing: -.005em; color: var(--texto);
  border: 1px solid var(--linea); border-radius: var(--r-ch); padding: 11px 13px;
  background: var(--fondo); transition: .18s var(--ease);
}
.fcard input:focus, .fcard select:focus, .fcard textarea:focus {
  outline: none; background: var(--papel); border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(35,217,160,.13);
}
.fcard textarea { resize: vertical; line-height: 1.6; }
.facciones { display: flex; gap: 9px; justify-content: flex-end; margin-top: 8px; }

.vacio { text-align: center; color: var(--tenue); font-size: 13.5px; padding: 34px 0; }

/* --- 13. Pantallas chicas ------------------------------------------------ */
@media (max-width: 900px) {
  body { padding-left: 0; }
  .sb { position: static; width: 100%; height: auto; }
  .wrap { padding: 20px 16px 60px; }
  .panel { width: 100%; }
  .hero h1 { font-size: 32px; }
  .top h1 { font-size: 30px; }
  .cd { font-size: 12px; }
}

/* --- 14. Impresión ------------------------------------------------------- */
@media print {
  body { padding: 0; background: #fff; }
  .sb, .barra, .panel, .velo, .saltar, .borrador-aviso, .mtabs, .solapas { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .hero, .vhead { background: #fff !important; color: #000; box-shadow: none; border: 1px solid #ddd; }
  .hero h1, .vhead h1 { color: #000; }
  .tarea[open] .tbody, details .rbody { display: block !important; }
}

/* ==========================================================================
   15. MOVIMIENTO — entradas, hover y transiciones entre vistas
   ========================================================================== */

/* Entrada escalonada: cada tarjeta aparece un poquito después que la anterior */
@keyframes entrar {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes entrarFila {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes crecer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

#main > * { animation: entrar .5s var(--ease) backwards; }
#main .card, #main .hero, #main .vhead, #main .barra, #main .alerta, #main .mtabs, #main .solapas {
  animation: entrar .52s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.tarea, .req, .chk, .ei, .plan-hito {
  animation: entrarFila .4s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 16ms);
}
.cd { animation: aparecer .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 7ms); }
.progreso i, .barras i, .mini-prog i { transform-origin: left; animation: crecer .7s var(--ease) backwards .18s; }

/* La barra lateral se pinta del color de la marca abierta */
.nav-b[aria-current="page"]::before { background: var(--marca); }
.nav-b .txt b { transition: color .18s var(--ease), transform .18s var(--ease); }
.nav-b:hover .txt b { transform: translateX(2px); }
.nav-b:hover .av { transform: scale(1.06) rotate(-2deg); }
.av { transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.nav-b[aria-current="page"] .av { box-shadow: 0 0 0 2px var(--marca), 0 4px 14px -4px var(--marca); }
.nav-b:active { transform: scale(.985); }

/* Acentos que siguen el color de la marca */
.hero::after { background: radial-gradient(circle, var(--marca-luz) 0%, transparent 68%); }
.dsep { color: var(--marca); }
.tblock h4 { color: var(--marca); }
.plan-hor { color: var(--marca); }
.plan-hito i { color: var(--marca); background: var(--marca-luz); }

/* Tarjetas: se levantan apenas */
.card { transition: box-shadow .28s var(--ease), transform .28s var(--ease), border-color .28s var(--ease); }
.card:hover { box-shadow: var(--s-3); border-color: rgba(17,24,35,.13); }
.card-cab:hover h2 { color: var(--suave); }
.card-cab .flecha, .card-cab h2 { transition: color .2s var(--ease), transform .28s var(--ease); }

/* Calendario: los días respiran */
.cd.hit::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.22), transparent 55%);
  opacity: 0; transition: opacity .22s var(--ease);
}
.cd.hit:hover::after { opacity: 1; }
.cd.hit:active { transform: translateY(0) scale(.97); }
.cd:not(.hit):not(.out):hover { background: var(--fondo-2); }
.cd.hoy::before {
  content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--tinta);
}
.cd.hit.hoy::before { background: #fff; }

/* Filas y tareas */
.tarea > summary, .req > summary { position: relative; }
.tarea > summary::before, .req > summary::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  border-radius: 2px; background: var(--marca); transform: scaleY(0);
  transition: transform .24s var(--ease); transform-origin: center;
}
.tarea > summary:hover::before, .req > summary:hover::before { transform: scaleY(1); }
.tarea[open] > summary { background: var(--fondo); }
.tf b { transition: transform .22s var(--ease); }
.tarea > summary:hover .tf b { transform: translateX(2px); }

/* Botones con respuesta al clic */
.btn:active { transform: translateY(0) scale(.97); }
.lg { transition: all .18s var(--ease); }
.lg:hover { transform: translateY(-1px); }
.lg:active { transform: scale(.95); }

/* Solapas de marca en el checklist */
.mtab { position: relative; overflow: hidden; }
.mtab::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2.5px;
  background: var(--marca); transform: scaleX(0); transition: transform .26s var(--ease);
}
.mtab:hover::after { transform: scaleX(1); }
.mtab.on::after { transform: scaleX(1); background: var(--verde); }

/* Círculo de estado en requisitos */
.rtoggle { position: relative; }
.rtoggle::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: currentColor; opacity: 0; transform: scale(.6);
  transition: all .3s var(--ease); pointer-events: none;
}
.rtoggle:active::after { opacity: .14; transform: scale(1); }

/* KPIs */
.kpi { transition: transform .26s var(--ease), background .26s var(--ease); }
.kpi:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }

/* Globo con el detalle del día, al pasar el cursor */
.globo {
  position: fixed; z-index: 70; pointer-events: none; max-width: 290px;
  background: var(--tinta); color: #fff; border-radius: var(--r-md);
  padding: 11px 14px; box-shadow: var(--s-alto);
  font-size: 12.5px; line-height: 1.5; opacity: 0; transform: translateY(6px) scale(.97);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
  border: 1px solid rgba(255,255,255,.09);
}
.globo.on { opacity: 1; transform: none; }
.globo b { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--marca); margin-bottom: 5px; }
.globo .g-i { display: flex; gap: 7px; align-items: baseline; padding: 3px 0; }
.globo .g-i i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.globo .g-i span { color: #C7CFDA; }
.globo .g-i em { font-style: normal; color: #fff; font-weight: 600; }

/* Barra superior que se pega al hacer scroll */
.barra { position: sticky; top: 12px; z-index: 20;
  backdrop-filter: saturate(180%) blur(14px); background: rgba(255,255,255,.86); }

/* Progreso de lectura arriba de todo */
.scrollbar { position: fixed; top: 0; left: var(--sidebar); right: 0; height: 2.5px; z-index: 80; background: transparent; }
.scrollbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--marca), var(--verde)); transition: width .1s linear; }
@media (max-width: 900px) { .scrollbar { left: 0; } }

/* Números que suben al entrar */
.kpi b, .chk-head b { font-variant-numeric: tabular-nums; }

/* Detalle que se abre suave */
details[open] > .tbody, details[open] > .rbody { animation: entrarFila .3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  #main > *, #main .card, .tarea, .req, .chk, .ei, .cd, .plan-hito,
  .progreso i, .barras i, .mini-prog i { animation: none !important; }
}
