/* Custom Variables */
:root {
    --primary: #003366;
    --primary-dark: #002244;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --bg-light: #F9FAFB;
}

/* Global Styles */
html {
    direction: rtl;
}

body {
    background-color: var(--bg-light);
    font-family: 'Cairo', sans-serif;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Custom Card Styles */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 51, 102, 0.1);
    border-color: var(--secondary-color);
}

/* Custom Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--danger-color);
    color: white;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Custom Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all 0.2s ease;
}

.badge svg {
    margin-left: 0.25rem;
    width: 1rem;
    height: 1rem;
}

.badge-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-progress {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.badge-completed {
    background-color: #D1FAE5;
    color: #065F46;
}

/* Custom Table Styles */
.table-container {
    overflow-x: auto;
}

.table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 0.75rem 1.5rem;
    background-color: #f9fafb;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #6b7280;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.action-btn-primary {
    color: var(--primary);
}
#sidebar * {
    color: #fff;
}

.action-btn-primary:hover {
    background-color: rgba(0, 51, 102, 0.1);
}

.action-btn-danger {
    color: var(--danger-color);
}

.action-btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.action-btn-success {
    color: var(--success-color);
}

.action-btn-success:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f6f6f6;
    display: flex;
    gap: .5rem;
    max-width: fit-content;
}

.status-badge-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge-progress {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.status-badge-completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge-rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Icon Spacing */
.icon-left {
    margin-left: 0.375rem;
}

.icon-right {
    margin-right: 0.375rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

/* Custom Input Styles */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background-color: white;
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(153, 204, 255, 0.2);
    outline: none;
}

/* Custom Navigation Styles */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #111827;
    background-color: #f3f4f6;
}

.nav-link.active {
    background-color: rgba(0, 51, 102, 0.1);
    color: var(--primary);
}

/* Custom Card Effects */
.card-effect {
    position: relative;
    overflow: hidden;
}

.card-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(153, 204, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.card-effect:hover::before {
    transform: translateX(100%);
}

/* Loading Animation */
.loading {
    position: relative;
    width: 40px;
    height: 40px;
}

.loading::before,
.loading::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loading::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.loading::after {
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-top-color: var(--secondary-color);
    animation-duration: 0.8s;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 51, 102, 0.1), 0 2px 4px -1px rgba(0, 51, 102, 0.06);
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    border: 2px dashed #e2e8f0;
}

.empty-state svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

/* Responsive Typography */
@media (max-width: 640px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
}

/* RTL Support */
[dir="rtl"] .nav-link::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .badge svg {
    margin-right: 0.25rem;
    margin-left: 0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
} 

.table-actions {
    display: flex;
    gap: 1rem;
}

.table-actions a {
    color: #fff;
    background: #1762da;
    padding: 8px 12px;
    border-radius: 6px;
}

.card-options a {
    background: #1a5ea5;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
}

.card-options {
    gap: 1rem;
}

.bg-primary{
    background-color: #003366;
}

/* Shadow Effects */
.shadow-custom {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.shadow-custom:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* RTL Specific */
[dir="rtl"] .icon-left {
    margin-left: 0;
    margin-right: 0.375rem;
}

[dir="rtl"] .icon-right {
    margin-right: 0;
    margin-left: 0.375rem;
}

[dir="rtl"] .form-select {
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar-mobile-open {
        transform: translateX(0);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar-mobile-closed {
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
}

#sidebarBackdrop {
    transition: opacity 0.3s ease-in-out;
}

#sidebar {
    transition: transform 0.3s ease-in-out;
    background: #105195;
}

/* Mobile Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: white;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    color: var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-mobile-closed {
    transform: translateX(100%);
}

#sidebarToggle {
    background: #023366 !important;
    padding: 6px 12px;
}

.header {
    background: #fff;
    padding: 1rem;
}
.btn-primary {
    display: flex;
    gap: .5rem;
    font-weight: bold;
}


.nav-links a {
    margin: .75rem 0px !important;
    padding: 0px;
    font-size: 16px !important;
}

.nav-links a span {
    font-size: 14px;
}

.nav-links {
    border-top: 1px dashed #ccc;
    margin-top: 2rem;
}


 /* Base */
 :root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 64px;
    --transition-speed: 0.3s;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--background-color);
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-inline-end: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 40;
    transition: transform var(--transition-speed);
}

.sidebar-rtl {
    right: 0;
}

.sidebar-ltr {
    left: 0;
}

.sidebar-logo {
    height: var(--header-height);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.menu-group {
    padding: 1.5rem 1rem;
}

.menu-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
}

.menu-item:hover {
    background-color: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
}

.menu-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.menu-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-label {
    flex: 1;
    margin-inline-start: 0.75rem;
    font-weight: 500;
}

.menu-indicator {
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.menu-item:hover .menu-indicator {
    opacity: 1;
}

/* User Profile */
.user-profile {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    background: none;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.user-profile-button:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.user-avatar {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-status {
    position: absolute;
    bottom: -0.125rem;
    right: -0.125rem;
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--success-color);
    border: 2px solid var(--surface-color);
    border-radius: 50%;
}

.user-info {
    flex: 1;
    text-align: start;
    margin-inline-start: 0.75rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.25;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content */
.app-main {
    flex: 1;
    margin-inline-start: var(--sidebar-width);
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search */
.search-wrapper {
    position: relative;
    width: 240px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-inline-start: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--background-color);
    transition: all var(--transition-speed);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.5rem;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.action-button:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--danger-color);
    border-radius: 50%;
}

/* Content Area */
.app-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.mobile-toggle:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(100%);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-main {
        margin-inline-start: 0;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-content {
        padding: 0 1rem;
    }

    .search-wrapper {
        display: none;
    }
}

@media (max-width: 640px) {
    .action-buttons {
        gap: 0.25rem;
    }

    .action-button {
        width: 2rem;
        height: 2rem;
    }

    .page-title {
        font-size: 1rem;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .menu-indicator i {
    transform: rotate(180deg);
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .search-input {
    padding-left: 1rem;
    padding-right: 2.5rem;
}

[dir="rtl"] .mobile-toggle {
    right: auto;
    left: 1.5rem;
}
