/* Loyalty - Aternum · estilos de las páginas del cliente */
:root {
  --bg: #111111;
  --accent: #c9a45c;
  --ink: #f4efe6;
  --page: #f6f2ea;
  --text: #1b1917;
  --muted: #6f6860;
  --line: #e4ddd0;
  --white: #fffdf9;
  --ok: #2f7d55;
  --err: #b3412f;
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans); color: var(--text); background: var(--page);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.wrap { max-width: 460px; margin: 0 auto; padding: 20px 18px 48px; }

.brandbar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 18px; }
.brandbar img { height: 34px; width: auto; }
.brandbar .name { font-family: var(--serif); font-size: 20px; letter-spacing: .14em; text-transform: uppercase; }

.qr-box { background: var(--white); border-radius: var(--radius); margin-top: 16px; padding: 18px; text-align: center; border: 1px solid var(--line); }
.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: 20px; letter-spacing: .22em; margin-top: 8px; }
.qr-box .hint { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Bloques ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0 0 10px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.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(--bg); color: var(--ink); padding: 13px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; width: 100%; transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.gold { background: var(--accent); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stack > * + * { margin-top: 10px; }

label.f { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.f span { display: block; margin-bottom: 6px; }
.input, input[type=text], input[type=email], input[type=tel], input[type=date], textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 16px; outline: none;
}
.input:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.check input { margin-top: 3px; accent-color: var(--accent); }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.alert.err { background: #fbeae6; color: var(--err); }
.alert.ok { background: #e6f3ec; color: var(--ok); }

.tabs { display: flex; gap: 6px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; color: var(--text); position: relative; }
.tabs button.active { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.tabs .dot { position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--err); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list .t { font-weight: 600; }
.list .d { color: var(--muted); font-size: 12px; margin-top: 3px; }
.list .unread .t::before { content: "● "; color: var(--accent); }

.stars { display: flex; gap: 6px; justify-content: center; margin: 6px 0 12px; }
.stars button { background: none; border: 0; font-size: 32px; cursor: pointer; color: var(--line); padding: 0; }
.stars button.on { color: var(--accent); }

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

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: none; align-items: flex-end; justify-content: center; }
.sheet-backdrop.show { display: flex; }
.sheet { background: var(--white); width: 100%; max-width: 460px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 12px; }
.sheet ol { padding-left: 20px; line-height: 1.7; font-size: 15px; margin: 0 0 16px; }

.hero { text-align: center; margin: 6px 0 22px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0; font-size: 15px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; }
.footer a { color: var(--muted); }
.skeleton { height: 260px; border-radius: 22px; background: linear-gradient(90deg, #e9e3d8, #f3eee5, #e9e3d8); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
