/* =============================================================================
   Auth pages (login / register / account)
   Reuses the existing glass-effect, gradient and form tokens so these pages
   match the rest of the site without restyling any shared component.
   ========================================================================== */

/* --- Layout --------------------------------------------------------------- */

.auth-section{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.auth-wrap{
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.auth-card{
    background: rgba(17,24,39,0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-head{
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon{
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 24px;
    box-shadow: var(--shadow-primary);
}

.auth-title{
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0 0 8px;
}

.auth-sub{
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

.auth-form .form-group{
    margin-bottom: 18px;
}

/* Password field with a reveal toggle on the right. */
.auth-field{ position: relative; }

.auth-field .custom-input{ padding-right: 48px; }

.auth-reveal{
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}

.auth-reveal:hover,
.auth-reveal:focus-visible{
    color: var(--text-white);
    background: rgba(255,255,255,0.06);
}

.auth-reveal:focus-visible{
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* --- Password strength meter --------------------------------------------- */

.auth-strength{ margin-top: 8px; }

.auth-strength-bar{
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
}

.auth-strength-fill{
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: #EF4444;
    transition: width 0.3s ease, background 0.3s ease;
}

.auth-strength-text{
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-strength-text[data-score="1"]{ color: #EF4444; }
.auth-strength-text[data-score="2"]{ color: #F59E0B; }
.auth-strength-text[data-score="3"]{ color: #3B82F6; }

/* --- Row helpers ---------------------------------------------------------- */

.auth-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-check{
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-check input{
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.auth-link{
    color: #A5B4FC;
    text-decoration: none;
    transition: var(--transition);
}

.auth-link:hover,
.auth-link:focus-visible{
    color: #fff;
    text-decoration: underline;
}

/* --- Footer note + status ------------------------------------------------- */

.auth-foot{
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

.auth-note{
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.auth-full{ width: 100%; }

.auth-divider{
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after{
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-social{
    display: flex;
    gap: 12px;
}

.auth-social a{
    flex: 1;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;

/* --- Account panel -------------------------------------------------------- */

.account-card{
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
    margin-bottom: 24px;
}

.account-avatar{
    width: 64px;
    height: 64px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.account-meta{ min-width: 0; }

.account-name{
    color: var(--text-white);
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 4px;
    overflow-wrap: anywhere;
}

.account-email{
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    overflow-wrap: anywhere;
}

.account-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.account-stat{
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
}

.account-stat-value{
    display: block;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.account-stat-label{
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

.account-empty{
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.account-empty i{
    font-size: 32px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 575px){
    .auth-section{ padding: 110px 0 60px; }
    .auth-card{ padding: 28px 22px; border-radius: var(--radius-md); }
    .auth-title{ font-size: 24px; }
    .account-card{ flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce){
    .auth-strength-fill,
    .auth-reveal{
        transition: none;
    }
}

    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.auth-social a:hover,
.auth-social a:focus-visible{
    border-color: var(--primary);
    color: #fff;
    background: rgba(99,102,241,0.10);
}

.auth-strength-text[data-score="4"]{ color: var(--secondory-light); }
