/* ============================================
   OVERSUITE THEME - Dark Neon Login v3
   Hover expand/collapse + intense glow
   ============================================ */

/* --- Background --- */
.oversuite-login-bg {
    background: #060609 !important;
    min-height: 100vh;
    overflow: hidden;
}

.oversuite-login-bg #wrapwrap {
    background: radial-gradient(ellipse at 50% 40%, #0d0d1a 0%, #060609 70%) !important;
    min-height: 100vh;
}

/* --- Background particles --- */
.oversuite-login-bg::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(0, 240, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 80% 15%, rgba(191, 0, 255, 0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 70%, rgba(0, 128, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 80%, rgba(255, 0, 128, 0.25) 0%, transparent 100%),
        radial-gradient(2px 2px at 50% 50%, rgba(0, 240, 255, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 60%, rgba(0, 200, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(191, 0, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* --- Wrapper --- */
.oversuite-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    perspective: 1200px;
}

/* ========================================
   CARD
   ======================================== */
.oversuite-login-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    animation: cardFloat 5s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: rotateX(2deg) rotateY(-1.5deg); }
    50% { transform: rotateX(-1.5deg) rotateY(2deg); }
}

/* ========================================
   GLOW BORDER — INTENSE + FAST
   ======================================== */
.oversuite-glow-border {
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        #00f0ff 0%,
        #0060ff 10%,
        #bf00ff 25%,
        #ff0080 40%,
        #ff4040 50%,
        #ff0080 60%,
        #bf00ff 75%,
        #0060ff 90%,
        #00f0ff 100%
    );
    animation: glowSpin 2s linear infinite;
    filter: blur(4px);
    opacity: 1;
    z-index: 0;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Extra glow layer */
.oversuite-glow-border::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    background: inherit;
    filter: blur(12px);
    opacity: 0.6;
    z-index: -1;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Glow intensifies on hover */
.oversuite-login-card:hover .oversuite-glow-border {
    filter: blur(5px);
    opacity: 1;
}

.oversuite-login-card:hover .oversuite-glow-border::after {
    filter: blur(18px);
    opacity: 0.8;
}

@property --glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes glowSpin {
    0% { --glow-angle: 0deg; }
    100% { --glow-angle: 360deg; }
}

/* Fallback */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .oversuite-glow-border {
        background: linear-gradient(135deg, #00f0ff, #bf00ff, #ff0080, #00f0ff);
        background-size: 300% 300%;
        animation: glowFallback 2s ease infinite;
    }
    @keyframes glowFallback {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
}

/* ========================================
   CARD INNER
   ======================================== */
.oversuite-card-inner {
    position: relative;
    background: linear-gradient(145deg, #13131f 0%, #0e0e18 50%, #0a0a12 100%);
    border-radius: 18px;
    padding: 2.5rem 2rem;
    z-index: 1;
    box-shadow:
        0 0 60px rgba(0, 240, 255, 0.12),
        0 0 120px rgba(191, 0, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ========================================
   LOGO SECTION
   ======================================== */
.oversuite-logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.oversuite-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(191, 0, 255, 0.12));
    border: 1px solid rgba(0, 240, 255, 0.25);
    margin-bottom: 1rem;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    transition: box-shadow 0.4s ease;
}

.oversuite-login-card:hover .oversuite-logo-icon {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.35);
}

.oversuite-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: linear-gradient(135deg, #00f0ff, #e0e0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.oversuite-subtitle {
    color: #5a5a7a;
    font-size: 0.82rem;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

/* ========================================
   FORM CONTAINER — HOVER EXPAND / COLLAPSE
   ======================================== */
.oversuite-form-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease 0.1s,
        margin-top 0.4s ease;
    margin-top: 0;
}

/* Expand on card hover */
.oversuite-login-card:hover .oversuite-form-container {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* Keep expanded while any input is focused (user is typing) */
.oversuite-form-container:focus-within {
    max-height: 500px !important;
    opacity: 1 !important;
    margin-top: 0.5rem !important;
}

/* Also keep parent behavior when focus is inside */
.oversuite-login-card:has(.oversuite-form-container:focus-within) .oversuite-form-container {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.5rem;
}

.oversuite-login-card:has(.oversuite-form-container:focus-within) .oversuite-glow-border {
    filter: blur(5px);
    opacity: 1;
}

.oversuite-login-card:has(.oversuite-form-container:focus-within) .oversuite-glow-border::after {
    filter: blur(18px);
    opacity: 0.8;
}

.oversuite-login-card:has(.oversuite-form-container:focus-within) .oversuite-logo-icon {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.35);
}

/* ========================================
   FORM STYLING
   ======================================== */
.oversuite-login-bg .oe_login_form {
    margin: 0;
}

/* --- Labels --- */
.oversuite-label {
    color: #7a7a9a !important;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: block;
}

/* --- Inputs --- */
.oversuite-login-bg .form-control,
.oversuite-login-bg input.form-control {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    color: #e0e0ff !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

.oversuite-login-bg .form-control:focus,
.oversuite-login-bg input.form-control:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(0, 240, 255, 0.5) !important;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), 0 0 40px rgba(0, 240, 255, 0.05) !important;
    outline: none !important;
}

.oversuite-login-bg .form-control::placeholder {
    color: #3a3a5a !important;
}

/* --- Login button --- */
.oversuite-btn-login {
    width: 100%;
    padding: 0.85rem !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    cursor: pointer;
    background: linear-gradient(135deg, #00c8ff, #0080ff) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 25px rgba(0, 200, 255, 0.35);
    text-transform: none;
    margin-top: 0.5rem;
}

.oversuite-btn-login:hover {
    background: linear-gradient(135deg, #00d8ff, #0090ff) !important;
    box-shadow: 0 4px 35px rgba(0, 200, 255, 0.55) !important;
    transform: translateY(-1px);
}

.oversuite-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(0, 200, 255, 0.3) !important;
}

/* --- Alerts --- */
.oversuite-login-bg .alert-danger {
    background: rgba(255, 60, 60, 0.1) !important;
    border: 1px solid rgba(255, 60, 60, 0.3) !important;
    color: #ff6b6b !important;
    border-radius: 10px !important;
}

.oversuite-login-bg .alert-success {
    background: rgba(0, 255, 136, 0.1) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
    color: #00ff88 !important;
    border-radius: 10px !important;
}

/* --- Links --- */
.oversuite-login-bg .oe_login_buttons a,
.oversuite-login-bg a.btn-link,
.oversuite-login-bg .field-login a,
.oversuite-login-bg a {
    color: #00c8ff !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.oversuite-login-bg .oe_login_buttons a:hover,
.oversuite-login-bg a:hover {
    color: #00f0ff !important;
    text-decoration: underline !important;
}

/* --- Footer --- */
.oversuite-footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.oversuite-footer span {
    color: #2a2a4a;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

/* --- Form group spacing --- */
.oversuite-login-bg .mb-3 {
    margin-bottom: 1.1rem !important;
}

.oversuite-login-bg .oe_login_buttons {
    padding-top: 0.5rem !important;
}

/* --- Override leaked borders --- */
.oversuite-login-bg .border-bottom,
.oversuite-login-bg .border-top {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .oversuite-card-inner {
        padding: 2rem 1.5rem;
    }
    .oversuite-login-card {
        max-width: 100%;
    }
    .oversuite-title {
        font-size: 1.3rem;
    }
}
