/* ==========================================================================
   XTREME JADE MOBILE - AUTH & ACCOUNT FORM STYLES (SYNCHRONIZED WITH HOME)
   Applies to: login.php, register.php, profile.php, change-password.php,
               forgot-password.php, promotions.php
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Signika:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #eab308;
    --primary-dark: #b45309;
    --gold-light: #ffe49e;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #070b14;
    --card-bg: rgba(15, 23, 42, 0.90);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(234, 179, 8, 0.32);
    --border-subtle: rgba(148, 163, 184, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Signika', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--dark-bg);
    background-image:
        linear-gradient(180deg, rgba(7, 11, 20, 0.48) 0%, rgba(7, 11, 20, 0.78) 65%, rgba(7, 11, 20, 0.92) 100%),
        url('../../../assets/img/thien_am_tu_bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 84px 16px 36px;
}

/* Top Navigation Bar on Auth Pages */
.auth-SiteHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: rgba(7, 11, 20, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.auth-HeaderInner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-Brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-Brand img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(234, 179, 8, 0.4));
}

.auth-BrandText {
    display: flex;
    flex-direction: column;
}

.auth-BrandTitle {
    font-family: 'Fz Halloween', 'Signika', sans-serif;
    color: var(--gold-light);
    font-size: 1.05rem;
    line-height: 1.15;
}

.auth-BrandSub {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.auth-HeaderLinks {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-NavLink {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #e2e8f0;
    text-decoration: none;
    border: 1px solid rgba(234, 179, 8, 0.25);
    background: rgba(234, 179, 8, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.auth-NavLink:hover {
    background: rgba(234, 179, 8, 0.2);
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.auth-NavLink.gold {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    border-color: rgba(255, 228, 158, 0.5);
    color: #fff;
}

/* Hide legacy floating theme toggles */
.theme-toggle-btn,
.auto-mode-btn {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 470px;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 28px rgba(234, 179, 8, 0.14);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.16) 0%, rgba(15, 23, 42, 0.4) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 28px 26px 22px;
    text-align: center;
    position: relative;
}

.card-header .auth-logo-emblem {
    height: 64px;
    width: auto;
    margin: 0 auto 10px;
    filter: drop-shadow(0 4px 14px rgba(234, 179, 8, 0.45));
}

.card-header h1 {
    font-family: 'Fz Halloween', 'Signika', sans-serif;
    color: var(--gold-light);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.card-header h1 i {
    color: var(--primary-color);
    margin-right: 6px;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.card-body {
    padding: 26px 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
}

.form-label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(7, 11, 20, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.16);
    background: #070b14;
}

.form-control::placeholder {
    color: #64748b;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 15px;
}

.input-icon .form-control {
    padding-left: 44px;
}

.form-text {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 13px 22px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #fff;
    border: 1px solid rgba(255, 228, 158, 0.55);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(234, 179, 8, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(234, 179, 8, 0.12);
    color: var(--gold-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(234, 179, 8, 0.24);
    border-color: var(--gold-light);
    color: #fff;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 10px;
}

.alert.show {
    display: flex;
}

.alert-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid var(--success-color);
    color: #34d399;
}

.alert-danger,
.alert-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid var(--danger-color);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid var(--warning-color);
    color: #fbbf24;
}

.card-footer {
    background: rgba(7, 11, 20, 0.78);
    padding: 18px 26px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.card-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.card-footer a {
    color: var(--gold-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.card-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--danger-color);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--warning-color);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--success-color);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 576px) {
    body {
        padding: 78px 12px 24px;
    }

    .auth-BrandSub {
        display: none;
    }

    .card-header {
        padding: 22px 18px 18px;
    }

    .card-body {
        padding: 20px 18px;
    }

    .card-footer {
        padding: 16px 18px;
    }

    .card-header h1 {
        font-size: 22px;
    }

    .info-item-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .info-item-status {
        width: 100%;
        justify-content: space-between;
    }
}
