/* Yaya · sistema visual compartido (agenda, consola, páginas sueltas).
   Lenguaje iOS en claro: fondo blanco, paneles gris Apple, filas blancas agrupadas, separadores finos,
   un solo acento (azul marino de la marca), letra del sistema (SF en Apple, Inter en el resto). */
@font-face {
  font-family: "Inter";
  src: url("/static/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f5f7;
  --row: #ffffff;
  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.16);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --tint: #0a2f6b;
  --tint-press: #07224f;
  --tint-soft: rgba(10, 47, 107, 0.08);
  --tint-ring: rgba(10, 47, 107, 0.24);
  --green: #248a3d;
  --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #c93400;
  --orange-soft: rgba(255, 149, 0, 0.14);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, 0.12);
  --blue: #0066cc;
  --blue-soft: rgba(0, 122, 255, 0.1);
  --switch-on: #34c759;
  --r-row: 12px;
  --r-panel: 22px;
  --r-btn: 14px;
  --shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss03";
}
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--tint-ring); }

/* tipografía (escala iOS) */
.t-large { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.t-title { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.026em; margin: 0; }
.t-title2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.022em; margin: 0; }
.t-headline { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.t-sub { font-size: 15px; line-height: 20px; color: var(--label-2); }
.t-foot { font-size: 13px; line-height: 18px; color: var(--label-2); letter-spacing: -0.006em; }
.t-caption { font-size: 12px; line-height: 16px; color: var(--label-2); }
.num { font-variant-numeric: tabular-nums; }

/* barra superior translúcida */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 52px; padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; color: var(--label); }
.brand:hover { text-decoration: none; }
.app-icon { display: block; width: 28px; height: 28px; border-radius: 22.5%; overflow: hidden; box-shadow: 0 0 0 0.5px rgba(0,0,0,.08); }
.app-icon.lg { width: 64px; height: 64px; box-shadow: 0 0 0 0.5px rgba(0,0,0,.06), 0 6px 18px rgba(10, 47, 107, 0.18); }

/* control segmentado */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg button {
  min-width: 44px; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--label); cursor: pointer; transition: background .2s var(--ease);
}
.seg button[aria-pressed="true"] { background: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }

/* paneles y listas agrupadas */
.panel { background: var(--panel); border-radius: var(--r-panel); padding: 20px; }
.group { background: var(--row); border-radius: var(--r-row); overflow: hidden; }
.group + .group { margin-top: 22px; }
.group-h { padding: 0 16px 7px; font-size: 13px; color: var(--label-2); letter-spacing: -0.006em; }
.group-f { padding: 7px 16px 0; font-size: 13px; line-height: 18px; color: var(--label-2); }
.cell { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 16px; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.cell > label, .cell > .k { flex: 0 0 auto; min-width: 104px; color: var(--label); }
.cell .v { margin-left: auto; color: var(--label-2); text-align: right; }
.cell input, .cell select, .cell textarea {
  flex: 1; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; background: transparent; font-size: 17px;
}
.cell textarea { height: auto; min-height: 96px; padding: 12px 0; resize: vertical; line-height: 1.4; }
.cell input::placeholder, .cell textarea::placeholder { color: var(--label-3); }
.cell.tall { align-items: flex-start; }
.cell:focus-within { background: var(--fill-2); }

/* interruptor iOS */
.switch { position: relative; flex: 0 0 51px; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(120,120,128,.16); transition: background .25s var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transition: transform .25s var(--ease);
}
.switch input:checked + span { background: var(--switch-on); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--tint-ring); }

/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border: 0; border-radius: var(--r-btn);
  background: var(--tint); color: #fff; font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
  cursor: pointer; transition: background .2s var(--ease), transform .12s var(--ease), opacity .2s;
  text-decoration: none !important;
}
.btn:hover { background: var(--tint-press); }
.btn:active { transform: scale(0.985); }
.btn:disabled { background: var(--fill); color: var(--label-3); cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.tinted { background: var(--tint-soft); color: var(--tint); }
.btn.tinted:hover { background: rgba(10, 47, 107, 0.13); }
.btn.gray { background: var(--fill); color: var(--label); }
.btn.gray:hover { background: rgba(118,118,128,.18); }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 15px; }
.btn.plain { background: none; color: var(--tint); padding: 0 6px; height: auto; }

/* insignias de estado */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.003em; white-space: nowrap; background: var(--fill); color: var(--label-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.red { background: var(--red-soft); color: var(--red); }

.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-row); background: var(--orange-soft);
  color: #8a3b00; font-size: 15px; line-height: 20px; }
.note.red { background: var(--red-soft); color: #a3000f; }
.note.blue { background: var(--blue-soft); color: #004f9e; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
