:root {
  --bg: #f5f0e8;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --border: #e3dccf;
  --text: #132a2e;
  --muted: #5f706b;
  --primary: #2a6049;
  --primary-hover: #1f4a38;
  --primary-soft: #dcefe3;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 42, 46, .06), 0 8px 24px rgba(19, 42, 46, .06);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0 0 .5rem; letter-spacing: -.02em; }
p { margin: 0 0 1rem; color: var(--muted); line-height: 1.55; }
a { color: var(--primary); }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.5rem; background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: block; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; }
.container { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

.tabs { display: flex; gap: .35rem; background: var(--surface); border: 1px solid var(--border); padding: .3rem; border-radius: 12px; width: fit-content; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: .55rem 1rem; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--primary); color: #fff; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.panel + .panel { margin-top: 1.25rem; }
.panel-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.designer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.sticky { position: sticky; top: 84px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label, .label { font-size: .82rem; font-weight: 600; color: var(--text); }
.hint { font-size: .78rem; color: var(--muted); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=date], input[type=datetime-local], select, textarea {
  font: inherit; font-size: .95rem; padding: .65rem .8rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); width: 100%;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: .6rem; }
.color-field { display: flex; flex-direction: column; gap: .35rem; font-size: .78rem; font-weight: 600; }
input[type=color] { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; }

.segmented { align-self: flex-start; display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.segmented input { display: none; }
.segmented label { padding: .5rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); }
.segmented input:checked + label { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: .35rem .55rem; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.chip:hover { border-color: var(--primary); }
.theme-chip { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; padding: .4rem .7rem; }
.theme-chip i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }

.logo-row { display: flex; align-items: center; gap: .75rem; }
.logo-preview { width: 48px; height: 48px; border-radius: 12px; border: 1px dashed var(--border); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--muted); font-size: .7rem; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .92rem; padding: .65rem 1.1rem;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--primary); color: #fff; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.success { background: var(--success); }
.btn.block { width: 100%; }
.btn.lg { padding: .85rem 1.4rem; font-size: 1rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: .75rem 1.1rem; border-radius: 12px; font-size: .9rem; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: toast-in .25s ease-out; max-width: 90vw; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.hero h1 span { color: var(--primary); }
.hero-card { max-width: 420px; margin: 1.5rem 0; cursor: pointer; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.feature { font-size: .85rem; color: var(--muted); }
.feature b { display: block; color: var(--text); margin-bottom: .2rem; }
.auth-panel { max-width: 440px; width: 100%; justify-self: end; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.25rem; }
.role-btn { border: 1.5px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: .8rem; cursor: pointer; font: inherit; text-align: left; }
.role-btn b { display: block; font-size: .95rem; }
.role-btn span { font-size: .78rem; color: var(--muted); }
.role-btn.active { border-color: var(--primary); background: var(--primary-soft); }
.switch-link { text-align: center; font-size: .88rem; margin-top: 1rem; color: var(--muted); }
.switch-link button { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Business ---------- */
.preview-stage { background: radial-gradient(circle at 30% 20%, #ffffff, #e6efe7); border-radius: var(--radius); padding: 2rem 1.5rem; border: 1px solid var(--border); }
.preview-stage .lc-card { max-width: 420px; margin: 0 auto; }
.preview-actions { display: flex; justify-content: center; gap: .5rem; margin-top: 1.25rem; }
.join-box { display: flex; gap: 1rem; align-items: center; }
.join-box img { width: 110px; height: 110px; border-radius: 10px; border: 1px solid var(--border); padding: 6px; background: #fff; }
.join-box input { font-size: .82rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.stat span { font-size: .8rem; color: var(--muted); }
#reader { width: 100%; border-radius: 12px; overflow: hidden; background: #111; min-height: 0; }
#reader video { border-radius: 12px; }
.scan-placeholder { border: 2px dashed var(--border); border-radius: 12px; padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.scan-placeholder .big { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.customer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.customer-head small { color: var(--muted); }
.amount-row { display: flex; gap: .5rem; align-items: center; margin: 1.25rem 0 .75rem; }
.amount-row input { width: 110px; text-align: center; font-size: 1.1rem; font-weight: 700; }
.step { width: 42px; height: 42px; padding: 0; font-size: 1.2rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
td { padding: .75rem; border-bottom: 1px solid var(--border); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; background: var(--primary-soft); color: var(--primary); }
.pill.ok { background: #dcfce7; color: #15803d; }

/* ---------- Customer wallet ---------- */
.wallet-layout { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 3rem; align-items: start; }

.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.25rem; gap: 1rem; }
.focus .lc-card { cursor: pointer; }
.focus-info { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.1rem 0 1.75rem; }
.focus-progress { font-weight: 700; font-size: .95rem; }
.focus-info small { color: var(--muted); font-size: .8rem; }
/* Pila de tarjetas estilo wallet: cada tarjeta asoma solo su cabecera */
.stack { display: flex; flex-direction: column; padding-bottom: 1rem; }
.stack-item { cursor: pointer; transition: transform .25s ease; }
.stack-item + .stack-item { margin-top: -45%; }
.stack-item:hover { transform: translateY(-10px); }
.stack-item .lc-face { box-shadow: 0 -1px 0 rgba(255,255,255,.12) inset, 0 -6px 18px rgba(19, 42, 46, .18); }
.explore { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem 1.25rem; }
.explore-item { display: flex; flex-direction: column; gap: .7rem; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.3, 1.1, .4, 1); }

.join-page { max-width: 480px; margin: 2rem auto; text-align: center; }
.join-page .lc-card { margin: 1.5rem 0; }

/* =====================================================================
   Tarjeta de fidelización (componente)
   ===================================================================== */
.lc-card {
  --bg1: #1e1b4b; --bg2: #6d28d9; --fg: #fff; --accent: #fbbf24; --back: #111827;
  container-type: inline-size;
  width: 100%; aspect-ratio: 1.586; perspective: 1400px;
  font-family: 'Inter', system-ui, sans-serif;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.lc-card[data-font=serif] { font-family: 'Playfair Display', Georgia, serif; }
.lc-card[data-font=mono] { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.lc-card[data-font=rounded] { font-family: 'Nunito', ui-rounded, system-ui, sans-serif; }

.lc-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.3, 1.35, .45, 1);
}
.lc-card.flipped .lc-inner { transform: rotateY(180deg); }
.lc-card:not(.no-hover):hover .lc-inner { transform: rotateY(0) translateY(-3px); }
.lc-card.flipped:not(.no-hover):hover .lc-inner { transform: rotateY(180deg) translateY(-3px); }

.lc-face {
  position: absolute; inset: 0; border-radius: 5.5cqw; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: var(--fg);
  box-shadow: 0 2cqw 6cqw rgba(19, 42, 46, .28), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.lc-front {
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  display: flex; flex-direction: column; padding: 5.5cqw 6cqw 5cqw;
}
.lc-back {
  background: var(--back); transform: rotateY(180deg);
  display: flex; align-items: center; gap: 5cqw; padding: 6cqw;
}
/* Patrón decorativo y brillo */
.lc-front::before, .lc-back::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.lc-card[data-pattern=dots] .lc-face::before { background: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.4px) 0 0 / 3.4cqw 3.4cqw; }
.lc-card[data-pattern=lines] .lc-face::before { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 .5cqw, transparent .5cqw 3cqw); }
.lc-card[data-pattern=grid] .lc-face::before { background: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 5cqw 5cqw, linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 5cqw 5cqw; }
.lc-card[data-pattern=circles] .lc-face::before { background: radial-gradient(circle at 105% -10%, rgba(255,255,255,.14) 0 32%, transparent 32.3%), radial-gradient(circle at -5% 115%, rgba(255,255,255,.09) 0 38%, transparent 38.3%); }
.lc-front::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.13) 45%, transparent 60%);
}
.lc-face > * { position: relative; z-index: 1; }
/* Safari no respeta backface-visibility en hijos con capa propia: además ocultamos cada cara
   justo cuando la tarjeta pasa de canto (≈90°, a los 0,1 s con esta curva de animación). */
.lc-front, .lc-back { transition: visibility 0s linear .1s; }
.lc-card.flipped .lc-front, .lc-card:not(.flipped) .lc-back { visibility: hidden; }

.lc-head { display: flex; align-items: center; gap: 3cqw; min-height: 11cqw; }
.lc-logo { width: 11cqw; height: 11cqw; border-radius: 2.6cqw; object-fit: contain; background: rgba(255,255,255,.92); padding: .8cqw; flex-shrink: 0; }
.lc-logo.small { width: 8cqw; height: 8cqw; border-radius: 2cqw; margin-bottom: 1.5cqw; }
.lc-logo.shaped { background: none; padding: 0; border-radius: 0; height: 12cqw; width: auto; max-width: 30cqw; }
.lc-logo.shaped.shape-original { max-width: 34cqw; }
.lc-logo.small.shaped { height: 8cqw; max-width: 20cqw; }
.lc-titles { min-width: 0; flex: 1; }
.lc-business { font-weight: 800; font-size: 5cqw; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-title { font-size: 3.1cqw; opacity: .78; margin-top: .6cqw; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-badge { font-size: 3cqw; font-weight: 700; background: rgba(255,255,255,.16); padding: 1cqw 2cqw; border-radius: 99px; flex-shrink: 0; }

.lc-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.lc-stamps {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 12.5cqw));
  justify-content: center; gap: 2cqw 2.2cqw;
}
.lc-stamp {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: .5cqw dashed color-mix(in srgb, var(--fg) 45%, transparent);
  font-size: 2.6cqw; font-weight: 700; color: color-mix(in srgb, var(--fg) 45%, transparent);
  line-height: 1;
}
.lc-stamp.on {
  border: 0; background: var(--accent); color: var(--bg1);
  font-size: var(--stamp-font, 5cqw);
  box-shadow: 0 .6cqw 1.6cqw rgba(0,0,0,.25), inset 0 -.5cqw 0 rgba(0,0,0,.12);
}
.lc-stamp.new { animation: stamp-in .55s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-in {
  0% { transform: scale(2.4) rotate(-25deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.lc-points { display: flex; align-items: baseline; gap: 2cqw; }
.lc-points-num { font-size: 15cqw; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--accent); }
.lc-points-num.new { animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) .35s both; display: inline-block; }
@keyframes pop { 0% { transform: scale(.6); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
.lc-points-unit { font-size: 4cqw; font-weight: 600; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.lc-progress { height: 2.4cqw; border-radius: 99px; background: rgba(255,255,255,.18); margin-top: 3cqw; overflow: hidden; }
.lc-progress-fill { height: 100%; background: var(--accent); border-radius: inherit; transition: width .8s ease; }

.lc-foot { display: flex; justify-content: space-between; align-items: end; gap: 3cqw; }
.lc-reward { font-size: 3.2cqw; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-reward.ready { font-weight: 800; opacity: 1; color: var(--accent); }
.lc-holder { font-size: 3cqw; font-weight: 600; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }

.lc-qr { height: 100%; aspect-ratio: 1; background: #fff; border-radius: 3.5cqw; padding: 2.2cqw; flex-shrink: 0; display: grid; place-items: center; box-shadow: 0 1cqw 3cqw rgba(0,0,0,.3); }
.lc-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.lc-qr-empty { color: #999; font-weight: 800; font-size: 6cqw; }
.lc-back-info { display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-width: 0; flex: 1; }
.lc-back-info .lc-business { font-size: 4.4cqw; }
.lc-back-info .lc-holder { max-width: none; margin-top: 1cqw; }
.lc-code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 3.5cqw; font-weight: 600; letter-spacing: .06em; color: var(--accent); }
.lc-backtext { font-size: 2.7cqw; opacity: .7; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .designer, .grid-2, .wallet-layout { grid-template-columns: 1fr; }
  .wallet-col { position: static; }
  .auth-panel { justify-self: stretch; max-width: none; }
  .sticky { position: static; }
  .designer .preview-col { order: -1; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 1.25rem 1rem 3rem; }
  .topbar { padding: .75rem 1rem; }
  .topbar-right .who { display: none; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .stat { padding: .75rem; }
  .stat b { font-size: 1.2rem; }
  .join-box { flex-direction: column; align-items: stretch; }
  .join-box img { align-self: center; }
}
.focus-info .btn { white-space: nowrap; flex-shrink: 0; }

/* ---------- Billetera: extras de la tarjeta al frente ---------- */
.push-banner { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 1rem; margin-bottom: 1.25rem; border-radius: 12px; background: var(--primary-soft); font-size: .88rem; }
.focus-extra { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }
.focus-info { margin-bottom: 1rem; }
.wallet-buttons { display: flex; gap: .6rem; flex-wrap: wrap; }
.wallet-btn { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1rem .5rem .75rem; border-radius: 10px; background: #000; color: #fff; text-decoration: none; border: 0; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; line-height: 1.1; }
.wallet-btn span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.wallet-btn small { font-size: .65rem; font-weight: 500; opacity: .85; }
.wallet-logo { font-size: 1.4rem; width: 24px; text-align: center; }
.wallet-logo.g { font-weight: 800; font-size: 1.15rem; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.last-message { background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: .75rem 1rem; }
.last-message p { margin: .25rem 0 0; color: var(--text); font-size: .92rem; }
.lm-head { display: flex; justify-content: space-between; font-size: .82rem; }
.lm-head small { color: var(--muted); }
.rewards-catalog { display: flex; flex-direction: column; gap: .4rem; }
.rewards-catalog .section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.reward-item { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .85rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.reward-item b { color: var(--muted); font-weight: 600; white-space: nowrap; }
.reward-item.ok { border-color: #86efac; background: #f0fdf4; }
.reward-item.ok b { color: #15803d; }
.muted { color: var(--muted); }

/* ---------- Comunes: modal y formularios ---------- */
.btn.sm { padding: .4rem .7rem; font-size: .82rem; }
.btn.icon { width: 38px; height: 38px; padding: 0; font-size: 1rem; }
.stack-form { display: flex; flex-direction: column; gap: .75rem; }
.stack-form .field { margin-bottom: 0; }
.modal-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(19, 42, 46, .45); display: grid; place-items: center; padding: 1rem; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 18px; width: min(100%, 440px); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(100%, 760px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.25rem; overflow: auto; }

.wallet-only { max-width: 520px; }
.customer-auth { max-width: 420px; margin: 1.5rem auto; }
.staff-hint { font-size: .82rem; text-align: center; margin: 1rem 0 0; }
.auth-panel h2, .customer-auth h2 { margin-bottom: 1rem; }

/* ---------- Marca ---------- */
.wordmark { font-weight: 800; letter-spacing: .06em; color: var(--text); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d9805a; margin-bottom: .75rem; }

/* ---------- Iconos (Lucide) ---------- */
.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -.14em; stroke-width: 2; }
.btn .icon { width: 18px; height: 18px; }
.toast { display: flex; align-items: center; gap: .55rem; }
.toast .icon { width: 18px; height: 18px; }
.empty-icon .icon { width: 40px; height: 40px; color: var(--muted); stroke-width: 1.5; }
.scan-placeholder .big .icon { width: 44px; height: 44px; stroke-width: 1.5; color: var(--muted); }
.pill .icon { margin-right: .2rem; }
.banner-text { display: flex; gap: .55rem; align-items: flex-start; }
.banner-text .icon { width: 18px; height: 18px; margin-top: .1rem; color: var(--primary); }
.focus-progress .icon, .ready-banner .icon { margin-right: .35rem; }
.wallet-logo { width: 22px !important; height: 22px !important; }
/* Iconos dentro de la tarjeta */
.lc-stamp.on .icon { width: 1em; height: 1em; stroke-width: 2.4; vertical-align: 0; }
.lc-badge { display: inline-flex; align-items: center; gap: .8cqw; }
.lc-badge .icon { width: 3.2cqw; height: 3.2cqw; }
.lc-reward .icon { width: 3.4cqw; height: 3.4cqw; margin-right: 1cqw; vertical-align: -.5cqw; }
/* Selector de icono del sello */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: .4rem; }
.icon-choice { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.icon-choice .icon { width: 20px; height: 20px; }
.icon-choice:hover { border-color: var(--primary); }
.icon-choice.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Sellos con recompensa (niveles) */
.lc-stamp.tier:not(.on) { border-style: solid; color: color-mix(in srgb, var(--fg) 70%, transparent); }
.lc-stamp.tier:not(.on) .icon { width: 50%; height: 50%; }
.lc-stamp.tier-ready { box-shadow: 0 0 0 .6cqw color-mix(in srgb, var(--fg) 85%, transparent), 0 0 3cqw color-mix(in srgb, var(--accent) 80%, transparent); animation: tierPulse 1.8s ease-in-out infinite; }
@keyframes tierPulse { 50% { box-shadow: 0 0 0 .9cqw color-mix(in srgb, var(--fg) 60%, transparent), 0 0 4.5cqw var(--accent); } }
.reward-item.done { opacity: .6; }
.reward-item.done b { color: var(--muted); }

.optional { font-weight: 400; color: var(--muted); }

/* Ver / ocultar contraseña */
.password-field { position: relative; }
.password-field input { padding-right: 2.9rem; }
.password-toggle { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.password-toggle .icon { width: 18px; height: 18px; }
