/* ── Z4U Login Page Executive Styling ── */
* {
            box-sizing: border-box;
        }

        body {
            font-family: 'Tajawal', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: #FAF8F5;
            color: #1F2937;
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }

        .login-canvas {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            background-color: #FAF8F5;
            background-image: 
                radial-gradient(circle at 100% 0%, rgba(212, 175, 124, 0.16) 0%, transparent 45%),
                radial-gradient(circle at 0% 100%, rgba(20, 115, 89, 0.22) 0%, transparent 50%),
                repeating-linear-gradient(45deg, rgba(212, 175, 124, 0.02) 0, rgba(212, 175, 124, 0.02) 1px, transparent 0, transparent 40px);
            padding: 1.5rem 1.25rem;
        }

        /* ── Top Bar ── */
        .top-status-bar {
            width: 100%;
            max-width: 1300px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 1rem;
            z-index: 10;
        }

        .system-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.45rem 1rem;
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid rgba(229, 231, 235, 0.85);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            font-size: 0.8rem;
            color: #4B5563;
            font-weight: 500;
            backdrop-filter: blur(8px);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #10B981;
            box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
            animation: pulse-ring 2s infinite;
        }

        @@keyframes pulse-ring {
            0% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
            }
            70% {
                box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
            }
        }

        .lang-switch-container {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid #E5E7EB;
            border-radius: 10px;
            padding: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }

        .lang-btn {
            padding: 0.35rem 0.95rem;
            border-radius: 7px;
            font-size: 0.82rem;
            font-weight: 700;
            text-decoration: none;
            transition: all 0.2s ease;
            display: inline-block;
        }

        .lang-btn.active {
            background-color: #0E5B46;
            color: #FFFFFF !important;
            box-shadow: 0 2px 6px rgba(14, 91, 70, 0.25);
        }

        .lang-btn:not(.active) {
            color: #6B7280;
            font-weight: 500;
        }

        .lang-btn:not(.active):hover {
            color: #0E5B46;
        }

        /* ── Centered Card ── */
        .login-card-container {
            width: 100%;
            max-width: 460px;
            margin: auto;
            padding: 2rem 0;
            z-index: 10;
        }

        .login-card {
            background: #FFFFFF;
            border-radius: 20px;
            border: 1px solid rgba(229, 231, 235, 0.85);
            box-shadow: 0 20px 45px -12px rgba(14, 91, 70, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.03);
            padding: 2.5rem 2.5rem 2.5rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        @@media (max-width: 576px) {
            .login-card {
                padding: 1.75rem 1.5rem 2rem;
                border-radius: 16px;
            }
        }

        .brand-logo-wrap {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .brand-logo-img {
            max-height: 68px;
            width: auto;
            object-fit: contain;
        }

        .login-title {
            font-size: 1.45rem;
            font-weight: 800;
            color: #111827;
            text-align: center;
            margin: 0 0 0.4rem 0;
            letter-spacing: -0.01em;
        }

        .login-subtitle {
            font-size: 0.85rem;
            color: #6B7280;
            text-align: center;
            margin: 0 0 1.75rem 0;
            line-height: 1.5;
        }

        /* ── Form Controls ── */
        .form-group-custom {
            margin-bottom: 1.15rem;
        }

        .form-label-custom {
            display: block;
            font-size: 0.8125rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.4rem;
        }

        .form-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.4rem;
        }

        .forgot-password-link {
            font-size: 0.78rem;
            color: #0E5B46;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.15s ease;
        }

        .forgot-password-link:hover {
            color: #0A4333;
            text-decoration: underline;
        }

        .input-wrapper-custom {
            position: relative;
            display: flex;
            align-items: center;
            border-radius: 12px;
            background-color: rgba(249, 250, 251, 0.7);
            border: 1px solid #E5E7EB;
            transition: all 0.2s ease;
        }

        .input-wrapper-custom:hover {
            background-color: #FFFFFF;
            border-color: #D1D5DB;
        }

        .input-wrapper-custom:focus-within {
            background-color: #FFFFFF;
            border-color: #0E5B46;
            box-shadow: 0 0 0 3px rgba(14, 91, 70, 0.12);
        }

        /* Validation Error States */
        .input-wrapper-custom.has-error {
            border-color: #DC2626 !important;
            background-color: #FFF8F8 !important;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
        }

        .input-wrapper-custom.has-error .input-icon-slot,
        .input-wrapper-custom.has-error .input-icon-btn {
            color: #DC2626 !important;
        }

        .field-validation-custom {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.78rem !important;
            font-weight: 600;
            color: #DC2626 !important;
            margin-top: 0.35rem;
            animation: error-appear 0.2s ease-out;
        }

        @@keyframes error-appear {
            from {
                opacity: 0;
                transform: translateY(-4px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-shake {
            animation: input-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
        }

        @@keyframes input-shake {
            10%, 90% { transform: translate3d(-1px, 0, 0); }
            20%, 80% { transform: translate3d(2px, 0, 0); }
            30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
            40%, 60% { transform: translate3d(3px, 0, 0); }
        }

        .input-custom {
            width: 100%;
            height: 48px;
            border: none;
            background: transparent;
            padding: 0 1rem;
            font-size: 0.875rem;
            color: #1F2937;
            outline: none;
            border-radius: 12px;
            font-family: inherit;
        }

        .input-custom::placeholder {
            color: #9CA3AF;
            font-weight: 400;
        }

        .input-icon-slot {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 0.85rem;
            color: #9CA3AF;
            pointer-events: none;
            flex-shrink: 0;
        }

        .input-icon-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 0.85rem;
            color: #9CA3AF;
            background: transparent;
            border: none;
            cursor: pointer;
            transition: color 0.15s ease;
            flex-shrink: 0;
        }

        .input-icon-btn:hover {
            color: #0E5B46;
        }

        /* ── Remember & Scope Row ── */
        .meta-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 1.25rem 0 1.5rem;
            font-size: 0.8125rem;
            color: #4B5563;
        }

        .checkbox-label {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            user-select: none;
        }

        .checkbox-custom {
            width: 17px;
            height: 17px;
            border-radius: 4px;
            border: 1.5px solid #D1D5DB;
            accent-color: #0E5B46;
            cursor: pointer;
        }

        .branch-badge {
            font-size: 0.72rem;
            color: #6B7280;
            background: #F3F4F6;
            border: 1px solid #E5E7EB;
            padding: 0.2rem 0.65rem;
            border-radius: 6px;
            font-weight: 500;
        }

        /* ── Submit Button ── */
        .btn-login-submit {
            width: 100%;
            height: 48px;
            background-color: #0E5B46;
            color: #FFFFFF;
            border: none;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 700;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            cursor: pointer;
            box-shadow: 0 10px 25px -5px rgba(14, 91, 70, 0.28);
            transition: all 0.2s ease;
        }

        .btn-login-submit:hover {
            background-color: #0A4333;
            transform: translateY(-1px);
            box-shadow: 0 14px 28px -4px rgba(14, 91, 70, 0.35);
        }

        .btn-login-submit:active {
            transform: scale(0.99);
        }

        .arrow-icon-rtl {
            transform: scaleX(1);
        }

        html[dir="ltr"] .arrow-icon-rtl {
            transform: scaleX(-1);
        }

        /* ── Footer ── */
        .login-footer {
            width: 100%;
            max-width: 440px;
            margin: 0 auto;
            text-align: center;
            font-size: 0.78rem;
            color: #9CA3AF;
            z-index: 10;
        }

        .footer-links {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
            color: #6B7280;
        }

        .footer-links a {
            color: #6B7280;
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .footer-links a:hover {
            color: #0E5B46;
        }

        .footer-divider {
            color: #D1D5DB;
        }

        .footer-copyright {
            margin: 0;
            font-size: 0.74rem;
            color: #9CA3AF;
        }
