/**
 * Souls Auth: Login Portal Stylesheet (auth.css)
 * Deep Space Theme • Glassmorphism Form • Dual Neon Borders
 */

        .fa, .fas, .fa-solid {
            font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif !important;
            font-weight: 900 !important;
        }
        .far, .fa-regular {
            font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif !important;
            font-weight: 400 !important;
        }
        .fab, .fa-brands {
            font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif !important;
            font-weight: 400 !important;
        }
        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --accent: #0ea5e9;
            --bg-dark: #080c14;
            --card-bg: rgba(15, 23, 42, 0.78);
            --border-glass: rgba(255, 255, 255, 0.1);
            --border-glass-hover: rgba(99, 102, 241, 0.4);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --radius-card: 24px;
            --radius-input: 12px;
            --font-mono: 'JetBrains Mono', monospace;
        }

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

        html {
            font-size: 16px;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            width: 100%;
            height: 100vh;
            height: 100dvh;
            background-color: var(--bg-dark);
            background-image: 
                radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.18) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.15) 0px, transparent 50%);
            color: var(--text-main);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
            font-size: 1rem;
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            overflow-x: hidden;
            overflow-y: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
        }

        /* ─── Ambient Glow & Grid ─── */
        .ambient-bg {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }
        .ambient-grid {
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
            background-size: 40px 40px;
            mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
            -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
        }

        /* ─── Layout Wrapper ─── */
        .auth-wrapper {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 500px;
            transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            margin: auto;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 20px);
            max-height: calc(100dvh - 20px);
        }
        .auth-wrapper.wide {
            max-width: 700px;
        }

        /* ─── Brand Header (Compact & High Impact) ─── */
        .brand-header {
            text-align: center;
            margin-bottom: 10px;
            flex-shrink: 0;
        }
        .brand-logo-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 2px;
        }
        .brand-logo-pill img {
            width: 32px;
            height: 32px;
            filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.45));
            transition: transform 0.3s ease;
        }
        .brand-logo-pill:hover img {
            transform: scale(1.08) rotate(4deg);
        }
        .brand-title {
            font-size: 1.55rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            margin: 0;
            display: inline-flex;
            align-items: center;
            line-height: 1.25;
        }
        .brand-title .brand-souls {
            color: #00f3ff;
            text-shadow: 0 0 16px rgba(0, 243, 255, 0.45);
        }
        .brand-title .brand-infotech {
            color: #d80828;
            text-shadow: 0 0 16px rgba(216, 8, 40, 0.45);
        }
        .brand-subtitle {
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-top: 3px;
            line-height: 1.35;
            letter-spacing: 0.015em;
        }

        /* ─── Main Glassmorphic Card with Dual Traveling Neon Borders ─── */
        .main-card {
            position: relative;
            background: var(--card-bg);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: var(--radius-card);
            padding: 18px 24px;
            box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow: visible;
            min-height: 0;
            flex: 1 1 auto;
        }

        /* Dual Traveling Neon Chasing Borders Keyframes (Cyan: Souls & Red: InfoTech) */
        @keyframes neonChaseCyan {
            0% {
                stroke-dashoffset: 0;
            }
            100% {
                stroke-dashoffset: -1000;
            }
        }

        @keyframes neonChaseRed {
            0% {
                stroke-dashoffset: -500;
            }
            100% {
                stroke-dashoffset: -1500;
            }
        }

        .animate-neon-chase-cyan {
            stroke-dasharray: 180 820;
            animation: neonChaseCyan 7s linear infinite;
            will-change: stroke-dashoffset;
        }

        .animate-neon-chase-red {
            stroke-dasharray: 180 820;
            animation: neonChaseRed 7s linear infinite;
            will-change: stroke-dashoffset;
        }

        .card-neon-chase-svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            overflow: visible;
        }

        /* Ensure card interactive elements sit crisp on top of neon path */
        .card-top-actions, .tab-switcher, .card-body-scroll, .in-card-help {
            position: relative;
            z-index: 1;
        }


        /* ─── Card Scrollable Body (Self-Contained Scrolling) ─── */
        .card-body-scroll {
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 4px;
            margin-right: -4px;
            scrollbar-width: thin;
            scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
        }
        .card-body-scroll::-webkit-scrollbar {
            width: 5px;
        }
        .card-body-scroll::-webkit-scrollbar-track {
            background: transparent;
        }
        .card-body-scroll::-webkit-scrollbar-thumb {
            background: rgba(99, 102, 241, 0.35);
            border-radius: 4px;
        }
        .card-body-scroll::-webkit-scrollbar-thumb:hover {
            background: rgba(99, 102, 241, 0.65);
        }

        /* ─── Tab Switcher (Inside Card) ─── */
        .tab-switcher {
            display: flex;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 4px;
            margin-bottom: 12px;
            gap: 6px;
            flex-shrink: 0;
        }
        .tab-btn {
            flex: 1;
            padding: 10px 14px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.88rem;
            font-weight: 700;
            border-radius: 9px;
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            font-family: inherit;
        }
        .tab-btn:hover {
            color: #fff;
        }
        .tab-btn.active {
            background: var(--primary);
            color: #fff;
            box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
        }

        /* ─── Form Controls ─── */
        .form-group {
            margin-bottom: 12px;
        }
        .form-label {
            display: block;
            color: var(--text-main);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 6px;
            letter-spacing: 0.01em;
        }
        .form-label i {
            color: var(--primary);
            margin-right: 5px;
            font-size: 0.88rem;
        }
        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            width: 100%;
        }
        .input-wrapper .input-icon {
            position: absolute;
            left: 14px;
            color: #64748b;
            font-size: 0.92rem;
            pointer-events: none;
            transition: color 0.2s ease;
        }
        .form-input {
            width: 100%;
            height: 44px;
            padding: 0 42px 0 42px;
            background: rgba(0, 0, 0, 0.28);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-input);
            color: #fff;
            font-size: 0.92rem;
            font-family: inherit;
            outline: none;
            transition: all 0.25s;
        }
        .form-input.no-icon {
            padding: 0 14px;
        }
        .form-input:focus {
            border-color: var(--primary);
            background: rgba(0, 0, 0, 0.45);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
        }
        .form-input:focus ~ .input-icon {
            color: var(--primary);
        }
        .form-input::placeholder {
            color: rgba(148, 163, 184, 0.6);
            font-size: 0.9rem;
        }
        .input-hint {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 5px;
            display: block;
            line-height: 1.4;
        }

        /* ─── Animated Required Field Error Styling ─── */
        @keyframes fieldShake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-6px); }
            40%, 80% { transform: translateX(6px); }
        }
        .form-input.field-error {
            border-color: #ef4444 !important;
            background: rgba(239, 68, 68, 0.08) !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
            animation: fieldShake 0.4s ease;
        }
        .form-group.has-error .form-label {
            color: #f87171 !important;
        }
        .form-group.has-error .input-icon {
            color: #ef4444 !important;
        }

        /* ─── Auto Generate Password Button ─── */
        .btn-auto-pwd {
            background: rgba(99, 102, 241, 0.15);
            border: 1px solid rgba(99, 102, 241, 0.35);
            color: #a5b4fc;
            font-size: 0.82rem;
            font-weight: 600;
            padding: 4px 11px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .btn-auto-pwd:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
            transform: translateY(-1px);
        }
        .btn-auto-pwd:active {
            transform: translateY(0);
        }
        .btn-auto-pwd.copied {
            background: rgba(16, 185, 129, 0.2) !important;
            border-color: rgba(16, 185, 129, 0.45) !important;
            color: #34d399 !important;
        }


        /* ─── Password Eye Button ─── */
        .btn-toggle-pwd {
            position: absolute;
            right: 8px;
            width: 34px;
            height: 34px;
            background: transparent;
            border: none;
            color: #64748b;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.92rem;
            transition: all 0.2s;
        }
        .btn-toggle-pwd:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.08);
        }

        /* ─── Password Strength Meter & Live Checklist ─── */
        .pwd-strength-container {
            margin-top: 10px;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 10px 14px;
        }
        .pwd-strength-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.82rem;
            margin-bottom: 7px;
        }
        .pwd-strength-label {
            color: #94a3b8;
            font-weight: 600;
        }
        .pwd-strength-score {
            font-weight: 700;
            font-family: var(--font-mono);
            letter-spacing: 0.03em;
            color: #94a3b8;
        }
        .pwd-strength-meter {
            display: flex;
            gap: 5px;
            height: 4px;
            margin-bottom: 10px;
        }
        .pwd-meter-segment {
            flex: 1;
            height: 100%;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.1);
            transition: all 0.25s ease;
        }
        .pwd-criteria-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .pwd-criteria-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.78rem;
            color: #64748b;
            padding: 4px 9px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            transition: all 0.2s ease;
        }
        .pwd-criteria-item i {
            font-size: 0.74rem;
        }
        .pwd-criteria-item.met {
            color: #34d399;
            background: rgba(16, 185, 129, 0.12);
            border-color: rgba(16, 185, 129, 0.35);
            font-weight: 600;
        }

        /* ─── Checkbox Row ─── */
        .remember-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 22px;
            font-size: 0.88rem;
            color: var(--text-muted);
            user-select: none;
        }
        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        .checkbox-label input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* ─── Submit Button ─── */
        .btn-submit {
            width: 100%;
            height: 50px;
            background: linear-gradient(135deg, var(--primary), #8b5cf6);
            border: none;
            border-radius: var(--radius-input);
            color: #fff;
            font-size: 0.98rem;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
        }
        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
        }
        .btn-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* ─── Alert Box ─── */
        .alert-box {
            padding: 12px 16px;
            border-radius: 12px;
            margin-bottom: 20px;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 10px;
            line-height: 1.4;
        }
        .alert-box.error {
            background: rgba(239, 68, 68, 0.14);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #f87171;
        }
        .alert-box.success {
            background: rgba(16, 185, 129, 0.14);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #34d399;
        }

        /* ─── Rate Card Items ─── */
        .rate-card-item {
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 12px 14px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            transition: all 0.2s ease;
            cursor: pointer;
            user-select: none;
        }
        .rate-card-item:hover {
            border-color: rgba(99, 102, 241, 0.35);
            background: rgba(0, 0, 0, 0.35);
        }
        .rate-card-item.selected {
            border-color: rgba(99, 102, 241, 0.6);
            background: rgba(99, 102, 241, 0.12);
        }
        .rate-card-badge {
            font-size: 0.72rem;
            font-weight: 700;
            font-family: var(--font-mono);
            padding: 3px 8px;
            border-radius: 6px;
            white-space: nowrap;
        }
        .badge-free {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
            border: 1px solid rgba(16, 185, 129, 0.4);
        }
        .badge-paid {
            background: rgba(99, 102, 241, 0.2);
            color: #818cf8;
            border: 1px solid rgba(99, 102, 241, 0.4);
        }

        /* ─── Payment Tiles ─── */
        .payment-options-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 6px;
        }
        .pay-opt-tile {
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.78rem;
            color: #cbd5e1;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }
        .pay-opt-tile:hover {
            border-color: rgba(255, 255, 255, 0.2);
        }
        .pay-opt-tile.selected {
            border-color: var(--primary);
            background: rgba(99, 102, 241, 0.18);
            color: #fff;
            box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
        }

        /* ─── Card Header Actions (Context Bar + Help & Guide) ─── */
        .card-top-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }
        .card-top-context {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            min-width: 0;
            flex: 1;
        }
        .card-top-context .context-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #00f3ff;
            box-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
            flex-shrink: 0;
            margin-top: 5px;
            transition: background 0.3s ease, box-shadow 0.3s ease;
            animation: pulseContextDot 2.2s infinite ease-in-out;
        }
        @keyframes pulseContextDot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.45; transform: scale(0.85); }
        }
        .card-top-context.register-mode .context-dot {
            background: #34d399;
            box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
        }
        .card-top-context .context-sentence {
            font-size: 0.84rem;
            color: #cbd5e1;
            font-weight: 500;
            letter-spacing: 0.01em;
            line-height: 1.4;
            white-space: normal;
            word-break: normal;
            overflow-wrap: break-word;
        }
        @media (max-width: 520px) {
            .card-top-actions {
                flex-wrap: wrap;
                gap: 8px;
            }
            .card-top-context .context-sentence {
                font-size: 0.8rem;
            }
        }
        .btn-help-guide {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 13px;
            border-radius: 16px;
            background: rgba(56, 189, 248, 0.08);
            border: 1px solid rgba(56, 189, 248, 0.28);
            color: #38bdf8;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .btn-help-guide:hover {
            background: rgba(56, 189, 248, 0.18);
            border-color: rgba(56, 189, 248, 0.5);
            color: #fff;
            transform: translateY(-1px);
        }

        /* ─── In-Card Scrollable Help Drawer ─── */
        .in-card-help {
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid rgba(56, 189, 248, 0.35);
            border-radius: 12px;
            padding: 12px 14px;
            margin-bottom: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.1);
            animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            flex-shrink: 0;
        }
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .in-card-help-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            margin-bottom: 10px;
        }
        .btn-close-help {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #94a3b8;
            width: 24px;
            height: 24px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            transition: all 0.2s;
        }
        .btn-close-help:hover {
            color: #fff;
            background: rgba(239, 68, 68, 0.25);
            border-color: rgba(239, 68, 68, 0.5);
        }
        .in-card-help-content {
            max-height: 220px;
            overflow-y: auto;
            padding-right: 6px;
            scrollbar-width: thin;
            scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
        }
        .in-card-help-content::-webkit-scrollbar {
            width: 4px;
        }
        .in-card-help-content::-webkit-scrollbar-thumb {
            background: rgba(56, 189, 248, 0.35);
            border-radius: 4px;
        }
        .help-section {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 9px;
            transition: border-color 0.3s;
        }
        .help-section:last-child {
            margin-bottom: 0;
        }
        .help-sec-title {
            font-size: 0.88rem;
            font-weight: 700;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 7px;
            margin-bottom: 5px;
        }
        .help-section p {
            font-size: 0.84rem;
            color: #cbd5e1;
            line-height: 1.5;
            margin-bottom: 6px;
        }
        .help-section ul, .help-section ol {
            margin: 0;
            padding-left: 18px;
            font-size: 0.84rem;
            color: #cbd5e1;
            line-height: 1.5;
        }
        .help-section li code {
            background: rgba(255, 255, 255, 0.08);
            padding: 2px 5px;
            border-radius: 4px;
            color: #38bdf8;
            font-family: var(--font-mono);
            font-size: 0.8rem;
        }

        /* ─── Responsive Grid on Register ─── */
        .two-col-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        @media (max-width: 620px) {
            .two-col-grid {
                grid-template-columns: 1fr;
            }
            .payment-options-grid {
                grid-template-columns: 1fr;
            }
            .main-card {
                padding: 24px 20px;
            }
        }
