:root {
  --primary: #000000;
  --accent:  #FFCC33;
  --header-h: 145px;
  --sidebar-w: 120px;
  --mobile-nav-h: 38px;
}

/* Larger date inputs site-wide */
input[type="date"] {
  font-size: 15px !important;
  padding: 6px 10px !important;
  height: auto !important;
  min-width: 160px;
}

body {
  background: #f4f6f9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  padding-top: var(--header-h);
  padding-left: var(--sidebar-w);
}

/* ── Header ────────────────────────────── */
#db-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #000;
  color: #FFCC33;
  padding: 14px 24px;
  z-index: 1000;
  border-bottom: 3px solid #FFCC33;
}
#db-header-sitename { font-size: 13px; color: rgba(255,255,255,.65); letter-spacing: .02em; }
#db-header-company  { font-size: 42px; font-weight: bold; line-height: 1.1; color: #FFCC33; }
#db-header-user     { font-size: 13px; font-weight: bold; color: #fff; margin-top: 4px; }

/* ── Sidebar ───────────────────────────── */
#db-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: #fff;
  border-right: 2px solid #000;
  padding: 6px 4px;
  overflow-y: auto;
  z-index: 999;
}
.db-sidebar-title {
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  padding: 4px 0;
}
.db-sidebar-hr { border-color: #000; margin: 4px 0; }

.db-nav-btn {
  display: block;
  width: 100%;
  padding: 6px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 2px;
}
.db-nav-btn:hover, .db-nav-btn.active {
  background: #4CAF50;
  color: #000;
  text-decoration: none;
}

/* ── Page header ───────────────────────── */
.page-header {
  background: var(--primary);
  color: var(--accent);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 0 .5rem .5rem;
}
.page-header h1 { font-size: 1.4rem; margin: 0; }

/* ── Cards ─────────────────────────────── */
.card { border: 1px solid #ccc; box-shadow: 0 1px 4px rgba(0,0,0,.1); border-radius: .5rem; }
.card-header { background: var(--primary); color: var(--accent); font-weight: 600; border-radius: .5rem .5rem 0 0 !important; }

.stat-card { text-align: center; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-card .stat-num { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { color: #666; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Badges ────────────────────────────── */
.badge-rank-a { background: #28a745; color: #fff; }
.badge-rank-b { background: #007bff; color: #fff; }
.badge-rank-c { background: #fd7e14; color: #fff; }
.badge-rank-t { background: #6c757d; color: #fff; }

/* ── Status ────────────────────────────── */
.status-filled  { color: #28a745; font-weight: 600; }
.status-partial { color: #fd7e14; font-weight: 600; }
.status-open    { color: #dc3545; font-weight: 600; }

/* ── Bookings ──────────────────────────── */
.booking-pending    { background: #fff3cd; }
.booking-confirmed  { background: #d4edda; }
.booking-waitlisted { background: #cce5ff; }
.booking-cancelled  { background: #f8d7da; text-decoration: line-through; opacity: .7; }

/* ── Tables ────────────────────────────── */
table.table-hover tbody tr:hover { background: #FFFF99; cursor: pointer; }
thead th { background: #000; color: #fff; }

/* ── Mobile Mode ────────────────────────── */
body.mobile-mode {
  --header-h: 90px;
  --sidebar-w: 0px;
  padding-left: 0;
  padding-top: calc(var(--header-h) + var(--mobile-nav-h));
}

body.mobile-mode #db-header {
  height: var(--header-h);
}

body.mobile-mode #db-header-company {
  font-size: 24px;
}

body.mobile-mode #db-sidebar {
  display: none;
}

#db-mobile-nav {
  display: none;
}

body.mobile-mode #db-mobile-nav {
  display: flex;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: var(--mobile-nav-h);
  background: #111;
  border-bottom: 2px solid #FFCC33;
  overflow-x: auto;
  white-space: nowrap;
  z-index: 998;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}

#db-mobile-nav .db-nav-btn {
  display: inline-block;
  width: auto;
  white-space: nowrap;
  padding: 5px 10px;
  font-size: 11px;
  color: #FFCC33;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
}

#db-mobile-nav .db-nav-btn:hover,
#db-mobile-nav .db-nav-btn.active {
  background: #4CAF50;
  color: #000;
}

/* ── Login ─────────────────────────────── */
.login-wrap { max-width: 420px; margin: 8vh auto; }
.login-wrap .card-header { text-align: center; padding: 1.5rem; font-size: 1.1rem; }

/* ── Buttons ───────────────────────────── */
.btn-primary       { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #333; border-color: #333; }
.btn-gold          { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.btn-gold:hover    { background: #e6b800; border-color: #e6b800; color: #000; }

.nav-pills .nav-link.active { background: var(--primary); color: var(--accent) !important; }

/* ── Time Group ────────────────────────── */
.time-group { border: 1px solid #ccc; border-radius: 6px; padding: 6px 8px; background: #fff; }
.time-group label { font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; display: block; }
.time-group select { width: 100% !important; margin-bottom: 3px; }

/* ── Misc ──────────────────────────────── */
.party-row td { vertical-align: middle; }
.games-list   { font-size: .8rem; color: #555; }
.past-party   { opacity: .65; }

#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; }
