/* ============================================
   ARANO — Register Modal Styles
   مدال روی پس‌زمینه سایت با overlay سبز تیره
   ============================================ */

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    color: #15382D;
    min-height: 100vh;
}

/* ---------- Backdrop روی صفحه اصلی سایت ---------- */
/* پس‌زمینه کرم آرانو + لایه‌ی سبز تیره شفاف روی آن */
body {
    background-color: #FAF2E3;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(181, 147, 75, 0.08), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(11, 59, 30, 0.06), transparent 40%);
    position: relative;
    overflow-x: hidden;
}

/* لایه سبز تیره محو روی پس‌زمینه سایت */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(4, 40, 15, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0;
    pointer-events: none;
}

/* ---------- Modal Overlay ---------- */
.auth-modal-overlay {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ---------- Modal Card ---------- */
.auth-modal-card {
    width: 100%;
    max-width: 480px;
    background: #FAF2E3;
    border: 1px solid #D8B976;
    border-radius: 20px;
    padding: 44px 32px 32px;
    box-shadow: 0 20px 60px rgba(4, 40, 15, 0.35), 0 8px 20px rgba(4, 40, 15, 0.15);
    position: relative;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Close Button ---------- */
.auth-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #6B746E;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-modal-close:hover {
    background: rgba(11, 59, 30, 0.06);
    color: #0B3B1E;
}

.auth-modal-close svg {
    width: 20px;
    height: 20px;
}

/* ---------- Title ---------- */
.auth-title-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    color: #0B3B1E;
    margin: 0 0 16px;
    letter-spacing: -0.3px;
}

.auth-title-line {
    position: relative;
    width: 100%;
    height: 1.5px;
    background: #E6DCCB;
    margin: 0 auto;
}

.auth-title-line::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 6px;
    background: linear-gradient(90deg, #B5934B, #D8B976, #B5934B);
    border-radius: 3px;
}

/* ---------- Form ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    display: block;
    color: #15382D;
    font-weight: 700;
    font-size: 15px;
    text-align: right;
    padding-right: 4px;
}

/* ---------- Input Wrap ---------- */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #FAF2E3;
    border: 1.5px solid #C5BAAB;
    border-radius: 10px;
    padding: 0 14px;
    height: 54px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrap:focus-within {
    border-color: #0B3B1E;
    box-shadow: 0 0 0 3px rgba(11, 59, 30, 0.08);
}

.auth-input-wrap.has-error {
    border-color: #C0392B;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.auth-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B8479;
    margin-left: 10px;
    flex-shrink: 0;
}

.auth-input-icon svg {
    width: 20px;
    height: 20px;
}

.auth-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #15382D;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    padding: 0;
    text-align: right;
    min-width: 0;
}

.auth-input.ltr-input {
    direction: ltr;
    text-align: right;
    padding-right: 0;
}

.auth-input::placeholder {
    color: #9B9489;
    font-weight: 400;
}

/* ---------- Error ---------- */
.auth-error {
    color: #C0392B;
    font-size: 13px;
    font-weight: 500;
    min-height: 0;
    display: block;
    text-align: right;
    padding-right: 4px;
}

.auth-error:empty {
    display: none;
}

.auth-error.is-success {
    color: #1B5E20;
    font-weight: 700;
}

.auth-error-link {
    display: inline-block;
    margin-top: 4px;
    color: #0B3B1E;
    font-weight: 700;
    font-size: 13px;
    text-decoration: underline;
    text-decoration-color: #D8B976;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color 0.2s ease;
    cursor: pointer;
}

.auth-error-link:hover {
    color: #B5934B;
}

.auth-error-hint {
    display: inline-block;
    margin-top: 2px;
    color: #6B746E;
    font-size: 12.5px;
    font-weight: 500;
}

/* ---------- Button ---------- */
.auth-btn {
    width: 100%;
    height: 58px;
    margin-top: 8px;
    background: linear-gradient(180deg, #114A27 0%, #0B3B1E 100%);
    color: #F5EDDF;
    border: 2px solid #D8B976;
    border-radius: 32px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(11, 59, 30, 0.18);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(11, 59, 30, 0.25);
    background: linear-gradient(180deg, #155A30 0%, #0D4423 100%);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-btn-icon {
    width: 22px;
    height: 22px;
}

.auth-btn-spinner {
    width: 22px;
    height: 22px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Feedback ---------- */
.auth-feedback {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.7;
}

.auth-feedback.show {
    display: block;
}

.auth-feedback.error {
    background: #FBE9E7;
    color: #C0392B;
    border: 1px solid #F1B8B3;
}

.auth-feedback.success {
    background: #E8F5E9;
    color: #1B5E20;
    border: 1px solid #A5D6A7;
}

/* ---------- Description ---------- */
.auth-desc {
    margin: 16px 0 10px;
    color: #3D5A4D;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.8;
}

/* ---------- Divider ---------- */
.auth-divider {
    width: 100%;
    height: 1px;
    background: #E6DCCB;
    margin: 4px 0 10px;
}

/* ---------- Bottom Link ---------- */
.auth-bottom-link {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #0B3B1E;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #D8B976;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.auth-bottom-link:hover {
    color: #B5934B;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .auth-modal-overlay {
        padding: 16px 12px;
    }

    .auth-modal-card {
        padding: 36px 22px 26px;
        border-radius: 18px;
    }

    .auth-title {
        font-size: 26px;
    }

    .auth-input-wrap {
        height: 50px;
        padding: 0 12px;
    }

    .auth-btn {
        height: 54px;
        font-size: 16px;
    }

    .auth-desc {
        font-size: 13px;
    }
}
