﻿.auth-body {
    min-height: 100vh;
}

.auth-shell {
    width: 100%;
    min-height: calc(100vh - 3rem);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.25rem 1rem 4rem;
    position: relative;
    z-index: 5;
}

.auth-main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    width: min(100%, 40rem);
    margin: 1rem auto 0;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-brand {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-logo {
    display: block;
    width: min(100%, 240px) !important;
    height: auto;
    margin: 0 auto;
}

.auth-logo--dark {
    display: none;
}

.dark-theme-variables .auth-logo--light,
.dark-theme .auth-logo--light {
    display: none;
}

.dark-theme-variables .auth-logo--dark,
.dark-theme .auth-logo--dark {
    display: block;
}

.auth-content {
    width: 100%;
}

.auth-ribbon {
    background-color: red;
    text-align: center;
}

.auth-ribbon__text {
    margin-top: 0;
    color: white;
}

.auth-footer {
    text-align: center;
    padding-bottom: 0.5rem;
}

.mfa-page-wrap {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.mfa-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.mfa-step {
    padding: 0.35rem 0;
}

.mfa-step-divider {
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: #e5e7eb;
    margin-top: 0.75rem;
    padding-top: 0.9rem;
}

.mfa-step-title {
    margin-bottom: 0.75rem;
    color: #374151;
}

.mfa-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 0.25rem;
}

.mfa-qr {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 0.45rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.mfa-qr--small img,
.mfa-qr--small canvas {
    width: 140px !important;
    height: 140px !important;
    max-width: none !important;
    display: block;
}

.mfa-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #111;
    cursor: pointer;
    user-select: none;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.mfa-warning-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    max-width: 420px;
    margin: 0.75rem auto 0;
    text-align: left;
}

.mfa-warning-secret {
    margin-top: 8px;
    font-weight: 700;
    word-break: break-word;
}

.code-input {
    max-width: 220px;
    margin: 0 auto;
    text-align: center;
}

.spinner {
    display: none;
    align-items: center;
    gap: 0.4rem;
}

.spinner-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

.mfa-secret-fallback {
    margin-top: 0.35rem;
}

    .mfa-secret-fallback details {
        text-align: left;
    }

.mfa-method-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mfa-method-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.mfa-method-content {
    flex: 1 1 auto;
    /*text-align: left;*/
}

.mfa-method-action {
    flex: 0 0 auto;
}
.mfa-check {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.55rem;
    margin: 0.6rem auto;
    width: min(100%, 32rem);
    text-align: left;
    cursor: pointer;
}

.mfa-check__input {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.mfa-check__label {
    line-height: 1.4;
}

.mfa-auth-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.mfa-auth-note {
    color: var(--color-dark-variant);
    margin-bottom: 0.6rem;
}

.mfa-auth-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

    .mfa-auth-card + .mfa-auth-card {
        margin-top: 0.75rem;
    }

.mfa-auth-code {
    max-width: 220px;
    margin: 0 auto;
    text-align: center;
}

.mfa-auth-destination {
    font-weight: 600;
    word-break: break-word;
}

.mfa-auth-method-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mfa-auth-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.mfa-auth-method-card__body {
    flex: 1 1 auto;
    max-width: 320px;
}

.mfa-auth-method-card__title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.mfa-auth-method-card__text {
    color: var(--color-dark-variant);
    line-height: 1.35;
}

.mfa-auth-actions.flex-column,
.button-row.flex-column {
    flex-direction: column;
    align-items: center;
}

.mfa-check--left {
    justify-content: flex-start;
}

.mfa-check--center {
    justify-content: center;
    text-align: center;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 750px) {
    .auth-shell {
        padding: 0.75rem 0.75rem 4rem;
    }

    .auth-card {
        width: min(100%, 100%);
        margin-top: 0.5rem;
        padding: 1rem 0.9rem 0.9rem;
    }

    .auth-logo {
        width: min(100%, 200px) !important;
    }

    .mfa-method-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .mfa-method-content {
        text-align: center;
    }

    .mfa-qr--small img,
    .mfa-qr--small canvas {
        width: 112px !important;
        height: 112px !important;
    }
    .mfa-check {
        width: 100%;
    }

    .mfa-auth-method-card {
        flex-direction: column;
        text-align: center;
    }
}
