/* ============================================================
   BALECOURT BASKETBALL — style.css
   Dark Theme · Inter Font · Mobile-First
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --bg-base:       #0d0d0d;
  --bg-card:       #1a1a1a;
  --bg-card-hover: #222222;
  --bg-elevated:   #242424;
  --border:        rgba(255,255,255,0.08);
  --border-light:  rgba(255,255,255,0.12);

  --orange:        #ff6b2b;
  --orange-dim:    rgba(255,107,43,0.15);
  --orange-glow:   rgba(255,107,43,0.35);
  --green:         #3ddc97;
  --green-dim:     rgba(61,220,151,0.15);
  --blue-sel:      #3b82f6;
  --blue-sel-dim:  rgba(59,130,246,0.18);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.15);
  --grey-slot:     #2a2a2a;

  --text-primary:   #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted:     rgba(255,255,255,0.35);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --transition: 0.2s ease;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 32px rgba(255,107,43,0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: var(--radius-full); }

/* ── Utilities ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: #ff8050;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge-lunas  { background: var(--green-dim);  color: var(--green); }
.badge-pending{ background: var(--orange-dim); color: var(--orange); }
.badge-batal  { background: var(--red-dim);    color: var(--red); }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.navbar-logo-text {
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #ff6b2b, #ff9a5c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-links a {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.navbar-links a:hover { color: var(--text-primary); background: var(--bg-card); }

.navbar-links .btn-admin {
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(255,107,43,0.2);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}
.navbar-links .btn-admin:hover { background: var(--orange-glow); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(13,13,13,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 20px 20px;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}
.mobile-menu a:hover { color: var(--text-primary); background: var(--bg-card); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(255,107,43,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(61,220,151,0.07) 0%, transparent 60%),
    linear-gradient(180deg, #0d0d0d 0%, #111111 100%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-dim);
  border: 1px solid rgba(255,107,43,0.25);
  color: var(--orange);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
}
.hero-badge-dot {
  width: 7px; height: 7px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.hero h1 span {
  background: linear-gradient(135deg, #ff6b2b 0%, #ff9a5c 50%, #ffb380 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 300;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 24px;
}

.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Section Common ──────────────────────────────────────── */
.section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 40px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
}
.section-desc {
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 520px;
}

/* ── Booking Section ─────────────────────────────────────── */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .booking-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title-icon {
  width: 32px; height: 32px;
  background: var(--orange-dim);
  color: var(--orange);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ── Calendar ────────────────────────────────────────────── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-month-label {
  font-weight: 700;
  font-size: 1rem;
}

.cal-nav-btn {
  width: 32px; height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.85rem;
}
.cal-nav-btn:hover { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  gap: 2px;
  min-height: 36px;
}
.cal-day:hover:not(.disabled):not(.empty) {
  background: var(--bg-elevated);
  border-color: var(--border-light);
}
.cal-day.today {
  background: var(--orange-dim);
  border-color: rgba(255,107,43,0.3);
  color: var(--orange);
  font-weight: 700;
}
.cal-day.selected {
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255,107,43,0.5);
}
.cal-day.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.4;
}
.cal-day.empty { cursor: default; }

.cal-dot {
  width: 5px; height: 5px;
  background: var(--orange);
  border-radius: 50%;
}

/* ── Slot Grid ───────────────────────────────────────────── */
.slot-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.slot-date-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.slot-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
}
.legend-dot.available { background: var(--green); }
.legend-dot.booked    { background: var(--red); }
.legend-dot.blocked   { background: #444; }
.legend-dot.selected  { background: var(--blue-sel); }

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

@media (min-width: 480px) {
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
}

.slot-btn {
  height: 52px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.2;
}
.slot-btn .slot-time { font-size: 0.72rem; font-weight: 700; }
.slot-btn .slot-price { font-size: 0.62rem; color: inherit; opacity: 0.75; }

.slot-btn.available {
  background: var(--green-dim);
  border-color: rgba(61,220,151,0.25);
  color: var(--green);
}
.slot-btn.available:hover {
  background: rgba(61,220,151,0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61,220,151,0.2);
}

.slot-btn.booked {
  background: var(--red-dim);
  border-color: rgba(239,68,68,0.2);
  color: var(--red);
  cursor: not-allowed;
  opacity: 0.7;
}

.slot-btn.blocked {
  background: var(--grey-slot);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.slot-btn.selected {
  background: var(--blue-sel-dim);
  border-color: rgba(59,130,246,0.5);
  color: var(--blue-sel);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.3);
}
.slot-btn.selected:hover {
  background: rgba(59,130,246,0.25);
  transform: translateY(-1px);
}

.no-date-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.no-date-msg .icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ── Booking Form ────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-label .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}

.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 14px;
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--orange);
  background: #1f1f1f;
  box-shadow: 0 0 0 3px rgba(255,107,43,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Billing Summary ─────────────────────────────────────── */
.billing-summary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}
.billing-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.billing-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 160px;
  overflow-y: auto;
}
.billing-slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: var(--text-secondary);
}
.billing-slot-price { color: var(--text-primary); font-weight: 600; }

.billing-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 12px 0;
}

.billing-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.billing-total-label {
  font-weight: 700;
  font-size: 0.9rem;
}
.billing-total-price {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--orange);
}

.billing-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
  padding: 12px 0;
}

/* ── Submit Button ───────────────────────────────────────── */
#submitBookingBtn {
  height: 52px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ff6b2b, #ff4500);
  box-shadow: 0 4px 20px rgba(255,107,43,0.35);
  position: relative;
  overflow: hidden;
}
#submitBookingBtn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
#submitBookingBtn:hover::before { opacity: 1; }
#submitBookingBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Jadwal Saya ─────────────────────────────────────────── */
.jadwal-search {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.jadwal-search .form-control { flex: 1; min-width: 200px; }

.bookings-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.bookings-table th {
  background: var(--bg-elevated);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.bookings-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.bookings-table tr:hover td { background: rgba(255,255,255,0.02); }
.bookings-table .booking-id { font-weight: 700; color: var(--orange); font-size: 0.8rem; }
.bookings-table .slots-list { color: var(--text-secondary); font-size: 0.8rem; }

.no-bookings-msg {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* ── Lokasi ──────────────────────────────────────────────── */
.lokasi-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .lokasi-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 320px;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.location-info { display: flex; flex-direction: column; gap: 20px; }

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.info-icon {
  width: 40px; height: 40px;
  background: var(--orange-dim);
  color: var(--orange);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.info-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-weight: 500; color: var(--text-primary); margin-top: 2px; font-size: 0.9rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo img {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Admin Modal ─────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-icon {
  width: 36px; height: 36px;
  background: var(--orange-dim);
  color: var(--orange);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-light); }

/* ── Admin Panel (full-screen slide) ─────────────────────── */
.admin-panel {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 300;
  overflow-y: auto;
  animation: panel-in 0.3s ease;
}
.admin-panel.open { display: block; }
@keyframes panel-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.admin-topbar {
  position: sticky;
  top: 0;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}
.admin-topbar-title {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-topbar-title span { color: var(--orange); }

.admin-body { padding: 24px; max-width: 1200px; margin: 0 auto; }

.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
}
.admin-tab {
  flex: 1;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
}
.admin-tab.active {
  background: var(--orange);
  color: #fff;
}
.admin-tab:hover:not(.active) { color: var(--text-primary); background: var(--bg-elevated); }

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Admin table */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 860px;
}
.admin-table th {
  background: var(--bg-elevated);
  padding: 11px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Admin form row */
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) { .admin-form-row { grid-template-columns: 1fr; } }

/* ── Success Overlay ─────────────────────────────────────── */
#successOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
}
#successOverlay.open {
  display: flex;
  animation: overlay-in 0.35s ease;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.success-wrap {
  width: 100%;
  max-width: 480px;
  margin: auto;
  animation: ticket-in 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes ticket-in {
  from { opacity: 0; transform: scale(0.85) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.success-icon-wrap {
  text-align: center;
  margin-bottom: 20px;
}
.success-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--green), #2bc47a);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 40px rgba(61,220,151,0.4);
  animation: icon-bounce 0.6s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes icon-bounce {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.success-heading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.success-subheading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* Ticket card */
.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.ticket-header {
  background: linear-gradient(135deg, #1a1a1a, #1e1e1e);
  border-bottom: 1px dashed var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ticket-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticket-logo-wrap img {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.ticket-venue-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--orange);
}
.ticket-venue-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.ticket-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
}
.ticket-id span {
  display: block;
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 800;
}

#successTicketBody {
  padding: 20px 24px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ticket-row:last-child { margin-bottom: 0; }
.ticket-key {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ticket-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}
.ticket-val.highlight { color: var(--orange); font-size: 1rem; font-weight: 800; }
.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-dim);
  color: var(--green);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.ticket-divider {
  position: relative;
  margin: 16px 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 0;
}
.ticket-divider::before, .ticket-divider::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: var(--bg-base);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.ticket-divider::before { left: -32px; }
.ticket-divider::after  { right: -32px; }
.ticket-divider hr {
  flex: 1;
  border: none;
  border-top: 1px dashed var(--border);
}

.ticket-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 24px;
  border-top: 1px dashed var(--border);
  background: rgba(0,0,0,0.15);
  gap: 12px;
}

#qrCodeCanvas {
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.success-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Confetti ────────────────────────────────────────────── */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
  z-index: 10000;
  pointer-events: none;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Blocks Section ──────────────────────────────────────── */
.blocks-list { display: flex; flex-direction: column; gap: 10px; }
.block-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.block-item-info { flex: 1; }
.block-item-date { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.block-item-reason { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.block-item-slots { font-size: 0.75rem; color: var(--orange); margin-top: 2px; }

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .hamburger   { display: flex; }

  .section { padding: 60px 0; }

  .hero h1 { font-size: 2.2rem; }

  .admin-topbar { padding: 14px 16px; }
  .admin-body   { padding: 16px; }

  .ticket-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .booking-layout { gap: 16px; }
  .card { padding: 18px 16px; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  pointer-events: all;
  animation: toast-in 0.3s ease;
  max-width: 320px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--orange); }

/* ── Pricing cards ───────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.pricing-card-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pricing-card-value { font-size: 1.3rem; font-weight: 800; color: var(--orange); }
.pricing-card-range { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section divider ─────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Expired slots ───────────────────────────────────────── */
.legend-dot.expired { background: rgba(255,255,255,0.15); opacity: 0.5; }
.slot-btn.expired {
  background: rgba(255,255,255,0.02) !important;
  border-color: rgba(255,255,255,0.04) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  opacity: 0.45 !important;
  text-decoration: line-through;
}
.slot-btn.expired .slot-price {
  text-decoration: line-through;
}

/* ── Reports ─────────────────────────────────────────────── */
.report-period-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.report-tab {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.report-tab:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}
.report-tab.active {
  background: var(--orange-dim);
  color: var(--orange);
  border-color: var(--orange);
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}
.report-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.report-card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.report-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.report-card-success .report-card-value { color: var(--green); }
.report-card-warning .report-card-value { color: #f59e0b; }
.report-card-danger .report-card-value { color: var(--red); }
.report-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.report-revenue-card {
  background: linear-gradient(135deg, rgba(255,107,43,0.15), rgba(255,107,43,0.05));
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.report-revenue-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.report-revenue-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b2b, #ff9a5c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.report-revenue-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Popular Slots */
.popular-slots-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popular-slot-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.popular-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.popular-slot-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.popular-slot-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.popular-slot-bar-bg {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.popular-slot-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ff9a5c);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Weekly Breakdown */
.weekly-breakdown {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 200px;
  padding-top: 20px;
}
.weekly-day-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}
.weekly-day-item.today .weekly-day-label {
  color: var(--orange);
  font-weight: 700;
}
.weekly-day-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  order: 3;
}
.weekly-day-bar-bg {
  flex: 1;
  width: 100%;
  max-width: 40px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  order: 1;
}
.weekly-day-bar {
  width: 100%;
  background: linear-gradient(to top, var(--orange), #ff9a5c);
  border-radius: var(--radius-sm);
  min-height: 4px;
  transition: height 0.6s ease;
}
.weekly-day-value {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  order: 2;
}

/* ── Court Photos ────────────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255,255,255,0.01);
}
.photo-upload-area:hover, .photo-upload-area.dragover {
  border-color: var(--orange);
  background: var(--orange-dim);
}
.photo-upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.photo-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}
.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-gallery-item:hover img {
  transform: scale(1.05);
}
.photo-gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.1));
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-gallery-caption {
  font-size: 0.75rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Public Photo Gallery Section styling */
.public-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.public-photo-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.public-photo-item:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.public-photo-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.public-photo-caption {
  padding: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

/* ── Notifications Styles ───────────────────────────────── */
.badge-terkirim {
  background: var(--green-dim) !important;
  color: var(--green) !important;
}
.badge-gagal {
  background: var(--red-dim) !important;
  color: var(--red) !important;
}
.badge-pending {
  background: var(--orange-dim) !important;
  color: var(--orange) !important;
}
.notif-msg-preview {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  background: rgba(0,0,0,0.3);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.notif-msg-preview:hover {
  white-space: normal;
  max-width: 400px;
  color: var(--text-primary);
  background: rgba(0,0,0,0.5);
}


