/* Loyalty - Aternum · páginas del cliente
   Identidad Aternum: carbón #312f37 (60%) · crema #f5edd6 (30%) · dorado #c9a84c (10%) · noche #222126 */
:root {
  --bg: #312f37;
  --accent: #c9a84c;
  --ink: #f5edd6;
  --night: #222126;
  --charcoal: #312f37;
  --cream: #f5edd6;
  --gold: #c9a84c;
  --surface: #2a2830;
  --surface-2: #38353f;
  --line: rgba(245, 237, 214, .12);
  --muted: rgba(245, 237, 214, .62);
  --ok: #8fc9a3;
  --err: #f0a493;
  --sans: "Avenir Next", "Futura", "Century Gothic", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: var(--sans);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--night); }
body {
  font-family: var(--sans); color: var(--cream); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background:
    radial-gradient(90% 50% at 50% -10%, rgba(201, 168, 76, .14), transparent 70%),
    linear-gradient(180deg, var(--charcoal) 0%, var(--night) 100%) fixed;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--gold); }
button, input, select, textarea { font: inherit; }
.wrap { max-width: 460px; margin: 0 auto; padding: 22px 18px 48px; }

.brand-logo { display: block; margin: 8px auto 22px; height: 78px; width: auto; }
.eyebrow { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }

.qr-box { background: var(--cream); color: var(--charcoal); border-radius: var(--radius); margin-top: 16px; padding: 20px 18px 18px; text-align: center; }
.qr-box img { width: 190px; height: 190px; display: block; margin: 0 auto; }
.qr-box .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 19px; letter-spacing: .3em; margin-top: 10px; font-weight: 600; }
.qr-box .hint { color: rgba(49, 47, 55, .7); font-size: 13px; margin-top: 4px; }

/* ---------- Bloques ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin-top: 14px; }
.card h2 { font-weight: 600; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--gold); color: var(--night); padding: 14px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  letter-spacing: .02em; text-decoration: none; width: 100%; transition: transform .1s, opacity .2s, background .2s;
}
.btn:hover { background: #d6b85e; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.gold { background: var(--gold); color: var(--night); }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(245, 237, 214, .28); }
.btn.ghost:hover { background: rgba(245, 237, 214, .06); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }

label.f { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
label.f span { display: block; margin-bottom: 7px; }
.input, input[type=text], input[type=email], input[type=tel], input[type=date], input:not([type]), textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(245, 237, 214, .18); background: var(--night);
  color: var(--cream); font-size: 16px; outline: none; letter-spacing: normal; text-transform: none; color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: rgba(245, 237, 214, .35); }
.input:focus, input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, .22); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.check input { margin-top: 3px; accent-color: var(--gold); }
.check b { color: var(--cream); font-weight: 600; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.alert.err { background: rgba(240, 164, 147, .12); color: var(--err); }
.alert.ok { background: rgba(143, 201, 163, .12); color: var(--ok); }

.tabs { display: flex; gap: 6px; margin-top: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 9px 15px; font-size: 13px; cursor: pointer; color: var(--muted); position: relative; }
.tabs button.active { background: var(--cream); color: var(--charcoal); border-color: var(--cream); font-weight: 600; }
.tabs .dot { position: absolute; top: 5px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.list li:last-child { border-bottom: 0; }
.list .t { font-weight: 600; color: var(--cream); margin-bottom: 2px; }
.list .d { color: rgba(245, 237, 214, .42); font-size: 12px; margin-top: 4px; }
.list .unread .t::before { content: "✦ "; color: var(--gold); }

.stars { display: flex; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.stars button { background: none; border: 0; font-size: 34px; cursor: pointer; color: rgba(245, 237, 214, .18); padding: 0; }
.stars button.on { color: var(--gold); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--cream); color: var(--charcoal); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 500; opacity: 0; transition: .3s; z-index: 50; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; display: none; align-items: flex-end; justify-content: center; }
.sheet-backdrop.show { display: flex; }
.sheet { background: var(--charcoal); width: 100%; max-width: 460px; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet h3 { font-weight: 600; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.sheet ol { padding-left: 20px; line-height: 1.75; font-size: 15px; margin: 0 0 18px; color: var(--cream); }

.hero { text-align: center; margin: 0 0 24px; }
.hero h1 { font-weight: 500; font-size: 15px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.hero p { color: var(--cream); margin: 0 auto; font-size: 17px; line-height: 1.5; max-width: 340px; }
.footer { text-align: center; color: rgba(245, 237, 214, .4); font-size: 11.5px; letter-spacing: .08em; margin-top: 28px; }
.footer a { color: inherit; }
.skeleton { height: 280px; border-radius: 24px; background: linear-gradient(90deg, #2a2830, #38353f, #2a2830); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

[hidden] { display: none !important; }

/* ---------- Apple Wallet / Google Wallet ---------- */
.wallet-cta { background: linear-gradient(160deg, rgba(201, 168, 76, .16), rgba(201, 168, 76, .04)); border: 1px solid rgba(201, 168, 76, .45); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; text-align: center; }
.wallet-cta.done { background: rgba(245, 237, 214, .04); border-color: rgba(245, 237, 214, .14); }
.wallet-head { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.wallet-cta p { margin: 6px 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.wallet-cta.done p { margin-bottom: 10px; }
.wallet-btns { display: grid; gap: 10px; justify-items: center; }
.wallet-btn { display: inline-flex; align-items: center; gap: 12px; min-width: 230px; padding: 10px 20px 10px 16px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .28); text-align: left; line-height: 1.1; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.wallet-btn svg { width: 34px; height: 26px; flex: none; }
.wallet-btn small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .02em; opacity: .85; }
.wallet-btn:active { transform: scale(.98); }
.wallet-cta.done .wallet-btn { min-width: 0; font-size: 14px; padding: 7px 14px; }
.wallet-cta.done .wallet-btn svg { width: 24px; height: 18px; }
.link-btn { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
