html,
body {
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
}

    body.login {
        text-align: right;
    }

.emadrese-login-card {
    direction: rtl;
}

.login__input {
    text-align: right;
}

.emadrese-login-alert {
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.75;
}

.emadrese-login-alert--success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #047857;
}

.emadrese-login-alert--danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

.emadrese-login-alert--warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #92400e;
}

html.dark .emadrese-login-alert--success {
    color: #6ee7b7;
}

html.dark .emadrese-login-alert--danger {
    color: #fca5a5;
}

html.dark .emadrese-login-alert--warning {
    color: #fcd34d;
}

.emadrese-captcha-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emadrese-captcha-image {
    flex: 1;
    width: 100%;
    max-width: 240px;
    height: 80px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #f8fafc;
}

html.dark .emadrese-captcha-image {
    border-color: #374151;
    background: #1f2937;
}

.emadrese-captcha-refresh-button {
    min-width: 88px;
    min-height: 44px;
    white-space: nowrap;
}

.dark-mode-switcher {
    user-select: none;
}

    .dark-mode-switcher:hover {
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }

@media (max-width: 640px) {
    .emadrese-captcha-box {
        flex-direction: column;
        align-items: stretch;
    }

    .emadrese-captcha-image {
        max-width: 100%;
    }

    .emadrese-captcha-refresh-button {
        width: 100%;
    }

    .dark-mode-switcher {
        width: 9rem;
        margin-left: 1rem;
        margin-bottom: 1rem;
    }
}


#code {
    letter-spacing: 0.35rem;
    font-size: 1.15rem;
    direction: ltr;
}

html[dir="rtl"] #code {
    text-align: center;
}

.emadrese-login-recovery-link {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    font-weight: 600;
}

.emadrese-login-public-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.emadrese-login-public-action {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    text-align: right;
    padding: 0.8rem 0.9rem;
    white-space: normal;
}

.emadrese-login-public-action__icon {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.09);
}

.emadrese-login-public-action__icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.emadrese-login-public-action strong,
.emadrese-login-public-action small {
    display: block;
}

.emadrese-login-public-action strong {
    font-size: 0.875rem;
    line-height: 1.5;
}

.emadrese-login-public-action small {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    line-height: 1.5;
    opacity: 0.72;
}

@media (max-width: 520px) {
    .emadrese-login-public-actions {
        grid-template-columns: 1fr;
    }
}

.emadrese-login-public-action:only-child {
    grid-column: 1 / -1;
}
