/* Zona de clientes: /cuenta, /mis-puntos, /admin, /programa-de-puntos */
@font-face { font-family: Montserrat; src: url('/assets/fonts/montserrat-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: Lora; src: url('/assets/fonts/lora-latin.woff2') format('woff2'); font-display: swap; }

:root {
  --dark: #0e0610; --dark2: #1a0c1e; --dark3: #2a1232;
  --pink: #e0368c; --pink-dark: #b8266e; --pink-deeper: #8c1752; --pink-light: #f05ca8;
  --pink-pale: #fde8f3; --pink-ultra: #fdf2f8;
  --text: #1a0c1e; --text-mid: #4a3558; --muted: #6f5a7b;
  --line: #e8dff0; --soft: #faf8fc; --gray-100: #f3edf8; --white: #fff;
  --ok: #1f7a4d; --ok-pale: #e6f4ec; --err: #b42318; --err-pale: #fdecea; --warn: #8a5a00; --warn-pale: #fff4dc;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Montserrat, Arial, Helvetica, sans-serif; color: var(--text); background: var(--soft); line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--pink-dark); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--text); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── NAV (igual que las páginas de servicios) ── */
nav.site-nav { background: rgba(14,6,16,.96); color: var(--white); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(224,54,140,.18); box-shadow: 0 10px 30px rgba(14,6,16,.2); }
nav.site-nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent 0%, rgba(240,92,168,.58) 16%, rgba(224,54,140,.78) 50%, rgba(240,92,168,.58) 84%, transparent 100%); box-shadow: 0 0 14px rgba(224,54,140,.34); pointer-events: none; }
.nav-inner, .container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.nav-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; font-size: .82rem; color: var(--white); }
.brand img { width: 42px; height: 42px; border-radius: 50%; background: var(--white); }
.nav-burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; background: none; border: none; color: var(--white); cursor: pointer; }
.nav-burger-icon { display: flex; flex-direction: column; gap: 4px; }
.nav-burger-icon span { display: block; width: 20px; height: 1.5px; background: var(--white); }
.nav-links { display: flex; gap: 1.2rem; align-items: center; list-style: none; font-size: .82rem; font-weight: 800; }
.nav-links a { color: rgba(255,255,255,.78); text-decoration: none; }
.nav-links a:hover { color: var(--pink-light); }
.nav-cta { background: var(--pink-dark) !important; color: var(--white) !important; padding: 9px 16px; border-radius: 4px; font-weight: 800 !important; white-space: nowrap; }
.nav-cta:hover { background: var(--pink-deeper) !important; }

/* Botón de cuenta (mismo bloque CSS que en las páginas públicas) */
.nav-account { display: inline-flex; align-items: center; gap: .45rem; padding: 8px 13px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; color: var(--white) !important; font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; transition: border-color .2s, color .2s, background .2s; }
.nav-account svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-account:hover { border-color: var(--pink-light); color: var(--pink-light) !important; }
.nav-account.is-logged { border-color: rgba(240,92,168,.6); background: rgba(224,54,140,.16); }
.nav-account-mobile { display: none; }

/* ── LAYOUT ── */
.page-head { background: var(--dark); color: var(--white); padding: 3rem 0 2.5rem; position: relative; overflow: hidden; }
.page-head .eyebrow { color: var(--pink-light); }
.page-head h1 { font-family: Lora, Georgia, serif; font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
.page-head p { color: rgba(255,255,255,.78); max-width: 640px; margin-top: .75rem; font-size: .95rem; }
.eyebrow { display: block; color: var(--pink-dark); text-transform: uppercase; letter-spacing: 2.5px; font-size: .7rem; font-weight: 800; margin-bottom: .6rem; }
h2, h3 { font-family: Lora, Georgia, serif; font-weight: 600; line-height: 1.2; }
.section { padding: 2.5rem 0 4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.stack { display: grid; gap: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.25rem, 3vw, 2rem); }
.card > h2 { font-size: 1.45rem; margin-bottom: .35rem; }
.card > .card-sub { color: var(--muted); font-size: .88rem; margin-bottom: 1.25rem; }
.narrow { width: min(560px, calc(100% - 2rem)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* ── BOTONES ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: 11px 22px; border-radius: 4px; font-family: inherit; font-size: .82rem; font-weight: 800; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-pink { background: var(--pink-dark); color: var(--white); }
.btn-pink:hover:not(:disabled) { background: var(--pink-deeper); box-shadow: 0 8px 22px rgba(224,54,140,.22); }
.btn-outline { border-color: rgba(26,12,30,.22); color: var(--text); background: var(--white); }
.btn-outline:hover:not(:disabled) { border-color: var(--pink-dark); color: var(--pink-dark); }
.btn-danger { border-color: var(--err); color: var(--err); background: var(--white); }
.btn-danger:hover:not(:disabled) { background: var(--err); color: var(--white); }
.btn-danger-solid { background: var(--err); color: var(--white); }
.btn-ok { background: var(--ok); color: var(--white); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: .76rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--pink-dark); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; text-decoration: underline; padding: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ── FORMULARIOS ── */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label, .label { font-size: .78rem; font-weight: 800; color: var(--text); }
.field .hint { font-size: .75rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 4px; padding: 10px 14px; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(224,54,140,.14); }
input[aria-invalid=true] { border-color: var(--err); }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 5.5rem; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font: inherit; font-size: .75rem; font-weight: 800; color: var(--pink-dark); cursor: pointer; padding: 8px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; font-size: .85rem; color: var(--text-mid); line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--pink-dark); cursor: pointer; }
.check .req { color: var(--pink-dark); font-weight: 800; font-size: .72rem; white-space: nowrap; }
.check .opt { color: var(--muted); font-weight: 700; font-size: .72rem; white-space: nowrap; }
.legal-box { background: var(--gray-100); border-radius: 6px; padding: .9rem 1rem; font-size: .74rem; line-height: 1.55; color: var(--text-mid); }
.legal-box strong { color: var(--text); }
.segmented { display: inline-flex; border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; }
.segmented label { padding: 9px 16px; font-size: .82rem; font-weight: 800; cursor: pointer; color: var(--text-mid); background: var(--white); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: var(--white); }
.segmented label:has(input:checked) { background: var(--pink-dark); color: var(--white); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: -2px; }

/* ── AVISOS ── */
.alert { border-radius: 6px; padding: .85rem 1rem; font-size: .88rem; line-height: 1.5; border: 1px solid; }
.alert-ok { background: var(--ok-pale); border-color: rgba(31,122,77,.3); color: #145236; }
.alert-err { background: var(--err-pale); border-color: rgba(180,35,24,.3); color: #8a1a12; }
.alert-info { background: var(--pink-ultra); border-color: rgba(224,54,140,.25); color: var(--text-mid); }
.alert-warn { background: var(--warn-pale); border-color: rgba(138,90,0,.3); color: #5c3c00; }

/* ── PESTAÑAS ── */
.tabs { display: flex; gap: .25rem; box-shadow: inset 0 -1.5px 0 var(--line); margin-bottom: 1.5rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: none; font: inherit; font-size: .9rem; font-weight: 800; color: var(--muted); padding: .8rem 1rem; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-selected=true] { color: var(--pink-dark); border-bottom-color: var(--pink); }
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: .35rem; border-radius: 999px; background: var(--pink-dark); color: var(--white); font-size: .7rem; line-height: 20px; text-align: center; }

/* ── PUNTOS ── */
.points-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.points-big { font-family: Lora, Georgia, serif; font-size: clamp(3rem, 8vw, 4.6rem); font-weight: 600; line-height: 1; color: var(--pink-light); }
.points-big small { display: block; font-family: Montserrat, Arial, sans-serif; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 800; margin-top: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--pink-pale); color: var(--pink-dark); white-space: nowrap; }
.chip-ok { background: var(--ok-pale); color: var(--ok); }
.chip-err { background: var(--err-pale); color: var(--err); }
.chip-warn { background: var(--warn-pale); color: var(--warn); }
.chip-muted { background: var(--gray-100); color: var(--muted); }

/* Ofertas */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.offer { border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; background: var(--white); display: flex; flex-direction: column; gap: .6rem; transition: border-color .2s, box-shadow .2s; }
.offer:hover { border-color: rgba(224,54,140,.35); box-shadow: 0 8px 28px rgba(224,54,140,.08); }
.offer h3 { font-size: 1.15rem; }
.offer p { color: var(--muted); font-size: .85rem; flex: 1; white-space: pre-line; }
.offer-cost { font-family: Lora, Georgia, serif; font-size: 1.5rem; color: var(--pink-dark); font-weight: 600; }
.offer-cost span { font-family: Montserrat, Arial, sans-serif; font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-left: .25rem; }
.offer-missing { font-size: .78rem; color: var(--muted); font-weight: 700; }

/* Listas tipo tabla */
.list { list-style: none; display: grid; }
.list > li { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; padding: .85rem 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: none; }
.list .li-title { font-weight: 700; font-size: .9rem; }
.list .li-meta { font-size: .78rem; color: var(--muted); }
.list .li-side { text-align: right; display: grid; gap: .35rem; justify-items: end; }
.pts-pos { color: var(--ok); font-weight: 800; white-space: nowrap; }
.pts-neg { color: var(--err); font-weight: 800; white-space: nowrap; }
.empty { color: var(--muted); font-size: .88rem; padding: 1rem 0; }

/* Admin */
.result { width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: 6px; padding: .8rem 1rem; font: inherit; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; align-items: center; }
.result:hover, .result[aria-pressed=true] { border-color: var(--pink); background: var(--pink-ultra); }
.result .r-name { font-weight: 800; font-size: .92rem; }
.result .r-meta { font-size: .76rem; color: var(--muted); word-break: break-word; }
.result .r-pts { grid-row: span 2; font-family: Lora, Georgia, serif; font-size: 1.3rem; color: var(--pink-dark); font-weight: 600; }
.results { display: grid; gap: .5rem; max-height: 420px; overflow-y: auto; }
.selected-client { background: var(--dark); color: var(--white); border-radius: 8px; padding: 1.1rem 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center; }
.selected-client .sc-name { font-family: Lora, Georgia, serif; font-size: 1.3rem; }
.selected-client .sc-meta { font-size: .78rem; color: rgba(255,255,255,.72); word-break: break-word; }
.selected-client .sc-pts { grid-row: span 2; text-align: right; font-family: Lora, Georgia, serif; font-size: 2rem; color: var(--pink-light); line-height: 1; }
.selected-client .sc-pts small { display: block; font-family: Montserrat, Arial, sans-serif; font-size: .65rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.65); font-weight: 800; }

/* Diálogos */
dialog { border: none; border-radius: 10px; padding: 0; width: min(460px, calc(100% - 2rem)); box-shadow: 0 30px 80px rgba(5,2,8,.45); color: var(--text); }
dialog::backdrop { background: rgba(14,6,16,.6); }
.dlg { padding: 1.5rem; display: grid; gap: 1rem; }
.dlg h2 { font-size: 1.35rem; }
.dlg p { color: var(--text-mid); font-size: .9rem; }

/* Carga */
.loading { color: var(--muted); font-size: .88rem; display: flex; gap: .6rem; align-items: center; padding: 1rem 0; }
.loading::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Texto legal */
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.prose p, .prose li { color: var(--text-mid); font-size: .93rem; line-height: 1.75; }
.prose p + p { margin-top: .7rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: .5rem 0; display: grid; gap: .3rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .8rem 0; }
.prose th, .prose td { text-align: left; border: 1px solid var(--line); padding: .55rem .7rem; vertical-align: top; color: var(--text-mid); }
.prose th { background: var(--gray-100); color: var(--text); width: 32%; }
.pendiente { background: var(--warn-pale); color: var(--warn); font-weight: 800; padding: 0 4px; border-radius: 3px; }

/* ── FOOTER ── */
footer { background: var(--dark); color: rgba(255,255,255,.72); text-align: center; padding: 2.5rem 1rem; font-size: .82rem; }
footer a { color: var(--pink-light); text-decoration: none; }
footer p { line-height: 1.9; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-bottom: .75rem; }
.footer-logo img { width: 26px; height: 26px; border-radius: 50%; background: var(--white); }
.footer-logo span { font-size: .85rem; font-weight: 800; color: var(--white); text-transform: uppercase; letter-spacing: .5px; }

@media (max-width: 860px) {
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .nav-burger { display: inline-flex; }
  .nav-links { display: none; position: fixed; top: 76px; left: 0; right: 0; z-index: 20; flex-direction: column; align-items: stretch; background: rgba(14,6,16,.98); padding: 1.5rem 1.25rem; gap: 1.1rem; border-bottom: 1px solid rgba(224,54,140,.14); box-shadow: 0 8px 24px rgba(14,6,16,.22); font-size: 1rem; }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { justify-content: center; text-align: center; }
  .nav-links .nav-account { justify-content: center; }
  .nav-account-mobile { display: inline-flex; margin-left: auto; margin-right: .35rem; }
  .points-hero { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 420px) {
  .nav-account-mobile { padding: 8px 10px; }
  .nav-account-mobile .nav-account-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
