/* Club Soul Simancas · Soul Simancas */
@font-face { font-family: "Kavoon"; src: url("fonts/kavoon.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Baloo Chettan 2"; src: url("fonts/baloo-chettan-2-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Baloo Chettan 2"; src: url("fonts/baloo-chettan-2-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --yellow: #FFDE00;
  --ink: #171916;
  --ink-2: #23251f;
  --paper: #f4efe6;
  --card: #ffffff;
  --line: #e4ddcf;
  --text: #1d1f1a;
  --muted: #6d6a60;
  --ok: #2f9e5b;
  --err: #d23c41;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 25, 22, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--text); font: 17px/1.55 "Baloo Chettan 2", system-ui, sans-serif; }
a { color: var(--ink); text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-family: "Kavoon", "Baloo Chettan 2", cursive; font-weight: 400; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; margin-top: 1.2em; }
code { background: var(--paper); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* Cabecera con foto del local */
.masthead {
  position: relative; color: #fff;
  background: linear-gradient(180deg, rgba(23,25,22,.78) 0%, rgba(23,25,22,.55) 55%, rgba(23,25,22,.85) 100%), var(--foto) center/cover no-repeat, var(--ink);
  padding-bottom: 26px;
}
.masthead.with-hero { padding-bottom: 70px; }
.top { display: flex; align-items: center; justify-content: space-between; max-width: 680px; margin: 0 auto; padding: 18px 16px 8px; gap: 12px; }
.brand img { display: block; height: 52px; width: auto; }
.club-tag { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.hero-in { max-width: 680px; margin: 0 auto; padding: 22px 16px 0; }
.hero-in h1 { font-size: clamp(2rem, 7.5vw, 2.9rem); color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-in h1 em { font-style: normal; color: var(--yellow); }
.lead { font-size: 1.15rem; margin: 0 0 14px; max-width: 560px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.perks li { background: rgba(23,25,22,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border-left: 4px solid var(--yellow); padding: 8px 12px; border-radius: 10px; }
.perks b { color: var(--yellow); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 40px; position: relative; }
.masthead + .wrap { margin-top: -18px; }
.masthead.with-hero + .wrap { margin-top: -44px; }
.page-admin .wrap, .page-admin .top { max-width: 1000px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card.danger { border-color: rgba(210, 60, 65, .35); }
.narrow { max-width: 380px; margin: 30px auto; }

.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form .row2 { grid-template-columns: 1fr; gap: 0; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input[type=search], input[type=number], textarea {
  width: 100%; font: inherit; color: var(--text); background: #fbf9f4;
  border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; min-height: 48px;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 222, 0, .55); }
.has-err input { border-color: var(--err); }
.hint { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.err-msg { margin: 4px 0 0; font-size: .9rem; color: var(--err); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.check.has-err span { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1.05rem "Baloo Chettan 2", sans-serif; color: var(--ink); background: var(--yellow);
  border: 0; border-radius: 12px; padding: 12px 20px; min-height: 50px; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.form .btn { width: 100%; margin: 12px 0 10px; font-size: 1.15rem; }
.btn:hover { filter: brightness(1.04); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.danger { background: var(--err); color: #fff; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: .95rem; }
.btn.gwallet { background: #000; color: #fff; box-shadow: none; border-radius: 999px; }
.btn.gwallet svg { width: 22px; height: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.alert { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; box-shadow: var(--shadow); }
.alert.ok { background: #e7f5ec; border: 1px solid #b7e0c6; color: #17402a; }
.alert.err { background: #fbe9e9; border: 1px solid #f0bcbe; color: #6a1b1e; }
.alert.bday { background: var(--yellow); color: var(--ink); font-size: 1.05rem; }

.small { font-size: .88rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Tarjeta */
.soulcard {
  background: var(--yellow); color: var(--ink); border-radius: 22px; padding: 18px 18px 22px;
  max-width: 360px; margin: 0 auto 18px; box-shadow: 0 18px 40px rgba(23,25,22,.28); text-align: center;
}
.sc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.sc-logo { height: 44px; width: auto; display: block; }
.sc-club { font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--yellow); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.sc-qr { background: #fff; border-radius: 14px; padding: 10px; width: min(240px, 70vw); aspect-ratio: 1; margin: 0 auto 12px; }
.sc-qr svg { width: 100%; height: 100%; display: block; }
.sc-name { font-weight: 700; font-size: 1.2rem; }
.sc-num { font-size: 1rem; letter-spacing: .04em; }
.howto ol { margin: 0; padding-left: 1.2em; }
.howto li { margin-bottom: 4px; }

/* Premios */
.premios td { padding: 9px 8px; }
.premios .pts { color: var(--ink); background: #fff6bf; font-weight: 700; white-space: nowrap; width: 1%; text-align: center; border-radius: 8px; }
.premios .r { text-align: right; }
.premios .val { font-weight: 700; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 16px; }

/* Legal */
.legal h1 { font-size: 1.7rem; }
.legal h2 { font-size: 1.1rem; margin-top: 1.4em; font-weight: 700; border-left: 4px solid var(--yellow); padding-left: 8px; }
.data { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 10px; }
.data dt { color: var(--muted); }
.data dd { margin: 0; }

/* Panel */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-bar h1 { font-size: 1.8rem; margin: 0; }
.admin-bar .actions { margin: 0 0 10px; }
.page-admin .wrap > .admin-bar:first-child { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 16px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 1.8rem; color: var(--ink); line-height: 1; }
.stats span { font-size: .85rem; color: var(--muted); }
.search { display: flex; gap: 8px; margin: 6px 0 12px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.log { background: #fbf9f4; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: .8rem; white-space: pre-wrap; word-break: break-all; color: var(--muted); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.tag.on { background: #dff3e6; color: #1f6b3e; }
.tag.used { background: #fff3b0; color: #6b5b00; }
.tag.off { background: var(--paper); color: var(--muted); }

.foot { max-width: 680px; margin: 0 auto; padding: 10px 16px 34px; text-align: center; color: var(--muted); font-size: .85rem; }
.foot img { height: 40px; width: auto; opacity: .85; margin-bottom: 6px; }
.foot p { margin: 4px 0; }

/* Modo kiosko (tablet de la barra) */
body.kiosk { font-size: 20px; user-select: none; -webkit-user-select: none; }
body.kiosk .wrap, body.kiosk .top, body.kiosk .hero-in { max-width: 780px; }
body.kiosk input { min-height: 58px; font-size: 1.1rem; user-select: text; -webkit-user-select: text; }
body.kiosk .btn { min-height: 62px; }
select.sel { width: 100%; font: inherit; color: var(--text); background: #fbf9f4; border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; min-height: 48px; }
.hero-recover { margin: 14px 0 0; font-size: .95rem; }
.hero-recover a { color: var(--yellow); }
.h-card { font-size: 1.7rem; }
.top-nav { display: flex; align-items: center; gap: 12px; }
.top-link { color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; }
.hero-back { margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: rgba(23,25,22,.62); padding: 10px 12px; border-radius: 12px; }
.hero-not { color: #ddd; font-size: .9rem; }
/* Área de cliente */
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.acc-head h1 { margin-bottom: 2px; }
.acc-head p { margin: 0; }
.acc-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); background: var(--yellow); border-color: transparent; }
.acc-qr { width: 92px; height: 92px; flex: none; background: #fff; border-radius: 10px; padding: 6px; }
.acc-qr svg { width: 100%; height: 100%; display: block; }
.acc-card .muted { color: #4a4a3f; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .acc-grid { grid-template-columns: 1fr; gap: 0; } }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .big { font-family: "Kavoon", "Baloo Chettan 2", cursive; font-weight: 400; font-size: 2rem; line-height: 1.1; }
.bar { height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; margin: 4px 0; }
.bar i { display: block; height: 100%; background: var(--yellow); border-radius: 99px; }
.hist td { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.premios tr.ok .pts { background: var(--yellow); }
