:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F0FF;
    --secondary: #6366F1;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    --dark: #1E293B;
    --gray-900: #0F172A;
    --gray-800: #1E293B;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748B;
    --gray-400: #94A3B8;
    --gray-300: #CBD5E1;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --gray-50: #F8FAFC;
    --white: #FFFFFF;
    --sidebar-width: 280px;
    --header-height: 70px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.login-container { width: 100%; max-width: 420px; }

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo i { font-size: 48px; color: var(--primary); margin-bottom: 16px; display: block; }
.login-logo h1 { font-size: 24px; font-weight: 700; color: var(--gray-900); }
.login-logo p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }

/* LAYOUT */
.app-container { display: flex; min-height: 100vh; }

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

.sidebar-header { padding: 24px; border-bottom: 1px solid var(--gray-700); }

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
}

.sidebar-logo i { font-size: 28px; color: var(--primary); }
.sidebar-logo span { font-size: 18px; font-weight: 700; }

.sidebar-nav { padding: 16px 12px; }
.nav-section { margin-bottom: 24px; }

.nav-section-title {
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover { background: var(--gray-800); color: var(--white); }
.nav-link.active { background: var(--primary); color: var(--white); }
.nav-link i { width: 20px; text-align: center; font-size: 16px; }

.nav-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* MAIN CONTENT */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }

/* HEADER */
.header {
    background: var(--white);
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
}

.page-title { font-size: 20px; font-weight: 700; color: var(--gray-900); }

.header-right { display: flex; align-items: center; gap: 16px; }

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.header-btn:hover { background: var(--gray-200); }

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info { line-height: 1.3; }
.user-name { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.user-role { font-size: 12px; color: var(--gray-500); }

/* CONTENT */
.content { padding: 32px; }

/* CARDS */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.card-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.card-body { padding: 24px; }

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #D1FAE5; color: var(--success); }
.stat-icon.orange { background: #FEF3C7; color: var(--warning); }
.stat-icon.red { background: #FEE2E2; color: var(--danger); }
.stat-icon.purple { background: #EDE9FE; color: var(--secondary); }

.stat-content { flex: 1; }
.stat-label { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--gray-900);
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 100px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #DC2626; }
.btn-warning { background: var(--warning); color: var(--white); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

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

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

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover { background: var(--gray-50); }
.table td { font-size: 14px; color: var(--gray-700); }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #D1FAE5; color: #047857; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-danger { background: #FEE2E2; color: #B91C1C; }
.badge-info { background: #CFFAFE; color: #0E7490; }
.badge-secondary { background: var(--gray-200); color: var(--gray-600); }

/* ALERTS */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success { background: #D1FAE5; color: #047857; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.alert-info { background: #CFFAFE; color: #0E7490; border: 1px solid #A5F3FC; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 64px; color: var(--gray-300); margin-bottom: 20px; }
.empty-state h3 { font-size: 18px; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); margin-bottom: 24px; }

/* FILTERS */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item label { font-size: 13px; font-weight: 500; color: var(--gray-600); }

.filter-item select, .filter-item input {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
}

.search-box { position: relative; }
.search-box input { padding-left: 44px; }
.search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }

/* SERVICE CARDS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.service-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.service-card:hover { border-color: var(--primary); }
.service-card.selected { border-color: var(--primary); background: var(--primary-light); }
.service-card input[type="checkbox"] { display: none; }

.service-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.service-card-name { font-weight: 600; color: var(--gray-900); }
.service-card-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.service-card-desc { font-size: 13px; color: var(--gray-500); }
.service-card-time { font-size: 12px; color: var(--gray-400); margin-top: 8px; }
.service-card-time i { margin-right: 4px; }

/* ORDER SUMMARY */
.order-summary {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px;
}

.order-summary-title {
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--gray-200);
    font-size: 18px;
    font-weight: 700;
}

/* QUICK ACTIONS */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-action-text h4 { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.quick-action-text p { font-size: 12px; color: var(--gray-500); }

/* SIDEBAR OVERLAY */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active { display: block; }

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .content { padding: 20px; }
}

@media (max-width: 768px) {
    .header { padding: 0 16px; }
    .user-info { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .btn-group { width: 100%; }
    .btn-group .btn { flex: 1; }
    .table th, .table td { padding: 10px 12px; font-size: 13px; }
    .hide-mobile { display: none; }
}

@media (max-width: 480px) {
    .stat-card { flex-direction: column; text-align: center; }
    .stat-value { font-size: 24px; }
    .quick-actions { grid-template-columns: 1fr; }
}

/* PRINT */
@media print {
    .sidebar, .header, .btn, .no-print { display: none !important; }
    .main-content { margin: 0; }
    .content { padding: 0; }
}
