.sspt-login-layout {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(320px, 420px);
    gap: 32px;
    align-items: start;
}

.sspt-login-layout__aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sspt-login-layout__box,
.sspt-account-qr-auth__card,
.sspt-account-qr-auth-confirm {
    background: #fff;
    border: 1px solid #d9e1ee;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgb(31 59 99 / 10%);
}

.sspt-login-layout__box {
    padding: 22px;
}

.sspt-login-layout__box--tabs {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sspt-login-layout__box h3,
.sspt-account-qr-auth__card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.1;
    color: #193153;
}

.sspt-login-layout__panel-copy h4 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.2;
    color: #193153;
}

.sspt-login-layout__box p,
.sspt-login-layout__panel-copy p,
.sspt-account-qr-auth__card p,
.sspt-account-qr-auth__lead,
.sspt-account-qr-auth-confirm__text {
    margin: 0;
    color: #56667f;
    line-height: 1.55;
}

.sspt-login-layout__box-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sspt-login-layout__tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 12px;
    background: #eef3fb;
    align-self: flex-start;
}

.sspt-login-layout__tab {
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #41506a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.sspt-login-layout__tab.is-active {
    background: #fff;
    color: #193153;
    box-shadow: 0 6px 18px rgb(31 59 99 / 10%);
}

.sspt-login-layout__tab-panel {
    display: none;
}

.sspt-login-layout__tab-panel.is-active {
    display: block;
}

.sspt-login-layout__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.sspt-login-layout__panel-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.sspt-login-layout__qr-wrap,
.sspt-account-qr-auth__qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 314px;
    height: 314px;
    padding: 18px;
    margin: 18px 0 16px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgb(227 235 248 / 95%), transparent 56%),
        linear-gradient(180deg, #f7f9fd 0%, #eef3fb 100%);
}

.sspt-login-layout__qr-image,
.sspt-account-qr-auth__qr-image {
    display: block;
    width: min(100%, 280px);
    height: auto;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}

.sspt-login-layout__meta,
.sspt-account-qr-auth__meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.sspt-login-layout__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sspt-account-qr-auth__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sspt-login-layout__expires,
.sspt-account-qr-auth__expires,
.sspt-account-qr-auth__scanner-status,
.sspt-login-layout__scanner-status {
    font-size: 14px;
    color: #41506a;
}

.sspt-login-layout__refresh-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    color: #1f4f93;
    text-decoration: none;
    white-space: nowrap;
}

.sspt-login-layout__refresh-link:hover,
.sspt-login-layout__refresh-link:focus {
    color: #193153;
}

.sspt-login-layout__refresh-link .fa {
    font-size: 16px;
    line-height: 1;
}

.sspt-account-qr-auth__refresh-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    color: #1f4f93;
    text-decoration: none;
    white-space: nowrap;
}

.sspt-account-qr-auth__refresh-link:hover,
.sspt-account-qr-auth__refresh-link:focus {
    color: #193153;
}

.sspt-account-qr-auth__refresh-link .fa {
    font-size: 16px;
    line-height: 1;
}

.sspt-login-layout__link,
.sspt-account-qr-auth__link {
    color: #1f4f93;
    word-break: break-word;
}

.sspt-login-layout__message,
.sspt-account-qr-auth__message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.sspt-login-layout__message.is-success,
.sspt-account-qr-auth__message.is-success {
    background: #eef8f0;
    border-color: #b8dec1;
    color: #1d6b2d;
}

.sspt-login-layout__message.is-error,
.sspt-account-qr-auth__message.is-error {
    background: #fff1f1;
    border-color: #f0c1c1;
    color: #aa2f2f;
}

.sspt-login-layout__scanner-controls,
.sspt-account-qr-auth__card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.sspt-account-qr-auth__card-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.sspt-account-qr-auth__card-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
}

.sspt-account-qr-auth__action {
    min-width: 132px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #5d6c8c;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: none;
}

.sspt-account-qr-auth__action:hover,
.sspt-account-qr-auth__action:focus {
    background: #51607d;
    color: #fff;
}

.sspt-account-qr-auth__action .fa {
    font-size: 16px;
    line-height: 1;
}

.sspt-account-qr-auth__action.is-active {
    background: #51607d;
}

.sspt-login-layout .sspt-account-qr-auth__action.button,
.sspt-login-layout .sspt-account-qr-auth__action.button.button-primary {
    border-radius: 8px;
}

.sspt-login-layout__scanner-reader,
.sspt-account-qr-auth__scanner-reader {
    width: 100%;
    min-height: 314px;
    height: 314px;
    margin: 18px 0 16px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #eef3fb 0%, #dfe8f5 100%);
}

.sspt-login-layout__scanner-reader > div,
.sspt-account-qr-auth__scanner-reader > div {
    border-radius: 16px;
}

.sspt-account-qr-auth__intro {
    margin-bottom: 24px;
}

.sspt-account-qr-auth__title {
    margin: 0 0 8px;
    color: #193153;
}

.sspt-account-qr-auth__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.sspt-account-qr-auth__grid--single {
    grid-template-columns: minmax(320px, 420px);
}

.sspt-account-qr-auth__card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sspt-account-qr-auth__card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.sspt-account-qr-auth__owner-request {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #d9e1ee;
    border-radius: 14px;
    background: #f7f9fd;
}

.sspt-account-qr-auth__owner-request-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #193153;
}

.sspt-account-qr-auth__owner-request-text,
.sspt-account-qr-auth__owner-request-device,
.sspt-account-qr-auth-public__meta,
.sspt-account-qr-auth-public__error {
    font-size: 14px;
    line-height: 1.5;
    color: #41506a;
}

.sspt-account-qr-auth__owner-request-device {
    margin-top: 8px;
}

.sspt-account-qr-auth__owner-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.sspt-account-qr-auth__action--secondary {
    background: #eef3fb;
    color: #1f3b63;
    text-transform: none;
    letter-spacing: 0;
}

.sspt-account-qr-auth__action--secondary:hover,
.sspt-account-qr-auth__action--secondary:focus {
    background: #dfe8f5;
    color: #193153;
}

.sspt-account-qr-auth__action.is-disabled,
.sspt-account-qr-auth__action:disabled {
    opacity: 0.6;
    cursor: default;
}

.sspt-account-qr-auth__empty,
.sspt-account-qr-auth-confirm {
    padding: 28px;
}

.sspt-account-qr-auth-confirm__title {
    margin: 0 0 12px;
    color: #193153;
}

.sspt-account-qr-auth-confirm__text {
    margin-bottom: 18px;
}

.sspt-account-qr-auth-confirm--error {
    border-color: #f0c1c1;
}

.sspt-account-qr-auth-confirm--pending {
    border-color: #d9e1ee;
}

.sspt-account-qr-auth-public__meta {
    margin-bottom: 18px;
}

.sspt-account-qr-auth-public__error {
    margin-bottom: 18px;
}

.sspt-account-qr-auth-public {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #f4f7fb 0%, #e8eef7 100%);
}

.sspt-account-qr-auth-public .sspt-account-qr-auth-confirm {
    width: min(100%, 540px);
}

@media screen and (max-width: 980px) {
    .sspt-login-layout,
    .sspt-account-qr-auth__grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 640px) {
    .sspt-login-layout__box,
    .sspt-account-qr-auth__card,
    .sspt-account-qr-auth-confirm {
        padding: 18px;
        border-radius: 14px;
    }

    .sspt-login-layout__tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sspt-login-layout__tab {
        width: 100%;
    }

    .sspt-login-layout__panel-head,
    .sspt-login-layout__scanner-controls,
    .sspt-account-qr-auth__card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sspt-account-qr-auth__card-actions {
        width: 100%;
    }

    .sspt-account-qr-auth__action {
        width: 100%;
    }

    .sspt-account-qr-auth__owner-request-actions {
        flex-direction: column;
    }

    .sspt-login-layout__meta-row {
        align-items: flex-start;
    }

    .sspt-account-qr-auth__meta-row {
        align-items: flex-start;
    }

    .sspt-login-layout__scanner-reader,
    .sspt-account-qr-auth__scanner-reader,
    .sspt-account-qr-auth__qr-wrap {
        min-height: 240px;
        height: 240px;
    }
}
