.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 100px;
    margin-bottom: 50px;
}

.dashboard-sidebar {
    background: var(--bg-card, #fff);
    border-radius: 15px;
    padding: 2rem 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.user-profile-summary {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.user-profile-summary .avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary, #4F46E5), #818cf8);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.user-profile-summary h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-main, #333);
    font-weight: 600;
}

.user-profile-summary p {
    margin: 0;
    color: var(--text-muted, #777);
    font-size: 0.9rem;
    word-break: break-all;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main, #333);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Outfit', sans-serif;
}

.tab-btn i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #888;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary, #4F46E5);
}

.tab-btn:hover i {
    color: var(--primary, #4F46E5);
}

.tab-btn.active {
    background: var(--primary, #4F46E5);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.tab-btn.active i {
    color: #fff;
}

.tab-btn.text-danger {
    color: #e74c3c;
    margin-top: 1rem;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.tab-btn.text-danger i {
    color: #e74c3c;
}

.tab-btn.text-danger:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.dashboard-content {
    background: var(--bg-card, #fff);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

.tab-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-main, #333);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
    font-weight: 600;
}

/* Form Styling */
.settings-form {
    max-width: 600px;
}

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

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

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
    font-family: inherit;
    transition: 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary, #4F46E5);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    color: #888;
}

.btn-update {
    padding: 1rem 2rem;
    background: var(--primary, #4F46E5);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-update:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 56, 202, 0.2);
}

/* Orders CSS */
.order-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    transition: 0.3s;
    background: #fafafa;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
}

.order-header {
    flex: 1 1 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.order-id {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
}

.order-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.order-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-delivered {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.status-processing {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

.order-details {
    flex: 1;
}

.order-details p {
    margin: 0.4rem 0;
    color: #555;
    font-size: 0.95rem;
}

.order-actions {
    display: flex;
    align-items: center;
}

.btn-view {
    padding: 0.6rem 1.2rem;
    background: #e2e8f0;
    color: #334155;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn-view:hover {
    background: #cbd5e1;
}

/* Dashboard Stats */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.stat-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-card h4 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 800;
}

.stat-card p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        margin-top: 80px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Custom Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .custom-modal {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.custom-modal h3 {
    margin: 0 0 0.5rem;
    color: #333;
    font-size: 1.4rem;
}

.custom-modal p {
    margin: 0 0 1.5rem;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    flex: 1;
}

.btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.btn-confirm {
    background: #e74c3c;
    color: #fff;
}

.btn-confirm:hover {
    background: #c0392b;
}

/* Admin Dashboard Styles */
.admin-table-container table th {
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 8px;
}

.admin-table-container table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
    vertical-align: middle;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-badge.admin {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.role-badge.user {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.btn-table-action {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-table-action.toggle-role {
    background: #f1f5f9;
    color: #475569;
    margin-right: 0.5rem;
}

.btn-table-action.toggle-role:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-table-action.delete-user {
    background: #fee2e2;
    color: #ef4444;
}

.btn-table-action.delete-user:hover {
    background: #fecaca;
    color: #dc2626;
}

.btn-table-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inner-admin-tab {
    border-bottom: 3px solid transparent !important;
}

.inner-admin-tab.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

.btn-table-action.edit-item {
    background: #e0f2fe;
    color: #0369a1;
    margin-right: 0.5rem;
}

.btn-table-action.edit-item:hover {
    background: #bae6fd;
    color: #075985;
}

/* Animated Tracking Stepper */
.order-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 1.75rem;
    padding: 0.5rem 0;
    width: 100%;
    flex: 1 1 100%;
    margin-bottom: 0.5rem;
}

.tracker-line-bg {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    z-index: 1;
}

.tracker-line-progress {
    position: absolute;
    top: 25px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #4F46E5) 0%, #a855f7 100%);
    border-radius: 2px;
    z-index: 2;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

html[lang="ar"] .tracker-line-progress {
    left: auto;
    right: 0;
    background: linear-gradient(270deg, var(--primary, #4F46E5) 0%, #a855f7 100%);
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    flex: 1;
}

.step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    font-size: 1.1rem;
}

.tracker-step.active .step-icon {
    border-color: var(--primary, #4F46E5);
    color: var(--primary, #4F46E5);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.15);
}

.tracker-step.current .step-icon {
    border-color: #a855f7;
    color: #fff;
    background: #a855f7;
    animation: pulse-step 2s infinite;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: #94a3b8;
    text-align: center;
    transition: color 0.4s ease;
}

.tracker-step.active .step-label {
    color: var(--text-main, #1F2937);
}

.tracker-step.current .step-label {
    color: #a855f7;
}

@keyframes pulse-step {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
    }
}
