/* 
 * Premium Member Styling for QBridge Low-Code Portal
 * Features: Deep elegant theme, Glassmorphism, Smooth Micro-animations, Custom Inputs, Parallax Floating Bubbles
 */

:root {
    --premium-bg: #0f111a;
    --premium-card: rgba(26, 31, 54, 0.65);
    --premium-border: rgba(255, 255, 255, 0.16);
    --premium-focus-border: #6366f1;
    --premium-focus-glow: rgba(99, 102, 241, 0.25);
    --text-primary: #ffffff;
    --text-muted: #cbd5e1;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --hover-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
    --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.auth-layout, body.dashboard-layout {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--premium-bg);
    font-family: var(--font-outfit);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

[x-cloak] { display: none !important; }

/* Background animated bubbles */
.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0) 70%);
    filter: blur(40px);
    animation: floatBubbles 20s infinite ease-in-out;
}

.bubble:nth-child(1) {
    top: 10%;
    left: 15%;
    width: 350px;
    height: 350px;
    animation-duration: 25s;
}

.bubble:nth-child(2) {
    bottom: 15%;
    right: 10%;
    width: 400px;
    height: 400px;
    animation-delay: -5s;
    animation-duration: 30s;
}

.bubble:nth-child(3) {
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    animation-delay: -10s;
    animation-duration: 22s;
}

.bubble:nth-child(4) {
    top: 80%;
    left: 5%;
    width: 250px;
    height: 250px;
    animation-delay: -3s;
}

.bubble:nth-child(5) {
    top: 5%;
    right: 25%;
    width: 280px;
    height: 280px;
    animation-delay: -12s;
}

@keyframes floatBubbles {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-40px) scale(1.1) rotate(180deg);
    }
}

.relative-box {
    z-index: 2;
}

/* Typography & Logo */
.logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-text:hover {
    transform: scale(1.03);
}

.badge-glow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
    color: #a5b4fc !important;
    vertical-align: middle;
}

.text-muted-premium {
    color: var(--text-muted) !important;
    font-weight: 400;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Glassmorphic Cards */
.card-premium {
    background: var(--premium-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--premium-border);
    border-radius: 24px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    z-index: 10;
}

.card-premium:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Animations */
.card-entrance {
    animation: entranceUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Form Elements */
.form-label-premium {
    font-size: 0.88rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 5px;
    display: block;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.25rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-control-premium {
    background-color: rgba(15, 17, 26, 0.6) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: 14px !important;
    padding: 11px 16px 11px 48px !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    font-family: var(--font-outfit) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.form-control-premium::placeholder {
    color: #4b526d !important;
}

.form-control-premium:focus {
    border-color: var(--premium-focus-border) !important;
    box-shadow: 0 0 0 4px var(--premium-focus-glow) !important;
    outline: none !important;
}

.form-control-premium:focus + .input-icon {
    color: var(--premium-focus-border);
}

/* Custom password toggle button inside password field */
.btn-password-toggle {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.btn-password-toggle:hover {
    color: var(--text-primary);
}

/* Select Control */
.select-custom {
    padding-right: 40px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.option-custom {
    background-color: var(--premium-bg);
    color: var(--text-primary);
}

/* Checkbox Premium */
.form-check-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0 !important;
}

.form-check-input-premium {
    width: 18px !important;
    height: 18px !important;
    background-color: rgba(15, 17, 26, 0.8) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: 6px !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    float: none !important;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease !important;
}

.form-check-input-premium:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

.select-none {
    user-select: none;
}

/* Links & Buttons */
.link-premium {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-premium:hover {
    color: #a5b4fc;
    text-shadow: 0 0 8px rgba(165, 180, 252, 0.4);
}

.text-info-premium {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-info-premium:hover {
    color: #7dd3fc;
}

.btn-premium-action {
    background: var(--accent-gradient) !important;
    border: none !important;
    color: var(--text-primary) !important;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    letter-spacing: 0.25px !important;
    transition: background 0.3s ease, box-shadow 0.3s ease, filter 0.2s ease !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-premium-action:hover {
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.45), 0 0 8px rgba(236, 72, 153, 0.25);
    background: var(--hover-gradient) !important;
    filter: brightness(1.05);
}

.btn-premium-action:active {
    filter: brightness(0.95);
}

.btn-secondary-premium {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
    transition: background-color 0.3s ease, border-color 0.3s ease !important;
}

.btn-secondary-premium:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.border-secondary-premium {
    border-color: var(--premium-border) !important;
}

/* Custom Success Reset Box */
.success-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    70% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reset-link-container {
    background: rgba(15, 17, 26, 0.4);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dashboard Styling */
.header-premium {
    background: rgba(15, 17, 26, 0.8) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--premium-border);
    z-index: 100;
}

.btn-premium-profile {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.btn-premium-profile:hover {
    filter: brightness(1.08);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.avatar-premium {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-premium-glow {
    width: 90px;
    height: 90px;
    font-size: 2.2rem !important;
    background: var(--accent-gradient) !important;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
    animation: avatarPulse 3s infinite ease-in-out;
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
    }
    50% {
        box-shadow: 0 0 35px rgba(168, 85, 247, 0.65), 0 0 15px rgba(236, 72, 153, 0.3);
    }
}

.dropdown-menu-premium {
    background: #151829 !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: 12px !important;
}

.dropdown-menu-premium .dropdown-item {
    color: var(--text-muted) !important;
    font-family: var(--font-outfit) !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu-premium .dropdown-item:hover {
    background-color: rgba(99, 102, 241, 0.1) !important;
    color: var(--text-primary) !important;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
}

.bg-premium-glass-card {
    background: rgba(15, 17, 26, 0.35);
    transition: border-color 0.3s ease;
}

.bg-premium-glass-card:hover {
    border-color: rgba(168, 85, 247, 0.3) !important;
}

.bg-success-lt {
    background: rgba(46, 204, 113, 0.08) !important;
}

/* Premium Validation Styles (Backend-like) */
.form-control-premium.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

.form-control-premium.is-invalid:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
}

.form-control-premium.is-invalid + .input-icon {
    color: #f87171 !important;
}

.invalid-feedback {
    display: block !important;
    color: #ff6b6b !important;
    font-size: 0.85rem !important;
    margin-top: 6px !important;
    font-weight: 500 !important;
    font-family: var(--font-outfit) !important;
    animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card & Input Compactness & Border Enhancements */
.p-3\.5 {
    padding: 1.25rem !important;
}

.card-premium .card-body {
    padding: 1.25rem !important;
}

.form-control-premium:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

