:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #65a30d;
  --primary-strong: #4d7c0f;
  --accent: #84cc16;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #15803d;
  --radius: 18px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --container: min(1120px, calc(100% - 32px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -50px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 16px; }
.container { width: var(--container); margin-inline: auto; }
.section { padding: 90px 0; scroll-margin-top: 74px; }
.section-soft { background: var(--surface-2); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(16px);
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: var(--accent); font-size: .86rem; }
.brand-accent { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a { color: #475569; font-size: .95rem; font-weight: 650; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-strong); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px; background: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #1a2e05; box-shadow: 0 10px 28px rgba(101, 163, 13, .22); }
.btn-primary:hover { background: #a3e635; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-sm { min-height: 40px; padding-inline: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: #fee2e2; color: #991b1b; }

.hero { position: relative; overflow: hidden; min-height: 670px; display: grid; align-items: center; background: #0f172a; color: #fff; }
.hero-bg { position: absolute; inset: 0; opacity: .42; background:
  radial-gradient(circle at 15% 20%, rgba(132, 204, 22, .4), transparent 26%),
  radial-gradient(circle at 82% 30%, rgba(34, 197, 94, .18), transparent 30%),
  linear-gradient(125deg, rgba(15,23,42,.9), rgba(15,23,42,.98)); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(2.9rem, 6vw, 5.5rem); line-height: .98; letter-spacing: -.06em; }
.hero-copy > p { max-width: 650px; margin: 24px 0 0; color: #cbd5e1; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 670px; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); }
.hero-stats div { display: grid; gap: 2px; }
.hero-stats strong { color: #fff; font-size: 1.05rem; }
.hero-stats span { color: #94a3b8; font-size: .83rem; }
.quick-book-card { padding: 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: rgba(255,255,255,.08); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-heading h2 { margin: 0 0 18px; font-size: 1.55rem; }
.status-dot { color: #bef264; font-size: .82rem; font-weight: 700; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 999px; background: #a3e635; box-shadow: 0 0 0 5px rgba(163,230,53,.12); }
.microcopy { margin: 14px 0 0; color: #94a3b8; font-size: .8rem; text-align: center; }

.stack-form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #334155; font-size: .88rem; font-weight: 700; }
.quick-book-card label { color: #e2e8f0; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(101,163,13,.13); }
textarea { resize: vertical; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.section-heading p { max-width: 480px; margin: 0; color: var(--muted); }
.court-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.court-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 34px rgba(15,23,42,.06); }
.court-visual { position: relative; min-height: 210px; padding: 24px; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(145deg, #1e293b, #334155); overflow: hidden; }
.court-visual::before, .court-visual::after { content: ""; position: absolute; border: 2px solid rgba(255,255,255,.4); }
.court-visual::before { inset: 24px; }
.court-visual::after { width: 70px; height: 70px; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.court-visual .court-number { position: relative; z-index: 1; font-size: 2.8rem; font-weight: 900; letter-spacing: -.08em; }
.court-body { padding: 22px; }
.court-topline { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.court-body h3 { margin: 0; font-size: 1.24rem; }
.court-type { margin: 5px 0 18px; color: var(--muted); font-size: .88rem; }
.price { color: var(--primary-strong); font-weight: 850; white-space: nowrap; }
.court-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: #475569; font-size: .75rem; font-weight: 650; }

.schedule-panel { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.schedule-filter { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; padding: 24px; border-bottom: 1px solid var(--line); }
.schedule-summary { padding: 18px 24px 0; color: var(--muted); }
.schedule-summary strong { color: var(--ink); }
.slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 24px; }
.slot-button { padding: 15px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 750; }
.slot-button:hover:not(:disabled) { border-color: var(--primary); background: #f7fee7; color: var(--primary-strong); }
.slot-button:disabled { cursor: not-allowed; background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.slot-note { display: block; font-size: .69rem; font-weight: 600; opacity: .75; }

.booking-lookup { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.lookup-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.booking-results { display: grid; gap: 14px; margin-top: 22px; }
.booking-result-card { display: grid; grid-template-columns: 1.2fr .8fr auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.booking-result-card h3 { margin: 0 0 4px; font-size: 1rem; }
.booking-result-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.empty-state { padding: 30px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.status-badge { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status-menunggu-pembayaran, .status-menunggu-konfirmasi { background: #fef3c7; color: #92400e; }
.status-dikonfirmasi, .status-selesai { background: #dcfce7; color: #166534; }
.status-dibatalkan { background: #fee2e2; color: #991b1b; }

.cta-section { padding-top: 40px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 44px; border-radius: 24px; background: var(--primary-strong); color: #fff; }
.cta-card .eyebrow { color: #d9f99d; }
.cta-card h2 { max-width: 700px; margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.site-footer { padding: 60px 0 24px; background: #0b1220; color: #cbd5e1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-brand { color: #fff; }
.site-footer h3 { color: #fff; font-size: .95rem; }
.site-footer p { color: #94a3b8; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #1e293b; color: #64748b; font-size: .82rem; }

.modal { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.72); backdrop-filter: blur(6px); }
.modal-card { position: relative; z-index: 1; width: min(480px, 100%); max-height: 92vh; overflow-y: auto; padding: 30px; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(2,6,23,.35); }
.modal-lg { width: min(760px, 100%); }
.modal-close { position: absolute; right: 16px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 999px; background: var(--surface-2); font-size: 1.5rem; }
.modal-header h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.03em; }
.modal-header p { margin: 8px 0 22px; color: var(--muted); }
.booking-form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 16px; }
.two-cols { grid-template-columns: 1fr 1fr; }
.payment-options { display: flex; flex-wrap: wrap; gap: 12px 18px; border: 0; padding: 0; margin: 0; }
.payment-options legend { width: 100%; color: #334155; font-size: .88rem; font-weight: 700; }
.payment-options label { display: flex; align-items: center; gap: 8px; }
.payment-options input, .checkbox-field input { width: auto; }
.booking-total { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-radius: 12px; background: #f7fee7; }
.booking-total strong { color: var(--primary-strong); font-size: 1.15rem; }
.file-field span { color: var(--muted); font-size: .75rem; font-weight: 500; }
.checkbox-field { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px; font-weight: 600; }
.success-card { text-align: center; }
.success-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%; background: #dcfce7; color: var(--success); font-size: 2rem; font-weight: 900; }
.success-card h2 { margin: 0; }
.success-card p { color: var(--muted); }
.booking-code { margin: 20px 0; padding: 14px; border: 2px dashed var(--accent); border-radius: 12px; background: #f7fee7; color: var(--primary-strong); font-size: 1.3rem; font-weight: 900; letter-spacing: .06em; }
.success-detail { margin-bottom: 20px; color: #475569; font-size: .9rem; }

.admin-overlay { position: fixed; inset: 0; z-index: 400; display: none; background: #f8fafc; }
.admin-overlay.is-open { display: block; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-sidebar { display: flex; flex-direction: column; gap: 28px; padding: 24px; background: #0f172a; color: #fff; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav button { padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; text-align: left; font-weight: 700; }
.admin-sidebar nav button:hover, .admin-sidebar nav button.active { background: #1e293b; color: #fff; }
.admin-sidebar .btn { margin-top: auto; color: #fff; border-color: #334155; }
.admin-content { min-width: 0; padding: 30px; overflow: auto; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-topbar h2 { margin: 0; font-size: 2rem; }
.admin-mobile-close { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--surface-2); font-weight: 700; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-stat span { color: var(--muted); font-size: .8rem; }
.admin-stat strong { display: block; margin-top: 7px; font-size: 1.6rem; }
.admin-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow-x: auto; }
.admin-card h3 { margin: 0 0 16px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .84rem; vertical-align: middle; }
.admin-table th { color: #64748b; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-actions button { padding: 7px 9px; border: 0; border-radius: 8px; font-size: .74rem; font-weight: 750; }
.action-confirm { background: #dcfce7; color: #166534; }
.action-cancel { background: #fee2e2; color: #991b1b; }
.action-complete { background: #dbeafe; color: #1e40af; }
.court-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.court-admin-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.court-admin-card h3 { margin: 0; }
.court-admin-card p { margin: 8px 0; color: var(--muted); }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 500; display: grid; gap: 10px; }
.toast { max-width: 360px; padding: 13px 15px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: var(--shadow); font-size: .88rem; animation: toastIn .25s ease; }
.toast.error { background: #991b1b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.reveal { animation: rise .7s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero { min-height: auto; }
  .court-grid { grid-template-columns: repeat(2, 1fr); }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .court-admin-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .section { padding: 68px 0; }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 74px; left: 16px; right: 16px; display: none; align-items: stretch; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  .main-nav.is-open { display: grid; gap: 12px; }
  .hero-grid { padding-block: 32px; }
  .hero h1 { font-size: 3.25rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .section-heading { display: grid; gap: 14px; }
  .court-grid { grid-template-columns: 1fr; }
  .schedule-filter { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .lookup-form { grid-template-columns: 1fr; }
  .booking-result-card { grid-template-columns: 1fr; }
  .cta-card { display: grid; padding: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
  .two-cols { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 20px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .court-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.65rem; }
  .hero-actions { display: grid; }
  .slots-grid { grid-template-columns: 1fr 1fr; padding: 16px; }
  .schedule-filter { padding: 16px; }
  .quick-book-card, .modal-card { padding: 22px; }
  .admin-stats { grid-template-columns: 1fr; }
}
