:root {
    --primary-green: #477403;
    --text-dark: #355800;
    --hover-green: #3b6300;
    --bg-color: #f8fafc;
    --surface-white: #FFFFFF;
    --admin-blue: #2f6690;
}

@font-face {
    font-family: irt;
    src: url(./font/woff/Dana-Medium.woff);
}
@font-face {
    font-family: irt2;
    src: url(./font/woff/Dana-Black.woff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: irt;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
}

input, textarea, select {
    font-size: 16px !important;
}

/* ============================= */
/* --- صفحه ورود / ثبت‌نام --- */
/* ============================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 20px;
}

.login-card {
    width: 400px;
    background-color: var(--surface-white);
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 28px 26px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.register-card {
    width: 460px;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.login-logo img {
    height: 28px;
    display: block;
}

.back-arrow {
    color: var(--text-dark);
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-arrow:hover {
    color: var(--primary-green);
}

.login-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: right;
    font-family: irt2;
    line-height: 1.5;
}

.login-subtitle {
    font-size: 12.5px;
    color: #999;
    margin-bottom: 18px;
    text-align: right;
    line-height: 1.7;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.form-field-row {
    display: flex;
    gap: 12px;
}

.field-label {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.optional-tag {
    font-weight: normal;
    color: #aaa;
    font-size: 12px;
}

.field-hint-icon {
    color: #d9534f;
    font-size: 13px;
    cursor: help;
}

.login-input {
    width: 100%;
    height: 48px;
    background-color: var(--surface-white);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 14px;
    font-family: inherit;
    color: var(--text-dark);
    text-align: right;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.login-input::placeholder {
    color: #b0b0b0;
    font-size: 12.5px;
}

.login-submit-btn {
    width: 100%;
    height: 44px;
    background-color: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-weight: bold;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-submit-btn:hover {
    background-color: var(--hover-green);
}

.login-terms {
    text-align: center;
    font-size: 11px;
    color: #999;
    line-height: 1.8;
}

.login-terms a {
    color: var(--primary-green);
    text-decoration: none;
}

.login-terms a:hover {
    text-decoration: underline;
}

/* --- لینک سوییچ بین ورود / ثبت‌نام --- */
.switch-auth-link {
    text-align: center;
    font-size: 12.5px;
    color: #999;
    margin-top: 14px;
}

.switch-auth-link a {
    color: var(--primary-green);
    font-weight: bold;
    text-decoration: none;
}

.switch-auth-link a:hover {
    text-decoration: underline;
}

/* --- الرت «حساب پیدا نشد» --- */
.account-alert {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background-color: #fff4e5;
    color: #a35b00;
    border: 1px solid #ffe0b2;
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 12.5px;
    margin-bottom: 16px;
    text-align: right;
}

.account-alert a {
    color: var(--primary-green);
    font-weight: bold;
    text-decoration: none;
}

.account-alert a:hover {
    text-decoration: underline;
}

/* ========================================= */
/* --- ریسپانسیو تبلت --- */
/* ========================================= */
@media (max-width: 768px) {
    .login-card {
        width: 100%;
        max-width: 400px;
    }

    .register-card {
        max-width: 460px;
    }
}

/* ========================================= */
/* --- ریسپانسیو موبایل --- */
/* ========================================= */
@media (max-width: 480px) {
    .login-page {
        padding: 15px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .login-card,
    .register-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        box-shadow: none;
        border: none;
    }

    .login-title {
        font-size: 15px;
    }

    .form-field-row {
        flex-direction: column;
        gap: 14px;
    }
}