:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1a2e;
    --sidebar-hover: #16213e;
    --topbar-height: 70px;
    --primary: #c9a96e;
    --primary-dark: #a8884d;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 1.5rem;
}

.sidebar-brand h3 span { color: #fff; }
.sidebar-brand small { color: rgba(255,255,255,0.4); font-size: 0.75rem; }

.sidebar-nav { padding: 15px 0; }

.sidebar-nav .nav-section {
    padding: 10px 20px 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.sidebar-nav .nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-item.active {
    background: rgba(201,169,110,0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-nav .nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left h5 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text);
    cursor: pointer;
    display: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-right .user-info {
    text-align: right;
}

.topbar-right .user-info .name {
    font-size: 0.85rem;
    font-weight: 600;
}

.topbar-right .user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.topbar-right .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

/* Page Content */
.page-content { padding: 30px; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body { padding: 24px; }

/* Stats Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Tables */
.table-container { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table tr:hover { background: rgba(0,0,0,0.01); }
.table tr:last-child td { border-bottom: none; }

/* Buttons */
.btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-secondary { background: var(--text-muted); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 30px; font-size: 1rem; }

/* Forms */
.form-control, .form-select {
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: #fff;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.1);
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

/* Appointment Timeline */
.appointment-timeline {
    position: relative;
}

.time-row {
    display: flex;
    border-bottom: 1px solid var(--border);
    min-height: 50px;
}

.time-label {
    width: 80px;
    padding: 15px 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    text-align: center;
}

.time-slots {
    flex: 1;
    display: flex;
    gap: 5px;
    padding: 5px;
}

.appointment-block {
    flex: 1;
    background: rgba(201,169,110,0.1);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
}

.appointment-block:hover {
    background: rgba(201,169,110,0.2);
}

.appointment-block .customer {
    font-weight: 600;
    font-size: 0.85rem;
}

.appointment-block .service {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.appointment-block .time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex !important; }

.modal {
    background: var(--card-bg) !important;
    border-radius: var(--radius) !important;
    width: 90% !important;
    max-width: 550px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: auto !important;
    height: auto !important;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h5 { font-family: 'Inter', sans-serif; font-weight: 600; }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.bg-primary { background: rgba(201,169,110,0.15); color: var(--primary); }
.bg-success { background: rgba(16,185,129,0.15); color: var(--success); }
.bg-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.bg-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.bg-info { background: rgba(59,130,246,0.15); color: var(--info); }
.bg-secondary { background: rgba(148,163,184,0.15); color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .toggle-sidebar { display: block; }
    .page-content { padding: 20px; }
    .topbar { padding: 0 20px; }
}

/* Calendar */
.calendar-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    position: relative;
    border: 1px solid transparent;
}

.calendar-day:hover {
    background: var(--bg);
    border-color: var(--border);
}

.calendar-day.today {
    border-color: var(--primary);
    font-weight: 600;
}

.calendar-day.selected {
    background: var(--primary);
    color: #fff;
}

.calendar-day.other-month {
    color: var(--text-muted);
    opacity: 0.5;
}

.calendar-day .day-count {
    font-size: 0.65rem;
    background: rgba(201,169,110,0.15);
    color: var(--primary);
    padding: 0 6px;
    border-radius: 10px;
    margin-top: 2px;
}

.calendar-day.selected .day-count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: auto;
    min-width: 150px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0d0d, #1a1a2e);
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}

.login-card .brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-card .brand h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.login-card .brand h2 span { color: var(--text); }
.login-card .brand p { color: var(--text-muted); font-size: 0.85rem; }

.login-card .form-control {
    padding: 12px 16px;
}

/* Charts placeholder */
.chart-placeholder {
    height: 300px;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
