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

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #f093fb;
    --success: #4caf50;
    --error: #d32f2f;
    --warning: #ff9800;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
}

.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--radius);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 18px;
}

.sidebar-footer {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-bar h1 {
    font-size: 24px;
}

.top-bar-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    padding: 10px 15px;
    border: 1px solid var(--border-gray);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--light-gray);
    border-color: var(--primary);
}

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

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

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

.section-header h2 {
    font-size: 20px;
}

.filters {
    display: flex;
    gap: 10px;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* Appointments List */
.appointments-list {
    display: grid;
    gap: 15px;
}

.appointment-card {
    background: white;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.appointment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.appointment-title {
    font-size: 16px;
    font-weight: 600;
}

.appointment-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-confirmed {
    background: #e3f2fd;
    color: #1565c0;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.appointment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
}

.detail-item {
    display: flex;
    gap: 8px;
}

.detail-label {
    font-weight: 500;
    color: var(--text-light);
    min-width: 80px;
}

.appointment-actions {
    display: flex;
    gap: 10px;
}

.appointment-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--border-gray);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.appointment-actions button:hover {
    background: var(--light-gray);
    border-color: var(--primary);
}

/* Services List */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.service-name {
    font-size: 16px;
    font-weight: 600;
}

.service-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.service-type-badge.free {
    background: #e8f5e9;
    color: #2e7d32;
}

.service-type-badge.paid {
    background: #fff3e0;
    color: #e65100;
}

.service-info {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.service-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

.service-actions {
    display: flex;
    gap: 10px;
}

.service-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-gray);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.service-actions button:hover {
    background: var(--light-gray);
}

/* Availability Grid */
.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.availability-card {
    background: white;
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.availability-day {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.availability-time {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.availability-actions {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.availability-actions button {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border-gray);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.close-btn:hover {
    color: var(--text-dark);
}

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

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.settings-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-card h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--radius);
    color: white;
    display: none;
    z-index: 2000;
    animation: slideIn 0.3s;
}

.notification.show {
    display: block;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--error);
}

.notification.warning {
    background: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-column: 1;
        flex-direction: row;
        padding: 10px;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 5px;
    }

    .nav-item {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
    }

    .nav-item .icon {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: start;
        gap: 10px;
    }

    .services-list,
    .availability-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .appointment-details {
        grid-template-columns: 1fr;
    }
}
