/* capital.dma® · Vacaciones y permisos
   Lenguaje visual tomado del Manual de Identidad:
   - Capital black #1f1f1e, aqua #32ab96, green #81f851, purple #694aff (terciario), white #f6f6f6.
   - Identificador gráfico: squircle con brillo aqua→green (gafete y taza), píldoras con degradado lineal,
     malla aqua/green/purple y el punto turquesa de la marca.
   - Títulos con el squircle aqua detrás de la primera letra, como en las páginas del manual. */

/* Paralucent y Avenir Next LT Pro son la tipografía de marca; mientras no haya licencia web se usan
   Familjen Grotesk y Nunito Sans (en Mac se toma Avenir Next del sistema). */
@font-face { font-family: 'Familjen Grotesk'; font-weight: 400; font-display: swap; src: url('../fonts/familjen-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Familjen Grotesk'; font-weight: 500; font-display: swap; src: url('../fonts/familjen-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Familjen Grotesk'; font-weight: 600; font-display: swap; src: url('../fonts/familjen-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Familjen Grotesk'; font-weight: 700; font-display: swap; src: url('../fonts/familjen-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-weight: 400; font-display: swap; src: url('../fonts/nunito-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-weight: 600; font-display: swap; src: url('../fonts/nunito-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-weight: 700; font-display: swap; src: url('../fonts/nunito-sans-latin-700-normal.woff2') format('woff2'); }

@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  /* Marca */
  --black: #1f1f1e;
  --aqua: #32ab96;
  --green: #81f851;
  --purple: #694aff;
  --white: #f6f6f6;

  /* Derivados (tonalidades de saturación que permite el manual) */
  --aqua-700: #1a7464;
  --aqua-600: #23907d;
  --aqua-100: #d6efea;
  --aqua-50: #ebf7f4;
  --green-600: #4fc41f;
  --green-50: #f0fde9;
  --purple-700: #4a2fd6;
  --purple-100: #e2dbff;
  --purple-50: #f2efff;

  /* Superficies claras */
  --canvas: #f6f6f6;
  --paper: #ffffff;
  --sunk: #efefed;
  --line: #e6e6e2;
  --line-2: #d4d4cf;
  --ink: #1f1f1e;
  --ink-2: #5c5c58;
  --ink-3: #8b8b86;

  /* Superficies oscuras (aplicaciones del manual) */
  --night: #1f1f1e;
  --night-2: #292927;
  --night-3: #353533;
  --night-line: #3a3a37;
  --night-ink: #f6f6f6;
  --night-ink-2: #a9a9a3;

  --danger: #d0453a;
  --danger-50: #fdeeec;
  --warn: #a86f00;
  --warn-50: #fff4da;

  --grad: linear-gradient(90deg, var(--aqua) 0%, var(--aqua) 30%, var(--green) 100%);
  --grad-d: linear-gradient(135deg, var(--aqua) 0%, #4fcf86 55%, var(--green) 100%);
  --grad-purple: linear-gradient(90deg, #8f78ff 0%, var(--purple) 100%);
  --mesh:
    radial-gradient(60% 70% at 15% 15%, rgba(129, 248, 81, .9) 0%, rgba(129, 248, 81, 0) 70%),
    radial-gradient(70% 70% at 80% 85%, rgba(105, 74, 255, .85) 0%, rgba(105, 74, 255, 0) 70%),
    radial-gradient(80% 80% at 50% 50%, var(--aqua) 0%, rgba(50, 171, 150, .6) 60%, rgba(50, 171, 150, 0) 100%);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --squircle: 38% / 42%;
  --shadow: 0 1px 2px rgba(31, 31, 30, .04), 0 10px 30px -18px rgba(31, 31, 30, .22);
  --shadow-up: 0 2px 4px rgba(31, 31, 30, .05), 0 22px 40px -22px rgba(31, 31, 30, .35);

  --side: 264px;
  --font-head: 'Paralucent', 'Familjen Grotesk', system-ui, sans-serif;
  --font-body: 'Avenir Next LT Pro', 'Avenir Next', 'Nunito Sans', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--aqua-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--aqua-100); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.015em; margin: 0; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -0.025em; }
h2 { font-size: 19px; }
h3 { font-size: 15.5px; }
p { margin: 0 0 12px; }
small, .muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.num-tab { font-variant-numeric: tabular-nums; }

/* Firma del manual: el squircle aqua detrás de la primera letra del título. */
.mark { position: relative; isolation: isolate; }
.mark::before {
  content: ''; position: absolute; z-index: -1; left: -0.28em; top: 0.02em;
  width: 0.7em; height: 0.56em; border-radius: var(--squircle); background: var(--aqua);
  animation: markIn .7s var(--spring) both;
}
@keyframes markIn { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }

/* Iconos de trazo */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 24px; height: 24px; }

/* ---------- Estructura ---------- */
.logo { display: block; height: auto; }
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--night) var(--side), transparent var(--side)); }

.side {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--night); color: var(--night-ink);
  padding: 28px 16px 18px; display: flex; flex-direction: column; gap: 6px;
  view-transition-name: side;
}
.side-glow {
  position: absolute; width: 260px; height: 230px; left: -90px; bottom: -110px; z-index: 0; pointer-events: none;
  border-radius: var(--squircle); background: var(--mesh); filter: blur(42px); opacity: .5;
  animation: drift 18s ease-in-out infinite alternate;
}
.side > *:not(.side-glow) { position: relative; z-index: 1; }
.side-logo { display: block; padding: 0 12px; }
.side-logo .logo { width: 116px; }
.side .product { padding: 0 12px; margin: 6px 0 22px; font-size: 13px; color: var(--night-ink-2); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; position: relative;
  padding: 10px 12px; border-radius: 12px; color: #cfcfca; font-weight: 600; font-size: 14.5px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a .i { color: #8d8d87; transition: color .2s var(--ease), transform .3s var(--spring); }
.nav a:hover { background: var(--night-2); color: #fff; text-decoration: none; }
.nav a:hover .i { color: #fff; transform: translateX(1px) scale(1.06); }
.nav a .lbl { flex: 1; min-width: 0; }
/* El punto turquesa de la marca marca la sección activa: "Inicio." */
.nav a.on { background: var(--night-2); color: #fff; box-shadow: inset 0 0 0 1px var(--night-line); }
.nav a.on .i { color: var(--aqua); }
.nav a.on .lbl::after { content: ''; display: inline-block; width: 6px; height: 5px; margin-left: 2px; border-radius: 40%; background: var(--aqua); vertical-align: 0; }
.nav .count {
  background: var(--grad-d); color: var(--black); font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 1px 8px; min-width: 24px; text-align: center; box-shadow: 0 0 16px rgba(50, 171, 150, .45);
}
.side .me { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 14px 4px 0; border-top: 1px solid var(--night-line); }
.me-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; padding: 6px 8px; border-radius: 12px; color: inherit; }
.me-link:hover { background: var(--night-2); text-decoration: none; }
.me .who { line-height: 1.25; min-width: 0; display: block; }
.me .who b { display: block; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.me .who span { font-size: 12.5px; color: var(--night-ink-2); }

.stage { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px;
  padding: 14px 40px; min-height: 68px;
  background: rgba(246, 246, 246, .78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-logo { display: none; }
.topbar-logo img { display: block; width: 40px; height: auto; }
.today-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.today-chip .dot { width: 8px; height: 7px; border-radius: 40%; background: var(--aqua); box-shadow: 0 0 0 4px var(--aqua-50); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  transition: transform .2s var(--spring), background .2s, border-color .2s;
}
.icon-btn:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on-dark { background: transparent; border-color: transparent; color: var(--night-ink-2); }
.icon-btn.on-dark:hover { background: var(--night-2); color: #fff; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--aqua); color: var(--black); font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--canvas);
}
.bell .badge { animation: pop .5s var(--spring) .3s both; }
.topbar-me { text-decoration: none !important; }

.main { padding: 10px 40px 72px; min-width: 0; flex: 1; view-transition-name: main; }
.wrap { max-width: 1180px; }
.topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 26px; flex-wrap: wrap; }
.topline .sub { color: var(--ink-2); margin-top: 8px; font-size: 15.5px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.crumb .i { width: 16px; height: 16px; }
.tabbar { display: none; }

/* ---------- Lista de personas: filtros y selección ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { width: auto; min-width: 170px; flex: 0 1 auto; }
.filter-search { position: relative; flex: 1 1 240px; min-width: 0; }
.filter-search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; pointer-events: none; }
.filters .filter-search input { padding-left: 42px; }
.pick-col { width: 36px; padding-right: 0 !important; }
.pick-col input { width: 18px; height: 18px; accent-color: var(--aqua); cursor: pointer; margin: 0; }
.people-table tbody tr:has([data-pick]:checked) { background: var(--aqua-50); }
.pick-bar {
  position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; margin-bottom: 14px; border-radius: 16px; background: var(--night); color: #fff;
  box-shadow: 0 16px 32px -18px rgba(0, 0, 0, .5); animation: rise .3s var(--ease);
}
.pick-bar > span { flex: 1; font-size: 14px; }
.pick-bar .btn.ghost { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .25); }

/* ---------- Ver como (Dirección) ---------- */
.viewas {
  position: sticky; top: 0; z-index: 45; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  min-height: 52px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: var(--purple); color: #fff; font-size: 14px;
}
.viewas > span { flex: 1; min-width: 0; }
.viewas b { font-weight: 800; }
.viewas .viewas-note { opacity: .85; }
.viewas .btn { --bg: #fff; --fg: var(--purple-700); --bd: #fff; }
body.viewing .side { top: 52px; height: calc(100vh - 52px); }
body.viewing .topbar { top: 52px; }

/* ---------- Superficies ---------- */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 26px; box-shadow: var(--shadow); min-width: 0;
}
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 14px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; }
.panel-head p { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; }
.panel-head .link { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.panel-head .link .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.panel-head .link:hover { text-decoration: none; }
.panel-head .link:hover .i { transform: translateX(3px); }
.h-ico { width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--aqua-50); color: var(--aqua-700); flex: none; }
.h-ico .i { width: 18px; height: 18px; }
.h-ico.purple { background: var(--purple-50); color: var(--purple-700); }
.h-ico.dark { background: var(--black); color: var(--green); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
.stack > .panel + .panel { margin-top: 0; }

/* Entrada de la página: un solo movimiento coordinado */
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes drift { to { transform: translate(40px, -30px) rotate(25deg) scale(1.15); } }
@keyframes spin { to { --spin: 360deg; } }

/* ---------- Héroe oscuro con el identificador gráfico ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--night-ink); border-radius: var(--r-xl);
  padding: 34px 38px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px 44px; align-items: center;
  box-shadow: 0 30px 60px -40px rgba(31, 31, 30, .8);
}
.hero::after {
  content: ''; position: absolute; z-index: -1; width: 520px; height: 420px; right: -160px; top: -200px;
  border-radius: var(--squircle); background: var(--mesh); filter: blur(70px); opacity: .32;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero h1 { color: #fff; }
.hero .lead { color: #cfcfca; font-size: 16px; max-width: 54ch; margin: 12px 0 0; }
.hero .lead b { color: #fff; font-weight: 700; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero.compact { grid-template-columns: minmax(0, 1fr); }

/* El anillo: squircle con borde de luz aqua→green que gira despacio, como el gafete del manual */
.ring {
  --size: 216px;
  position: relative; width: var(--size); height: calc(var(--size) * .94); border-radius: var(--squircle);
  display: grid; place-items: center; isolation: isolate; flex: none;
  animation: ringIn .9s var(--spring) both;
}
.ring::before, .ring::after {
  content: ''; position: absolute; border-radius: inherit; z-index: -2;
  background: conic-gradient(from var(--spin), var(--aqua), var(--green) 22%, var(--aqua) 46%, #157a68 70%, var(--aqua));
  animation: spin 9s linear infinite;
}
.ring::before { inset: 0; }
.ring::after { inset: 6px; filter: blur(26px); opacity: .7; z-index: -3; }
.ring-core {
  position: absolute; inset: 9px; border-radius: inherit; z-index: -1;
  background: radial-gradient(closest-side, var(--night) 74%, rgba(31, 31, 30, .82) 88%, rgba(31, 31, 30, .35) 100%);
  filter: blur(4px);
}
.ring-in { text-align: center; display: grid; gap: 4px; justify-items: center; }
.ring-num { font-family: var(--font-head); font-weight: 400; font-size: 84px; line-height: .9; letter-spacing: -0.05em; color: #fff; font-variant-numeric: tabular-nums; }
.ring-cap { font-size: 13.5px; font-weight: 600; color: #bff5d9; max-width: 13ch; line-height: 1.25; }
.ring.light::after { opacity: .45; }
.ring.light .ring-core { background: radial-gradient(closest-side, #fff 74%, rgba(255, 255, 255, .85) 88%, rgba(255, 255, 255, .3) 100%); }
.ring.light .ring-num { color: var(--ink); }
.ring.light .ring-cap { color: var(--aqua-700); }
.ring.purple::before, .ring.purple::after { background: conic-gradient(from var(--spin), var(--purple), #a594ff 25%, var(--purple) 50%, #3a22b8 75%, var(--purple)); }
.ring.sm { --size: 132px; }
.ring.sm .ring-num { font-size: 50px; }
.ring.sm .ring-cap { font-size: 12px; }
@keyframes ringIn { from { transform: scale(.7) rotate(-8deg); opacity: 0; } }

/* Métricas del héroe de Dirección */
.pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.pulse a, .pulse div.p {
  display: block; color: inherit; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08); transition: background .2s, transform .25s var(--spring); min-width: 0;
}
.pulse a:hover { text-decoration: none; background: rgba(255, 255, 255, .09); transform: translateY(-2px); }
.pulse .k { font-size: 13px; color: var(--night-ink-2); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.pulse .k .i { width: 16px; height: 16px; color: var(--aqua); }
.pulse .v { font-family: var(--font-head); font-size: 34px; line-height: 1.05; margin-top: 8px; letter-spacing: -0.03em; color: #fff; }
.pulse .v small { font-family: var(--font-body); font-size: 14px; color: var(--night-ink-2); letter-spacing: 0; margin-left: 4px; }
.pulse .v.txt { font-size: 21px; letter-spacing: -0.01em; margin-top: 10px; }
.pulse .hot { background: linear-gradient(135deg, rgba(50, 171, 150, .28), rgba(129, 248, 81, .14)); border-color: rgba(129, 248, 81, .25); }

/* ---------- Píldoras: cada píldora es un día y cada mitad, media jornada ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 14px; max-width: 560px; }
.pill {
  --i: 0; display: flex; width: 32px; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--grad); background-size: calc(var(--n) * 38px) 100%; background-position: calc(var(--i) * -38px) 0;
  animation: pillIn .5s var(--spring) both; animation-delay: calc(300ms + var(--i) * 28ms);
}
.pill i { flex: 1; display: block; }
.pill i + i { box-shadow: -1px 0 0 rgba(31, 31, 30, .55); }
.pill i.used { background: var(--night-3); }
.pill i.wait { background: var(--purple); }
.on-light .pill i.used { background: var(--black); }
.on-light .pill i + i { box-shadow: -1px 0 0 rgba(255, 255, 255, .9); }
@keyframes pillIn { from { transform: scale(.3); opacity: 0; } }
.legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; color: var(--night-ink-2); }
.on-light .legend, .legend.on-light { color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span::before { content: ''; width: 18px; height: 9px; border-radius: 999px; background: var(--line); }
.legend .l-free::before { background: var(--grad); }
.legend .l-used::before { background: var(--night-3); }
.on-light .legend .l-used::before { background: var(--black); }
.legend .l-wait::before { background: var(--purple); }
.legend .l-closed::before { background: repeating-linear-gradient(135deg, var(--line-2) 0 3px, var(--sunk) 3px 6px); }
.legend .l-team::before { width: 9px; border-radius: 40%; background: var(--purple); }

/* Barra degradada (lineal del manual) */
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 999px; background: var(--grad); transform-origin: left; animation: grow 1s var(--ease) .25s both; }
.meter i.purple { background: var(--grad-purple); }
.meter i.dark { background: var(--black); }
.meter i.wait { background: repeating-linear-gradient(135deg, var(--purple) 0 4px, #8f78ff 4px 8px); }
.on-dark .meter, .meter.on-dark { background: rgba(255, 255, 255, .1); }
.meter.thin { height: 6px; }
@keyframes grow { from { transform: scaleX(0); } }

.countdown { display: grid; gap: 10px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); margin-top: 22px; max-width: 560px; }
.countdown-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--night-ink-2); }
.countdown-row b { color: #fff; font-weight: 700; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--black); --fg: var(--white); --bd: var(--black);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14.5px; line-height: 1; letter-spacing: .005em;
  padding: 13px 20px; border-radius: 999px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .2s var(--spring), box-shadow .25s var(--ease), background-position .5s var(--ease), background-color .2s, border-color .2s;
}
.btn .i { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.dark:hover, .btn:not([class*=" "]):hover { background: #34342f; }
.btn.primary {
  --fg: var(--black); --bd: transparent;
  background: linear-gradient(90deg, var(--aqua), #5fdc7a 50%, var(--green), var(--aqua)); background-size: 300% 100%; background-position: 0 0;
  box-shadow: 0 8px 22px -10px rgba(50, 171, 150, .8);
}
.btn.primary:hover { background-position: 50% 0; box-shadow: 0 12px 28px -10px rgba(50, 171, 150, .9), 0 0 0 4px rgba(129, 248, 81, .18); }
.btn.aqua { --bg: var(--aqua); --bd: var(--aqua); --fg: var(--black); }
.btn.aqua:hover { --bg: #3cbca5; }
.btn.ghost { --bg: var(--paper); --fg: var(--ink); --bd: var(--line-2); }
.btn.ghost:hover { --bd: var(--ink-3); }
.btn.on-dark { --bg: rgba(255, 255, 255, .06); --fg: #fff; --bd: rgba(255, 255, 255, .18); }
.btn.on-dark:hover { --bg: rgba(255, 255, 255, .12); }
.btn.danger { --bg: var(--paper); --fg: var(--danger); --bd: #ecbcb7; }
.btn.danger:hover { --bg: var(--danger-50); }
.btn.danger.solid { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field { margin-bottom: 20px; }
.field .hint { font-size: 13px; color: var(--ink-2); margin-top: 7px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--paper);
  transition: border-color .15s, box-shadow .2s var(--ease);
}
select { appearance: none; padding-right: 38px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c5c58' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea { min-height: 92px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(50, 171, 150, .16); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--aqua); flex: none; }

/* Selector segmentado con indicador */
.seg { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background .2s var(--ease), color .2s, box-shadow .2s;
}
.seg label .i { width: 17px; height: 17px; }
.seg label:hover { color: var(--ink); }
.seg input:checked + label { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 31, 30, .08), 0 4px 12px -6px rgba(31, 31, 30, .25); }
.seg input:checked + label .i { color: var(--aqua-600); }
.seg input:focus-visible + label { outline: 2px solid var(--aqua); }
.seg.wide { display: flex; }
.seg.wide label { flex: 1; justify-content: center; }

/* Tarjetas de opción (tipo de ausencia) */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; cursor: pointer;
  padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 400;
  transition: border-color .2s, box-shadow .25s var(--ease), transform .2s var(--spring);
}
.choice label:hover { border-color: var(--line-2); transform: translateY(-1px); }
.choice label .h-ico { grid-row: span 2; }
.choice label b { font-weight: 700; font-size: 15px; }
.choice label span { font-size: 13px; color: var(--ink-2); }
.choice input:checked + label { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(50, 171, 150, .14); }
.choice input:checked + label.purple { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(105, 74, 255, .12); }
.choice input:focus-visible + label { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* ---------- Mensajes ---------- */
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; margin-bottom: 20px; font-size: 14.5px; }
.flash.err { background: var(--danger-50); color: #8e2a22; }
.flash .i { margin-top: 1px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 14px; background: var(--sunk); color: var(--ink-2); }
.note > .i { margin-top: 1px; color: var(--ink-3); }
.note > div { min-width: 0; flex: 1; }
.note.warn { background: var(--warn-50); color: #6b4a00; }
.note.warn > .i { color: var(--warn); }
.note.err { background: var(--danger-50); color: #8e2a22; }
.note.err > .i { color: var(--danger); }
.note.info { background: var(--aqua-50); color: #12574b; }
.note.info > .i { color: var(--aqua-600); }
.note.purple { background: var(--purple-50); color: #3a259e; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.note b { font-weight: 700; }

.toasts { position: fixed; z-index: 70; top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px;
  border-radius: 18px; background: var(--night); color: #fff; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .55);
  animation: toastIn .55s var(--spring) both;
}
.toast p { margin: 0; flex: 1; font-size: 14.5px; font-weight: 600; }
.toast-ico { width: 34px; height: 32px; border-radius: var(--squircle); display: grid; place-items: center; flex: none; background: var(--grad-d); color: var(--black); }
.toast-ico .i { width: 18px; height: 18px; stroke-width: 2.4; }
.toast.err .toast-ico { background: var(--danger); color: #fff; }
.toast-x { background: none; border: 0; color: var(--night-ink-2); cursor: pointer; padding: 6px; border-radius: 10px; display: grid; }
.toast-x:hover { color: #fff; background: var(--night-2); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.confetti { position: fixed; z-index: 80; pointer-events: none; width: 11px; height: 10px; border-radius: 40%; }

dialog.confirm {
  border: 0; padding: 0; border-radius: 24px; width: min(420px, calc(100vw - 32px)); background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55);
}
dialog.confirm[open] { animation: toastIn .4s var(--spring); }
dialog.confirm::backdrop { background: rgba(31, 31, 30, .45); backdrop-filter: blur(4px); }
dialog.confirm form { padding: 26px; display: grid; gap: 14px; }
dialog.confirm p { margin: 0; font-size: 16px; font-weight: 600; }
dialog.confirm .btn-row { justify-content: flex-end; }
.confirm-ico { width: 44px; height: 40px; border-radius: var(--squircle); display: grid; place-items: center; background: var(--warn-50); color: var(--warn); }

/* ---------- Estados ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ''; width: 7px; height: 6px; border-radius: 40%; background: currentColor; opacity: .9; }
.tag.plain::before { display: none; }
.tag.pending { background: var(--purple-50); color: var(--purple-700); }
.tag.pending::before { animation: blink 1.6s ease-in-out infinite; }
.tag.approved { background: var(--green-50); color: #2c6e11; }
.tag.approved::before { background: var(--green-600); }
.tag.rejected { background: var(--danger-50); color: #a3362d; }
.tag.cancelled { background: var(--sunk); color: var(--ink-3); }
.tag.exception { background: var(--warn-50); color: #7a5500; }
.tag.type-sin_goce { background: var(--purple-50); color: var(--purple-700); }
.tag.type-vacaciones { background: var(--aqua-50); color: var(--aqua-700); }
.tag.dark { background: var(--night-3); color: #fff; }
.tag.dark::before { background: var(--aqua); }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Tablas y listas ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.table th { text-align: left; font-weight: 700; color: var(--ink-3); font-size: 12.5px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafaf8; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -12px; padding: 0 2px; }
.person { display: flex; align-items: center; gap: 12px; color: inherit; min-width: 0; }
a.person:hover { text-decoration: none; }
a.person:hover b { color: var(--aqua-700); }
.person b { font-weight: 700; }
.person span span, .person > div > span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }

.avatar {
  --a: var(--aqua);
  width: 38px; height: 36px; border-radius: var(--squircle); flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; font-family: var(--font-head);
  background: var(--a); color: var(--black); letter-spacing: .01em;
}
.avatar.sm { width: 30px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 60px; font-size: 21px; }
.avatar.c1 { --a: #9ff57a; }
.avatar.c2 { --a: #7fd3c3; }
.avatar.c3 { --a: #c4b8ff; }
.avatar.c4 { --a: #e8e8e4; }
.faces { display: flex; }
.faces .avatar { box-shadow: 0 0 0 3px var(--paper); }
.faces .avatar + .avatar { margin-left: -8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list > li:first-child { padding-top: 2px; }
.list > li:last-child { border-bottom: 0; padding-bottom: 2px; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { font-weight: 700; }
.list .grow > span:not(.tag) { display: block; font-size: 13.5px; color: var(--ink-2); }
.list .end { text-align: right; white-space: nowrap; }
.list .end b { font-family: var(--font-head); font-size: 18px; }
.list .end span { display: block; font-size: 12.5px; color: var(--ink-3); }

/* Estado vacío con la composición de píldoras del manual */
.empty { display: flex; align-items: center; gap: 16px; color: var(--ink-2); font-size: 14.5px; padding: 6px 0; margin: 0; }
.empty::before {
  content: ''; flex: none; width: 46px; height: 32px;
  background:
    linear-gradient(90deg, var(--aqua), var(--green)) 0 0 / 46px 8px no-repeat,
    linear-gradient(90deg, rgba(105, 74, 255, .15), var(--purple)) 12px 12px / 34px 8px no-repeat,
    linear-gradient(90deg, rgba(50, 171, 150, .15), var(--aqua)) 22px 24px / 24px 8px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='32'%3E%3Crect width='46' height='8' rx='4'/%3E%3Crect x='12' y='12' width='34' height='8' rx='4'/%3E%3Crect x='22' y='24' width='24' height='8' rx='4'/%3E%3C/svg%3E");
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='32'%3E%3Crect width='46' height='8' rx='4'/%3E%3Crect x='12' y='12' width='34' height='8' rx='4'/%3E%3Crect x='22' y='24' width='24' height='8' rx='4'/%3E%3C/svg%3E");
}

/* Fechas como boleto: número grande y mes */
.datebox { width: 54px; flex: none; text-align: center; border-radius: 16px; background: var(--sunk); padding: 7px 0 6px; line-height: 1; }
.datebox b { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.datebox span { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-top: 3px; text-transform: lowercase; }
.datebox.aqua { background: var(--aqua-50); color: var(--aqua-700); }
.datebox.purple { background: var(--purple-50); color: var(--purple-700); }

/* ---------- Franja de dos semanas (quién sale y cuándo) ---------- */
.strip-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px 4px; }
.strip { --cols: 10; display: grid; grid-template-columns: 150px repeat(var(--cols), minmax(34px, 1fr)); row-gap: 8px; min-width: 620px; position: relative; }
.strip .sh { font-size: 11.5px; color: var(--ink-3); text-align: center; font-weight: 700; padding-bottom: 6px; line-height: 1.2; }
.strip .sh b { display: block; font-family: var(--font-head); font-size: 15px; color: var(--ink); }
.strip .sh.today b { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 40%; background: var(--black); color: #fff; }
.strip .sh.mon { box-shadow: inset 1px 0 0 var(--line); }
.strip .who { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13.5px; font-weight: 700; padding-right: 10px; }
.strip .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip .lane { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--cols), minmax(34px, 1fr)); align-items: center; height: 30px; border-radius: 999px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--cols) - 1px), var(--line) calc(100% / var(--cols) - 1px) calc(100% / var(--cols))); background-color: #fafaf8; }
.bar {
  --span: 1; position: relative; height: 26px; border-radius: 999px; background: var(--grad); margin: 0 2px;
  display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--black); white-space: nowrap; overflow: hidden;
  transform-origin: left; animation: grow .8s var(--ease) both; animation-delay: calc(200ms + var(--i, 0) * 70ms);
}
.bar.hs { margin-left: calc(50% / var(--span)); }
.bar.he { margin-right: calc(50% / var(--span)); }
.bar.sin_goce { background: var(--grad-purple); color: #fff; }
.bar.pending { background: repeating-linear-gradient(135deg, rgba(105, 74, 255, .14) 0 6px, rgba(105, 74, 255, .06) 6px 12px); color: var(--purple-700); box-shadow: inset 0 0 0 1.5px rgba(105, 74, 255, .5); }
.bar.away { background: linear-gradient(90deg, #cfcfca, #e6e6e2); }

/* ---------- Nómina: línea de tres momentos ---------- */
.payline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.payline li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; position: relative; }
.payline li::before { content: ''; width: 14px; height: 13px; border-radius: 40%; background: var(--paper); border: 2px solid var(--line-2); justify-self: center; z-index: 1; }
.payline li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 30px; bottom: -10px; width: 2px; background: var(--line); }
.payline li.hl::before { background: var(--aqua); border-color: var(--aqua); box-shadow: 0 0 0 5px var(--aqua-50); }
.payline li span { color: var(--ink-2); font-size: 14px; }
.payline li b { font-weight: 700; font-size: 14px; text-align: right; }

/* ---------- Solicitudes ---------- */
.req {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); padding: 22px 24px;
  box-shadow: var(--shadow); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.req::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad-d); }
.req.sin_goce::before { background: var(--grad-purple); }
.req + .req { margin-top: 14px; }
.req-top { display: flex; gap: 16px; align-items: flex-start; }
.req-top .grow { flex: 1; min-width: 0; }
.req-who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.req-who b { font-weight: 700; font-size: 15.5px; }
.req-dates { font-family: var(--font-head); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 6px; line-height: 1.15; }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 14px; }
.req-meta span { display: inline-flex; align-items: center; gap: 6px; }
.req-meta .i { width: 16px; height: 16px; color: var(--ink-3); }
.req-days { text-align: center; flex: none; padding: 10px 14px; border-radius: 18px; background: var(--sunk); min-width: 86px; }
.req-days b { display: block; font-family: var(--font-head); font-size: 30px; line-height: 1; letter-spacing: -0.03em; }
.req-days span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.req-body { display: grid; gap: 10px; margin-top: 16px; }
.req-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.req-actions form:not(.reject-box) { display: contents; }
.reject-box { display: none; width: 100%; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: 16px; background: var(--danger-50); animation: rise .35s var(--ease); }
.reject-box.open { display: flex; }
.reject-box input { flex: 1; min-width: 200px; background: #fff; }
.req .after { margin-top: 14px; }
.req .after .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; }
.req .after .row b { color: var(--ink); }

.mini-approve { display: flex; gap: 8px; align-items: center; }
.mini-approve form { margin: 0; }

/* Línea de tiempo de aprobación */
.steps { list-style: none; padding: 0; margin: 0; position: relative; }
.steps li { position: relative; padding: 0 0 22px 40px; }
.steps li::before { content: ''; position: absolute; left: 0; top: 0; width: 26px; height: 24px; border-radius: var(--squircle); background: var(--paper); border: 2px solid var(--line-2); box-sizing: border-box; }
.steps li::after { content: ''; position: absolute; left: 12px; top: 28px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--aqua) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%231f1f1e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat; border-color: var(--aqua); }
.steps li.done::after { background: var(--grad-d); }
.steps li.now::before { border-color: var(--purple); background: var(--purple-50); animation: ping 2s ease-out infinite; }
.steps li.no::before { border-color: var(--danger); background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center no-repeat; }
.steps b { font-weight: 700; display: block; }
.steps span { display: block; font-size: 13.5px; color: var(--ink-2); }
.steps q { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: var(--sunk); font-size: 13.5px; quotes: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(105, 74, 255, .35); } 80%, 100% { box-shadow: 0 0 0 10px rgba(105, 74, 255, 0); } }

/* Boleto de solicitud (detalle) */
.ticket { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: center; }
.ticket .req-dates { font-size: clamp(24px, 3vw, 32px); margin: 0 0 8px; color: #fff; }

/* ---------- Pedir días: calendario para elegir ---------- */
.picker { user-select: none; }
.picker-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.picker-head .grow { flex: 1; }
.picker-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.picker-month h4 { margin: 0 0 10px; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.pk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px 0; }
.pk-dow { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-align: center; padding-bottom: 6px; }
.pk-day {
  position: relative; height: 44px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; padding: 0; font-variant-numeric: tabular-nums; z-index: 0;
}
.pk-day .d { position: relative; z-index: 2; width: 38px; height: 36px; display: grid; place-items: center; border-radius: 40%; transition: background .15s, transform .25s var(--spring), color .15s; }
.pk-day:hover .d { background: var(--sunk); }
.pk-day:focus-visible { outline: none; }
.pk-day:focus-visible .d { box-shadow: 0 0 0 2px var(--aqua); }
.pk-day.blank { cursor: default; }
.pk-day.we { color: var(--ink-3); cursor: default; font-weight: 400; }
.pk-day.we:hover .d { background: none; }
.pk-day.past { color: #c2c2bd; cursor: default; font-weight: 400; }
.pk-day.past:hover .d { background: none; }
.pk-day.closed .d { background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 6px); color: var(--ink-3); }
.pk-day.closed.full { cursor: default; }
.pk-day.early .d { color: var(--warn); }
.pk-day.today .d { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pk-day .team { position: absolute; z-index: 3; bottom: 1px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.pk-day .team i { width: 5px; height: 5px; border-radius: 40%; background: var(--purple); }
.pk-day.in::before { content: ''; position: absolute; z-index: 1; inset: 4px 0; background: var(--aqua-50); }
.pk-day.in.we::before { background: rgba(235, 247, 244, .5); }
.pk-day.start::before { left: 50%; }
.pk-day.end::before { right: 50%; }
.pk-day.start.end::before { display: none; }
.pk-day.start .d, .pk-day.end .d { background: var(--grad-d); color: var(--black); transform: scale(1.06); box-shadow: 0 6px 16px -6px rgba(50, 171, 150, .9); }
.pk-day.purple.in::before { background: var(--purple-50); }
.pk-day.purple.start .d, .pk-day.purple.end .d { background: var(--grad-purple); color: #fff; box-shadow: 0 6px 16px -6px rgba(105, 74, 255, .8); }
.pk-tip { font-size: 13px; color: var(--ink-2); min-height: 20px; margin-top: 12px; }

/* Resumen de la solicitud */
.summary { position: sticky; top: 86px; }
.summary-card { background: var(--night); color: var(--night-ink); border-radius: var(--r-xl); padding: 26px; position: relative; overflow: hidden; isolation: isolate; }
.summary-card::after { content: ''; position: absolute; z-index: -1; width: 300px; height: 260px; right: -120px; bottom: -150px; border-radius: var(--squircle); background: var(--mesh); filter: blur(55px); opacity: .35; }
.summary-card .when { font-family: var(--font-head); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 18px 0 4px; color: #fff; }
.summary-card .sub2 { color: var(--night-ink-2); font-size: 14px; margin: 0; }
.summary-card .ring { margin: 0 auto; }
.summary-card .route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; font-size: 13px; color: var(--night-ink-2); }
.summary-card .route .tag { background: var(--night-3); color: #fff; }
.summary-card .route .tag::before { background: var(--aqua); }
.summary-card .note { margin-top: 16px; }
.summary-card .after { margin-top: 18px; }
.summary-card .after .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--night-ink-2); margin-bottom: 8px; }
.summary-card .after .row b { color: #fff; }
.summary-empty { text-align: center; padding: 10px 0; }
.summary-empty p { color: var(--night-ink-2); margin: 16px auto 0; max-width: 26ch; }

/* Resumen flotante en el teléfono */
.sum-float { display: none; }

/* ---------- Calendario del equipo ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-head h2 { font-size: 26px; min-width: 210px; letter-spacing: -0.02em; }
.cal-head .grow { flex: 1; }
.cal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.cal-dows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fafaf8; }
.cal-dows div { padding: 11px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.week { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 28px; row-gap: 4px; padding: 40px 0 12px; min-height: 128px; border-bottom: 1px solid var(--line); }
.week:last-child { border-bottom: 0; }
.week-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); z-index: 0; }
.week-bg > div { border-right: 1px solid var(--line); padding: 9px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; font-size: 13px; min-width: 0; }
.week-bg > div:last-child { border-right: 0; }
.week-bg .n { font-family: var(--font-head); font-weight: 700; font-size: 15px; width: 28px; height: 26px; display: grid; place-items: center; border-radius: 40%; flex: none; }
.week-bg .out { background: #fbfbfa; }
.week-bg .out .n { color: #c2c2bd; }
.week-bg .today .n { background: var(--black); color: #fff; }
.week-bg .closed { background: repeating-linear-gradient(135deg, #f1f1ee 0 6px, #fafaf8 6px 12px); }
.week-bg .closed.afternoon { background: repeating-linear-gradient(135deg, #ececE8 0 6px, #fafaf8 6px 12px) right / 50% 100% no-repeat; }
.week-bg .closed.morning { background: repeating-linear-gradient(135deg, #ececE8 0 6px, #fafaf8 6px 12px) left / 50% 100% no-repeat; }
.week-bg .why { font-size: 11.5px; color: var(--ink-2); text-align: right; line-height: 1.25; font-weight: 600; }
.week .ev {
  position: relative; z-index: 1; margin: 0 4px; height: 28px; border-radius: 999px; padding: 0 12px; display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--grad); transform-origin: left; animation: grow .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
  text-decoration: none !important;
}
.week .ev.hs { margin-left: calc(4px + 50% / var(--span, 1)); }
.week .ev.he { margin-right: calc(4px + 50% / var(--span, 1)); }
.week .ev.cl { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 0; }
.week .ev.cr { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 0; }
.week .ev.sin_goce { background: var(--grad-purple); color: #fff; }
.week .ev.pending { background: repeating-linear-gradient(135deg, rgba(105, 74, 255, .13) 0 6px, rgba(105, 74, 255, .05) 6px 12px), #fff; color: var(--purple-700); box-shadow: inset 0 0 0 1.5px rgba(105, 74, 255, .5); }
.week .ev.away { background: linear-gradient(90deg, #d9d9d4, #ececea); }
.week .ev .avatar { width: 20px; height: 19px; font-size: 9.5px; margin-left: -7px; background: rgba(255, 255, 255, .75); }
.week .ev small { font-weight: 600; opacity: .75; }
.agenda { display: none; }
.strip-list { display: none; }
.aev { display: flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--grad); color: var(--black); }
.aev.sin_goce { background: var(--grad-purple); color: #fff; }
.aev.pending { background: var(--purple-50); color: var(--purple-700); box-shadow: inset 0 0 0 1.5px rgba(105, 74, 255, .4); }
.aev.away { background: #e6e6e2; }

/* ---------- Notificaciones ---------- */
.notif-group h3 { font-size: 13px; color: var(--ink-3); font-weight: 700; margin: 4px 0 6px; font-family: var(--font-body); }
.notif-group + .notif-group { margin-top: 18px; }
.notif { display: flex; gap: 14px; padding: 14px 12px; margin: 0 -12px; border-radius: 16px; color: inherit; transition: background .15s; }
.notif:hover { background: #fafaf8; text-decoration: none; }
.notif .h-ico { margin-top: 2px; }
.notif .body { flex: 1; min-width: 0; }
.notif b { font-weight: 700; display: block; }
.notif p { margin: 2px 0 4px; color: var(--ink-2); font-size: 14px; }
.notif time { font-size: 12.5px; color: var(--ink-3); }
.notif .pip { width: 9px; height: 8px; border-radius: 40%; margin-top: 8px; flex: none; }
.notif.unread .pip { background: var(--aqua); box-shadow: 0 0 0 4px var(--aqua-50); }
.notif.unread b::after { content: ''; }

/* ---------- Acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--night); }
.auth-brand { color: var(--white); padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; }
.auth-brand .logo { width: 150px; }
.auth-blob {
  position: absolute; z-index: -1; width: min(62vw, 640px); aspect-ratio: 1.05; right: -8%; top: 8%;
  border-radius: var(--squircle); background: var(--mesh); filter: blur(10px); opacity: .95;
  animation: morph 14s ease-in-out infinite alternate;
}
.auth-blob::after { content: ''; position: absolute; inset: 22%; border-radius: inherit; background: var(--night); filter: blur(40px); }
@keyframes morph { 0% { border-radius: 38% / 42%; transform: rotate(0) scale(1); } 50% { border-radius: 46% / 36%; } 100% { border-radius: 34% / 46%; transform: rotate(18deg) scale(1.08); } }
.auth-pills { position: absolute; z-index: -1; left: 52px; top: 150px; display: grid; gap: 10px; width: 180px; opacity: .9; }
.auth-pills i { display: block; height: 14px; border-radius: 999px; animation: grow 1.2s var(--ease) both; }
.auth-pills i:nth-child(1) { width: 100%; background: var(--grad); animation-delay: .3s; }
.auth-pills i:nth-child(2) { width: 78%; margin-left: 22%; background: linear-gradient(90deg, rgba(105, 74, 255, 0), var(--purple)); animation-delay: .45s; }
.auth-pills i:nth-child(3) { width: 60%; margin-left: 40%; background: linear-gradient(90deg, rgba(50, 171, 150, 0), var(--aqua)); animation-delay: .6s; }
.auth-brand .big { position: relative; font-family: var(--font-head); font-size: clamp(40px, 4.6vw, 66px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; max-width: 10ch; margin: 0 0 18px; }
.auth-brand .big span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand .foot { font-size: 14px; color: var(--night-ink-2); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--canvas); border-radius: 36px 0 0 36px; }
.auth-form .box { width: 100%; max-width: 390px; animation: rise .6s var(--ease) both; }
.auth-form h1 { font-size: 34px; margin-bottom: 10px; }
.auth-form .sub { color: var(--ink-2); margin-bottom: 28px; }
.auth-form .flash.ok { background: var(--aqua-50); color: #12574b; }

/* ---------- Varios ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 999px; margin-bottom: 24px; overflow-x: auto; width: fit-content; max-width: 100%; }
.tabs a { padding: 9px 16px; color: var(--ink-2); border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); background: var(--paper); box-shadow: 0 1px 2px rgba(31, 31, 30, .08), 0 4px 12px -6px rgba(31, 31, 30, .25); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-weight: 700; }
.stat { display: grid; gap: 2px; }
.stat b { font-family: var(--font-head); font-size: 34px; font-weight: 400; letter-spacing: -0.04em; line-height: 1; }
.stat > span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--sunk); padding: 12px 14px; border-radius: 12px; word-break: break-all; }
.preview { border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); padding: 18px 20px; }
.right { text-align: right; }
.mt0 { margin-top: 0 !important; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0 !important; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paginación */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.pager .on { background: var(--black); color: #fff; border-color: var(--black); }
.pager .off { color: var(--ink-3); }

/* ---------- Transiciones entre páginas ---------- */
@view-transition { navigation: auto; }
::view-transition-old(main) { animation: vtOut .16s ease-in both; }
::view-transition-new(main) { animation: vtIn .32s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1180px) {
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-months { grid-template-columns: 1fr; }
  .picker-months .picker-month + .picker-month { display: none; }
}
@media (max-width: 980px) {
  .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}

/* ---------- Teléfono ---------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-105%); transition: transform .35s var(--ease); height: 100%; padding-top: calc(28px + env(safe-area-inset-top, 0px)); padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .side { overflow: hidden auto; }
  .side-glow { display: none; }
  body.nav-open .side { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .35); }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(31, 31, 30, .5); z-index: 40; animation: fade .25s; }
  @keyframes fade { from { opacity: 0; } }
  .topbar { padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); min-height: 60px; }
  .topbar-logo { display: block; }
  .today-chip { display: none; }
  .hide-sm { display: none !important; }
  .main { padding: 6px max(16px, env(safe-area-inset-right, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  body.viewing .side { top: 0; height: 100%; }
  body.viewing .topbar { top: 0; position: relative; }
  .viewas .viewas-note { display: none; }
  .filters select { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .pick-bar { top: 8px; }
  .table.people-table thead { display: block; }
  .people-table thead tr { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .people-table thead th { display: none; border: 0; padding: 0; }
  .people-table thead th.pick-col { display: block; }
  .people-table thead th.pick-col::after { content: 'Marcar a las visibles'; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-left: 8px; vertical-align: 3px; }
  .table.people-table tbody tr { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); }
  .table.people-table td.pick-col { grid-column: 1; grid-row: 1; align-self: center; }
  .table.people-table td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; font-size: 15px; }
  .table.people-table tbody td:nth-child(2)::before { display: none; }
  .table.people-table td:nth-child(3), .table.people-table td:nth-child(5), .table.people-table td:nth-child(7) { grid-column: 2; }
  .table.people-table td:nth-child(4), .table.people-table td:nth-child(6) { grid-column: 3; }
  .tabbar {
    display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(31, 31, 30, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 24px; padding: 8px 6px; justify-content: space-around; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5);
  }
  .tab { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 4px 2px; color: #9d9d97; font: inherit; font-size: 11px; font-weight: 700; background: none; border: 0; cursor: pointer; text-decoration: none !important; }
  .tab-ico { position: relative; display: grid; place-items: center; width: 40px; height: 30px; border-radius: 12px; transition: background .2s, color .2s; }
  .tab-ico .badge { top: -6px; right: -2px; border-color: var(--night); }
  .tab.on { color: #fff; }
  .tab.on .tab-ico { background: var(--night-3); color: var(--aqua); }
  .tab.fab .tab-ico { width: 52px; height: 46px; margin-top: -22px; border-radius: var(--squircle); background: var(--grad-d); color: var(--black); box-shadow: 0 10px 24px -8px rgba(50, 171, 150, .9), 0 0 0 5px var(--canvas); }
  .tab.fab .tab-ico .i { width: 24px; height: 24px; stroke-width: 2.4; }
  .toasts { top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .sum-float:not([hidden]) {
    display: flex; align-items: center; gap: 8px; position: fixed; z-index: 29; left: 20px; right: 20px; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 40px -16px rgba(31, 31, 30, .45), 0 0 0 1px var(--line);
    text-decoration: none !important; animation: toastIn .45s var(--spring);
  }
  .sum-float b { font-family: var(--font-head); font-size: 22px; }
  .sum-float span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
  .sum-float .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--grad-d); color: var(--black); font-weight: 700; }
  .list > li { flex-wrap: wrap; }
  .list > li > .tag:last-child { margin-left: auto; }
  h1 { font-size: 28px; }
  .g2, .row2, .row3 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 20px 18px; border-radius: 20px; }
  .hero { padding: 26px 22px; border-radius: 24px; gap: 20px; }
  .ring { --size: 168px; }
  .ring-num { font-size: 66px; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pulse .v { font-size: 28px; }
  .pulse .v.txt { font-size: 17px; }
  .pill { width: 26px; height: 13px; background-size: calc(var(--n) * 32px) 100%; background-position: calc(var(--i) * -32px) 0; }
  .req { padding: 20px 18px; }
  .req-top { flex-wrap: wrap; }
  .req-days { order: -1; }
  .req-dates { font-size: 21px; }
  .cal-head h2 { min-width: 0; font-size: 22px; }
  .cal { display: none; }
  .agenda { display: grid; gap: 10px; }
  .agenda-day { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
  .agenda-day.today { border-color: var(--aqua); box-shadow: 0 0 0 3px var(--aqua-50); }
  .agenda-day .items { flex: 1; display: grid; gap: 6px; min-width: 0; }
  .agenda-day .ev { position: static; margin: 0; animation: none; }
  .agenda .closed-note { font-size: 13px; color: var(--ink-2); font-weight: 600; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { min-height: 0; padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 30px; gap: 70px; }
  .auth-brand .big { font-size: 40px; margin-top: 30px; }
  .auth-blob { width: 90vw; right: -40%; top: -20%; }
  .auth-pills { display: none; }
  .auth-form { border-radius: 30px 30px 0 0; align-items: start; padding: 32px 20px 48px; }
  .tabs { width: auto; }
  .summary-card { padding: 22px 20px; }
}


/* ---------- Teléfono: ajustes finos ---------- */
@media (max-width: 820px) {
  /* Saludo: anillo pequeño junto al título */
  .hero:not(.compact) { grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: center; }
  .hero:not(.compact) > div:last-child { display: contents; }
  .hero:not(.compact) > div:last-child > * { grid-column: 1 / -1; }
  .hero:not(.compact) > div:last-child > h1 { grid-column: 2; grid-row: 1; margin: 0 !important; font-size: 26px; }
  .hero:not(.compact) .ring { --size: 104px; grid-row: 1; }
  .hero:not(.compact) .ring-num { font-size: 44px; }
  .hero:not(.compact) .ring-cap { font-size: 10.5px; max-width: 10ch; }
  .hero:not(.compact) > div:last-child > .btn-row:first-child { margin-top: 16px; }
  .hero .lead { margin-top: 16px; font-size: 15px; }
  .hero .pills { margin: 18px 0 12px; }
  .hero .countdown { margin-top: 18px; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero .mark::before { display: none; }
  .ring.sm { --size: 104px; }
  .ring.sm .ring-num { font-size: 44px; }

  /* Tablas como tarjetas: cada dato con su etiqueta */
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  .table thead { display: none; }
  .table, .table tbody { display: block; width: 100%; }
  .table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; padding-bottom: 4px; }
  .table tbody tr:first-child { padding-top: 4px; }
  .table tbody tr:hover { background: none; }
  .table td { display: block; padding: 0; border: 0; text-align: left !important; min-width: 0; font-size: 14px; }
  .table td:first-child { grid-column: 1 / -1; font-size: 15px; }
  .table td:has(form), .table td:has(.btn) { grid-column: 1 / -1; }
  .table td:empty { display: none; }
  .table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }

  /* Listas: acciones y estados bajan a su propio renglón */
  .list > li:has(> .tag:last-child) > .grow { flex: 1 1 150px; }
  .list > li:has(> .mini-approve) > .grow { flex: 1 1 0; }
  .mini-approve { flex: 1 0 100%; justify-content: flex-end; }
  .mini-approve .btn { flex: 0 1 auto; }

  /* Solicitudes por aprobar */
  .req-top { flex-wrap: nowrap; gap: 12px; }
  .req-top .avatar { display: none; }
  .req-days { order: 0; min-width: 62px; padding: 8px 10px; border-radius: 16px; }
  .req-days b { font-size: 24px; }
  .req-actions { gap: 8px; }
  .req-actions .btn { flex: 1 1 auto; padding: 12px 14px; }
  .reject-box .btn { flex: 1 1 100%; }

  /* Formularios */
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; border-radius: 18px; }
  .seg label { flex-direction: column; justify-content: center; gap: 4px; padding: 9px 6px; font-size: 12.5px; text-align: center; border-radius: 14px; line-height: 1.2; }
  .choice { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .choice label { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 2px; }
  .choice label .h-ico { grid-row: auto; margin-bottom: 8px; }
  .choice label b { font-size: 14.5px; }
  .choice label span { font-size: 12.5px; }
  .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); font-size: 14px; }
  .tabs { flex-wrap: wrap; background: none; padding: 0; gap: 6px; }
  .tabs a { background: var(--sunk); padding: 8px 14px; font-size: 13.5px; }
  .tabs a.on { background: var(--black); color: #fff; box-shadow: none; }
  .btn-row > .btn, .btn-row > form > .btn { flex: 0 1 auto; }

  /* Franja de dos semanas: lista compacta */
  .strip-wrap, .strip-legend { display: none; }
  .strip-list { display: block; }

  /* Varios */
  .topline { margin: 4px 0 20px; }
  .panel-head { margin-bottom: 14px; }
  .panel-head h2 { font-size: 18px; }
  .h-ico { width: 30px; height: 30px; border-radius: 10px; }
  .h-ico .i { width: 16px; height: 16px; }
  .payline li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .payline li:not(:last-child)::after { left: 11px; }
  /* Entrar: encabezado de marca compacto para que el formulario se vea sin desplazar */
  .auth { overflow-x: clip; min-height: 100svh; }
  .auth-brand { gap: 26px; min-height: 0; padding: calc(22px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) 58px max(22px, env(safe-area-inset-left, 0px)); }
  .auth-brand .logo { width: 108px; }
  .auth-brand .big { font-size: 31px; margin: 0 0 8px; max-width: 12ch; }
  .auth-brand .foot { font-size: 13px; }
  .auth-blob { width: 78vw; right: -30%; top: -40%; filter: blur(6px); }
  .auth-form { display: block; margin-top: -30px; position: relative; border-radius: 28px 28px 0 0; padding: 28px max(20px, env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .auth-form .box { max-width: none; width: 100%; }
  .auth-form h1 { font-size: 28px; }
  .auth-form .sub { margin-bottom: 20px; }

  /* iOS hace zoom al tocar un campo con letra menor a 16 px; así no se descuadra la página */
  input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea { font-size: 16px; max-width: 100%; }
}
@media (max-width: 380px) {
  .pulse .v { font-size: 24px; }
  .pulse a, .pulse div.p { padding: 13px 14px; }
  .tab { font-size: 10.5px; }
}


/* =====================================================================
   Vidrio esmerilado (glassmorphism) sobre la malla de color del manual.
   El fondo lleva manchas aqua, verde y morado que se mueven despacio;
   paneles, menú y barras son vidrio translúcido que las deja ver.
   ===================================================================== */
:root {
  --canvas: #e9efed;
  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .78);
  --glass-edge: rgba(31, 31, 30, .07);
  --glass-dark: rgba(24, 25, 24, .86);
  --glass-dark-line: rgba(255, 255, 255, .12);
  --glass-blur: blur(22px) saturate(1.6);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 18px 40px -24px rgba(31, 31, 30, .35), 0 0 0 1px var(--glass-edge);
}
body { background: radial-gradient(60vw 50vh at 100% 0, rgba(50, 171, 150, .16), transparent 70%), radial-gradient(50vw 50vh at 30% 100%, rgba(129, 248, 81, .14), transparent 70%), radial-gradient(40vw 40vh at 85% 75%, rgba(105, 74, 255, .1), transparent 70%), var(--canvas); background-attachment: fixed; }
.hero .pill i.used, .hero .legend .l-used::before, .summary-card .pill i.used { background: rgba(255, 255, 255, .16); }
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; display: block; border-radius: 38% / 42%; filter: blur(60px); opacity: .8; animation: float 26s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { width: 46vw; height: 42vw; right: -10vw; top: -14vw; background: radial-gradient(closest-side, #32ab96, rgba(50, 171, 150, 0)); }
.ambient i:nth-child(2) { width: 38vw; height: 36vw; left: 14vw; bottom: -16vw; background: radial-gradient(closest-side, #81f851, rgba(129, 248, 81, 0)); opacity: .6; animation-duration: 32s; animation-delay: -8s; }
.ambient i:nth-child(3) { width: 30vw; height: 30vw; right: 6vw; bottom: 8vh; background: radial-gradient(closest-side, #694aff, rgba(105, 74, 255, 0)); opacity: .45; animation-duration: 38s; animation-delay: -14s; }
.ambient i:nth-child(4) { width: 26vw; height: 24vw; left: 34vw; top: 18vh; background: radial-gradient(closest-side, #5fdcc4, rgba(95, 220, 196, 0)); opacity: .45; animation-duration: 30s; animation-delay: -20s; }
@keyframes float { 0% { transform: translate(0, 0) rotate(0) scale(1); } 50% { transform: translate(4vw, 3vh) rotate(20deg) scale(1.08); } 100% { transform: translate(-3vw, -2vh) rotate(-10deg) scale(.96); } }
.shell { position: relative; z-index: 1; background: none; }

/* Superficies de vidrio claro */
.panel, .req, .cal, .agenda-day, .preview, .choice label, .notif-group, .sum-float:not([hidden]) {
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.notif-group { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.choice input:checked + label { background: var(--glass-2); }
.icon-btn { background: var(--glass); border-color: var(--glass-line); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: 0 6px 16px -10px rgba(31, 31, 30, .3); }
.btn.ghost { --bg: rgba(255, 255, 255, .55); --bd: rgba(31, 31, 30, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.ghost:hover { --bg: rgba(255, 255, 255, .85); }
.tabs, .seg { background: rgba(255, 255, 255, .42); box-shadow: inset 0 0 0 1px var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tabs a.on, .seg input:checked + label { background: rgba(255, 255, 255, .92); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  background-color: rgba(255, 255, 255, .72); border-color: rgba(31, 31, 30, .14);
}
input:focus, select:focus, textarea:focus { background-color: #fff; }
.datebox { background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--glass-line); }
.datebox.aqua { background: rgba(50, 171, 150, .14); }
.datebox.purple { background: rgba(105, 74, 255, .12); }
.req-days, .note { background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1px var(--glass-line); }
.note.warn { background: rgba(255, 244, 218, .78); }
.note.err { background: rgba(253, 238, 236, .82); }
.note.info { background: rgba(235, 247, 244, .78); }
.meter { background: rgba(31, 31, 30, .08); }
.table tbody tr:hover, .notif:hover { background: rgba(255, 255, 255, .5); }
.table th, .table td, .list > li, .cal-dows, .week, .week-bg > div { border-color: rgba(31, 31, 30, .08); }
.cal-dows { background: rgba(255, 255, 255, .45); }
.week-bg .out { background: rgba(255, 255, 255, .28); }
.week-bg .closed { background: repeating-linear-gradient(135deg, rgba(31, 31, 30, .06) 0 6px, transparent 6px 12px); }
.week-bg .closed.afternoon { background: repeating-linear-gradient(135deg, rgba(31, 31, 30, .07) 0 6px, transparent 6px 12px) right / 50% 100% no-repeat; }
.week-bg .closed.morning { background: repeating-linear-gradient(135deg, rgba(31, 31, 30, .07) 0 6px, transparent 6px 12px) left / 50% 100% no-repeat; }
.strip .lane { background-color: rgba(255, 255, 255, .45); }
.avatar.c4 { --a: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(31, 31, 30, .08); }

/* Vidrio oscuro: menú, héroes, barras flotantes */
.side { background: var(--glass-dark); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); border-right: 1px solid var(--glass-dark-line); }
.nav a.on, .nav a:hover, .me-link:hover { background: rgba(255, 255, 255, .08); }
.nav a.on { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.hero, .summary-card {
  background: linear-gradient(140deg, rgba(22, 23, 22, .93), rgba(28, 30, 29, .8));
  backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -36px rgba(31, 31, 30, .8);
}
.pulse a, .pulse div.p, .countdown { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar { background: rgba(238, 242, 240, .45); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); }
.toast, .pick-bar { background: rgba(31, 31, 30, .82); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 50px -20px rgba(0, 0, 0, .55); }
dialog.confirm { background: rgba(255, 255, 255, .82); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--glass-line); }
.viewas { background: rgba(105, 74, 255, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

@media (max-width: 820px) {
  .ambient i { filter: blur(50px); }
  .ambient i:nth-child(1) { width: 90vw; height: 80vw; right: -30vw; top: -20vw; }
  .ambient i:nth-child(2) { width: 80vw; height: 70vw; left: -20vw; bottom: -10vh; }
  .ambient i:nth-child(3) { width: 70vw; height: 70vw; right: -20vw; bottom: 30vh; }
  .ambient i:nth-child(4) { display: none; }
  .side { background: rgba(24, 25, 24, .92); }
  .tabbar { background: rgba(31, 31, 30, .8); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 40px -16px rgba(0, 0, 0, .5); }
  .tab.fab .tab-ico { box-shadow: 0 10px 24px -8px rgba(50, 171, 150, .9), 0 0 0 5px rgba(238, 242, 240, .9); }
  .topbar { background: rgba(238, 242, 240, .6); }
}
/* Navegadores sin vidrio: superficies sólidas para que todo se lea igual */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel, .req, .cal, .agenda-day, .preview, .choice label, .sum-float:not([hidden]), .icon-btn, dialog.confirm { background: #fff; }
  .side, .hero, .summary-card, .toast, .pick-bar, .tabbar { background: var(--night); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}
