:root {
    --primary: #166534;
    --primary-dark: #14532d;
    --primary-soft: #dcfce7;
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --warning: #b45309;
    --success: #15803d;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; }

/* Public frontend */
.public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #eefcf3 100%);
}
.public-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
}
.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(22, 101, 52, .22);
}
.admin-login-btn, .secondary-link {
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.hero-wrap {
    max-width: 1180px;
    margin: 10px auto 50px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 32px;
    align-items: center;
}
.hero-copy h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    margin: 0 0 18px;
    letter-spacing: -0.05em;
}
.hero-copy p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 24px;
    max-width: 620px;
}
.hero-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-badges span {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    color: #334155;
}
.booking-card, .card {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}
.booking-card h2, .card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}
.card-subtitle {
    color: var(--muted);
    margin: 0 0 22px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
label {
    display: block;
    margin-bottom: 7px;
    font-weight: 750;
    color: #1f2937;
    font-size: 14px;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
    font-size: 15px;
    transition: .2s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, .12);
}
.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    transition: .2s ease;
    font-size: 15px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-light { background: #f8fafc; color: #0f172a; border: 1px solid var(--border); }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-warning { background: #fef3c7; color: #92400e; }
.btn-success { background: #dcfce7; color: #14532d; }
.btn-sm { padding: 8px 11px; font-size: 13px; border-radius: 11px; }
.w-100 { width: 100%; }
.slot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.slot-option input { display: none; }
.slot-option span {
    display: block;
    text-align: center;
    padding: 12px 8px;
    border-radius: 13px;
    border: 1px solid var(--border);
    font-weight: 800;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
}
.slot-option input:checked + span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.empty-slots {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
    border: 1px dashed var(--border);
}
.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin: 0 0 18px;
    font-weight: 700;
}
.alert-success { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Admin */
.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}
.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand-box {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #22c55e;
    font-size: 30px;
    font-weight: 900;
}
.brand-box h2 { margin: 0; font-size: 20px; }
.brand-box p { margin: 2px 0 0; color: #94a3b8; font-size: 13px; }
.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}
.side-nav a {
    text-decoration: none;
    color: #cbd5e1;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 750;
}
.side-nav a:hover, .side-nav a.active { background: rgba(34,197,94,.16); color: #fff; }
.side-nav .logout-link { margin-top: 12px; background: rgba(248,113,113,.14); color: #fecaca; }
.admin-main { padding: 26px; min-width: 0; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.stat-card p { margin: 0 0 8px; color: var(--muted); font-weight: 800; }
.stat-card h3 { margin: 0; font-size: 36px; }
.admin-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}
th, td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
th {
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #f8fafc;
}
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(34,197,94,.22), transparent 35%),
        linear-gradient(135deg, #0f172a 0%, #14532d 100%);
}
.login-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 26px;
    padding: 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,.22);
}
.login-card h1 { margin: 0 0 6px; font-size: 30px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.quick-note {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px;
    color: #475569;
    font-size: 14px;
    margin-top: 16px;
}

@media (max-width: 980px) {
    .hero-wrap { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .public-header { padding: 14px 16px; }
    .hero-wrap { padding: 0 16px; gap: 20px; }
    .booking-card, .card { padding: 18px; border-radius: 18px; }
    .form-grid, .stats-grid, .filter-row { grid-template-columns: 1fr; }
    .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .side-nav { grid-template-columns: 1fr; }
    .admin-main { padding: 16px; }
    .topbar h1 { font-size: 24px; }
    .hero-copy h1 { font-size: 38px; }
}
