/* Auth extras: register toggle, wider card */
.am-captcha__box {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    font-family: ui-monospace, monospace;
    font-size: 1.35rem;
    letter-spacing: 0.35em;
    font-weight: 700;
    background: linear-gradient(135deg, #e8eef5, #d4dce8);
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    user-select: none;
}

.am-auth__card--wide {
    max-width: 720px;
}

/* Two-card register layout */
.am-auth--register-split {
    align-items: center;
    padding: 1.5rem 1rem;
}

.am-auth__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.am-auth__card--register-side {
    max-width: none;
    width: 100%;
    padding: 2rem 1.75rem;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.am-auth__subtitle--tight {
    margin-bottom: 1.25rem;
}

.am-auth__divider--side {
    margin-top: auto;
    padding-top: 1rem;
}

.am-toggle-row--compact {
    margin-bottom: 0.75rem;
}

.am-register-form__grid--stacked {
    margin-bottom: 0.5rem;
}

.am-form-group--compact {
    margin-bottom: 0.75rem;
}

.am-form-control--compact {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.am-pass-rules-panel {
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    background: var(--am-surface-alt, #f8fafc);
    border: 1px solid var(--am-border);
    border-radius: 10px;
}

.am-pass-rules-panel__title {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--am-text-muted);
}

.am-pass-rules--panel {
    margin: 0;
    gap: 0.25rem;
}

.am-pass-rules--panel li {
    font-size: 0.78rem;
}

.am-auth__card--success {
    max-width: 480px;
    text-align: center;
}

.am-auth-success__icon {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 0.75rem;
}

.am-auth-success__title {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--am-text);
}

.am-auth-success__text {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    color: var(--am-text-muted);
    line-height: 1.5;
}

.am-auth-success__hint {
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    color: var(--am-text-muted);
}

.am-auth-success__hint a {
    color: var(--am-primary-light);
    font-weight: 600;
    text-decoration: none;
}

.am-auth-success__hint a:hover {
    text-decoration: underline;
}

.am-pass-rules--inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0 0 1rem;
}

@media (max-width: 768px) {
    .am-auth__split {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .am-pass-rules--inline {
        grid-template-columns: 1fr;
    }
}

/* Horizontal register layout */
.am-register-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.am-register-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.am-register-form__full {
    grid-column: 1 / -1;
}

@media (max-width: 576px) {
    .am-register-form__grid {
        grid-template-columns: 1fr;
    }
}

/* Social login buttons */
.am-social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.am-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 1rem;
    font-family: var(--am-font);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--am-border);
    background: #fff;
    color: var(--am-text);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.am-social-btn:hover {
    box-shadow: var(--am-shadow-sm);
}

.am-social-btn--google i { color: #ea4335; }
.am-social-btn--facebook i { color: #1877f2; }

.am-social-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 1rem;
    font-size: 0.8rem;
    color: var(--am-text-muted);
}

.am-social-divider::before,
.am-social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--am-border);
}

/* reCAPTCHA centering */
.am-recaptcha-wrap--center {
    display: flex;
    justify-content: center;
}

.am-recaptcha-wrap--center .g-recaptcha {
    display: inline-block;
}

/* Auth toast stack — premium (synced with premium.css) */
.am-toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(440px, calc(100vw - 2rem));
    pointer-events: none;
}

.am-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem 1rem 1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: auto;
    overflow: hidden;
}

.am-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.am-toast__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.am-toast__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.am-toast__content { flex: 1; min-width: 0; padding-top: 0.1rem; }
.am-toast__title { font-weight: 700; font-size: 0.92rem; line-height: 1.3; margin-bottom: 0.2rem; color: #0f172a; }
.am-toast__message { font-weight: 500; font-size: 0.84rem; line-height: 1.45; color: #475569; }

.am-toast__close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    margin: -0.15rem -0.25rem 0 0;
}

.am-toast--success .am-toast__accent { background: linear-gradient(180deg, #16a34a, #059669); }
.am-toast--success .am-toast__icon { background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(5, 150, 105, 0.08)); color: #15803d; }
.am-toast--error .am-toast__accent { background: linear-gradient(180deg, #dc2626, #b91c1c); }
.am-toast--error .am-toast__icon { background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(185, 28, 28, 0.08)); color: #b91c1c; }
.am-toast--info .am-toast__accent { background: linear-gradient(180deg, var(--am-primary, #0c4a5c), #138da6); }
.am-toast--info .am-toast__icon { background: linear-gradient(135deg, rgba(12, 74, 92, 0.14), rgba(19, 141, 166, 0.08)); color: var(--am-primary, #0c4a5c); }

.am-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--am-text-muted);
}

.am-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.am-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.am-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--am-border);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.am-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.am-toggle input:checked + .am-toggle__slider {
    background: var(--am-primary-light);
}

.am-toggle input:checked + .am-toggle__slider::before {
    transform: translateX(20px);
}

.am-form-hint {
    font-size: 0.8rem;
    color: #b91c1c;
    margin-top: 0.35rem;
}

.d-none { display: none !important; }

.am-form-hint.d-none { display: none; }

.am-auth__divider {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    color: var(--am-text-muted);
}

.am-auth__divider a {
    color: var(--am-primary-light);
    font-weight: 600;
    text-decoration: none;
}

.am-auth__divider a:hover {
    color: var(--am-accent);
    text-decoration: underline;
}

.am-pass-rules {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.am-pass-rules li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--am-text-muted);
    transition: color 0.15s;
}

.am-pass-rules li.is-valid {
    color: #16a34a;
}

.am-pass-rules__check {
    font-size: 0.7rem;
}

.am-pass-rules__dot {
    font-size: 0.35rem;
    opacity: 0.5;
}

.am-field-status {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.am-field-status--ok { color: #16a34a; }
.am-field-status--err { color: #b91c1c; }

.am-form-control.is-valid-field {
    border-color: #16a34a;
}

.am-form-control.is-invalid-field {
    border-color: #b91c1c;
}

.am-recaptcha-wrap {
    margin: 1.25rem 0 2rem;
}

.am-verify-code-group {
    text-align: center;
    margin-bottom: 1.25rem;
}

.am-verify-code-group__label {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
}

.code-inputs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 1.25rem;
    width: 100%;
    max-width: 100%;
}

.code-inputs .codeType {
    flex: 0 0 48px;
    width: 48px;
    max-width: 48px;
    height: 52px;
    padding: 0.75rem 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
}
