.login-wrapper {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        .login-wrapper.active { display: flex; }

        .overlay {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(4px);
        }

       
        .modal {
            position: relative;
            z-index: 10;
            background: #fff;
            border-radius: 18px;
            padding: 40px 36px;
            width: 100%;
            max-width: 420px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
            animation: popIn .25s ease;
        }
        @keyframes popIn {
            from { opacity: 0; transform: scale(.92) translateY(12px); }
            to   { opacity: 1; transform: scale(1)  translateY(0); }
        }

        .modal h2 {
            font-size: 1.6rem;
            font-weight: 800;
            margin-bottom: 24px;
            color: #1a1a1a;
            text-align: center;
        }
        .modal h2 span { color: #bf0b0b; }

        .modal select,
        .modal input[type="text"],
        .modal input[type="email"],
        .modal input[type="password"] {
            width: 100%;
            padding: 12px 16px;
            margin-bottom: 14px;
            border: 1.5px solid #ddd;
            border-radius: 10px;
            font-size: .95rem;
            outline: none;
            transition: border-color .2s;
            background: #fafafa;
        }
        .modal select:focus,
        .modal input:focus { border-color: #bf0b0b; background: #fff; }


        .btn-primary {
            width: 100%;
            padding: 13px;
            background: #bf0b0b;
            color: #fff;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: background .2s, transform .1s;
            margin-bottom: 10px;
        }
        .btn-primary:hover  { background: #9e0909; }
        .btn-primary:active { transform: scale(.98); }

        .btn-secondary {
            width: 100%;
            padding: 11px;
            background: transparent;
            color: #bf0b0b;
            border: 1.5px solid #bf0b0b;
            border-radius: 10px;
            font-size: .95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background .2s;
        }
        .btn-secondary:hover { background: #fff1f1; }

        .alert {
            padding: 12px 16px;
            border-radius: 8px;
            font-size: .9rem;
            font-weight: 600;
            margin-bottom: 14px;
            display: none;
        }
        .alert.error   { background: #ffe4e4; color: #c0392b; border: 1px solid #f5c6cb; }
        .alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

        .spinner {
            display: inline-block;
            width: 16px; height: 16px;
            border: 2px solid rgba(255,255,255,.4);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin .6s linear infinite;
            vertical-align: middle;
            margin-right: 6px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        .hidden { display: none; }
        