/* ===== AUTH PAGES ===== */

.auth-page-wrap {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--accent-50) 0%, #fff 55%, var(--accent-50) 100%);
    display: flex;
    align-items: center;
    /* Clear the fixed header (13rem desktop / 7rem mobile); box-sizing:border-box
       keeps this within the 100vh so the card stays centred below the header. */
    padding: 15rem 0 40px;
}

@media (max-width: 991px) {
    .auth-page-wrap {
        padding: 9rem 0 40px;
    }
}

.auth-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(83, 125, 118, 0.13);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card-header {
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent) 100%);
    padding: 32px 40px;
    text-align: center;
    color: #fff;
}

.auth-brand-logo {
    font-size: 2.8rem;
    font-weight: bold;
    letter-spacing: -1px;
    margin-bottom: 6px;
    display: block;
}

.auth-header-title {
    font-size: 1.5rem;
    margin: 0;
    color: rgba(255,255,255,0.88);
    font-weight: normal;
}

.auth-card-body {
    padding: 32px 40px 36px;
}

.auth-step-desc {
    font-size: 1.4rem;
    color: #777;
    text-align: center;
    margin-bottom: 26px;
    line-height: 2;
}

.auth-step-desc strong {
    color: var(--accent-600);
}

.auth-input-group {
    position: relative;
    margin-bottom: 18px;
}

.auth-input-group .auth-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-600);
    font-size: 1.8rem;
    pointer-events: none;
}

.auth-input-group input[type="text"],
.auth-input-group input[type="number"],
.auth-input-group input[type="password"],
.auth-input-group input[type="tel"] {
    width: 100%;
    padding: 14px 48px 14px 18px;
    border: 2px solid #ebebeb;
    border-radius: 12px;
    font-family: "IRANYekanMedium";
    font-size: 1.45rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.25s, box-shadow 0.25s;
    direction: rtl;
    text-align: right;
}

.auth-input-group input:focus {
    border-color: var(--accent-600);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(83, 125, 118, 0.09);
}

.auth-input-group label {
    display: block;
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 7px;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: "IRANYekanMedium";
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--accent-700) 0%, var(--accent-600) 100%);
    box-shadow: 0 8px 25px rgba(83, 125, 118, 0.38);
    transform: translateY(-1px);
}

.auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-links-row a,
.auth-links-row button {
    color: var(--accent-600);
    font-size: 1.3rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "IRANYekanMedium";
    padding: 0;
}

.auth-links-row a:hover,
.auth-links-row button:hover {
    text-decoration: underline;
}

.auth-home-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #aaa;
    font-size: 1.3rem;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    padding-top: 18px;
    transition: color 0.2s;
}

.auth-home-link:hover {
    color: var(--accent-600);
}

.auth-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: #555;
    cursor: pointer;
    margin: 14px 0;
}

.auth-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-600);
    flex-shrink: 0;
}

.auth-check-label a {
    color: var(--accent-600);
    text-decoration: none;
}

/* Timer */
.timerLogin {
    /* پلاگینِ تایمر برای دقیقه و ثانیه دو <div> جدا می‌سازد، پس بدونِ flex
       زیرِ هم می‌افتند و شمارش دو خطی دیده می‌شود. */
    display: flex;
    justify-content: center;
    align-items: baseline;
    direction: ltr;
    text-align: center;
    font-size: 1.5rem;
    color: var(--accent-600);
    margin: 12px 0 4px;
    font-weight: bold;
}
.timerLogin > div:empty { display: none; }


/* Captcha */
.captcha-row {
    margin: 14px 0;
}

/* DNTCaptcha wraps image + refresh + input in one plain <div>. Without this it
   is a block box, so the refresh button drops under the image. */
.captcha-row > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.captcha-row img {
    flex: 0 1 auto;
    max-width: calc(100% - 56px);
    border: 1px solid #ebebeb;
    border-radius: 8px;
    background: #fff;
}

.captcha-row .text-box {
    flex: 1 0 100%;
    margin-top: 0;
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #ebebeb;
    border-radius: 12px;
    font-family: "IRANYekanMedium";
    font-size: 1.4rem;
    direction: rtl;
    background: #fafafa;
}

.captcha-row .text-box:focus {
    border-color: var(--accent-600);
    outline: none;
    background: #fff;
}

.captcha-row .captcha-refresh {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-600);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    font-size: 1.6rem;
}
.captcha-row .captcha-refresh:hover { background: var(--accent-700); }

/* Resend btn */
#retrieve-code {
    display: none;
    background: none;
    border: 1.5px solid var(--accent-600);
    color: var(--accent-600);
    padding: 8px 22px;
    border-radius: 10px;
    font-family: "IRANYekanMedium";
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.25s;
    margin: 8px auto 0;
}

#retrieve-code:hover {
    background: var(--accent-600);
    color: #fff;
}

.auth-label-note {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 12px;
    display: block;
}

/* Validation */
.text-danger {
    color: #dc3545 !important;
    font-size: 1.2rem;
    display: block;
    margin-top: 4px;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .auth-card-header,
    .auth-card-body {
        padding: 24px 22px;
    }
    .auth-card {
        border-radius: 18px;
    }
}
