:root {
  --green-dark: #0d2114;
  --green-mid: #1e4a28;
  --green-light: #3a7a50;
  --green-pale: #dfeee4;
  --cream: #f6f2eb;
  --gold: #c9a227;
  --gold-light: #e8c840;
  --maroon: #6b1a1a;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --text-light: #888;
  --border: #c0d4b8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ─────────────────────────────────────── */
.mc-header {
  background: var(--green-dark);
  color: white;
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 4px solid var(--gold);
}

.mc-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  line-height: 1.1;
}

.mc-header .subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 0.3rem;
}

.mc-header .tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.2rem;
  letter-spacing: 0.06em;
}

/* ── COURSE TABS ─────────────────────────────────── */
.course-tabs {
  display: flex;
  justify-content: center;
  background: var(--green-dark);
  border-bottom: 3px solid var(--gold);
  padding: 0 1rem;
}

.course-tab {
  padding: 0.65rem 2rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all 0.2s;
  white-space: nowrap;
}

.course-tab:hover { color: rgba(255,255,255,0.85); }

.course-tab.active {
  color: var(--gold-light);
  border-bottom: 3px solid var(--gold-light);
  background: rgba(255,255,255,0.07);
}

/* ── MAIN CONTENT ───────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ── VIEW TABS ──────────────────────────────────── */
.view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.view-tab {
  padding: 0.65rem 1.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}

.view-tab:hover { color: var(--green-mid); }

.view-tab.active {
  color: var(--green-dark);
  border-bottom: 2px solid var(--green-mid);
  font-weight: 700;
}

/* ── SECTION TITLE ──────────────────────────────── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--green-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── RATING BADGES ──────────────────────────────── */
.rating-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.rating-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  min-width: 110px;
}

.rating-badge .tee-name { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.rating-badge .tee-name.black { color: #1a1a1a; }
.rating-badge .tee-name.blue  { color: #1a4fa0; }
.rating-badge .tee-name.white { color: #888; }
.rating-badge .tee-name.silver{ color: #7a7a7a; }
.rating-badge .tee-name.red   { color: #9b1c1c; }
.rating-badge .rating-val { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--text-dark); }
.rating-badge .slope-val { font-size: 0.72rem; color: var(--text-light); }

/* ── SCORECARD TABLE ────────────────────────────── */
.scorecard-section {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}

.scorecard-header {
  background: var(--green-dark);
  color: white;
  padding: 0.7rem 1.2rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.scorecard-header .nine-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  font-family: 'Source Serif 4', serif;
}

.sc-wrap { overflow-x: auto; }

.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 640px;
}

.sc-table th {
  background: var(--green-dark);
  color: rgba(255,255,255,0.8);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.5rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.sc-table th.lbl { text-align: left; padding-left: 0.8rem; min-width: 110px; }
.sc-table th.tot { background: #051009; color: var(--gold-light); }

.sc-table td {
  text-align: center;
  padding: 0.45rem 0.4rem;
  border-right: 1px solid #e8ece4;
  border-bottom: 1px solid #e8ece4;
  font-variant-numeric: tabular-nums;
}

.sc-table td.lbl { text-align: left; padding-left: 0.8rem; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; min-width: 110px; }
.sc-table td.tot { background: #f0f5ec; font-weight: 600; color: var(--green-dark); }
.sc-table td.topar { text-align: center; font-weight: 600; font-size: 0.85rem; min-width: 44px; }

.sc-table tr.row-black td { background: #1a1a1a; color: #eee; }
.sc-table tr.row-black td.tot { background: #111; }
.sc-table tr.row-blue  td { background: #dceefa; color: #0c3b70; }
.sc-table tr.row-blue  td.tot { background: #c5e0f5; }
.sc-table tr.row-white td { background: #fafafa; color: #555; }
.sc-table tr.row-white td.tot { background: #f0f0f0; }
.sc-table tr.row-silver td { background: #f5f5f5; color: #666; }
.sc-table tr.row-silver td.tot { background: #e8e8e8; }
.sc-table tr.row-red   td { background: #fdf0f0; color: #7a1c1c; }
.sc-table tr.row-red   td.tot { background: #f5dede; }

.sc-table tr.row-par td { background: var(--green-pale); font-weight: 700; color: var(--green-dark); font-size: 0.9rem; }
.sc-table tr.row-par td.tot { background: #cee8d8; }
.sc-table tr.row-hdcp td { background: #faf8f3; font-size: 0.78rem; color: var(--text-mid); }
.sc-table tr.row-hdcp td.tot { background: #f0eee6; }

.sc-table tr.team-divider td {
  padding: 3px 10px;
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: white;
}

.sc-table tr.row-score td { background: white; }
.sc-table tr.row-score td.lbl { font-weight: 400; font-size: 0.78rem; color: var(--text-mid); }
.sc-table tr.row-score td.tot { font-weight: 700; font-size: 0.95rem; }

.sc-table tr.row-score input[type=number] {
  width: 34px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #fffef8;
  -moz-appearance: textfield;
}
.sc-table tr.row-score input[type=number]::-webkit-inner-spin-button,
.sc-table tr.row-score input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.sc-table tr.row-score input[type=number]:focus {
  outline: none;
  border-color: var(--green-mid);
  background: #f0fff4;
}

/* skin winner highlight */
.sc-table td.skin-win { background: rgba(184,150,62,0.18) !important; }

/* ── TEAM SETUP CARDS ────────────────────────────── */
.team-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) { .team-setup-grid { grid-template-columns: 1fr; } }

.team-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ccc;
}

.team-card-header {
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
}

.team-card-header input[type=text] {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  width: 100%;
  outline: none;
  padding-bottom: 2px;
}

.team-card-body { padding: 0.8rem 1rem; }

.player-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.player-row input[type=text], .player-row select, .player-row input[type=number] {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-family: 'Source Serif 4', serif;
  font-size: 0.83rem;
  color: var(--text-dark);
  background: white;
}

.player-row input[type=text]:focus, .player-row select:focus, .player-row input[type=number]:focus {
  outline: none;
  border-color: var(--green-mid);
}

.player-row input[type=number] { width: 52px; text-align: center; -moz-appearance: textfield; }
.player-row input[type=number]::-webkit-inner-spin-button,
.player-row input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }

.hcp-label { font-size: 0.68rem; color: var(--text-light); text-align: right; }

/* ── MATCH SUMMARY ──────────────────────────────── */
.match-summary {
  background: var(--green-dark);
  color: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.summary-item { text-align: center; }
.summary-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); display: block; }
.summary-val { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--gold-light); display: block; line-height: 1.2; }
.summary-val.neutral { color: white; }

/* ── HOLE DIAGRAM CARDS ─────────────────────────── */
.yardage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.hole-card {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.hole-card-header {
  background: var(--green-dark);
  color: white;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hole-card-header .hole-num { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.hole-card-header .hole-par { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--gold-light); }
.hole-card-header .hole-hcp { font-size: 0.68rem; color: rgba(255,255,255,0.55); }

.hole-card-body { padding: 0.6rem 0.8rem; }

.hole-card-body img {
  width: 100%;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.6rem;
  max-height: 160px;
  object-fit: cover;
}

.hole-yards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

.yard-cell {
  text-align: center;
  padding: 3px 2px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.yard-cell .dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin: 0 auto 2px;
}

.yard-cell.c-black .dot { background: #111; }
.yard-cell.c-blue  .dot { background: #1a4fa0; }
.yard-cell.c-white .dot { background: #bbb; border: 1px solid #999; }
.yard-cell.c-silver .dot { background: #999; }
.yard-cell.c-red   .dot { background: #9b1c1c; }

.yard-cell.c-black { color: #111; font-weight: 600; }
.yard-cell.c-blue  { color: #1a4fa0; }
.yard-cell.c-white { color: #777; }
.yard-cell.c-silver{ color: #888; }
.yard-cell.c-red   { color: #9b1c1c; }

.hole-note { font-size: 0.7rem; color: var(--green-mid); font-style: italic; margin-top: 4px; }

/* ── ACTION BUTTONS ─────────────────────────────── */
.actions-row {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  border: 1.5px solid var(--green-mid);
  color: var(--green-mid);
  background: white;
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.15s;
}

.btn:hover { background: var(--green-mid); color: white; }

.btn-primary { background: var(--green-dark); color: white; border-color: var(--green-dark); }
.btn-primary:hover { background: var(--green-mid); border-color: var(--green-mid); }

.btn-danger { border-color: #c0392b; color: #c0392b; }
.btn-danger:hover { background: #c0392b; color: white; }

/* ── SETUP PAGE ─────────────────────────────────── */
.setup-section {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.setup-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.form-field { display: flex; flex-direction: column; gap: 3px; }

.form-field label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.form-field input[type=text],
.form-field input[type=number],
.form-field input[type=date],
.form-field select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: white;
  width: 100%;
}

.form-field input:focus, .form-field select:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(46,107,71,0.12);
}

.player-setup-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--cream);
  border-radius: 6px;
}

.player-setup-row input, .player-setup-row select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  background: white;
}

.player-setup-row input:focus, .player-setup-row select:focus {
  outline: none;
  border-color: var(--green-mid);
}

.team-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.team-block-header {
  padding: 0.5rem 0.8rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.team-block-header input[type=text] {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 700;
  outline: none;
  flex: 1;
}

.team-block-body { padding: 0.6rem 0.8rem; }

/* ── COURSE INFO ─────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.info-card {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 1.1rem;
}

.info-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--green-dark);
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.info-card ul { list-style: none; }
.info-card ul li {
  font-size: 0.8rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-mid);
  display: flex;
  gap: 0.4rem;
}
.info-card ul li:last-child { border-bottom: none; }
.info-card ul li::before { content: '–'; color: var(--gold); flex-shrink: 0; }

/* ── NAV BAR ─────────────────────────────────────── */
.nav-bar {
  background: #081509;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 46px;
  border-bottom: 2px solid var(--gold);
  position: relative;
  z-index: 100;
}
.nav-spacer { flex: 1; }
.nav-mobile-brand {
  display: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  padding: 0 0.5rem 0 0;
}
.nav-link {
  padding: 0.6rem 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232,200,64,0.6);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--gold-light); }
.nav-link.active { color: var(--gold-light); border-bottom-color: var(--gold-light); }

/* Hamburger button — hidden on desktop, shown on mobile */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.6rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── SIDE NAV ─────────────────────────────────────── */
.sidenav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s;
}
.sidenav-overlay-open {
  display: block;
  opacity: 1;
}

.sidenav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100%;
  background: #081509;
  border-right: 2px solid var(--gold);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: left 0.27s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.sidenav-open { left: 0; }

.sidenav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(201,162,39,0.3);
  flex-shrink: 0;
}
.sidenav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.03em;
}
.sidenav-close-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.sidenav-close-btn:hover { color: white; }

.sidenav-links {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  flex: 1;
}
.sidenav-link {
  padding: 0.75rem 1.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232,200,64,0.65);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidenav-link:hover { color: var(--gold-light); background: rgba(255,255,255,0.04); }
.sidenav-link.active { color: var(--gold-light); border-left-color: var(--gold-light); background: rgba(255,255,255,0.06); }

.sidenav-auth {
  padding: 0.75rem 1.2rem 1.5rem;
  border-top: 1px solid rgba(201,162,39,0.3);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sidenav-user {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.2rem;
  word-break: break-word;
}
.sidenav-signout {
  display: inline-block;
  margin-top: 0.25rem;
  width: 100%;
  text-align: center;
}

/* ── TOAST NOTIFICATION ─────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: white;
  background: var(--green-dark);
  border-left: 4px solid var(--gold);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: fadeIn 0.2s ease;
}
.toast.error { background: #6b1a1a; border-color: #c0392b; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── SCHEDULE ───────────────────────────────────── */
.schedule-grid { display: flex; flex-direction: column; gap: 1rem; }

.week-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.week-card.week-current { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold)33; }
.week-card.week-past { opacity: 0.75; }

.week-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--green-dark);
  color: white;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
}
.week-num { font-weight: 700; font-family: 'Playfair Display', serif; font-size: 0.95rem; }
.week-date { color: var(--gold-light); }
.week-course { margin-left: auto; font-style: italic; color: var(--gold-light); }

.week-matches { padding: 0.5rem 0; }

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--green-pale);
  font-size: 0.88rem;
}
.match-row:last-child { border-bottom: none; }
.match-teams { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; flex-wrap: wrap; }
.match-team { font-weight: 600; }
.match-vs { color: var(--text-light); font-size: 0.78rem; flex-shrink: 0; }
.match-controls { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.status-scheduled  { background: var(--green-pale); color: var(--green-mid); }
.status-in-progress { background: #fff3cd; color: #856404; }
.status-complete   { background: #e8f5ed; color: var(--green-dark); }

.btn-score { background: var(--gold); color: white; padding: 0.25rem 0.7rem; font-size: 0.78rem; border-radius: 5px; white-space: nowrap; }
.btn-score:hover { background: var(--green-mid); }
.btn-view { background: var(--green-pale); color: var(--green-dark); padding: 0.25rem 0.7rem; font-size: 0.78rem; border-radius: 5px; white-space: nowrap; }
.btn-preview { background: #e8e8e8; color: #666; padding: 0.25rem 0.7rem; font-size: 0.78rem; border-radius: 5px; white-space: nowrap; }
.btn-preview:hover { background: #d8d8d8; }

/* ── MATCH META ─────────────────────────────────── */
.match-meta-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--green-dark);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.match-teams-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.match-team-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; flex: 1; }
.match-vs-lg { font-size: 0.85rem; color: var(--text-light); }

.hole-tie { background: #fffbea !important; }

.row-pts-total td { padding: 0.3rem 0.2rem; background: #f8f4ed; border-top: 2px solid var(--border); }

/* ── LEADERBOARD ────────────────────────────────── */
.lb-section { }
.lb-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--green-dark); border-bottom: 2px solid var(--gold); padding-bottom: 0.4rem; margin-bottom: 0.75rem; }

.lb-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.lb-table thead tr { background: var(--green-dark); color: white; }
.lb-table thead th { padding: 0.55rem 0.5rem; text-align: center; font-weight: 600; font-size: 0.78rem; }
.lb-table tbody tr { border-bottom: 1px solid var(--border); }
.lb-table tbody tr:hover { background: var(--green-pale); }
.lb-table td { padding: 0.5rem 0.5rem; }

/* ── AUTH NAV ───────────────────────────────────── */
.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.8rem;
}
.auth-user { color: var(--gold-light); font-weight: 500; }
.auth-badge { font-size: 0.65rem; padding: 0.15rem 0.45rem; border-radius: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.auth-badge.admin { background: var(--gold); color: var(--green-dark); }
.btn-logout { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 0.2rem 0.6rem; border-radius: 5px; font-size: 0.75rem; cursor: pointer; }
.btn-logout:hover { background: rgba(255,255,255,0.1); }

/* ── AUTH PAGES ─────────────────────────────────── */
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--green-dark); margin-bottom: 1.25rem; border-bottom: 2px solid var(--gold); padding-bottom: 0.5rem; }
.auth-error { background: #fde8e8; border: 1px solid #e57373; border-radius: 6px; padding: 0.6rem 0.9rem; font-size: 0.85rem; color: #8b1a1a; margin-bottom: 1rem; }
.auth-success { background: var(--green-pale); border: 1px solid var(--green-mid); border-radius: 6px; padding: 0.6rem 0.9rem; font-size: 0.85rem; color: var(--green-dark); margin-bottom: 1rem; }

/* ── HOLE THUMBNAILS ────────────────────────────── */
.hole-thumb-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.75rem;
  margin-bottom: 0.75rem;
}
.hole-thumb {
  flex: 0 0 80px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.hole-thumb:hover { border-color: var(--gold); transform: scale(1.05); }
.hole-thumb img { width: 80px; height: 56px; object-fit: cover; display: block; }
.hole-thumb-label { font-size: 0.62rem; text-align: center; padding: 0.15rem 0; background: var(--green-dark); color: var(--gold-light); }

/* ── LIGHTBOX ───────────────────────────────────── */
/* Desktop: centered popup box */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox-fullscreen {
  background: var(--green-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: min(860px, 92vw);
  max-height: 90vh;
}
.lightbox-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  background: #000;
}
.lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: white;
  font-size: 1.4rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
  z-index: 1;
}
.lightbox-arrow:hover { background: rgba(0,0,0,0.75); }
.lightbox-arrow:disabled { opacity: 0.2; cursor: default; }
.lightbox-prev { left: 0; border-radius: 0 5px 5px 0; }
.lightbox-next { right: 0; border-radius: 5px 0 0 5px; }
.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem;
  flex-shrink: 0;
}
.lightbox-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.lightbox-dot.active { background: var(--gold-light); }
.lightbox-dot:hover { background: rgba(255,255,255,0.55); }
.lightbox-close { background: transparent; border: none; color: white; font-size: 1.6rem; cursor: pointer; line-height: 1; padding: 0 0.2rem; }

/* Mobile: full screen */
@media (max-width: 600px) {
  .lightbox-overlay { padding: 0; background: rgba(0,0,0,0.96); align-items: stretch; }
  .lightbox-fullscreen { max-width: 100%; max-height: 100%; width: 100%; height: 100%; border: none; border-radius: 0; }
  .lightbox-img { max-height: calc(100vh - 90px); }
}

/* ── SCORE ROWS ─────────────────────────────────── */
.my-row > td:first-child::after {
  content: " ★";
  font-size: 0.6rem;
  color: var(--gold);
}
.score-display { font-size: 0.88rem; }
.stroke-dot { display: block; font-size: 7px; color: #c0392b; line-height: 1; }

/* ── LANDING PAGE ───────────────────────────────── */
.landing-signin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--green-dark);
  color: white;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.landing-signin-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.landing-signin-text strong { font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.landing-signin-text span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.landing-announcements {}
.landing-standings {}

.announcement-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.announcement-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.15rem;
}
.announcement-date {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.announcement-body {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  white-space: pre-wrap;
}

.standings-more-link {
  font-size: 0.8rem;
  color: var(--green-mid);
  text-decoration: underline;
}
.standings-more-link:hover { color: var(--green-dark); }

.empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── ADMIN PANEL ────────────────────────────────── */
.admin-list-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.admin-list-row:last-child { border-bottom: none; }
.admin-list-main { flex: 1; min-width: 0; }
.admin-list-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.15rem; }
.admin-list-meta { font-size: 0.72rem; color: var(--text-light); margin-bottom: 0.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; }
.admin-list-body { font-size: 0.85rem; color: var(--text-mid); line-height: 1.5; white-space: pre-wrap; }
.admin-list-actions { display: flex; gap: 0.4rem; flex-shrink: 0; padding-top: 0.1rem; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .landing-grid { grid-template-columns: 1fr; }
  .landing-standings { order: -1; }
}

/* Mobile nav: hide desktop links, show hamburger */
@media (max-width: 768px) {
  .nav-link { display: none; }
  .auth-bar { display: none !important; }
  .hamburger-btn { display: flex; }
  .nav-mobile-brand { display: block; }
  .nav-bar { padding: 0 0.75rem; }
}

@media (max-width: 600px) {
  .mc-header h1 { font-size: 1.8rem; }
  .mc-header .subtitle { font-size: 0.75rem; }
  .course-tab { padding: 0.55rem 1rem; font-size: 0.85rem; }
  .team-setup-grid { grid-template-columns: 1fr; }
  .match-row { flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0.75rem; }
  .match-teams { width: 100%; }
  .match-controls { width: 100%; justify-content: flex-end; }
  .week-header { flex-wrap: wrap; gap: 0.3rem; padding: 0.5rem 0.75rem; }
  .week-course { margin-left: 0; }
  .main-content { padding: 1rem 0.75rem 3rem; }
  .lb-table { font-size: 0.78rem; }
  .lb-table thead th { padding: 0.4rem 0.3rem; font-size: 0.68rem; }
  .lb-table td { padding: 0.4rem 0.3rem; }
  .landing-signin-banner { flex-direction: column; align-items: flex-start; }
  .admin-list-row { flex-direction: column; }
  .admin-list-actions { flex-direction: row; }
  .match-summary { gap: 1rem; }
  .setup-section { padding: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .sc-table { font-size: 0.78rem; }
  .sc-table th, .sc-table td { padding: 0.35rem 0.3rem; }
}
