/* ============================================
           فونت اصلی: وزیرمتن (Vazirmatn) - رایگان و با کیفیت بالا
           ============================================ */
        @font-face {
            font-family: 'Vazirmatn';
            src: url('../fonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
                 url('../fonts/Vazirmatn[wght].woff2') format('woff2-variations');
            font-weight: 100 900;
            font-display: swap;
        }

        /* ============================================
           پشتیبان: ایران‌سنس (IRANSansXV) - در صورت عدم دسترسی به CDN
           ============================================ */
        @font-face {
            font-family: 'IRANSansXV';
            src: url('../fonts/IRANSans.woff2') format('woff2-variations'),
                 url('../fonts/IRANSans.woff2') format('woff2');
            font-weight: 100 900;
            font-display: swap;
        }

        /* ============================================
           اعمال فونت روی تمام المان‌ها
           ============================================ */
        * {
            font-family: 'Vazirmatn', 'IRANSansXV', system-ui, tahoma, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }

        /* ============================================
           اطمینان از پشتیبانی font-variation-settings
           ============================================ */
        @supports (font-variation-settings: normal) {
            * {
                font-family: 'Vazirmatn', 'IRANSansXV', system-ui, tahoma, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            }
        }

        body {
            direction: rtl;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f5f9;
        }

        ::-webkit-scrollbar-thumb {
            background: #94a3b8;
            border-radius: 3px;
        }

        /* Focus ring */
        .focus-ring:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
            border-color: #1a4fa0;
        }

        /* Input base */
        .form-input {
            width: 100%;
            padding: 0.625rem 0.875rem;
            border: 1.5px solid #d1daf0;
            border-radius: 0.5rem;
            background: #ffffff;
            font-size: 0.9375rem;
            color: #1e293b;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .form-input:focus {
            outline: none;
            border-color: #1a4fa0;
            box-shadow: 0 0 0 3px rgba(26, 79, 160, 0.15);
        }

        .form-input::placeholder {
            color: #94a3b8;
        }

        .form-input.error {
            border-color: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, .13);
        }

        /* Subtle card */
        .card {
            background: #ffffff;
            border-radius: 1rem;
            box-shadow: 0 4px 24px rgba(15, 45, 94, 0.08), 0 1px 4px rgba(15, 45, 94, 0.04);
        }

        /* Badge */
        .badge-orange {
            background: #fff7ed;
            color: #c2410c;
            border: 1px solid #fed7aa;
        }

        .badge-red {
            background: #fef2f2;
            color: #b91c1c;
            border: 1px solid #fecaca;
        }

        .badge-green {
            background: #f0fdf4;
            color: #15803d;
            border: 1px solid #bbf7d0;
        }

        .badge-blue {
            background: #eff6ff;
            color: #1d4ed8;
            border: 1px solid #bfdbfe;
        }

        /* Button transitions */
        .btn-primary {
            background: linear-gradient(135deg, #1a4fa0, #1d4ed8);
            transition: all 0.2s ease;
        }

        .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, #0f2d5e, #1a4fa0);
            box-shadow: 0 4px 16px rgba(26, 79, 160, 0.35);
            transform: translateY(-1px);
        }

        .btn-primary:active:not(:disabled) {
            transform: translateY(0);
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .btn-secondary {
            background: #ffffff;
            border: 1.5px solid #d1daf0;
            color: #475569;
            transition: all 0.2s ease;
        }

        .btn-secondary:hover {
            background: #f8faff;
            border-color: #1a4fa0;
            color: #1a4fa0;
        }

        /* Table row hover */
        .table-row-hover:hover {
            background: #f8faff;
            transition: background 0.15s;
        }

        /* Animated underline for links */
        .link-underline {
            position: relative;
            color: #1a4fa0;
            text-decoration: none;
            font-size: 0.875rem;
        }

        .link-underline::after {
            content: '';
            position: absolute;
            bottom: -1px;
            right: 0;
            width: 0;
            height: 1px;
            background: #1a4fa0;
            transition: width 0.2s ease;
        }

        .link-underline:hover::after {
            width: 100%;
        }

        /* Number fields – LTR inside RTL */
        .ltr-num {
            direction: ltr;
            text-align: center;
            letter-spacing: 2px;
        }

        /* Plate display */
        .plate-segment {
            border: 1.5px solid #d1daf0;
            border-radius: 0.5rem;
            background: #f8faff;
            text-align: center;
            font-size: 1rem;
            font-weight: 600;
            color: #0f2d5e;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .plate-segment:focus {
            outline: none;
            border-color: #1a4fa0;
            box-shadow: 0 0 0 3px rgba(26, 79, 160, 0.15);
            background: #fff;
        }

        .plate-iran {
            background: linear-gradient(135deg, #0f2d5e, #1a4fa0);
            color: #ffffff;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.875rem;
            font-weight: 700;
            padding: 0.375rem 0.5rem;
            white-space: nowrap;
        }

        /* OTP boxes */
        .otp-box {
            width: 3.25rem;
            height: 3.75rem;
            border: 2px solid #d1daf0;
            border-radius: 0.75rem;
            text-align: center;
            font-size: 1.5rem;
            font-weight: 700;
            color: #0f2d5e;
            background: #ffffff;
            transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
            direction: ltr;
        }

        .otp-box:focus {
            outline: none;
            border-color: #1a4fa0;
            box-shadow: 0 0 0 3px rgba(26, 79, 160, 0.18);
            transform: scale(1.04);
        }

        .otp-box.filled {
            border-color: #1a4fa0;
            background: #eff6ff;
        }

        .otp-box.error {
            border-color: #ef4444 !important;
        }

        /* Stat card hover */
        .stat-card {
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 32px rgba(15, 45, 94, 0.14);
        }

        /* Shortcut card hover */
        .shortcut-card {
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .shortcut-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgba(15, 45, 94, 0.12);
            border-color: #1a4fa0;
        }

        .shortcut-card:hover .shortcut-icon {
            background: linear-gradient(135deg, #1a4fa0, #2563eb);
            color: #fff;
        }

        /* Section divider */
        .section-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, #c7d8f5, transparent);
            margin: 1.5rem 0;
        }

        /* ============================================
           ✨ اضافه شده برای چسبیدن فوتر به پایین
           ============================================ */
        .page-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .page-content {
            flex: 1 0 auto;
        }

        .page-footer {
            flex-shrink: 0;
        }

        .tabular-nums {
            font-feature-settings: "tnum";
            direction: ltr;
            unicode-bidi: embed;
        }

        /* ============================================
           ✨ ریسپانسیو کردن هدر در موبایل
           ============================================ */
        @media (max-width: 640px) {
            .header-logo-text {
                font-size: 0.85rem;
            }

            .header-logo-sub {
                font-size: 0.6rem;
            }

            .header-logo-icon {
                width: 2.5rem;
                height: 2.5rem;
            }

            .header-logo-icon svg {
                width: 1.5rem;
                height: 1.5rem;
            }

            .top-bar-text {
                font-size: 0.6rem;
            }

            .top-bar-contact {
                display: flex;
                font-size: 0.65rem;
                gap: 0.25rem;
            }
        }

        /* ============================================
           ✨ بهینه‌سازی جدول در موبایل
           ============================================ */
        @media (max-width: 768px) {
            .table-responsive {
                display: block;
                width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .table-responsive table {
                min-width: 600px;
            }
        }

        /* ============================================
           ✨ کارت‌های آمار در موبایل
           ============================================ */
        @media (max-width: 480px) {
            .stat-card {
                padding: 0.75rem !important;
            }

            .stat-card .stat-number {
                font-size: 1.25rem !important;
            }

            .stat-card .stat-label {
                font-size: 0.6rem !important;
            }

            .stat-card .stat-icon {
                width: 2rem !important;
                height: 2rem !important;
            }

            .stat-card .stat-icon svg {
                width: 1rem !important;
                height: 1rem !important;
            }
        }

        /* ============================================
           ✨ بهینه‌سازی OTP در موبایل
           ============================================ */
        @media (max-width: 480px) {
            .otp-box {
                width: 2.5rem;
                height: 3rem;
                font-size: 1.25rem;
            }
        }

        /* ============================================
           ✨ بهینه‌سازی پلاک در موبایل
           ============================================ */
        @media (max-width: 480px) {
            .plate-segment {
                font-size: 0.85rem;
                height: 2.5rem;
            }

            .plate-iran {
                font-size: 0.7rem;
                padding: 0.25rem 0.35rem;
                height: 2.5rem;
            }

            .plate-grid {
                gap: 0.25rem !important;
                padding: 0.6rem 0.4rem !important;
            }

            #plate_left {
                width: 2.4rem !important;
                font-size: 0.9rem !important;
            }

            #plate_char {
                width: 3.4rem !important;
                font-size: 0.9rem !important;
            }

            #plate_mid {
                width: 2.8rem !important;
                min-width: 0 !important;
                font-size: 0.9rem !important;
            }

            #plate_right {
                width: 2.4rem !important;
                font-size: 0.9rem !important;
            }

            .plate-badge {
                padding: 0 0.35rem !important;
                font-size: 0.55rem !important;
            }
        }

        /* ============================================
           ✨ بهینه‌سازی مرحله‌بندی در موبایل
           ============================================ */
        @media (max-width: 480px) {
            .step-bubble {
                width: 1.5rem !important;
                height: 1.5rem !important;
                font-size: 0.6rem !important;
            }

            .step-bubble svg {
                width: 0.9rem !important;
                height: 0.9rem !important;
            }

            .step-line {
                min-width: 0.5rem !important;
            }
        }