/* ==========================================================================
   Golf Pod Dev theme layer
   Custom styling for Golf Pod Dev application. Everything a club can vary
   lives in the token block below. Nothing outside it should contain a literal colour.
   ========================================================================== */

:root {
  /* --- Club-variable tokens ------------------------------------------- */
  --gb-brand:            #005554;   /* primary actions, active nav */
  --gb-brand-contrast:   #ffffff;
  --gb-accent:           #B8862B;   /* secondary actions, money/collect */
  --gb-accent-contrast:  #ffffff;
  --gb-surface:          #ffffff;
  --gb-canvas:           #ECF3E9;
  --gb-ink:              #1F4842;
  --gb-ink-muted:        #869d9d;
  --gb-line:             #E8EBF1;

  /* Tee slot occupancy — semantic, not decorative */
  --gb-slot-4:           #2E7D5B;
  --gb-slot-3:           #2A7B96;
  --gb-slot-2:           #8A6D1F;
  --gb-slot-1:           #9C3B26;
  --gb-slot-full:        #5B6B68;
  --gb-slot-released:    #F2E3B8;
  --gb-slot-ink:         #ffffff;

  --gb-radius:           .625rem;
  --gb-radius-sm:        .375rem;
}

[data-bs-theme="dark"] {
  --gb-surface: var(--bs-body-bg);
  --gb-canvas:  var(--bs-secondary-bg);
  --gb-ink:     var(--bs-emphasis-color);
  --gb-line:    var(--bs-border-color);
  --gb-slot-released: #4A431F;
}

/* Bind Bootstrap to the club tokens so one edit repaints the app. */
:root {
  --custom-body-bg: var(--gb-canvas);
  --bs-primary: var(--gb-brand);
  --bs-primary-rgb: 0, 85, 84;
  --bs-link-color: var(--gb-brand);
  --bs-link-hover-color: var(--gb-brand);
}

/* ==========================================================================
   Operating context bar — course + date, present on every back-office page
   ========================================================================== */

.gb-context {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
  padding: .875rem 1rem;
  background: var(--gb-surface);
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius);
  margin-bottom: 1.25rem;
}

.gb-context__field { min-width: 12rem; flex: 0 1 auto; }
.gb-context__field label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gb-ink-muted);
  margin-bottom: .25rem;
}
.gb-context__spacer { flex: 1 1 auto; }

/* ==========================================================================
   Tee slot grid
   Colour encodes remaining openings. Text repeats it so colour is never the
   only carrier of meaning.
   ========================================================================== */

.gb-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .625rem;
}

.gb-slot {
  display: block;
  width: 100%;
  text-align: left;
  padding: .75rem .875rem;
  border: 1px solid transparent;
  border-radius: var(--gb-radius-sm);
  color: var(--gb-slot-ink);
  background: var(--gb-slot-full);
  transition: transform .12s ease;
}
.gb-slot:hover { transform: translateY(-1px); color: var(--gb-slot-ink); text-decoration: none; }
a.gb-slot { text-decoration: none; }
.gb-slot:disabled { opacity: .9; cursor: default; }
.gb-slot--released:hover { color: var(--gb-ink); }
.gb-slot:focus-visible { outline: 2px solid var(--gb-ink); outline-offset: 2px; }

.gb-slot__time { font-size: 1.0625rem; font-weight: 700; line-height: 1.2; }
.gb-slot__tee  { font-size: .75rem; opacity: .85; }
.gb-slot__state { font-size: .8125rem; font-weight: 600; margin-top: .25rem; }

.gb-slot--open-4 { background: var(--gb-slot-4); }
.gb-slot--open-3 { background: var(--gb-slot-3); }
.gb-slot--open-2 { background: var(--gb-slot-2); }
.gb-slot--open-1 { background: var(--gb-slot-1); }
.gb-slot--full   { background: var(--gb-slot-full); }
.gb-slot--released {
  background: var(--gb-slot-released);
  color: var(--gb-ink);
  border-color: var(--gb-accent);
}

.gb-legend { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.gb-legend__item { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; }
.gb-legend__swatch { width: .875rem; height: .875rem; border-radius: 3px; display: inline-block; }

/* ==========================================================================
   Money owed / action tiles
   ========================================================================== */

.gb-owed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .75rem;
}

.gb-owed__tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius-sm);
  background: var(--gb-surface);
}
.gb-owed__tile h6 { margin: 0; font-size: .875rem; }
.gb-owed__amount { font-weight: 700; color: var(--gb-ink); white-space: nowrap; }

/* ==========================================================================
   Alert strip — released tee times, action required
   ========================================================================== */

.gb-alert-strip {
  border-left: 4px solid var(--gb-accent);
  background: color-mix(in srgb, var(--gb-accent) 8%, var(--gb-surface));
  border-radius: var(--gb-radius-sm);
  padding: 1rem 1.125rem;
}

/* ==========================================================================
   Member card
   ========================================================================== */

.gb-member__meta { font-size: .8125rem; color: var(--gb-ink-muted); }
.gb-member__meta dt { font-weight: 500; }
.gb-member__number { font-size: .75rem; color: var(--gb-ink-muted); font-weight: 600; }

.gb-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .6875rem;
  font-weight: 600;
  padding: .1875rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--gb-line);
  color: var(--gb-ink-muted);
}
.gb-pill--on { border-color: var(--gb-brand); color: var(--gb-brand); }

/* ==========================================================================
   Utility
   ========================================================================== */

.gb-stat { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--gb-ink); }
.gb-table td, .gb-table th { vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  .gb-slot { transition: none; }
  .gb-slot:hover { transform: none; }
}

/* ==========================================================================
   Standalone operating boards — tablet chrome, no sidebar
   ========================================================================== */

.gb-board-body { background: var(--gb-canvas); min-height: 100vh; }

.gb-board-header {
  background: var(--gb-brand);
  color: var(--gb-brand-contrast);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.gb-board-header__brand { display: flex; align-items: center; gap: .875rem; margin-right: auto; }
.gb-board-header__brand h1 { color: inherit; }
.gb-board-header__controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gb-board-header__controls .form-select,
.gb-board-header__controls .form-control { min-width: 10rem; }

.gb-board-nav { display: flex; flex-wrap: wrap; gap: .375rem; width: 100%; }
.gb-board-nav__link {
  padding: .4375rem .875rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--gb-brand-contrast);
  background: rgba(255, 255, 255, .12);
}
.gb-board-nav__link:hover { background: rgba(255, 255, 255, .22); color: var(--gb-brand-contrast); }
.gb-board-nav__link.active { background: var(--gb-brand-contrast); color: var(--gb-brand); }

.gb-board-main { padding: 1.25rem; }

/* Touch targets sized for gloved hands on an outdoor tablet */
.gb-board-main .btn { min-height: 2.75rem; }
.gb-board-main .form-control { min-height: 2.75rem; }

/* ==========================================================================
   Kiosk
   ========================================================================== */

.gb-kiosk-body { background: var(--gb-canvas); min-height: 100vh; }

.gb-kiosk-header {
  background: var(--gb-brand);
  color: var(--gb-brand-contrast);
  padding: 1.25rem;
}
.gb-kiosk-header__inner {
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
}
.gb-kiosk-header h1 { color: inherit; }

.gb-kiosk-steps { background: var(--gb-surface); border-bottom: 1px solid var(--gb-line); }
.gb-kiosk-steps__list {
  max-width: 72rem; margin: 0 auto; padding: 0 1.25rem;
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.gb-kiosk-step {
  display: flex; align-items: center; gap: .5rem;
  padding: 1rem .75rem;
  font-weight: 600; font-size: .9375rem;
  color: var(--gb-ink-muted);
  border-bottom: 3px solid transparent;
  flex: 1 1 10rem;
}
.gb-kiosk-step__num {
  width: 1.75rem; height: 1.75rem; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gb-line); color: var(--gb-ink-muted);
  font-size: .8125rem;
}
.gb-kiosk-step.is-current { color: var(--gb-ink); border-bottom-color: var(--gb-accent); }
.gb-kiosk-step.is-current .gb-kiosk-step__num { background: var(--gb-accent); color: var(--gb-accent-contrast); }
.gb-kiosk-step.is-done .gb-kiosk-step__num { background: var(--gb-brand); color: var(--gb-brand-contrast); }

.gb-kiosk-main { padding: 2rem 1.25rem 3rem; }
.gb-kiosk-card { max-width: 72rem; margin: 0 auto; }
.gb-kiosk-main .btn-lg { min-height: 3.25rem; }
.gb-kiosk-main .form-control-lg { min-height: 3.25rem; }

/* ==========================================================================
   Public club site — its own type scale, distinct from the admin shell
   ========================================================================== */

.gb-public-body { background: var(--gb-surface); }
.gb-public-container { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.gb-public-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--gb-brand);
  color: var(--gb-brand-contrast);
}
.gb-public-header__inner {
  max-width: 72rem; margin: 0 auto; padding: .875rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.gb-public-brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; color: inherit; margin-right: auto;
}
.gb-public-brand:hover { color: inherit; }
.gb-public-brand__mark {
  width: 2.75rem; height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--gb-accent); border-radius: 50%;
  font-size: 1.25rem;
}
.gb-public-brand__name {
  display: block; font-size: 1.25rem; font-weight: 700;
  letter-spacing: .04em; line-height: 1.1;
}
.gb-public-brand__sub { display: block; font-size: .6875rem; letter-spacing: .18em; opacity: .8; }

.gb-public-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.gb-public-nav a {
  color: var(--gb-brand-contrast); text-decoration: none;
  font-weight: 600; font-size: .9375rem; opacity: .88;
}
.gb-public-nav a:hover { opacity: 1; color: var(--gb-brand-contrast); }

.gb-hero {
  background:
    linear-gradient(180deg, rgba(0,40,38,.72) 0%, rgba(0,40,38,.45) 45%, rgba(0,40,38,.82) 100%),
    linear-gradient(135deg, #2E7D5B 0%, #1B4842 55%, #0D2A26 100%);
  color: #fff;
  padding: 6rem 1.25rem 5rem;
}
.gb-hero__inner { max-width: 72rem; margin: 0 auto; }
.gb-hero__eyebrow { font-size: .8125rem; letter-spacing: .16em; color: var(--gb-slot-released); margin-bottom: 1rem; }
.gb-hero__title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.05; margin-bottom: 1rem; color: #fff; }
.gb-hero__lede { font-size: 1.1875rem; max-width: 34rem; opacity: .92; margin-bottom: 2rem; }
.gb-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.gb-hero__credit { margin: 3rem 0 0; font-size: .8125rem; opacity: .7; }

.gb-public-section { padding: 4rem 0; }
.gb-public-section--tint { background: var(--gb-canvas); }
.gb-public-eyebrow {
  font-size: .75rem; letter-spacing: .16em;
  color: var(--gb-ink-muted); margin-bottom: .5rem;
}
.gb-public-h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; color: var(--gb-ink); }
.gb-public-lede { font-size: 1.0625rem; max-width: 40rem; }

.gb-public-stats { display: grid; gap: 1.25rem; }
.gb-public-stat { display: block; font-size: 2.5rem; font-weight: 700; color: var(--gb-brand); line-height: 1; }
.gb-public-stat__label { display: block; color: var(--gb-ink-muted); font-size: .875rem; margin-top: .25rem; }

.gb-course-card {
  background: var(--gb-surface);
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius);
  padding: 1.5rem;
  height: 100%;
}
.gb-course-card__meta { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; font-size: .875rem; }
.gb-course-card__meta dt { color: var(--gb-ink-muted); font-weight: 500; }
.gb-course-card__meta dd { margin: 0; font-weight: 600; color: var(--gb-ink); }

.gb-public-cta {
  background: var(--gb-canvas);
  border-radius: var(--gb-radius);
  padding: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}

.gb-public-footer { background: var(--gb-brand); color: var(--gb-brand-contrast); padding: 3rem 0 2rem; }
.gb-public-footer h3 { color: inherit; margin-bottom: .75rem; }
.gb-public-footer a { display: block; color: inherit; opacity: .8; text-decoration: none; font-size: .9375rem; padding: .1875rem 0; }
.gb-public-footer a:hover { opacity: 1; color: inherit; }
.gb-public-footer__fine { margin: 2.5rem 0 0; font-size: .8125rem; opacity: .65; }

/* ==========================================================================
   Printable report document
   ========================================================================== */

.gb-doc-body { background: #E9EDE9; }

.gb-doc-toolbar { background: var(--gb-brand); color: var(--gb-brand-contrast); padding: .875rem 1.25rem; }
.gb-doc-toolbar__inner {
  max-width: 62rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
}

.gb-doc-sheet {
  max-width: 62rem;
  margin: 2rem auto;
  background: #fff;
  padding: 3rem;
  border-radius: var(--gb-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  color: #1a1a1a;
}

.gb-doc-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: flex-start; justify-content: space-between;
  border-bottom: 3px solid var(--gb-brand);
  padding-bottom: 1.25rem; margin-bottom: 1.5rem;
}
.gb-doc-title { font-size: 1.75rem; font-weight: 700; margin: 0; color: var(--gb-ink); }
.gb-doc-sub { margin: .25rem 0 0; color: var(--gb-ink-muted); }
.gb-doc-brand { font-weight: 700; letter-spacing: .06em; color: var(--gb-brand); }

.gb-doc-meta { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-bottom: 1.5rem; }
.gb-doc-meta dt { font-size: .75rem; color: var(--gb-ink-muted); font-weight: 500; }
.gb-doc-meta dd { margin: 0; font-weight: 600; }

.gb-doc-callout {
  border-left: 4px solid var(--gb-brand);
  background: var(--gb-canvas);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.gb-doc-callout p { margin: 0; }
.gb-doc-callout__label { font-size: .8125rem; color: var(--gb-ink-muted); }
.gb-doc-callout__figure { font-size: 1.5rem; font-weight: 700; color: var(--gb-ink); margin: .25rem 0 !important; }
.gb-doc-callout__detail { font-size: .875rem; color: var(--gb-ink-muted); }

.gb-doc-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.gb-doc-table th {
  background: var(--gb-brand); color: #fff;
  text-align: left; padding: .625rem .75rem; font-weight: 600;
}
.gb-doc-table td { padding: .625rem .75rem; border-bottom: 1px solid var(--gb-line); }
.gb-doc-table tfoot td { font-weight: 700; border-top: 2px solid var(--gb-brand); border-bottom: none; }

.gb-doc-foot {
  margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid var(--gb-line);
  font-size: .8125rem; color: var(--gb-ink-muted);
}

@media print {
  .gb-doc-toolbar { display: none; }
  .gb-doc-body { background: #fff; }
  .gb-doc-sheet { margin: 0; padding: 0; box-shadow: none; max-width: none; }
  .gb-doc-table th { background: #fff; color: #000; border-bottom: 2px solid #000; }
}

/* ==========================================================================
   Restaurant POS — deliberately its own visual language
   ========================================================================== */

.gb-rest-body {
  --rest-bg:      #14211E;
  --rest-panel:   #1C2B27;
  --rest-line:    #2C3F3A;
  --rest-ink:     #E8EFEC;
  --rest-muted:   #8FA5A0;
  --rest-accent:  #E07A4F;

  background: var(--rest-bg);
  color: var(--rest-ink);
  min-height: 100vh;
}
.gb-rest-body .text-muted { color: var(--rest-muted) !important; }
.gb-rest-body .form-control {
  background: var(--rest-panel); border-color: var(--rest-line); color: var(--rest-ink);
}
.gb-rest-body .form-control::placeholder { color: var(--rest-muted); }
.gb-rest-body .btn-light { background: var(--rest-line); border-color: var(--rest-line); color: var(--rest-ink); }
.gb-rest-body .gb-stat { color: var(--rest-ink); }

.gb-rest-header {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  padding: .875rem 1.25rem;
  background: var(--rest-panel);
  border-bottom: 1px solid var(--rest-line);
}
.gb-rest-header__group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gb-rest-logo { font-weight: 700; letter-spacing: .04em; }
.gb-rest-modes { display: flex; gap: .25rem; background: var(--rest-bg); padding: .25rem; border-radius: 999px; }
.gb-rest-mode {
  border: 0; background: transparent; color: var(--rest-muted);
  padding: .375rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 600;
}
.gb-rest-mode.active { background: var(--rest-accent); color: #fff; }

.gb-rest-user {
  display: flex; align-items: center; gap: .625rem;
  margin: 0 auto;
  background: var(--rest-bg); border: 1px solid var(--rest-line);
  color: var(--rest-ink);
  border-radius: 999px; padding: .375rem .875rem .375rem .375rem;
}
.gb-rest-user__avatar {
  width: 2.25rem; height: 2.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--rest-accent); color: #fff; font-weight: 700; font-size: .8125rem;
}
.gb-rest-clock { text-align: right; font-size: .875rem; }

.gb-rest-main { display: flex; flex-wrap: wrap; align-items: stretch; min-height: calc(100vh - 4.5rem); }

.gb-rest-check {
  flex: 1 1 22rem; max-width: 26rem;
  background: var(--rest-panel);
  border-right: 1px solid var(--rest-line);
  display: flex; flex-direction: column;
  padding: 1.25rem;
}
.gb-rest-check__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.gb-rest-check__head h1 { color: var(--rest-ink); }
.gb-rest-check__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--rest-line); }
.gb-rest-check__foot .border-top { border-color: var(--rest-line) !important; }

.gb-rest-addcustomer {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; text-align: left;
  background: var(--rest-bg); border: 1px dashed var(--rest-line);
  color: var(--rest-ink);
  border-radius: var(--gb-radius); padding: .875rem 1rem; margin-bottom: 1rem;
}

.gb-rest-lines { list-style: none; padding: 0; margin: 0; }
.gb-rest-lines li {
  display: flex; justify-content: space-between; gap: .75rem;
  padding: .75rem 0; border-bottom: 1px solid var(--rest-line);
}

.gb-rest-menu { flex: 1 1 32rem; display: flex; flex-direction: column; }
.gb-rest-menu__head { padding: 1.25rem 1.25rem .75rem; border-bottom: 1px solid var(--rest-line); }
.gb-rest-menu__body { padding: 1.25rem; }
.gb-rest-menu__body h2 { color: var(--rest-ink); }

.gb-rest-cats { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .875rem; }
.gb-rest-cat {
  border: 1px solid var(--rest-line); background: var(--rest-panel);
  color: var(--rest-muted);
  padding: .4375rem .875rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
}
.gb-rest-cat.active { background: var(--rest-accent); border-color: var(--rest-accent); color: #fff; }

.gb-rest-item {
  display: block; width: 100%; height: 100%; text-align: left;
  background: var(--rest-panel); border: 1px solid var(--rest-line);
  border-radius: var(--gb-radius); padding: .875rem;
  color: var(--rest-ink);
}
.gb-rest-item:hover { border-color: var(--rest-accent); }
.gb-rest-item__cat { display: block; font-size: .6875rem; color: var(--rest-muted); margin-bottom: .25rem; }
.gb-rest-item__name { display: block; font-weight: 600; margin-bottom: .375rem; }
.gb-rest-item__price { font-weight: 700; color: var(--rest-accent); }

.gb-rest-pin { background: var(--rest-panel); color: var(--rest-ink); border: 1px solid var(--rest-line); }
.gb-rest-pin h2 { color: var(--rest-ink); }
.gb-rest-pin__dots { display: flex; gap: .625rem; justify-content: center; margin-bottom: 1.5rem; }
.gb-rest-pin__dots span {
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid var(--rest-line);
}
.gb-rest-pin__dots span.is-filled { background: var(--gb-secondary, #4FB7B3); border-color: transparent; }
.gb-rest-pin__pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.gb-rest-pin__pad button {
  background: var(--rest-bg); border: 1px solid var(--rest-line);
  color: var(--rest-ink);
  border-radius: var(--gb-radius); padding: 1rem; font-size: 1.25rem; font-weight: 600;
}
.gb-rest-pin__pad button.is-muted { font-size: .875rem; color: var(--rest-accent); }
.gb-rest-pin__pad button.is-go { font-size: .9375rem; background: var(--gb-brand); border-color: var(--gb-brand); }

@media (max-width: 62rem) {
  .gb-rest-check { max-width: none; border-right: 0; border-bottom: 1px solid var(--rest-line); }
}
