/* Endémico · app styles. Mobile first. Brand from @endemico.ft: navy/black, neon lime, heavy condensed italic. */

@font-face { font-family: 'BC'; src: url('/assets/fonts/BarlowCondensed-ExtraBoldItalic.ttf') format('truetype'); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'BC'; src: url('/assets/fonts/BarlowCondensed-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'BC'; src: url('/assets/fonts/BarlowCondensed-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --ink: #04070F;
  --navy: #070B16;
  --navy-2: #0C1322;
  --card: #101A2D;
  --card-2: #16223A;
  --line: rgba(244, 247, 251, 0.09);
  --white: #F4F7FB;
  --muted: rgba(244, 247, 251, 0.58);
  --lime: #4EF03E;
  --lime-d: #38C42B;
  --lime-bg: rgba(78, 240, 62, 0.12);
  --red: #FF5A5F;
  --amber: #FFC53D;
  --blue: #5AA9FF;
  --wa: #25D366;
  --radius: 14px;
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --app-w: 500px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--ink);
  color: var(--white);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ type */

.h-xl, .h-l, .h-m, .h-s { font-family: 'BC', 'Avenir Next Condensed', sans-serif; font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.005em; }
.h-xl { font-size: 64px; }
.h-l { font-size: 46px; }
.h-m { font-size: 30px; line-height: 0.95; }
.h-s { font-size: 21px; line-height: 1; }
.outline { color: transparent; -webkit-text-stroke: 1.6px var(--white); }
.lime { color: var(--lime); }
.kicker { font-family: 'BC', sans-serif; font-weight: 600; font-style: normal; text-transform: uppercase; letter-spacing: 0.32em; font-size: 12px; color: var(--lime); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* lime dash row + slashes, from their posts */
.dashes { display: flex; gap: 5px; }
.dashes i { width: 14px; height: 6px; background: var(--lime); transform: skewX(-24deg); }
.slashes::before { content: '//'; color: var(--lime); font-family: 'BC'; font-weight: 800; font-style: italic; margin-right: 6px; }

/* ------------------------------------------------------------ shell */

.app {
  position: relative;
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--navy);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 40px 120px rgba(0,0,0,0.7);
}
body.wide .app { max-width: 1280px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + var(--safe-t)) 18px 12px;
  background: rgba(7, 11, 22, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 22px; letter-spacing: 0.16em; }
.demo-pill { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; padding: 3px 7px; border-radius: 99px; background: var(--lime-bg); color: var(--lime); }
.avatar-btn {
  margin-left: auto; height: 34px; min-width: 34px; padding: 0 12px; border-radius: 99px;
  background: var(--card-2); font-weight: 600; font-size: 14px;
}
.avatar-btn.coach { background: var(--lime); color: var(--navy); }

.view { padding: 18px 18px calc(var(--tabbar-h) + 28px + var(--safe-b)); outline: none; }
body.no-tabbar .view { padding-bottom: calc(32px + var(--safe-b)); }

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-w); z-index: 30;
  display: flex; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(4, 7, 15, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
body.wide .tabbar { max-width: 1280px; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tabbar a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--lime); }

/* ------------------------------------------------------------ pieces */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.section { margin-top: 26px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 10px;
  font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--lime); color: var(--navy);
  transform: skewX(-6deg);
  transition: transform .12s, filter .12s;
}
.btn > * { transform: skewX(6deg); }
.btn:active { transform: skewX(-6deg) scale(0.97); }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(244,247,251,0.25); }
.btn.dark { background: var(--card-2); color: var(--white); }
.btn.wa { background: var(--wa); color: #062b14; }
.btn.sm { height: 38px; font-size: 16px; padding: 0 14px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.chip.ok { background: var(--lime-bg); color: var(--lime); }
.chip.warn { background: rgba(255,197,61,0.14); color: var(--amber); }
.chip.bad { background: rgba(255,90,95,0.14); color: var(--red); }
.chip.info { background: rgba(90,169,255,0.14); color: var(--blue); }
.chip.dim { background: var(--card-2); color: var(--muted); }

.field { display: block; }
.field + .field { margin-top: 12px; }
.field span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 10px;
  background: var(--navy-2); border: 1.5px solid var(--line); outline: none; font-size: 19px; font-weight: 500;
}
.input:focus { border-color: var(--lime); }
.input.code { font-size: 30px; letter-spacing: 0.4em; text-align: center; font-weight: 700; }
select.input { appearance: none; -webkit-appearance: none; }

.seg { display: flex; padding: 4px; background: var(--navy-2); border-radius: 12px; border: 1px solid var(--line); }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); }
.seg button.on { background: var(--lime); color: var(--navy); }

.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 14px; }
.err { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 18px; }

/* ------------------------------------------------------------ landing / login */

.hero {
  position: relative; margin: -18px -18px 0; min-height: 520px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 20px 26px;
  background: var(--navy) center 30% / cover no-repeat;
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,22,0.15) 0%, rgba(7,11,22,0.35) 40%, rgba(7,11,22,0.96) 88%); }
.hero > * { position: relative; z-index: 1; }
.hero .h-xl { margin-top: 10px; }
.hero p { margin-top: 12px; font-size: 16px; color: rgba(244,247,251,0.82); max-width: 330px; }
.hero-actions { display: grid; gap: 10px; margin-top: 22px; }
.servicios { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.servicios span { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 9px; border: 1px solid rgba(244,247,251,0.22); border-radius: 99px; }

.login-wrap { padding-top: 18px; }
.login-wrap .h-l { margin: 12px 0 8px; }
.login-wrap p { color: var(--muted); margin-bottom: 22px; }

/* fake WhatsApp notification (prototype login) */
.wa-note {
  position: fixed; top: calc(10px + var(--safe-t)); left: 50%; z-index: 80;
  width: min(460px, calc(100% - 20px)); transform: translate(-50%, -140%);
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  background: rgba(30, 33, 38, 0.97); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.2); cursor: pointer;
}
.wa-note.show { transform: translate(-50%, 0); }
.wa-note .wa-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--wa); display: grid; place-items: center; flex: none; }
.wa-note .wa-ic svg { width: 24px; height: 24px; fill: #fff; }
.wa-note b { display: block; font-size: 14px; }
.wa-note small { display: block; font-size: 11px; color: var(--muted); }
.wa-note p { font-size: 14px; margin-top: 2px; }
.wa-note .demo-tag { font-size: 10px; color: var(--muted); margin-left: auto; align-self: flex-start; }

/* ------------------------------------------------------------ member home */

.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; }
.hello .h-xl { font-size: 58px; }
.stat-hero { position: relative; overflow: hidden; margin-top: 18px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #12203A, #0B1426); border: 1px solid var(--line); }
.stat-hero .big { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 112px; line-height: 0.8; color: var(--lime); }
.stat-hero .lbl { font-family: 'BC'; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 24px; line-height: 0.95; }
.week-dots { display: flex; gap: 6px; margin-top: 14px; }
.week-dots i { flex: 1; height: 8px; border-radius: 2px; background: rgba(244,247,251,0.12); transform: skewX(-24deg); }
.week-dots i.on { background: var(--lime); }

.checkin-strip { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px dashed rgba(78,240,62,0.35); }
.checkin-strip.done { border-style: solid; background: var(--lime-bg); }
.checkin-strip svg { width: 30px; height: 30px; flex: none; stroke: var(--lime); fill: none; stroke-width: 1.8; }

.pay-card .amount { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 34px; }

/* month calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; letter-spacing: 0.08em; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 600; color: rgba(244,247,251,0.35); background: rgba(244,247,251,0.03); }
.cal .d.on { background: var(--lime); color: var(--navy); }
.cal .d.today { outline: 1.5px solid var(--white); outline-offset: -1.5px; color: var(--white); }
.cal .d.on.today { color: var(--navy); }
.cal .d.blank { background: none; }

.list .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card-2); font-weight: 700; font-size: 14px; }

/* ------------------------------------------------------------ check-in screen */

.checkin-ok { position: relative; margin: -18px -18px 0; min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; padding: 30px 22px; text-align: center; overflow: hidden; }
.checkin-ok::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 38%, rgba(78,240,62,0.28), transparent 60%); animation: pulse 2.4s ease-out infinite; }
.checkin-ok > * { position: relative; }
.check-badge { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; animation: pop .55s cubic-bezier(.2,1.4,.4,1); }
.check-badge svg { width: 70px; height: 70px; stroke: var(--navy); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .35s forwards ease-out; }
.checkin-ok .h-xl { font-size: 80px; }
.checkin-ok .meta { margin-top: 14px; font-size: 18px; }
.checkin-ok .today-w { margin-top: 26px; text-align: left; }
@keyframes pop { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* ------------------------------------------------------------ weekly workout */

.semana-head { margin-top: 4px; }
.semana-head .h-l { margin-top: 8px; }
.days { display: flex; gap: 6px; overflow-x: auto; margin: 16px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { flex: none; min-width: 64px; padding: 9px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.days button b { display: block; font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 18px; text-transform: uppercase; }
.days button small { display: block; font-size: 10px; color: var(--muted); max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.days button.on { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.days button.on small { color: rgba(7,11,22,0.7); }
.days button.today:not(.on) { border-color: rgba(78,240,62,0.6); }
.days button .lock { font-size: 10px; }

.bloque { margin-top: 18px; }
.bloque-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--lime); }
.bloque-h .h-s { flex: 1; }
.bloque-h .fmt { font-family: 'BC'; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; color: var(--lime); }
.ej { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ej .n { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 18px; color: rgba(244,247,251,0.3); width: 22px; flex: none; }
.ej .t { flex: 1; min-width: 0; }
.ej .t b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.ej .t small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.ej .t small.warn { color: var(--amber); }
.ej .dose { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 19px; color: var(--lime); text-align: right; white-space: nowrap; }

.locked { margin-top: 18px; padding: 22px 18px; border-radius: 16px; background: linear-gradient(160deg, #13233F, #0A1222); border: 1px solid rgba(78,240,62,0.25); text-align: center; }
.locked .h-m { margin: 8px 0 10px; }
.locked .price { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 48px; color: var(--lime); line-height: 1; margin: 12px 0 4px; }

/* ------------------------------------------------------------ coach */

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(78,240,62,0.7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(78,240,62,0); } 100% { box-shadow: 0 0 0 0 rgba(78,240,62,0); } }
.counter { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.counter .big { font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 96px; line-height: 0.8; color: var(--lime); }
.counter .lbl { font-family: 'BC'; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 26px; line-height: 0.92; padding-bottom: 4px; }
.item.fresh { animation: fresh 2.2s ease-out; }
@keyframes fresh { 0% { background: rgba(78,240,62,0.35); } 100% { background: transparent; } }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.quick a svg { width: 26px; height: 26px; stroke: var(--lime); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-h { display: flex; align-items: center; gap: 8px; font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 20px; text-transform: uppercase; }
.search { margin-top: 14px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.methods button { height: 74px; border-radius: 12px; background: var(--card-2); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 700; font-size: 14px; }
.methods button span { font-size: 22px; }
.methods button:active { border-color: var(--lime); background: var(--lime-bg); }

/* whiteboard upload */
.pizarra-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 190px; border-radius: 16px; border: 2px dashed rgba(78,240,62,0.45); background: rgba(78,240,62,0.05); text-align: center; padding: 18px; cursor: pointer; overflow: hidden; }
.pizarra-drop svg { width: 46px; height: 46px; stroke: var(--lime); fill: none; stroke-width: 1.6; }
.pizarra-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.scan { position: relative; border-radius: 16px; overflow: hidden; }
.scan img { width: 100%; max-height: 420px; object-fit: cover; filter: saturate(0.8) brightness(0.8); }
.scan::after { content: ''; position: absolute; left: 0; right: 0; height: 70px; top: -70px; background: linear-gradient(180deg, transparent, rgba(78,240,62,0.55), transparent); animation: scan 1.6s linear infinite; }
.scan .scan-lbl { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-family: 'BC'; font-weight: 800; font-style: italic; font-size: 26px; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,0.8); }
@keyframes scan { to { top: 100%; } }
.photo-thumb { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); }

/* door poster */
.poster { background: var(--navy); border-radius: 18px; padding: 28px 22px; text-align: center; border: 1px solid var(--line); }
.poster .qr { background: #fff; padding: 18px; border-radius: 16px; width: min(300px, 80%); margin: 20px auto; }
.poster .qr svg { width: 100%; height: auto; }
@media print {
  body { background: #fff; }
  .topbar, .tabbar, .no-print { display: none !important; }
  .app { box-shadow: none; background: #070B16; max-width: none; }
  .view { padding: 0; }
  .poster { border: 0; border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ------------------------------------------------------------ the spreadsheet (looks like Seba's Excel on purpose) */

.xl { margin: 4px -18px 0; background: #fff; color: #1d1d1d; font-family: Calibri, Carlito, 'Segoe UI', Arial, sans-serif; font-size: 13px; border-top: 1px solid #d0d0d0; }
body.wide .xl { margin: 8px 0 0; border: 1px solid #c8c8c8; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.xl-title { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #107C41; color: #fff; }
.xl-title .xl-ic { width: 22px; height: 22px; border-radius: 4px; background: #fff; color: #107C41; display: grid; place-items: center; font-weight: 800; font-size: 13px; font-family: Arial; }
.xl-title b { font-weight: 600; font-size: 14px; }
.xl-title .live { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.xl-title .live .live-dot { background: #b9ffae; }
.xl-tools { display: flex; gap: 8px; padding: 8px 12px; background: #f3f3f3; border-bottom: 1px solid #d6d6d6; flex-wrap: wrap; }
.xl-tools button, .xl-tools label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 4px; background: #fff; border: 1px solid #c9c9c9; color: #222; font-size: 13px; font-weight: 600; cursor: pointer; }
.xl-tools .primary { background: #107C41; border-color: #0b5e31; color: #fff; }
.xl-tools label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.xl-fx { display: flex; align-items: center; gap: 0; border-bottom: 1px solid #d6d6d6; font-size: 13px; }
.xl-fx .ref { width: 70px; padding: 4px 8px; border-right: 1px solid #d6d6d6; color: #444; }
.xl-fx .fx { padding: 4px 10px; color: #777; font-style: italic; border-right: 1px solid #d6d6d6; }
.xl-fx .val { padding: 4px 10px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-grid { overflow: auto; max-height: calc(100dvh - 300px); min-height: 320px; background: #fff; }
.xl table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.xl th, .xl td { border-right: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; padding: 3px 8px; white-space: nowrap; height: 24px; text-align: left; }
.xl thead th { position: sticky; top: 0; z-index: 2; background: #f0f0f0; color: #555; font-weight: 400; text-align: center; border-bottom-color: #c9c9c9; }
.xl tbody th { position: sticky; left: 0; z-index: 1; background: #f0f0f0; color: #555; font-weight: 400; text-align: center; min-width: 38px; border-right-color: #c9c9c9; }
.xl thead th.corner { left: 0; z-index: 3; }
.xl tr.hdr td { font-weight: 700; background: #E2EFDA; }
.xl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.xl td.sel { outline: 2px solid #107C41; outline-offset: -2px; }
.xl tr.new td { animation: xlnew 2.6s ease-out; }
@keyframes xlnew { 0% { background: #b9ffae; } 100% { background: transparent; } }
.xl .st-al_dia { color: #107C41; font-weight: 700; }
.xl .st-por_vencer { color: #b7791f; font-weight: 700; }
.xl .st-vencido { color: #c0392b; font-weight: 700; }
.xl .st-por_confirmar { color: #2563eb; font-weight: 700; }
.xl-tabs { display: flex; align-items: stretch; gap: 0; background: #f3f3f3; border-top: 1px solid #c9c9c9; font-size: 13px; }
.xl-tabs button { padding: 7px 16px; color: #444; border-right: 1px solid #d6d6d6; }
.xl-tabs button.on { background: #fff; color: #107C41; font-weight: 700; box-shadow: inset 0 -3px 0 #107C41; }
.xl-tabs .count { margin-left: auto; padding: 7px 12px; color: #777; }

/* ------------------------------------------------------------ sheet + toast */

.sheet-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.sheet { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: var(--app-w); transform: translate(-50%, 100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); max-height: 92dvh; overflow-y: auto; background: var(--navy-2); border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 10px 18px calc(22px + var(--safe-b)); pointer-events: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: rgba(244,247,251,0.2); margin: 0 auto 14px; }
.sheet-root.open .sheet-back { opacity: 1; }
.sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet .h-m { margin-bottom: 12px; }
.receipt-img { width: 100%; border-radius: 12px; margin-top: 10px; background: #fff; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); z-index: 90; transform: translate(-50%, 20px); opacity: 0; transition: all .25s; padding: 12px 18px; border-radius: 12px; background: var(--white); color: var(--navy); font-weight: 600; font-size: 14px; max-width: calc(100% - 40px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(244,247,251,0.2); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  body.wide .view { padding-left: 28px; padding-right: 28px; }
}
/* freeze row 1 (the headers), like "Inmovilizar fila superior" */
.xl tr.hdr td, .xl tr.hdr th { position: sticky; top: 25px; z-index: 2; }
.xl tr.hdr th { z-index: 3; }

/* ------------------------------------------------------------ landing (video hero) */
.landing { position: relative; margin: -18px -18px 0; height: min(68dvh, 620px); overflow: hidden; background: var(--navy); }
.landing-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.landing::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,22,0) 35%, rgba(7,11,22,0.75) 75%, var(--navy) 100%); }
.landing-copy { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; }
.landing-copy .h-xl { margin-top: 10px; font-size: 62px; }
.props { display: grid; gap: 8px; margin-top: 6px; }
.prop { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.prop svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prop b { display: block; font-family: 'BC'; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 20px; line-height: 1; }
.prop span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.hero-actions { margin-top: 16px; }
