/* ROOT */
        :root {
            --navy-950: #050c1a;
            --navy-900: #0a1628;
            --navy-800: #0f2040;
            --navy-700: #162d58;
            --indigo: #3d6bde;
            --indigo-light: #5b84f0;
            --emerald: #10c97a;
            --slate: #94a3b8;
            --slate-dim: #64748b;
            --glass: rgba(15, 32, 64, 0.65);
            --glass-border: rgba(93, 132, 240, 0.2);
            --danger-bg: rgba(244, 63, 94, 0.08);
            --danger-border: rgba(244, 63, 94, 0.2);
            --danger-text: #fda4af;
            --warning-bg: rgba(245, 158, 11, 0.1);
            --warning-border: rgba(245, 158, 11, 0.24);
            --warning-text: #fbbf24;
            --info-bg: rgba(16, 201, 122, 0.08);
            --info-border: rgba(16, 201, 122, 0.22);
            --info-text: #86efac;
            --white-04: rgba(255, 255, 255, 0.04);
            --white-06: rgba(255, 255, 255, 0.06);
            --white-07: rgba(255, 255, 255, 0.07);
            --white-08: rgba(255, 255, 255, 0.08);
            --white-10: rgba(255, 255, 255, 0.1);
            --white-12: rgba(255, 255, 255, 0.12);
            --white-14: rgba(255, 255, 255, 0.14);
            --white-18: rgba(255, 255, 255, 0.18);
            --white-72: rgba(255, 255, 255, 0.72);
            --text-primary: #f8fbff;
            --text-secondary: var(--slate);
            --text-tertiary: var(--slate-dim);
            --radius-xl: 20px;
            --radius-lg: 18px;
            --radius-md: 12px;
            --radius-sm: 10px;
            --shadow-card: 0 24px 80px rgba(2, 6, 23, 0.46), 0 10px 34px rgba(61, 107, 222, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
            --shadow-button: 0 4px 24px rgba(61, 107, 222, 0.35), 0 0 0 1px rgba(93, 132, 240, 0.3);
            --transition-spring: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            --font-ui: 'DM Sans', sans-serif;
            --font-mono: 'DM Mono', monospace;
        }

        /* BASE */
        * {
            box-sizing: border-box;
        }

        html {
            color-scheme: dark;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: var(--font-ui);
            color: var(--text-primary);
            background:
                radial-gradient(circle at top left, rgba(61, 107, 222, 0.14), transparent 28%),
                radial-gradient(circle at 85% 75%, rgba(16, 201, 122, 0.08), transparent 26%),
                linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(91, 132, 240, 0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(91, 132, 240, 0.04) 1px, transparent 1px);
            background-size: 48px 48px;
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
            animation: grid-drift 22s linear infinite;
            pointer-events: none;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            inset: 0;
            background: radial-gradient(circle at center, transparent 0%, rgba(5, 12, 26, 0.16) 58%, rgba(5, 12, 26, 0.6) 100%);
            pointer-events: none;
            z-index: 0;
        }

        a {
            color: inherit;
        }

        button,
        input {
            font: inherit;
        }

        /* BACKGROUND */
        .page-orb {
            position: fixed;
            border-radius: 999px;
            filter: blur(90px);
            pointer-events: none;
            z-index: 0;
            animation: orb-float 12s ease-in-out infinite;
        }

        .page-orb-1 {
            width: 320px;
            height: 320px;
            top: -64px;
            left: -32px;
            background: rgba(61, 107, 222, 0.22);
        }

        .page-orb-2 {
            width: 300px;
            height: 300px;
            right: -72px;
            bottom: 24px;
            background: rgba(16, 201, 122, 0.14);
            animation-delay: -4s;
        }

        .page-orb-3 {
            width: 240px;
            height: 240px;
            top: 34%;
            right: 18%;
            background: rgba(61, 107, 222, 0.1);
            animation-delay: -7s;
        }

        /* LAYOUT */
        .page-shell {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 24px 84px;
        }

        .login-layout {
            width: min(100%, 1100px);
            display: grid;
            grid-template-columns: 1fr 480px;
            gap: 40px;
            align-items: center;
        }

        .value-panel {
            animation: fade-slide-left 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .login-panel {
            position: relative;
            overflow: hidden;
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-xl);
            background: var(--glass);
            backdrop-filter: blur(24px);
            box-shadow: var(--shadow-card);
            animation: fade-slide-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
        }

        .login-panel::before {
            content: '';
            position: absolute;
            inset: 0 auto auto 0;
            width: 100%;
            height: 1px;
            background: linear-gradient(90deg, var(--indigo-light), var(--emerald), transparent 78%);
            opacity: 0.9;
        }

        .brand-lockup {
            display: inline-flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 28px;
            text-decoration: none;
        }

        .brand-mark {
            width: 52px;
            height: 52px;
            border-radius: 16px;
            display: grid;
            place-items: center;
            background: linear-gradient(135deg, var(--indigo), var(--emerald));
            color: var(--text-primary);
            font-family: var(--font-mono);
            font-size: 0.92rem;
            font-weight: 500;
            letter-spacing: 0.08em;
            box-shadow: 0 12px 28px rgba(61, 107, 222, 0.28);
        }

        .brand-copy {
            display: grid;
            gap: 4px;
        }

        .brand-copy strong {
            font-size: 1rem;
            font-weight: 500;
            letter-spacing: 0.02em;
        }

        .brand-copy span {
            color: var(--text-tertiary);
            font-size: 0.9rem;
        }

        .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 18px;
            color: var(--indigo-light);
            font-family: var(--font-mono);
            font-size: 0.8rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .eyebrow::before {
            content: '';
            width: 34px;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--indigo-light));
        }

        .headline {
            margin: 0;
            max-width: 11ch;
            font-size: clamp(2.35rem, 4vw, 2.75rem);
            line-height: 1.02;
            font-weight: 300;
            letter-spacing: -0.04em;
        }

        .headline-accent {
            display: inline-block;
            background: linear-gradient(135deg, var(--indigo-light), var(--emerald));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .headline-subtitle {
            margin: 18px 0 0;
            max-width: 400px;
            color: var(--text-secondary);
            font-size: 0.9375rem;
            line-height: 1.75;
        }

        .trust-grid {
            display: grid;
            gap: 14px;
            margin-top: 34px;
        }

        .trust-badge {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 15px 16px;
            border: 1px solid var(--white-08);
            border-radius: 14px;
            background: linear-gradient(180deg, rgba(15, 32, 64, 0.34), rgba(10, 22, 40, 0.28));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
            animation: fade-slide-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .trust-badge:nth-child(1) {
            animation-delay: 0.2s;
        }

        .trust-badge:nth-child(2) {
            animation-delay: 0.3s;
        }

        .trust-badge:nth-child(3) {
            animation-delay: 0.4s;
        }

        .trust-dot {
            width: 12px;
            height: 12px;
            border-radius: 999px;
            background: var(--emerald);
            box-shadow: 0 0 0 0 rgba(16, 201, 122, 0.45);
            animation: pulse 2.4s infinite;
            flex-shrink: 0;
        }

        .trust-badge span {
            color: var(--white-72);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        /* STATUS BAR */
        .status-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin: 20px 20px 0;
            padding: 12px 14px;
            border: 1px solid rgba(16, 201, 122, 0.2);
            border-radius: 14px;
            background: rgba(16, 201, 122, 0.12);
        }

        .status-copy {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            color: #b9f8d8;
            font-size: 0.84rem;
            font-weight: 500;
        }

        .status-pulse {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: var(--emerald);
            box-shadow: 0 0 0 0 rgba(16, 201, 122, 0.45);
            animation: pulse 2.1s infinite;
            flex-shrink: 0;
        }

        .status-version {
            flex-shrink: 0;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(5, 12, 26, 0.34);
            color: var(--text-secondary);
            font-family: var(--font-mono);
            font-size: 0.72rem;
            letter-spacing: 0.04em;
        }

        .card-body {
            padding: 24px 20px 22px;
        }

        .card-header h1 {
            margin: 0;
            font-size: 1.85rem;
            font-weight: 400;
            letter-spacing: -0.03em;
        }

        .card-header p {
            margin: 10px 0 0;
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.65;
        }

        /* TABS */
        .tabs-container {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
            margin-top: 24px;
            padding: 4px;
            border-radius: 10px;
            background: rgba(5, 12, 26, 0.5);
            border: 1px solid var(--white-06);
        }

        .tab-btn {
            border: 0;
            border-radius: 8px;
            padding: 11px 14px;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: background var(--transition-spring), color var(--transition-spring), box-shadow var(--transition-spring), transform var(--transition-spring);
        }

        .tab-btn:hover {
            color: var(--text-primary);
        }

        .tab-btn.active {
            background: var(--navy-700);
            color: var(--text-primary);
            box-shadow: 0 10px 24px rgba(61, 107, 222, 0.24);
        }

        /* FORM */
        .login-form {
            margin-top: 22px;
        }

        .field-group {
            display: grid;
            gap: 8px;
            margin-bottom: 16px;
        }

        .field-label {
            color: var(--text-primary);
            font-size: 0.92rem;
            font-weight: 500;
        }

        .input-shell {
            position: relative;
        }

        .input-icon {
            position: absolute;
            top: 50%;
            left: 14px;
            width: 18px;
            height: 18px;
            color: var(--text-tertiary);
            transform: translateY(-50%);
            pointer-events: none;
        }

        .input-neon {
            width: 100%;
            height: 48px;
            padding: 0 14px 0 40px;
            border: 1px solid var(--white-08);
            border-radius: 10px;
            background: rgba(5, 12, 26, 0.6);
            color: var(--text-primary);
            outline: none;
            transition: background var(--transition-spring), border-color var(--transition-spring), box-shadow var(--transition-spring);
        }

        .input-neon::placeholder {
            color: var(--text-tertiary);
        }

        .input-neon:hover {
            background: rgba(5, 12, 26, 0.7);
            border-color: var(--white-14);
        }

        .input-neon:focus {
            border-color: var(--indigo-light);
            box-shadow: 0 0 0 3px rgba(61, 107, 222, 0.12);
        }

        .input-neon.has-error {
            border-color: var(--danger-border);
            box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.08);
        }

        .password-input {
            padding-right: 44px;
        }

        .toggle-password {
            position: absolute;
            top: 50%;
            right: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-tertiary);
            cursor: pointer;
            transform: translateY(-50%);
            transition: color var(--transition-spring), transform var(--transition-spring);
        }

        .toggle-password:hover {
            color: var(--text-secondary);
        }

        .toggle-password:active {
            transform: translateY(-50%) scale(0.96);
        }

        .helper-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin: 12px 0 18px;
        }

        .remember-wrap {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: var(--text-secondary);
            font-size: 0.88rem;
        }

        .remember-wrap input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .remember-indicator {
            position: relative;
            width: 18px;
            height: 18px;
            border: 1px solid var(--white-12);
            border-radius: 5px;
            background: rgba(5, 12, 26, 0.7);
            transition: border-color var(--transition-spring), background var(--transition-spring), box-shadow var(--transition-spring);
            flex-shrink: 0;
        }

        .remember-indicator::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 5px;
            width: 4px;
            height: 8px;
            border-right: 2px solid transparent;
            border-bottom: 2px solid transparent;
            transform: rotate(45deg);
            transition: border-color var(--transition-spring);
        }

        #rememberSession:checked + .remember-indicator {
            border-color: rgba(93, 132, 240, 0.4);
            background: rgba(61, 107, 222, 0.18);
            box-shadow: 0 0 0 3px rgba(61, 107, 222, 0.08);
        }

        #rememberSession:checked + .remember-indicator::after {
            border-right-color: var(--indigo-light);
            border-bottom-color: var(--indigo-light);
        }

        .inline-link {
            color: var(--indigo-light);
            font-size: 0.88rem;
            font-weight: 500;
            text-decoration: none;
            transition: color var(--transition-spring);
        }

        .inline-link:hover {
            color: var(--emerald);
        }

        .error-msg {
            display: none;
            align-items: flex-start;
            gap: 10px;
            margin: 0 0 16px;
            padding: 12px 14px;
            border-radius: 8px;
            border: 1px solid var(--danger-border);
            background: var(--danger-bg);
            color: var(--danger-text);
        }

        .error-msg.is-visible {
            display: flex;
            animation: error-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .error-msg[data-tone="warning"] {
            border-color: var(--warning-border);
            background: var(--warning-bg);
            color: var(--warning-text);
        }

        .error-msg[data-tone="info"] {
            border-color: var(--info-border);
            background: var(--info-bg);
            color: var(--info-text);
        }

        .error-msg svg {
            flex-shrink: 0;
            width: 18px;
            height: 18px;
            margin-top: 1px;
        }

        .submit-btn {
            position: relative;
            width: 100%;
            height: 50px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            border: 0;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--indigo), #2a52c8);
            color: var(--text-primary);
            overflow: hidden;
            cursor: pointer;
            box-shadow: var(--shadow-button);
            transition: transform var(--transition-spring), box-shadow var(--transition-spring), opacity var(--transition-spring);
        }

        .submit-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.14) 42%, transparent 64%);
            transform: translateX(-135%);
            transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .submit-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 28px rgba(61, 107, 222, 0.42), 0 0 0 1px rgba(93, 132, 240, 0.34);
        }

        .submit-btn:hover::before {
            transform: translateX(135%);
        }

        .submit-btn:active {
            transform: translateY(0);
        }

        .submit-btn:disabled {
            cursor: not-allowed;
            opacity: 0.82;
            transform: none;
        }

        .spinner {
            width: 18px;
            height: 18px;
            animation: spin 0.9s linear infinite;
        }

        .divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 22px 0 18px;
            color: var(--text-tertiary);
            font-size: 0.82rem;
        }

        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: rgba(255, 255, 255, 0.07);
        }

        .sso-button {
            width: 100%;
            height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            border: 1px solid var(--white-10);
            border-radius: 12px;
            background: transparent;
            color: var(--text-primary);
            cursor: pointer;
            transition: border-color var(--transition-spring), background var(--transition-spring), transform var(--transition-spring);
        }

        .sso-button:hover {
            border-color: var(--white-18);
            background: rgba(255, 255, 255, 0.04);
            transform: translateY(-1px);
        }

        .sso-button:active {
            transform: translateY(0);
        }

        .card-footer {
            display: grid;
            gap: 8px;
            margin-top: 18px;
            text-align: center;
        }

        .card-footer p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.89rem;
        }

        .card-footer a {
            color: var(--indigo-light);
            font-weight: 500;
            text-decoration: none;
            transition: color var(--transition-spring);
        }

        .card-footer a:hover {
            color: var(--emerald);
        }

        /* MODAL */
        .modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 20;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(5, 12, 26, 0.85);
            backdrop-filter: blur(4px);
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal-card {
            position: relative;
            width: min(100%, 460px);
            padding: 24px;
            border: 1px solid var(--glass-border);
            border-radius: 18px;
            background: rgba(15, 32, 64, 0.92);
            box-shadow: var(--shadow-card);
            animation: fade-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .modal-close {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-secondary);
            cursor: pointer;
            transition: background var(--transition-spring), color var(--transition-spring), transform var(--transition-spring);
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
        }

        .modal-close:active {
            transform: scale(0.96);
        }

        .modal-header {
            margin-bottom: 18px;
            padding-right: 28px;
        }

        .modal-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--indigo-light);
            font-family: var(--font-mono);
            font-size: 0.75rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .modal-title {
            margin: 12px 0 8px;
            font-size: 1.5rem;
            font-weight: 400;
            letter-spacing: -0.03em;
        }

        .modal-description {
            margin: 0;
            color: var(--text-secondary);
            line-height: 1.65;
            font-size: 0.94rem;
        }

        .modal-helper {
            margin: 10px 0 0;
            color: var(--text-tertiary);
            font-size: 0.82rem;
            line-height: 1.55;
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 22px;
        }

        .modal-btn {
            min-width: 116px;
            height: 44px;
            padding: 0 16px;
            border-radius: 12px;
            border: 1px solid var(--white-10);
            background: transparent;
            color: var(--text-primary);
            cursor: pointer;
            transition: background var(--transition-spring), border-color var(--transition-spring), transform var(--transition-spring);
        }

        .modal-btn:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: var(--white-18);
            transform: translateY(-1px);
        }

        .modal-btn:active {
            transform: translateY(0);
        }

        .modal-btn-primary {
            border-color: transparent;
            background: linear-gradient(135deg, var(--indigo), #2a52c8);
            box-shadow: 0 10px 28px rgba(61, 107, 222, 0.26);
        }

        .modal-success {
            text-align: center;
        }

        .modal-success-icon {
            width: 72px;
            height: 72px;
            margin: 0 auto 18px;
            display: grid;
            place-items: center;
            border-radius: 999px;
            background: rgba(16, 201, 122, 0.14);
            color: var(--emerald);
            animation: scale-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* FOOTER */
        .page-footer {
            position: fixed;
            left: 50%;
            bottom: 18px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: rgba(100, 116, 139, 0.5);
            font-size: 11px;
            transform: translateX(-50%);
            z-index: 1;
        }

        .page-footer a {
            color: rgba(100, 116, 139, 0.5);
            text-decoration: none;
            transition: color var(--transition-spring);
        }

        .page-footer a:hover {
            color: var(--slate);
        }

        /* UTIL */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* ANIMATIONS */
        @keyframes fade-slide-up {
            from { opacity: 0; transform: translateY(28px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fade-slide-left {
            from { opacity: 0; transform: translateX(-24px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes error-in {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes grid-drift {
            from { transform: translateY(0); }
            to { transform: translateY(48px); }
        }

        @keyframes orb-float {
            0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
            50% { transform: translate3d(0, -14px, 0) scale(1.04); }
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(16, 201, 122, 0.42); }
            70% { box-shadow: 0 0 0 10px rgba(16, 201, 122, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 201, 122, 0); }
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes scale-in {
            from { opacity: 0; transform: scale(0.88); }
            to { opacity: 1; transform: scale(1); }
        }

        /* RESPONSIVE */
        @media (max-width: 860px) {
            .page-shell {
                padding-bottom: 32px;
            }

            .login-layout {
                max-width: 480px;
                grid-template-columns: 1fr;
            }

            .value-panel {
                display: none;
            }

            .login-panel {
                border-radius: 16px;
            }

            .page-footer {
                display: none;
            }
        }

        @media (max-width: 520px) {
            .page-shell {
                padding-inline: 14px;
            }

            .status-bar,
            .card-body,
            .modal-card {
                padding-inline: 16px;
            }

            .status-bar {
                margin-inline: 16px;
                flex-wrap: wrap;
            }

            .helper-row,
            .modal-actions {
                flex-direction: column;
                align-items: stretch;
            }

            .modal-btn {
                width: 100%;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation: none !important;
                transition: none !important;
                scroll-behavior: auto !important;
            }
        }
