:root {
            --primary: #0b57d0;
            --primary-hover: #0842a0;
            --on-primary: #ffffff;
            --primary-container: #dbe7ff;
            --on-primary-container: #001b3f;
            --secondary-container: #d8e3f8;
            --on-secondary-container: #111c2b;
            --error: #ba1a1a;
            --error-container: #ffdad6;
            --background: #f8f9ff;
            --surface: #ffffff;
            --surface-low: #f2f3fa;
            --surface-high: #e7e8ef;
            --on-surface: #191c20;
            --on-surface-variant: #43474e;
            --outline: #74777f;
            --outline-variant: #c4c6d0;
            --shadow-1: 0 1px 2px rgba(25, 28, 32, .14), 0 1px 3px 1px rgba(25, 28, 32, .08);
            --shadow-2: 0 2px 6px rgba(25, 28, 32, .12), 0 8px 24px rgba(25, 28, 32, .12);
            --shadow-3: 0 12px 38px rgba(25, 28, 32, .18);
        }

        .noscript-warning {
            padding: 14px;
            color: #ba1a1a;
            background: #ffdad6;
            font-family: Tahoma, Arial, sans-serif;
            text-align: center;
        }

        * {
            box-sizing: border-box;
        }

        html {
            min-height: 100%;
        }

        body {
            min-height: 100vh;
            margin: 0;
            overflow-x: hidden;
            color: var(--on-surface);
            background: var(--background);
            font-family: "Vazirmatn", sans-serif;
        }

        button,
        input {
            font-family: inherit;
        }

        button {
            -webkit-tap-highlight-color: transparent;
        }

        .page-background {
            position: fixed;
            z-index: 0;
            inset: 0;
            overflow: hidden;
            background: radial-gradient( circle at 85% 5%, rgba(11, 87, 208, .18), transparent 35rem ), radial-gradient( circle at 10% 90%, rgba(0, 106, 96, .12), transparent 30rem ), linear-gradient( 145deg, #f8f9ff 0%, #eef4ff 52%, #f5f7ff 100% );
        }

            .page-background::before,
            .page-background::after {
                content: "";
                position: absolute;
                border-radius: 50%;
                pointer-events: none;
            }

            .page-background::before {
                top: -150px;
                right: -130px;
                width: 430px;
                height: 430px;
                border: 78px solid rgba(11, 87, 208, .055);
            }

            .page-background::after {
                bottom: -190px;
                left: -170px;
                width: 520px;
                height: 520px;
                border: 92px solid rgba(0, 106, 96, .045);
            }

        .login-page {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            padding: 28px;
            display: grid;
            place-items: center;
        }

        .login-shell {
            width: min(100%, 1010px);
            display: grid;
            grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
            overflow: hidden;
            background: rgba(255, 255, 255, .94);
            border: 1px solid rgba(196, 198, 208, .72);
            border-radius: 32px;
            box-shadow: var(--shadow-3);
            backdrop-filter: blur(22px);
            -webkit-backdrop-filter: blur(22px);
        }

        /* =========================================
                                   LEFT PRESENTATION PANEL
                                ========================================= */

        .presentation-panel {
            position: relative;
            min-height: 650px;
            padding: 46px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            overflow: hidden;
            color: #ffffff;
            background: radial-gradient( circle at 18% 18%, rgba(255, 255, 255, .22), transparent 32% ), radial-gradient( circle at 88% 80%, rgba(67, 190, 255, .20), transparent 30% ), linear-gradient( 145deg, #0b57d0 0%, #0842a0 55%, #062e73 100% );
        }

            .presentation-panel::before {
                content: "";
                position: absolute;
                top: -120px;
                left: -90px;
                width: 340px;
                height: 340px;
                border: 58px solid rgba(255, 255, 255, .08);
                border-radius: 50%;
            }

            .presentation-panel::after {
                content: "";
                position: absolute;
                right: -90px;
                bottom: -110px;
                width: 310px;
                height: 310px;
                border: 54px solid rgba(255, 255, 255, .07);
                border-radius: 50%;
            }



        .presentation-content {
            position: relative;
            z-index: 1;
            max-width: 470px;
        }

        .presentation-text {
            max-width: 420px;
            margin: 0;
            color: rgba(255, 255, 255, .78);
            font-size: 14px;
            font-weight: 500;
            line-height: 2;
        }

        .presentation-features {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .feature-item {
            min-height: 64px;
            padding: 13px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: rgba(255, 255, 255, .92);
            background: rgba(255, 255, 255, .10);
            border: 1px solid rgba(255, 255, 255, .13);
            border-radius: 17px;
            font-size: 12px;
            font-weight: 700;
        }

            .feature-item i {
                width: 34px;
                height: 34px;
                flex: 0 0 34px;
                display: grid;
                place-items: center;
                background: rgba(255, 255, 255, .14);
                border-radius: 11px;
                font-size: 17px;
            }

        /* =========================================
                                   LOGIN FORM PANEL
                                ========================================= */

        .login-panel {
            min-height: 650px;
            padding: 46px 42px;
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, .96);
        }

        .login-form {
            width: 100%;
        }

        .mobile-brand {
            display: none;
            margin-bottom: 28px;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .mobile-brand-icon {
            width: 46px;
            height: 46px;
            display: grid;
            place-items: center;
            color: var(--on-primary);
            background: var(--primary);
            border-radius: 15px;
            font-size: 22px;
        }

        .mobile-brand-name {
            color: var(--on-surface);
            font-size: 19px;
            font-weight: 900;
        }

        .form-heading {
            margin-bottom: 30px;
        }

        .form-heading-icon {
            width: 58px;
            height: 58px;
            display: grid;
            place-items: center;
            color: var(--primary);
            background: var(--primary-container);
            border-radius: 20px;
            font-size: 26px;
        }

        .form-title {
            margin: 20px 0 6px;
            color: var(--on-surface);
            font-size: 27px;
            font-weight: 900;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: var(--on-surface);
            font-size: 13px;
            font-weight: 800;
        }

        .input-container {
            position: relative;
        }

        .input-icon {
            position: absolute;
            z-index: 2;
            top: 50%;
            right: 16px;
            transform: translateY(-50%);
            color: var(--on-surface-variant);
            font-size: 20px;
            pointer-events: none;
            transition: color .18s ease;
        }

        .phone-input {
            width: 100%;
            height: 58px;
            padding: 0 50px 0 16px;
            direction: ltr;
            text-align: left;
            color: var(--on-surface);
            background: var(--surface);
            border: 1px solid var(--outline);
            border-radius: 14px;
            outline: none;
            font-size: 17px;
            font-weight: 800;
            letter-spacing: .5px;
            transition: border-color .18s ease, box-shadow .18s ease;
        }

            .phone-input::placeholder {
                color: #8a8d95;
                font-weight: 500;
                opacity: 1;
                transition: opacity .15s ease;
            }

            .phone-input:hover {
                border-color: var(--on-surface);
            }

            .phone-input:focus {
                border-color: var(--primary);
                box-shadow: 0 0 0 1px var(--primary);
            }

                .phone-input:focus::placeholder {
                    opacity: 0;
                }

        .input-container:focus-within .input-icon {
            color: var(--primary);
        }

        .phone-input.input-error {
            border-color: var(--error);
            box-shadow: 0 0 0 1px var(--error);
        }

        .field-error {
            min-height: 22px;
            margin-top: 7px;
            display: flex;
            align-items: center;
            gap: 6px;
            visibility: hidden;
            opacity: 0;
            color: var(--error);
            font-size: 12px;
            font-weight: 700;
            transition: opacity .18s ease, visibility .18s ease;
        }

            .field-error.show {
                visibility: visible;
                opacity: 1;
            }

        .login-button {
            width: 100%;
            min-height: 54px;
            margin-top: 15px;
            padding: 10px 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            cursor: pointer;
            color: var(--on-primary);
            background: var(--primary);
            border: none;
            border-radius: 999px;
            box-shadow: var(--shadow-1);
            font-size: 15px;
            font-weight: 900;
            transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
        }

            .login-button:hover:not(:disabled) {
                background: var(--primary-hover);
                box-shadow: var(--shadow-2);
                transform: translateY(-1px);
            }

            .login-button:active:not(:disabled) {
                transform: scale(.985);
                box-shadow: none;
            }

            .login-button:disabled {
                cursor: not-allowed;
                opacity: .68;
            }

        .login-help {
            margin-top: 22px;
            padding-top: 18px;
            display: flex;
            align-items: flex-start;
            gap: 9px;
            color: var(--on-surface-variant);
            border-top: 1px solid var(--outline-variant);
            font-size: 11px;
            font-weight: 500;
            line-height: 1.8;
        }

            .login-help i {
                margin-top: 3px;
                color: var(--primary);
            }

        /* =========================================
                                   OTP MODAL
                                ========================================= */

        .otp-modal {
            position: fixed;
            z-index: 1100;
            inset: 0;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            transition: opacity .22s ease, visibility .22s ease;
        }

            .otp-modal.show {
                visibility: visible;
                opacity: 1;
                pointer-events: auto;
            }

        .otp-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(20, 23, 28, .46);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .otp-card {
            position: relative;
            z-index: 2;
            width: min(100%, 470px);
            overflow: hidden;
            color: var(--on-surface);
            background: var(--surface);
            border: 1px solid var(--outline-variant);
            border-radius: 28px;
            box-shadow: var(--shadow-3);
            transform: translateY(18px) scale(.97);
            transition: transform .24s cubic-bezier(.2, 0, 0, 1);
        }

        .otp-modal.show .otp-card {
            transform: translateY(0) scale(1);
        }

        .otp-header {
            padding: 26px 26px 22px;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 14px;
            background: var(--surface-low);
            border-bottom: 1px solid var(--outline-variant);
        }

        .otp-title-wrapper {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .otp-title-icon {
            width: 48px;
            height: 48px;
            flex: 0 0 48px;
            display: grid;
            place-items: center;
            color: var(--primary);
            background: var(--primary-container);
            border-radius: 16px;
            font-size: 22px;
        }

        .otp-header h2 {
            margin: 0;
            color: var(--on-surface);
            font-size: 19px;
            font-weight: 900;
        }

        .otp-header p {
            margin: 4px 0 0;
            color: var(--on-surface-variant);
            font-size: 12px;
            font-weight: 500;
        }

        .otp-close {
            width: 40px;
            height: 40px;
            flex: 0 0 40px;
            display: grid;
            place-items: center;
            cursor: pointer;
            color: var(--on-surface-variant);
            background: transparent;
            border: none;
            border-radius: 50%;
            font-size: 20px;
            transition: background-color .18s ease, transform .18s ease;
        }

            .otp-close:hover:not(:disabled) {
                background: var(--surface-high);
            }

            .otp-close:active:not(:disabled) {
                transform: scale(.94);
            }

        .otp-body {
            padding: 28px;
            text-align: center;
        }

        .otp-phone {
            margin-bottom: 22px;
            padding: 11px 14px;
            color: var(--on-primary-container);
            background: var(--primary-container);
            border-radius: 14px;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.8;
        }

        .otp-boxes {
            direction: ltr;
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 9px;
        }

        .otp-input {
            width: 100%;
            min-width: 0;
            height: 58px;
            color: var(--on-surface);
            background: var(--surface);
            border: 1px solid var(--outline);
            border-radius: 13px;
            outline: none;
            text-align: center;
            font-size: 23px;
            font-weight: 900;
            caret-color: var(--primary);
            transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
        }

            .otp-input:hover:not(:disabled) {
                border-color: var(--on-surface);
            }

            .otp-input:focus {
                border-color: var(--primary);
                box-shadow: 0 0 0 1px var(--primary);
            }

            .otp-input:disabled {
                color: rgba(25, 28, 32, .55);
                background: var(--surface-low);
                cursor: not-allowed;
            }

        .otp-boxes.has-error .otp-input {
            border-color: var(--error);
        }

        .otp-error {
            min-height: 22px;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            visibility: hidden;
            opacity: 0;
            color: var(--error);
            font-size: 12px;
            font-weight: 700;
            transition: opacity .18s ease, visibility .18s ease;
        }

            .otp-error.show {
                visibility: visible;
                opacity: 1;
            }

        .otp-meta {
            min-height: 42px;
            margin-top: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .otp-timer {
            min-height: 34px;
            padding: 7px 12px;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--on-surface-variant);
            background: var(--surface-low);
            border-radius: 999px;
            font-size: 12px;
            font-weight: 800;
        }

            .otp-timer strong {
                direction: ltr;
                color: var(--primary);
            }

        .resend-code {
            min-height: 40px;
            padding: 8px 14px;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 7px;
            cursor: pointer;
            color: var(--primary);
            background: transparent;
            border: none;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 900;
            transition: background-color .18s ease, transform .18s ease;
        }

            .resend-code.show {
                display: inline-flex;
            }

            .resend-code:hover:not(:disabled) {
                background: var(--primary-container);
            }

        .otp-actions {
            margin-top: 22px;
            display: flex;
            gap: 10px;
        }

        .otp-button {
            min-height: 50px;
            padding: 9px 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            border-radius: 999px;
            font-size: 14px;
            font-weight: 900;
            transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
        }

            .otp-button:active:not(:disabled) {
                transform: scale(.985);
            }

            .otp-button:disabled,
            .otp-close:disabled,
            .resend-code:disabled {
                cursor: not-allowed;
                opacity: .62;
            }

        .otp-cancel {
            width: 40%;
            color: var(--on-secondary-container);
            background: var(--secondary-container);
            border: 1px solid transparent;
        }

            .otp-cancel:hover:not(:disabled) {
                background: #c5d1e7;
            }

        .verify-button {
            width: 60%;
            color: var(--on-primary);
            background: var(--primary);
            border: 1px solid var(--primary);
            box-shadow: var(--shadow-1);
        }

            .verify-button:hover:not(:disabled) {
                background: var(--primary-hover);
                border-color: var(--primary-hover);
                box-shadow: var(--shadow-2);
            }

        /* =========================================
                                   LOADING SCREEN
                                ========================================= */

        .screen-lock {
            position: fixed;
            z-index: 1200;
            inset: 0;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            background: rgba(20, 23, 28, .38);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            transition: opacity .18s ease, visibility .18s ease;
        }

            .screen-lock.show {
                visibility: visible;
                opacity: 1;
                pointer-events: auto;
            }

        .screen-lock-card {
            width: min(100%, 320px);
            padding: 28px 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--on-surface);
            background: var(--surface);
            border: 1px solid var(--outline-variant);
            border-radius: 24px;
            box-shadow: var(--shadow-3);
            text-align: center;
        }

        .spinner {
            width: 48px;
            height: 48px;
            margin-bottom: 16px;
            border: 5px solid var(--primary-container);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spinnerRotate .78s linear infinite;
        }

        .small-spinner {
            width: 20px;
            height: 20px;
            display: inline-block;
            border: 3px solid rgba(255, 255, 255, .35);
            border-top-color: #ffffff;
            border-radius: 50%;
            animation: spinnerRotate .78s linear infinite;
        }

        .screen-lock-text {
            color: var(--on-surface);
            font-size: 14px;
            font-weight: 900;
        }

        @keyframes spinnerRotate {
            to {
                transform: rotate(360deg);
            }
        }

        /* =========================================
                                   RESPONSIVE
                                ========================================= */

        @media (max-width: 900px) {
            .login-page {
                padding: 18px;
            }

            .login-shell {
                max-width: 510px;
                grid-template-columns: 1fr;
            }

            .presentation-panel {
                display: none;
            }

            .login-panel {
                min-height: auto;
                padding: 38px 34px;
            }

            .mobile-brand {
                display: flex;
            }
        }

        @media (max-width: 575.98px) {
            .login-page {
                padding: 12px;
            }

            .login-shell {
                border-radius: 26px;
            }

            .login-panel {
                padding: 30px 22px;
            }

            .form-title {
                font-size: 23px;
            }

            .otp-modal {
                padding: 10px;
            }

            .otp-card {
                border-radius: 24px;
            }

            .otp-header {
                padding: 20px;
            }

            .otp-title-icon {
                width: 42px;
                height: 42px;
                flex-basis: 42px;
                font-size: 19px;
            }

            .otp-header h2 {
                font-size: 17px;
            }

            .otp-body {
                padding: 22px 16px;
            }

            .otp-boxes {
                gap: 6px;
            }

            .otp-input {
                height: 51px;
                border-radius: 11px;
                font-size: 20px;
            }

            .otp-actions {
                flex-direction: column-reverse;
            }

            .otp-cancel,
            .verify-button {
                width: 100%;
            }
        }

        @media (max-width: 370px) {
            .otp-input {
                height: 47px;
                font-size: 18px;
            }

            .otp-boxes {
                gap: 4px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: .01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .01ms !important;
            }
        }
