/* ═══════════════════════════════════════════════════════════
   auth-gate.css — Login Overlay Styles
   Premium dark glassmorphism login form
   ═══════════════════════════════════════════════════════════ */

#authGateOverlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a1a;
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-gate {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background effects */
.auth-gate::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    filter: blur(80px);
    animation: authFloat 15s ease-in-out infinite;
}

.auth-gate::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
    bottom: -80px;
    right: -50px;
    border-radius: 50%;
    filter: blur(80px);
    animation: authFloat 15s ease-in-out infinite reverse;
}

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

/* Login card */
.auth-card {
    position: relative;
    z-index: 1;
    width: 380px;
    max-width: 90vw;
    background: rgba(18, 18, 42, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.08);
    animation: authSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Neon top line */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, #ec4899, transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
    animation: authPulse 3s ease-in-out infinite;
}

@keyframes authPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #e8e8f0;
    margin-bottom: 6px;
}

.auth-header h2 span {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 13px;
    color: #8888aa;
    font-weight: 400;
}

/* Form fields */
.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8888aa;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-field label i {
    color: #a855f7;
    margin-right: 4px;
    font-size: 11px;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #e8e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.auth-field input:focus {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.auth-field input::placeholder {
    color: #555577;
}

.auth-pass-wrap {
    position: relative;
}

.auth-pass-wrap input {
    padding-right: 44px;
}

.auth-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #555577;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-eye:hover {
    color: #a855f7;
}

/* Error message */
.auth-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #f87171;
    text-align: center;
    word-break: break-word;
    animation: authShake 0.3s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Submit button */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-btn i {
    margin-right: 6px;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-back {
    color: #8888aa;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.auth-back:hover {
    color: #a855f7;
}

.auth-back i {
    margin-right: 4px;
    font-size: 11px;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 24px;
        border-radius: 16px;
    }
    .auth-header h2 { font-size: 24px; }
    .auth-logo { font-size: 36px; }
}

/* ═══ User Info Bar (top-right) ═══ */
.jet-user-bar {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(12, 12, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 10px;
    padding: 8px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: ubSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
}

.jet-user-bar.ub-danger {
    border-color: rgba(239, 68, 68, 0.25);
}

.jet-user-bar.ub-warning {
    border-color: rgba(245, 158, 11, 0.25);
}

@keyframes ubSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ub-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.ub-user {
    color: #e8e8f0;
    font-weight: 600;
}

.ub-ip {
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.ub-sep {
    color: rgba(255, 255, 255, 0.08);
}

.ub-ok { color: #22c55e; }
.ub-caution { color: #f59e0b; }
.ub-warn { color: #ef4444; font-weight: 600; }
.ub-unlimited { color: #06b6d4; }

.ub-logout {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    color: #ef4444;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ub-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.ub-logout i { font-size: 11px; }

.ub-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ub-link {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    color: #818cf8;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.ub-link:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.ub-link--admin {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.ub-link--admin:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .jet-user-bar {
        top: auto;
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        gap: 6px;
    }
    .ub-info { flex-wrap: wrap; justify-content: center; }
    .ub-actions { flex-wrap: wrap; justify-content: center; }
    .ub-sep:nth-child(2) { display: none; }
}
