/* Veronawalk Sports — court reservation app */
:root {
  /* Squarespace site palette */
  --accent: hsl(344, 94%, 51%);
  --accent-hover: hsl(344, 94%, 44%);
  --accent-soft: hsl(344, 94%, 96%);
  --dark: hsl(240, 3%, 23%);
  --light: hsl(210, 3%, 88%);
  --bg: hsl(0, 0%, 98%);
  --card: #ffffff;
  --text: hsl(0, 0%, 13%);
  --muted: hsl(240, 3%, 40%);
  --line: hsl(210, 3%, 88%);
  --good: hsl(152, 45%, 35%);
  --bad: hsl(344, 70%, 45%);
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--dark);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Header — white bar + logo like the club site */
header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

header.site .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: 1140px;
  margin: 0 auto;
}

header.site a { color: var(--dark); text-decoration: none; }
header.site a:hover { color: var(--accent); text-decoration: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(220px, 55vw);
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}

.brand-text span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

nav.main {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav.main a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
  opacity: 0.9;
}

nav.main a:hover { color: var(--accent); opacity: 1; }

/* Buttons — Squarespace rounded solid accent */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn.secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn.danger { background: var(--bad); }
.btn.small { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.card-link {
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(247, 24, 95, 0.12);
  text-decoration: none;
}

.card-link h2 { color: var(--dark); }
.card-link:hover h2 { color: var(--accent); }

.grid { display: grid; gap: 20px; }
.grid.cols { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Forms */
label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin: 14px 0 6px;
  color: var(--dark);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

/* Messages */
.msg {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  display: none;
  font-weight: 400;
}

.msg.show { display: block; }
.msg.ok { background: hsl(152, 45%, 95%); color: var(--good); border: 1px solid hsl(152, 35%, 80%); }
.msg.err { background: var(--accent-soft); color: var(--bad); border: 1px solid hsl(344, 60%, 85%); }

.muted { color: var(--muted); font-weight: 300; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--light);
  color: var(--dark);
}

.tag.admin { background: var(--accent-soft); color: var(--accent-hover); }

table { width: 100%; border-collapse: collapse; }
.roster-table { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.roster-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: 0 1px 0 var(--line); }
.roster-actions { white-space: nowrap; }
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th { font-weight: 500; color: var(--dark); }

/* Booking grid */
.book { overflow: auto; }
.book table { min-width: 520px; }

.slot {
  height: 44px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: hsl(152, 45%, 95%);
  color: var(--good);
  font-size: 0.8rem;
  font-weight: 500;
  user-select: none;
}

.slot:hover { outline: 2px solid var(--accent); }
.slot.taken { background: var(--light); color: var(--muted); cursor: not-allowed; }
.slot.mine { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.slot.event { background: hsl(45, 90%, 94%); color: hsl(35, 60%, 35%); cursor: not-allowed; }
.slot.picked { background: #e0e7ff; color: #3730a3; font-weight: 600; outline: 2px solid #6366f1; }
.slot.sel { background: var(--accent); color: #fff; font-weight: 600; }

.time-col {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
  padding-right: 8px;
}

.center { text-align: center; }
.hide { display: none; }

/* Modal dialog (member edit) */
dialog.member-dlg {
  position: fixed;
  inset: unset;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
dialog.member-dlg::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

/* Tabs */
.tabs, .sign-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

.tabs button, .sign-tab {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
}

.tabs button.active, .sign-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sign-panel { margin-top: 12px; }
.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* Page intro band */
.page-intro {
  margin-bottom: 8px;
}

.page-intro h1 { margin-bottom: 0.35rem; }

/* Footer */
footer.site {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 24px 20px;
  margin-top: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

footer.site a { color: var(--accent); font-weight: 500; }

@media (max-width: 720px) {
  .brand img { height: 56px; }
  header.site .header-inner { flex-wrap: wrap; }
  nav.main { width: 100%; justify-content: flex-start; gap: 14px; }
  body { font-size: 16px; }
}
