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

:root {
    --gold: #C9A96E;
    --gold-light: #E2CFA0;
    --bg: #0A0A0C;
    --bg-card: #12121A;
    --bg-sidebar: #0E0E14;
    --border: rgba(255,255,255,0.06);
    --text: #E8E8E8;
    --text-dim: #6B6B6B;
    --text-muted: #3A3A3A;
    --green: #34C759;
    --red: #FF3B30;
    --blue: #007AFF;
    --orange: #FF9500;
    --font: 'Montserrat', sans-serif;
    --font-display: 'Bebas Neue', sans-serif;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

/* LOGIN */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.login-screen.hidden { display: none; }

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 50px 40px;
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
}
.login-card h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
}
.login-card input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.3s;
}
.login-card input:focus { border-color: var(--gold); }
.login-card button {
    width: 100%;
    padding: 14px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s;
}
.login-card button:hover { background: var(--gold-light); }
.login-error { color: var(--red); font-size: 0.8rem; margin-top: 12px; }
.hidden { display: none !important; }

/* DASHBOARD LAYOUT */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-header img { width: 36px; height: 36px; border-radius: 50%; }
.sidebar-header span { font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 2px; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: all 0.2s;
    position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.nav-item.active { background: rgba(201,169,110,0.1); color: var(--gold); }

.badge {
    position: absolute;
    right: 12px;
    background: var(--red);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
#userName { font-size: 0.8rem; font-weight: 600; }
.role-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(201,169,110,0.15);
    color: var(--gold);
}
.logout-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* MAIN */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 50;
}
.top-bar h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 2px;
}
.today-date { font-size: 0.75rem; color: var(--text-dim); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.menu-toggle span { width: 20px; height: 1.5px; background: var(--text); }

.content-area { padding: 30px; flex: 1; }

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}
.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    letter-spacing: 1px;
}
.stat-value.gold { color: var(--gold); }
.stat-value.green { color: var(--green); }

/* TABLES */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 14px 16px;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* STATUS BADGES */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.status-confirmed { background: rgba(52,199,89,0.15); color: var(--green); }
.status-completed { background: rgba(0,122,255,0.15); color: var(--blue); }
.status-cancelled { background: rgba(255,59,48,0.15); color: var(--red); }
.status-no_show { background: rgba(255,149,0,0.15); color: var(--orange); }

/* ACTION BUTTONS */
.action-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
}
.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.danger:hover { border-color: var(--red); color: var(--red); }

/* SECTION HEADER */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-bar h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-input {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
}
.filter-input:focus { border-color: var(--gold); }

.add-btn {
    padding: 8px 20px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}
.add-btn:hover { background: var(--gold-light); }

/* MESSAGES */
.message-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}
.message-card.unread { border-left: 3px solid var(--gold); }
.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.message-sender { font-weight: 600; font-size: 0.85rem; }
.message-date { font-size: 0.7rem; color: var(--text-dim); }
.message-body { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }
.message-contact { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }

/* FINANCE CHART PLACEHOLDER */
.chart-placeholder {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 24px;
}
.modal input, .modal select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    margin-bottom: 12px;
    outline: none;
}
.modal input:focus, .modal select:focus { border-color: var(--gold); }
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
}
.modal-save { background: var(--gold); color: var(--bg); }
.modal-cancel { background: transparent; border: 1px solid var(--border) !important; color: var(--text-dim); }

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 0.85rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .data-table { font-size: 0.75rem; }
    .content-area { padding: 20px 16px; }
}
