/* Mi Canvas Rosa · mezcla de las maquetas A «Rosa suave» (de día) y C «Noche rosa» (de noche). 4-dic-2026 */
:root {
  --fondo: #FFF4F7; --cab: #FFE3EC; --tarj: #FFFFFF; --tex: #3A2430; --suave: #6B4555; --tenue: #8A6A78;
  --ac: #A3174F; --ac-tex: #FFFFFF; --ac2: #FFD0DF; --pista: #FFE3EC; --borde: #F3D3DF;
  --verde: #2F8F6E; --verde2: #D8F2E7; --rojo: #C2410C; --rojo2: #FDE3D8; --ambar: #B7791F; --ambar2: #FCEFD5;
  --cita: #9C4DCC; --evento: #2F8F88; --sombra: 0 2px 10px rgba(163, 23, 79, .08); --nav: #FFFFFF;
  --t: 'Space Grotesk', 'Nunito', system-ui, sans-serif; --c: 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #16111A; --cab: #1E1622; --tarj: #241B29; --tex: #F4ECF1; --suave: #B9A6B3; --tenue: #9A8794;
    --ac: #FF7AB6; --ac-tex: #16111A; --ac2: #3A2C40; --pista: #3A2C40; --borde: #33283A;
    --verde: #7DD3B0; --verde2: #1F3A32; --rojo: #FF8A65; --rojo2: #3D2222; --ambar: #F6C66B; --ambar2: #3A3020;
    --cita: #C99BF0; --evento: #6FD3C9; --sombra: none; --nav: #241B29; color-scheme: dark;
  }
}
:root[data-tema="oscuro"] {
  --fondo: #16111A; --cab: #1E1622; --tarj: #241B29; --tex: #F4ECF1; --suave: #B9A6B3; --tenue: #9A8794;
  --ac: #FF7AB6; --ac-tex: #16111A; --ac2: #3A2C40; --pista: #3A2C40; --borde: #33283A;
  --verde: #7DD3B0; --verde2: #1F3A32; --rojo: #FF8A65; --rojo2: #3D2222; --ambar: #F6C66B; --ambar2: #3A3020;
  --cita: #C99BF0; --evento: #6FD3C9; --sombra: none; --nav: #241B29; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tex); font-family: var(--c); font-size: 15px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; }
body.sin-menu { padding-bottom: 0; }
a { color: var(--ac); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--t); margin: 0; letter-spacing: -.01em; }
.oculto { display: none !important; }
.etq { color: var(--suave); font-size: 13px; }
.chica { font-size: 12px; }
.num { font-family: var(--t); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- estructura */
main { max-width: 980px; margin: 0 auto; }
.cab { background: var(--cab); padding: calc(18px + env(safe-area-inset-top)) 20px 18px; border-radius: 0 0 28px 28px; display: flex; flex-direction: column; gap: 4px; }
.cab-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cab .fecha { margin: 0; font-size: 13px; font-weight: 700; color: var(--suave); }
.cab h1 { font-size: 27px; font-weight: 700; color: var(--ac); line-height: 1.15; }
.cab .sub { color: var(--suave); font-size: 14px; }
.cab-chica h1 { font-size: 23px; }
.volver { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--suave); font-weight: 700; font-size: 14px; min-height: 32px; }
.campana { position: relative; width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--tarj); display: inline-flex; align-items: center; justify-content: center; color: var(--ac); cursor: pointer; flex: none; text-decoration: none; }
.campana .bolita { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ac); color: var(--ac-tex); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cuerpo { padding: 14px 14px 0; display: flex; flex-direction: column; gap: 14px; }
.rejilla { display: grid; gap: 14px; }
@media (min-width: 900px) { .rejilla { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .rejilla > .ancha { grid-column: 1 / -1; } .cuerpo { padding: 18px 22px 0; } }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.secc { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 4px 2px -4px; }
.secc h2 { font-size: 17px; }
.secc a, .lnk { font-size: 13px; font-weight: 700; color: var(--ac); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 0; }

/* --- tarjetas */
.tarjeta { background: var(--tarj); border-radius: 20px; padding: 14px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tarjeta h3 { font-size: 16px; }
.aviso-banda { border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; background: var(--ac2); color: var(--tex); font-size: 14px; }
.aviso-banda.ambar { background: var(--ambar2); }
.aviso-banda.rojo { background: var(--rojo2); }
.aviso-banda { flex-wrap: wrap; }
.aviso-banda .cen { flex: 1; min-width: 190px; }
.aviso-banda b { display: block; }

/* anillo de «lo más urgente» (de C) */
.urgente { display: flex; gap: 16px; align-items: center; }
.urgente svg { flex: none; }
.urgente .cen { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sobre { margin: 0; font-size: 12px; font-weight: 700; color: var(--ac); text-transform: uppercase; letter-spacing: .08em; }
.urgente .titulo { font-family: var(--t); font-size: 19px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.anillo-pista { stroke: var(--pista); }
.anillo-ac { stroke: var(--ac); transition: stroke-dashoffset .8s ease; }
.anillo-tex { fill: var(--tex); font-family: var(--t); }
.anillo-sub { fill: var(--suave); font-family: var(--c); }

/* cifras */
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .cifras.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cifra { background: var(--tarj); border-radius: 18px; padding: 12px 14px; box-shadow: var(--sombra); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cifra .v { font-family: var(--t); font-size: 24px; font-weight: 700; }
.cifra .n { font-size: 12px; font-weight: 700; color: var(--suave); }
.cifra.alerta .v { color: var(--rojo); }
.cifra.bien .v { color: var(--verde); }

/* filas de tareas (de A) */
.lista { display: flex; flex-direction: column; gap: 8px; }
.fila { background: var(--tarj); border-radius: 18px; padding: 10px 12px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sombra); min-width: 0; }
.fila .cen { flex: 1; min-width: 0; }
.fila .t1 { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.fila .t2 { font-size: 13px; color: var(--suave); overflow-wrap: anywhere; }
.insignia { width: 48px; min-height: 48px; border-radius: 14px; background: var(--ac2); color: var(--ac); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; line-height: 1.05; text-align: center; flex: none; padding: 4px 2px; font-family: var(--t); }
.insignia.ya { background: var(--ac); color: var(--ac-tex); }
.insignia.cita { background: var(--cita); color: #fff; }
.insignia.evento { background: var(--evento); color: #fff; }
.insignia small { font-size: 10px; font-weight: 600; font-family: var(--c); }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc, var(--ac)); margin-right: 5px; vertical-align: 1px; }
.check { width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--borde); background: transparent; color: var(--ac); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.check:hover { border-color: var(--ac); }
.check.si { background: var(--ac); border-color: var(--ac); color: var(--ac-tex); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--ac2); color: var(--ac); white-space: nowrap; }
.chip.verde { background: var(--verde2); color: var(--verde); }
.chip.rojo { background: var(--rojo2); color: var(--rojo); }
.chip.ambar { background: var(--ambar2); color: var(--ambar); }
.chip.gris { background: var(--pista); color: var(--suave); }
.vacio { color: var(--suave); text-align: center; padding: 18px 10px; font-size: 14px; }

/* puntos por curso (barras de C) */
.barra { height: 10px; border-radius: 5px; background: var(--pista); position: relative; overflow: visible; display: flex; }
.barra > i { display: block; height: 100%; }
.barra > i:first-child { border-radius: 5px 0 0 5px; }
.barra .g { background: var(--ac); }
.barra .g.gano { background: var(--verde); }
.barra .p { background: var(--rojo); opacity: .55; }
.barra .meta { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--tex); opacity: .7; }
.curso-p { display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: inherit; }
.curso-p .tope { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.curso-p .tope span:last-child { color: var(--suave); font-weight: 600; white-space: nowrap; }
.cuatro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cuatro > div { background: var(--fondo); border-radius: 14px; padding: 8px 10px; }
.cuatro .v { font-family: var(--t); font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.cuatro .n { font-size: 12px; color: var(--suave); font-weight: 700; }
.leyenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--suave); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* botones */
.btn { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--borde); background: var(--tarj); color: var(--tex); font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; font-size: 14px; }
.btn:hover { border-color: var(--ac); }
.btn.prim { background: var(--ac); border-color: var(--ac); color: var(--ac-tex); }
.btn.peligro { color: var(--rojo); }
.btn.chico { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 18px; }
.btn[disabled] { opacity: .55; cursor: default; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.acciones .flex { flex: 1; }

/* formularios */
.campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.campo label { font-size: 13px; font-weight: 800; color: var(--suave); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea {
  min-height: 44px; border-radius: 14px; border: 1.5px solid var(--borde); background: var(--fondo); padding: 8px 12px; width: 100%; color: var(--tex); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ac); outline: none; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.siete { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.siete .campo label { text-align: center; }
.siete input { padding: 8px 4px; text-align: center; }
.error { color: var(--rojo); min-height: 18px; font-size: 14px; }
.pasos { margin: 6px 0; padding-left: 20px; line-height: 1.6; }
.boton-rosa { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: var(--ac); color: var(--ac-tex); font-weight: 800; text-decoration: none; cursor: grab; }
.niveles { display: flex; gap: 6px; }
.niveles button { flex: 1; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--borde); background: var(--fondo); font-weight: 800; cursor: pointer; }
.niveles button[aria-pressed=true] { background: var(--ac); border-color: var(--ac); color: var(--ac-tex); }

/* menú en píldora (de C, con íconos de A) */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(520px, calc(100% - 20px)); background: var(--nav);
  border-radius: 30px; display: flex; justify-content: space-around; padding: 6px; box-shadow: 0 6px 24px rgba(58, 36, 48, .16); z-index: 20; }
.nav a { flex: 1; min-height: 52px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; color: var(--tenue); font-size: 11px; font-weight: 800; }
.nav a.activo { background: var(--ac); color: var(--ac-tex); }
.nav a .num-av { position: absolute; }

/* calendario */
.mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mes .dn { text-align: center; font-size: 12px; font-weight: 800; color: var(--suave); padding: 4px 0; }
.mes button { min-height: 52px; border-radius: 12px; border: 0; background: var(--fondo); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px 2px; gap: 3px; font-weight: 700; }
.mes button.fuera { opacity: .35; }
.mes button.hoy { box-shadow: inset 0 0 0 2px var(--ac); }
.mes button.sel { background: var(--ac); color: var(--ac-tex); }
.mes .puntos { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.mes .puntos i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.mes .pe { background: var(--ac); } .mes button.sel .pe { background: var(--ac-tex); }
.mes .pc { background: var(--cita); } .mes .pv { background: var(--evento); }
@media (min-width: 700px) { .mes button { min-height: 76px; } .mes .txt { display: block; } }
.mes .txt { display: none; font-size: 10px; font-weight: 600; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.mes-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mes-cab h3 { font-size: 18px; text-transform: capitalize; }

/* gráfica del plan */
.grafica { width: 100%; height: auto; display: block; }
.grafica .cap { fill: var(--pista); }
.grafica .uso { fill: var(--ac); }
.grafica .cit { fill: var(--cita); opacity: .8; }
.grafica text { fill: var(--suave); font-size: 10px; font-family: var(--c); font-weight: 700; }

/* tablas que se ordenan, con encabezado fijo */
.caja-tabla { overflow: auto; max-height: 62vh; border-radius: 14px; border: 1px solid var(--borde); -webkit-overflow-scrolling: touch; }
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th { position: sticky; top: 0; background: var(--cab); z-index: 1; text-align: left; padding: 0; white-space: nowrap; }
.tabla th button { all: unset; display: block; padding: 9px 10px; cursor: pointer; font-weight: 800; color: var(--suave); width: 100%; box-sizing: border-box; }
.tabla th button:focus-visible { outline: 2px solid var(--ac); }
.tabla td { padding: 8px 10px; border-top: 1px solid var(--borde); vertical-align: top; }
.tabla td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla th.n button { text-align: right; }
.orig { all: unset; cursor: pointer; color: var(--ac); font-weight: 800; padding: 0 3px; margin-left: 2px; border-radius: 6px; }
.orig:hover, .orig:focus-visible { background: var(--ac2); }

/* ventanas */
.velo { position: fixed; inset: 0; background: rgba(22, 17, 26, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 10px; }
@media (min-width: 700px) { .velo { align-items: center; } }
.ventana { background: var(--tarj); color: var(--tex); border-radius: 24px; padding: 18px; width: min(520px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.ventana h3 { font-size: 19px; }
.aviso-t { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--tex); color: var(--fondo); padding: 10px 18px; border-radius: 16px; z-index: 60; font-weight: 700; max-width: calc(100% - 30px); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }

/* entrar */
.entrar { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 20% 10%, var(--ac2), transparent 50%), var(--fondo); }
.entrar .caja { width: min(400px, 100%); background: var(--tarj); border-radius: 28px; padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 40px rgba(163, 23, 79, .12); }
.entrar h1 { font-size: 30px; color: var(--ac); }
.logo { width: 64px; height: 64px; border-radius: 20px; }

/* lista de «Más» */
.menu-mas { display: flex; flex-direction: column; background: var(--tarj); border-radius: 20px; overflow: hidden; box-shadow: var(--sombra); }
.menu-mas a, .menu-mas button { display: flex; gap: 12px; align-items: center; padding: 12px 16px; min-height: 58px; text-decoration: none; color: inherit; border: 0; background: none; border-top: 1px solid var(--borde); cursor: pointer; text-align: left; width: 100%; }
.menu-mas > :first-child { border-top: 0; }
.menu-mas .ic { width: 40px; height: 40px; border-radius: 14px; background: var(--ac2); color: var(--ac); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-mas .cen { flex: 1; min-width: 0; }
.menu-mas b { display: block; }
.interr { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--borde); cursor: pointer; }
.interr .cen { flex: 1; }
.interr input { width: 22px; height: 22px; accent-color: var(--ac); }

/* cronómetro */
.reloj { font-family: var(--t); font-size: 44px; font-weight: 700; text-align: center; color: var(--ac); font-variant-numeric: tabular-nums; }
.diario-dia { font-size: 12px; font-weight: 800; color: var(--suave); margin: 6px 2px -2px; text-transform: capitalize; }
.anuncio p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-weight: 800; list-style-position: inside; }
.pend { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--borde); }
.pend:first-child { border-top: 0; }
.pend label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 36px; }
.pend input { width: 22px; height: 22px; accent-color: var(--ac); flex: none; }
.pend .hecho { text-decoration: line-through; color: var(--suave); }
