@font-face {
    font-family: 'MiSansArabic';
    src: url('../webfonts/MiSansArabic-Normal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Airtable-inspired Color Palette */
    --primary-50: #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-300: #cbd5e1;
    --primary-400: #94a3b8;
    --primary-500: #64748b;
    --primary-600: #475569;
    --primary-700: #334155;
    --primary-800: #1e293b;
    --primary-900: #0f172a;
    
    --accent-50: #ecfdf5;
    --accent-100: #d1fae5;
    --accent-200: #a7f3d0;
    --accent-300: #6ee7b7;
    --accent-400: #34d399;
    --accent-500: #10b981;
    --accent-600: #059669;
    --accent-700: #047857;
    --accent-800: #065f46;
    --accent-900: #064e3b;
    
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-300: #fcd34d;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;
    
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-200: #fecaca;
    --danger-300: #fca5a5;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    --danger-800: #991b1b;
    --danger-900: #7f1d1d;
    
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    
    --red-50:  #ffe5e9;
    --red-100: #ffccd1;
    --red-200: #ff99a3;
    --red-300: #ff6675;
    --red-400: #ff3347;
    --red-500: #ff0019;
    --red-600: #cc0014;
    --red-700: #99000f;
    --red-800: #66000a;
    --red-900: #330005;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --surface: #ffffff;
    --surface-secondary: #f9fafb;
    --surface-hover: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'MiSansArabic';
    background-color: var(--surface-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
}

.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-sections {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.nav-sections a {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.nav-sections a.background {
    background-color: var(--surface-secondary);
}

.nav-sections a i {
    font-size: 15px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-sections a.background:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.nav-sections a:hover i {
    color: var(--text-primary);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-title-container i {
    font-size: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    padding: 8px;
    border-radius: 10px;
}

.sidebar-dalya-way-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-dalya-way-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-toggle i {
    pointer-events: none;
}


.sidebar-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.nav-right .nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-right .nav-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-right .nav-user span {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-search {
    position: relative;
}

.nav-search input {
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-secondary);
    font-size: 14px;
    width: 280px;
    transition: all 0.2s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
}

.nav-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-notifications {
    position: relative;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.nav-notifications:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-500);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-secondary);
}

.nav-user:hover {
    background: var(--surface-hover);
}

.nav-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.nav-user span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Sidebar Coach Dalya Styles */
.sidebar-dalya-way {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-dalya-way.active {
    right: 0;
}

.sidebar-dalya-way-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-dalya-way-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sidebar-dalya-way-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-dalya-way-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-dalya-way-content a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-dalya-way-content a i {
    font-size: 16px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.sidebar-dalya-way-content a:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-dalya-way-content a:hover i {
    color: var(--text-primary);
}

body.sidebar-dalya-way-open {
    overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar-dalya-way-toggle {
        display: block;
    }

    .desktop-nav {
        display: none;
    }

    .nav-right {
        /* display: none; */
    }

    .nav-content {
        justify-content: space-between;
    }

    /* .nav-left {
        flex: 1;
        justify-content: space-between;
        flex-direction: row-reverse;
    } */

    .nav-title-container {
        order: 1;
    }

    .sidebar-dalya-way-toggle {
        order: 0;
    }
}

@media (max-width: 480px) {
    .sidebar-dalya-way {
        width: 250px;
    }

    .nav-title {
        font-size: 18px;
    }

    .nav-title-container i {
        font-size: 18px;
    }

    .sidebar-dalya-way-content a {
        font-size: 14px;
        padding: 8px 12px;
    }

    .sidebar-dalya-way-content a i {
        font-size: 14px;
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 64px;
    right: 0;
    width: 280px;
    height: calc(100vh - 64px);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border-color);
    z-index: 999;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(100%);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar.initial-collapsed {
    transform: translateX(100%) !important;
}
        
@media (max-width: 768px) {
    .sidebar:not(.sidebar-loaded) {
        transform: translateX(100%) !important;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo i {
    font-size: 20px;
    color: var(--red-600);
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--blue-50);
    color: var(--red-700);
    border-left-color: var(--red-600);
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-top: 64px;
    padding: 32px;
    min-height: calc(100vh - 64px);
    transition: margin-right 0.3s ease;
}

@media (min-width: 1024px) {
    .main-content {
        margin-right: 280px;
    }
}

.main-content.expanded {
    margin-right: 0;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title {
    margin: 0;
    font-size: 25px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-description {
    margin: 8px 0 0;
    font-size: 16px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'MiSansArabic'
}

.btn-primary {
    background: var(--red-600);
    color: white;
    border-color: var(--red-600);
}

.btn-primary:hover {
    background: var(--red-700);
    border-color: var(--red-700);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary-300);
}

.btn-success {
    background: var(--accent-600);
    color: white;
    border-color: var(--accent-600);
}

.btn-success:hover {
    background: var(--accent-700);
    border-color: var(--accent-700);
}

.btn-warning {
    background: var(--warning-500);
    color: white;
    border-color: var(--warning-500);
}

.btn-warning:hover {
    background: var(--warning-600);
    border-color: var(--warning-600);
}

.btn-danger {
    background: var(--danger-600);
    color: white;
    border-color: var(--danger-600);
}

.btn-danger:hover {
    background: var(--danger-700);
    border-color: var(--danger-700);
}

.btn-icon {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn-icon.edit:hover {
    background: var(--blue-50);
    color: var(--red-600);
}

.btn-icon.delete:hover {
    background: var(--danger-50);
    color: var(--danger-600);
}

/* Cards & Containers */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stat-card.pointer{ 
    cursor: pointer;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.categories {
    background: #000000;
}

.stat-icon.primary {
    background: var(--red-600);
}

.stat-icon.success {
    background: var(--accent-600);
}

.stat-icon.shipped {
    background: #000000;
}

.stat-icon.warning {
    background: var(--warning-500);
}

.stat-icon.danger {
    background: var(--danger-600);
}

.stat-icon.admins {
    background: var(--blue-500);
}

.stat-icon.exercises {
    background: var(--accent-500);
}

.stat-content h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0 4px;
}

.stat-number-orders {
    font-size: 25px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0 4px;
}

.stat-change {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.stat-change.positive {
    background: var(--accent-100);
    color: var(--accent-700);
}

.stat-change.negative {
    background: var(--danger-100);
    color: var(--danger-700);
}

/* Tables */
.table-container {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto; 
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1025px) {
    .table-container {
        overflow: visible !important;
    }
}

@media (max-width: 1400px) {
    .table-container {
        overflow: auto !important;
    }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--surface-secondary);
}

.data-table th {
    padding: 16px;
    /* text-align: right; */
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;        /* توسيط أفقي */
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.pending {
    background: var(--warning-100);
    color: var(--warning-800);
}

.status.delivered {
    background: var(--accent-100);
    color: var(--accent-800);
}

.status.cancelled {
    background: var(--danger-100);
    color: var(--danger-800);
}

.status.shipped {
    background: var(--red-100);
    color: var(--red-800);
}

.status.active {
    background: var(--accent-100);
    color: var(--accent-800);
}

.status.unactive {
    background: var(--danger-100);
    color: var(--danger-800);
}

.status.expired {
    background: var(--danger-100);
    color: var(--danger-800);
}

.status.info {
    background-color: #b3e5fc;
    color: #01579b;
}

/* Filters */
.filter-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input,
.filter-select,
.date-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 14px;
    font-family: 'MiSansArabic';
    transition: all 0.2s ease;
}

.search-input:focus,
.filter-select:focus,
.date-input:focus {
    outline: none;
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
}

.search-input {
    min-width: 280px;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 14px;
    font-family: 'MiSansArabic';
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.modal-form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Enhanced Order Modal Styles */
.orders-modal-enhanced .form-group-enhanced input:focus,
.orders-modal-enhanced .form-group-enhanced textarea:focus,
.orders-modal-enhanced .form-group-enhanced select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.orders-modal-enhanced .form-group-enhanced input:hover,
.orders-modal-enhanced .form-group-enhanced textarea:hover,
.orders-modal-enhanced .form-group-enhanced select:hover {
    border-color: #cbd5e1;
}

.orders-modal-enhanced .btn-add-product:hover {
    background: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.orders-modal-enhanced .modal-actions-enhanced button:hover {
    transform: translateY(-1px);
}

.orders-modal-enhanced .modal-actions-enhanced button[type="submit"]:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.orders-modal-enhanced .modal-actions-enhanced button[type="button"]:hover {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

.orders-modal-enhanced .modal-header-enhanced button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Order Product Row Enhancements */
.order-product-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.order-product-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-product-row select,
.order-product-row input {
    padding: 10px 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

.order-product-row select:focus,
.order-product-row input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.order-product-row .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
}

.order-product-row .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* تحسينات إضافية لصفوف المنتجات */
.products-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f9fafb;
}

.add-product-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 12px !important;
    width: 100% !important;
}

.add-product-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.order-product-row .total-display {
    background-color: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-align: center !important;
    line-height: 2.5 !important;
}

.order-product-row .form-label {
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

.order-product-row .form-label i {
    margin-left: 6px !important;
    color: #6b7280 !important;
}

/* Index Login */
.login-container {
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px 30px;
    text-align: center;
    font-family: 'MiSansArabic', sans-serif;
}

.register-container {
    max-width: 650px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

input[type="text"],
input[type="url"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-secondary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'MiSansArabic', sans-serif;
}

input:focus {
    outline: none;
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
}

.btn-primary {
    padding: 12px;
    background: var(--red-600);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    font-family: 'MiSansArabic', sans-serif;
}

.btn-update {
    padding: 12px;
    background: var(--accent-600);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    font-family: 'MiSansArabic', sans-serif;
}

.add-size {
    padding: 12px;
    background: var(--red-600);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    font-family: 'MiSansArabic', sans-serif;
}

.btn-primary:hover {
    background: var(--red-700);
}

/* SweetAlert Custom Style */
.swal2-popup {
    font-family: 'MiSansArabic', sans-serif !important;
    border-radius: var(--radius-lg);
}

.swal2-confirm {
    background-color: var(--red-600) !important;
    border: none;
    font-weight: bold;
    font-family: 'MiSansArabic', sans-serif !important;
}

.swal2-cancel {
    background-color: var(--text-secondary) !important;
    border: none;
    font-weight: bold;
    font-family: 'MiSansArabic', sans-serif !important;
}

.swal2-title {
    color: var(--text-primary);
    font-family: 'MiSansArabic', sans-serif !important;
}

.swal2-html-container {
    color: var(--text-secondary);
    font-family: 'MiSansArabic', sans-serif !important;
}

/* Center login-container only for login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-secondary);
}

.login-page .login-container {
    margin: 0 auto;
}

.sidebar-nav .btn-danger {
    background: var(--danger-600) !important;
    color: #fff !important;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-top: 24px;
    transition: background 0.2s;
}
.sidebar-nav .btn-danger:hover {
    background: var(--danger-700) !important;
    color: #fff !important;
}

.sidebar-nav .logout-link {
    margin-top: 32px;
    padding: 0 16px;
}
.sidebar-nav .logout-link .btn-danger {
    width: 100%;
    box-sizing: border-box;
    padding-right: 0;
    padding-left: 0;
}

.password-cell {
    position: relative;
}

.password-toggle {
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 8px;
}

.password-toggle:hover {
    color: #333;
}

.password-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 5px;
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 10px;
}

.password-dropdown::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 12px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent white transparent;
    z-index: 1001;
}

.password-dropdown::after {
    content: "";
    position: absolute;
    top: -9px;
    right: 12px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #ddd transparent;
    z-index: 1000;
}

.password-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-display {
    font-family: monospace;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    flex: 1;
    word-break: break-all;
    font-size: 13px;
}

.copy-password {
    cursor: pointer;
    color: #28a745;
    font-size: 14px;
    padding: 6px;
}

.copy-password:hover {
    color: #1e7e34;
}

/* .custom-status-select {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.status-display {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.status-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.status-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-weight: bold;
    border-radius: 6px;
    margin: 4px;
    cursor: pointer;
    white-space: nowrap;
    width: 100px;
}

.status-option:hover {
    opacity: 0.9;
}

.status-options.show-bottom {
    top: auto;
    bottom: 100%;
} */

.custom-status-select {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.status-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    min-width: 50px;
}

.status-options {
    display: none;
    position: absolute;
    top: auto;
    bottom: 100%;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: visible;
}

.status-option-users {
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    padding: 8px 12px;
    font-weight: bold;
    border-radius: 6px;
    margin: 4px;
    /* cursor: pointer; */
    /* white-space: nowrap; */
    /* width: 60px; */
    transition: background-color 0.2s;
    font-family: 'MiSansArabic';
    text-decoration: none;
}

.status-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-weight: bold;
    border-radius: 6px;
    margin: 4px;
    cursor: pointer;
    white-space: nowrap;
    width: 85px; 
    transition: background-color 0.2s;
    font-family: 'MiSansArabic';
}

.status-option:hover {
    opacity: 2.9;
}

.status.pending {
    background-color: #ffeeba;
    color: #856404;
}

.status.shipped {
    background-color: #b3e5fc;
    color: #01579b;
}

.status.delivered {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.status.cancelled {
    background-color: #ffcdd2;
    color: #b71c1c;
}

.status.success {
    background-color: #4caf50;
    color: #fff;
}

.status.danger {
    background-color: #d32f2f;
    color: #fff;
}


.status-options.show-below {
    top: 100%;
    bottom: auto;
}


#viewOrderModal .modal-content {
    max-width: 700px;
    width: 90%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: 90vh;
}

#viewOrderModal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#viewOrderModal .modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

#viewOrderModal .modal-close {
    font-size: 1.2rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

#viewOrderModal .modal-close:hover {
    color: var(--danger-600);
}

#viewOrderModal .modal-body {
    padding: 24px;
}

#viewOrderModal .form-group {
    margin-bottom: 24px;
}

#viewOrderModal .form-group h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary-100);
    padding-bottom: 8px;
}

#viewOrderModal .form-group p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--background);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

#viewOrderModal .form-group p:hover {
    background: var(--primary-50);
}

#viewOrderModal .form-group p strong {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

#viewOrderModal .form-group p span {
    text-align: left;
    flex-grow: 1;
}

@media (max-width: 600px) {
    #viewOrderModal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    #viewOrderModal .form-group p {
        flex-direction: column;
        gap: 4px;
    }

    #viewOrderModal .form-group p strong {
        min-width: unset;
    }
}

.modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
}

.card-content .sales-count-container {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-600);
}

.card-content .sales-count-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Inventory Card Layout */
.card-content {
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.quantity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    margin-bottom: 12px;
}

.quantity-item {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--background);
}

.quantity-item div:first-child {
    font-size: 24px;
    font-weight: 700;
}

.quantity-item div:last-child {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-content .total-quantity {
    color: var(--text-primary);
}

.card-content .available-quantity {
    color: var(--text-primary);
}

.card-content .sold-quantity {
    color: var(--primary-600);
}

.stat-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: var(--radius-md);
}
.stat-card a:hover {
    background-color: var(--surface-secondary);
    transition: background-color 0.2s;
}
.stat-icon.info {
    background-color: var(--info-600, #00b7eb);
}
.stat-icon.accent {
    background-color: #5700e3;
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.modal.active {
    display: flex;
}

/* Modal Content */
.modal-content {
    background: var(--surface, #ffffff);
    border-radius: var(--radius-lg, 8px);
    max-width: 600px;
    width: 100%;
    margin: 20px auto;
    box-shadow: var(--shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.1));
    direction: rtl;
}

.modal-content.orders {
    max-width: 800px;
}

.modal-content.messages-my-clients {
    max-width: 800px;
}

/* Modal Header */
.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary, #1a202c);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-muted, #6b7280);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary, #1a202c);
}

.modal-close i {
    font-size: 18px;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--red-600, #1e90ff);
    margin: 16px 0 8px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding-bottom: 8px;
}

.modal-body p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-primary, #1a202c);
}

.modal-body p strong {
    color: var(--text-secondary, #4a5568);
    margin-left: 8px;
}

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    text-align: left;
}

.btn {
    padding: 8px 16px;
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-secondary {
    background: var(--surface-secondary, #f9f9f9);
    border: 1px solid var(--border-color, #e0e0e0);
    color: var(--text-primary, #1a202c);
}

.btn-secondary:hover {
    background: var(--border-color, #e0e0e0);
}

.fa-spinner.fa-spin {
    animation: fa-spin 1s infinite linear;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.report-table th, .report-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: right;
}
.report-table th {
    background: var(--surface);
    font-weight: 600;
}

.custom-links-select {
    position: relative;
    display: inline-block;
}

.links-options {
    display: none;
    position: absolute;
    top: 110%;
    right: -6px;
    background: linear-gradient(145deg, #ffffff, #f1f1f1);
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 121px;
    animation: fadeIn 0.3s ease-in-out;
    overflow: hidden;
}

.links-options.show {
    display: block;
}

.link-option {
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    background-color: transparent;
    border-bottom: 1px solid #eee;
}

.link-option:last-child {
    border-bottom: none;
}

.link-option:hover {
    background: linear-gradient(to right, #f0f0f0, #e6e6e6);
    transform: scale(1.02);
}

.link-option a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    width: 100%;
    text-align: center;
    transition: color 0.2s;
}

.link-option a:hover {
    color: #000;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.category-section {
    margin-bottom: 40px;
}
.category-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.category-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-600);
}
.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.category-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-800);
    margin: 0;
}
.category-toggle {
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.category-toggle:hover {
    background: var(--primary-700);
    transform: scale(1.1);
}
.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}
.category-stat {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-100);
}
.category-stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 4px;
}
.category-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}
.category-products {
    display: none;
    animation: fadeIn 0.3s ease;
}
.category-products.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.empty-category {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-light);
}

/* Modal Background Overlay Enhancement */
.modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
}

/* Enhanced Animations */
@keyframes modalShow {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.orders-modal-enhanced {
    animation: modalShow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced Focus States */
.orders-modal-enhanced .form-group-enhanced input:focus,
.orders-modal-enhanced .form-group-enhanced select:focus,
.orders-modal-enhanced .form-group-enhanced textarea:focus {
    transform: translateY(-1px);
}

/* Success State for Form Fields */
.orders-modal-enhanced .form-group-enhanced input:valid:not(:placeholder-shown),
.orders-modal-enhanced .form-group-enhanced select:valid,
.orders-modal-enhanced .form-group-enhanced textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='m6.564.75-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 36px;
}

/* Enhanced Section Transitions */
.orders-modal-enhanced .form-section:nth-child(1) {
    animation-delay: 0.1s;
}

.orders-modal-enhanced .form-section:nth-child(2) {
    animation-delay: 0.2s;
}

.orders-modal-enhanced .form-section:nth-child(3) {
    animation-delay: 0.3s;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .orders-modal-enhanced {
        max-height: 95vh !important;
        margin: 10px !important;
    }
    
    .orders-modal-enhanced .modal-header-enhanced {
        padding: 20px 24px !important;
    }
    
    .orders-modal-enhanced .modal-header-enhanced h3 {
        font-size: 18px !important;
    }
    
    .orders-modal-enhanced .form-section {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .orders-modal-enhanced .section-header h4 {
        font-size: 14px !important;
    }
    
    .orders-modal-enhanced .modal-actions-enhanced {
        flex-direction: column !important;
    }
    
    .orders-modal-enhanced .modal-actions-enhanced button {
        width: 100% !important;
        justify-content: center !important;
    }
}

.btn-add-product {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

.btn-add-product:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3) !important;
}

.btn-add-product i {
    font-size: 12px !important;
}

/* تحسين زر حذف الصنف */
.order-product-row .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
}

.order-product-row .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.modal-body .client-data-table {
    width: 100%;
    border-collapse: collapse;
}
.modal-body .client-data-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.modal-body .client-data-table td:first-child {
    font-weight: bold;
    background-color: #f9f9f9;
    width: 30%;
}

.saved-accounts-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.saved-accounts-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-secondary);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: var(--red-500);
}

.sidebar-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-search {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-accounts-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-account-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 16px 8px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-account-item:hover {
    background: var(--surface-hover);
    border-color: var(--red-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-account-item.selected {
    background: var(--blue-50);
    border-color: var(--red-500);
}

.sidebar-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-left: 12px;
    flex-shrink: 0;
}

.sidebar-account-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.sidebar-account-info {
    flex: 1;
    min-width: 0;
}

.sidebar-account-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-account-username {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 2px;
}

.sidebar-account-last-login {
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-account-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-account-item:hover .sidebar-account-actions {
    opacity: 1;
}

.btn-quick-login,
.btn-remove {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-quick-login {
    background: var(--red-500);
    color: white;
}

.btn-quick-login:hover {
    background: var(--red-600);
    transform: scale(1.05);
}

.btn-remove {
    background: var(--danger-500);
    color: white;
}

.btn-remove:hover {
    background: var(--danger-600);
    transform: scale(1.05);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-secondary);
}

.btn-clear-all {
    width: 100%;
    padding: 10px 16px;
    background: var(--danger-500);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-clear-all:hover {
    background: var(--danger-600);
    transform: translateY(-1px);
}

.sidebar-open-btn {
    position: fixed;
    top: 90px;
    left: 50px;
    width: 60px;
    height: 60px;
    background: var(--red-500);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-open-btn:hover {
    background: var(--red-600);
    transform: scale(1.1) rotate(5deg);
}

.sidebar-account-item.favorite {
    background: var(--warning-50);
    border-color: var(--warning-300);
}

.sidebar-account-item.favorite .sidebar-account-avatar {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
}

.sidebar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.sidebar-loading i {
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.sidebar-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-search-results {
    animation: slideInLeft 0.3s ease forwards;
}

.no-search-results i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .saved-accounts-sidebar {
        width: 100%;
        max-width: 320px;
    }

    .sidebar-open-btn {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .sidebar-account-item {
        padding: 10px 16px;
        margin: 0 12px 6px;
    }

    .sidebar-account-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .sidebar-account-name {
        font-size: 13px;
    }

    .sidebar-account-username {
        font-size: 11px;
    }

    .sidebar-account-last-login {
        font-size: 10px;
    }
}

@media (min-width: 1200px) {
    .saved-accounts-sidebar {
        width: 350px;
    }
}

.sidebar-account-item {
    animation: slideInLeft 0.3s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-accounts-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-accounts-list::-webkit-scrollbar-track {
    background: var(--surface-secondary);
}

.sidebar-accounts-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-accounts-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.sidebar-account-item:active {
    transform: scale(0.98);
}

.saved-accounts-sidebar * {
    will-change: transform;
}

.form-enhancements {
    position: relative;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.input-group input:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px var(--red-100);
    outline: none;
}

.input-group label {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--surface);
    padding: 0 5px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: var(--red-500);
    font-weight: 600;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.caps-lock-warning {
    background: var(--warning-50);
    color: var(--warning-700);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--warning-200);
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-400), var(--red-500));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--blue-50) 100%);
    z-index: -1;
}

@media (max-width: 768px) {
    .input-group input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 16px;
    }
}

.password-strength,
.password-strength-fill,
.strength-weak,
.strength-fair,
.strength-good,
.strength-strong {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
} 

.signup-prompt {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

.signup-prompt .signup-link {
    color: #ff051d;
    text-decoration: none;
    font-weight: bold;
}

.signup-prompt .signup-link:hover {
    text-decoration: underline;
}

.clientSearch {
    color: #000000;
    font-weight: 600;
}

.highlight {
    display: inline-block;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: 2px;
}

.feedback {
    position: relative;
    cursor: pointer;
}

.clientCode,
.clientPlanSearch,
.feedback {
    position: relative;
}

.clientCode:hover::after,
.clientPlanSearch:hover::after,
.feedback:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    top: -30px;
    right: 50%;
    transform: translateX(50%);
    white-space: nowrap;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
}

.remember-me input[type="checkbox"]:checked::before {
    transform: scale(1);
}