html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(14, 165, 233, 0.24), transparent 32%),
        radial-gradient(circle at 92% 86%, rgba(45, 212, 191, 0.22), transparent 34%),
        linear-gradient(135deg, #eaf8ff 0%, #f8fbff 50%, #e8fbf7 100%);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card {
    width: min(1240px, calc(100vw - 48px));
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
    overflow: hidden;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(37, 54, 72, 0.22);
}

.auth-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 54px 46px;
    color: #ffffff;
    background: linear-gradient(145deg, #0c78a5 0%, #17243b 76%);
}

.auth-side-logo {
    width: 154px;
    height: auto;
    margin-bottom: 34px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
}

.auth-side h1 {
    max-width: 430px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 38px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-side p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 600;
}

.auth-feature-list {
    display: grid;
    align-content: start;
    gap: 12px;
    margin: 34px 0;
}

.auth-feature-list span {
    width: fit-content;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
}

.auth-side small {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    font-weight: 700;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 70px;
}

.auth-form-head {
    margin-bottom: 28px;
    text-align: center;
}

.auth-form-head img {
    display: block;
    width: 130px;
    height: auto;
    margin: 0 auto 10px;
}

.auth-logo-heartline {
    position: relative;
    width: min(260px, 68vw);
    height: 28px;
    display: block;
    margin: 0 auto 14px;
    overflow: hidden;
}

.auth-logo-heartline::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(239, 0, 0, 0.10), rgba(239, 0, 0, 0.68), rgba(239, 0, 0, 0.10)) 0 14px / 100% 2px no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 36'%3E%3Cpath d='M0 18 H34 L43 18 L51 10 L60 28 L68 18 H94 L102 18 L110 3 L120 33 L128 18 H180' fill='none' stroke='%23ef0000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 170px 28px repeat-x;
    filter: drop-shadow(0 0 4px rgba(239, 0, 0, 0.34));
    opacity: 0.94;
    animation: auth-heartline 1.45s linear infinite;
}

.auth-logo-heartline::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -24%;
    z-index: 1;
    width: 28%;
    height: 32px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.94) 44%, rgba(255, 60, 60, 0.62) 50%, rgba(255, 255, 255, 0.72) 56%, transparent);
    animation: auth-heartline-scan 1.45s linear infinite;
    pointer-events: none;
}

@keyframes auth-heartline {
    0% {
        background-position: 0 14px, 0 0;
        opacity: 0.82;
    }

    50% {
        opacity: 1;
    }

    100% {
        background-position: 0 14px, -170px 0;
        opacity: 0.82;
    }
}

@keyframes auth-heartline-scan {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(520%);
    }
}

.auth-form-head h2 {
    margin: 0;
    color: #101827;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-form-head p {
    margin: 8px 0 0;
    color: #68758a;
    font-size: 17px;
    font-weight: 600;
}

.auth-form,
.auth-context-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label {
    color: #344155;
    font-size: 14px;
    font-weight: 800;
}

.auth-field input,
.auth-field select {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px;
    color: #172033;
    background: #f7fbff;
    border: 1px solid #dce5f1;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: #0d8bd8;
    box-shadow: 0 0 0 4px rgba(13, 139, 216, 0.12);
}

.auth-password-wrap {
    display: grid;
    grid-template-columns: 1fr 54px;
}

.auth-password-wrap input {
    border-radius: 14px 0 0 14px;
}

.auth-password-wrap button {
    min-height: 54px;
    color: #405169;
    background: #ffffff;
    border: 1px solid #dce5f1;
    border-left: 0;
    border-radius: 0 14px 14px 0;
    font-size: 20px;
}

.auth-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-code-image {
    min-width: 106px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5f6672;
    background:
        linear-gradient(165deg, transparent 48%, rgba(64, 80, 100, 0.32) 49%, rgba(64, 80, 100, 0.32) 51%, transparent 52%),
        #ffffff;
    border: 1px solid #dce5f1;
    border-radius: 10px;
    font-size: 22px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 6px;
    text-decoration: line-through;
    user-select: none;
}

.auth-code-refresh {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    color: #a12828;
    background: #fff8f8;
    border: 1px solid #efc3c3;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.auth-submit {
    min-height: 58px;
    color: #ffffff;
    background: linear-gradient(135deg, #0d93d2 0%, #2563eb 100%);
    border: 0;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #8a1f1f;
    background: #fff0f0;
    border: 1px solid #ffc7c7;
    border-radius: 12px;
    font-weight: 800;
}

.auth-context-card {
    width: min(760px, calc(100vw - 48px));
    padding: 34px;
    background: #ffffff;
    border: 1px solid #e1e7ef;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(37, 54, 72, 0.18);
}

.auth-context-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.auth-context-head img {
    width: 134px;
    margin-bottom: 16px;
}

.auth-context-head h1 {
    margin: 0;
    color: #101827;
    font-size: 28px;
    font-weight: 900;
}

.auth-context-head p {
    margin: 8px 0 0;
    color: #66758a;
    font-weight: 700;
}

.auth-context-logout {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

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

    .auth-side {
        order: 2;
        min-height: auto;
        padding: 34px;
    }

    .auth-form-panel {
        order: 1;
        padding: 38px 30px;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding: 18px;
    }

    .auth-card,
    .auth-context-card {
        width: 100%;
        border-radius: 18px;
    }

    .auth-side h1,
    .auth-form-head h2,
    .auth-context-head h1 {
        font-size: 25px;
    }

    .auth-context-head {
        flex-direction: column;
    }

    .auth-context-logout {
        width: 100%;
        justify-content: center;
    }
}
