[hidden] { display: none !important; }
:root {
  --bg: #f4f1ea; --panel: #ffffff; --ink: #1f2a1d; --muted: #6b6f63; --line: #ddd8cc;
  --brand: #3d5a2a; --brand-ink: #ffffff; --accent: #c8741f; --danger: #b3261e; --ok: #2e7d32; --pending: #e08a00;
  --radius: 10px; --shadow: 0 2px 10px rgba(0,0,0,.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
.muted { color: var(--muted); font-size: .9rem; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.2em; }

.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: .55rem .9rem; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { color: var(--danger); border-color: #e7b9b5; }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.btn.block { width: 100%; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.check { display: flex; gap: .4rem; align-items: center; font-size: .9rem; margin-bottom: .6rem; }

/* auth + club list */
.center { min-height: 100%; display: grid; place-items: center; padding: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; width: min(420px, 100%); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem; color: var(--brand); }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; }
.tabs button { flex: 1; border: 0; background: transparent; padding: .5rem; border-bottom: 2px solid var(--line); cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button.on { border-color: var(--brand); color: var(--ink); }
.page { max-width: 720px; margin: 0 auto; padding: 1rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; background: var(--ink); color: #fff; }
.topbar a, .topbar button { color: #fff; }
.topbar .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkbtn { background: none; border: 0; cursor: pointer; padding: .25rem .4rem; font-weight: 600; text-decoration: none; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.list li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.list li a { font-weight: 700; text-decoration: none; }
.pill { font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; background: #ece8dd; color: var(--muted); text-transform: capitalize; }

/* map screen */
.mapwrap { position: fixed; inset: 0; display: flex; flex-direction: column; }
#map { flex: 1; }
.fabs { position: absolute; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; z-index: 500; }
.fab { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; font-size: 1.35rem; position: relative; }
.fab.primary { background: var(--brand); color: #fff; }
.fab.on { outline: 3px solid var(--accent); }
.fab .badge { position: absolute; top: -4px; right: -4px; background: var(--pending); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 99px; padding: 1px 6px; }
.fab-label { position: absolute; right: 62px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.72); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.hint { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(31,42,29,.92); color: #fff; padding: .5rem .9rem; border-radius: 99px; z-index: 600; font-size: .9rem; display: flex; gap: .6rem; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.hint button { background: #fff; color: var(--ink); border: 0; border-radius: 99px; padding: .2rem .7rem; font-weight: 700; cursor: pointer; }
.gps { position: absolute; left: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); border-radius: 8px; padding: .3rem .6rem; font-size: .8rem; z-index: 500; box-shadow: var(--shadow); }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 75%; overflow: auto; background: var(--panel); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px rgba(0,0,0,.25); z-index: 700; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .2s ease; }
.sheet.open { transform: translateY(0); }
.sheet .close { position: absolute; top: .5rem; right: .6rem; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
@media (min-width: 900px) { .sheet { left: auto; right: 12px; bottom: 12px; top: 64px; width: 400px; max-height: none; border-radius: 14px; transform: translateX(110%); } .sheet.open { transform: translateX(0); } .fabs { right: 424px; } }

.check-box { border-radius: 8px; padding: .5rem .7rem; margin-bottom: .7rem; font-size: .9rem; }
.check-box.ok { background: #e7f3e8; color: var(--ok); }
.check-box.bad { background: #fbe9e7; color: var(--danger); }
.req { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; margin-bottom: .6rem; }
.req h4 { margin: 0 0 .25rem; font-size: .95rem; }
.req .row { margin-top: .5rem; }
.status-pending { color: var(--pending); font-weight: 700; }
.status-approved { color: var(--ok); font-weight: 700; }
.status-rejected, .status-withdrawn { color: var(--muted); font-weight: 700; }
.legend { display: grid; grid-template-columns: auto 1fr; gap: .35rem .6rem; align-items: center; font-size: .9rem; }
.sw { width: 18px; height: 12px; border-radius: 3px; display: inline-block; border: 2px solid; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }

.stand-icon { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.stand-label { background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 4px; padding: 1px 5px; font-size: 11px; font-weight: 600; box-shadow: none; }
.stand-label::before { display: none; }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(26,115,232,.35), 0 1px 4px rgba(0,0,0,.5); }
.leaflet-popup-content { margin: .7rem .9rem; }
.pop h4 { margin: 0 0 .2rem; }
.pop .row { margin-top: .5rem; }

#toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; opacity: 0; transition: all .2s; z-index: 2000; pointer-events: none; max-width: calc(100% - 24px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--danger); }
