/**
 * WebEngine CMS - MU Ha Long
 * Dark Theme - Brand Solid #7239ea, Success #47BE7D, Danger #DC143C
 * Clean, Flat, Solid Gaming UI without heavy linear-gradients
 */

/* ==========================================================================
   Base & Layout
   ========================================================================== */
body.auth-page-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0b0e14;
    color: #f1f5f9;
    overflow-x: hidden;
}

.auth-page-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 15px;
    background:
        radial-gradient(circle at center, rgba(11, 14, 20, 0.88) 0%, rgba(7, 9, 14, 0.96) 80%, #040508 100%),
        url('../../../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Subtle #7239ea aura */
.auth-page-wrapper::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(114, 57, 234, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

/* Remove legacy wireframe background boxes */
.las-noLog-inner:before,
.las-noLog-inner:after {
    display: none !important;
    content: none !important;
    background: none !important;
}

.not-login .las-noLog,
.las-noLog {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
}

.las-noLog-inner {
    max-width: 480px !important;
    width: 100% !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}

.las-noLog-inner .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.las-noLog-inner .card-body {
    padding: 0 !important;
}

/* ==========================================================================
   Auth Card (Dark Solid Glass)
   ========================================================================== */
.auth-card {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    background: rgba(14, 18, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(114, 57, 234, 0.25);
    border-radius: 18px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.75),
        0 0 25px rgba(114, 57, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 2.25rem 2.25rem 1.75rem 2.25rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Top Accent Line - Solid #7239ea */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #7239ea;
    box-shadow: 0 0 12px rgba(114, 57, 234, 0.6);
}

.auth-card.download-card,
.auth-card.download-portal-card {
    max-width: 1220px;
    width: 95%;
    padding: 2.25rem 2rem 2rem 2rem;
}

/* ==========================================================================
   Brand Header & Logo
   ========================================================================== */
.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-brand-logo-wrap {
    display: inline-block;
    position: relative;
    margin-bottom: 0.5rem;
}

.auth-brand-logo {
    width: 100px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(114, 57, 234, 0.45));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.auth-brand-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 28px rgba(114, 57, 234, 0.7));
}

.auth-brand-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: initial;
    filter: none;
    margin: 0.4rem 0 0.35rem 0;
    line-height: 1.2;
}

.auth-server-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(114, 57, 234, 0.12);
    border: 1px solid rgba(114, 57, 234, 0.35);
    color: #9353f8;
}

.auth-server-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #47BE7D;
    box-shadow: 0 0 8px #47BE7D;
    display: inline-block;
}

.auth-brand-subtitle {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* ==========================================================================
   Navigation Tabs (Segmented Control)
   ========================================================================== */
.auth-tabs {
    display: flex;
    background: rgba(8, 11, 18, 0.85);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.auth-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
    background: #7239ea;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(114, 57, 234, 0.4);
}

/* ==========================================================================
   Form Fields
   ========================================================================== */
.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
}

.auth-label-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-label-title i {
    color: #7239ea;
    font-size: 0.85rem;
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(9, 12, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.auth-input-wrapper:focus-within {
    border-color: #7239ea;
    box-shadow: 0 0 0 3px rgba(114, 57, 234, 0.2);
    background: rgba(13, 17, 26, 0.95);
}

.auth-input-icon {
    color: #64748b;
    padding-left: 14px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    transition: color 0.2s ease;
}

.auth-input-wrapper:focus-within .auth-input-icon {
    color: #7239ea;
}

.auth-input {
    background: transparent !important;
    border: none !important;
    color: #f8fafc !important;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 12px 14px;
    flex: 1;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
}

.auth-input::placeholder {
    color: #64748b;
    font-size: 0.88rem;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover, 
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc !important;
    -webkit-box-shadow: 0 0 0px 1000px #0e1320 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Password Toggle Eye */
.auth-pass-toggle {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 0 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    outline: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-pass-toggle:hover {
    color: #7239ea;
}

.auth-forgot-link {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auth-forgot-link:hover {
    color: #7239ea;
    text-decoration: underline;
}

.auth-hint {
    font-size: 0.78rem;
    margin-top: 0.35rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Submit CTA Button - Solid #7239ea
   ========================================================================== */
.auth-btn-submit {
    background: #7239ea;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 13px 20px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(114, 57, 234, 0.4);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.35rem;
}

.auth-btn-submit:hover {
    background: #5e27d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 57, 234, 0.55);
    color: #ffffff;
}

.auth-btn-submit:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Switch Link & Community Quick Links
   ========================================================================== */
.auth-switch-text {
    text-align: center;
    margin-top: 1.25rem;
    color: #94a3b8;
    font-size: 0.88rem;
}

.auth-switch-link {
    color: #9353f8;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-switch-link:hover {
    color: #7239ea;
    text-decoration: underline;
}

.auth-divider {
    margin: 1.5rem 0 1.25rem 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    text-align: center;
}

.auth-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0e121a;
    padding: 0 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-quick-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-quick-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 7px 14px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-quick-btn:hover {
    background: rgba(114, 57, 234, 0.15);
    border-color: rgba(114, 57, 234, 0.45);
    color: #c4b5fd;
    transform: translateY(-1px);
}

.auth-trust-badge {
    text-align: center;
    margin-top: 1.15rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================================
   Download Portal Styles (.download-card & items) - Solid #7239ea
   ========================================================================== */
.dl-section {
    margin-bottom: 1.5rem;
}

.dl-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9353f8;
    margin-bottom: 0.65rem;
    padding-left: 2px;
}

.dl-section-header i {
    font-size: 0.95rem;
    color: #7239ea;
}

.dl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(9, 12, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.dl-item:hover {
    border-color: rgba(114, 57, 234, 0.35);
    background: rgba(13, 17, 28, 0.95);
    transform: translateY(-1px);
}

.dl-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.dl-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: rgba(114, 57, 234, 0.15);
    color: #9353f8;
    border: 1px solid rgba(114, 57, 234, 0.3);
}

.dl-item-info {
    min-width: 0;
}

.dl-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-item-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dl-item-center {
    flex-shrink: 0;
    text-align: center;
}

.dl-size-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
}

.dl-item-right {
    flex-shrink: 0;
}

.btn-dl-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #7239ea;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(114, 57, 234, 0.35);
    white-space: nowrap;
}

.btn-dl-download:hover {
    background: #5e27d6;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(114, 57, 234, 0.5);
    color: #ffffff !important;
}

.btn-dl-download:active {
    transform: translateY(1px);
}

.dl-notice-box {
    background: rgba(114, 57, 234, 0.08);
    border: 1px solid rgba(114, 57, 234, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.25rem;
    font-size: 0.83rem;
    color: #c4b5fd;
    line-height: 1.45;
}

.dl-notice-icon {
    font-size: 1.25rem;
    color: #7239ea;
    flex-shrink: 0;
}

/* ==========================================================================
   Alert Overrides for Dark Theme (#47BE7D & #DC143C)
   ========================================================================== */
.auth-card .alert {
    background: rgba(15, 20, 30, 0.95) !important;
    border-radius: 10px;
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.auth-card .alert.alert-danger {
    border-color: #DC143C !important;
    color: #fca5a5 !important;
    background: rgba(220, 20, 60, 0.15) !important;
}

.auth-card .alert.alert-success {
    border-color: #47BE7D !important;
    color: #86efac !important;
    background: rgba(71, 190, 125, 0.15) !important;
}

.auth-card .alert.alert-warning {
    border-color: #7239ea !important;
    color: #e9d5ff !important;
    background: rgba(114, 57, 234, 0.15) !important;
}

.auth-card .alert.alert-info {
    border-color: #7239ea !important;
    color: #d8b4fe !important;
    background: rgba(114, 57, 234, 0.12) !important;
}

.auth-card .alert .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

/* Google ReCaptcha in Dark Mode */
.auth-card .g-recaptcha {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 576px) {
    .auth-card {
        padding: 1.75rem 1.25rem 1.5rem 1.25rem;
        border-radius: 16px;
    }
    
    .auth-card.download-card {
        padding: 1.75rem 1.25rem 1.5rem 1.25rem;
    }
    
    .auth-brand-logo {
        width: 85px;
        max-height: 85px;
    }
    
    .auth-brand-title {
        font-size: 1.45rem;
    }
    
    .auth-tab {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .dl-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .dl-item-left {
        width: 100%;
    }
    
    .dl-item-center {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .btn-dl-download {
        width: 100%;
    }
    
    .auth-quick-links {
        gap: 6px;
    }
    
    .auth-quick-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
}
