:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #10b981; 
    --accent-hover: #059669;
    --danger: #ef4444;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); padding: 40px 20px; }

.admin-body {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

.container { max-width: 1000px; margin: 0 auto; width: 100%; }
header { margin-bottom: 40px; text-align: center; }
header h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 8px; }
header p { color: var(--text-muted); }

.booking-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.booking-card h2, .booking-card h3 { font-size: 1.25rem; margin-bottom: 20px; font-weight: 700; }

.court-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.court-option input, .slot-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.court-box, .slot-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.2s ease; font-weight: 600; }

.court-option input:checked + .court-box,
.slot-option input:checked + .slot-box { border-color: var(--accent); background-color: rgba(16, 185, 129, 0.08); color: var(--accent); }

.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.slot-box { padding: 12px; font-size: 0.9rem; }
.slot-box small { margin-top: 4px; font-size: 0.75rem; color: var(--text-muted); }
.slot-option.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.slot-option.disabled .slot-box { background: var(--border); }

.form-group-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; display: flex; flex-direction: column; margin-bottom: 16px; }
label { font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border); background: var(--bg-main); color: var(--text-main); border-radius: 8px; font-size: 1rem; transition: border 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.btn-primary { background: var(--accent); color: white; border: none; padding: 14px 24px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; width: 100%; transition: background 0.15s ease; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.placeholder-text, .hint { color: var(--text-muted); font-size: 0.9rem; }
.alert { padding: 16px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 500; }
.alert.success { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert.error { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 24px; }

@media(max-width: 768px) {
    .form-group-row, .admin-grid { grid-template-columns: 1fr; flex-direction: column; }
}

/* Style for slots that are in the past */
.custom-slot-btn.slot-past {
    background: rgba(100, 100, 100, 0.05);
    border-color: rgba(100, 100, 100, 0.1);
    color: #888;
    cursor: not-allowed;
    text-decoration: line-through;
}