:root {
    --bg: #0f1724;
    --card: #0b1220;
    --muted: #94a3b8;
    --accent: #06b6d4;
    --accent-2: #7c3aed;
    --success: #16a34a;
    --danger: #ef4444;
    --glass: rgba(255,255,255,0.03);
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: linear-gradient(180deg,#071227 0%, #041022 100%);
    color: #e6eef8;
    min-height: 100vh;
}

.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    padding: 24px;
}

.sidebar {
    background: var(--card);
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
}

.brand { font-weight: 700; letter-spacing: 0.2px; margin-bottom: 12px; }

.nav { display: flex; flex-direction: column; gap: 8px; }

.nav button {
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 10px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.nav button.active {
    background: linear-gradient(90deg,var(--accent),var(--accent-2));
    color: #041022;
    font-weight: 600;
}

.nav button:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}

.main { padding: 18px; }
h2 { margin: 0 0 10px 0; }

.grid { display: grid; gap: 12px; }

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    padding: 14px;
    border-radius: 12px;
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 14px;
}

th { color: var(--muted); font-weight: 600; }

.btn {
    padding: 8px 10px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.btn.primary {
    background: linear-gradient(90deg,var(--accent),var(--accent-2));
    color: #041022;
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.04);
    color: inherit;
}

.btn.success {
    background-color: var(--success);
    color: #fff;
    cursor: default;
}

.schedule {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 12px;
}

.schedule .card {
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 10px;
}

.schedule .card strong { display: block; margin-bottom: 6px; }

.slot {
    background: rgba(255,255,255,0.04);
    padding: 6px;
    border-radius: 6px;
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.slot.booked { border-left: 4px solid var(--accent-2); }

input {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    margin-top: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--card);
    color: #fff;
}

.cms-list { display: flex; flex-direction: column; gap: 8px; }
.cms-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

/* ---------------------- */
/* Modal styling          */
/* ---------------------- */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3,6,12,0.6);
    z-index: 60;
}

.modal.show { display: flex; }

.modal .box {
    width: 70%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.modal-body img.zoomable {
    max-width: 100%;
    max-height: 60vh;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.modal-body img.zoomable:hover {
    transform: scale(1.5);
    cursor: zoom-out;
}

#closeModal {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    cursor: pointer;
    font-size: 20px;
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Helpers */
.flex { display: flex; gap: 12px; align-items: center; }
input[type="file"] { display: none; }
.small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* Paid state styling */
td span.paid {
    color: var(--success);
    font-weight: 600;
}
