/* ============================================
   AUTH PAGE SPECIFIC STYLES
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f4ee 0%, #f0ece6 100%);
    padding: 2rem;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    background: var(--color-white);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    min-height: 600px;
}

/* ============================================
   LEFT SIDE: BRANDING
   ============================================ */
.auth-brand {
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
    color: var(--color-white);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand__logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 2rem;
}
.auth-brand__logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-brand__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

.auth-brand__desc {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    max-width: 90%;
}

.auth-brand__features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}
.auth-brand__features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}
.auth-brand__features i {
    font-size: 1rem;
}

.auth-brand__image {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}
.auth-brand__image img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 1rem;
    opacity: 0.7;
    filter: brightness(0) invert(1) opacity(0.6);
}

/* ============================================
   RIGHT SIDE: FORMS
   ============================================ */
.auth-forms {
    padding: 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-white);
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--color-light-gray);
    padding: 0.4rem;
    border-radius: 3rem;
    margin-bottom: 2rem;
    align-self: flex-start;
}

.auth-tab {
    padding: 0.6rem 2rem;
    border: none;
    border-radius: 2.5rem;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray);
    cursor: pointer;
    transition: all var(--transition);
}
.auth-tab.active {
    background: var(--color-white);
    color: var(--color-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.auth-tab:hover:not(.active) {
    color: var(--color-black);
}

/* Panels */
.auth-panel {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}
.auth-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-panel__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.auth-panel__desc {
    color: var(--color-gray);
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
}

/* Form */
.auth-form .form-group {
    margin-bottom: 1.2rem;
}
.auth-form label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.auth-form input,
.auth-form select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.8rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color var(--transition);
    background: var(--color-white);
    outline: none;
}
.auth-form input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}
.password-wrapper input {
    padding-left: 3rem;
}
.password-wrapper .toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
}
.password-wrapper .toggle-password:hover {
    color: var(--color-black);
}

/* Options */
.auth-form__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-gray);
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-gold);
    cursor: pointer;
}
.forgot-link {
    font-size: 0.9rem;
    color: var(--color-gold);
    transition: color var(--transition);
}
.forgot-link:hover {
    color: var(--color-gold-dark);
}

.auth-form__terms {
    margin-bottom: 1.5rem;
}
.auth-form__terms a {
    color: var(--color-gold);
    transition: color var(--transition);
}
.auth-form__terms a:hover {
    color: var(--color-gold-dark);
}

.auth-form .btn {
    padding: 0.8rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.8rem 0 1.2rem;
    position: relative;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8e4df;
}
.auth-divider span {
    background: var(--color-white);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: var(--color-gray);
}

/* Social buttons */
.auth-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #eee;
    font-size: 1.2rem;
    color: var(--color-gray);
    transition: all var(--transition);
    background: var(--color-white);
}
.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.social-btn.google:hover {
    color: #ea4335;
    border-color: #ea4335;
}
.social-btn.telegram:hover {
    color: #0088cc;
    border-color: #0088cc;
}
.social-btn.instagram:hover {
    color: #e4405f;
    border-color: #e4405f;
}

/* Switch link */
.auth-switch {
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-gray);
}
.auth-switch a {
    color: var(--color-gold);
    font-weight: 600;
    transition: color var(--transition);
}
.auth-switch a:hover {
    color: var(--color-gold-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }
    .auth-brand {
        padding: 2rem 1.8rem;
        text-align: center;
    }
    .auth-brand__desc {
        max-width: 100%;
    }
    .auth-brand__features {
        justify-content: center;
    }
    .auth-brand__image {
        display: none;
    }
    .auth-brand__logo {
        justify-content: center;
    }
    .auth-forms {
        padding: 2rem 1.8rem;
    }
    .auth-tabs {
        align-self: center;
        width: 100%;
    }
    .auth-tab {
        flex: 1;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 1rem;
    }
    .auth-brand {
        padding: 1.5rem 1.2rem;
    }
    .auth-brand__title {
        font-size: 1.5rem;
    }
    .auth-brand__features {
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    .auth-brand__features span {
        font-size: 0.8rem;
    }
    .auth-forms {
        padding: 1.5rem 1.2rem;
    }
    .auth-panel__title {
        font-size: 1.3rem;
    }
    .auth-form__options {
        flex-direction: column;
        align-items: flex-start;
    }
    .auth-social {
        gap: 0.8rem;
    }
    .social-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* در auth.css یا در style داخل auth.html */
.otp-status {
    margin-top: 0.5rem;
    min-height: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.countdown {
    font-weight: 700;
    color: var(--color-gold-dark);
    font-size: 1.1rem;
    direction: ltr;
    display: inline-block;
}
#otpHelpText {
    font-size: 0.9rem;
    color: var(--color-gray);
}
#otpHelpText.success {
    color: #28a745;
}
#otpHelpText.error {
    color: #dc3545;
}
#otpResend .btn-link {
    color: var(--color-gold);
    font-size: 0.85rem;
    cursor: pointer;
}
#otpResend .btn-link:hover {
    color: var(--color-gold-dark);
    text-decoration: underline;
}