/* CourtBook dashboard — built on BluDrop base tokens */

.dash-page {
  margin: 0;
  min-height: 100vh;
  background: #0E1217;
  color: #E8EBEF;
  font-family: "Hanken Grotesk", sans-serif;
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #0E1217;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border: 1px solid #2A3340;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.auth-card-wide {
  max-width: 560px;
}

.auth-title {
  margin: 0 0 8px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #E8EBEF;
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: #9AA3AE;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-section {
  padding-top: 16px;
  border-top: 1px solid #2A3340;
}

.auth-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #B7C0CC;
}

.auth-hint {
  margin: 0;
  font-size: 12px;
  color: #9AA3AE;
}

.auth-footer {
  margin: 16px 0 0;
  font-size: 14px;
  color: #9AA3AE;
}

.auth-footer a {
  color: #6BA8FF;
  text-decoration: underline;
}

/* ===== FORM PRIMITIVES ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: #B7C0CC;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
}

.field-input:focus {
  outline: none;
  border-color: #6BA8FF;
  box-shadow: 0 0 0 1px #6BA8FF;
}

.form-error {
  margin: 0 0 8px;
  font-size: 14px;
  color: #f87171;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #6BA8FF;
  color: #0E1217;
}

.btn-primary:hover:not(:disabled) {
  background: #8bbcff;
}

.btn-secondary {
  background: transparent;
  color: #E8EBEF;
  border: 1px solid #313945;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #6BA8FF;
  color: #6BA8FF;
}

.btn-danger {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.1);
  border-color: #f87171;
}

.btn-block {
  width: 100%;
}

.card {
  padding: 24px;
  border: 1px solid #2A3340;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

/* ===== DASHBOARD SHELL ===== */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

.dash-sidebar {
  width: 224px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  border-right: 1px solid #1C232B;
  background: rgba(255, 255, 255, 0.01);
}

.dash-brand {
  margin-bottom: 32px;
  padding: 0 8px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #E8EBEF;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #9AA3AE;
  transition: background 0.18s ease, color 0.18s ease;
}

.dash-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #E8EBEF;
}

.dash-nav-link.is-active {
  background: rgba(107, 168, 255, 0.12);
  color: #6BA8FF;
}

.dash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid #1C232B;
  background: rgba(14, 18, 23, 0.92);
}

.dash-topbar-left,
.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-user-email {
  font-size: 14px;
  color: #9AA3AE;
}

.venue-switcher {
  padding: 8px 12px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.venue-switcher:focus {
  outline: none;
  border-color: #6BA8FF;
}

.dash-content {
  flex: 1;
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

.dash-page-title {
  margin: 0 0 24px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #E8EBEF;
}

.dash-placeholder {
  margin: 0;
  font-size: 15px;
  color: #9AA3AE;
}

/* ===== VENUE PAGES ===== */
.dash-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-page-header .dash-page-title {
  margin: 0;
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.venue-card {
  display: block;
  padding: 20px;
  border: 1px solid #2A3340;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.venue-card:hover {
  border-color: #6BA8FF;
  background: rgba(107, 168, 255, 0.04);
}

.venue-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #E8EBEF;
}

.venue-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
}

.venue-subnav a {
  color: #6BA8FF;
  text-decoration: underline;
}

.venue-subnav a.is-active {
  color: #E8EBEF;
  text-decoration: none;
  font-weight: 600;
}

.venue-subnav a:hover {
  color: #8bbcff;
}

.venue-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #E8EBEF;
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #B7C0CC;
  cursor: pointer;
}

.field-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #6BA8FF;
}

/* ===== GAMES ===== */
.game-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.game-color-dot {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
}

.game-name-form {
  min-width: 0;
}

.game-name-input {
  width: 100%;
  min-width: 160px;
  padding: 6px 10px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
}

.game-name-input:focus {
  outline: none;
  border-color: #6BA8FF;
}

/* ===== COURTS ===== */
.court-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.court-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.court-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #E8EBEF;
}

.court-game {
  margin: 4px 0 0;
  font-size: 14px;
  color: #9AA3AE;
}

.court-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.unit-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2A3340;
}

.unit-price-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-price-label {
  font-size: 14px;
  color: #9AA3AE;
  flex-shrink: 0;
}

.unit-price-input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
}

.unit-price-input:focus {
  outline: none;
  border-color: #6BA8FF;
}

.venue-form-hint a {
  color: #6BA8FF;
  text-decoration: underline;
}

.venue-form-hint a:hover {
  color: #8bbcff;
}

/* ===== OPERATING HOURS ===== */
.hours-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hours-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  align-items: center;
  gap: 12px;
}

.hours-row-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #2A3340;
  font-size: 12px;
  font-weight: 600;
  color: #9AA3AE;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hours-day-label {
  font-size: 14px;
  color: #E8EBEF;
}

.hours-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
}

.hours-input:focus {
  outline: none;
  border-color: #6BA8FF;
}

.slots-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== BLACKOUT DATES ===== */
.blackout-list-card {
  margin-bottom: 0;
}

.blackout-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blackout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.blackout-info {
  font-size: 14px;
  color: #E8EBEF;
}

.blackout-add-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-label {
  margin: 0;
  font-size: 14px;
  color: #9AA3AE;
}

.stat-value {
  margin: 8px 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #E8EBEF;
}

.stat-util-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #E8EBEF;
}

.stat-util-list li + li {
  margin-top: 4px;
}

/* ===== CALENDAR ===== */
.calendar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-date-input {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid #2A3340;
  border-radius: 8px;
  background: #0E1217;
  color: #E8EBEF;
  font: inherit;
  font-size: 14px;
}

.calendar-date-input:focus {
  outline: none;
  border-color: #6BA8FF;
}

.slot-grid-wrap {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid #2A3340;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.slot-grid {
  display: grid;
  gap: 4px;
  min-width: fit-content;
}

.slot-grid-hour {
  padding: 0 4px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #9AA3AE;
}

.slot-grid-unit-label {
  display: flex;
  align-items: center;
  padding-right: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #E8EBEF;
}

.slot-grid-cell {
  padding: 2px;
}

.slot-cell {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.slot-cell:disabled {
  cursor: default;
}

.slot-cell-available {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
  cursor: pointer;
}

.slot-cell-available:hover:not(:disabled) {
  background: rgba(74, 222, 128, 0.2);
}

.slot-cell-held {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.slot-cell-booked {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
  color: #cbd5e1;
  cursor: pointer;
}

.slot-cell-booked:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.3);
}

.slot-cell-blocked {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: #f87171;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
}

.modal-panel {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border: 1px solid #2A3340;
  border-radius: 12px;
  background: #0E1217;
}

.modal-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #E8EBEF;
}

.modal-hint {
  margin: 0 0 12px;
  font-size: 14px;
  color: #9AA3AE;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== BOOKINGS TABLE ===== */
.table-wrap {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dash-table th,
.dash-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #2A3340;
}

.dash-table th {
  font-weight: 600;
  color: #9AA3AE;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-table td {
  color: #E8EBEF;
}

.table-empty {
  text-align: center;
  color: #9AA3AE;
  padding: 32px 16px !important;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-green {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.badge-amber {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.badge-gray {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.badge-red {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.venue-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.venue-form-wide {
  max-width: 672px;
}

.venue-form-hint {
  margin: 0;
  font-size: 12px;
  color: #9AA3AE;
}

.venue-delete-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #2A3340;
}

.form-success {
  margin: 0 0 8px;
  font-size: 14px;
  color: #4ade80;
}

@media (max-width: 768px) {
  .dash-layout {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid #1C232B;
  }

  .dash-brand {
    margin-bottom: 0;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
  }

  .dash-topbar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 16px;
  }

  .dash-topbar-left,
  .dash-topbar-right {
    justify-content: space-between;
  }

  .venue-grid {
    grid-template-columns: 1fr;
  }

  .unit-price-grid {
    grid-template-columns: 1fr;
  }

  .court-card-header {
    flex-direction: column;
  }

  .hours-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hours-row-header {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
