
.admin-body {
  background: #f3f4f6;
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

.admin-sidebar {
  width: 240px;
  background: #111827;
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.sidebar-link.active { border-left: 3px solid #1a56db; background: rgba(26,86,219,0.15); color: #fff; }
.sidebar-link.logout { color: rgba(239,68,68,0.8); margin-top: auto; }
.sidebar-link.logout:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.sidebar-link i { width: 18px; text-align: center; }

.sidebar-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 0.75rem 1rem; }

.admin-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: #fff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  background: #f3f4f6;
  border: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #374151;
}

.header-title { flex: 1; }
.header-title h1 { font-size: 1.25rem; font-weight: 800; color: #111827; }
.header-title p { font-size: 0.8rem; color: #9ca3af; }

.header-date { font-size: 0.85rem; color: #6b7280; font-weight: 500; }

.btn-add-booking {
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-add-booking:hover { background: #1e40af; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 2rem 0;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }

.stat-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card-icon.green { background: rgba(16,185,129,0.15); color: #10b981; }
.stat-card-icon.blue { background: rgba(26,86,219,0.15); color: #1a56db; }
.stat-card-icon.orange { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stat-card-icon.purple { background: rgba(139,92,246,0.15); color: #8b5cf6; }

.stat-card-num { font-size: 1.5rem; font-weight: 900; color: #111827; }
.stat-card-label { font-size: 0.8rem; color: #6b7280; margin-top: 2px; }
.stat-card-change { font-size: 0.75rem; margin-top: 4px; }
.stat-card-change.positive { color: #10b981; }
.stat-card-change.negative { color: #ef4444; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
}

.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.span-2 { grid-column: span 2; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-header h3 { font-size: 1rem; font-weight: 700; color: #111827; }
.view-all { font-size: 0.85rem; color: #1a56db; text-decoration: none; font-weight: 600; }
.view-all:hover { text-decoration: underline; }

.bookings-table-wrap { overflow-x: auto; }

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bookings-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e7eb;
}

.bookings-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  color: #374151;
}

.bookings-table tr:hover td { background: #f9fafb; }

.customer-cell { display: flex; align-items: center; gap: 0.75rem; }

.customer-avatar {
  width: 32px; height: 32px;
  background: #1a56db;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.customer-name { font-weight: 600; color: #111827; }
.customer-contact { font-size: 0.75rem; color: #9ca3af; }

.facility-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.facility-tag.football { background: rgba(16,185,129,0.12); color: #065f46; }

.amount { font-weight: 700; color: #111827; }

.status-badge {
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.confirmed { background: rgba(16,185,129,0.12); color: #065f46; }
.status-badge.reserved { background: rgba(245,158,11,0.12); color: #92400e; }
.status-badge.cancelled { background: rgba(239,68,68,0.12); color: #991b1b; }
.status-badge.blocked { background: rgba(107,114,128,0.12); color: #374151; }

.btn-icon {
  background: #f3f4f6;
  border: none;
  width: 30px; height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #374151;
  margin: 0 2px;
  transition: all 0.2s;
}

.btn-icon:hover { background: #e5e7eb; }
.btn-icon.danger { color: #ef4444; }
.btn-icon.danger:hover { background: rgba(239,68,68,0.1); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }

.bar-chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 160px; padding: 0 0.5rem; }

.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; height: 100%; justify-content: flex-end; }

.bar {
  width: 100%;
  background: #1a56db;
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.3s;
  min-height: 4px;
}

.bar.peak { background: #f59e0b; }
.bar:hover { opacity: 0.8; }

.bar-val {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}

.bar-label { font-size: 0.7rem; color: #6b7280; font-weight: 600; }

.sport-breakdown { margin-bottom: 1.5rem; }

.sport-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.sport-row-info { display: flex; align-items: center; gap: 0.5rem; min-width: 110px; font-size: 0.85rem; color: #374151; font-weight: 500; }

.sport-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sport-dot.football { background: #10b981; }

.sport-bar-wrap { flex: 1; height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.sport-bar { height: 100%; border-radius: 4px; transition: width 1s ease; }
.sport-pct { font-size: 0.8rem; font-weight: 700; color: #374151; min-width: 35px; text-align: right; }

.hours-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }

.hour-cell {
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.hour-cell.low { background: rgba(16,185,129,0.1); color: #065f46; }
.hour-cell.mid { background: rgba(245,158,11,0.1); color: #92400e; }
.hour-cell.high { background: rgba(239,68,68,0.15); color: #991b1b; }

.admin-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 800; color: #111827; }

.modal-close-btn {
  background: #f3f4f6;
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #6b7280;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-cancel {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-confirm {
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 50%, #111827 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-family: 'Inter', sans-serif;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 3rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.login-logo { font-size: 1.75rem; font-weight: 900; margin-bottom: 0.5rem; }
.login-logo .play { color: #111827; }
.login-logo .box { color: #1a56db; }

.login-card h2 { font-size: 1.25rem; font-weight: 700; color: #374151; margin-bottom: 2rem; }

.login-form { text-align: left; }

.login-form .form-group { margin-bottom: 1.25rem; }

.login-form label { display: block; font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.4rem; }

.login-form input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus { border-color: #1a56db; }

.btn-login {
  width: 100%;
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.9rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.btn-login:hover { background: #1e40af; }

/* --- Live "Schedule" popup --- */

.schedule-modal { max-width: 560px; }

.schedule-modal-body { max-height: 70vh; overflow-y: auto; }

.schedule-section-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9ca3af;
  margin-bottom: 0.6rem;
}

.schedule-upcoming-label { margin-top: 1.4rem; }

.schedule-current-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #0f766e 0%, #10b981 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

.schedule-current-bar:last-child { margin-bottom: 0; }

.schedule-current-badge {
  background: rgba(255,255,255,0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.schedule-current-main { flex: 1; min-width: 0; }
.schedule-current-customer { font-size: 1.1rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-current-facility { font-size: 0.82rem; opacity: 0.9; margin-top: 3px; display: flex; align-items: center; gap: 0.35rem; }

.schedule-current-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.schedule-current-time { font-size: 0.82rem; font-weight: 700; white-space: nowrap; }

.schedule-current-meta .payment-pill.paid { background: #fff; color: #065f46; }
.schedule-current-meta .payment-pill.partial { background: #fff; color: #92400e; }
.schedule-current-meta .payment-pill.unpaid { background: #fff; color: #991b1b; }

.schedule-upcoming-list {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.schedule-upcoming-list::-webkit-scrollbar { width: 6px; }
.schedule-upcoming-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

.schedule-upcoming-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
}

.schedule-upcoming-item:last-child { margin-bottom: 0; }

.schedule-upcoming-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  text-align: center;
  min-width: 64px;
  line-height: 1.3;
  flex-shrink: 0;
}

.schedule-upcoming-time span { display: block; font-size: 0.7rem; font-weight: 600; color: #9ca3af; }

.schedule-upcoming-info { flex: 1; min-width: 0; }
.schedule-upcoming-customer { font-weight: 700; color: #111827; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-upcoming-facility { font-size: 0.78rem; color: #6b7280; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.payment-pill {
  padding: 0.22rem 0.65rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.payment-pill.paid { background: rgba(16,185,129,0.15); color: #065f46; }
.payment-pill.partial { background: rgba(245,158,11,0.15); color: #92400e; }
.payment-pill.unpaid { background: rgba(239,68,68,0.15); color: #991b1b; }

.schedule-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 1; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding: 1rem; }
  .dashboard-grid { padding: 1rem; }
  .admin-header { padding: 1rem; }
}
