/* Login Page (login.html) Styles */

:root {
            --primary: #093FB4;
            --primary-light: #2563eb;
            --primary-dark: #062E88;
            --secondary: #062E88;
            --text-primary: #0A0F1D;
            --text-secondary: #334155;
            --text-muted: #64748B;
            --border: rgba(0, 0, 0, 0.14);
            --input-bg: #ffffff;
            --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
            --shadow-xl: 0 20px 25px -5px rgba(9, 63, 180, 0.12), 0 10px 10px -5px rgba(9, 63, 180, 0.06);
        }

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

        body {
            font-family: 'Poppins', sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: stretch;
            justify-content: center;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
            background: linear-gradient(90deg, #93BDFB 0%, #A9CBFB 20%, #BDD8FC 40%, #D0E5FD 60%, #E1EEFD 80%, #F3F8FD 100%);
            color: var(--text-primary);
        }

        /* ===== FULL PAGE BG IMAGE ===== */
        .app-frame {
            width: 100%;
            min-height: 100vh;
            background-color: transparent;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 40px 80px;
            overflow: hidden;
            z-index: 1;
        }

        .app-frame::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('/static/login_bg_outpainted.png');
            background-size: cover;
            background-position: center 54%;
            background-repeat: no-repeat;
            background-attachment: fixed;
            opacity: 0.96;
            z-index: -2;
            pointer-events: none;
        }

        .app-frame::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, rgba(147, 189, 251, 0.12) 0%, rgba(208, 229, 253, 0.08) 50%, rgba(243, 248, 253, 0.04) 100%);
            z-index: -1;
            pointer-events: none;
        }


        /* ===== PARTICLE CANVAS ===== */
        #particleCanvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
            opacity: 0.15;
            /* Reduced network opacity */
        }

        /* ===== FLOATING DECORATIVE SHAPES ===== */
        .floating-shapes {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
            overflow: hidden;
        }

        .float-shape {
            position: absolute;
            border-radius: 50%;
            opacity: 0;
            animation: floatShapeIn 1s ease-out forwards;
        }

        .float-shape:nth-child(1) {
            width: 8px;
            height: 8px;
            background: rgba(255, 255, 255, 0.4);
            top: 15%;
            left: 20%;
            animation-delay: 0.5s;
            animation: floatShapeIn 1s ease-out 0.5s forwards, floatDrift1 12s ease-in-out 1.5s infinite;
        }

        .float-shape:nth-child(2) {
            width: 5px;
            height: 5px;
            background: rgba(247, 152, 36, 0.5);
            top: 25%;
            right: 35%;
            animation-delay: 0.8s;
            animation: floatShapeIn 1s ease-out 0.8s forwards, floatDrift2 10s ease-in-out 1.8s infinite;
        }

        .float-shape:nth-child(3) {
            width: 6px;
            height: 6px;
            background: rgba(129, 140, 248, 0.5);
            bottom: 30%;
            left: 15%;
            animation-delay: 1.1s;
            animation: floatShapeIn 1s ease-out 1.1s forwards, floatDrift3 14s ease-in-out 2.1s infinite;
        }

        .float-shape:nth-child(4) {
            width: 4px;
            height: 4px;
            background: rgba(255, 255, 255, 0.35);
            top: 60%;
            left: 40%;
            animation-delay: 1.4s;
            animation: floatShapeIn 1s ease-out 1.4s forwards, floatDrift4 11s ease-in-out 2.4s infinite;
        }

        .float-shape:nth-child(5) {
            width: 7px;
            height: 7px;
            background: rgba(245, 158, 11, 0.4);
            top: 80%;
            right: 20%;
            animation-delay: 0.3s;
            animation: floatShapeIn 1s ease-out 0.3s forwards, floatDrift5 13s ease-in-out 1.3s infinite;
        }

        .float-shape:nth-child(6) {
            width: 3px;
            height: 3px;
            background: rgba(255, 255, 255, 0.5);
            top: 10%;
            right: 15%;
            animation-delay: 1.6s;
            animation: floatShapeIn 1s ease-out 1.6s forwards, floatDrift6 9s ease-in-out 2.6s infinite;
        }

        @keyframes floatShapeIn {
            0% {
                opacity: 0;
                transform: scale(0);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes floatDrift1 {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            25% {
                transform: translate(15px, -20px) scale(1.3);
            }

            50% {
                transform: translate(-10px, -35px) scale(0.8);
            }

            75% {
                transform: translate(20px, -15px) scale(1.1);
            }
        }

        @keyframes floatDrift2 {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            25% {
                transform: translate(-20px, 15px) scale(0.7);
            }

            50% {
                transform: translate(10px, 25px) scale(1.2);
            }

            75% {
                transform: translate(-15px, 10px) scale(0.9);
            }
        }

        @keyframes floatDrift3 {

            0%,
            100% {
                transform: translate(0, 0);
            }

            33% {
                transform: translate(25px, -18px);
            }

            66% {
                transform: translate(-12px, 20px);
            }
        }

        @keyframes floatDrift4 {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            50% {
                transform: translate(-18px, -25px) scale(1.4);
            }
        }

        @keyframes floatDrift5 {

            0%,
            100% {
                transform: translate(0, 0);
            }

            25% {
                transform: translate(12px, -15px);
            }

            50% {
                transform: translate(-8px, -30px);
            }

            75% {
                transform: translate(18px, -10px);
            }
        }

        @keyframes floatDrift6 {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            50% {
                transform: translate(-22px, 18px) scale(1.5);
            }
        }

        /* ===== MAIN CONTAINER ===== */
        .main-container {
            width: 92%;
            max-width: 1600px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 120px;
            align-items: center;
            z-index: 10;
            position: relative;
            transform: translateY(-20px);
            /* Adjust alignment with background image */
        }

        /* ===== LEFT PANEL ===== */
        .left-panel {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            z-index: 10;
            transform: translateY(-35px);
        }

        .brand-logo-container {
            width: 106px;
            height: 106px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 12px 32px rgba(7, 53, 164, 0.15);
            border: 1.5px solid rgba(0, 0, 0, 0.14);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            margin-bottom: 28px;
            transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
            cursor: default;
            opacity: 0;
            transform: translateY(30px) scale(0.8);
            animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
            will-change: transform;
        }

        .brand-logo-container:hover {
            transform: scale(1.1) rotate(6deg) !important;
            box-shadow: 0 18px 45px rgba(7, 53, 164, 0.28);
        }

        @keyframes logoEntrance {
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .brand-logo {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .system-title {
            font-family: 'Poppins', sans-serif;
            font-size: 80px;
            font-weight: 900;
            line-height: 1;
            color: var(--text-primary);
            margin-bottom: 6px;
            letter-spacing: -1.5px;
            text-shadow: none;
            opacity: 0;
            transform: translateY(30px);
            animation: slideUp 0.7s ease-out 0.25s forwards;
            will-change: transform;
            overflow: hidden;
        }

        .system-title .char {
            display: inline-block;
            transition: transform 0.3s ease, color 0.3s ease;
        }

        .system-title:hover .char {
            animation: charWave 0.5s ease forwards;
        }

        @keyframes charWave {
            0% {
                transform: translateY(0);
            }

            40% {
                transform: translateY(-8px);
            }

            100% {
                transform: translateY(0);
            }
        }

        .system-subtitle {
            font-family: 'Poppins', sans-serif;
            font-size: 24px;
            font-weight: 800;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 2.5px;
            line-height: 1.3;
            max-width: 100%;
            white-space: nowrap;
            margin-bottom: 16px;
            text-shadow: none;
            opacity: 0;
            transform: translateY(30px);
            animation: slideUp 0.7s ease-out 0.4s forwards;
            will-change: transform;
        }

        @keyframes slideUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .custom-divider {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 24px 0;
            opacity: 0;
            animation: fadeIn 0.6s ease-out 0.55s forwards;
        }

        @keyframes fadeIn {
            to {
                opacity: 1;
            }
        }

        .divider-dot {
            width: 8px;
            height: 8px;
            background: #093FB4;
            border-radius: 50%;
            animation: dotPulse 2s ease-in-out infinite;
            box-shadow: 0 0 8px rgba(9, 63, 180, 0.5);
        }

        @keyframes dotPulse {

            0%,
            100% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.4);
                opacity: 0.7;
            }
        }

        .divider-line {
            width: 80px;
            height: 3px;
            background: linear-gradient(to right, #093FB4, #062E88);
            border-radius: 1.5px;
            animation: lineGrow 1.2s ease-out 0.6s forwards, lineGlow 3s ease-in-out 1.8s infinite;
            transform-origin: left center;
            transform: scaleX(0);
        }

        @keyframes lineGrow {
            to {
                transform: scaleX(1);
            }
        }

        @keyframes lineGlow {

            0%,
            100% {
                opacity: 0.8;
                filter: brightness(1);
            }

            50% {
                opacity: 1;
                filter: brightness(1.3);
            }
        }

        .tagline {
            font-size: 18px;
            font-weight: 500;
            color: #334155;
            line-height: 1.6;
            max-width: 480px;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 12px rgba(255, 255, 255, 0.85);
            opacity: 0;
            transform: translateY(30px);
            animation: slideUp 0.7s ease-out 0.7s forwards;
            will-change: transform;
            min-height: 80px;
        }

        .tagline .typewriter-cursor {
            display: inline-block;
            width: 2px;
            height: 20px;
            background: #0735A4;
            margin-left: 2px;
            vertical-align: text-bottom;
            animation: cursorBlink 0.8s step-end infinite;
        }

        @keyframes cursorBlink {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0;
            }
        }

        /* ===== RIGHT PANEL ===== */
        .right-panel {
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            z-index: 10;
            transform: translateX(-50px);
        }

        /* Login card with glow border */
        .login-card {
            width: 460px;
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 60px 48px;
            box-shadow: 0 25px 60px rgba(9, 63, 180, 0.15), 0 10px 25px rgba(0, 0, 0, 0.08);
            border: 2px solid rgba(9, 63, 180, 0.25);
            position: relative;
            animation: cardSlideIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
            transition: box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
            will-change: transform;
            overflow: hidden;
        }

        /* Glow border that follows mouse */
        .card-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 24px;
            pointer-events: none;
            z-index: 0;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        @media (hover: hover) {
            .login-card:hover .card-glow {
                opacity: 1;
            }

            .login-card:hover {
                box-shadow: 0 35px 80px rgba(0, 0, 0, 0.18), 0 0 50px rgba(7, 53, 164, 0.15);
                border-color: #0735A4;
            }
        }

        @keyframes cardSlideIn {
            0% {
                opacity: 0;
                transform: translateX(40px) scale(0.95) rotateY(-3deg);
            }

            100% {
                opacity: 1;
                transform: translateX(0) scale(1) rotateY(0deg);
            }
        }

        .welcome-section {
            text-align: center;
            margin-bottom: 32px;
            position: relative;
            z-index: 1;
        }

        .welcome-title {
            font-family: 'Montserrat', sans-serif;
            font-size: 28px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 6px;
        }

        .welcome-title span {
            color: var(--primary);
            display: inline-block;
            transition: transform 0.3s ease;
            position: relative;
        }

        .welcome-title span::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--primary);
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 1px;
        }

        .welcome-title:hover span::after {
            transform: scaleX(1);
            transform-origin: left;
        }

        .welcome-title:hover span {
            transform: scale(1.05);
        }

        .welcome-subtitle {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 400;
        }

        .welcome-description {
            font-size: 13px;
            color: var(--text-secondary);
            margin-top: 6px;
            font-weight: 500;
            opacity: 0.85;
        }

        .card-divider {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 14px auto 0;
        }

        .card-divider .divider-dot {
            width: 6px;
            height: 6px;
            background: #0735A4;
            border-radius: 50%;
            animation: dotPulse 2s ease-in-out infinite 0.5s;
        }

        .card-divider .divider-line {
            width: 60px;
            height: 2px;
            background: linear-gradient(to right, #0735A4, #093FB4);
            border-radius: 1px;
            animation: cardLineGrow 1s ease-out 0.8s forwards, cardLineGlow 3s ease-in-out 1.8s infinite;
            transform-origin: center;
            transform: scaleX(0);
        }

        @keyframes cardLineGrow {
            to {
                transform: scaleX(1);
            }
        }

        @keyframes cardLineGlow {

            0%,
            100% {
                opacity: 0.8;
            }

            50% {
                opacity: 1;
            }
        }

        /* ===== INPUT GROUPS ===== */
        .input-group {
            margin-bottom: 28px;
            position: relative;
            z-index: 1;
        }

        .input-label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
            margin-bottom: 8px;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            transition: color 0.3s ease, transform 0.3s ease;
        }

        .input-group:focus-within .input-label {
            color: var(--primary);
            transform: translateX(4px);
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }



        .input-icon {
            position: absolute;
            left: 20px;
            color: var(--text-muted);
            font-size: 18px;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 2;
        }

        .input-wrapper:focus-within .input-icon {
            color: var(--primary);
            transform: scale(1.2) rotate(-8deg);
        }

        .input-field {
            width: 100%;
            height: 60px;
            padding: 0 16px 0 52px;
            background: var(--input-bg);
            border: 1.5px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-family: 'Poppins', sans-serif;
            font-size: 16px;
            outline: none;
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-sm);
            position: relative;
            z-index: 1;
        }

        .input-field::placeholder {
            color: var(--text-muted);
            opacity: 0.7;
            transition: all 0.3s ease;
        }

        .input-field:focus::placeholder {
            opacity: 0.3;
            transform: translateX(6px);
        }

        .input-field:hover {
            border-color: #0735A4;
            background: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(7, 53, 164, 0.08);
        }

        .input-field:focus {
            border-color: var(--primary);
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(7, 53, 164, 0.15), 0 8px 24px rgba(7, 53, 164, 0.12);
            transform: translateY(-2px);
        }

        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        input:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
            -webkit-text-fill-color: var(--text-primary) !important;
            transition: background-color 5000s ease-in-out 0s;
        }

        .toggle-password {
            position: absolute;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 18px;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 2;
            padding: 4px;
        }

        .toggle-password:hover {
            color: var(--primary);
            transform: scale(1.25) rotate(15deg);
        }

        .toggle-password:active {
            transform: scale(0.9) rotate(-5deg);
        }

        /* ===== FORGOT LINK ===== */
        .form-options {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 24px;
            position: relative;
            z-index: 1;
        }

        .forgot-link {
            font-size: 11px;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            letter-spacing: 0.5px;
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
        }

        .forgot-link::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 1.5px;
            background: var(--primary-dark);
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 1px;
        }

        .forgot-link:hover {
            color: var(--primary-dark);
        }

        .forgot-link:hover::after {
            width: 100%;
        }

        /* ===== SIGN IN BUTTON ===== */
        .signin-btn-wrap {
            position: relative;
            z-index: 1;
        }

        .signin-btn {
            width: 100%;
            height: 60px;
            padding: 0;
            background: linear-gradient(135deg, #0735A4 0%, #093FB4 100%);
            border: none;
            border-radius: 12px;
            color: #ffffff;
            font-family: 'Poppins', sans-serif;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 1px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 6px 20px rgba(7, 53, 164, 0.28);
        }

        /* Shimmer */
        .signin-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
            animation: btnShimmer 3.5s ease-in-out infinite;
            z-index: 1;
        }

        @keyframes btnShimmer {

            0%,
            70%,
            100% {
                left: -100%;
            }

            40% {
                left: 100%;
            }
        }

        /* Ripple container */
        .btn-ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.35);
            transform: scale(0);
            animation: rippleEffect 0.6s ease-out forwards;
            pointer-events: none;
            z-index: 2;
        }

        @keyframes rippleEffect {
            to {
                transform: scale(4);
                opacity: 0;
            }
        }

        /* Hover progress bar under button */
        .btn-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            width: 0;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 0 0 12px 12px;
            transition: width 0.6s ease;
            z-index: 2;
        }

        .signin-btn-wrap:hover .btn-progress {
            width: 100%;
        }

        .signin-btn:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 16px 40px rgba(7, 53, 164, 0.38);
        }

        .signin-btn:active {
            transform: translateY(0) scale(0.97);
            box-shadow: 0 4px 12px rgba(7, 53, 164, 0.2);
            transition-duration: 0.1s;
        }

        .signin-btn:active {
            transform: translateY(0) scale(0.97);
            box-shadow: 0 4px 12px rgba(92, 60, 242, 0.2);
            transition-duration: 0.1s;
        }

        .btn-text {
            position: relative;
            z-index: 3;
        }

        /* ===== FOOTER ===== */
        .footer {
            position: absolute;
            bottom: 45px;
            left: 100px;
            z-index: 20;
            opacity: 0;
            animation: footerSlideUp 0.7s ease-out 1s forwards;
        }

        @keyframes footerSlideUp {
            0% {
                opacity: 0;
                transform: translateY(15px);
            }

            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .footer-links {
            display: flex;
            gap: 32px;
            align-items: center;
            opacity: 1;
            transition: opacity 0.3s ease;
        }

        .footer-links:hover {
            opacity: 1;
        }

        .footer-link-actual {
            font-size: 13.5px;
            color: #334155;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.35s ease;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(255, 255, 255, 0.85);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            position: relative;
        }

        .footer-link-actual::before {
            content: '';
            position: absolute;
            bottom: -3px;
            left: 50%;
            width: 0;
            height: 2px;
            background: #093FB4;
            transition: all 0.35s ease;
            transform: translateX(-50%);
            border-radius: 1px;
        }

        .footer-link-actual:hover {
            color: #093FB4;
            transform: translateY(-2px);
            text-shadow: 0 1px 4px rgba(255, 255, 255, 1);
        }

        .footer-link-actual:hover::before {
            width: 100%;
        }

        .footer-link-actual i {
            color: #093FB4;
            margin-right: 2px;
            font-size: 13px;
            transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .footer-link-actual:hover i {
            transform: scale(1.25) rotate(8deg);
        }

        .footer-divider-actual {
            color: rgba(51, 65, 85, 0.35);
            font-size: 13px;
            font-weight: 600;
        }

        /* ===== TOAST ===== */
        .toast {
            position: fixed;
            top: 30px;
            right: 30px;
            padding: 14px 24px;
            background: #ffffff;
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 13px;
            z-index: 9999;
            box-shadow: var(--shadow-xl);
            transform: translateX(120%) scale(0.8);
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .toast.show {
            transform: translateX(0) scale(1);
        }

        .toast.error {
            border-left: 4px solid #ef4444;
        }

        .toast.error i {
            color: #ef4444;
        }

        .toast.success {
            border-left: 4px solid #10b981;
        }

        .toast.success i {
            color: #10b981;
        }

        /* Spinner */
        .spinner {
            display: none;
            width: 18px;
            height: 18px;
            border: 2px solid transparent;
            border-top: 2px solid #ffffff;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            position: relative;
            z-index: 3;
        }

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

        /* Premium Targeted Error Shake */
        @keyframes targetedInputShake {

            0%,
            100% {
                transform: translateX(0);
            }

            15% {
                transform: translateX(-8px);
            }

            30% {
                transform: translateX(8px);
            }

            45% {
                transform: translateX(-6px);
            }

            60% {
                transform: translateX(6px);
            }

            75% {
                transform: translateX(-4px);
            }

            85% {
                transform: translateX(2px);
            }
        }

        .input-error-shake .input-field {
            animation: targetedInputShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
            border-color: #ef4444 !important;
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
            background: #fffafa !important;
        }

        .input-error-shake .input-icon {
            color: #ef4444 !important;
            animation: iconVibrate 0.4s ease-in-out 2;
        }

        @keyframes iconVibrate {

            0%,
            100% {
                transform: scale(1.2) rotate(-8deg) translateX(0);
            }

            25% {
                transform: scale(1.2) rotate(-8deg) translateX(-2px);
            }

            75% {
                transform: scale(1.2) rotate(-8deg) translateX(2px);
            }
        }

        .inline-error-text {
            color: #ef4444;
            font-size: 11.5px;
            font-weight: 600;
            margin-top: 8px;
            margin-left: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
            opacity: 0;
            transform: translateY(-4px);
            animation: errorTextFadeIn 0.4s ease 0.1s forwards;
        }

        @keyframes errorTextFadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .no-entrance-anim {
            animation: none !important;
            opacity: 1 !important;
            transform: none !important;
        }

        /* ===== BACK BUTTON ===== */
        .back-btn {
            position: absolute;
            top: 40px;
            left: 40px;
            z-index: 50;
            display: flex;
            align-items: center;
            gap: 6px;
            text-decoration: none;
            color: var(--text-primary);
            font-weight: 500;
            font-size: 11px;
            padding: 6px 12px;
            background: rgba(255, 255, 255, 0.35);
            border-radius: 40px;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
            transition: all 0.3s ease;
        }

        .back-btn:hover {
            background: rgba(255, 255, 255, 0.65);
            transform: translateX(-4px);
            box-shadow: 0 6px 16px rgba(92, 60, 242, 0.1);
            color: var(--primary);
        }

        /* ===== RESPONSIVE ===== */
        @media (min-width: 1441px) and (max-width: 1600px) {
            .app-frame {
                padding: 35px 70px;
                background-position: center 54%;
            }

            .main-container {
                gap: 70px;
                width: 94%;
            }

            .left-panel {
                transform: translateY(-45px);
            }

            .system-title {
                font-size: 68px;
            }

            .login-card {
                width: 420px;
                padding: 48px 38px;
            }

            .tagline {
                max-width: 440px;
                font-size: 16px;
            }
        }

        /* Standard Laptops (1366px - 1440px, or heights <= 850px) */
        @media (max-width: 1440px),
        (max-height: 850px) {
            .app-frame {
                padding: 28px 50px;
                background-position: center 58%;
            }

            .main-container {
                gap: 50px;
                width: 94%;
                transform: translateY(-20px);
            }

            .left-panel {
                transform: translateY(-55px);
            }

            .system-title {
                font-size: 52px;
                letter-spacing: -1px;
                margin-bottom: 4px;
            }

            .system-subtitle {
                font-size: 14px;
                letter-spacing: 1.5px;
                margin-bottom: 8px;
            }

            .custom-divider {
                margin: 12px 0 14px 0;
            }

            .divider-line {
                width: 65px;
                height: 2.5px;
            }

            .tagline {
                font-size: 14px;
                line-height: 1.48;
                max-width: 400px;
                min-height: 52px;
            }

            .login-card {
                width: 385px;
                padding: 38px 32px;
            }

            .welcome-title {
                font-size: 25px;
            }

            .input-field,
            .signin-btn {
                height: 50px;
            }

            .footer {
                bottom: 22px;
                left: 60px;
            }

            .footer-link-actual {
                font-size: 12px;
            }
        }

        /* Compact Laptops (1280px - 1366px, or heights <= 760px) */
        @media (max-width: 1366px),
        (max-height: 760px) {
            .app-frame {
                padding: 20px 40px;
                background-position: center 62%;
            }

            .main-container {
                gap: 36px;
                width: 95%;
                transform: translateY(-15px);
            }

            .left-panel {
                transform: translateY(-60px);
            }

            .system-title {
                font-size: 44px;
                margin-bottom: 2px;
            }

            .system-subtitle {
                font-size: 13px;
                letter-spacing: 1.2px;
                margin-bottom: 6px;
            }

            .custom-divider {
                margin: 10px 0 12px 0;
            }

            .divider-line {
                width: 55px;
                height: 2.5px;
            }

            .tagline {
                font-size: 13px;
                line-height: 1.42;
                max-width: 360px;
                min-height: 44px;
            }

            .login-card {
                width: 360px;
                padding: 32px 26px;
            }

            .welcome-title {
                font-size: 23px;
            }

            .welcome-subtitle {
                font-size: 12.5px;
            }

            .welcome-description {
                font-size: 11.5px;
            }

            .input-field,
            .signin-btn {
                height: 46px;
                font-size: 14px;
            }

            .input-group {
                margin-bottom: 12px;
            }

            .footer {
                bottom: 15px;
                left: 40px;
            }
        }

        /* Short Screen Viewports (Heights <= 660px, e.g. laptop with browser address bar & tabs) */
        @media (max-height: 660px) {
            .app-frame {
                padding: 15px 30px;
                background-position: center 66%;
            }

            .left-panel {
                transform: translateY(-68px);
            }

            .system-title {
                font-size: 38px;
            }

            .system-subtitle {
                font-size: 12px;
                margin-bottom: 4px;
            }

            .custom-divider {
                margin: 6px 0 8px 0;
            }

            .tagline {
                font-size: 12px;
                line-height: 1.38;
                max-width: 330px;
                min-height: 36px;
            }

            .login-card {
                padding: 24px 22px;
            }

            .footer {
                bottom: 8px;
            }
        }

        @media (max-width: 992px) {
            .back-btn {
                top: 20px;
                left: 20px;
                padding: 6px 12px;
                font-size: 11px;
                gap: 6px;
            }

            .app-frame {
                padding: 40px 24px;
                min-height: 100vh;
                justify-content: flex-start;
                /* Start from top on mobile */
            }

            .app-frame::before {
                background-attachment: scroll;
                background-position: center 25%;
                /* Shift illustration upwards */
                background-size: cover;
                transform: scale(1);
                /* Remove the aggressive zoom on mobile */
            }

            .main-container {
                display: flex;
                flex-direction: column;
                gap: 40px;
                /* Stack closely together */
                align-items: center;
                transform: translateY(0);
                /* Reset shift on mobile */
                margin-top: 20px;
            }

            .left-panel {
                width: 100%;
                align-items: center;
                text-align: center;
                transform: translateY(0);
                /* Reset the upward shift on mobile */
            }

            .system-title {
                font-size: 56px;
                margin-bottom: 8px;
            }

            /* Show subtitle, divider, and tagline on mobile to match desktop */
            .system-subtitle {
                font-size: 14px;
                margin-bottom: 12px;
            }

            .custom-divider {
                margin: 0 auto 16px;
                /* Center it */
            }

            .tagline {
                display: none;
            }

            .right-panel {
                width: 100%;
                justify-content: center;
                transform: translateX(0);
                /* Fix the card clipping on the left */
            }

            .footer {
                position: relative;
                bottom: 0;
                left: 0;
                padding-top: 40px;
                display: flex;
                justify-content: center;
                margin: 0 auto;
            }

            .footer-links {
                justify-content: center;
            }
        }

        @media (max-width: 576px) {
            .app-frame {
                padding: 30px 16px;
            }

            .app-frame::before {
                background-position: center 25%;
                /* Adjust focal point for narrow mobile screens */
            }

            .login-card {
                padding: 30px 20px;
                /* Reduced padding on small mobile screens */
                width: 100%;
                max-width: 460px;
            }

            .welcome-section {
                margin-bottom: 24px;
                /* Reduced gap under welcome header on mobile */
            }

            .system-title {
                font-size: 48px;
            }

            .footer-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 16px;
            }

            .footer-divider-actual {
                display: none;
            }
        }

        .input-field:focus-visible,
        .signin-btn:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }
