/* KIMSHEALTH All Kerala Badminton Tournament 2026–27 — shared styles */
:root {
  --red: #c8102e;
  --red-dark: #8e0b20;
  --gold: #f5b800;
  --ink: #1b1b1f;
  --muted: #5b5d66;
  --line: #e6e6ea;
  --bg: #ffffff;
  --bg-soft: #f7f7f9;
  --radius: 14px;
  --max: 1080px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: 0.2px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 18px; font-weight: 900;
}
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--red); }
.nav .links { display: flex; gap: 20px; }
@media (max-width: 760px) { .nav .links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--red);
  background: var(--red); color: #fff !important; font-weight: 700; text-decoration: none; font-size: 16px;
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--red) !important; }
.btn.ghost:hover { background: #fff0f2; }
.btn.light { background: #fff; border-color: #fff; color: var(--red) !important; }
.btn.light:hover { background: #ffe9ec; border-color: #ffe9ec; }
.btn[aria-disabled="true"] { opacity: 0.9; cursor: default; }
.btn.small { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, 0.16), transparent 60%),
              linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero .eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; background: rgba(255,255,255,0.14); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; margin: 18px 0 10px; letter-spacing: -0.5px; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); max-width: 640px; margin: 0 0 26px; color: rgba(255,255,255,0.92); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { font-size: 14px; color: rgba(255,255,255,0.85); margin-top: 14px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.fact { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius); padding: 16px; }
.fact .k { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.8); font-weight: 700; }
.fact .v { font-size: 18px; font-weight: 800; margin-top: 4px; line-height: 1.25; }
.fact .s { font-size: 14px; color: rgba(255,255,255,0.85); margin-top: 2px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } }

/* Sections */
section.block { padding: 56px 0; }
section.block.soft { background: var(--bg-soft); }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 8px; letter-spacing: -0.3px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 680px; }

/* Fees */
.fees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fee { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.fee .name { font-weight: 700; color: var(--muted); }
.fee .price { font-size: 34px; font-weight: 900; margin: 6px 0 2px; }
.fee .per { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .fees { grid-template-columns: 1fr; } }

/* Events */
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.group h3 { margin: 0; background: var(--ink); color: #fff; font-size: 15px; padding: 12px 16px; letter-spacing: 0.3px; }
.group h3 small { color: rgba(255,255,255,0.7); font-weight: 600; }
.group ul { list-style: none; margin: 0; padding: 8px 16px 12px; }
.group li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.group li:last-child { border-bottom: 0; }
@media (max-width: 900px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .groups { grid-template-columns: 1fr; } }

/* Rules list */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rule { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.rule h3 { margin: 0 0 6px; font-size: 17px; }
.rule p { margin: 0; color: var(--muted); }
@media (max-width: 720px) { .rules { grid-template-columns: 1fr; } }

/* Contact */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.contact .who { font-weight: 800; }
.contact .role { color: var(--muted); font-size: 14px; }
.contact a { font-weight: 700; font-size: 18px; text-decoration: none; display: inline-block; margin-top: 6px; }
@media (max-width: 720px) { .contacts { grid-template-columns: 1fr; } }

/* Policy pages */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 40px 0 28px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.4px; }
.page-head p { margin: 0; color: var(--muted); }
.prose { max-width: 760px; padding: 32px 0 64px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; }
.prose p, .prose li { color: #2c2d33; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.callout { border-left: 4px solid var(--red); background: #fff5f6; padding: 14px 16px; border-radius: 8px; margin: 18px 0; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 40px 0 28px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 1.2px; }
.site-footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 28px; padding-top: 18px; color: rgba(255,255,255,0.6); }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

mark { background: #fff3b0; padding: 0 4px; border-radius: 4px; }

/* ---------------- App (registration + admin) ---------------- */
.app { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }
.app.wide { max-width: 1200px; }
.app h1 { font-size: 26px; margin: 6px 0 4px; letter-spacing: -0.3px; }
.app h2 { font-size: 20px; margin: 28px 0 10px; }
.app h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; margin-bottom: 14px; }
.card.soft { background: var(--bg-soft); }
.card.warn { border-color: #f1c24a; background: #fffaf0; }
.card.alert { border-color: #f3b4bd; background: #fff5f6; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid #cfd0d6; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200, 16, 46, 0.35); border-color: var(--red); }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { flex: 1; min-width: 70px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; text-align: center; padding: 10px 12px; border: 1px solid #cfd0d6; border-radius: 10px; cursor: pointer; font-weight: 600; }
.choice input:checked + span { border: 2px solid var(--red); background: #fff0f2; color: var(--red-dark); padding: 9px 11px; }
.choice input:focus-visible + span { outline: 2px solid var(--red); }

.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--ink) !important; border: 1px solid #cfd0d6; }
.btn.secondary:hover { background: var(--bg-soft); }
.btn.tiny { padding: 6px 12px; font-size: 13px; border-width: 1px; }
.btn.green { background: #1f7a3f; border-color: #1f7a3f; }
.btn.green:hover { background: #17602f; border-color: #17602f; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--red); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eceef2; color: #3b3d45; white-space: nowrap; }
.badge.confirmed, .badge.verified, .badge.paid { background: #e3f4e8; color: #17602f; }
.badge.checking, .badge.submitted, .badge.pending, .badge.partial { background: #fff1d1; color: #7a4b00; }
.badge.unpaid, .badge.not_found, .badge.rejected { background: #fde7ea; color: #8e0b20; }
.badge.cancelled, .badge.refunded { background: #eceef2; color: #5b5d66; }
.badge.venue { background: #e7f1fb; color: #0c447c; }

.ev-group { margin-bottom: 16px; }
.ev-group h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.ev { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.ev.on { border: 2px solid var(--red); background: #fff7f8; padding: 11px; }
.ev.disabled { opacity: 0.55; cursor: not-allowed; }
.ev input { width: 20px; height: 20px; accent-color: var(--red); }
.ev .name { flex: 1; font-weight: 600; }
.partner-box { border: 1px dashed #cfd0d6; border-radius: 10px; padding: 12px; margin: -2px 0 12px; background: var(--bg-soft); }
.result { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 6px; }

.list-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding-top: 10px; border-top: 2px solid var(--ink); margin-top: 6px; }
.qr { width: 220px; height: 220px; margin: 10px auto; display: block; image-rendering: pixelated; }
.upi-box { text-align: center; }
.copy { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-soft); padding: 4px 8px; border-radius: 6px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 50; max-width: 92vw; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: #8e0b20; }
.demo-bar { background: #fff3b0; color: #5a4300; text-align: center; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.err-text { color: #b00020; font-size: 14px; margin-top: 6px; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 16px 0; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.cur { color: var(--red); border-bottom-color: var(--red); }
.tabs .count { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 12px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 800; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: var(--bg-soft); position: sticky; top: 0; font-size: 13px; }
table.data tr:last-child td { border-bottom: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters > * { width: auto; min-width: 160px; flex: 1; }
