/* کپچا — مشترک بین ورود و پنل */

.captcha-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.captcha-field label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--eset-ink-soft);
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "question refresh"
        "input input";
    gap: 0.5rem;
    align-items: center;
}

.captcha-question {
    grid-area: question;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--eset-turquoise-pale) 0%, #fff 100%);
    border: 1.5px dashed rgba(0, 150, 161, 0.35);
    border-radius: var(--radius-md);
    font-family: Consolas, 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--eset-hero-from);
    text-align: center;
    letter-spacing: 0.18em;
    user-select: none;
}

.captcha-hint {
    margin: 0;
    font-size: 0.76rem;
    color: var(--eset-ink-muted);
}

.captcha-refresh {
    grid-area: refresh;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--eset-border);
    background: var(--eset-surface);
    border-radius: var(--radius-md);
    color: var(--eset-ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: border-color var(--duration), color var(--duration), background var(--duration);
}

.captcha-refresh svg {
    width: 18px;
    height: 18px;
}

.captcha-refresh:hover {
    border-color: var(--eset-turquoise);
    color: var(--eset-turquoise);
    background: var(--eset-turquoise-pale);
}

.captcha-refresh.is-loading svg {
    animation: captchaSpin 0.8s linear infinite;
}

.captcha-input {
    grid-area: input;
}

@keyframes captchaSpin {
    to { transform: rotate(360deg); }
}

/* مودال ثبت‌نام موفق */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-card {
    width: min(100%, 440px);
    background: var(--eset-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--eset-border);
    overflow: hidden;
    animation: fadeSlideUp 0.35s var(--ease-out);
}

.modal-card__header {
    padding: 1.25rem 1.5rem 0.75rem;
    text-align: center;
}

.modal-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card__icon svg {
    width: 28px;
    height: 28px;
}

.modal-card__header h2 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.modal-card__body {
    padding: 0 1.5rem 1.25rem;
    color: var(--eset-ink-soft);
    line-height: 1.85;
    font-size: 0.92rem;
    text-align: center;
}

.modal-card__body strong {
    color: var(--eset-ink);
}

.modal-card__footer {
    padding: 1rem 1.5rem 1.35rem;
    display: flex;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
