@font-face {
    font-family: 'MiSansArabic';
    src: url('../webfonts/MiSansArabic/MiSansArabic-Normal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MiSansArabicBold';
    src: url('../webfonts/MiSansArabic/MiSansArabic-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SaudiRiyal';
    src: url('../webfonts/saudi-riyal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    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;

    --main-50:  #e8ecf3;
    --main-100: #d1d9e7;
    --main-200: #a3b3cf;
    --main-300: #758db7;
    --main-400: #47679f;
    --main-500: #142c54;
    --main-600: #102344;
    --main-700: #0c1a33;
    --main-800: #081122;
    --main-900: #040911;

    --additional-color: #b68b2d;

    --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);
    padding: 12px 24px;
}

.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(--main-500), var(--main-600));
    padding: 8px;
    border-radius: 10px;
}

.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-title {
    font-size: 25px;
    color: var(--text-primary);
    margin: 0;
    text-decoration: none;
    font-family: 'MiSansArabicBold';
}

.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;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.4),
                    0 0 6px 2px rgba(5, 150, 105, 0.3),
                    0 0 10px 4px rgba(5, 150, 105, 0.2);
    }
}

.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(--main-500);
    box-shadow: 0 0 0 3px var(--main-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 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}


.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);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .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;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 18px;
    }

    .nav-title-container i {
        font-size: 18px;
    }
}

/* 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(--main-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;
    font-weight: bold;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--blue-50);
    color: var(--main-700);
    border-left-color: var(--main-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(--main-600);
    color: white;
    border-color: var(--main-600);
}

.btn-primary:hover {
    background: var(--main-700);
    border-color: var(--main-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(--main-600);
}

.btn-icon.delete:hover {
    background: var(--danger-50);
    color: var(--danger-600);
}

/* Cards & Containers */

/* Card v1 */
/* .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;
} */

/* Card v2 */
/* .card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.scroll {
    max-height: 79%;
    overflow: hidden;
    width: 100%;
}

.no-scroll {
    max-height: 80vh;
    overflow: hidden;
    width: 100%;
    margin-top: -105px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
} */

/* Card v3 */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 12px 24px;
    box-sizing: border-box;
}

.scroll .card-content {
    max-height: 300px;
    overflow-y: auto;
}

.no-scroll .card-content {
    max-height: none;
    overflow: visible;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stats-grid.employees {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stat-card {
    /* background: var(--surface); */
    /* background: linear-gradient(135deg, var(--surface) 70%, var(--additional-color) 200%); */
    background: linear-gradient(135deg, var(--main-400), var(--main-500));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    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: 8px;
    /* 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(--main-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-icon.site {
    background: var(--additional-color);
}

.stat-content h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    /* color: var(--text-secondary); */
    color: var(--surface);
    font-weight: bold;
}

.stat-content h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    /* color: var(--text-secondary); */
    color: var(--surface);
    font-weight: bold;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    /* color: var(--text-primary); */
    color: var(--surface);
    margin: 8px 0 4px;
}

.stat-number-documents {
    font-size: 24px;
    font-weight: 700;
    /* color: var(--text-primary); */
    color: var(--surface);
    margin: 8px 0 4px;
}

.stat-change {
    font-size: 14px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
}

.stat-change.positive {
    /* background: var(--accent-100);
    color: var(--accent-700); */
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-100);
    border: 1px solid var(--accent-300);
}

.stat-change.negative {
    /* background: var(--danger-100);
    color: var(--danger-700); */

    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-200);
    border: 1px solid var(--danger-400);
}

.stat-change.warning {
    /* background: #f5e9cc;
    color: #b68b2d; */
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-100);
    border: 1px solid var(--warning-300);
}

/* 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: 5px;
    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(--main-100);
    color: var(--main-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(--main-500);
    box-shadow: 0 0 0 3px var(--main-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;
}

.projects-statistics-select {
    padding: 3px;
    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(--main-500);
    box-shadow: 0 0 0 3px var(--main-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);
    font-family: 'MiSansArabicBold';
}

.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"],
input[type="search"] {
    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(--main-500);
    box-shadow: 0 0 0 3px var(--main-100);
}

.btn-primary {
    padding: 12px;
    background: var(--main-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;
}

.btn-primary:hover {
    background: var(--main-700);
}

/* SweetAlert Custom Style */
.swal2-popup {
    font-family: 'MiSansArabic', sans-serif !important;
    border-radius: var(--radius-lg);
}

.swal2-confirm {
    background-color: var(--main-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);
    position: relative;
    overflow: hidden;
}

.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-cell i {
    left: 10px;
    right: 10px;
}

.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-header h3 small {
    display: inline-block;
    margin-right: 10px;
    padding: 4px 8px;
    background-color: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-weight: bold;
}

.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(--main-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-column-customizer {
    background: var(--surface-secondary, #f9f9f9);
    border: 1px solid var(--border-color, #e0e0e0);
    color: var(--text-primary, #1a202c);
    padding: 15px;
}

.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 .employee-data-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-body .employee-data-table td {
    padding: 10px;
    border: 1px solid #ddd;
    /* text-align: left; */
}

.modal-body .employee-data-table td:first-child {
    font-weight: bold;
    background-color: #f9f9f9;
    /* width: 30%; */
    width: 50%;
}


.modal-body .employee-data-table.auditing td:first-child {
    width: 13%;
}

.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: 0px;
    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(--main-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(--main-500);
    box-shadow: 0 0 0 3px var(--main-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(--main-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-account-item.selected {
    background: var(--blue-50);
    border-color: var(--main-500);
}

.sidebar-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--main-500), var(--main-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(--main-500);
    color: white;
}

.btn-quick-login:hover {
    background: var(--main-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(--main-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(--main-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(--main-500);
    box-shadow: 0 0 0 3px var(--main-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(--main-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(--main-400), var(--main-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.login {
    width: 100%;
}
.btn-test {
    background: linear-gradient(135deg, var(--main-400), var(--main-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(--main-500), var(--main-600));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 100%;
        margin: 20px;
    }

    .login-image {
        display: none !important;
    }

    .login-container {
        max-width: 100%;
        padding: 30px 20px;
    }

    .input-group input {
        padding: 12px 16px;
        font-size: 16px;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .login-image {
        min-width: 300px;
    }
}

.login-container {
    flex: 1;
    max-width: 450px;
    padding: 40px 30px;
    text-align: center;
    font-family: 'MiSansArabic', sans-serif;
}

.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;
}

.login-wrapper {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    padding: 20px;
}

.login-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

@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;
}

.highlight-text {
    color: #000000;
    font-weight: 600;
    cursor: pointer;
}

.highlight-text-client {
    color: #000000;
    cursor: pointer;
    text-decoration: none;
}

.highlight {
    display: inline-block;
    background: linear-gradient(135deg, var(--main-500), var(--main-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: 2px;
}

.feedback {
    position: relative;
    cursor: pointer;
}

.tooltip {
    position: relative;
}

.tooltip: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;
    font-weight: bold;
}

.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);
}

/* Sidebar Section Styles */
.nav-section {
    margin-bottom: 4px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    border-left: 3px solid transparent;
    position: relative;
    user-select: none;
    background: var(--surface-primary);
}

.section-header:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.section-header.active {
    background: var(--blue-100);
    color: var(--main-700);
    border-left-color: var(--main-600);
}

.section-header.active {
    background: #f5e9cc;
    color: #b68b2d;
    border-left: 4px solid #dcb766;
}

.section-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: var(--main-600);
}

.section-header.active .section-icon {
    color: var(--main-700);
}

.section-title {
    flex: 1;
    font-weight: 500;
    font-weight: bold;
}

.section-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--main-600);
}

.section-header.active .section-arrow {
    color: var(--main-700); 
}

.section-header.expanded .section-arrow {
    transform: rotate(90deg);
}

.section-items {
    list-style: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
    background: var(--surface-secondary);
    border-right: 2px solid var(--main-100);
}

.section-items.expanded {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.section-items li {
    margin-bottom: 0;
}

.section-items .nav-link {
    padding: 10px 24px 10px 5px;
    font-size: 13px;
    font-weight: 400;
    position: relative;
    background: var(--surface-tertiary);
    transition: background 0.3s ease;
}

.section-items .nav-link:hover {
    background: var(--surface-hover);
}

.section-items .nav-link.active {
    background: var(--main-100);
    color: var(--main-700);
    font-weight: 600;
    position: relative;
}

.section-items .nav-link i {
    font-size: 14px;
    width: 18px;
    color: var(--text-primary);
}

.section-items .nav-link.active i {
    color: var(--main-700);
}

@keyframes expandSection {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes collapseSection {
    from {
        max-height: 500px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.section-items.expanding {
    animation: expandSection 0.3s ease-out forwards;
}

.section-items.collapsing {
    animation: collapseSection 0.3s ease-in forwards;
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link {
    margin-bottom: 4px;
    transition: background 0.3s ease;
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link:hover {
    background: var(--surface-hover);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link i {
    color: var(--main-600);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link.active i {
    color: var(--main-700);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link.active {
    background: var(--main-100);
    color: var(--main-700);
    font-weight: 600;
}

@media (max-width: 768px) {
    .section-header {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .section-items .nav-link {
        padding: 8px 20px 8px 36px;
        font-size: 12px;
    }
    
    .section-items .nav-link.active::after {
        right: 28px;
        font-size: 16px;
    }
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    background: var(--surface-secondary);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    width: max-content;
    max-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-menu li {
    margin: 0;
}

/* User Menu */
/* .user-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: bold;
    text-align: center;
}

.user-menu-link:hover {
    background: var(--surface-hover);
    color: var(--main-600);
}

.user-menu-link i {
    font-size: 14px;
    color: var(--text-primary);
}

.user-menu-link:hover i {
    color: var(--main-600);
}

.user-menu-link:last-child i {
    color: var(--text-primary); 
}

.user-menu-link:last-child:hover i {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }

    .nav-title {
        font-size: 16px;
    }

    .nav-user img {
        width: 28px;
        height: 28px;
    }

    .nav-user span {
        font-size: 13px;
    }

    .user-menu {
        min-width: 160px;
        max-width: 200px;
    }

    .user-menu-link {
        font-size: 12px;
        padding: 8px 12px;
    }
} */

button.user-menu-link {
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 12.5px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: bold;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

button.user-menu-link:hover {
    background: var(--surface-hover);
    color: var(--main-600);
}

button.user-menu-link i {
    font-size: 14px;
    color: var(--text-primary);
}

button.user-menu-link:hover i {
    color: var(--main-600);
}

button.user-menu-link:last-child i {
    color: var(--text-primary); 
}

button.user-menu-link:last-child:hover i {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }

    .nav-title {
        font-size: 16px;
    }

    .nav-user img {
        width: 28px;
        height: 28px;
    }

    .nav-user span {
        font-size: 13px;
    }

    .user-menu {
        min-width: 160px;
        max-width: 200px;
    }

    button.user-menu-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Hijri Date & Language */
.hijri-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--surface-secondary);
    padding: 7px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.language-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-secondary);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
}

.language-toggle:hover {
    background: var(--surface-hover);
}

.language-toggle span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.language-toggle i {
    font-size: 14px;
    color: var(--text-secondary);
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}


.language-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.language-menu li {
    margin: 0;
}

.language-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: bold;
    text-align: center;
}

.language-menu-link.active {
    color: var(--surface-hover);
    background-color: var(--main-400);
}

.language-menu-link:hover {
    background: var(--surface-hover);
    color: var(--main-600);
}


.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

/* Notifications Styles */
.nav-notifications {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.nav-notifications:hover {
    background: var(--surface-hover);
}

.nav-notifications i {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-notifications span:not(.notification-badge) {
    font-size: 14px;
    font-weight: 600;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-500);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: none;
}

.notifications-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.notifications-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--surface-hover);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    align-items: center;
    font-weight: bold;
}

.notification-sender {
    font-weight: 500;
}

.notification-time {
    opacity: 0.8;
}

.notification-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 6px;
}

.notification-dot.unread {
    background-color: var(--danger-500);
}

.notification-dot.read {
    background-color: #4caf50;
}

.no-notifications {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav-notifications {
        display: none;
    }

    .notifications-menu {
        min-width: 250px;
    }
}

.site-icon {
    width: auto;
    height: 70px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0 0 0 rgba(20, 44, 84, 0));
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(20, 44, 84, 0));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(20, 44, 84, 0.6))
                drop-shadow(0 0 15px rgba(20, 44, 84, 0.4))
                drop-shadow(0 0 25px rgba(20, 44, 84, 0.2));
    }
}

.site-icon:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(20, 44, 84, 0.8))
            drop-shadow(0 0 20px rgba(20, 44, 84, 0.5));
}

.site-icon-sidebar {
    width: auto;
    height: 70px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dropdown-option.select-all {
    font-weight: bold;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

/* Settings */
.settings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.setting-card {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.setting-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-sm);
    border-color: #e0e0e0;
}

.setting-header {
    display: flex;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f5f5f5;
    background: #fafafa;
}

.setting-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    font-size: 18px;
    color: var(--main-500);
    border: 2px solid #e9ecef;
}

.setting-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-500);
    margin: 0;
    line-height: 1.3;
}

.setting-body {
    padding: 20px;
}

.setting-value-container {
    margin-bottom: 5px;
}

.setting-label {
    font-size: 13px;
    color: var(--main-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.setting-value {
    font-size: 15px;
    color: var(--main-500);
    margin: 0;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-right: 4px solid var(--main-500);
    word-wrap: break-word;
    min-height: 45px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--main-500);
}

.last-update {
    font-weight: bold;
}

.setting-footer {
    padding: 15px 20px 20px;
    text-align: center;
}

.btn-edit {
    background: linear-gradient(135deg, var(--main-700) 0%, var(--main-500) 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'MiSansArabic';
    font-weight: 600;
    width: 100%;
}

.btn-edit.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-edit.toggle-switch.active {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.btn-edit.toggle-switch:not(.active) {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-edit i {
    margin-left: 8px;
}

.btn-edit:hover {
    transform: translateY(-2px);
}

.btn-edit.toggle-switch.active:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.btn-edit.toggle-switch:not(.active):hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.btn-edit:active {
    transform: translateY(0);
}

.btn-view-image {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'MiSansArabic';
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-view-image:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-view-image i {
    font-size: 16px;
}

/* Image Upload Container */
.image-upload-container {
    position: relative;
    margin-top: 10px;
}

.image-upload-container input[type="file"] {
    display: none;
}

.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.image-upload-label:hover {
    border-color: var(--main-500);
    background: #e9ecef;
}

.image-upload-label i {
    font-size: 48px;
    color: var(--main-500);
    margin-bottom: 15px;
}

.image-upload-label span {
    font-size: 16px;
    color: var(--main-500);
    font-weight: 600;
}

.image-preview {
    position: relative;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.remove-preview {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.remove-preview:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

/* Image View Modal */
.image-view-modal .modal-content {
    max-width: 900px;
    width: 90%;
}

.image-view-content {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.image-view-body {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
}

.image-view-body img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--main-500);
}

.no-settings {
    font-size: 16px;
    color: var(--main-500);
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .settings-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .setting-card {
        margin: 0 10px;
    }
    
    .setting-title {
        font-size: 16px;
    }
    
    .setting-value {
        font-size: 14px;
    }
    
    .image-view-modal .modal-content {
        width: 95%;
    }
    
    .image-view-body img {
        max-height: 50vh;
    }
    
    .image-upload-label {
        padding: 30px 15px;
    }
    
    .image-upload-label i {
        font-size: 36px;
    }
}

/* Toggle Switch Styles */
.toggle-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    width: 100%;
    transition: all 0.3s ease;
    min-height: 46px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 36px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.4s;
    border-radius: 36px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 28px;
    width: 28px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

input:checked + .slider:before {
    transform: translateX(34px);
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:disabled + .slider:before {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animation on toggle */
.switch input:checked + .slider:before {
    animation: toggleBounce 0.4s ease;
}

@keyframes toggleBounce {
    0%, 100% {
        transform: translateX(34px) scale(1);
    }
    50% {
        transform: translateX(34px) scale(1.1);
    }
}

@media (max-width: 768px) {
    .toggle-container {
        padding: 15px;
        min-height: 60px;
    }
    
    .switch {
        width: 60px;
        height: 32px;
    }
    
    .slider:before {
        height: 24px;
        width: 24px;
    }
    
    input:checked + .slider:before {
        transform: translateX(28px);
    }
}

/* Sidebar Items */
.independent-page-row { 
    background-color: #e9ecef; 
}

.sub-page-row td:first-child:before {
    content: '⤶';
    position: absolute;
    right: 12.5px;
    top: 47%;
    transform: translateY(-50%);
    color: #007bff;
    font-size: 50px;
}

.sub-page-row td:first-child {
    padding-right: 50px;
    position: relative;
}

.sub-page-row td:first-child:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #007bff;
}

.section-row td:first-child::before { 
    content: '📁 '; 
    font-size: 16px;
}

.independent-page-row td:first-child::before { 
    content: '📄 '; 
    font-size: 16px;
}

.table-container { 
    overflow-x: auto; 
}

.data-table { 
    width: 100%; 
    border-collapse: collapse;
}

.sub-page-row {
    text-align: right;
}

.form-note {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 10px;
    display: block;
}

/* Job Permissions */
.items-selection {
    margin-top: 30px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-md, 8px);
}

.items-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.item-container {
    display: flex;
    flex-direction: column;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-md, 8px);
    padding: 12px;
    transition: all 0.2s ease;
    height: 100%;
}

.item-container:hover {
    background: var(--surface-secondary, #f8f9fa);
    border-color: var(--primary-color, #007bff);
}

.item-container:has(.item-checkbox:checked) {
    background: var(--primary-100, #e6f0ff);
    border-color: var(--primary-color, #007bff);
}

.item-page, .sub-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.page-selection {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.page-selection:hover {
    color: var(--primary-600, #004085);
}

.page-selection input.item-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color, #007bff);
}

.item-divider {
    border: none;
    border-top: 1px solid var(--border-color, #dee2e6);
    margin: 8px 0;
    flex-shrink: 0;
}

.item-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.item-actions label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}

.item-actions input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #007bff);
}

.section-header-job-permissions {
    grid-column: 1 / -1;
    background-color: var(--surface-secondary, #f8f9fa);
    padding: 10px;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color, #dee2e6);
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0;
}

.job-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8ecf4;
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--main-500);
}

.job-card:hover::before {
    opacity: 1;
}

.job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.job-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--main-700), var(--main-500));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--main-200);
}

.job-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    flex: 1;
    margin-right: 15px;
}

.job-card-body {
    margin-bottom: 20px;
}

.job-info {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

.job-info i {
    margin-left: 8px;
    width: 16px;
}

.permissions-count {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.job-card-actions {
    display: flex;
    gap: 10px;
}

.job-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-view {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #94a3b8;
    font-size: 32px;
}

.empty-state h3 {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-state p {
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .job-card {
        padding: 20px;
    }

    .job-card-actions {
        flex-direction: column;
    }

    .job-action-btn {
        width: 100%;
    }

    .item-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
}

.job-stats {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.stat-number-permission {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0 4px;
}

/* Documents */
.document-warning {
    background: #eab208b6;
    color: #fff;
    font-weight: bold;
}

.document-danger {
    background: var(--danger-700);
    color: #fff;
    font-weight: bold;
}

.document-active {
    background: var(--accent-700);
    color: #fff;
    font-weight: bold;
}

.btn-icon-copy {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color: var(--accent-800);
    background-color: var(--accent-100);
}

.active-document {
  background: #16a34a;
}

.warning-document {
  background: #eab308;
}

.expired-document {
  background: #dc2626;
}


/* Dashboard */
.display-employee {
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--main-500), var(--main-700));
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.display-document {
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--main-500), var(--main-700));
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.display-alert-expired-document {
    /* padding: 6px 10px;
    color: #993360;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    background: linear-gradient(135deg, #fef2f2, #fef2f2);
    border: 1px solid #991b1b; */

    padding: 8px 14px;
    color: var(--danger-700);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: bold;
    background: linear-gradient(135deg, var(--danger-50), var(--danger-100));
    border: 2px solid var(--danger-300);
    transition: all var(--transition-normal);
}

.display-nearly-expired-document {
    /* padding: 6px 10px;
    color: #92400e;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    background: linear-gradient(135deg, #fffbeb, #fffbeb);
    border: 1px solid #99400e; */
    
    padding: 8px 14px;
    color: var(--warning-700);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: bold;
    background: linear-gradient(135deg, var(--warning-50), var(--warning-100));
    border: 2px solid var(--warning-300);
    transition: all var(--transition-normal);
}

/* Searchable Dropdown Styles */
.dropdown-container {
    position: relative;
}

.dropdown-container .form-control {
    cursor: pointer;
}

.dropdown-arrow {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
    color: #666;
    font-size: 12px;
}

.dropdown-arrow.open {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option.selected {
    background-color: var(--main-500);
    color: white;
    font-weight: bold;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.no-results {
    padding: 12px;
    color: #666;
    text-align: center;
    font-style: italic;
}
































/* :root {
    --sidebar-50:  #e8ecf3;
    --sidebar-100: #d1d9e7;
    --sidebar-200: #a3b3cf;
    --sidebar-300: #758db7;
    --sidebar-400: #47679f;
    --sidebar-500: #142c54;
    --sidebar-600: #102344;
    --sidebar-700: #0c1a33;
    --sidebar-800: #081122;
    --sidebar-900: #040911;

    --sidebar-surface: var(--sidebar-900);
    --sidebar-surface-primary: var(--sidebar-800);
    --sidebar-surface-secondary: var(--sidebar-700);
    --sidebar-surface-tertiary: var(--sidebar-600);
    --sidebar-surface-hover: var(--sidebar-500);

    --sidebar-text-primary: #ffffff;
    --sidebar-text-secondary: #cfd6e6;
    --sidebar-border-color: var(--sidebar-700);
    --sidebar-border-light: var(--sidebar-600);

    --sidebar-shadow-lg: 0 4px 20px rgba(0,0,0,0.5);
}

.sidebar {
    position: fixed;
    top: 64px;
    right: 0;
    width: 280px;
    height: calc(100vh - 64px);
    background: linear-gradient(135deg, var(--main-600), var(--main-700));
    box-shadow: var(--sidebar-shadow-lg);
    border-left: 1px solid var(--sidebar-border-color);
    z-index: 999;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(100%);
}

.sidebar-header {
    padding: 11px;
    border-bottom: 1px solid var(--sidebar-border-light);
    background: linear-gradient(135deg, var(--sidebar-600), var(--sidebar-700));
}

.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(--sidebar-text-primary);
}

.logo i {
    font-size: 20px;
    color: var(--sidebar-300);
}

.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(--sidebar-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--sidebar-surface-hover);
    color: var(--sidebar-text-primary);
}

.nav-link.active {
    background: var(--sidebar-400);
    color: var(--sidebar-50);
    border-left-color: var(--sidebar-200);
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--sidebar-200);
}

.nav-link.active i {
    color: var(--sidebar-50);
}

.nav-section {
    margin-bottom: 4px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--sidebar-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: bold;
    border-left: 3px solid transparent;
    position: relative;
    user-select: none;
    background: var(--sidebar-surface-primary);
}

.section-header:hover {
    background: var(--sidebar-surface-hover);
    color: var(--sidebar-text-primary);
}

.section-header.active {
    background: var(--sidebar-400);
    color: var(--sidebar-50);
    border-left: 4px solid var(--sidebar-200);
}

.section-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: var(--sidebar-200);
}

.section-header.active .section-icon {
    color: var(--sidebar-50);
}

.section-title {
    flex: 1;
    font-weight: bold;
}

.section-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--sidebar-300);
}

.section-header.active .section-arrow {
    color: var(--sidebar-50); 
}

.section-header.expanded .section-arrow {
    transform: rotate(90deg);
}

.section-items {
    list-style: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
    background: var(--sidebar-surface-secondary);
    border-right: 2px solid var(--sidebar-600);
}

.section-items.expanded {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.section-items li {
    margin-bottom: 0;
}

.section-items .nav-link {
    padding: 10px 24px 10px 40px;
    font-size: 13px;
    font-weight: 400;
    position: relative;
    background: var(--sidebar-surface-tertiary);
    transition: background 0.3s ease;
}

.section-items .nav-link:hover {
    background: var(--sidebar-surface-hover);
}

.section-items .nav-link.active {
    background: var(--sidebar-300);
    color: var(--sidebar-50);
    font-weight: 600;
    position: relative;
}

.section-items .nav-link i {
    font-size: 14px;
    width: 18px;
    color: var(--sidebar-text-primary);
}

.section-items .nav-link.active i {
    color: var(--sidebar-50);
}

@keyframes expandSection {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes collapseSection {
    from {
        max-height: 500px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.section-items.expanding {
    animation: expandSection 0.3s ease-out forwards;
}

.section-items.collapsing {
    animation: collapseSection 0.3s ease-in forwards;
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link {
    margin-bottom: 4px;
    transition: background 0.3s ease;
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link:hover {
    background: var(--sidebar-surface-hover);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link i {
    color: var(--sidebar-200);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link.active i {
    color: var(--sidebar-50);
}

.sidebar-nav > ul > li:not(.nav-section):not(.logout-link) .nav-link.active {
    background: var(--sidebar-500);
    color: var(--sidebar-50);
    font-weight: 600;
} */


/* Notifications */
.modal-body .employee-data-table th,
.modal-body .employee-data-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: right;
}

.modal-body .employee-data-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.modal-body .employee-data-table td:first-child {
    font-weight: bold;
    font-size: 13px;
}

.modal-body .employee-data-table .status-option-users {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
} 

.recipient-link {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
}

.recipient-link:hover {
    color: #0056b3;
}

.dropdown-option:hover {
    background-color: #f0f0f0;
}

.dropdown-option.selected {
    background-color: #e6f3ff;
    color: #007bff;
}

/* Sidebar Items */
.type {
    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;
    font-weight: bold;
}

.type.section {
    background: #f5e9cc;
    color: #b68b2d;
}

.type.page.main {
    background: #d0e8ff;
    color: #1a73e8;
    padding-left: 10px; 
}

.type.page.sub {
    background: #f0f8ff;
    color: #0b5ed7;
    border-left: 3px solid #1a73e8;
    border-right: 3px solid #1a73e8;
}

/* Project details */
.section-divider {
    margin: 40px 0;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.tables-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.details-data-table {
    width: 100%;
    border-collapse: collapse;
}

.details-data-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.details-data-table td:first-child {
    font-weight: bold;
    background-color: #f9f9f9;
    width: 50%;
}

.quotation-table td {
    text-align: center;
}

.quotation-table .btn-icon {
    padding: 5px 10px;
    font-size: 14px;
}

.section-title-details {
    font-size: 22px;
    font-weight: bold;
    color: var(--main-500);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--main-500);
    padding-bottom: 5px;
    gap: 10px;
    margin: 20px;
}

.section-title-details i {
    color: var(--main-500);
}

/* -------- */
.priority-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vip-checkbox {
    transform: scale(1.3);
    cursor: pointer;
    accent-color: var(--additional-color);
}

.priority-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.priority-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.priority-input::-webkit-inner-spin-button,
.priority-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* تنسيق textarea في SweetAlert */
.swal2-input[id="cancelReason"] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100px !important;
    padding: 12px 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-family: 'MiSansArabic';
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333 !important;
    background-color: #fff !important;
    resize: vertical !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    margin: 10px 0 !important;
}

.swal2-input[id="cancelReason"]:focus {
    border-color: #d33 !important;
    box-shadow: 0 0 0 3px rgba(211, 51, 51, 0.1) !important;
    outline: none !important;
}

.swal2-validation-message {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin-top: 10px !important;
    font-size: 14px !important;
}


/* Projects Design */
/* #designDetailsModalBodyContent {
    padding: 15px 25px;
    box-sizing: border-box;
} */

/* #designDetailsModalBodyContent table {
    max-width: 32%;
    transform: scaleX(1.05) scaleY(0.9);
    transform-origin: top center;
} */

/* Saudi Riyal Icon  */
.saudi-riyal-icon,
.saudi-riyal-icon::before {
  font-family: 'SaudiRiyal' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  font-size: 20px;
}

.saudi-riyal-icon::before {
  content: "\e900";
}

/* Projects Workflow */
.fixed-section { 
    background-color: #e9ecef; 
}

/* Employees Activity Status */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;

}

@keyframes statusGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
    50% {
        filter: drop-shadow(0 0 3px currentColor)
                drop-shadow(0 0 6px rgba(0, 0, 0, 0.2));
    }
}

.status-green {
    background-color: #4CAF50;
    color: #4CAF50;
    animation: statusGlow 1.5s infinite;
}

.status-red {
    background-color: #F44336;
    color: #F44336;
    animation: statusGlow 1.5s infinite;
}

/* Projects Structural */
.detailFloorsRow {
    position: relative;
    border: 2.5px solid rgba(150, 5, 5, 0.795);
    background: #fff;
    z-index: 1;
    animation: detailFloorsRow 3s ease-in-out infinite;
}

@keyframes detailFloorsRow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(150, 5, 5, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(150, 5, 5, 0.4),
            0 0 7px 3px rgba(150, 5, 5, 0.3),
            0 0 11px 5px rgba(150, 5, 5, 0.2);
    }
}

#detailApartmentsCountRow {
    position: relative;
    z-index: 0;
    background: #fff;
}

.star-alert {
    color: red;
}


/* Locked Button */
button.locked-button:disabled {
    position: relative;
    cursor: not-allowed;
    overflow: hidden;
}

button.locked-button:disabled::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border-radius: inherit;
    z-index: 1;
}

button.locked-button:disabled::after {
    content: "\f023";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 20px;
    z-index: 2;
    pointer-events: none;
}

/* ScrollBar Sidebar */
.sidebar {
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Index */
.employee_select {
    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-group label[for="employee_select"] {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #fff;
    padding: 0 8px;
    font-size: 14px;
    color: #666;
    pointer-events: none;
}

/* License Linking Status Styles */
.license-linking-status-row {
    position: relative;
    z-index: 1;
}

.license-linking-status-row.status-not-linked {
    border: 2.5px solid rgba(150, 5, 5, 0.795);
    background: #fff;
    animation: statusNotLinked 3s ease-in-out infinite;
}

@keyframes statusNotLinked {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(150, 5, 5, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(150, 5, 5, 0.4),
            0 0 7px 3px rgba(150, 5, 5, 0.3),
            0 0 11px 5px rgba(150, 5, 5, 0.2);
    }
}

.license-linking-status-row.status-in-progress {
    border: 2.5px solid rgb(13, 110, 253);
    background: #fff;
    animation: statusInProgress 3s ease-in-out infinite;
}

@keyframes statusInProgress {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 5, 150, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(13, 109, 253, 0.521),
            0 0 7px 3px rgba(13, 109, 253, 0.421),
            0 0 11px 5px rgba(13, 109, 253, 0.321);
    }
}

.license-linking-status-row.status-paused {
    border: 2.5px solid rgba(218, 165, 32, 0.795);
    background: #fff;
    animation: statusPaused 3s ease-in-out infinite;
}

@keyframes statusPaused {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(218, 165, 32, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(218, 165, 32, 0.4),
            0 0 7px 3px rgba(218, 165, 32, 0.3),
            0 0 11px 5px rgba(218, 165, 32, 0.2);
    }
}

.license-linking-status-row.status-cancelled {
    border: 2.5px solid rgba(150, 5, 5, 0.795);
    background: #fff;
    animation: statusCancelled 3s ease-in-out infinite;
}

@keyframes statusCancelled {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(150, 5, 5, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(150, 5, 5, 0.4),
            0 0 7px 3px rgba(150, 5, 5, 0.3),
            0 0 11px 5px rgba(150, 5, 5, 0.2);
    }
}

.license-linking-status-row.status-completed {
    border: 2.5px solid rgba(5, 150, 5, 0.795);
    background: #fff;
    animation: statusCompleted 3s ease-in-out infinite;
}

@keyframes statusCompleted {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 5, 0);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(5, 150, 5, 0.4),
            0 0 7px 3px rgba(5, 150, 5, 0.3),
            0 0 11px 5px rgba(5, 150, 5, 0.2);
    }
}

.license-linking-status-value {
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    width: 100%;
}

.license-linking-status-value.status-not-linked {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.license-linking-status-value.status-in-progress {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.license-linking-status-value.status-paused {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.license-linking-status-value.status-cancelled {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.license-linking-status-value.status-completed {
    color: #198754;
    background: rgba(25, 135, 84, 0.1);
}