.auth-frame {
    border-radius: 32px;
    border: 2px solid rgba(255, 77, 20, 0.65);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 50px rgba(20, 34, 74, 0.12);
    overflow: hidden;
}

.auth-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-grid::after {
    content: '';
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: 50%;
    width: 1px;
    background: rgba(255, 77, 20, 0.6);
    transform: translateX(-0.5px);
}

.auth-pane {
    padding: 34px 36px 38px;
}

.auth-pane h1,
.auth-pane h2 {
    margin: 0 0 26px;
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111b38;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-title-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    color: #ff4d14;
    background: rgba(255, 77, 20, 0.12);
    border: 1px solid rgba(255, 77, 20, 0.18);
    font-size: 0.95rem;
}

.auth-form {
    max-width: 420px;
    margin: 0 auto;
}

.form-rows {
    display: grid;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.form-row label {
    text-align: right;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(17, 27, 56, 0.74);
}

.form-row input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(17, 27, 56, 0.12);
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: #111b38;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-row input:focus {
    border-color: rgba(255, 77, 20, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 77, 20, 0.12);
}

.form-actions {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    justify-items: center;
}

.form-actions.inline {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.form-actions.inline .btn {
    min-width: 120px;
}

.form-actions .btn {
    min-height: 42px;
    border-radius: 12px;
}

.btn[disabled],
.btn.is-disabled {
    opacity: 0.72;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn.is-loading {
    position: relative;
    padding-right: 44px;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 1);
    animation: authspin 0.9s linear infinite;
}

.btn.btn-secondary.is-loading::after {
    border-color: rgba(34, 81, 209, 0.26);
    border-top-color: rgba(34, 81, 209, 0.9);
}

@keyframes authspin {
    to {
        transform: rotate(360deg);
    }
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.flash {
    width: var(--container);
    margin: 0 auto 18px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(17, 27, 56, 0.08);
    background: rgba(255, 255, 255, 0.86);
    color: #111b38;
    box-shadow: 0 14px 28px rgba(17, 27, 56, 0.06);
}

.flash[hidden] {
    display: none;
}

.flash.is-success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.flash.is-error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.captcha-row {
    align-items: start;
}

.captcha-row label {
    padding-top: 2px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-box span {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ef4444;
    white-space: nowrap;
}

.captcha-box input {
    max-width: 120px;
}

.site-footer {
    margin-top: 52px;
    padding: 44px 36px 24px;
    border-radius: 30px;
    background: linear-gradient(180deg, #0f1a36 0%, #132348 100%);
    color: #dbe1f1;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 0.85fr 0.95fr 0.9fr 0.95fr;
    gap: 30px;
}

.site-footer h3 {
    margin: 0 0 16px;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: rgba(219, 225, 241, 0.88);
    font-size: 0.94rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
}

.site-footer .brand-copy strong {
    color: #ff5a1f;
}

.site-footer .brand-copy span {
    color: rgba(219, 225, 241, 0.8);
}

.site-footer__about {
    margin: 16px 0 0;
    font-size: 0.94rem;
    line-height: 1.7;
    color: rgba(219, 225, 241, 0.78);
    max-width: 36ch;
}

.site-footer__bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: rgba(219, 225, 241, 0.72);
    font-size: 0.9rem;
}

.site-footer__bottom p {
    margin: 0;
}

@media (max-width: 1240px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-grid::after {
        left: 32px;
        right: 32px;
        top: 50%;
        bottom: auto;
        height: 1px;
        width: auto;
        transform: translateY(-0.5px);
    }
}

@media (max-width: 760px) {
    .auth-pane {
        padding: 26px 18px 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .form-row label {
        text-align: left;
    }

    .site-footer {
        padding: 32px 20px 18px;
        border-radius: 24px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}
