/* League Tennis Aventura — Landing Page Web */
:root {
  --navy: #10243a;
  --navy2: #183653;
  --green: #b7d96b;
  --cream: #f7f5ef;
  --white: #fff;
  --muted: #6d7885;
  --line: #e1e5e8;
  --red: #c95c52;
  --radius: 8px;
  --shadow: 0 1px 5px rgba(16,36,58,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Helvetica Neue', system-ui, Arial, sans-serif; background: var(--cream); color: var(--navy); line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* HEADER */
.header { background: var(--navy); color: var(--white); padding: 14px 5%; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.15); flex-wrap: wrap; }
.brand { display: flex; flex-direction: row; align-items: center; gap: 11px; }
.brand-logo { display: block; width: 56px; height: 56px; flex: 0 0 56px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; object-fit: cover; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.brand-name { font-weight: 800; letter-spacing: 1.5px; font-size: 15px; }
.brand-accent { color: var(--green); }
.brand-sub { font-size: 9px; letter-spacing: 2px; font-weight: 600; color: #c7d2dc; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: #e8edf2; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; transition: color 0.2s; }
.nav a:hover { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.language-picker-wrap { display: inline-flex; align-items: center; }
.language-picker { min-width: 105px; padding: 8px 26px 8px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; background: var(--navy2); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.language-picker option { background: #fff; color: var(--navy); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.payment-return-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 1200px; margin: 18px auto 0; padding: 16px 20px; border: 1px solid #d8e6bd; border-radius: 12px; background: #f2f7e9; color: #29431d; box-shadow: 0 5px 18px rgba(16,36,58,.06); }
.payment-return-notice[hidden] { display: none; }
.payment-return-notice p { font-weight: 800; }
.payment-return-notice small { margin-inline-start: auto; color: var(--muted); overflow-wrap: anywhere; }
.payment-return-notice.is-error { border-color: #efc5bf; background: #fff5f3; color: #8e3028; }
.payment-return-notice.is-info { border-color: #cbd9e6; background: #f1f6fa; color: var(--navy); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* BUTTONS */
.btn { border: 0; border-radius: 5px; padding: 12px 18px; font-weight: 700; cursor: pointer; font-size: 14px; transition: all 0.2s; letter-spacing: 0.3px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: var(--navy); }
.btn-primary:hover { background: #c8e87a; }
.btn-secondary { background: transparent; border: 1.5px solid #aab8c5; color: var(--white); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy2); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* HERO */
.hero { padding: 80px 5% 70px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); color: var(--white); display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(ellipse, rgba(183,217,107,0.08) 0%, transparent 70%); pointer-events: none; }
.eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--green); font-weight: 900; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; margin: 16px 0 20px; font-weight: 900; letter-spacing: -0.5px; }
.hero p { max-width: 580px; color: #d8e0e7; font-size: 15px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 28px; backdrop-filter: blur(8px); }
.hero-card h3 { margin: 12px 0 8px; font-size: 18px; }
.hero-date { font-size: 34px; font-weight: 900; color: var(--green); }
.hero-card p { font-size: 13px; margin: 8px 0 20px; color: #c8d4de; }

/* TAGS */
.tag { display: inline-block; background: #edf3df; color: #415a1b; font-size: 10px; font-weight: 900; letter-spacing: 0.8px; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; }
.tag-blue { background: #e8eff6; color: #23415d; }
.tag-red { background: #f8e8e5; color: #8e3028; }

/* SECTIONS */
main { max-width: 1200px; margin: auto; padding: 0 5%; }
.section { margin: 60px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section h2 { font-size: 28px; margin: 0; font-weight: 800; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* GRID */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* CARDS */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: all 0.25s; overflow: hidden; }
.card:hover { box-shadow: 0 6px 20px rgba(16,36,58,0.1); transform: translateY(-2px); }
.card h3 { margin: 8px 0 6px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 11px; }
.big-number { font-size: 32px; font-weight: 900; margin: 8px 0; }
.challenge { border-left: 4px solid var(--green); }
.challenge-heading-actions { display: flex; align-items: center; gap: 14px; }
.challenge-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.challenge-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 24px; }
.challenge-steps article { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.challenge-steps article > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: #edf3df; color: var(--green-dark); font-size: 12px; font-weight: 900; }
.challenge-steps b { display: block; font-size: 13px; }
.challenge-steps p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.challenge-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.challenge-card-top, .challenge-player { display: flex; align-items: center; }
.challenge-card-top { justify-content: space-between; gap: 10px; }
.challenge-player { min-width: 0; gap: 11px; }
.challenge-player > div { min-width: 0; }
.challenge-player small, .challenge-availability small { display: block; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.challenge-player h3 { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 15px; }
.challenge-avatar { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, #dce9b8, #edf3df); color: var(--navy); font-size: 13px; font-weight: 900; }
.challenge-status { flex: 0 0 auto; padding: 6px 9px; border-radius: 20px; background: #edf3df; color: #415a1b; font-size: 10px; font-weight: 800; }
.challenge-status.is-accepted { background: #e8eff6; color: #23415d; }
.challenge-card-details { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin: 18px 0 12px; padding: 12px 0; border-top: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.challenge-card-details > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.challenge-detail-icon { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.challenge-card-details b { overflow-wrap: anywhere; font-size: 12px; }
.challenge-availability { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; margin-bottom: 14px; }
.challenge-availability > span { color: var(--green-dark); font-size: 22px; line-height: 1; }
.challenge-availability p { margin-top: 3px; font-size: 13px; font-weight: 700; }
.challenge-accept { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.challenge-coordinating { margin-top: auto; padding: 10px; border-radius: 8px; background: #f2f5f7; color: #526171; font-size: 12px; font-weight: 700; }
.challenge-empty { grid-column: 1 / -1; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #fff, #f7f9f4); }
.challenge-empty-copy { margin-bottom: 18px; }
.challenge-empty-copy h3 { margin: 10px 0 4px; font-size: 18px; }
.challenge-empty-copy p { color: var(--muted); font-size: 13px; }
.challenge-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.challenge-card-preview { border-style: dashed; box-shadow: none; }
.challenge-example-label { margin-top: auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.challenge-load-error { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px; border: 1px solid #efc5bf; border-radius: 12px; background: #fff5f3; color: #8e3028; }
.challenge-load-error p { font-size: 13px; }
.challenge-load-error .btn-secondary { border-color: #b97269; color: #8e3028; }
.auth-modal-box { display: grid; grid-template-columns: .85fr 1.15fr; width: min(840px, 100%); min-height: 500px; padding: 0; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 38px; background: radial-gradient(circle at 90% 15%, rgba(183,217,107,.22), transparent 30%), linear-gradient(145deg, #10243a, #1d4855); color: #fff; }
.auth-logo { position: absolute; top: 30px; left: 34px; display: block; width: 72px; height: 72px; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; object-fit: cover; box-shadow: 0 5px 16px rgba(0,0,0,.24); }
.auth-eyebrow { position: absolute; top: 59px; left: 119px; color: #e0e9ef; font-size: 9px; font-weight: 900; letter-spacing: 1.5px; }
.auth-visual h2 { position: relative; max-width: 290px; margin-bottom: 12px; font-size: clamp(29px, 4vw, 42px); line-height: 1.06; letter-spacing: -1px; }
.auth-visual p { position: relative; max-width: 280px; color: #d7e0e7; font-size: 13px; }
.auth-decoration { position: absolute; top: 100px; right: -58px; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.auth-decoration span { position: absolute; inset: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.auth-decoration span:nth-child(2) { inset: 42px; }
.auth-decoration span:nth-child(3) { inset: 64px; }
.auth-content { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 52px clamp(26px, 5vw, 58px); }
.auth-close { position: absolute; top: 16px; right: 18px; z-index: 1; }
.auth-content h2 { margin: 0; font-size: 30px; letter-spacing: -.7px; }
.auth-subtitle { margin: 5px 0 12px; color: var(--muted); font-size: 13px; }
.auth-content form { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 12px; }
.auth-content form label { gap: 8px; font-size: 12px; }
.auth-content form input { min-height: 48px; padding: 12px 14px; border-color: #d9e0e5; border-radius: 10px; }
.auth-content form input:focus { outline: 3px solid rgba(183,217,107,.45); border-color: #8cae45; }
.auth-submit { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-top: 4px; border-radius: 10px; text-align: left; }
.auth-submit:disabled { cursor: wait; opacity: .75; }
.auth-content a:focus-visible, .auth-close:focus-visible, .auth-submit:focus-visible { outline: 3px solid #7e9f38; outline-offset: 3px; }
.auth-notice { margin-top: 14px; }
.auth-register { margin-top: 20px; color: #596573; font-size: 12px; }
.auth-register a { color: var(--green-dark); font-weight: 800; }
.auth-security { margin-top: 18px; color: #77828d; font-size: 10px; }
.auth-security span { margin-right: 5px; color: #7e9f38; font-size: 9px; }

/* POINTS TABLE */
.points-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.points-table td { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.points-table td:last-child { text-align: right; }

/* FILTERS */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.filters select, .filters input { border: 1px solid #d8dee4; background: var(--white); border-radius: var(--radius); padding: 11px 14px; color: var(--navy); font: inherit; min-width: 150px; font-size: 14px; }
.filters select:focus, .filters input:focus { outline: 2px solid var(--green); outline-offset: -1px; }

/* NOTICE BAR */
.notice-bar { background: #eef2f5; border: 1px solid #dce2e8; border-radius: 7px; padding: 12px 16px; margin: 0 0 14px; font-size: 12px; color: #526171; }

/* TABLE */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { background: #f0f3f5; text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; color: #526171; }
tr:last-child td { border-bottom: 0; }
.player { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #e5ebef; display: grid; place-items: center; font-size: 11px; font-weight: 900; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* STORE / BOOK COVERS */
.store-cover { height: 120px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 900; font-size: 14px; text-align: center; margin-bottom: 12px; padding: 8px; overflow: hidden; }
.book-cover { height: 110px; border-radius: 6px; background: linear-gradient(145deg, #183653, #55748a); display: flex; align-items: flex-end; padding: 10px; color: var(--white); font-weight: 900; font-size: 14px; margin-bottom: 12px; overflow: hidden; }
.price { font-size: 24px; font-weight: 900; margin: 12px 0; }
.price-big { font-size: 42px; font-weight: 900; margin: 12px 0; }
.price-period { font-size: 16px; font-weight: 600; color: var(--muted); }
.membership-card { border: 2px solid var(--green); }

/* BENEFITS */
.benefits-list { list-style: none; padding: 0; margin: 12px 0; }
.benefits-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: #444; }
.benefits-list li:last-child { border-bottom: 0; }
.benefits-list li::before { content: '\2713'; color: var(--green); font-weight: 900; margin-right: 10px; }

/* STEPS */
.step-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: #eef1e8; border-radius: var(--radius); padding: 20px; }
.step strong { display: block; margin-bottom: 8px; font-size: 15px; }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; background: rgba(7,20,33,0.75); z-index: 200; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; background: var(--cream); border-radius: var(--radius); padding: 28px; position: relative; }
.modal-box.auth-modal-box { width: min(840px, 100%); min-height: 500px; padding: 0; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { font-size: 22px; }
.close { font-size: 28px; border: 0; background: transparent; cursor: pointer; color: var(--navy); line-height: 1; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
.close:hover { background: var(--line); }

/* FORM */
form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
form label { font-size: 12px; font-weight: 800; display: flex; flex-direction: column; gap: 6px; }
form input, form select, form textarea { border: 1px solid #d8dee4; background: var(--white); border-radius: 8px; padding: 11px 14px; color: var(--navy); font: inherit; font-size: 14px; }
form input:focus, form select:focus { outline: 2px solid var(--green); outline-offset: -1px; }
form .full { grid-column: 1 / -1; }
#notice { display: none; margin: 12px 0; padding: 14px; background: #e9f3d8; border-radius: 8px; font-size: 13px; color: #3a5a1b; }
#notice.show { display: block; }

/* STRIPE CARD ELEMENT */
.card-element { border: 1px solid #d8dee4; border-radius: 8px; padding: 12px; background: var(--white); grid-column: 1 / -1; }
#stripeStatus { margin-top: 12px; text-align: center; }

/* AUTH & ADMIN */
.user-name { color: #e8edf2; font-size: 13px; font-weight: 700; }
.btn-admin { background: var(--red); color: var(--white); }
.btn-admin:hover { background: #b84a40; }

.notice-bar { display: none; padding: 12px; border-radius: 8px; font-size: 13px; }
.notice-bar.show { display: block; }

/* ADMIN STATS */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-align: center; }
.stat-number { font-size: 24px; font-weight: 900; color: var(--navy); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-form { background: #f5f7f8; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0 20px; }
.admin-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-records { margin-bottom: 22px; }
.admin-record { min-width: 0; }
.admin-nav { display: flex; gap: 8px; overflow-x: auto; position: sticky; top: 0; z-index: 3; background: var(--white); padding: 10px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-nav button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 20px; padding: 8px 12px; background: #f5f7f8; color: var(--navy); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.admin-nav button:hover { background: var(--green); color: var(--white); }
.admin-section { scroll-margin-top: 60px; margin: 20px 0 28px; }
.admin-search { max-width: 460px; margin: 12px 0; }
.admin-search input { width: 100%; }
.admin-record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.admin-match-form { border-top: 1px solid var(--line); padding-top: 12px; }
.admin-match-form .full { grid-column: 1 / -1; }
.admin-match-row { border-top: 1px solid var(--line); padding: 8px 0; }
.admin-match-row p { margin: 4px 0 8px; }
.tournament-card details { margin: 12px 0; }
.tournament-card summary { cursor: pointer; font-weight: 700; }
.tournament-entries { padding-left: 20px; }
.tournament-matches { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.tournament-matches p { margin: 8px 0; }
form textarea { resize: vertical; }
form select[multiple] { min-height: 120px; }

/* FOOTER */
.footer { background: var(--navy); color: #dbe4eb; padding: 32px 5%; font-size: 12px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 60px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav { gap: 10px; }
  .nav a { font-size: 11px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding: 50px 5% 40px; gap: 24px; }
  .card { padding: 14px; }
  .store-cover { height: 100px; font-size: 13px; }
  .book-cover { height: 95px; font-size: 13px; }
}
@media (max-width: 640px) {
  .nav { display: none; flex-direction: column; width: 100%; gap: 12px; padding: 12px 0; }
  .nav.open { display: flex; }
  .hamburger { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .step-list { grid-template-columns: 1fr; gap: 10px; }
  .hero { padding: 24px 4% 20px; gap: 14px; }
  .hero-content { max-width: 100%; }
  .hero h1 { font-size: clamp(26px, 7vw, 34px); }
  .hero p { font-size: 13px; margin-bottom: 18px; }
  .hero-cta { flex-direction: column; gap: 10px; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .hero-card { padding: 14px; }
  .hero-date { font-size: 26px; }
  .header { align-items: center; padding: 8px 4%; gap: 8px; }
  .header-actions { gap: 6px; }
  .brand-name { font-size: 12px; }
  .brand-sub { display: none; }
  .btn-sm { padding: 6px 10px; font-size: 11px; }
  .section { margin: 36px 0; }
  .section h2 { font-size: 22px; }
  .card { padding: 12px; }
  .card h3 { font-size: 14px; margin: 6px 0 4px; }
  .muted { font-size: 12px; }
  .big-number { font-size: 24px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .store-cover { height: 80px; font-size: 12px; padding: 6px; margin-bottom: 8px; }
  .book-cover { height: 75px; font-size: 12px; padding: 8px; margin-bottom: 8px; }
  .price { font-size: 18px; margin: 8px 0; }
  .price-big { font-size: 32px; }
  .tag { font-size: 9px; padding: 4px 8px; }
  .step { padding: 14px; }
  .filters { flex-direction: column; gap: 8px; }
  .filters select, .filters input { min-width: 0; width: 100%; }
  form { grid-template-columns: 1fr; gap: 10px; }
  form .full { grid-column: auto; }
  .admin-match-form .full { grid-column: auto; }
  .admin-record-head { flex-direction: column; }
  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 20px 4%; }
  main { padding: 0 4%; }
}

/* Public home refresh */
:root {
  --green-dark: #4c6a22;
  --surface: #fff;
  --shadow-card: 0 14px 36px rgba(16, 36, 58, 0.07);
}
.header { padding-top: 12px; padding-bottom: 12px; }
.hero { min-height: 430px; padding-top: 76px; padding-bottom: 76px; background: radial-gradient(circle at 82% 18%, rgba(183,217,107,.18), transparent 25%), linear-gradient(118deg, #0d2034 0%, #173c52 68%, #315c56 100%); }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: 3%; top: -34%; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,255,255,.025), 0 0 0 72px rgba(255,255,255,.02); pointer-events: none; }
.hero-content, .hero-card { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -2px; }
.hero-card { border-radius: 16px; padding: 30px; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.17); box-shadow: 0 24px 60px rgba(0,0,0,.16); }
.hero-card .tag { background: rgba(183,217,107,.16); color: #d7f69a; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 34px; color: #c9d5df; font-size: 12px; }
.hero-highlights b { color: var(--green); margin-right: 6px; }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: -28px 0 58px; position: relative; z-index: 4; }
.quick-links a { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 16px 18px; color: var(--navy); text-decoration: none; background: #fff; border: 1px solid rgba(16,36,58,.07); border-radius: 12px; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.quick-links a:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(16,36,58,.12); }
.quick-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #edf3df; color: var(--green-dark); font-size: 12px; font-weight: 900; }
.quick-links b, .quick-links small { display: block; }
.quick-links b { font-size: 14px; }
.quick-links small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-arrow { margin-left: auto; font-size: 19px; color: #8995a0; }
.section { margin: 72px 0; }
.section-kicker { display: block; margin-bottom: 8px; color: var(--green-dark); font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
.section h2 { font-size: clamp(27px, 3vw, 36px); letter-spacing: -.7px; }
.section-head { margin-bottom: 26px; }
.section-link { color: var(--navy); text-decoration: none; font-size: 13px; font-weight: 800; }
.section-link span { color: var(--green-dark); margin-left: 5px; }
.section-link:hover { text-decoration: underline; }
.card { border-radius: 12px; box-shadow: var(--shadow-card); }
.tournament-card { position: relative; padding: 22px; border-top: 3px solid var(--green); }
.tournament-card h3 { margin-top: 14px; font-size: 19px; }
.tournament-card .btn { margin-top: 12px; }
.tournament-card details { padding: 10px 12px; background: #f7f8f5; border-radius: 8px; }
.tournament-card summary { font-size: 12px; }
.tournament-card .tag { margin-bottom: 3px; }
.ranking-section { padding: 34px; border-radius: 18px; background: #edf1e8; }
.ranking-section .table-wrap { box-shadow: 0 8px 26px rgba(16,36,58,.05); }
.ranking-section th { background: #f5f7f3; }
.ranking-section tbody tr:first-child td:first-child b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--green); }
.filters select, .filters input { border-radius: 9px; }
.results-list { margin-top: 20px; }
.results-list .result-card { display: inline-block; vertical-align: top; width: min(100%, 360px); margin: 10px 10px 0 0; }
.challenge { border-left: 0; border-top: 3px solid var(--green); }
.how-section { padding: 30px 0; }
.step { border: 1px solid rgba(16,36,58,.06); background: #fff; box-shadow: var(--shadow-card); border-radius: 12px; }
#tienda .card { padding: 20px; }
#tienda .book-cover { height: 150px; border-radius: 10px; background: linear-gradient(145deg, #153754, #77928c); }
#tienda .price { color: var(--green-dark); }
.membership-feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding: clamp(26px, 5vw, 56px); overflow: hidden; border-radius: 20px; background: radial-gradient(circle at 85% 20%, rgba(183,217,107,.14), transparent 26%), var(--navy); color: #fff; }
.membership-copy h2 { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; margin: 8px 0 16px; }
.membership-copy h2 span { color: var(--green); }
.membership-copy > p { max-width: 380px; color: #ccd6df; }
.membership-copy .section-kicker { color: var(--green); }
.membership-copy .benefits-list { max-width: 420px; }
.membership-copy .benefits-list li { color: #e4e9ed; border-color: rgba(255,255,255,.13); }
.membership-copy .benefits-list li::before { color: var(--green); }
.membership-plan { padding: 28px; border-radius: 15px; background: #fff; color: var(--navy); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.membership-plan .tag { margin-bottom: 12px; }
.membership-plan .price-period { color: #6d7885; }
.footer a { color: #dbe4eb; text-decoration: none; }
.footer a:hover { color: var(--green); }

/* Dedicated administration page */
.admin-page { min-height: 100vh; background: #f2f5f7; }
.admin-page .header { position: sticky; top: 0; z-index: 100; }
.admin-brand { text-decoration: none; color: #fff; }
.admin-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-header-actions #authButtons { display: flex; align-items: center; gap: 10px; }
.admin-shell { max-width: 1480px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 54px) 70px; }
.admin-page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 12px 0 26px; }
.admin-page-heading h1 { margin: 4px 0; font-size: clamp(30px, 4vw, 42px); letter-spacing: -1px; }
.admin-page-heading p { max-width: 700px; color: var(--muted); }
.admin-page #adminContent { padding: 24px; border: 1px solid #e1e6e9; border-radius: 16px; background: #fff; box-shadow: var(--shadow-card); }
.admin-page .admin-nav { top: 70px; border-radius: 10px; padding: 12px 0; }
.admin-page .admin-section { padding: 10px 0 20px; }
.admin-page .admin-section > h3 { font-size: 22px; margin-bottom: 8px; }
.admin-page .admin-form { border-radius: 12px; }
.admin-page .admin-record { box-shadow: 0 5px 18px rgba(16,36,58,.045); }
.admin-page .admin-record:hover { transform: none; }
.admin-page .table-wrap { box-shadow: 0 5px 18px rgba(16,36,58,.04); }
.admin-page .admin-stats { gap: 10px; }
.admin-page .stat-card { min-width: 0; border-radius: 12px; background: #f9fafb; text-align: left; }
.admin-page .stat-number { font-size: 23px; }
.admin-page .stat-label { text-transform: none; letter-spacing: 0; font-size: 11px; }
.admin-welcome { margin: 0 0 22px; padding: 22px; border-radius: 15px; background: linear-gradient(110deg, #f3f7e9, #f8faf6); }
.admin-welcome h2 { margin: 3px 0; font-size: 22px; letter-spacing: -.4px; }
.admin-welcome > div:first-child > p { color: var(--muted); font-size: 12px; }
.admin-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.admin-quick-actions button { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; padding: 12px; border: 1px solid #e1e8d4; border-radius: 10px; background: #fff; color: var(--navy); text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.admin-quick-actions button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,36,58,.08); }
.admin-quick-actions button > span { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #edf3df; color: var(--green-dark); font-size: 10px; font-weight: 900; }
.admin-quick-actions b { font-size: 11px; }
.admin-quick-actions small { color: var(--muted); font-size: 10px; }
.admin-section-help { margin: -2px 0 14px; color: var(--muted); font-size: 12px; }
.admin-order-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-order-tools .admin-section-help { margin: 0; }
.admin-order-sync-message { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.admin-form-title { margin: 0; font-size: 15px; }
.admin-level-select { min-width: 0; margin: 0; padding: 12px; border: 1px solid #dfe5e9; border-radius: 9px; }
.admin-level-select legend { padding: 0 5px; font-size: 12px; font-weight: 800; }
.admin-level-select > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.admin-level-select > div { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-page .admin-level-select label { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.admin-level-select input { accent-color: var(--green-dark); }
.admin-empty-state { grid-column: 1 / -1; padding: 24px; border: 1px dashed #cbd4da; border-radius: 12px; background: #fafbfc; }
.admin-empty-state b { font-size: 14px; }
.admin-empty-state p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.admin-history { margin: 16px 0; }
.admin-history summary { cursor: pointer; font-weight: 800; padding: 12px; border-radius: 8px; background: #f5f7f8; }
.admin-loading { padding: 50px 20px; text-align: center; color: var(--muted); }
.admin-load-error { padding: 24px; border: 1px solid #efc5bf; border-radius: 12px; background: #fff5f3; color: #8e3028; }
.admin-load-error p { margin: 0 0 16px; }
.btn-danger { background: #f8e8e5; color: #8e3028; }
.btn-danger:hover { background: #f1d3ce; }
@media (max-width: 760px) {
  .quick-links { grid-template-columns: 1fr; margin-top: 18px; }
  .hero { padding: 48px 5% 42px; }
  .hero-highlights { gap: 10px 16px; }
  .membership-feature { grid-template-columns: 1fr; }
  .ranking-section { padding: 22px 14px; }
  .admin-page-heading { align-items: flex-start; flex-direction: column; }
  .admin-page #adminContent { padding: 16px; }
  .payment-return-notice { align-items: flex-start; flex-direction: column; margin: 12px 4% 0; }
  .payment-return-notice small { margin-inline-start: 0; }
  .language-picker { min-width: 88px; }
  .admin-order-tools { align-items: flex-start; flex-direction: column; }
  .admin-header-actions { justify-content: flex-end; }
  .challenge-steps { grid-template-columns: 1fr; }
  .challenge-preview-grid { grid-template-columns: 1fr; }
  .admin-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .brand { direction: rtl; }
html[dir="rtl"] .hero-card,
html[dir="rtl"] .membership-plan { text-align: right; }
html[dir="rtl"] .nav,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .admin-header-actions { direction: rtl; }
html[dir="rtl"] .admin-quick-actions button { text-align: right; }
html[dir="rtl"] .admin-record-head { direction: rtl; }
@media (max-width: 1080px) {
  .header { padding-left: 4%; padding-right: 4%; }
  .header .nav { display: none; flex-direction: column; width: 100%; gap: 12px; padding: 8px 0; }
  .header .nav.open { display: flex; }
  .header .hamburger { display: flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .modal-box.auth-modal-box { grid-template-columns: 1fr; min-height: 0; max-height: 92vh; overflow-y: auto; }
  .auth-visual { min-height: 185px; padding: 26px; }
  .auth-logo { top: 16px; left: 22px; width: 54px; height: 54px; }
  .brand-logo { width: 44px; height: 44px; flex-basis: 44px; }
  .auth-eyebrow { top: 38px; left: 86px; font-size: 8px; }
  .auth-visual h2 { max-width: 270px; margin-top: 50px; font-size: 27px; }
  .auth-visual p { max-width: 290px; font-size: 11px; }
  .auth-decoration { top: 60px; right: -85px; width: 200px; height: 200px; }
  .auth-content { padding: 25px 24px 28px; }
  .auth-content h2 { font-size: 25px; }
  .auth-close { color: #fff; }
  .challenge-heading-actions { width: 100%; justify-content: space-between; }
  .challenge-heading-actions .btn { flex: 0 0 auto; }
  .challenge-load-error { align-items: stretch; flex-direction: column; }
  .admin-header-actions > .btn { display: none; }
  .admin-header-actions #authButtons { gap: 6px; }
  .admin-header-actions .user-name { display: none; }
  .admin-page .header { padding-left: 4%; padding-right: 4%; }
  .membership-plan { padding: 20px; }
  .admin-quick-actions { grid-template-columns: 1fr; }
  .admin-welcome { padding: 16px; }
}
