/* Dashboard Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 76px);
}

.dashboard-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 2rem 0;
}

.sidebar-menu .nav-link {
    color: #6c757d;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-menu .nav-link:hover {
    background: #f8f9fa;
    color: #495057;
}

.sidebar-menu .nav-link.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.sidebar-menu .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0056b3;
}

.sidebar-menu .badge {
    margin-left: auto;
    font-size: 0.7rem;
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.section-header p {
    color: #6c757d;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Orders */
.orders-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.order-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.order-item:hover {
    background: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

.order-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.completed {
    background: #d4edda;
    color: #155724;
}

.order-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-status.processing {
    background: #cce5ff;
    color: #004085;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.order-info h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
}

.order-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.order-amount {
    text-align: right;
}

.order-amount .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.order-amount .date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Filters */
.orders-filter {
    margin-bottom: 1.5rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-buttons .btn {
    border-radius: 20px;
    transition: all 0.2s ease;
}

.filter-buttons .btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Profile Form */
.profile-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Settings */
.settings-groups {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.setting-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.setting-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-group h5 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info label {
    font-weight: 500;
    color: #333;
    margin: 0;
}

.setting-info small {
    color: #6c757d;
    display: block;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Communication Preferences */
.communication-preferences {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.preference-group {
    margin-bottom: 2rem;
}

.preference-group h5 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.preference-item {
    margin-bottom: 1rem;
}

.preference-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.preference-item small {
    color: #6c757d;
    margin-left: 2rem;
    display: block;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.time-range label {
    font-weight: 500;
    color: #333;
}

.time-range input {
    max-width: 120px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 25px;
    font-size: 0.9rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Loading State */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #6c757d;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        order: 2;
    }
    
    .dashboard-main {
        order: 1;
        padding: 1rem;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .sidebar-menu .nav {
        flex-direction: row;
        white-space: nowrap;
    }
    
    .sidebar-menu .nav-link {
        padding: 0.75rem 1rem;
        min-width: max-content;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .order-details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .order-amount {
        text-align: center;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .time-range {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.dashboard-section.active {
    animation: fadeIn 0.3s ease;
}
