/* Rolmed · estilos v0.2: identidad propia, tarjetas con sombra suave, movimiento discreto y modo oscuro. */
@font-face { font-family: Inter; src: url(../fuentes/inter-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --fondo: #F2F4F7; --tarjeta: #FFFFFF; --sutil: #F7F9FB; --sutil2: #EEF2F6; --texto: #0D1726; --texto2: #334155; --suave: #4A5A70; --gris: #66768C; --gris2: #8492A6;
  --borde: #E4E8EE; --borde-f: #CDD5DF; --linea: #EEF1F5;
  --acento: #0D5C8A; --acento-osc: #0A4A70; --acento-claro: #1B7BB5; --acento-tinte: #E4F0F8; --acento-texto: #0D5C8A;
  --hero1: #0B4F78; --hero2: #0D6299;
  --dia: #FFE29A; --dia-t: #6B4300; --noche: #24317E; --noche-t: #FFFFFF; --consulta: #BFEBD8; --consulta-t: #0A5440; --manana: #CDEBFF; --manana-t: #0B4A6E; --tarde: #FFD9C2; --tarde-t: #7A3412; --reten: #E3DAFF; --reten-t: #47259A; --otro: #E4E8EE; --otro-t: #334155;
  --rojo: #B42318; --rojo-t: #991B1B; --rojo-tinte: #FDECEC; --rojo-borde: #F6B4B4;
  --naranja: #9A3412; --naranja-t: #7C2D12; --naranja-tinte: #FFF4EA; --naranja-borde: #FBD5B0;
  --verde: #047857; --verde-t: #065F46; --verde-tinte: #EAF8F1; --verde-borde: #B5E8D0;
  --ambar-t: #7A4A00; --ambar-tinte: #FFF6DB; --ambar-borde: #F5DD94;
  --azul-t: #1E3A8A; --azul-tinte: #E2ECFF; --azul-borde: #9DBDF7; --indigo-tinte: #ECEFFF;
  --sombra: 0 1px 2px rgba(13, 23, 38, .05), 0 2px 8px rgba(13, 23, 38, .05);
  --sombra-alta: 0 8px 28px rgba(13, 23, 38, .16);
  --radio: 18px; --acento-sombra: rgba(13, 92, 138, .3);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fondo: #0B1220; --tarjeta: #141D2E; --sutil: #19233A; --sutil2: #1E2A42; --texto: #E8EDF5; --texto2: #C6D0DE; --suave: #A3B1C4; --gris: #8C9AB0; --gris2: #6E7C93;
    --borde: #243149; --borde-f: #33425E; --linea: #1F2A40;
    --acento: #3B9BD9; --acento-osc: #5AAEE4; --acento-claro: #5AAEE4; --acento-tinte: #12324A; --acento-texto: #7CC3F0;
    --hero1: #0D3A5A; --hero2: #0F4C76;
    --dia: #6A4F12; --dia-t: #FFE7A8; --noche: #3A4BB8; --noche-t: #FFFFFF; --consulta: #11523F; --consulta-t: #C4F2DE; --manana: #134A6B; --manana-t: #CDEBFF; --tarde: #6B3416; --tarde-t: #FFD9C2; --reten: #3D2B7A; --reten-t: #E5DCFF; --otro: #2A3650; --otro-t: #D2DAE6;
    --rojo: #F87171; --rojo-t: #FCA5A5; --rojo-tinte: #3A1517; --rojo-borde: #7F2A2A;
    --naranja: #FDBA74; --naranja-t: #FED7AA; --naranja-tinte: #36200F; --naranja-borde: #6B3A12;
    --verde: #4ADE80; --verde-t: #A7F3D0; --verde-tinte: #0F2E22; --verde-borde: #1E5A41;
    --ambar-t: #FDE68A; --ambar-tinte: #33280B; --ambar-borde: #6B5314;
    --azul-t: #BFD4FF; --azul-tinte: #17284F; --azul-borde: #3554A0; --indigo-tinte: #1B2250;
    --sombra: 0 1px 2px rgba(0, 0, 0, .3); --sombra-alta: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

/* Paletas (Ajustes → Apariencia). Quirófano es la de fábrica; «azul» es la original. */
:root[data-tema="quirofano"] { --acento: #0F766E; --acento-osc: #0B5E58; --acento-claro: #14958A; --acento-tinte: #E0F2EF; --acento-texto: #0F766E; --hero1: #0B5E58; --hero2: #0F766E; --fondo: #F1F6F5; --acento-sombra: rgba(15, 118, 110, .3); --noche: #1E3A5F; }
:root[data-tema="noche"] { --acento: #4338CA; --acento-osc: #3730A3; --acento-claro: #5B50E0; --acento-tinte: #E8E7FB; --acento-texto: #4338CA; --hero1: #312E81; --hero2: #4338CA; --fondo: #F3F3FB; --acento-sombra: rgba(67, 56, 202, .3); --noche: #1E1B4B; --noche-t: #FCD34D; }
:root[data-tema="coral"] { --acento: #D9482B; --acento-osc: #B53A20; --acento-claro: #E8603F; --acento-tinte: #FCE8E2; --acento-texto: #B53A20; --hero1: #B53A20; --hero2: #D9482B; --fondo: #FBF5F2; --acento-sombra: rgba(217, 72, 43, .3); --noche: #23324A; }
:root[data-tema="uva"] { --acento: #6D28D9; --acento-osc: #5B21B6; --acento-claro: #7C3AED; --acento-tinte: #EFE7FC; --acento-texto: #6D28D9; --hero1: #5B21B6; --hero2: #6D28D9; --fondo: #F6F3FC; --acento-sombra: rgba(109, 40, 217, .3); --noche: #2E1065; }
:root[data-tema="grafito"] { --acento: #4D7C0F; --acento-osc: #3F6212; --acento-claro: #65A30D; --acento-tinte: #EEF7DC; --acento-texto: #3F6212; --hero1: #18181B; --hero2: #2E2E33; --fondo: #F4F4F2; --acento-sombra: rgba(24, 24, 27, .25); --noche: #27272A; --noche-t: #D9F99D; --logo: #18181B; }
@media (prefers-color-scheme: dark) {
  :root[data-tema="quirofano"] { --tarjeta: #11201F; --sutil: #162826; --sutil2: #1B302E; --borde: #213937; --borde-f: #2E4C49; --linea: #1A2C2A; --acento: #2DB3A5; --acento-osc: #4CC7BA; --acento-claro: #4CC7BA; --acento-tinte: #0E3A36; --acento-texto: #6FD8CC; --hero1: #0B4440; --hero2: #0E5A54; --fondo: #0A1514; --acento-sombra: rgba(0, 0, 0, .35); --noche: #2B5A8F; }
  :root[data-tema="noche"] { --acento: #7C74F0; --acento-osc: #9690F5; --acento-claro: #9690F5; --acento-tinte: #24215A; --acento-texto: #A9A4F8; --hero1: #23206A; --hero2: #2F2A8A; --fondo: #0D0C1F; --acento-sombra: rgba(0, 0, 0, .35); --noche: #3B3699; --noche-t: #FCD34D; }
  :root[data-tema="coral"] { --tarjeta: #1E1714; --sutil: #261C18; --sutil2: #2D221D; --borde: #3A2B25; --borde-f: #4C3830; --linea: #2A201C; --acento: #E8603F; --acento-osc: #F59A83; --acento-claro: #F59A83; --acento-tinte: #47201A; --acento-texto: #F7A893; --hero1: #6B2414; --hero2: #8A3019; --fondo: #160D0B; --acento-sombra: rgba(0, 0, 0, .35); }
  :root[data-tema="uva"] { --tarjeta: #1A1428; --sutil: #211932; --sutil2: #281F3B; --borde: #33284A; --borde-f: #43355E; --linea: #251C35; --acento: #8B5CF6; --acento-osc: #B898F5; --acento-claro: #B898F5; --acento-tinte: #2E1C55; --acento-texto: #C4A8F7; --hero1: #3B1A78; --hero2: #4C2399; --fondo: #110B1E; --acento-sombra: rgba(0, 0, 0, .35); }
  :root[data-tema="grafito"] { --tarjeta: #19191C; --sutil: #202024; --sutil2: #27272B; --borde: #303036; --borde-f: #3F3F46; --linea: #232327; --acento: #4D7C0F; --acento-osc: #84CC16; --acento-claro: #84CC16; --acento-tinte: #24300F; --acento-texto: #BEF264; --hero1: #1F1F23; --hero2: #2E2E33; --fondo: #0E0E10; --acento-sombra: rgba(0, 0, 0, .35); --noche: #3F3F46; --noche-t: #D9F99D; --logo: #3F6212; }
}
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tema { border: 1.5px solid var(--borde); background: var(--tarjeta); border-radius: 14px; padding: 8px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--texto2); }
.tema .mues { height: 34px; border-radius: 9px; position: relative; }
.tema .mues i { position: absolute; right: 6px; bottom: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.tema.on { border-color: var(--acento); box-shadow: 0 0 0 2px var(--acento-tinte); color: var(--texto); }
.precios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.precio { border: 1.5px solid var(--borde); border-radius: 14px; padding: 10px 8px; text-align: center; background: var(--tarjeta); position: relative; }
.precio b { display: block; font-size: 17px; margin-top: 2px; }
.precio small { display: block; color: var(--gris); font-size: 11px; }
.precio.destacado { border-color: var(--acento); }
.precio .sello { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--acento); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 8px; white-space: nowrap; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font-family: Inter, system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acento-texto); }
b, .fuerte, .resumen b, .item b { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--acento-claro); outline-offset: 2px; border-radius: 10px; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.app.sin-nav { padding-bottom: 28px; }
main { flex: 1; animation: entra .22s ease-out; }
@keyframes entra { from { transform: translateY(6px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.pad { padding: 0 16px; }

/* Cabeceras */
.cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(16px + env(safe-area-inset-top)) 12px 10px 18px; }
.cab.atras { padding-left: 6px; justify-content: flex-start; }
.cab h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.cab.atras h1 { font-size: 20px; letter-spacing: -0.02em; }
.sobre { font-size: 12px; font-weight: 600; color: var(--gris); padding: 0 18px; letter-spacing: .01em; }
.cab.atras + .sobre { padding-left: 54px; margin-top: -8px; margin-bottom: 4px; }

/* Héroe (franja de marca) */
.heroe { background: linear-gradient(160deg, var(--hero1), var(--hero2)); color: #fff; border-radius: 0 0 28px 28px; padding: calc(12px + env(safe-area-inset-top)) 10px 18px; margin-bottom: 6px; }
.heroe .cab { padding: 0 4px 6px 8px; }
.heroe h1 { color: #fff; font-size: 22px; }
.heroe .icono { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.heroe .icono.plano { background: transparent; }
.heroe .icono.blanco { background: #fff; color: var(--hero1); }
.heroe .resumen { background: rgba(255,255,255,.1); border-radius: 16px; margin: 4px 6px 0; padding: 12px 2px; }
.heroe .resumen > div + div { border-left-color: rgba(255,255,255,.18); }
.heroe .resumen b { color: #fff; }
.heroe .resumen span { color: rgba(255,255,255,.78); }
.heroe .sobre { color: rgba(255,255,255,.78); padding: 0 12px; }
.marca { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: rgba(255,255,255,.9); padding: 0 12px 6px; }

.icono { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--borde); background: var(--tarjeta); color: var(--texto2); display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; text-decoration: none; flex: none; transition: transform .12s, background .15s; box-shadow: var(--sombra); }
.icono:active { transform: scale(.94); }
.icono.plano { border: 0; background: transparent; box-shadow: none; }
.icono.prim { background: var(--acento); color: #fff; border: 0; box-shadow: 0 4px 12px var(--acento-sombra); }
.punto { position: absolute; top: 8px; right: 9px; width: 10px; height: 10px; border-radius: 5px; background: #C2410C; border: 2px solid var(--tarjeta); }
.fila { display: flex; align-items: center; gap: 8px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; box-shadow: var(--sombra); }
.m16 { margin: 0 16px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
h2.sec { margin: 22px 18px 10px; font-size: 13px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.nota { font-size: 12px; color: var(--suave); line-height: 1.5; }
.chica { font-size: 12px; color: var(--suave); }
.fuerte { font-weight: 700; }
.centro { text-align: center; }
.vacio { text-align: center; color: var(--suave); padding: 32px 24px; font-size: 14px; line-height: 1.55; }
.vacio svg { color: var(--acento); opacity: .85; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--borde-f); background: var(--tarjeta); color: var(--texto); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn.prim { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 4px 14px var(--acento-sombra); }
.btn.prim:hover { background: var(--acento-osc); }
.btn.borde { border-color: var(--acento); color: var(--acento-texto); }
.btn.peligro { color: var(--rojo); border-color: var(--rojo-borde); background: transparent; }
.btn.chico { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; box-shadow: none; }
.btn.ancho { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; box-shadow: none; }
.botones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.enlace { background: none; border: 0; color: var(--acento-texto); font-weight: 600; font-size: 14px; min-height: 44px; cursor: pointer; padding: 0 4px; }

/* Chips y segmentados */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--borde); background: var(--tarjeta); color: var(--texto2); border-radius: 999px; padding: 0 14px; height: 36px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer; box-shadow: var(--sombra); transition: background .15s; }
.chip.on { background: var(--texto); border-color: var(--texto); color: var(--tarjeta); }
.bolita { width: 9px; height: 9px; border-radius: 5px; flex: none; display: inline-block; }
.seg { display: flex; gap: 3px; background: var(--sutil2); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--suave); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 10px; transition: background .15s, color .15s; white-space: nowrap; }
.seg button.on { background: var(--tarjeta); color: var(--texto); font-weight: 700; box-shadow: 0 1px 3px rgba(13,23,38,.14); }

/* Tipos de turno */
.t-D { background: var(--dia); color: var(--dia-t); } .t-N { background: var(--noche); color: var(--noche-t); }
.t-C { background: var(--consulta); color: var(--consulta-t); } .t-M { background: var(--manana); color: var(--manana-t); } .t-T { background: var(--tarde); color: var(--tarde-t); } .t-R { background: var(--reten); color: var(--reten-t); }
.t-P, .t-X { background: var(--otro); color: var(--otro-t); }
.t-c-rosa { background: #FBCFE8; color: #831843; } .t-c-naranja { background: #FED7AA; color: #7C2D12; } .t-c-celeste { background: #BAE6FD; color: #0C4A6E; }
.t-c-lima { background: #D9F99D; color: #365314; } .t-c-violeta { background: #DDD6FE; color: #4C1D95; } .t-c-gris { background: #E2E8F0; color: #1E293B; }
@media (prefers-color-scheme: dark) {
  .t-c-rosa { background: #6B1D45; color: #FBCFE8; } .t-c-naranja { background: #6B3416; color: #FED7AA; } .t-c-celeste { background: #0C4A6E; color: #BAE6FD; }
  .t-c-lima { background: #3F5214; color: #D9F99D; } .t-c-violeta { background: #3D2B7A; color: #DDD6FE; } .t-c-gris { background: #334155; color: #E2E8F0; }
}
.nota-turno { background: var(--ambar-tinte); border: 1px solid var(--ambar-borde); color: var(--ambar-t); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.dia .punto-nota { width: 6px; height: 6px; border-radius: 3px; background: #E0A800; position: absolute; top: 5px; right: 5px; }
.dia { position: relative; }
.pill { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; display: inline-block; letter-spacing: .02em; }
.cuadro-tipo { width: 44px; height: 44px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; font-weight: 800; flex: none; }
.cuadro-tipo small { font-size: 9px; font-weight: 700; letter-spacing: .04em; opacity: .85; margin-bottom: 2px; }

/* Resumen */
.resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 4px; }
.resumen > div { text-align: center; padding: 0 4px; }
.resumen > div + div { border-left: 1px solid var(--borde); }
.resumen b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.resumen span { font-size: 12px; color: var(--suave); }

/* Calendario */
.cal { padding: 6px 12px 0; }
.cal-dias, .cal-sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dias { text-align: center; font-size: 11px; font-weight: 700; color: var(--gris); padding: 4px 0 6px; letter-spacing: .04em; }
.cal-sem + .cal-sem { margin-top: 4px; }
.dia { min-height: 60px; background: var(--tarjeta); border: 1px solid transparent; border-radius: 12px; padding: 4px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; text-align: left; box-shadow: var(--sombra); transition: transform .1s; }
.dia:active { transform: scale(.95); }
.dia.fuera { background: transparent; box-shadow: none; }
.dia .n { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--texto); }
.dia.fuera .n { color: var(--gris2); font-weight: 500; }
.dia .n.fer { color: var(--rojo); }
.dia.hoy .n { background: var(--acento); color: #fff; font-weight: 800; }
.mini { border-radius: 6px; font-size: 10px; font-weight: 700; text-align: center; padding: 3px 0; white-space: nowrap; overflow: hidden; letter-spacing: .02em; }
.mini.pend { outline: 2px dashed #E0732F; outline-offset: 1px; }
.leyenda { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 10px 0 0; font-size: 11px; color: var(--suave); }
.leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.leyenda i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* Listas */
.lista { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 2px 14px; box-shadow: var(--sombra); }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linea); min-height: 56px; }
.item:last-child { border-bottom: 0; }
.item .crece { flex: 1; min-width: 0; }
.item .t { font-size: 14px; font-weight: 700; }
.item .s { font-size: 12px; color: var(--suave); margin-top: 2px; }
a.item { text-decoration: none; color: inherit; }
a.item svg:last-child { color: var(--gris2); }
.av { width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; background: var(--acento-tinte); color: var(--acento-texto); letter-spacing: .02em; }

/* Avisos */
.aviso { border-radius: 14px; padding: 11px 13px; font-size: 13px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.aviso svg { flex: none; margin-top: 1px; }
.aviso.naranja { background: var(--naranja-tinte); border: 1px solid var(--naranja-borde); color: var(--naranja-t); }
.aviso.rojo { background: var(--rojo-tinte); border: 1px solid var(--rojo-borde); color: var(--rojo-t); }
.aviso.verde { background: var(--verde-tinte); border: 1px solid var(--verde-borde); color: var(--verde-t); }
.aviso.azul { background: var(--acento-tinte); color: var(--texto2); }
.aviso.ambar { background: var(--ambar-tinte); border: 1px solid var(--ambar-borde); color: var(--ambar-t); }
a.aviso { text-decoration: none; transition: transform .12s; }
a.aviso:active { transform: scale(.99); }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; padding: 4px 0; color: var(--texto2); }
.chk svg { flex: none; margin-top: 1px; }
.chk.ok { color: var(--verde-t); } .chk.mal { color: var(--rojo-t); }

/* Formularios */
.campo { display: block; }
.campo > span { display: block; font-size: 13px; font-weight: 600; color: var(--texto2); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; border: 1px solid var(--borde-f); border-radius: 12px; padding: 0 12px; font-size: 15px; background: var(--tarjeta); transition: border-color .15s, box-shadow .15s; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-tinte); }
.campo textarea { padding: 10px 12px; min-height: 70px; }
.rejilla2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opcion { border: 1px solid var(--borde); background: var(--tarjeta); border-radius: 14px; min-height: 52px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--sombra); transition: border-color .15s, background .15s, transform .1s; }
.opcion:active { transform: scale(.98); }
.opcion.on { border: 2px solid var(--acento); background: var(--acento-tinte); padding: 7px 9px; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; font-size: 14px; font-weight: 500; }
.interruptor input { width: 22px; height: 22px; accent-color: var(--acento); flex: none; }
.form { display: flex; flex-direction: column; gap: 18px; padding: 6px 16px 0; }

/* Rol (cuadrícula) */
.rol { overflow-x: auto; margin: 4px 12px 0; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 10px 8px; box-shadow: var(--sombra); }
.rol table { border-collapse: separate; border-spacing: 3px; }
.rol th { font-size: 10px; font-weight: 700; color: var(--gris); text-align: center; min-width: 38px; letter-spacing: .03em; }
.rol th.fer { color: var(--rojo); }
.rol th.nom { text-align: left; font-size: 12px; font-weight: 600; color: var(--texto); min-width: 84px; max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--tarjeta); letter-spacing: 0; z-index: 1; }
.celda { width: 38px; height: 36px; border-radius: 9px; border: 1px solid var(--linea); background: var(--sutil); font-size: 12px; font-weight: 800; cursor: pointer; padding: 0; transition: transform .1s; }
.celda:active { transform: scale(.92); }
.celda.t-D { background: var(--dia); color: var(--dia-t); border-color: transparent; }
.celda.t-N { background: var(--noche); color: var(--noche-t); border-color: transparent; }
.celda.no { background: repeating-linear-gradient(135deg, var(--sutil2) 0 4px, var(--tarjeta) 4px 8px); color: var(--gris); font-size: 10px; }
.celda.pref { border: 2px solid var(--azul-borde); }
.cob { font-size: 10px; font-weight: 700; text-align: center; border-radius: 7px; padding: 4px 0; }
.cob.ok { color: var(--verde); } .cob.mal { background: var(--rojo-tinte); color: var(--rojo-t); }
.barra { height: 8px; background: var(--sutil2); border-radius: 4px; overflow: hidden; }
.barra i { display: block; height: 8px; background: var(--acento); border-radius: 4px; transition: width .3s; }
.barra i.mal { background: var(--rojo); }

/* Hoja inferior */
.velo { position: fixed; inset: 0; background: rgba(8, 14, 26, .5); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: aparece .18s ease-out; }
.hoja { background: var(--tarjeta); width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 85vh; overflow-y: auto; box-shadow: var(--sombra-alta); animation: sube .24s cubic-bezier(.2, .8, .2, 1); }
.hoja::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--borde-f); margin: 0 auto 14px; }
.hoja h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sube { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

/* Barra inferior */
nav.barra-inf { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--tarjeta) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--borde); }
nav.barra-inf > div { max-width: 520px; margin: 0 auto; display: flex; padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); }
nav.barra-inf a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--gris); font-size: 11px; font-weight: 600; padding: 2px 0; position: relative; min-height: 48px; }
nav.barra-inf a svg { width: 56px; height: 30px; padding: 4px 16px; border-radius: 15px; transition: background .2s; box-sizing: border-box; }
nav.barra-inf a.on { color: var(--acento-texto); font-weight: 700; }
nav.barra-inf a.on svg { background: var(--acento-tinte); }
nav.barra-inf .num { position: absolute; top: -2px; left: calc(50% + 8px); background: #D9480F; color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--tarjeta); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #0D1726; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; z-index: 30; max-width: 90vw; box-shadow: var(--sombra-alta); animation: toast .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.demo { background: var(--ambar-tinte); color: var(--ambar-t); font-size: 12px; text-align: center; padding: 6px 12px; border-bottom: 1px solid var(--ambar-borde); }
.demo a { color: inherit; font-weight: 700; }
.heroe + * , .demo + main .heroe { margin-top: 0; }

/* Pantallas anchas: la app queda como una columna centrada */
@media (min-width: 700px) { .app { box-shadow: 0 0 0 1px var(--borde); background: var(--fondo); } body { background: var(--sutil2); } }
@media print { nav.barra-inf, .no-imprimir, .demo { display: none !important; } .app { padding: 0; max-width: none; } .rol { overflow: visible; border: 0; box-shadow: none; } }

/* ============ Estilo B (04/12/2026): como Turno Seguro — plano, bordes finos, sin sombras, cabecera de color sólida ============ */
:root { --sombra: none; --radio: 16px; --texto: #111827; --texto2: #374151; --suave: #4B5563; --gris: #6B7280; --borde: #E3E7EB; --borde-f: #D5DAE0; --linea: #EEF1F4; --negro: #111827; --dia: #F2C94C; --dia-t: #3D2E00; }
:root[data-tema] { --fondo: #F4F6F8; }
@media (prefers-color-scheme: dark) {
  :root { --texto: #E8EDF5; --texto2: #C6D0DE; --suave: #A3B1C4; --gris: #8C9AB0; --negro: #E8EDF5; --dia: #B8901F; --dia-t: #1F1700; }
  :root[data-tema="quirofano"] { --fondo: #0A1514; } :root[data-tema="noche"] { --fondo: #0D0C1F; } :root[data-tema="coral"] { --fondo: #160D0B; }
  :root[data-tema="uva"] { --fondo: #110B1E; } :root[data-tema="grafito"] { --fondo: #0E0E10; } :root[data-tema="azul"] { --fondo: #0B1220; }
}
/* Cabecera de color sólida (inicio y pantallas con franja) */
.cabecera, .heroe { background: var(--hero2); background-image: none; color: #fff; border-radius: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 14px 16px; margin-bottom: 4px; display: flex; flex-direction: column; gap: 6px; }
.cabecera h1.cap { text-transform: capitalize; }
.cabecera h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera-sub { font-size: 13px; color: rgba(255, 255, 255, .82); margin-top: -4px; }
.cabecera .icono, .heroe .icono { background: transparent; border: 0; color: #fff; box-shadow: none; }
.etiqueta { font-size: 11px; font-weight: 700; letter-spacing: .06em; background: rgba(255, 255, 255, .16); padding: 5px 10px; border-radius: 999px; }
.segmentado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 11px; margin-top: 6px; }
.segmentado.sobre-color { background: rgba(255, 255, 255, .14); }
.segmentado button { border: 0; border-radius: 8px; min-height: 36px; font-size: 14px; font-weight: 500; background: transparent; color: #fff; cursor: pointer; }
.segmentado button.on { background: #fff; color: var(--hero2); font-weight: 700; }
.heroe .resumen { background: rgba(255, 255, 255, .12); border-radius: 12px; margin: 6px 0 0; }
/* Superficies planas con borde fino */
.tarjeta, .lista, .rol, .opcion, .dia, .chip, .icono, .precio, .tema { box-shadow: none; }
.tarjeta, .lista, .rol { border-radius: 16px; }
.lista { padding: 0 14px; }
.opcion { border-radius: 12px; }
.chip { height: 34px; border-color: var(--borde-f); }
.chip.on { background: var(--acento); border-color: var(--acento); color: #fff; }
h2.sec { font-size: 12px; color: var(--gris); margin: 20px 18px 8px; }
/* Botones: el principal es negro, como en Turno Seguro */
.btn { border-radius: 12px; min-height: 50px; }
.btn.prim { box-shadow: none; }
.btn.negro { background: var(--negro); border-color: var(--negro); color: var(--fondo); }
.btn.negro:active { opacity: .9; }
.icono.prim { box-shadow: none; }
/* Calendario: celdas blancas con borde; los días con turno se pintan enteros */
.cal { padding: 8px 12px 0; }
.dia { min-height: 54px; border: 1px solid var(--borde); border-radius: 10px; padding: 4px; gap: 2px; }
.dia.fuera { border-color: transparent; }
.dia .n { font-size: 12px; width: 20px; height: 20px; }
.dia.hoy { border: 2px solid var(--acento); padding: 3px; }
.dia.hoy .n { background: transparent; color: inherit; font-weight: 800; }
.dia.pintado { border-color: transparent; }
.dia.pintado .n { color: inherit; font-weight: 700; }
.dia.pintado.hoy { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--acento); }
.dia .et { font-size: 11px; font-weight: 800; letter-spacing: .02em; text-align: center; white-space: nowrap; overflow: hidden; }
.dia .mini { font-size: 9px; padding: 1px 0; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.dia .mas { font-size: 9px; text-align: center; font-weight: 700; opacity: .8; }
.dia.pend { outline: 2px dashed #E0732F; outline-offset: -3px; }
.leyenda i { border-radius: 3px; }
/* Filas con punto y flecha */
.lista-t { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; }
.fila-t { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; min-height: 58px; }
.fila-t + .fila-t { border-top: 1px solid var(--linea); }
.fila-t .t { display: block; font-size: 14px; font-weight: 700; }
.fila-t .s { display: block; font-size: 12px; color: var(--suave); margin-top: 2px; font-variant-numeric: tabular-nums; }
.fila-t .nota-s { color: var(--ambar-t); }
.fila-t > svg { color: var(--gris); flex: none; }
.punto-t { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.libre { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border: 1px dashed var(--borde-f); border-radius: 14px; color: var(--gris); font-size: 13px; text-decoration: none; }
/* Barra inferior blanca simple */
nav.barra-inf { background: var(--tarjeta); backdrop-filter: none; -webkit-backdrop-filter: none; }
nav.barra-inf a.on svg { background: transparent; }
.toast { background: var(--negro); color: var(--fondo); box-shadow: none; }
.marca img { border-radius: 6px; }
/* Días pintados: el color del tipo gana sobre el fondo blanco de la celda */
.dia.pintado.t-D { background: var(--dia); color: var(--dia-t); } .dia.pintado.t-N { background: var(--noche); color: var(--noche-t); }
.dia.pintado.t-C { background: var(--consulta); color: var(--consulta-t); } .dia.pintado.t-M { background: var(--manana); color: var(--manana-t); }
.dia.pintado.t-T { background: var(--tarde); color: var(--tarde-t); } .dia.pintado.t-R { background: var(--reten); color: var(--reten-t); }
.dia.pintado.t-P, .dia.pintado.t-X { background: var(--otro); color: var(--otro-t); }
.dia.pintado.t-c-rosa { background: #F9A8D4; color: #831843; } .dia.pintado.t-c-naranja { background: #FDBA74; color: #7C2D12; } .dia.pintado.t-c-celeste { background: #7DD3FC; color: #0C4A6E; }
.dia.pintado.t-c-lima { background: #BEF264; color: #365314; } .dia.pintado.t-c-violeta { background: #C4B5FD; color: #4C1D95; } .dia.pintado.t-c-gris { background: #CBD5E1; color: #1E293B; }
/* Pantallas internas: barra blanca con línea fina (como Turno Seguro) */
.cab.atras { background: var(--tarjeta); border-bottom: 1px solid var(--borde); padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; margin-bottom: 10px; }
.cab.atras h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.cab.atras:has(+ .sobre) { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
.cab.atras + .sobre { background: var(--tarjeta); border-bottom: 1px solid var(--borde); margin: 0 0 10px; padding: 0 18px 10px 54px; }
.cabecera .chips, .cabecera + .chips { padding-top: 10px; }
/* Controles segmentados de pantallas internas: caben en el ancho y, si no, se deslizan */
.seg { background: var(--borde); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 0 9px; min-width: 0; flex: 1 0 auto; }
.seg button.on { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
html, body { overflow-x: hidden; }
