/* Jain Gymkhana padel booking — shared styles.
   Palette follows padelmind.in: navy ground, lime action, Fraunces display. */

:root {
  --navy: #0B1B33;
  --navy-2: #0E2240;
  --navy-3: #122A4D;
  --line: #22406b;
  --ink: #F3F7FE;
  --mut: #94A8C7;
  --lime: #A3E635;
  --lime-d: #84cc16;
  --lime-ink: #12300a;
  --danger: #F87171;
  --warn: #FBBF24;
  --ok: #34D399;
  --disp: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body { padding-bottom: env(safe-area-inset-bottom); }

a { color: var(--lime); }

.wrap { max-width: 760px; margin: 0 auto; }

/* ------------------------------------------------------------------ header */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 27, 51, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; max-width: 760px; margin: 0 auto;
}
.crest {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  background: linear-gradient(150deg, var(--lime), var(--lime-d));
  color: var(--lime-ink); display: grid; place-items: center;
  font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: -0.5px;
}
.club-name {
  font-family: var(--disp); font-size: 17px; font-weight: 600; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.club-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------------ button */

button { font-family: inherit; }

.btn {
  border: 0; border-radius: 10px; padding: 11px 18px;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: var(--lime); color: var(--lime-ink);
  transition: filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-block { width: 100%; display: block; }

/* -------------------------------------------------------------------- card */

.card {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin: 12px 16px;
}
.card h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mut);
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--mut); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.lime { color: var(--lime); }

/* ------------------------------------------------------------------ inputs */

label.field { display: block; margin-bottom: 12px; }
label.field span {
  display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mut); margin-bottom: 5px; font-weight: 600;
}
input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  background: var(--navy-3); border: 1px solid var(--line); color: var(--ink);
  font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); }

/* ---------------------------------------------------------------- date bar */

.datebar {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.datebar::-webkit-scrollbar { display: none; }
.datechip {
  flex: 0 0 auto; min-width: 62px; padding: 8px 10px; border-radius: 10px;
  background: var(--navy-2); border: 1px solid var(--line);
  text-align: center; cursor: pointer;
}
.datechip .dow { font-size: 10px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.datechip .dnum { font-size: 16px; font-weight: 700; margin-top: 2px; }
.datechip.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.datechip.on .dow { color: rgba(18,48,10,.75); }

/* ----------------------------------------------------------------- legend */

.legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 16px 10px; }
.legend div { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--mut); }
.swatch { width: 13px; height: 13px; border-radius: 4px; }

/* ------------------------------------------------------------------- grid */

.gridhead {
  display: grid; gap: 6px; padding: 8px 16px;
  position: sticky; z-index: 20; top: 63px;
  background: var(--navy); border-bottom: 1px solid var(--line);
}
.gridhead div {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--ink);
}
.gridhead .spacer { }

.grid { padding: 4px 16px 140px; }
.grow { display: grid; gap: 6px; align-items: center; margin-bottom: 6px; }
.time { font-size: 11px; color: var(--mut); font-weight: 600; text-align: right; padding-right: 4px; }

.cell {
  border-radius: 10px; min-height: 46px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; user-select: none; text-align: center;
}
.cell .price { font-size: 10px; font-weight: 600; opacity: .85; }
.cell.open { background: rgba(163, 230, 53, .10); color: var(--lime); border-color: rgba(163, 230, 53, .25); }
.cell.open:hover { background: rgba(163, 230, 53, .18); }
.cell.sel { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.cell.booked { background: rgba(34, 64, 107, .45); color: var(--mut); cursor: not-allowed; }
.cell.mine { background: rgba(52, 211, 153, .16); color: var(--ok); border-color: rgba(52, 211, 153, .4); cursor: default; }
.cell.blocked { background: rgba(248, 113, 113, .12); color: var(--danger); cursor: not-allowed; }
.cell.past { background: rgba(34, 64, 107, .18); color: rgba(148, 168, 199, .45); cursor: not-allowed; }

/* ------------------------------------------------------------------ notice */

.notice {
  margin: 12px 16px; padding: 11px 14px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid var(--warn); background: rgba(251, 191, 36, .1); color: var(--warn);
}
.notice.err { border-color: var(--danger); background: rgba(248, 113, 113, .1); color: var(--danger); }
.notice.ok { border-color: var(--ok); background: rgba(52, 211, 153, .1); color: var(--ok); }

/* ---------------------------------------------------------------- bottombar */

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--lime); color: var(--lime-ink);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
}
.bottombar .t1 { font-size: 13px; font-weight: 800; }
.bottombar .t2 { font-size: 11.5px; opacity: .75; }
.bottombar .btn { background: var(--lime-ink); color: var(--lime); }

/* -------------------------------------------------------------------- sheet */

.sheet-bg {
  position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 20, .72);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 620px; background: var(--navy-2);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.sheet h2 { font-family: var(--disp); font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.sheet .lede { font-size: 12.5px; color: var(--mut); margin: 0 0 16px; }

/* ------------------------------------------------------------------ toggle */

.toggle {
  width: 42px; height: 24px; border-radius: 20px; border: 0;
  background: var(--line); position: relative; cursor: pointer; flex: 0 0 42px;
}
.toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left .18s;
}
.toggle.on { background: var(--lime); }
.toggle.on .knob { left: 21px; }

/* ------------------------------------------------------------------- lists */

.tnc { margin: 0; padding-left: 18px; }
.tnc li { font-size: 12px; color: var(--mut); margin-bottom: 5px; line-height: 1.5; }

.bk { border-bottom: 1px solid var(--line); padding: 12px 0; }
.bk:last-child { border-bottom: 0; }
.bk .ref { font-size: 11px; color: var(--mut); letter-spacing: .05em; }
.pill {
  display: inline-block; padding: 3px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.pill.confirmed { background: rgba(52, 211, 153, .16); color: var(--ok); }
.pill.cancelled { background: rgba(248, 113, 113, .16); color: var(--danger); }

.center { text-align: center; }
.spin { padding: 40px 16px; text-align: center; color: var(--mut); font-size: 13px; }

/* Wide tables scroll inside their own box rather than pushing the page sideways. */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tblwrap table.tbl { min-width: 560px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--mut); padding: 8px 6px; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 9px 6px; border-bottom: 1px solid rgba(34, 64, 107, .5); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kpi { background: var(--navy-3); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .v { font-size: 20px; font-weight: 800; font-family: var(--disp); }
.kpi .k { font-size: 10.5px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

.footer { padding: 26px 16px 34px; text-align: center; font-size: 11px; color: var(--mut); }
