    
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Cairo', sans-serif;
            background: linear-gradient(160deg, #1a1a2e 0%, #16213e 30%, #0f3460 55%, #533483 85%, #4a3d6b 100%);
            background-attachment: fixed;
            min-height: 100vh;
            direction: rtl;
            position: relative;
            overflow-x: hidden;
            font-size: 17px;
        }

        /* تكبير الخط درجة واحدة */
        * {
            font-size: 1.05em;
        }

        h1, h2, h3, h4, h5, h6 {
            font-size: 1.2em;
        }

        .sidebar-menu-link {
            font-size: 1.05em;
        }

        .stat-content h4 {
            font-size: 1.15em;
        }

        .stat-content p {
            font-size: 1.05em;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(ellipse 80% 50% at 50% -10%, rgba(102, 126, 234, 0.25) 0%, transparent 50%),
                radial-gradient(ellipse 60% 40% at 100% 100%, rgba(118, 75, 162, 0.2) 0%, transparent 45%),
                radial-gradient(ellipse 50% 30% at 0% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 40%);
            z-index: -1;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 30px;
            min-height: 100vh;
        }

        .top-header {
            width: 100%;
            z-index: 1000;
        }

        .main-layout {
            display: flex;
            flex: 1;
            min-height: 0;
            gap: 30px;
        }

        /* Sidebar Styles - ألوان متناسقة مع اللوجو */
        .sidebar {
            width: 280px;
            background: linear-gradient(180deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.92) 100%);
            backdrop-filter: blur(20px);
            border-radius: 25px;
            padding: 30px 20px;
            box-shadow: 
                0 20px 50px rgba(102, 126, 234, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.15);
            position: sticky;
            top: 20px;
            height: fit-content;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
            transition: all 0.3s ease;
            animation: sidebarSlideIn 0.8s ease-out;
            flex-shrink: 0;
        }

        @keyframes sidebarSlideIn {
            from {
                opacity: 0;
                transform: translateX(-50px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.35);
            border-radius: 3px;
        }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        .sidebar-header {
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.25);
            position: relative;
            transition: all 0.3s ease;
        }

        .sidebar-header::after {
            display: none;
        }

        .sidebar-header:hover::after {
            display: none;
        }

        .sidebar-header h2 {
            color: #fff;
            font-size: 1.8rem;
            margin-bottom: 8px;
            font-weight: 700;
            background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .sidebar-header p {
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.9rem;
        }

        .sidebar-menu {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .sidebar-menu-item {
            margin-bottom: 8px;
        }

        .sidebar-menu-link {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            color: rgba(255, 255, 255, 0.95);
            text-decoration: none;
            border-radius: 15px;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            font-weight: 500;
            font-size: 1rem;
        }

        .sidebar-menu-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.12);
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 15px;
        }

        .sidebar-menu-link:hover::before {
            opacity: 1;
        }

        .sidebar-menu-link:hover {
            transform: translateX(5px);
            color: #fff;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .sidebar-menu-link.active {
            background: rgba(255, 255, 255, 0.25);
            color: #fff;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .sidebar-menu-link.active::before {
            opacity: 0;
        }

        /* ===== ZKTeco connection row (radical stable layout) ===== */
        .zkteco-connection-row {
            display: flex !important;
            gap: 3px !important;
            flex-wrap: nowrap !important;
            align-items: flex-end !important;
            overflow-x: hidden !important; /* بدون مسطرة */
            padding-bottom: 0;
        }

        .zkteco-connection-row .zkteco-field {
            width: fit-content;
            margin-bottom: 0 !important; /* override .form-group margin-bottom */
            flex: 0 1 auto; /* اسمح بالانكماش للحفاظ على سطر واحد */
            min-width: 0;
        }

        .zkteco-connection-row .zkteco-input {
            height: 44px !important;
            min-height: 44px !important;
            padding: 0 10px !important;
            line-height: 44px !important;
            box-sizing: border-box !important;
            background: #fff !important;
            transform: none !important; /* override focus transform */
        }

        .zkteco-connection-row .zkteco-ip {
            width: clamp(120px, 18ch, 240px) !important;
        }
        .zkteco-connection-row .zkteco-port {
            width: 78px !important; /* +25% تقريباً */
            text-align: center !important;
            font-variant-numeric: tabular-nums;
            padding-left: 8px !important;
            padding-right: 8px !important;
        }
        .zkteco-connection-row .zkteco-password { width: 8ch !important; }

        .zkteco-password-and-actions {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            flex: 0 1 auto;
            min-width: 0;
        }

        .zkteco-actions {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            transform: none !important;
        }

        .zkteco-actions-under-badge {
            margin-top: 2px;
        }

        /* ===== ZKTeco import (auto + manual merged) ===== */
        .zkteco-import-card {
            background: linear-gradient(135deg, rgba(33, 150, 243, 0.06) 0%, rgba(76, 175, 80, 0.06) 100%);
            border: 1px solid rgba(33, 150, 243, 0.15);
            border-radius: 14px;
            padding: 14px;
            margin-bottom: 15px;
        }

        .zkteco-import-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .zkteco-import-title {
            font-weight: 800;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .zkteco-import-title i {
            color: #2196f3;
        }

        .zkteco-import-subtitle {
            font-size: 0.85rem;
            color: #666;
            margin-top: 4px;
        }

        .zkteco-import-toggle {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            user-select: none;
            font-weight: 700;
            color: #2c3e50;
            background: rgba(255, 255, 255, 0.75);
            border: 1px solid rgba(0, 0, 0, 0.06);
            padding: 8px 10px;
            border-radius: 999px;
        }

        .zkteco-import-toggle input {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .zkteco-import-body {
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 12px;
            padding: 12px;
            display: grid;
            grid-template-columns: 1fr 1px 1fr;
            gap: 12px;
            align-items: start;
        }

        .zkteco-import-section-title {
            font-weight: 800;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .zkteco-import-auto .zkteco-import-section-title i { color: #4caf50; }
        .zkteco-import-manual .zkteco-import-section-title i { color: #2196f3; }

        .zkteco-import-auto-settings select,
        .zkteco-import-manual input[type="date"] {
            width: 100%;
            padding: 10px 14px;
            border-radius: 10px;
            border: 2px solid rgba(33, 150, 243, 0.15);
            background: rgba(255, 255, 255, 0.95);
        }

        .zkteco-import-status {
            margin-top: 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 10px;
            font-size: 0.9rem;
            color: #666;
            border: 1px dashed rgba(0, 0, 0, 0.12);
        }

        .zkteco-import-divider {
            width: 1px;
            background: rgba(0, 0, 0, 0.10);
            margin: 0;
        }

        .zkteco-import-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .zkteco-import-actions .btn {
            margin: 0 !important;
            border-radius: 12px;
            padding: 10px 14px;
            font-weight: 800;
        }

        /* ===== Attendance table (device-style, LTR) ===== */
        .zkteco-detailed-table {
            direction: ltr;
            min-width: 1250px;
        }

        .zkteco-detailed-table thead th {
            color: #fff !important;
            background: linear-gradient(135deg, #607d8b, #455a64) !important;
            border: 1px solid #78909c !important;
            text-align: center !important;
            white-space: nowrap;
        }

        .zkteco-detailed-table tbody td {
            text-align: center;
            white-space: nowrap;
        }

        .zkteco-detailed-responsive {
            overflow-x: auto !important;
        }

        @media (max-width: 900px) {
            .zkteco-import-body {
                grid-template-columns: 1fr;
            }

            .zkteco-import-divider {
                width: 100%;
                height: 1px;
                margin: 6px 0;
            }
        }

        .zkteco-actions .btn {
            width: 40px !important;
            height: 40px !important;
            border-radius: 50% !important;
            padding: 0 !important;
            margin: 0 !important; /* override .btn margin: 8px */
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        .sidebar-menu-icon {
            font-size: 1.3rem;
            margin-left: 15px;
            width: 24px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .sidebar-menu-link:hover .sidebar-menu-icon {
            transform: scale(1.1);
            animation: iconBounce 0.6s ease;
        }

        @keyframes iconBounce {
            0%, 20%, 50%, 80%, 100% {
                transform: scale(1.1);
            }
            40% {
                transform: scale(1.3);
            }
            60% {
                transform: scale(1.2);
            }
        }

        .sidebar-menu-link.active .sidebar-menu-icon {
            animation: activeIconPulse 2s infinite;
        }

        @keyframes activeIconPulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
        }

        .sidebar-menu-text {
            flex: 1;
        }

        .sidebar-menu-badge {
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
            font-size: 0.7rem;
            padding: 4px 8px;
            border-radius: 12px;
            font-weight: 600;
            margin-right: 10px;
        }

        /* Main Content Area */
        .main-content {
            flex: 1;
            min-width: 0;
            position: relative;
        }

        /* Business Services Showcase */
        .business-showcase {
            width: 100%;
            margin: 20px 0;
            padding: 40px 20px;
            background: linear-gradient(135deg, 
                #667eea 0%, 
                #764ba2 25%, 
                #f093fb 50%, 
                #f5576c 75%, 
                #4facfe 100%);
            border-radius: 25px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
        }

        .business-showcase::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }

        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .showcase-header {
            text-align: center;
            margin-bottom: 40px;
            position: relative;
            z-index: 2;
        }

        .showcase-title {
            font-size: 2.5rem;
            font-weight: 800;
            color: #fff;
            margin-bottom: 15px;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            background: linear-gradient(45deg, #fff, #f0f8ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .showcase-subtitle {
            font-size: 1.2rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 400;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            position: relative;
            z-index: 2;
        }

        .service-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 30px 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: pointer;
        }

        .service-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.1) 0%, 
                rgba(255, 255, 255, 0.05) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .service-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .service-card:hover::before {
            opacity: 1;
        }

        .service-card:hover .service-glow {
            opacity: 1;
            transform: scale(1.1);
        }

        .service-icon {
            width: 80px;
            height: 80px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            position: relative;
            z-index: 2;
        }

        .service-card[data-service="hr"] .service-icon {
            background: linear-gradient(135deg, #667eea, #764ba2);
        }

        .service-card[data-service="finance"] .service-icon {
            background: linear-gradient(135deg, #f093fb, #f5576c);
        }

        .service-card[data-service="recruitment"] .service-icon {
            background: linear-gradient(135deg, #4facfe, #00f2fe);
        }

        .service-card[data-service="operations"] .service-icon {
            background: linear-gradient(135deg, #43e97b, #38f9d7);
        }

        .service-icon i {
            font-size: 2.5rem;
            color: #fff;
            text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .service-content {
            position: relative;
            z-index: 2;
        }

        .service-content h3 {
            font-size: 1.4rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 12px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .service-content p {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
        }

        .service-glow {
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            opacity: 0;
            transition: all 0.4s ease;
            pointer-events: none;
        }

        /* Welcome Section */
        .welcome-section {
            text-align: center;
            margin: 30px 0;
            padding: 40px 30px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            position: relative;
            overflow: hidden;
        }

        .welcome-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            animation: shimmer 3s infinite;
        }

        .welcome-section h2 {
            color: #2c3e50;
            font-size: 2.5rem;
            margin-bottom: 20px;
            font-weight: 700;
            position: relative;
            z-index: 2;
        }

        .welcome-section p {
            color: #7f8c8d;
            font-size: 1.2rem;
            margin: 0 0 30px 0;
            position: relative;
            z-index: 2;
            line-height: 1.6;
        }

        .welcome-features {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-top: 30px;
            position: relative;
            z-index: 2;
        }

        .feature-item {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #2c3e50;
            font-weight: 600;
        }

        .feature-item i {
            color: #27ae60;
            font-size: 1.2rem;
        }

        .feature-item span {
            font-size: 1rem;
        }

        /* Quick Actions */
        .quick-actions {
            margin: 30px 0;
            padding: 30px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .quick-actions h3 {
            color: #2c3e50;
            font-size: 1.8rem;
            margin-bottom: 25px;
            text-align: center;
            font-weight: 700;
        }

        .quick-actions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .quick-action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            padding: 25px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            font-size: 1rem;
            font-weight: 600;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .quick-action-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        }

        .quick-action-btn i {
            font-size: 2rem;
        }

        .quick-action-btn span {
            font-size: 0.9rem;
            text-align: center;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 10px 20px;
            margin-bottom: 20px;
            box-shadow: 
                0 8px 32px rgba(102, 126, 234, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.15);
            position: relative;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.08), transparent);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

        .header h1 {
            color: rgba(255, 255, 255, 0.95);
            font-size: 1rem;
            margin-bottom: 1px;
            font-weight: 700;
        }

        .header p {
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.6rem;
        }


        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin: 30px 0;
            padding: 20px 0;
            animation: statsFadeIn 1s ease-out;
        }

        @keyframes statsFadeIn {
            0% {
                opacity: 0;
                transform: translateY(30px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .stat-card {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
            backdrop-filter: blur(20px);
            border-radius: 10px;
            padding: 25px;
            text-align: center;
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(255, 255, 255, 0.3);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
            background-clip: padding-box;
            animation: cardSlideIn 0.8s ease-out;
            animation-fill-mode: both;
        }

        .stat-card:nth-child(1) { animation-delay: 0.1s; }
        .stat-card:nth-child(2) { animation-delay: 0.2s; }
        .stat-card:nth-child(3) { animation-delay: 0.3s; }
        .stat-card:nth-child(4) { animation-delay: 0.4s; }

        @keyframes cardSlideIn {
            0% {
                opacity: 0;
                transform: translateY(50px) scale(0.9);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .stat-card::before {
            display: none;
        }

        .stat-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(76, 175, 80, 0.05));
            border-radius: 20px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .stat-card:hover::after {
            opacity: 1;
        }

        .stat-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 
                0 30px 60px rgba(0, 0, 0, 0.18),
                0 0 0 1px rgba(255, 255, 255, 0.4);
            border-color: rgba(33, 150, 243, 0.3);
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, #2196f3, #4caf50, #ff9800);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
            animation: numberGlow 2s infinite alternate;
            text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
        }

        @keyframes numberGlow {
            0% { filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.3)); }
            100% { filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.6)); }
        }

        .stat-label {
            color: #2c3e50;
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: linear-gradient(135deg, #2c3e50, #34495e);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }

        /* نافذة إعادة الخطوات - نافذة صغيرة مثبتة داخل صفحة متابعة العقود */
        #resetStepsModal {
            animation: resetStepsFadeIn 0.2s ease;
        }
        
        @keyframes resetStepsSlideIn {
            0% {
                transform: translate(-50%, -50%) scale(0.9);
                opacity: 0;
            }
            100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
        }
        
        @keyframes resetStepsFadeIn {
            0% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }
        
        @keyframes resetStepsPulse {
            0%, 100% {
                transform: scale(1) rotate(0deg);
            }
            50% {
                transform: scale(1.08) rotate(180deg);
            }
        }
        
        #resetStepsModal button {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #resetStepsModal button:active {
            transform: translateY(1px) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        }

        @keyframes modalScaleIn {
            0% {
                transform: scale(0.7);
                opacity: 0;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
        }

        .modal-content {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
            backdrop-filter: blur(20px);
            position: absolute !important;
            left: 0;
            top: 0;
            width: 100% !important;
            height: 100% !important;
            min-width: 100% !important;
            min-height: 100% !important;
            padding: 30px;
            border-radius: 0;
            overflow-y: auto;
            box-shadow: none;
            animation: modalSlideInFromRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            background-clip: padding-box;
            box-sizing: border-box;
        }

        .modal-content::before {
            display: none;
        }

        .modal-content::-webkit-scrollbar {
            width: 8px;
        }

        .modal-content::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 4px;
        }

        .modal-content::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 4px;
        }

        .modal-content::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #5a6fd8, #6a4190);
        }

        @keyframes modalSlideInFromRight {
            0% {
                transform: translateX(100%);
                opacity: 0;
            }
            100% {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .close {
            color: #aaa;
            float: left;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 1001;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .close:hover {
            color: #e74c3c;
            background: rgba(255, 255, 255, 1);
            transform: scale(1.1);
        }

        .form-group {
            margin-bottom: 18px;
            position: relative;
        }

        .form-group label {
            display: flex;
            align-items: center;
            margin-bottom: 6px;
            color: #2c3e50;
            font-weight: 600;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .form-group label i {
            margin-left: 6px;
            font-size: 12px;
            color: #667eea;
            animation: iconPulse 2s infinite;
        }

        @keyframes iconPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.15); opacity: 0.7; }
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid rgba(33, 150, 243, 0.15);
            border-radius: 10px;
            font-size: 14px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
            backdrop-filter: blur(15px);
            color: #2c3e50;
            font-weight: 500;
            box-shadow: 0 3px 12px rgba(33, 150, 243, 0.08);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #2196f3;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
            box-shadow: 0 6px 20px rgba(33, 150, 243, 0.15);
            transform: translateY(-1px);
        }

        .form-group input:hover,
        .form-group select:hover,
        .form-group textarea:hover {
            border-color: #4caf50;
            transform: translateY(-0.5px);
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.12);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: #a0aec0;
            font-weight: 400;
        }

        .btn {
            background: linear-gradient(135deg, #2196f3, #21cbf3);
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 700;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            margin: 8px;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn i {
            font-size: 16px;
            animation: iconBounce 2s infinite;
        }

        @keyframes iconBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-2px); }
        }

        /* توسيط زر حفظ العقد */
        #contractForm .btn-success {
            margin: 20px auto !important;
            display: block !important;
            width: fit-content !important;
        }

        .btn::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:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 15px 35px rgba(33, 150, 243, 0.4);
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn:active {
            transform: translateY(-1px);
        }

        .btn-success {
            background: linear-gradient(135deg, #4caf50, #8bc34a);
            box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
        }

        .btn-success:hover {
            box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
        }

        .btn-danger {
            background: linear-gradient(135deg, #e17055, #d63031);
            box-shadow: 0 8px 25px rgba(225, 112, 85, 0.3);
        }

        .btn-danger:hover {
            box-shadow: 0 15px 35px rgba(225, 112, 85, 0.4);
        }

        .btn-warning {
            background: linear-gradient(135deg, #ff9800, #ffc107);
            box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
        }

        .btn-warning:hover {
            box-shadow: 0 15px 35px rgba(255, 152, 0, 0.4);
        }

        .table {
            width: 100%;
            border-collapse: collapse;
            border-spacing: 0;
            margin-top: 10px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
            backdrop-filter: blur(15px);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
            border: 1px solid rgba(59, 130, 246, 0.1);
        }

        .table th,
        .table td {
            padding: 4px 5px;
            text-align: center;
            border: none;
            font-size: 11px;
            vertical-align: middle;
            position: relative;
        }

        .table td {
            border-right: 1px solid rgba(226, 232, 240, 0.5);
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .table td:last-child {
            border-right: none;
        }

        .table td:hover {
            background: rgba(79, 70, 229, 0.05);
        }

        /* ضمان أن نوع العقد يبقى على سطر واحد */
        #contractsListModal .table td:nth-child(3) {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }

        /* تصغير عمود السلكت (checkbox) بنسبة 10% إضافية - لا يطبق على جداول المصروفات والعهدة */
        #contractsListModal .table th:nth-child(1),
        #contractsListModal .table td:nth-child(1) {
            width: 9.95px;
            max-width: 9.95px;
            min-width: 9.95px;
            padding: 2px;
        }

        /* جدول قائمة المصروفات: عمود نوع المصروف بعرض ظاهر */
        #expensesTable th:nth-child(1),
        #expensesTable td:nth-child(1) {
            width: auto;
            min-width: 90px;
            max-width: none;
            padding: 4px 5px;
        }

        /* جدول قائمة المصروفات الشهرية: عمود نوع المصروف بعرض ظاهر */
        #recurringExpensesTable th:nth-child(1),
        #recurringExpensesTable td:nth-child(1) {
            width: auto;
            min-width: 90px;
            max-width: none;
            padding: 4px 5px;
        }

        /* جدول سجل معاملات العهدة: العمود الأول (التاريخ) وأعمدة النوع بعرض ظاهر */
        #custodyTransactionsTable th:nth-child(1),
        #custodyTransactionsTable td:nth-child(1) {
            width: auto;
            min-width: 95px;
            max-width: none;
            padding: 4px 5px;
        }
        #custodyTransactionsTable th:nth-child(3),
        #custodyTransactionsTable td:nth-child(3),
        #custodyTransactionsTable th:nth-child(4),
        #custodyTransactionsTable td:nth-child(4) {
            width: auto;
            min-width: 85px;
            max-width: none;
            padding: 4px 5px;
        }

        /* تصغير عمود رقم العقد بنسبة 10% + 2% إضافية + 25% إضافية */
        #contractsListModal .table th:nth-child(2),
        #contractsListModal .table td:nth-child(2) {
            width: 66%;
            max-width: 66%;
        }

        /* تصغير عمود اسم الشركة بنسبة 5% + 2% إضافية */
        #contractsListModal .table th:nth-child(3),
        #contractsListModal .table td:nth-child(3) {
            width: 93%;
            max-width: 93%;
        }

        /* تصغير خانة نوع العقد بنسبة 25% + 2% إضافية */
        #contractsListModal .table th:nth-child(4),
        #contractsListModal .table td:nth-child(4) {
            max-width: 117.6px;
            width: auto;
            min-width: 78.4px;
            white-space: normal;
            line-height: 1.3;
            word-wrap: break-word;
            word-break: break-word;
            text-align: center;
        }

        /* تصغير عمود المهنة بنسبة 25% */
        #contractsListModal .table th:nth-child(6),
        #contractsListModal .table td:nth-child(6) {
            width: 75%;
            max-width: 75%;
        }

        /* تصغير عمود الحالة بنسبة 25% */
        #contractsListModal .table th:nth-child(15),
        #contractsListModal .table td:nth-child(15) {
            width: 70%;
            max-width: 70%;
        }

        /* تصغير عمود نسبة التقدم بنسبة 5% إضافية */
        #contractsListModal .table th:nth-child(17),
        #contractsListModal .table td:nth-child(17) {
            width: 88%;
            max-width: 88%;
        }

        /* تصغير عمود متابعة العقد بنسبة 5% إضافية */
        #contractsListModal .table th:nth-child(18),
        #contractsListModal .table td:nth-child(18) {
            width: 93%;
            max-width: 93%;
        }

        /* تصغير جميع الأعمدة الأخرى بنسبة 2% */
        #contractsListModal .table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(6)):not(:nth-child(15)):not(:nth-child(17)):not(:nth-child(18)),
        #contractsListModal .table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(6)):not(:nth-child(15)):not(:nth-child(17)):not(:nth-child(18)) {
            width: 98%;
            max-width: 98%;
        }

        /* تصغير أزرار عمود متابعة العقد بنسبة 5% */
        #contractsListModal .table td:nth-child(18) .contract-actions-container {
            transform: scale(0.95);
            transform-origin: center;
        }

        /* تنسيق الأزرار في الجدول */
        .table .btn {
            padding: 3px 6px;
            font-size: 10px;
            border-radius: 4px;
            margin: 1px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: inline-flex;
            align-items: center;
            gap: 2px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.2px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
            border: none;
        }

        .table .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        }

        .table .btn-primary {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        }

        .table .btn-warning {
            background: linear-gradient(135deg, #f59e0b, #d97706);
        }

        .table .btn-success {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .table .btn-danger {
            background: linear-gradient(135deg, #ef4444, #dc2626);
        }

        /* أيقونات دائرية لمتابعة العقد */
        .contract-actions-container {
            display: flex;
            align-items: center;
            gap: 4px;
            justify-content: center;
            flex-wrap: nowrap;
        }

        .btn-icon-circle {
            width: 27px;
            height: 27px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 3px 9px rgba(0, 0, 0, 0.15);
            position: relative;
            font-size: 12px;
            color: white;
        }

        .btn-icon-circle:hover {
            transform: translateY(-3px) scale(1.1);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        }

        .btn-icon-circle:active {
            transform: translateY(-1px) scale(1.05);
        }

        .btn-icon-circle.view {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .btn-icon-circle.tracking {
            background: linear-gradient(135deg, #f59e0b, #d97706);
        }

        .btn-icon-circle.delete {
            background: linear-gradient(135deg, #ef4444, #dc2626);
        }

        .btn-icon-circle.print {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        }

        .btn-icon-circle.export-selected {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .btn-icon-circle.export-all {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .btn-icon-circle.import {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        }

        .btn-icon-circle.backup-export {
            background: linear-gradient(135deg, #6b7280, #4b5563);
        }

        .btn-icon-circle.backup-import {
            background: linear-gradient(135deg, #6b7280, #4b5563);
        }

        .btn-icon-circle.reset {
            background: linear-gradient(135deg, #f59e0b, #d97706);
        }

        .btn-icon-circle.reset-step {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            width: 28px;
            height: 28px;
            font-size: 0.85rem;
        }

        .btn-icon-circle.reset-step:hover {
            background: linear-gradient(135deg, #d97706, #b45309);
        }

        /* قائمة منسدلة للأزرار */
        .action-dropdown {
            position: relative;
            display: inline-block;
        }

        .action-dropdown-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 45px;
            background: white;
            min-width: 180px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            border-radius: 12px;
            z-index: 1000;
            overflow: hidden;
            animation: slideDown 0.3s ease-out;
        }

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

        .action-dropdown-menu.show {
            display: block;
        }

        .action-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            color: #2c3e50;
            text-decoration: none;
            transition: all 0.2s ease;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            cursor: pointer;
        }

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

        .action-dropdown-item:hover {
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
            padding-right: 20px;
        }

        .action-dropdown-item i {
            width: 20px;
            text-align: center;
            font-size: 16px;
        }

        .action-dropdown-item.view-item {
            color: #10b981;
        }

        .action-dropdown-item.tracking-item {
            color: #f59e0b;
        }

        .action-dropdown-item.delete-item {
            color: #ef4444;
        }

        .table th {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
            color: white;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            font-size: 0.75rem;
            padding: 10px 8px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border: none;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
        }

        /* السماح بفصل الأسطر في خانة المجموع الفرعي الإجمالي */
        .table th[data-i18n="totalSubtotal"] {
            white-space: normal;
            line-height: 1.3;
        }

        /* السماح بفصل الأسطر في خانات الدفعة المدفوعة والدفعة المتبقية */
        .table th[data-i18n="paidAmount"],
        .table th[data-i18n="remainingAmount"] {
            white-space: normal;
            line-height: 1.3;
        }

        /* السماح بفصل الأسطر في خانات السعر للوحدة والمجموع الفرعي والقيمة الإجمالية */
        .table th[data-i18n="unitPrice"],
        .table th[data-i18n="subtotal"],
        .table th[data-i18n="totalValue"] {
            white-space: normal;
            line-height: 1.3;
        }

        .table tr {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        }

        .table tr:hover {
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.08));
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
        }

        .table tr:nth-child(even) {
            background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.6));
        }

        .table tr:nth-child(odd) {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.7));
        }

        .notification {
            position: fixed;
            top: 30px;
            right: 30px;
            background: linear-gradient(135deg, #00b894, #00a085);
            color: white;
            padding: 20px 25px;
            border-radius: 15px;
            box-shadow: 
                0 15px 35px rgba(0, 184, 148, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
            z-index: 1001;
            display: none;
            backdrop-filter: blur(10px);
            animation: notificationSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            font-weight: 600;
            max-width: 350px;
        }

        @keyframes notificationSlideIn {
            0% {
                transform: translateX(100%) scale(0.8);
                opacity: 0;
            }
            100% {
                transform: translateX(0) scale(1);
                opacity: 1;
            }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }

        .notification.error {
            background: linear-gradient(135deg, #e17055, #d63031);
            box-shadow: 
                0 15px 35px rgba(225, 112, 85, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
        }

        .notification.warning {
            background: linear-gradient(135deg, #fdcb6e, #e17055);
            box-shadow: 
                0 15px 35px rgba(253, 203, 110, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
        }

        .search-box {
            width: 100%;
            padding: 15px 20px 15px 50px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            font-size: 16px;
            margin-bottom: 25px;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            color: #2c3e50;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
        }

        .search-box:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.95);
        }

        .search-box::before {
            content: '\f002';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: #a0aec0;
            font-size: 16px;
        }

        .tabs {
            display: flex;
            margin-bottom: 30px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 5px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .tab {
            padding: 15px 30px;
            cursor: pointer;
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            font-weight: 600;
            color: #5a6c7d;
            position: relative;
            flex: 1;
            text-align: center;
        }

        .tab.active {
            background: linear-gradient(135deg, #2196f3, #4caf50);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
        }

        .tab:hover:not(.active) {
            background: rgba(33, 150, 243, 0.1);
            color: #2196f3;
            transform: translateY(-1px);
        }

        .tab-content {
            display: none;
        }

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

        /* صفحة تسجيل الدخول - تصميم Split شيك وجذاب */
        .login-page {
            min-height: 100vh;
            width: 100%;
            position: relative;
            overflow: hidden;
        }

        .login-wrapper {
            display: flex;
            min-height: 100vh;
            width: 100%;
        }

        .login-brand-panel {
            flex: 0 0 44%;
            min-height: 100vh;
            background: linear-gradient(165deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #533483 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 48px;
            position: relative;
            overflow: hidden;
        }

        .login-brand-panel::before {
            content: '';
            position: absolute;
            inset: 0;
            background: 
                radial-gradient(ellipse 90% 70% at 20% 30%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse 60% 50% at 80% 80%, rgba(118, 75, 162, 0.18) 0%, transparent 50%);
            pointer-events: none;
        }

        .login-brand-bg-shapes {
            position: absolute;
            inset: 0;
            overflow: hidden;
            pointer-events: none;
        }

        .login-shape {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.04);
        }

        .login-shape-1 { width: 320px; height: 320px; top: -80px; right: -80px; }
        .login-shape-2 { width: 200px; height: 200px; bottom: 20%; left: -60px; }
        .login-shape-3 { width: 120px; height: 120px; bottom: 15%; right: 15%; }

        .login-brand-content {
            position: relative;
            z-index: 1;
            text-align: center;
            direction: ltr;
        }

        .login-brand-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            flex-wrap: nowrap;
            margin-bottom: 20px;
        }

        .login-brand-logo {
            width: 277px;
            height: 277px;
            object-fit: contain;
            flex-shrink: 0;
        }

        .login-app-name {
            font-size: 2.25rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.92) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .login-tagline-1 {
            color: rgba(255, 255, 255, 0.9);
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0 0 6px 0;
        }

        .login-tagline-2 {
            color: rgba(255, 255, 255, 0.75);
            font-size: 0.95rem;
            font-weight: 600;
            margin: 0;
            letter-spacing: 0.08em;
        }

        .login-form-panel {
            flex: 1;
            min-height: 100vh;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 32px;
        }

        .login-form-panel .login-card {
            width: 100%;
            max-width: 400px;
            background: #fff;
            border-radius: 24px;
            padding: 48px 44px;
            box-shadow: 0 24px 56px rgba(26, 26, 46, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
        }

        .login-form-panel .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            border-radius: 24px 24px 0 0;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        }

        [dir="rtl"] .login-wrapper { flex-direction: row-reverse; }

        .login-form h2 {
            color: #1a1a2e;
            text-align: center;
            margin-bottom: 28px;
            font-size: 1.4rem;
            font-weight: 700;
        }

        .login-form .form-group input[type="text"],
        .login-form .form-group input[type="password"],
        .login-form .form-group input[type="email"] {
            border: 2px solid #e8ecf0;
            border-radius: 14px;
            padding: 14px 18px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .login-form .form-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
        }

        .login-form .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 14px;
            padding: 14px 24px;
            font-weight: 700;
            box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .login-form .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
        }

        .login-links {
            text-align: center;
            margin-top: 22px;
        }

        .login-links a {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
            margin: 0 10px;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        .login-links a:hover {
            color: #764ba2;
            text-decoration: underline;
        }

        .btn-outline {
            background: transparent;
            border: 2px solid #2196f3;
            color: #2196f3;
            padding: 8px 16px;
            font-size: 0.9rem;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .btn-outline:hover {
            background: #2196f3;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
        }

        .btn-outline i {
            font-size: 0.9rem;
        }

        .header-content {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .header-info {
            display: flex;
            align-items: center;
            gap: 25px;
            flex-wrap: wrap;
            width: 100%;
        }

        .header-logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-icon {
            width: 92px;
            height: 92px;
            background: transparent;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transform: scale(1.5);
            transform-origin: center center;
            overflow: visible;
        }

        .logo-icon i {
            font-size: 2.25rem;
            color: #fff;
        }

        @keyframes logoFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-8px); }
        }

        .logo-text h1 {
            font-size: 1.6rem;
            margin: 0;
            color: #fff;
            background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.3;
            font-weight: 800;
        }

        .logo-text p {
            font-size: 0.95rem;
            margin: 4px 0 0 0;
            color: rgba(255, 255, 255, 0.95);
            font-weight: 600;
        }

        .header-images {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .image-card {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 15px 20px;
            text-align: center;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .image-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        }

        .image-card i {
            font-size: 2rem;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: block;
            margin-bottom: 8px;
        }

        .image-card span {
            font-size: 0.9rem;
            font-weight: 600;
            color: #2c3e50;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
            margin-right: auto;
        }

        .user-details {
            text-align: right;
            min-width: 120px;
        }

        .user-details span {
            display: block;
            color: rgba(255, 255, 255, 0.95);
            font-weight: 600;
            font-size: 0.95rem;
            line-height: 1.4;
        }

        .user-details span:first-child {
            font-size: 1rem;
            font-weight: 700;
            color: #fff;
        }

        .user-details span:last-child {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 500;
        }

        .user-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }

        .language-toggle {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            transition: all 0.3s ease;
            padding: 8px 16px;
            font-size: 0.9rem;
            font-weight: 600;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .language-toggle:hover {
            background: linear-gradient(135deg, #5a6fd8, #6a4190);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .language-toggle i {
            font-size: 0.9rem;
        }

        /* أيقونات الهيدر: لغة، إشعارات، ملف شخصي، خروج */
        .header-icon-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .header-icon-btn {
            width: 38px;
            height: 38px;
            min-width: 38px;
            min-height: 38px;
            padding: 0;
            border: none;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: visible;
        }
        .header-icon-btn i {
            font-size: 1.05rem;
        }
        .header-notification-count {
            position: absolute;
            top: -5px;
            right: -5px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: #e53935;
            color: #fff;
            font-size: 0.68rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            border: 2px solid #fff;
            z-index: 2;
            display: none;
        }
        .header-notification-count.is-visible {
            display: inline-flex;
        }
        .header-icon-btn:hover {
            background: rgba(255, 255, 255, 0.35);
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        }
        .header-icon-btn:active {
            transform: translateY(0);
        }
        #headerLangBtn {
            background: rgba(255, 255, 255, 0.25);
            color: #fff;
        }
        #headerNotificationsBtn i {
            font-size: 1.1rem;
        }

        /* ========== نافذة الإشعارات ========== */
        .notifications-modal .modal-content.notifications-modal-content {
            max-width: 520px;
            padding: 0;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 25px 60px rgba(102, 126, 234, 0.25), 0 10px 30px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(102, 126, 234, 0.15);
        }
        .notifications-modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 24px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }
        .notifications-modal-header-inner {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .notifications-modal-icon-wrap {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .notifications-modal-icon-wrap i {
            font-size: 1.5rem;
            color: white;
        }
        .notifications-modal-title-wrap { min-width: 0; }
        .notifications-modal-title {
            margin: 0;
            font-size: 1.35rem;
            font-weight: 700;
            color: white;
            letter-spacing: -0.02em;
        }
        .notifications-modal-subtitle {
            margin: 4px 0 0 0;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.85);
        }
        .notifications-modal-close {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .notifications-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
        }
        .notifications-modal-close i { font-size: 1.1rem; }
        .notifications-modal-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .notifications-modal-action-btn {
            width: 38px;
            height: 38px;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        .notifications-modal-action-btn:hover {
            transform: translateY(-1px);
            opacity: 0.92;
        }
        .notifications-modal-action-btn.read-all {
            background: rgba(76, 175, 80, 0.85);
        }
        .notifications-modal-action-btn.delete-all {
            background: rgba(229, 57, 53, 0.88);
        }
        .notifications-modal-body {
            padding: 20px 24px 24px;
            max-height: 65vh;
            overflow-y: auto;
            background: linear-gradient(180deg, #fafbff 0%, #f5f6fc 100%);
        }
        .notifications-modal-body::-webkit-scrollbar { width: 6px; }
        .notifications-modal-body::-webkit-scrollbar-track { background: rgba(102, 126, 234, 0.08); border-radius: 3px; }
        .notifications-modal-body::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 3px; }
        .notifications-list { display: flex; flex-direction: column; gap: 12px; }
        .notification-card {
            display: flex;
            gap: 14px;
            padding: 16px 18px;
            background: white;
            border-radius: 14px;
            border: 1px solid rgba(102, 126, 234, 0.12);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
            transition: all 0.25s ease;
            position: relative;
        }
        .notification-card:hover {
            border-color: rgba(102, 126, 234, 0.25);
            box-shadow: 0 6px 24px rgba(102, 126, 234, 0.12);
        }
        .notification-card-icon {
            width: 42px;
            height: 42px;
            min-width: 42px;
            border-radius: 12px;
            background: linear-gradient(145deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
            color: #667eea;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .notification-card-icon i { font-size: 1rem; }
        .notification-card-content { flex: 1; min-width: 0; padding-inline-end: 40px; }
        .notification-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
        .notification-card-title { margin: 0; font-size: 1rem; font-weight: 600; color: #2d3748; line-height: 1.35; }
        .notification-card-index {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            margin-inline-end: 6px;
            background: #1d4ed8;
            color: #ffffff;
            font-size: 0.76rem;
            font-weight: 700;
            vertical-align: middle;
            box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35);
        }
        .notification-card-priority { font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
        .notification-priority-high { background: linear-gradient(135deg, #f56565, #e53e3e); color: white; }
        .notification-priority-medium { background: linear-gradient(135deg, #ed8936, #dd6b20); color: white; }
        .notification-priority-normal { background: rgba(102, 126, 234, 0.15); color: #667eea; }
        .notification-card-desc { margin: 0 0 8px 0; font-size: 0.9rem; color: #5a6c7d; line-height: 1.45; }
        .notification-card-meta { font-size: 0.8rem; color: #a0aec0; margin-bottom: 10px; }
        .notification-card-meta i { margin-inline-end: 4px; }
        .notification-card-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .notification-card-status {
            font-size: 0.72rem;
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 999px;
            line-height: 1;
        }
        .notification-card-status.unread {
            background: rgba(237, 137, 54, 0.18);
            color: #c05621;
        }
        .notification-card-status.read {
            background: rgba(72, 187, 120, 0.18);
            color: #2f855a;
        }
        .notification-card-read {
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, #38a169, #2f855a);
            color: #fff;
            font-size: 0.78rem;
            font-weight: 600;
            padding: 6px 10px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .notification-card-read:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(56, 161, 105, 0.28);
        }
        .notification-card-read:disabled {
            cursor: not-allowed;
            opacity: 0.75;
            background: #a0aec0;
            box-shadow: none;
        }
        .notification-date-time {
            direction: ltr;
            unicode-bidi: isolate;
            display: inline-block;
        }
        .notification-card-delete {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            background: rgba(245, 101, 101, 0.1);
            color: #e53e3e;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .notification-card-delete:hover { background: #e53e3e; color: white; }
        .notification-card-delete i { font-size: 0.85rem; }
        [dir="rtl"] .notification-card-delete { right: auto; left: 12px; }
        .notifications-empty-msg { text-align: center; padding: 40px 24px !important; }
        .notifications-empty-msg .notifications-empty-icon {
            width: 72px;
            height: 72px;
            margin: 0 auto 16px;
            border-radius: 50%;
            background: linear-gradient(145deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
            color: #667eea;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .notifications-empty-msg .notifications-empty-icon i { font-size: 1.75rem; }
        .notifications-empty-msg p { margin: 0 0 6px 0; font-size: 1.1rem; font-weight: 600; color: #4a5568; }
        .notifications-empty-msg span { font-size: 0.9rem; color: #a0aec0; }

        /* RTL/LTR Support */
        [dir="rtl"] {
            direction: rtl;
        }

        [dir="ltr"] {
            direction: ltr;
        }

        [dir="ltr"] .user-details {
            text-align: left;
        }

        [dir="ltr"] .sidebar {
            animation: sidebarSlideInLTR 0.8s ease-out;
        }

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

        [dir="ltr"] .sidebar-menu-link::before {
            left: auto;
            right: 0;
        }

        [dir="ltr"] .form-group label {
            text-align: left;
        }

        [dir="ltr"] .table {
            text-align: left;
        }

        [dir="ltr"] .modal-content {
            text-align: left;
        }

        .btn-primary {
            background: linear-gradient(135deg, #2196f3, #1976d2);
            width: 100%;
        }

        .btn-success {
            background: linear-gradient(135deg, #4caf50, #388e3c);
            width: 100%;
        }

        .btn-warning {
            background: linear-gradient(135deg, #ff9800, #f57c00);
            width: 100%;
        }

        .form-group label input[type="checkbox"] {
            width: auto;
            margin-left: 10px;
        }

        /* تنسيق خانة التأكيد الإلزامية */
        .checkbox-group {
            background: linear-gradient(135deg, #fff3cd, #ffeaa7);
            border: 2px solid #ffc107;
            border-radius: 12px;
            padding: 15px;
            margin: 10px 0;
        }

        .checkbox-label {
            display: flex;
            align-items: flex-start;
            cursor: pointer;
            margin: 0;
            font-size: 14px;
            line-height: 1.5;
        }

        .checkbox-label input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-left: 10px;
            margin-top: 2px;
            cursor: pointer;
            accent-color: #ffc107;
        }

        .checkbox-text {
            flex: 1;
            color: #856404;
            font-weight: 600;
        }

        .checkbox-group:hover {
            background: linear-gradient(135deg, #fff3cd, #ffd700);
            border-color: #ffb300;
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
        }

        /* تنسيق محسّن لخانات التأكيد في نظام متابعة العقود */
        #contractTrackingModal .checkbox-group {
            background: linear-gradient(135deg, #fff5f5, #ffe5e5);
            border: 1px solid #dc3545 !important;
            border-radius: 6px !important;
            padding: 6px 8px !important;
            margin: 4px 0 !important;
            transition: all 0.2s ease;
        }

        #contractTrackingModal .checkbox-group:hover {
            background: linear-gradient(135deg, #ffe5e5, #ffcccc);
            border-color: #c82333;
            box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
            transform: translateY(-1px);
        }

        #contractTrackingModal .checkbox-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            margin: 0;
            font-size: 11px !important;
            line-height: 1.3 !important;
            gap: 6px !important;
        }

        #contractTrackingModal .checkbox-label input[type="checkbox"] {
            width: 14px !important;
            height: 14px !important;
            margin: 0;
            cursor: pointer;
            accent-color: #dc3545;
            flex-shrink: 0;
        }

        #contractTrackingModal .checkbox-text {
            flex: 1;
            color: #721c24;
            font-weight: 500;
            font-size: 11px !important;
            line-height: 1.3 !important;
        }

        #contractTrackingModal .checkbox-text strong {
            font-weight: 600;
            color: #721c24;
            font-size: 11px !important;
        }

        #contractTrackingModal .required-star {
            color: #dc3545;
            font-weight: bold;
            font-size: 10px !important;
            margin-left: 2px !important;
        }

        /* تنسيق صف خانات التأكيد في سطر واحد بحجم النص */
        #contractTrackingModal .checkboxes-row {
            display: flex;
            gap: 8px !important;
            margin: 8px 0 10px 0 !important;
            justify-content: flex-start;
            flex-wrap: wrap;
            width: 100%;
        }

        #contractTrackingModal .checkboxes-row .checkbox-group {
            flex: 0 0 auto;
            min-width: fit-content;
            margin: 0;
            width: auto;
            max-width: 100%;
            padding: 5px 8px !important;
        }
        
        /* تصغير checkboxes في المرحلة 5 (استلام الدفعة الأخيرة) */
        #contractTrackingModal #step5Content .checkboxes-row .checkbox-group {
            padding: 4px 6px !important;
            border-radius: 4px !important;
        }
        
        #contractTrackingModal #step5Content .checkboxes-row .checkbox-label {
            font-size: 10px !important;
            gap: 4px !important;
        }
        
        #contractTrackingModal #step5Content .checkboxes-row .checkbox-label input[type="checkbox"] {
            width: 12px !important;
            height: 12px !important;
        }
        
        #contractTrackingModal #step5Content .checkboxes-row .checkbox-text {
            font-size: 10px !important;
        }
        
        #contractTrackingModal #step5Content .checkboxes-row .checkbox-text strong {
            font-size: 10px !important;
        }

        #contractTrackingModal .checkboxes-row .checkbox-text {
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            line-height: 1.3;
        }

        #contractTrackingModal .checkboxes-row .checkbox-label {
            align-items: center;
            white-space: nowrap;
        }

        optgroup {
            font-weight: bold;
            color: #2c3e50;
            background: linear-gradient(135deg, #2196f3, #4caf50);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            padding: 5px 0;
        }

        optgroup option {
            font-weight: normal;
            color: #2c3e50;
            padding: 8px 15px;
            background: rgba(255, 255, 255, 0.9);
        }

        optgroup option:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
        }

        .permissions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .permission-card {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            border-left: 4px solid #3498db;
        }

        .permission-card h4 {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: 1.2rem;
        }

        .permission-card ul {
            list-style: none;
            padding: 0;
        }

        .permission-card li {
            padding: 5px 0;
            color: #7f8c8d;
            position: relative;
            padding-right: 20px;
        }

        .permission-card li:before {
            content: "✓";
            position: absolute;
            right: 0;
            color: #27ae60;
            font-weight: bold;
        }

        /* إدارة العقود */
        .contracts-filters {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            padding: 20px;
        }
        
        /* تمييز الصفوف الفرعية في جدول العقود */
        .contract-sub-row {
            background-color: #f8f9fa;
            border-left: 3px solid #007bff;
        }
        
        .contract-sub-row td:first-child {
            border-left: 3px solid #007bff;
        }
        
        .contract-main-row {
            background-color: #ffffff;
            font-weight: bold;
        }
        
        /* تنسيق خلايا العدد والجنسية والمهنة المنفصلة */
        .count-cell {
            line-height: 1.4;
            padding: 4px;
            vertical-align: top;
            text-align: center;
            font-weight: bold;
            background-color: transparent;
            color: #000000;
        }
        
        .nationality-cell {
            line-height: 1.4;
            padding: 4px;
            vertical-align: top;
            font-weight: 600;
            color: #000000;
            background-color: transparent;
        }
        
        .profession-cell {
            line-height: 1.4;
            padding: 4px;
            vertical-align: top;
            font-style: italic;
            color: #000000;
            background-color: transparent;
        }
        
        .unit-price-cell {
            line-height: 1.4;
            padding: 4px;
            vertical-align: top;
            text-align: center;
            font-weight: bold;
            color: #000000;
            background-color: transparent;
        }
        
        .subtotal-cell {
            line-height: 1.4;
            padding: 4px;
            vertical-align: top;
            text-align: center;
            font-weight: bold;
            color: #000000;
            background-color: transparent;
        }
        
        .subtotal-31000 {
            background: linear-gradient(90deg, #667eea, #f093fb) !important;
            color: white !important;
            font-weight: bold !important;
            border-radius: 4px;
            padding: 4px 8px !important;
        }
        
        .subtotal-31000 span {
            color: white !important;
        }
        
        .total-subtotal-cell {
            line-height: 1.8;
            padding: 8px;
            vertical-align: top;
            text-align: center;
            font-weight: bold;
            color: #000000;
            background-color: #f8f9fa;
            border-left: 3px solid #28a745;
        }
        
        .tax-cell {
            line-height: 1.8;
            padding: 8px;
            vertical-align: top;
            text-align: center;
            font-weight: bold;
            color: #dc3545;
            background-color: #fff5f5;
            border-left: 3px solid #dc3545;
        }
        
        .form-text {
            font-size: 0.875rem;
            color: #6c757d;
            margin-top: 0.25rem;
        }
        
        .contracts-filters {
            background: #f8f9fa;
            border-radius: 8px;
            flex-wrap: wrap;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 200px;
        }

        .filter-group label {
            font-weight: 600;
            color: #333;
            font-size: 14px;
        }

        .filter-group select,
        .filter-group input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }

        .search-box {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            margin-bottom: 20px;
        }

        .search-box:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
        }

        /* لوحة المتابعة الشاملة */
        .dashboard-header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 10px;
        }

        .dashboard-header h3 {
            margin: 0 0 10px 0;
            font-size: 24px;
        }

        .dashboard-header p {
            margin: 0;
            opacity: 0.9;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 15px;
            transition: transform 0.3s ease;
        }

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

        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
            background: #2196f3;
        }

        .stat-icon.active {
            background: #4caf50;
        }

        .stat-icon.warning {
            background: #ff9800;
        }

        .stat-icon.danger {
            background: #f44336;
        }

        .stat-icon.success {
            background: #4caf50;
        }

        .stat-content h4 {
            margin: 0 0 5px 0;
            font-size: 28px;
            font-weight: bold;
            color: #333;
        }

        .stat-content p {
            margin: 0;
            color: #666;
            font-size: 14px;
        }

        .financial-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card.financial {
            background: linear-gradient(135deg, #2196f3 0%, #4caf50 100%);
            color: white;
        }

        .stat-card.financial .stat-icon {
            background: rgba(255,255,255,0.2);
        }

        .stat-card.financial h4 {
            color: white;
        }

        .stat-card.financial p {
            color: rgba(255,255,255,0.8);
        }

        .dashboard-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .dashboard-section h4 {
            margin: 0 0 20px 0;
            color: #333;
            font-size: 18px;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 10px;
        }

        .contracts-distribution {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .distribution-item {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .distribution-bar {
            flex: 1;
            height: 20px;
            background: #e9ecef;
            border-radius: 10px;
            overflow: hidden;
        }

        .bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            transition: width 0.5s ease;
        }

        .distribution-info {
            display: flex;
            justify-content: space-between;
            min-width: 200px;
            font-weight: 500;
        }

        .in-progress-contracts-list,
        .completed-contracts-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .contract-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #ffc107;
        }

        .contract-item.in-progress {
            border-left-color: #ffc107;
        }

        .contract-item.completed {
            border-left-color: #28a745;
        }

        .contract-item.active {
            border-left-color: #007bff;
        }

        .contract-item.new {
            border-left-color: #17a2b8;
        }

        .stat-icon.new {
            background: linear-gradient(135deg, #2196f3, #4caf50);
        }

        .contract-info h5 {
            margin: 0 0 5px 0;
            color: #333;
        }

        .contract-info p {
            margin: 0;
            color: #666;
            font-size: 14px;
        }

        .contract-actions {
            display: flex;
            gap: 10px;
        }

        .quick-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .quick-actions .btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 15px;
            font-weight: 500;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .filter-group label {
            font-weight: bold;
            color: #2c3e50;
        }

        .filter-group select,
        .filter-group input {
            padding: 8px 12px;
            border: 2px solid #e0e6ed;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .filter-group select:focus,
        .filter-group input:focus {
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }




        .templates-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }


        .template-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 30px 20px;
            border-radius: 15px;
            text-align: center;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .template-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        .template-card i {
            font-size: 2.5em;
            margin-bottom: 15px;
            display: block;
        }

        .template-card h4 {
            margin: 10px 0;
            font-size: 1.2em;
        }

        .template-card p {
            font-size: 0.9em;
            opacity: 0.9;
        }

        .reports-filters {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
        }

        .contract-status {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8em;
            font-weight: bold;
            text-align: center;
        }

        .contract-status.active {
            background: linear-gradient(135deg, #ff6b35, #f7931e);
            color: white;
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
            font-weight: bold;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }

        .contract-status.cancelled {
            background-color: #dc3545 !important;
            background: #dc3545 !important;
            color: white !important;
            padding: 5px 12px !important;
            border-radius: 20px !important;
            font-size: 0.8em !important;
            font-weight: bold !important;
            text-align: center !important;
            box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
            white-space: nowrap !important;
            display: inline-block !important;
        }
        
        td .contract-status.cancelled,
        .table td .contract-status.cancelled {
            background-color: #dc3545 !important;
            background: #dc3545 !important;
            color: white !important;
        }
        
        .contract-status.in-progress {
            background: linear-gradient(135deg, #ff6b35, #f7931e);
            color: white;
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
            font-weight: bold;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            white-space: nowrap;
            min-width: 120px;
            display: inline-block;
        }

        .contract-status {
            background: linear-gradient(135deg, #ff6b35, #f7931e);
            color: white;
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
            font-weight: bold;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            white-space: nowrap;
            min-width: 120px;
            display: inline-block;
        }



        
        
        
        
        
        
        .progress-stage.waiting {
            background: #e1f5fe;
            color: #0277bd;
            border: 2px solid #0277bd;
        }

        .days-remaining {
            font-weight: bold;
        }

        .days-remaining.urgent {
            color: #dc3545;
        }

        .days-remaining.warning {
            color: #ffc107;
        }

        .days-remaining.safe {
            color: #28a745;
        }

        .report-summary {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .summary-item {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            color: white;
        }

        .summary-item h4 {
            margin: 0 0 10px 0;
            font-size: 1.1em;
        }

        .summary-item p {
            margin: 0;
            font-size: 1.5em;
            font-weight: bold;
        }

        .revenue-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .revenue-item {
            background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
            padding: 25px;
            border-radius: 15px;
            text-align: center;
            color: white;
        }

        .revenue-item h4 {
            margin: 0 0 15px 0;
            font-size: 1.2em;
        }

        .revenue-item p {
            margin: 0;
            font-size: 2em;
            font-weight: bold;
        }

        /* إدارة تذاكر الطيران */
        .flight-filters {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .flights-overview {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .flight-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 25px;
            border-radius: 15px;
            text-align: center;
            color: white;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .flight-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        }

        .flight-count {
            font-size: 2.5em;
            font-weight: bold;
            margin: 15px 0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .airlines-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .airline-card {
            background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
            padding: 30px 20px;
            border-radius: 15px;
            text-align: center;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .airline-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        .airline-card i {
            font-size: 2.5em;
            margin-bottom: 15px;
            display: block;
        }

        .airline-card h4 {
            margin: 10px 0;
            font-size: 1.3em;
        }

        .airline-card p {
            font-size: 0.9em;
            opacity: 0.9;
            margin-bottom: 15px;
        }

        .airline-stats {
            display: flex;
            justify-content: space-around;
            margin-top: 15px;
        }

        .airline-stats span {
            background: rgba(255, 255, 255, 0.2);
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.8em;
        }

        .workers-filters {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .ticket-status {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8em;
            font-weight: bold;
            text-align: center;
        }

        .ticket-status.booked {
            background: #d1ecf1;
            color: #0c5460;
        }

        .ticket-status.confirmed {
            background: #d4edda;
            color: #155724;
        }

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

        .ticket-status.used {
            background: #fff3cd;
            color: #856404;
        }

        .ticket-status.expired {
            background: #f5c6cb;
            color: #721c24;
        }

        .flight-route {
            font-weight: bold;
            color: #2c3e50;
        }

        .flight-time {
            font-family: 'Courier New', monospace;
            background: rgba(52, 152, 219, 0.1);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .seat-class {
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: bold;
        }

        .seat-class.economy {
            background: #e3f2fd;
            color: #1565c0;
        }

        .seat-class.business {
            background: #f3e5f5;
            color: #7b1fa2;
        }

        .seat-class.first {
            background: #fff8e1;
            color: #f57c00;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-row-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 7.5px;
            margin-bottom: 9px;
        }
        
        /* تقليل المسافة بين العدد الإجمالي وأول مربع */
        #firstRow {
            margin-bottom: 0px !important;
        }
        
        #additionalWorkersContainer {
            margin-top: 0px !important;
            padding-top: 0px !important;
        }
        
        /* إزالة المسافة من أول عنصر في additionalWorkersContainer */
        #additionalWorkersContainer > div:first-child {
            margin-top: 0px !important;
            padding-top: 0px !important;
        }
        
        /* إخفاء خانة جميع العمال دائماً */
        #allWorkersGroup {
            display: none !important;
        }

        .form-row-3 .form-group {
            margin-bottom: 0;
            width: 100%;
            box-sizing: border-box;
            overflow: hidden;
            min-width: 0;
        }
        
        /* تقليل المسافات في متابعة الاستقدام من الخارج */
        #additionalWorkersContainer .form-row-3 {
            display: flex;
            flex-wrap: wrap;
            gap: 7.5px;
            margin-bottom: 9px;
            align-items: center;
        }
        
        #additionalWorkersContainer .form-group {
            margin-bottom: 0;
            width: auto;
            flex: 0 0 auto;
            min-width: fit-content;
        }
        
        #additionalWorkersContainer .form-group input {
            width: auto;
            min-width: fit-content;
            padding: 8px 10px;
            box-sizing: border-box;
            text-align: center;
            vertical-align: middle;
            line-height: 1.4;
        }
        
        #additionalWorkersContainer .form-group input[readonly] {
            width: auto;
            min-width: fit-content;
            max-width: none;
            text-align: center;
            vertical-align: middle;
        }
        
        #additionalWorkersContainer .form-group {
            display: flex;
            align-items: center;
            justify-content: center;
            vertical-align: middle;
        }
        
        /* تنسيق خاص لحقل نسبة الخصم في form-row-3 */
        #pricingDiscountPercent {
            min-width: 0 !important;
            max-width: 100% !important;
        }
        
        .form-row-3 .form-group label {
            display: block;
            width: 100%;
            margin-bottom: 8px;
        }
        
        .form-row-3 .form-group input,
        .form-row-3 .form-group select {
            width: 100%;
            box-sizing: border-box;
            min-width: 0;
        }

        .performance-criteria {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            margin: 20px 0;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .performance-criteria h4 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 1.3rem;
            text-align: center;
        }

        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 15px;
            font-size: 1.1rem;
            cursor: pointer;
            margin-bottom: 20px;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
        }

        .mobile-menu-toggle:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
        }

        .mobile-menu-toggle i {
            margin-left: 10px;
            transition: transform 0.3s ease;
        }

        .mobile-menu-toggle.active i {
            transform: rotate(180deg);
        }

        /* Responsive Design for Modals */
        @media (max-width: 1200px) {
            .modal-content {
                width: 100%;
                height: 100vh;
            }
        }

        @media (max-width: 768px) {
            .modal-content {
                width: 100%;
                height: 100vh;
                border-radius: 0;
                padding: 20px;
            }
        }

        /* Mobile Responsive Design */
        @media (max-width: 1024px) {
            .container {
                flex-direction: column;
                gap: 20px;
            }

            .main-layout {
                flex-direction: column;
                gap: 20px;
            }

            .business-showcase {
                padding: 30px 15px;
                margin: 15px 0;
            }

            .showcase-title {
                font-size: 2rem;
                margin-bottom: 12px;
            }

            .showcase-subtitle {
                font-size: 1rem;
            }

            .services-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .service-card {
                padding: 25px 20px;
            }

            .service-icon {
                width: 70px;
                height: 70px;
                margin-bottom: 15px;
            }

            .service-icon i {
                font-size: 2rem;
            }

            .service-content h3 {
                font-size: 1.2rem;
                margin-bottom: 10px;
            }

            .service-content p {
                font-size: 0.9rem;
            }

            .welcome-section {
                margin: 20px 0;
                padding: 30px 20px;
            }

            .welcome-section h2 {
                font-size: 2rem;
            }

            .welcome-section p {
                font-size: 1.1rem;
            }

            .welcome-features {
                flex-direction: column;
                gap: 20px;
                margin-top: 20px;
            }

            .feature-item {
                justify-content: center;
            }

            .quick-actions {
                margin: 20px 0;
                padding: 20px;
            }

            .quick-actions h3 {
                font-size: 1.5rem;
            }

            .quick-actions-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .quick-action-btn {
                padding: 20px 15px;
            }

            .quick-action-btn i {
                font-size: 1.5rem;
            }
            
            .sidebar {
                width: 100%;
                position: static;
                max-height: none;
                order: 2;
                display: none;
            }
            
            .sidebar.show {
                display: block;
                animation: sidebarSlideDown 0.3s ease-out;
            }

            @keyframes sidebarSlideDown {
                from {
                    opacity: 0;
                    transform: translateY(-20px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }
            
            .main-content {
                order: 1;
            }

            .mobile-menu-toggle {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .form-row {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .form-row-3 {
                grid-template-columns: 1fr;
                gap: 15px;
            }
        }

        @media (max-width: 1024px) and (min-width: 769px) {
            .form-row-3 {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* نظام متابعة العقود - تصميم جذري جديد تماماً */
        .contract-info-header {
            background: transparent;
            color: #2c3e50;
            padding: 0;
            margin-bottom: 24px;
            text-align: center;
            position: relative;
            overflow: visible;
        }

        .contract-info-header::before {
            display: none;
        }

        .tracking-main-line {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding-bottom: 6px;
        }
        .contract-info-header h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 700;
            color: #4a5568;
            background: rgba(102, 126, 234, 0.08);
            border: 2px solid rgba(102, 126, 234, 0.15);
            border-radius: 20px;
            padding: 8px 14px;
            white-space: nowrap;
            letter-spacing: 0;
            -webkit-text-fill-color: initial;
        }

        .contract-info-header p {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: #5a6c7d;
            display: inline-block;
            padding: 8px 14px;
            background: rgba(102, 126, 234, 0.08);
            border-radius: 20px;
            border: 2px solid rgba(102, 126, 234, 0.15);
            white-space: nowrap;
        }

        .tracking-progress-summary {
            margin: 0;
            max-width: none;
            background: rgba(79, 70, 229, 0.08);
            border: 1px solid rgba(102, 126, 234, 0.2);
            border-radius: 20px;
            padding: 6px 10px;
            box-shadow: none;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }
        .tracking-progress-summary-head {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 0;
        }
        .tracking-progress-summary-title {
            font-size: 0.82rem;
            font-weight: 700;
            color: #2d3748;
        }
        .tracking-progress-summary-percent {
            font-size: 0.9rem;
            font-weight: 800;
            color: #4f46e5;
        }
        .tracking-progress-summary-bar-wrap {
            width: 78px;
            height: 8px;
            border-radius: 999px;
            background: #e2e8f0;
            overflow: hidden;
            flex: 0 0 auto;
        }
        .tracking-progress-summary-bar {
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #22c55e 0%, #3b82f6 50%, #7c3aed 100%);
            transition: width 0.35s ease;
        }
        .tracking-progress-completed-steps {
            margin-top: 0;
            font-size: 0.82rem;
            font-weight: 700;
            color: #475569;
            text-align: right;
            background: transparent;
            border-radius: 0;
            padding: 0;
        }
        @media (max-width: 1200px) {
            .tracking-main-line {
                justify-content: flex-start;
            }
        }

        .tracking-steps {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0;
            position: relative;
            padding: 40px 0;
        }

        .tracking-steps::before {
            display: none;
        }

        /* Timeline جديد - خط عمودي متصل */
        .tracking-steps::after {
            content: '';
            position: absolute;
            right: 45px;
            top: 0;
            bottom: 0;
            width: 4px;
            background: repeating-linear-gradient(
                180deg,
                #667eea 0px,
                #667eea 20px,
                transparent 20px,
                transparent 40px
            );
            border-radius: 2px;
            z-index: 0;
        }

        .step {
            background: transparent;
            backdrop-filter: none;
            border-radius: 0;
            box-shadow: none;
            overflow: visible;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            z-index: 1;
            border: none;
            margin-bottom: 50px;
            padding-right: 90px;
        }

        .step::before {
            display: none;
        }

        .step:hover {
            transform: none;
            box-shadow: none;
            border-color: transparent;
        }

        /* تصميم جديد للرقم - على شكل badge جانبي */
        .step-number {
            width: 70px;
            height: 70px;
            border-radius: 0;
            background: #ffffff;
            color: #667eea;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            font-size: 1.8rem;
            margin: 0;
            box-shadow: 
                0 8px 25px rgba(0, 0, 0, 0.12),
                inset 0 0 0 4px #667eea;
            position: absolute;
            right: -85px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 2;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%);
            border-right: 4px solid #667eea;
        }

        .step:hover .step-number {
            transform: translateY(-50%) scale(1.05);
            box-shadow: 
                0 12px 35px rgba(102, 126, 234, 0.25),
                inset 0 0 0 5px #667eea;
        }

        /* محتوى البطاقة - تصميم جديد */
        .step > .step-header {
            background: #ffffff;
            border-radius: 0;
            box-shadow: 
                0 5px 20px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(102, 126, 234, 0.1);
            overflow: visible;
            position: relative;
            border-right: 5px solid #667eea;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-bottom: 2px solid #f0f0f0;
        }

        .step > .step-header::after {
            display: none;
        }

        .step > .step-header::before {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 5px;
            background: linear-gradient(180deg, #667eea, #764ba2);
        }

        .step > .step-header h4 {
            flex: 1;
            margin: 0;
            color: #2c3e50;
            font-size: 0.95rem;
            font-weight: 800;
            text-shadow: none;
            position: relative;
            z-index: 2;
            letter-spacing: 0.3px;
            padding-right: 10px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .step > .step-header h4 .step-title-text {
            display: inline-block;
        }

        /* عرض التواريخ في عنوان المرحلة */
        .step-header-timestamp {
            display: inline-flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-right: 10px;
        }

        .step-header-timestamp .timestamp-text {
            font-size: 0.7rem;
            color: #5a6c7d;
            font-weight: 600;
            white-space: nowrap;
            direction: rtl;
            line-height: 1.3;
        }

        .step-header-timestamp .timestamp-text strong {
            color: #667eea;
            font-weight: 700;
            margin-left: 5px;
        }

        .step-status {
            padding: 4px 10px;
            border-radius: 0;
            font-weight: 700;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: none;
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
            border: 2px solid;
            clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
        }

        .step-status:hover {
            transform: translateX(-3px);
        }

        .step-status.not-started {
            background: #ffffff;
            color: #6c757d;
            border-color: #dee2e6;
        }

        .step-status.in-progress {
            background: #fff4e6;
            color: #d97706;
            border-color: #f59e0b;
            animation: statusPulse 2s ease-in-out infinite;
        }

        @keyframes statusPulse {
            0%, 100% {
                border-color: #f59e0b;
            }
            50% {
                border-color: #fbbf24;
            }
        }

        .step-status.completed {
            background: #ecfdf5;
            color: #059669;
            border-color: #10b981;
        }

        .step-content {
            padding: 10px 15px !important;
            background: #fafbfc;
            border-top: 1px solid #e8e9ea;
            margin-top: 0;
            border-right: 5px solid #667eea;
            box-shadow: 
                0 5px 20px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(102, 126, 234, 0.1);
        }

        #contractTrackingModal .step-content {
            padding: 5px 10px !important;
        }

        /* المراحل 1 و 2 و 3: الخانات بجوار الأزرار على سطر واحد */
        #contractTrackingModal #step1Content,
        #contractTrackingModal #step2Content,
        #contractTrackingModal #step3Content {
            display: flex !important;
            align-items: flex-start;
            gap: 15px;
            flex-wrap: wrap;
        }

        #contractTrackingModal #step1Content .step-details {
            display: flex !important;
            align-items: stretch;
            gap: 15px;
            flex-wrap: wrap;
            flex: 1 1 auto;
            min-width: 200px;
        }

        #contractTrackingModal #step2Content .step-details,
        #contractTrackingModal #step3Content .step-details {
            flex: 1 1 auto;
            min-width: 200px;
        }

        /* جعل الخانتين متساويتين في المرحلة 1 */
        #contractTrackingModal #step1Content .step-details .form-group:has(#candidatesRequired),
        #contractTrackingModal #step1Content .step-details .form-group:has(#step1Notes) {
            flex: 1 1 0 !important;
            min-width: 150px;
            display: flex !important;
            flex-direction: column !important;
            align-items: flex-start !important;
        }

        #contractTrackingModal #step1Content .step-actions,
        #contractTrackingModal #step2Content .step-actions,
        #contractTrackingModal #step3Content .step-actions {
            flex: 0 0 auto;
            margin-top: 0 !important;
            justify-content: flex-start !important;
        }

        .step-details {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 15px !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .step-details {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 15px !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        /* جميع الخانات بحجم محتواها */
        #contractTrackingModal .step-details .form-group {
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            margin: 0 !important;
            padding: 0 !important;
            width: auto !important;
        }

        /* الخانات التي تحتوي على flex داخلي تبقى كما هي */
        #contractTrackingModal .step-details .form-group[style*="display: flex"] {
            display: flex !important;
            width: 100% !important;
        }

        /* الخانات التي تحتوي على divs داخلية (مثل quantityGroup) تبقى بحجم محتواها */
        #contractTrackingModal .step-details .form-group > div {
            width: auto !important;
        }

        #contractTrackingModal .step-details .form-group input,
        #contractTrackingModal .step-details .form-group select,
        #contractTrackingModal .step-details .form-group textarea {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        #contractTrackingModal .form-row-2 {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 15px !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .form-row-2 .form-group {
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            margin: 0 !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
            width: auto !important;
        }

        #contractTrackingModal .form-row-2 .form-group input,
        #contractTrackingModal .form-row-2 .form-group select {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        #contractTrackingModal .form-row-3 {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 15px !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .form-row-3 .form-group {
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            margin: 0 !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
            width: auto !important;
        }

        #contractTrackingModal .form-row-3 .form-group input,
        #contractTrackingModal .form-row-3 .form-group select {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        .step-actions {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 25px;
        }

        .step-actions .btn {
            min-width: auto;
            width: fit-content;
            padding: 6px 12px !important;
            font-size: 0.75rem !important;
            font-weight: 700;
            border-radius: 8px !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            white-space: nowrap;
        }

        .step-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
        }

        .step-actions .btn:active {
            transform: translateY(0);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        /* تأثير الاهتزاز للزر قبل الأخير */
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }

        #contractTrackingModal .step-actions .btn.shake {
            animation: shake 0.5s ease-in-out;
        }

        /* تصميم عرض التاريخ والوقت */
        .step-timestamp {
            margin-top: 10px;
            padding: 8px 12px;
            background: linear-gradient(135deg, 
                rgba(227, 242, 253, 0.9) 0%, 
                rgba(243, 229, 245, 0.9) 50%,
                rgba(225, 245, 254, 0.9) 100%);
            border-radius: 8px;
            border: 1px solid rgba(102, 126, 234, 0.2);
            direction: rtl;
            box-shadow: 
                0 2px 8px rgba(102, 126, 234, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
            position: relative;
            overflow: hidden;
        }

        .step-timestamp::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, 
                #667eea 0%, 
                #764ba2 50%, 
                #f093fb 100%);
        }

        .timestamp-item {
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
        }

        .timestamp-item i {
            font-size: 12px;
            color: #667eea;
            background: rgba(102, 126, 234, 0.1);
            padding: 4px;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .timestamp-text {
            font-size: 11px;
            color: #424242;
            font-weight: 600;
        }

        .timestamp-text strong {
            color: #667eea;
            font-size: 11px;
        }

        /* حالة الخطوات - تصميم جديد */
        .step.completed .step-number {
            background: #10b981;
            color: white;
            box-shadow: 
                0 10px 30px rgba(16, 185, 129, 0.3),
                inset 0 0 0 4px #059669;
            border-right-color: #059669;
        }

        .step.in-progress .step-number {
            background: #f59e0b;
            color: white;
            box-shadow: 
                0 10px 30px rgba(245, 158, 11, 0.3),
                inset 0 0 0 4px #d97706;
            border-right-color: #d97706;
            animation: numberPulse 2s ease-in-out infinite;
        }

        @keyframes numberPulse {
            0%, 100% {
                box-shadow: 
                    0 10px 30px rgba(245, 158, 11, 0.3),
                    inset 0 0 0 4px #d97706;
            }
            50% {
                box-shadow: 
                    0 15px 40px rgba(245, 158, 11, 0.5),
                    inset 0 0 0 5px #fbbf24;
            }
        }

        .step.completed .step-header {
            border-right-color: #10b981;
        }

        .step.completed .step-content {
            border-right-color: #10b981;
        }

        .step.completed .step-header::before {
            background: linear-gradient(180deg, #10b981, #059669);
        }

        .step.in-progress .step-header {
            border-right-color: #f59e0b;
        }

        .step.in-progress .step-content {
            border-right-color: #f59e0b;
        }

        .step.in-progress .step-header::before {
            background: linear-gradient(180deg, #f59e0b, #d97706);
        }

        .step.completed .step-header h4,
        .step.in-progress .step-header h4 {
            color: #2c3e50;
            text-shadow: none;
        }

        /* تحسينات خاصة لنافذة متابعة العقود */
        #contractTrackingModal .modal-content {
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.98) 0%, 
                rgba(248, 250, 252, 0.95) 50%,
                rgba(255, 255, 255, 0.98) 100%);
            backdrop-filter: blur(30px);
        }

        #contractTrackingModal .modal-header {
            background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.1) 0%, 
                rgba(118, 75, 162, 0.1) 100%);
            padding: 25px 30px;
            border-radius: 20px 20px 0 0;
            margin: -30px -30px 30px -30px;
            border-bottom: 3px solid rgba(102, 126, 234, 0.2);
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
        }

        #contractTrackingModal .modal-header h2 {
            background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-size: 2rem;
            font-weight: 800;
            margin: 0;
            letter-spacing: 0.5px;
        }

        #contractTrackingModal .modal-body {
            padding: 0;
        }

        /* تحسين الأزرار في نافذة متابعة العقود */
        #contractTrackingModal .btn-icon-circle {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        #contractTrackingModal .btn-icon-circle:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        }

        #contractTrackingModal .btn-icon-circle.reset {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
        }

        #contractTrackingModal .btn-icon-circle.reset:hover {
            box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
        }

        #contractTrackingModal .btn-icon-circle.reset-step {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
        }

        #contractTrackingModal .btn-icon-circle.reset-step:hover {
            box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
        }

        /* تحسين حقول الإدخال في نافذة متابعة العقود */
        #contractTrackingModal .form-group input,
        #contractTrackingModal .form-group select,
        #contractTrackingModal .form-group textarea {
            border: 2px solid rgba(102, 126, 234, 0.2);
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        #contractTrackingModal .form-group input:focus,
        #contractTrackingModal .form-group select:focus,
        #contractTrackingModal .form-group textarea:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }

        #contractTrackingModal .form-group {
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .form-group label {
            color: #2c3e50;
            font-weight: 700;
            font-size: 0.95rem;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .step-details .form-group {
            margin: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .step-content .form-group {
            margin: 0 !important;
            padding: 0 !important;
        }

        #contractTrackingModal .form-group label i {
            color: #667eea;
            margin-left: 8px;
        }

        /* تصغير خانة عدد المرشحين المطلوبين بنسبة 25% */
        #contractTrackingModal #candidatesRequired {
            width: 25% !important;
        }

        #contractTrackingModal label[data-i18n="candidatesRequired"] {
            font-size: 0.85rem;
        }

        /* تصغير حجم نص التأكيد على نقل الكفالة */
        #contractTrackingModal .checkbox-text:has(strong[data-i18n="sponsorshipTransferConfirmation"]) {
            font-size: 0.75rem !important;
            line-height: 1.3;
        }

        #contractTrackingModal .checkbox-text:has(strong[data-i18n="sponsorshipTransferConfirmation"]) strong {
            font-size: 0.75rem !important;
            font-weight: 600;
        }

        /* نقل checkbox بجوار form-group عدد المرشحين المطلوبين في نفس السطر */
        #contractTrackingModal .step-content:has(#candidatesRequired) {
            display: flex !important;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
        }

        #contractTrackingModal .step-details:has(#candidatesRequired) {
            display: flex !important;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            margin-bottom: 0 !important;
            flex: 0 0 auto;
        }

        #contractTrackingModal .form-group:has(#candidatesRequired) {
            display: inline-flex !important;
            align-items: center;
            width: auto;
            margin-right: 15px;
            flex-shrink: 0;
        }

        #contractTrackingModal .form-group:has(#candidatesRequired) label {
            margin-bottom: 0;
            margin-left: 8px;
            white-space: nowrap;
        }

        /* نقل checkboxes-row بجوار form-group في نفس السطر */
        #contractTrackingModal .step-details:has(#candidatesRequired) + .checkboxes-row:has(#sponsorshipTransferConfirmation) {
            display: inline-flex !important;
            align-items: center;
            margin: 0 !important;
            padding: 5px 10px !important;
            width: auto;
            flex-shrink: 0;
            vertical-align: middle;
            flex: 0 0 auto;
        }

        #contractTrackingModal .checkboxes-row:has(#sponsorshipTransferConfirmation) {
            display: inline-flex !important;
            align-items: center;
            margin: 0 !important;
            padding: 5px 10px !important;
            width: auto;
            background: rgba(102, 126, 234, 0.05);
            border-radius: 8px;
        }

        #contractTrackingModal .checkbox-group:has(#sponsorshipTransferConfirmation) {
            margin: 0 !important;
            padding: 5px 8px !important;
        }


        /* تصغير حجم جميع الحقول لتكون بحجم محتواها */
        #contractTrackingModal .form-group input,
        #contractTrackingModal .form-group select,
        #contractTrackingModal .form-group textarea {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        /* خانات الملاحظات توحيدها بنسبة 50% */
        #contractTrackingModal .form-group:has(textarea[id*="Notes"]) {
            width: 50% !important;
        }

        #contractTrackingModal .form-group:has(textarea[id*="Notes"]) textarea {
            width: 100% !important;
        }

        /* معالجة خاصة لـ step1Notes الموجودة داخل div */
        #contractTrackingModal .form-group:has(#step1Notes) > div:has(#step1Notes) {
            flex: 0 0 50% !important;
            min-width: 200px;
        }

        #contractTrackingModal .step-details .form-group input,
        #contractTrackingModal .step-details .form-group select,
        #contractTrackingModal .step-details .form-group textarea {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        /* خانات الملاحظات في step-details توحيدها بنسبة 50% */
        #contractTrackingModal .step-details .form-group:has(textarea[id*="Notes"]) {
            width: 50% !important;
        }

        #contractTrackingModal .step-details .form-group:has(textarea[id*="Notes"]) textarea {
            width: 100% !important;
        }

        #contractTrackingModal .form-row-2 .form-group input,
        #contractTrackingModal .form-row-2 .form-group select {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        #contractTrackingModal .form-row-3 .form-group input,
        #contractTrackingModal .form-row-3 .form-group select {
            width: auto !important;
            min-width: 120px;
            max-width: 100%;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .step-details {
                flex-direction: column;
            }
            
            #contractTrackingModal .step-details .form-group {
                width: 100% !important;
            }
            
            #contractTrackingModal .form-row-2,
            #contractTrackingModal .form-row-3 {
                flex-direction: column;
            }
            
            #contractTrackingModal .form-row-2 .form-group,
            #contractTrackingModal .form-row-3 .form-group {
                width: 100% !important;
            }
            
            .step-actions {
                flex-direction: column;
            }
            
            .step-actions .btn {
                width: 100%;
            }

            .tracking-steps::before {
                display: none;
            }

            #contractTrackingModal .modal-header {
                margin: -30px -30px 20px -30px;
                padding: 20px 25px;
            }

            #contractTrackingModal .modal-header h2 {
                font-size: 1.5rem;
            }
        }

        /* حالة المتابعة في الجدول */
        .tracking-status {
            font-size: 0.8rem;
            margin-top: 5px;
            padding: 2px 8px;
            border-radius: 10px;
            text-align: center;
            font-weight: 600;
        }

        .tracking-status:contains("لم يبدأ") {
            background: #f8f9fa;
            color: #6c757d;
        }

        .tracking-status:contains("مكتمل") {
            background: linear-gradient(135deg, #4caf50, #8bc34a);
            color: white;
        }

        .tracking-status:contains("الخطوة") {
            background: linear-gradient(135deg, #ff9800, #ffc107);
            color: white;
        }

        /* نظام أتمتة سير العمل */
        .automation-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 30px;
            border-bottom: 2px solid #e9ecef;
        }

        .automation-tabs .tab {
            padding: 15px 25px;
            background: #f8f9fa;
            border-radius: 10px 10px 0 0;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .automation-tabs .tab.active {
            background: linear-gradient(135deg, #2196f3, #4caf50);
            color: white;
        }

        .automation-section {
            margin-bottom: 30px;
        }

        .rule-card {
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            overflow: hidden;
        }

        .rule-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border-bottom: 1px solid #dee2e6;
        }

        .rule-header h4 {
            margin: 0;
            color: #2c3e50;
            font-size: 1.2rem;
        }

        .rule-content {
            padding: 25px;
        }

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

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

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

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

        input:checked + .slider {
            background: linear-gradient(135deg, #2196f3, #4caf50);
        }

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

        /* Notification Settings */
        .notification-settings {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .checkbox-group {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .checkbox-group label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
        }

        .notification-methods-group {
            display: inline-flex;
            width: fit-content;
            padding: 8px 12px;
            border: 1px solid #d9e2ec;
            border-radius: 10px;
            background: #f8fbff;
            gap: 16px;
        }

        .site-notifications-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 12px;
            margin-top: 8px;
        }

        .site-notification-card {
            border: 1px solid #d9e2ec;
            border-radius: 12px;
            background: #ffffff;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .site-notification-card h5 {
            margin: 0 0 4px 0;
            color: #1f3a56;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .section-scope-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .section-scope-toggle-label,
        .site-scope-master-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #33506b;
            margin: 6px 0 10px 0;
        }

        .section-scope-toggle-label input[type="checkbox"],
        .site-scope-master-label input[type="checkbox"] {
            width: 15px;
            height: 15px;
            accent-color: #1f8ef1;
            cursor: pointer;
        }

        .site-notification-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border: 1px solid #d9e2ec;
            border-radius: 8px;
            background: #f8fbff;
            font-weight: 500;
            color: #2c3e50;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .site-notification-option:hover {
            border-color: #2196f3;
            background: #eef6ff;
        }

        .site-notification-option input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #2196f3;
            cursor: pointer;
        }

        /* أزرار صفحة إدارة الإشعارات التلقائية كأيقونات دائرية */
        #workflowAutomationModal .automation-icon-btn,
        #automationNotificationsModal .automation-icon-btn {
            width: 46px !important;
            height: 46px !important;
            min-width: 46px !important;
            border-radius: 50% !important;
            padding: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 0 !important;
        }

        #workflowAutomationModal .automation-icon-btn i,
        #automationNotificationsModal .automation-icon-btn i {
            margin: 0 !important;
            font-size: 1.05rem !important;
        }

        #workflowAutomationModal .automation-icon-btn span,
        #automationNotificationsModal .automation-icon-btn span {
            display: none !important;
        }

        #workflowAutomationModal .close,
        #automationNotificationsModal .close,
        #workflowAutomationModal .notifications-modal-close,
        #automationNotificationsModal .notifications-modal-close {
            width: 46px !important;
            height: 46px !important;
            border-radius: 50% !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        .recipients-list {
            margin-bottom: 15px;
        }

        .recipient-item {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .recipient-item input,
        .recipient-item select {
            flex: 1;
        }

        .template-list {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .template-item {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 10px;
            border-left: 4px solid #2196f3;
        }

        .template-item h5 {
            margin: 0 0 10px 0;
            color: #2c3e50;
        }

        /* Dashboard Stats */
        .dashboard-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .workflow-monitor {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
        }

        .monitor-list {
            max-height: 400px;
            overflow-y: auto;
        }

        .monitor-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
            margin-bottom: 10px;
            border-left: 4px solid #2196f3;
        }

        .monitor-item.overdue {
            border-left-color: #f44336;
            background: #ffebee;
        }

        .monitor-item.completed {
            border-left-color: #4caf50;
            background: #e8f5e8;
        }

        .quick-actions {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        /* Report Filters */
        .report-filters {
            display: flex;
            gap: 20px;
            align-items: end;
            margin-bottom: 30px;
            padding: 20px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .report-results {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            min-height: 300px;
        }

        /* نظام توزيع النسب */
        .percentage-distribution {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
        }

        .percentage-distribution h5 {
            margin: 0 0 15px 0;
            color: #2c3e50;
            font-size: 1.1rem;
        }

        .percentage-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            padding: 10px;
            background: white;
            border-radius: 8px;
            border-left: 4px solid #2196f3;
        }

        .percentage-item label {
            font-weight: 600;
            color: #2c3e50;
            margin: 0;
            flex: 1;
        }

        .percentage-item input {
            width: 80px;
            margin: 0 10px;
            text-align: center;
            font-weight: bold;
        }

        .percentage-item span {
            font-weight: bold;
            color: #2196f3;
            min-width: 20px;
        }

        .total-percentage {
            text-align: center;
            padding: 15px;
            background: linear-gradient(135deg, #2196f3, #4caf50);
            color: white;
            border-radius: 8px;
            margin-top: 15px;
        }

        .total-percentage strong {
            font-size: 1.2rem;
        }

        /* شريط التقدم */
        .progress-bar-container {
            width: 100%;
            height: 18.4px;
            background: #e9ecef;
            border-radius: 9.2px;
            overflow: hidden;
            margin: 10px 0;
            position: relative;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            border-radius: 9.2px;
            transition: width 0.5s ease;
            position: relative;
            box-shadow: 0 3px 10px rgba(231, 76, 60, 0.5);
            border: 2px solid #fff;
        }

        .progress-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: progressShine 2s infinite;
        }

        @keyframes progressShine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #ffffff;
            font-weight: 900;
            font-size: 0.922rem;
            text-shadow: 3px 3px 6px rgba(0,0,0,1);
            z-index: 10;
            letter-spacing: 1px;
        }

        /* مراحل التقدم */
        .progress-stages {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            gap: 5px;
        }

        .progress-stage {
            flex: 1;
            text-align: center;
            padding: 4.7px;
            font-size: 0.612rem;
            color: #6c757d;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 18.8px;
            height: 18.8px;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .progress-stage.active {
            color: #2196f3;
            font-weight: bold;
            background: rgba(33, 150, 243, 0.1);
            border: 2px solid #2196f3;
        }

        .progress-stage.completed {
            color: #ffffff;
            font-weight: bold;
            background: linear-gradient(135deg, #2196f3, #1976d2);
            border: 2px solid #1976d2;
            box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
            transform: scale(1.035);
        }

        .progress-stage.waiting {
            color: #0277bd;
            background: rgba(2, 119, 189, 0.1);
            border: 2px solid #0277bd;
        }

        /* عروض الأسعار */
        .pricing-header {
            background: linear-gradient(135deg, #2196f3, #4caf50);
            color: white;
            padding: 25px;
            border-radius: 15px;
            margin-bottom: 25px;
            text-align: center;
        }

        .pricing-header h3 {
            margin: 0 0 10px 0;
            font-size: 1.8rem;
        }

        .pricing-header p {
            margin: 0;
            opacity: 0.9;
            font-size: 1.1rem;
        }

        .pricing-actions {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }

        .pricing-filters {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 25px;
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .pricing-filters .filter-group {
            flex: 1;
            min-width: 200px;
        }

        .pricing-filters label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
        }

        .pricing-filters select,
        .pricing-filters input {
            width: 100%;
            padding: 10px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .pricing-filters select:focus,
        .pricing-filters input:focus {
            border-color: #2196f3;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        }

        .pricing-table-container {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
            border-radius: 10px;
            padding: 16px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            overflow-x: auto;
            border: 2px solid rgba(79, 70, 229, 0.1);
            backdrop-filter: blur(20px);
            margin-top: 12px;
        }

        .pricing-summary-sidebar {
            width: 100%;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            border: 2px solid rgba(79, 70, 229, 0.1);
            backdrop-filter: blur(20px);
            margin-bottom: 20px;
        }

        .summary-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(79, 70, 229, 0.1);
        }

        .summary-header i {
            font-size: 1.5rem;
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .summary-header h3 {
            margin: 0;
            font-size: 1.2rem;
            font-weight: 700;
            color: #2c3e50;
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .summary-stats {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 20px;
        }

        .summary-stat-card {
            display: flex;
            align-items: center;
            gap: 15px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
            border-radius: 12px;
            padding: 15px;
            border: 1px solid rgba(226, 232, 240, 0.5);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            flex: 1;
            min-width: 200px;
        }

        .summary-stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            border-color: rgba(79, 70, 229, 0.3);
        }

        .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.3rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            flex-shrink: 0;
        }

        .stat-content {
            flex: 1;
        }

        .stat-value {
            font-size: 1.8rem;
            font-weight: 800;
            color: #2c3e50;
            line-height: 1.2;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 0.85rem;
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .summary-totals {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid rgba(79, 70, 229, 0.1);
        }

        .total-card {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
            border-radius: 12px;
            padding: 18px;
            border: 1px solid rgba(226, 232, 240, 0.5);
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            flex: 1;
            min-width: 250px;
        }

        .total-card.highlight {
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
            border-color: rgba(79, 70, 229, 0.3);
            box-shadow: 0 4px 15px rgba(79, 70, 229, 0.15);
        }

        .total-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
        }

        .total-label {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            font-size: 0.9rem;
            font-weight: 600;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .total-label i {
            font-size: 1rem;
            color: #4f46e5;
        }

        .total-card.highlight .total-label {
            color: #4f46e5;
        }

        .total-card.highlight .total-label i {
            color: #7c3aed;
        }

        .total-value {
            font-size: 1.5rem;
            font-weight: 800;
            color: #2c3e50;
            background: linear-gradient(135deg, #2c3e50, #34495e);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .total-card.highlight .total-value {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-size: 1.7rem;
        }

        @media (max-width: 768px) {
            .summary-stats {
                flex-direction: column;
            }

            .summary-stat-card {
                min-width: 100%;
            }

            .summary-totals {
                flex-direction: column;
            }

            .total-card {
                min-width: 100%;
            }
        }

        .pricing-services-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .pricing-services-section h4 {
            margin: 0 0 20px 0;
            color: #2c3e50;
            font-size: 1.3rem;
        }

        .pricing-client-info-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .pricing-client-info-section h4 {
            margin: 0 0 20px 0;
            color: #2c3e50;
            font-size: 1.3rem;
        }

        .service-item {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 15px;
            border: 2px solid #e9ecef;
            transition: all 0.3s ease;
        }

        .service-item:hover {
            border-color: #2196f3;
            box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
        }

        .service-item:last-child {
            margin-bottom: 0;
        }

        .form-row-service-unified {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
            gap: 10px;
            align-items: end;
            margin-bottom: 9px;
        }

        .form-row-service-unified .form-group {
            margin-bottom: 0;
            min-width: 0;
        }

        .form-row-service-unified .form-group input,
        .form-row-service-unified .form-group select {
            width: 100%;
        }

        .form-row-service-unified .service-delete-icon {
            margin: 0;
            align-self: end;
        }

        .form-row-4 {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 15px;
            margin-bottom: 15px;
        }

        #addContractModal .form-row-4 .form-group {
            margin-bottom: 0;
            min-width: 0;
        }

        #addContractModal .form-row-4 .form-group label {
            display: block;
            width: 100%;
            margin-bottom: 8px;
        }

        #addContractModal .form-row-4 .form-group input,
        #addContractModal .form-row-4 .form-group select {
            width: 100%;
            box-sizing: border-box;
            min-width: 0;
        }

        @media (max-width: 1200px) {
            .form-row-4 {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 768px) {
            .form-row-4 {
                grid-template-columns: 1fr;
            }
        }

        /* تنسيق أيقونة حذف الخدمة */
        .service-delete-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            background-color: #dc3545;
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 12px;
            box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
            margin-left: 10px;
            vertical-align: top;
            margin-top: 25px;
        }

        .service-delete-icon:hover {
            background-color: #c82333;
            transform: translateY(-2px) scale(1.1);
            box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
        }

        .service-delete-icon:active {
            transform: translateY(0) scale(0.95);
        }

        /* تنسيق مجموعة السعر مع الأيقونة */
        .price-group-container {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            flex-wrap: wrap;
        }

        .price-group-container .form-group {
            flex: 1;
            min-width: 170px;
        }

        .price-group-container .service-delete-icon {
            margin-top: 0;
            margin-left: 0;
            margin-right: 10px;
            align-self: flex-start;
        }

        .pricing-summary-section {
            background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            border: 2px solid #4caf50;
        }

        /* ===== Annex Contract Form Layout ===== */
        #addContractModal #contractForm.annex-mode-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #addContractModal #annexServicesSection {
            margin-top: 6px;
        }

        #addContractModal #annexServicesSection .pricing-services-section,
        #addContractModal #annexServicesSection .pricing-summary-section {
            margin: 10px 0;
            border-radius: 14px;
        }

        #addContractModal #annexServicesList {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #addContractModal #annexServicesList .annex-service-item {
            border: 1px solid rgba(33, 150, 243, 0.25);
            border-radius: 14px;
            background: #ffffff;
            padding: 14px;
            margin-bottom: 0;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
            overflow: visible !important;
        }

        #addContractModal #annexServicesList .annex-service-item .form-row-service-unified {
            grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
            gap: 12px;
            margin-bottom: 12px;
            align-items: end;
        }

        #addContractModal #annexServicesList .annex-service-item .form-row-3 {
            display: grid;
            grid-template-columns: repeat(3, minmax(160px, 1fr));
            gap: 12px;
            margin-top: 0;
        }

        #addContractModal #annexServicesList .annex-service-item .form-group {
            margin-bottom: 0;
            min-width: 0;
            overflow: visible !important;
        }

        #addContractModal #annexServicesList .annex-service-item .nationality-dropdown-wrapper,
        #addContractModal #annexServicesList .annex-service-item .profession-dropdown-wrapper {
            margin-top: 0;
            z-index: 5;
        }

        #addContractModal #annexServicesList .annex-service-item .nationality-dropdown-menu,
        #addContractModal #annexServicesList .annex-service-item .profession-dropdown-menu {
            max-height: 260px !important;
            z-index: 100000 !important;
        }

        #addContractModal #annexServicesList .annex-service-item .form-group input:not([type="checkbox"]),
        #addContractModal #annexServicesList .annex-service-item .form-group select,
        #addContractModal #annexServicesList .annex-service-item .form-group textarea {
            width: 100%;
        }

        #addContractModal #annexServicesSection .pricing-summary-section .form-row-3 {
            display: grid;
            grid-template-columns: repeat(3, minmax(160px, 1fr));
            gap: 12px;
            margin-top: 0;
        }

        @media (max-width: 1200px) {
            #addContractModal #annexServicesList .annex-service-item .form-row-service-unified {
                grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
            }
        }

        @media (max-width: 768px) {
            #addContractModal #annexServicesList .annex-service-item .form-row-service-unified {
                grid-template-columns: 1fr;
            }

            #addContractModal #annexServicesList .annex-service-item .service-delete-icon {
                justify-self: start;
                margin-top: 0;
            }

            #addContractModal #annexServicesList .annex-service-item .form-row-3,
            #addContractModal #annexServicesSection .pricing-summary-section .form-row-3 {
                grid-template-columns: 1fr;
            }
        }

        /* تنسيق النجمة للحقول الإجبارية */
        .required-star {
            color: #dc3545;
            font-weight: bold;
            margin-right: 5px;
        }

        /* تنسيق أزرار عروض الأسعار كأيقونات */
        .pricing-actions {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .pricing-actions .btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            font-size: 18px;
            transition: all 0.3s ease;
        }

        .pricing-actions .btn:hover {
            transform: translateY(-2px) scale(1.1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        /* تنسيق قسم الفلترة والبحث */
        .pricing-filters {
            display: flex;
            gap: 12px;
            flex: 1;
            margin-left: 10px;
        }

        .filter-card {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            min-width: 0;
        }

        .filter-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #007bff, #28a745);
            border-radius: 15px 15px 0 0;
        }

        .filter-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border-color: #007bff;
        }

        .filter-icon {
            width: 35px;
            height: 35px;
            background: linear-gradient(135deg, #007bff, #0056b3);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
            flex-shrink: 0;
        }

        .filter-content {
            flex: 1;
            min-width: 0;
        }

        .filter-content label {
            display: block;
            font-weight: 600;
            color: #495057;
            margin-bottom: 4px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .filter-content select,
        .filter-content input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            font-size: 12px;
            transition: all 0.3s ease;
            background: white;
            color: #495057;
        }

        .filter-content select:focus,
        .filter-content input:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
        }

        .filter-content select {
            cursor: pointer;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 8px center;
            background-repeat: no-repeat;
            background-size: 12px;
            padding-right: 30px;
        }

        /* تنسيق متجاوب */
        @media (max-width: 768px) {
            .pricing-actions {
                flex-direction: column;
                align-items: stretch;
            }
            
            .pricing-filters {
                margin-left: 0;
                margin-top: 10px;
                flex-direction: column;
                gap: 8px;
            }
            
            .filter-card {
                padding: 10px 12px;
            }
            
            .filter-icon {
                width: 30px;
                height: 30px;
                font-size: 12px;
            }
        }

        /* تنسيق عمود الترقيم */
        .pricing-table-container table th:first-child,
        .pricing-table-container table td:first-child {
            width: 50px;
            text-align: center;
            font-weight: bold;
            background-color: #f8f9fa;
        }

        .pricing-table-container table th:first-child {
            background-color: #e9ecef;
            border-right: 2px solid #dee2e6;
        }

        /* تصغير رأس الجدول */
        .pricing-table-container table th {
            font-size: 13px;
            padding: 8px 6px;
            white-space: nowrap;
            line-height: 1.2;
            text-align: center;
        }

        /* تصغير خلايا الجدول */
        .pricing-table-container table td {
            font-size: 13px;
            padding: 6px 4px;
            line-height: 1.3;
            text-align: center;
        }

        /* تنسيق أزرار الإجراءات في جدول عروض الأسعار - دائرية */
        .pricing-table-container table td:last-child {
            white-space: nowrap;
        }
        
        .pricing-table-container table .btn-sm {
            width: 31px;
            height: 31px;
            border-radius: 50%;
            padding: 0;
            margin: 2px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
            border: none;
        }
        
        .pricing-table-container table .btn-sm:hover {
            transform: translateY(-2px) scale(1.1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        }
        
        .pricing-table-container table .btn-sm i {
            margin: 0;
        }
        
        /* إخفاء النص في الأزرار الدائرية */
        .pricing-table-container table .btn-sm span {
            display: none;
        }

        /* تصغير نص حالة "في الانتظار" */
        .pricing-table-container table .offer-status {
            font-size: 11px;
        }

        /* تنسيق عمود الخصم */
        .pricing-table-container table th:nth-child(10),
        .pricing-table-container table td:nth-child(10) {
            min-width: 80px;
            text-align: center;
        }

        /* إخفاء عمود الخصم عندما لا توجد خصومات */
        .pricing-table-container.hide-discount-column th:nth-child(10),
        .pricing-table-container.hide-discount-column td:nth-child(10) {
            display: none !important;
        }


        .pricing-summary-section h4 {
            margin: 0 0 20px 0;
            color: #2e7d32;
            font-size: 1.3rem;
        }

        .approval-info {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 25px;
        }

        .approval-info h4 {
            margin: 0 0 15px 0;
            color: #2c3e50;
        }

        /* تنسيق نافذة صفحة الإجراءات - نافذة منبثقة */
        #clientApprovalModal .modal-content {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 700px;
            max-height: 90vh;
            height: auto;
            padding: 0;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: modalPopup 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        
        @keyframes modalPopup {
            0% {
                transform: translate(-50%, -50%) scale(0.7);
                opacity: 0;
            }
            100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
        }
        
        #clientApprovalModal .modal-body {
            padding: 30px;
            max-height: calc(90vh - 200px);
            overflow-y: auto;
        }
        
        #clientApprovalModal .modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px 30px;
            border-radius: 0;
            margin: 0;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        #clientApprovalModal .modal-header h2 {
            margin: 0;
            color: white;
            font-size: 1.8rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        #clientApprovalModal .modal-header h2 i {
            font-size: 1.6rem;
        }
        
        #clientApprovalModal .modal-header .close {
            color: white;
            font-size: 2rem;
            opacity: 0.9;
            transition: all 0.3s ease;
        }
        
        #clientApprovalModal .modal-header .close:hover {
            opacity: 1;
            transform: scale(1.1);
        }

        .approval-actions {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
            border-radius: 15px;
            padding: 30px;
            border: 2px solid rgba(102, 126, 234, 0.2);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
            margin-top: 20px;
        }

        .approval-actions h4 {
            margin: 0 0 25px 0;
            color: #2c3e50;
            font-size: 1.4rem;
            font-weight: 700;
            padding-bottom: 15px;
            border-bottom: 3px solid #667eea;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .approval-actions h4::before {
            content: '';
            width: 4px;
            height: 25px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 2px;
        }
        
        #clientApprovalModal .form-group {
            margin-bottom: 20px;
        }
        
        #clientApprovalModal .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #495057;
            font-size: 0.95rem;
        }
        
        #clientApprovalModal .form-group select,
        #clientApprovalModal .form-group input,
        #clientApprovalModal .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            background: white;
        }
        
        #clientApprovalModal .form-group select:focus,
        #clientApprovalModal .form-group input:focus,
        #clientApprovalModal .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        #clientApprovalModal .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }
        
        #clientApprovalModal #contractCreationFields {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
            border-radius: 12px;
            padding: 25px;
            margin-top: 25px;
            border: 2px solid rgba(102, 126, 234, 0.2);
        }
        
        #clientApprovalModal #contractCreationFields h4 {
            color: #667eea;
            font-size: 1.3rem;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid rgba(102, 126, 234, 0.3);
        }
        
        #clientApprovalModal .modal-footer {
            background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
            padding: 20px 30px;
            border-top: 2px solid rgba(102, 126, 234, 0.1);
            margin: 0;
            border-radius: 0;
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }
        
        #clientApprovalModal .modal-header .close {
            position: absolute;
            top: 20px;
            left: 20px;
            right: auto;
        }
        
        /* تحسين التمرير في النافذة المنبثقة */
        #clientApprovalModal .modal-body::-webkit-scrollbar {
            width: 6px;
        }
        
        #clientApprovalModal .modal-body::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 3px;
        }
        
        #clientApprovalModal .modal-body::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 3px;
        }
        
        #clientApprovalModal .modal-footer .btn {
            padding: 12px 30px;
            font-size: 1rem;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }
        
        #clientApprovalModal .modal-footer .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
        }
        
        #clientApprovalModal .modal-footer .btn-success {
            background: linear-gradient(135deg, #28a745, #20c997);
            border: none;
        }
        
        #clientApprovalModal .modal-footer .btn-secondary {
            background: linear-gradient(135deg, #6c757d, #5a6268);
            border: none;
        }

        .contract-creation-notice {
            background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
            border: 2px solid #2196f3;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            text-align: center;
        }

        .contract-creation-notice h4 {
            margin: 0 0 10px 0;
            color: #1976d2;
        }

        .contract-creation-notice p {
            margin: 0;
            color: #424242;
        }

        /* حالة العروض */
        .offer-status {
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 0.9rem;
            text-align: center;
            white-space: nowrap;
            display: inline-block;
        }

        .offer-status.pending {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }

        .offer-status.approved {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .offer-status.rejected {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .offer-status.converted {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        
        .offer-status.negotiation {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }
        
        .offer-status.under_study,
        .offer-status.under_review {
            background: #e7f3ff;
            color: #004085;
            border: 1px solid #b3d9ff;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .automation-tabs {
                flex-direction: column;
            }
            
            .checkbox-group {
                flex-direction: column;
            }
            
            .recipient-item {
                flex-direction: column;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .report-filters {
                flex-direction: column;
            }
        }

        @media (max-width: 768px) {
            .sidebar {
                padding: 20px 15px;
                border-radius: 20px;
            }
            
            .sidebar-header h2 {
                font-size: 1.5rem;
            }
            
            .sidebar-menu-link {
                padding: 12px 15px;
                font-size: 0.9rem;
            }
            
            .sidebar-menu-icon {
                font-size: 1.1rem;
                margin-left: 12px;
            }
            
            .header {
                padding: 8px 14px;
            }
            
            .header-content {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            
            .header-info {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                width: 100%;
            }
            
            .logo-text h1 {
                font-size: 1.4rem !important;
                background: linear-gradient(135deg, #667eea, #764ba2) !important;
                -webkit-background-clip: text !important;
                -webkit-text-fill-color: transparent !important;
                background-clip: text !important;
                font-weight: 800 !important;
            }
            
            .logo-text p {
                font-size: 0.85rem !important;
                color: rgba(255, 255, 255, 0.95) !important;
                font-weight: 600 !important;
            }
            
            .logo-icon {
                width: 79px !important;
                height: 79px !important;
                background: transparent !important;
                border: none !important;
                transform: scale(1.5) !important;
                transform-origin: center center !important;
            }
            
            .logo-icon i {
                font-size: 2.1rem !important;
                color: #fff !important;
            }
            
            .user-info {
                width: 100%;
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            
            .user-actions {
                width: 100%;
                flex-wrap: wrap;
            }
            
            .btn-outline,
            .language-toggle {
                font-size: 0.85rem;
                padding: 7px 12px;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            
            .header-content {
                flex-direction: column;
                text-align: center;
                gap: 20px;
            }

            .header-logo {
                flex-direction: column;
                gap: 15px;
            }

            .logo-icon {
                width: 86px !important;
                height: 86px !important;
                background: transparent !important;
                border: none !important;
                transform: scale(1.5) !important;
                transform-origin: center center !important;
            }

            .logo-icon i {
                font-size: 2.2rem !important;
                color: #fff !important;
            }

            .header-images {
                justify-content: center;
                flex-wrap: wrap;
            }

            .image-card {
                padding: 12px 15px;
            }

            .user-info {
                flex-direction: column;
                gap: 15px;
            }

            .user-actions {
                justify-content: center;
                flex-wrap: wrap;
            }

            .login-wrapper {
                flex-direction: column;
            }

            .login-brand-panel {
                min-height: auto;
                padding: 36px 24px;
                flex: none;
            }

            .login-brand-row {
                gap: 14px;
                margin-bottom: 14px;
            }

            .login-brand-logo {
                width: 175px;
                height: 175px;
            }

            .login-app-name {
                font-size: 1.65rem;
            }

            .login-tagline-1 {
                font-size: 0.95rem;
            }

            .login-tagline-2 {
                font-size: 0.8rem;
            }

            .login-form-panel {
                padding: 24px 20px;
            }

            .login-form-panel .login-card {
                padding: 32px 24px;
            }

            .modal-content {
                width: 100%;
                height: 100vh;
                padding: 20px;
                border-radius: 0;
            }

            .tabs {
                flex-direction: column;
                gap: 5px;
            }

            .tab {
                padding: 12px 20px;
            }


            .btn {
                padding: 12px 20px;
                font-size: 14px;
            }
        }
        /* رسائل خطأ مخصصة للسعر */
        .service-unit-price:invalid {
            border-color: #dc3545 !important;
            background-color: #fff5f5 !important;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
        }
        
        .service-unit-price:invalid::after {
            content: "الحد الأدنى للسعر هو 6,000 ريال";
            color: #dc3545;
            font-size: 0.875rem;
            margin-top: 0.25rem;
            display: block;
        }
        
        /* رسائل خطأ لنوع الخدمة */
        .service-type-error {
            color: #dc3545;
            font-size: 0.875rem;
            margin-top: 0.25rem;
            display: block;
        }
        
        .service-type:invalid {
            border-color: #dc3545 !important;
            background-color: #fff5f5 !important;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
        }
        
        /* تنسيق عمود ملخص التكلفة */
        .cost-summary {
            background-color: #f8f9fa;
            border-radius: 5px;
            padding: 8px;
            margin: 2px 0;
        }
        
        .cost-summary div {
            margin: 2px 0;
            padding: 2px 0;
        }
        
        .cost-summary strong {
            color: #495057;
            font-weight: 600;
        }
        
        /* تنسيق جدول المعاينة */
        .preview-services .table-responsive {
            margin: 15px 0;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .preview-services .table {
            margin-bottom: 0;
        }
        
        .preview-services .table-dark th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-weight: 600;
            padding: 12px 8px;
            text-align: center;
            border-color: rgba(255, 255, 255, 0.2);
        }
        
        .preview-services .table td {
            padding: 10px 8px;
            text-align: center;
            vertical-align: middle;
        }
        
        .preview-services .table-striped tbody tr:nth-of-type(odd) {
            background-color: rgba(0,0,0,.05);
        }
        
        .preview-services .table-light td {
            background-color: #f8f9fa;
            font-weight: 600;
            color: #495057;
        }
        
        .preview-services h4 {
            color: #495057;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e9ecef;
            font-size: 1.1rem !important;
        }
        
        .preview-client-info h4 {
            color: #495057;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e9ecef;
            font-size: 1.1rem !important;
        }
        
        /* إضافي لضمان ظهور الجدول */
        .preview-services table {
            width: 100% !important;
            border-collapse: collapse !important;
            margin: 0 !important;
        }
        
        .preview-services th,
        .preview-services td {
            border: 1px solid #dee2e6 !important;
            padding: 8px !important;
            text-align: center !important;
        }
        
        .preview-services .table-responsive {
            display: block !important;
            width: 100% !important;
            overflow-x: auto !important;
        }
        
        /* إضافي لضمان ظهور الجدول */
        .preview-services table {
            width: 100% !important;
            border-collapse: collapse !important;
            margin: 0 !important;
            display: table !important;
        }
        
        .preview-services th,
        .preview-services td {
            border: 1px solid #dee2e6 !important;
            padding: 8px !important;
            text-align: center !important;
            display: table-cell !important;
        }
        
        .preview-services thead {
            display: table-header-group !important;
        }
        
        .preview-services tbody {
            display: table-row-group !important;
        }
        
        .preview-services tfoot {
            display: table-footer-group !important;
        }
        
        .preview-services tr {
            display: table-row !important;
        }
        
        /* تنسيق تذييل الجدول */
        .preview-services tfoot tr {
            background-color: #f8f9fa !important;
        }
        
        .preview-services tfoot tr:last-child {
            background-color: #e9ecef !important;
            border-top: 2px solid #495057 !important;
        }
        
        .preview-services tfoot td {
            font-weight: bold !important;
            padding: 12px 8px !important;
        }
        
        .preview-services tfoot tr:last-child td {
            font-size: 1.1rem !important;
            color: #28a745 !important;
        }
        
        .preview-services tfoot tr:nth-child(2) td:last-child {
            color: #dc3545 !important;
        }
        
        /* تنسيق عام للمعاينة */
        .pricing-preview {
            direction: rtl;
            text-align: right;
            box-sizing: border-box;
            overflow: hidden;
        }
        
        /* تحسين التنسيق العام */
        .pricing-preview > * {
            box-sizing: border-box;
        }
        
        .pricing-preview .preview-header,
        .pricing-preview .preview-client-info,
        .pricing-preview .preview-services,
        .pricing-preview .preview-terms,
        .pricing-preview .preview-footer,
        .pricing-preview .preview-notes {
            margin-left: 0;
            margin-right: 0;
            clear: both;
        }
        
        /* منع التداخل */
        .pricing-preview [style*="grid"] {
            width: 100% !important;
            box-sizing: border-box !important;
        }
        
        .pricing-preview [style*="display: flex"] {
            box-sizing: border-box;
        }
        
        /* تكبير النص المقدم بنسبة 50% في المعاينة */
        .pricing-preview div[style*="margin: 30px 0"] p {
            font-size: 31.2px !important;
        }
        .pricing-preview div[style*="margin: 30px 0"] p i {
            font-size: 35.1px !important;
        }
        /* توحيد حجم خط جميع العناصر 1-8 في المعاينة */
        .pricing-preview .preview-terms > div > div span:last-child,
        .pricing-preview .preview-terms > div > div span[style*="font-size: 1.4375rem"],
        .pricing-preview .preview-terms > div > div span[style*="font-size: 1.25rem"] {
            font-size: 1.4375rem !important;
        }
        .pricing-preview .preview-terms > div > div span:first-child,
        .pricing-preview .preview-terms > div > div span[style*="font-size: 1.035rem"],
        .pricing-preview .preview-terms > div > div span[style*="font-size: 0.9rem"] {
            font-size: 1.035rem !important;
        }
        /* العناصر 6 و 7 و 8 في نفس السطر */
        .pricing-preview .preview-terms > div > div[style*="grid-column: 1 / -1"] {
            display: flex !important;
            flex-direction: row !important;
            gap: 10px !important;
        }
        .pricing-preview .preview-terms > div > div[style*="grid-column: 1 / -1"] > div {
            display: flex !important;
            align-items: center !important;
            flex: 1 !important;
        }
        .pricing-preview .preview-terms > div > div[style*="grid-column: 1 / -1"] span:last-child {
            font-size: 1.4375rem !important;
        }
        .pricing-preview .preview-terms > div > div[style*="grid-column: 1 / -1"] span:first-child {
            font-size: 1.035rem !important;
        }
        
        .preview-header {
            text-align: center;
        }
        
        .preview-client-info {
            text-align: right;
        }
        
        /* تكبير معلومات العميل بنسبة 50% في المعاينة */
        .preview-client-info > div > div span[style*="font-size: 1.5rem"],
        .preview-client-info > div > div span[style*="font-size: 1.25rem"],
        .preview-client-info > div > div span[style*="font-size: 1rem"] {
            font-size: 1.5rem !important;
        }
        .preview-client-info > div > div span[style*="font-size: 1.35rem"],
        .preview-client-info > div > div span[style*="font-size: 1.125rem"],
        .preview-client-info > div > div span[style*="font-size: 0.9rem"] {
            font-size: 1.35rem !important;
        }
        
        .preview-client-info p {
            text-align: right;
            margin: 5px 0;
        }
        
        .preview-client-info strong {
            text-align: right;
        }
        
        /* تنسيق الجدول للعربية */
        .preview-services .table-responsive {
            direction: rtl;
        }
        
        .preview-services .table {
            direction: rtl;
        }
        
        .preview-services table {
            direction: rtl;
        }
        
        .preview-services h4 {
            text-align: right;
        }
        
        .preview-client-info h4 {
            text-align: right;
        }
        
        /* تطبيق نفس تنسيق الطباعة على المعاينة */
        .pricing-preview {
            max-width: 210mm !important;
            margin: 0 auto !important;
            padding: 10px !important;
            box-sizing: border-box !important;
        }
        
        /* تنسيق الهيدر في المعاينة - نفس الطباعة */
        .preview-header {
            margin: 0 0 6.88905px 0 !important;
            padding: 2.878092px !important;
            border-radius: 15px !important;
            width: 100% !important;
            max-width: 100% !important;
            min-height: 13.7781px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            background: #05114b !important;
            border: 2px solid rgba(5, 17, 75, 0.3) !important;
            box-shadow: 0 4px 15px rgba(5, 17, 75, 0.2) !important;
        }
        
        .preview-header h1 {
            margin: 0 !important;
            font-size: 1.08rem !important;
            font-weight: 800 !important;
            line-height: 1.3 !important;
            color: white !important;
            -webkit-text-fill-color: white !important;
            background: none !important;
            background-clip: unset !important;
            display: flex !important;
            align-items: center !important;
            gap: 7.2px !important;
        }
        
        .preview-header p {
            margin: 3.6px 0 0 0 !important;
            font-size: 0.828rem !important;
            color: white !important;
            font-weight: 600 !important;
            font-style: italic !important;
            line-height: 1.2 !important;
        }
        
        /* معلومات العميل - نفس الطباعة */
        .preview-client-info {
            margin: 3px 0 !important;
            padding: 4px 5px !important;
            border-radius: 3px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-client-info h3 {
            margin: 0 0 3px 0 !important;
            padding: 3px 4px !important;
            font-size: 1.35504rem !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
        }
        
        
        /* تصغير العناوين بدرجتين - قواعد قوية جداً - حل جذري */
        #pricingPreviewModal h4,
        #pricingPreviewModal .preview-client-info h4,
        #pricingPreviewModal .preview-client-info > h4,
        #pricingPreviewModal .pricing-preview .preview-client-info h4,
        #pricingPreviewModal .pricing-preview .preview-client-info > h4,
        #pricingPreviewModal .preview-services h4,
        #pricingPreviewModal .preview-services > h4,
        #pricingPreviewModal .pricing-preview .preview-services h4,
        #pricingPreviewModal .pricing-preview .preview-services > h4,
        #pricingPreviewModal .preview-terms h4,
        #pricingPreviewModal .preview-terms > h4,
        #pricingPreviewModal .pricing-preview .preview-terms h4,
        #pricingPreviewModal .pricing-preview .preview-terms > h4,
        .preview-client-info h4,
        .preview-services h4,
        .preview-terms h4 {
            margin: 0 0 2px 0 !important;
            padding: 2px 3px !important;
            font-size: 14.4px !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
        }
        
        /* override inline styles مباشرة */
        #pricingPreviewModal .pricing-preview .preview-client-info h4[style*="font-size"],
        #pricingPreviewModal .pricing-preview .preview-services h4[style*="font-size"],
        #pricingPreviewModal .pricing-preview .preview-terms h4[style*="font-size"],
        #pricingPreviewModal .preview-client-info h4[style*="font-size"],
        #pricingPreviewModal .preview-services h4[style*="font-size"],
        #pricingPreviewModal .preview-terms h4[style*="font-size"] {
            font-size: 14.4px !important;
        }
        
        /* override أي CSS من ملفات أخرى */
        #pricingPreviewModal .preview-client-info h4[style*="1.3rem"],
        #pricingPreviewModal .preview-services h4[style*="1.3rem"],
        #pricingPreviewModal .preview-terms h4[style*="1.3rem"] {
            font-size: 14.4px !important;
        }
        
        .preview-client-info > div {
            gap: 4px !important;
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            width: 100% !important;
        }
        
        .preview-client-info > div > div {
            padding: 4px 5px !important;
            border-radius: 2px !important;
            margin: 1px 0 !important;
            font-size: 13.2px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-client-info > div > div span {
            font-size: 13.2px !important;
            line-height: 1.2 !important;
        }
        
        .preview-client-info > div > div span:last-child,
        .preview-client-info > div > div span:nth-child(2) {
            font-size: 13.2px !important;
            line-height: 1.2 !important;
        }
        
        .preview-client-info > div > div span:first-child {
            font-size: 11.88px !important;
            line-height: 1.2 !important;
        }
        
        /* نص المقدمة - نفس الطباعة */
        .pricing-preview div[style*="margin: 30px 0"] {
            margin: 2px 0 !important;
            padding: 3px 4px !important;
            border-radius: 2px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .pricing-preview div[style*="margin: 30px 0"] p {
            margin: 0 0 3px 0 !important;
            font-size: 15px !important;
            line-height: 1.3 !important;
            font-weight: 600 !important;
            padding: 0 !important;
        }
        
        .pricing-preview div[style*="margin: 30px 0"] p i {
            font-size: 16px !important;
            margin-left: 3px !important;
        }
        
        /* الخدمات - نفس الطباعة */
        .preview-services {
            margin: 2px 0 !important;
            padding: 3px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-services h4 {
            margin: 0 0 2px 0 !important;
            padding: 2px 3px !important;
            font-size: 1.1rem !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
        }
        
        .preview-services table {
            margin: 2px 0 !important;
            font-size: 17px !important;
            border-collapse: collapse !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-services table th {
            padding: 3px 4px !important;
            font-size: 17px !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
        }
        
        .preview-services table td {
            padding: 3px 4px !important;
            font-size: 17px !important;
            line-height: 1.2 !important;
        }
        
        .preview-services table tfoot td {
            font-weight: 700 !important;
            font-size: 18.5px !important;
        }
        
        /* الشروط - نفس الطباعة */
        .preview-terms {
            margin: 2px 0 !important;
            padding: 2px 3px !important;
            border-radius: 2px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-terms h4 {
            margin: 0 0 2px 0 !important;
            padding: 2px 3px !important;
            font-size: 1.1rem !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
        }
        
        .preview-terms > p {
            margin: 0 0 2px 0 !important;
            padding: 2px 3px !important;
            font-size: 11px !important;
            line-height: 1.2 !important;
        }
        
        .preview-terms > div {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            grid-auto-flow: row !important;
            gap: 3px !important;
            padding: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-terms > div > div {
            display: flex !important;
            align-items: center !important;
            padding: 1px 3px !important;
            margin: 1px 2px 1px 0 !important;
            border-radius: 2px !important;
            width: 100% !important;
        }
        
        .preview-terms > div > div span:last-child {
            font-size: 10.35px !important;
            line-height: 1.2 !important;
        }
        
        .preview-terms > div > div span:first-child {
            width: 20px !important;
            height: 20px !important;
            font-size: 12.625px !important; /* تكبير 2 درجات إضافية: 10.625 + 2 = 12.625 */
            margin-left: 2px !important;
            line-height: 20px !important;
        }
        
        /* الفوتر - معلومات الشركة فقط - نفس تنسيق الطباعة */
        .preview-footer {
            margin-top: auto !important;
            padding: 5.076px !important;
            border-radius: 15px !important;
            width: 100% !important;
            max-width: 100% !important;
            background: #05114b !important;
            color: white !important;
            height: auto !important;
            min-height: 24.3px !important;
            box-shadow: 0 4px 15px rgba(5, 17, 75, 0.2) !important;
        }
        
        .preview-footer > div {
            gap: 20px !important;
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            width: 100% !important;
            align-items: start !important;
        }
        
        .preview-footer > div > div {
            padding: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .preview-footer h3 {
            margin: 0 0 4px 0 !important;
            padding: 0 !important;
            font-size: 14px !important;
            line-height: 1.2 !important;
            font-weight: bold !important;
            color: white !important;
        }
        
        .preview-footer h4 {
            margin: 0 0 6px 0 !important;
            padding: 0 !important;
            font-size: 12px !important;
            line-height: 1.2 !important;
            font-weight: bold !important;
            color: white !important;
        }
        
        .preview-footer p {
            margin: 0 0 4px 0 !important;
            padding: 0 !important;
            font-size: 11px !important;
            line-height: 1.4 !important;
            color: rgba(255, 255, 255, 0.95) !important;
        }
        
        .preview-footer i {
            font-size: 10px !important;
            color: rgba(255, 255, 255, 0.9) !important;
        }
        
        .preview-footer img {
            max-width: 60px !important;
            max-height: 40px !important;
            background: white !important;
            padding: 2px !important;
            border-radius: 3px !important;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
            margin-top: 3px !important;
        }
        
        .preview-footer span {
            font-size: 11px !important;
            color: rgba(255, 255, 255, 0.95) !important;
        }
        
        /* معلومات المسؤول عن العرض ونطاق الراتب - نفس تنسيق الطباعة */
        .preview-offer-info {
            margin: 1px 0 !important;
            padding: 2px 3px !important;
            border-radius: 1px !important;
            width: 100% !important;
            max-width: 100% !important;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
        }
        
        .preview-offer-info > div {
            gap: 2px !important;
            display: grid !important;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
            width: 100% !important;
        }
        
        .preview-offer-info > div > div {
            padding: 1.5px 2.25px !important;
            border-radius: 0.75px !important;
            font-size: 11px !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        /* تصغير خانات محددة بنسبة 25% للمعاينة - نفس الطباعة */
        .preview-offer-info > div > div[style*="مدير المبيعات"],
        .preview-offer-info > div > div[style*="ختم الشركة"],
        .preview-offer-info > div > div[style*="رقم الجوال"] {
            padding: 1.5px 2.25px !important;
            border-radius: 0.75px !important;
        }
        
        /* منع المحتوى من التداخل - نفس الطباعة */
        .preview-header,
        .preview-client-info,
        .preview-services,
        .preview-terms,
        .preview-offer-info {
            margin-bottom: 0.5px !important;
        }
        
        .preview-offer-info span {
            font-size: 11px !important;
            line-height: 1.1 !important;
        }
        
        .preview-offer-info i {
            font-size: 11px !important;
        }
        
        /* صورة الختم في قسم معلومات العرض - للمعاينة */
        .preview-offer-info [style*="ختم الشركة"] {
            font-size: 11px !important;
        }
        .preview-offer-info [style*="ختم الشركة"] img {
            max-width: 60px !important;
            max-height: 40px !important;
            background: transparent !important;
            padding: 0 !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            margin: 0 !important;
        }
        /* تكبير ارتفاع صورة ختم الشركة بنسبة 25% في عروض الأسعار فقط عند المعاينة */
        .pricing-preview .preview-offer-info [style*="ختم الشركة"] img,
        .pricing-preview .preview-offer-info img[alt="ختم الشركة"] {
            max-height: 50px !important; /* 40px * 1.25 = 50px */
        }
        /* تنسيق مربعي توقيع العميل وختم العميل - جنباً إلى جنب ومتساويين - للمعاينة */
        .preview-offer-info > div > div[style*="grid-template-columns: 1fr 1fr"] {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            gap: 8px !important;
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        .preview-offer-info > div > div[style*="grid-template-columns: 1fr 1fr"] > div {
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
            flex: 1 !important;
        }
        .preview-offer-info > div > div[style*="توقيع العميل"],
        .preview-offer-info > div > div[style*="ختم العميل"] {
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        
        /* نطاق الراتب - نفس تنسيق الطباعة */
        .preview-offer-info [style*="نطاق الراتب"],
        .preview-offer-info [style*="money-bill-wave"] {
            font-size: 11px !important;
            width: 100% !important;
            max-width: 100% !important;
            flex-wrap: wrap !important;
        }
        
        .preview-offer-info [style*="نطاق الراتب"] span:first-child,
        .preview-offer-info [style*="money-bill-wave"] + span {
            font-size: 10px !important;
            white-space: nowrap !important;
            flex-shrink: 0 !important;
        }
        
        .preview-offer-info [style*="نطاق الراتب"] span:last-child {
            font-size: 11px !important;
            white-space: normal !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            flex: 1 !important;
            min-width: 0 !important;
            max-width: 100% !important;
        }

        /* تنسيق حاوية الدفعة المدفوعة */
        .payment-input-container {
            display: flex;
            align-items: center;
        }

        .input-with-symbol {
            position: relative;
            flex: 1;
            min-width: 200px;
        }

        .input-with-symbol input {
            width: 100%;
            padding: 10px 35px 10px 15px;
            font-size: 16px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .payment-symbol {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #666;
            font-size: 16px;
            font-weight: bold;
            pointer-events: none;
        }

        .payment-input-container select {
            min-width: 120px;
            padding: 10px 12px;
            font-size: 16px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: white;
        }

        /* تنسيق النص التوضيحي للدفعة المدفوعة */
        .payment-instructions {
            display: block;
            margin-top: 8px;
            color: #666;
            font-size: 14px;
            line-height: 1.4;
        }

        .payment-instructions i {
            color: #007bff;
            margin-left: 5px;
        }

        .step3-profession-offers-container {
            background: #fff;
            border: 1px solid rgba(102, 126, 234, 0.18);
            border-radius: 10px;
            padding: 10px;
        }
        .step3-profession-offers-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .step3-offer-row {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 10px;
            background: #fafbff;
        }
        .step3-offer-row-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }
        .step3-offer-title {
            font-weight: 700;
            color: #2d3748;
            font-size: 0.9rem;
        }
        .step3-offer-status {
            padding: 4px 9px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 700;
        }
        .step3-offer-status.not_started { background: #edf2f7; color: #4a5568; }
        .step3-offer-status.in_progress { background: #e0f2fe; color: #0369a1; }
        .step3-offer-status.waiting { background: #fef9c3; color: #92400e; }
        .step3-offer-status.completed { background: #dcfce7; color: #166534; }
        .step3-offer-table-wrap {
            overflow-x: auto;
        }
        .step3-offer-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 900px;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
        }
        .step3-offer-table th,
        .step3-offer-table td {
            border-bottom: 1px solid #eef2f7;
            padding: 6px 7px;
            font-size: 0.76rem;
            text-align: center;
            vertical-align: middle;
        }
        .step3-offer-table th {
            background: #f3f6ff;
            color: #334155;
            font-weight: 700;
            white-space: nowrap;
        }
        .step3-offer-table td input,
        .step3-offer-table td select,
        .step3-offer-table td textarea {
            width: 100%;
            border: 1px solid #d1d5db;
            border-radius: 5px;
            padding: 5px 6px;
            font-size: 0.74rem;
            box-sizing: border-box;
            background: #fff;
        }
        .step3-offer-table td textarea {
            resize: vertical;
            min-height: 28px;
        }
        .step3-offer-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            justify-content: center;
        }
        .step3-icon-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #fff;
            font-size: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
            transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
            padding: 0;
            margin: 0;
        }
        .step3-icon-btn:hover {
            transform: translateY(-1px) scale(1.05);
            box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
            opacity: 0.95;
        }
        .step3-icon-btn.in_progress { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
        .step3-icon-btn.waiting { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .step3-icon-btn.completed { background: linear-gradient(135deg, #22c55e, #16a34a); }
        .step3-offer-table .step3-offer-candidate-name {
            min-width: 150px;
        }