/* Asistencia Salsa. Tema único: negro con dorado, diseñado para teléfono. */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Primitivos */
  --black-0: #0c0b09;
  --black-1: #131210;
  --black-2: #1a1916;
  --black-3: #24221e;
  --black-4: #2f2c27;
  --gold-1: #f3d77a;
  --gold-2: #e6bf4f;
  --gold-3: #c9a03a;
  --gold-4: #8a6c22;
  --ivory: #f4efe4;
  --stone: #a59d8f;
  --stone-dim: #7d766a;

  /* Semánticos */
  --bg: var(--black-0);
  --surface: var(--black-1);
  --surface-2: var(--black-2);
  --surface-3: var(--black-3);
  --line: rgba(230, 191, 79, .12);
  --line-strong: rgba(230, 191, 79, .28);
  --text: var(--ivory);
  --muted: var(--stone);
  --faint: var(--stone-dim);
  --accent: var(--gold-2);
  --accent-soft: rgba(230, 191, 79, .12);
  --on-accent: #17130a;
  --gold-gradient: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  --ok: #8fd4a6;
  --ok-soft: rgba(143, 212, 166, .12);
  --warn: #f0c36b;
  --warn-soft: rgba(240, 195, 107, .12);
  --bad: #f08f84;
  --bad-soft: rgba(240, 143, 132, .12);
  --info: #c9c1b2;
  --info-soft: rgba(244, 239, 228, .06);
  --wa: #6fd69a;

  /* Forma y profundidad: tarjetas 20px, controles 14px, píldoras completas */
  --r-card: 20px;
  --r-ctrl: 14px;
  --r-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-gold: 0 8px 24px rgba(230, 191, 79, .22), 0 1px 0 rgba(255, 255, 255, .45) inset;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(230, 191, 79, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 16px/1.5 "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
  letter-spacing: .005em;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
body.app { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); }

a { color: var(--accent); text-decoration: none; }
code { background: var(--surface-3); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
h1 { font-size: 1.65rem; line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 1rem; margin: 1.75rem 0 .7rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); }
p { margin: 0 0 .5rem; }
strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--on-accent); }

.icon { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.center-text { text-align: center; margin-top: 1.5rem; }
.text-bad { color: var(--bad); }
.count { color: var(--faint); font-weight: 400; font-size: 1.1rem; }
.grow { flex: 1 1 200px; }
.grow-1 { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: var(--safe-t);
  background: rgba(12, 11, 9, .82);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--text); min-width: 0; letter-spacing: .01em; }
.brand img { flex: none; object-fit: contain; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-back { display: grid; place-items: center; width: 42px; height: 42px; margin-left: -10px; color: var(--accent); border-radius: 50%; }
.topbar-back .icon { width: 24px; height: 24px; }
.topbar-back:active { background: var(--accent-soft); }
.topbar-title { display: none; }
.topnav { display: none; }
.topbar .avatar { margin-left: auto; }
@media (max-width: 899px) {
  .brand-hide-mobile { display: none; }
  .topbar-title { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ---------- Barra inferior ---------- */
.tabbar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(8px + var(--safe-b));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--tabbar-h);
  padding: 6px;
  border-radius: 24px;
  background: rgba(22, 20, 17, .86);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
}
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 18px;
  color: var(--faint);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); background: var(--accent-soft); }
.tabbar a:active { transform: scale(.94); }

@media (min-width: 900px) {
  body.app { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: .2rem; margin-left: 1.75rem; }
  .topnav a { padding: .45rem .85rem; border-radius: var(--r-pill); color: var(--muted); font-weight: 500; font-size: .95rem; }
  .topnav a:hover { color: var(--text); background: var(--surface-2); }
  .topnav a.active { color: var(--accent); background: var(--accent-soft); }
  .topbar-back { display: none; }
}

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 1.1rem 16px 2rem; }
@media (min-width: 900px) { .container { padding-top: 1.75rem; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head p { margin: .25rem 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head h2 { margin-bottom: .7rem; }
.section-head a { font-weight: 500; }
.hello { margin: .35rem 0 1.25rem; }
.hello p { margin: 0 0 .15rem; font-size: .9rem; color: var(--muted); }
.hello h1 { font-size: 2rem; font-weight: 500; letter-spacing: -.025em; }
.hello h1 strong { font-weight: 600; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-head { display: flex; align-items: center; gap: 1rem; margin: .35rem 0 1.25rem; }
.profile-head p { margin: .2rem 0 0; }
.day-title { display: flex; align-items: center; gap: .5rem; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: .8rem; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1.25rem; }
.note { background: var(--warn-soft); border-color: transparent; margin-top: .8rem; color: var(--text); }
.narrow { max-width: 460px; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack > h2 { margin: 0; color: var(--text); }
.two-col { display: grid; gap: 0 1.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- Avatares y chips ---------- */
.avatar {
  width: 42px; height: 42px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--gold-1);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
}
.avatar-sm { width: 36px; height: 36px; font-size: .74rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.15rem; border-width: 1.5px; }
.time-chip {
  flex: none;
  min-width: 56px;
  padding: .35rem .5rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--gold-1);
  font-weight: 600;
  font-size: .85rem;
  text-align: center;
}

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list.card { padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-item, .list-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 68px;
  padding: .7rem 1rem;
  color: var(--text);
  transition: background .15s var(--ease);
}
.list > li.list-item { padding-right: .75rem; }
.list-link { flex: 1; min-width: 0; padding: 0; min-height: 0; }
a.list-item:active, .list-link:active { background: var(--surface-2); }
.list-item > .icon:last-child { color: var(--faint); width: 18px; height: 18px; margin-right: -.2rem; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .05rem; color: var(--text); }
.list-main strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main strong a { color: inherit; }
.list-main small { color: var(--muted); font-size: .84rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.list-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.list-side strong { font-weight: 600; }
.list-side.btn-row { flex-direction: row; }
.list-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.list-compact .list-item { min-height: 56px; }
.is-muted { opacity: .5; }

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: .25rem; }
@media (min-width: 900px) { .stats:not(.stats-2) { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(230, 191, 79, .07), transparent 55%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: .95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  color: var(--text);
  min-width: 0;
}
a.stat:active { background: var(--surface-2); }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gold-1); }
.stat-value-sm { font-size: 1.05rem; color: var(--text); }
.stat-sub { font-size: .76rem; color: var(--faint); line-height: 1.35; }
.stat-alert .stat-value { color: var(--bad); }

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  padding: .55rem 1.15rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: transform .15s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--accent); }
.btn-primary {
  background: var(--gold-gradient);
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { border-color: transparent; filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: .35rem .9rem; font-size: .875rem; }
.btn-lg { min-height: 56px; font-size: 1.05rem; letter-spacing: .02em; }
.btn-block { width: 100%; }
.btn-danger-ghost { color: var(--bad); background: transparent; border-color: rgba(240, 143, 132, .3); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: .25rem 0; color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; }
.link-btn.danger { color: var(--bad); }
.inline { display: inline; margin: 0; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
}
a.icon-btn:active { background: var(--surface-3); }
.icon-btn-wa { color: var(--wa); }

:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 2px; }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 56px;
  padding: 0 1.4rem 0 1.15rem;
  border-radius: var(--r-pill);
  background: var(--gold-gradient);
  color: var(--on-accent);
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: var(--shadow-gold), 0 16px 32px rgba(0, 0, 0, .5);
  transition: transform .15s var(--ease);
}
.fab:active { transform: scale(.96); }
@media (min-width: 900px) { .fab { bottom: 28px; right: 28px; } }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1.5rem; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: 1rem .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--text);
  font-size: .82rem;
  font-weight: 500;
  text-align: center;
  transition: transform .15s var(--ease), border-color .2s var(--ease);
}
.quick .icon { color: var(--accent); width: 28px; height: 28px; }
.quick:active { transform: scale(.97); border-color: var(--line-strong); }

.action-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .55rem; margin-bottom: 1.1rem; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .8rem .25rem;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--gold-1);
  font-size: .78rem;
  font-weight: 500;
  transition: transform .15s var(--ease);
}
.action .icon { width: 24px; height: 24px; }
.action-primary { background: var(--gold-gradient); border-color: transparent; color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow-gold); }
.action:active { transform: scale(.96); }

/* ---------- Formularios ---------- */
label { display: flex; flex-direction: column; gap: .4rem; font-weight: 500; font-size: .88rem; color: var(--muted); }
label small { font-weight: 400; color: var(--faint); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=time], input[type=month], input[type=search], input[type=number], select, textarea {
  width: 100%;
  min-height: 50px;
  padding: .65rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctrl);
  background: var(--black-0);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  font-size: 16px; /* evita el zoom automático en iPhone */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(3) hue-rotate(5deg); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23e6bf4f'%3E%3Cpath d='M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}
select option { background: var(--black-2); color: var(--text); }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.form-grid { display: grid; gap: 1rem; }
.form-grid > .card { margin: 0; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}
.form-actions { display: flex; gap: .5rem; }
.check-row { flex-direction: row; align-items: center; gap: .7rem; font-weight: 400; color: var(--text); min-height: 44px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
fieldset { margin: 0; min-width: 0; border: 1px solid var(--line); }
fieldset.card { padding: 1.1rem; }
legend { font-weight: 600; font-size: .95rem; color: var(--text); padding: 0; float: left; width: 100%; margin-bottom: .8rem; }
legend + * { clear: both; }

.input-money { position: relative; display: block; }
.input-money::before { content: "$"; position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 500; pointer-events: none; }
.input-money input { padding-left: 1.9rem; }
.input-big input { font-size: 2rem; font-weight: 500; min-height: 68px; padding-left: 2.4rem; letter-spacing: -.02em; color: var(--gold-1); }
.input-big::before { font-size: 1.5rem; left: 1.05rem; }

.stepper { display: flex; gap: .5rem; }
.stepper input { text-align: center; font-weight: 600; font-size: 1.15rem; }
.stepper .btn { width: 50px; min-height: 50px; padding: 0; font-size: 1.35rem; flex: none; color: var(--accent); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--black-0); border: 1px solid var(--line); border-radius: var(--r-pill); }
.segmented label { position: relative; font-weight: 500; cursor: pointer; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: .35rem .5rem; border-radius: var(--r-pill);
  text-align: center; line-height: 1.2;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.segmented span small { font-weight: 400; font-size: .76rem; margin-top: .1rem; opacity: .85; }
.segmented input:checked + span { background: var(--gold-gradient); color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow-gold); }
.segmented input:checked + span small { color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold-1); }
.segmented-sm { border-radius: var(--r-ctrl); }
.segmented-sm span { min-height: 44px; font-size: .85rem; border-radius: 11px; }
@media (max-width: 400px) { .segmented-sm { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }

.segmented-cards { display: grid; gap: .55rem; }
@media (min-width: 640px) { .segmented-cards { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; cursor: pointer; font-weight: 400; color: var(--text); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; gap: .1rem; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); transition: border-color .2s var(--ease), background .2s var(--ease); }
.choice strong { font-weight: 500; }
.choice small { color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice input:checked + span strong { color: var(--gold-1); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-1); }

.check-grid { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.check-card {
  flex-direction: row; align-items: flex-start; gap: .7rem;
  padding: .85rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctrl);
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}
.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-card input { margin-top: .15rem; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.check-card span { display: flex; flex-direction: column; }
.check-card strong { font-weight: 500; }
.check-card small { color: var(--muted); }

details.more > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--accent);
  padding: .3rem 0;
  font-size: .95rem;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; display: inline-block; margin-left: .45rem; font-weight: 400; transition: transform .2s var(--ease); }
details.more[open] > summary { margin-bottom: .85rem; }
details.more[open] > summary::after { transform: rotate(45deg); }
.hint { margin: 0; padding: .7rem .9rem; border-radius: var(--r-ctrl); background: var(--accent-soft); border: 1px solid var(--line); color: var(--gold-1); font-size: .9rem; }

.search-bar { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.1rem; }
.search-bar input[type=search] {
  border-radius: var(--r-pill);
  padding-left: 2.75rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%237d766a'%3E%3Cpath d='M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z'/%3E%3C/svg%3E") no-repeat 1rem center / 18px;
}
.filter-details > summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 500; font-size: .9rem; width: max-content; padding: .2rem .25rem; }
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-body { display: grid; gap: .55rem; margin-top: .55rem; }
@media (min-width: 640px) { .filter-body { grid-template-columns: 1fr 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }

/* ---------- Avisos y etiquetas ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--r-ctrl); margin-bottom: 1rem; font-size: .93rem; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(143, 212, 166, .2); }
.alert-error { background: var(--bad-soft); color: var(--bad); border-color: rgba(240, 143, 132, .2); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(240, 195, 107, .2); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: var(--line); }
.form-grid .alert, .stack .alert { margin-bottom: 0; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: var(--r-pill); font-size: .74rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: var(--gold-1); border: 1px solid var(--line); }

.tabs { display: flex; gap: 4px; background: var(--black-0); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; margin: 1.1rem 0 .85rem; }
.tabs a { flex: 1; text-align: center; padding: .55rem .6rem; border-radius: var(--r-pill); color: var(--muted); font-weight: 500; font-size: .9rem; transition: background .2s var(--ease), color .2s var(--ease); }
.tabs a.active { background: var(--surface-3); color: var(--gold-1); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.tab-count { display: inline-block; min-width: 1.5em; margin-left: .2rem; padding: 0 .4em; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 600; }

/* ---------- Mes y fecha ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: -.2rem 0 1rem; }
.month-nav h1 { font-size: 1.3rem; font-weight: 500; text-align: center; flex: 1; }
.month-nav .icon-btn { color: var(--accent); border: 1px solid var(--line); }
.month-nav span.icon-btn { border-color: transparent; }
.month-nav-sm form { flex: 1; text-align: center; }
.date-label { position: relative; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: .98rem; color: var(--text); cursor: pointer; }
.date-label span { padding: .5rem 1rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-strong); }
.date-label input { position: absolute; inset: 0; opacity: 0; min-height: 0; cursor: pointer; }
.date-pick { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.date-pick input { width: auto; }
.date-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.date-nav input[type=date], .date-nav select { width: auto; max-width: 100%; }

/* ---------- Estado de cuenta ---------- */
.account { margin-top: .8rem; padding: .5rem 1.1rem; }
.account-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; font-size: .95rem; color: var(--muted); }
.account-row strong, .account-row span:last-child { color: var(--text); text-align: right; }
.account-row + .account-row { border-top: 1px solid var(--line); }
.account-total { font-size: 1.05rem; }
.account-total strong { color: var(--gold-1); }
.account .hint { margin: .3rem 0 .6rem; }

/* ---------- Pasar lista ---------- */
.attendance-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; padding: 0 .25rem; color: var(--muted); }
.attendance-bar strong { color: var(--gold-1); font-size: 1.15rem; }
.attendance-list { display: grid; gap: .55rem; }
@media (min-width: 760px) { .attendance-list { grid-template-columns: 1fr 1fr; } }
.attendee {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 68px;
  padding: .4rem .65rem .4rem .45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.attendee:has(.attendee-main input:checked) { border-color: var(--line-strong); background: linear-gradient(90deg, rgba(230, 191, 79, .10), rgba(230, 191, 79, .02)), var(--surface); }
.attendee-main {
  flex: 1; min-width: 0;
  flex-direction: row; align-items: center; gap: .8rem;
  padding: .4rem;
  font-weight: 500; font-size: 1rem; color: var(--text);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.attendee-main input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.attendee-name { display: flex; flex-direction: column; min-width: 0; }
.attendee-name small { font-weight: 400; font-size: .8rem; }
.attendee-toggle {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--black-0);
  display: grid; place-items: center;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.attendee-main input:checked + .attendee-toggle { background: var(--gold-gradient); border-color: transparent; box-shadow: var(--shadow-gold); transform: scale(1.04); }
.attendee-main input:checked + .attendee-toggle::after {
  content: "";
  width: 8px; height: 14px;
  border: solid var(--on-accent);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.attendee-main:has(input:focus-visible) { outline: 2px solid var(--gold-1); border-radius: 12px; }
.pay-chip {
  position: relative;
  flex: none;
  flex-direction: row;
  align-items: center;
  min-height: 40px;
  padding: 0 .9rem;
  border-radius: var(--r-pill);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pay-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pay-chip:has(input:checked) { border-style: solid; border-color: transparent; background: var(--gold-gradient); color: var(--on-accent); font-weight: 600; }
.pay-chip:has(input:focus-visible) { outline: 2px solid var(--gold-1); outline-offset: 2px; }
.pay-chip.is-paid { border-style: solid; border-color: transparent; background: var(--ok-soft); color: var(--ok); cursor: default; }
.extra { margin-top: .8rem; }

.sticky-actions {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  z-index: 10;
  margin: 1.1rem 0 0;
  padding: .5rem 0;
}
.sticky-actions::before {
  content: "";
  position: absolute;
  inset: -24px -16px -90px;
  z-index: -1;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* ---------- Tablas (reportes) ---------- */
.table-wrap { overflow-x: auto; padding: 0; -webkit-overflow-scrolling: touch; }
.table-wrap > p { padding: 1rem; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; letter-spacing: .04em; color: var(--muted); font-weight: 500; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tfoot th { border-top: 1px solid var(--line); border-bottom: 0; }
td a { color: var(--text); font-weight: 500; }
.num { text-align: right; white-space: nowrap; }
.center { text-align: center; }
.matrix th, .matrix td { padding: .55rem .5rem; }
.matrix td:first-child, .matrix th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; }
.matrix thead th:first-child, .matrix tfoot th:first-child { background: var(--surface-2); }
.matrix thead th a { color: var(--accent); }
.dot { font-weight: 600; }
.dot-ok { color: var(--gold-1); }
.dot-bad { color: var(--bad); }
.dot-none { color: var(--black-4); }

/* ---------- Más ---------- */
.install-card { display: flex; align-items: center; gap: .85rem; margin-top: .8rem; }
.logout-form { margin-top: 1.75rem; }

/* ---------- Entrada y pantallas sueltas ---------- */
body.bare .container { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding-top: calc(1.5rem + var(--safe-t)); padding-bottom: calc(1.5rem + var(--safe-b)); }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-bottom: 1.75rem; text-align: center; }
.auth-logo img { height: auto; }
.auth-brand { width: 216px; max-width: 70vw; filter: drop-shadow(0 12px 32px rgba(230, 191, 79, .14)); }
.auth-logo h1 { font-size: 1.6rem; font-weight: 500; letter-spacing: -.015em; }
.auth-logo p { margin: 0; }
.offline { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .85rem; }
.offline img { height: auto; }

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .container > * { animation: rise .45s var(--ease) both; }
  .container > *:nth-child(2) { animation-delay: .03s; }
  .container > *:nth-child(3) { animation-delay: .06s; }
  .container > *:nth-child(4) { animation-delay: .09s; }
  .container > *:nth-child(n+5) { animation-delay: .12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
