@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700&display=swap");

:root {
    --rise-coral: #ed6049;
    --rise-coral-dark: #d94d38;
    --rise-navy: #111a3f;
    --rise-ink: #19213a;
    --rise-muted: #697188;
    --rise-line: #dfe4ef;
    --rise-surface: #ffffff;
    --rise-panel: #f5f7fb;
    --rise-danger: #b42318;
    --rise-danger-soft: #fef3f2;
    --rise-success: #027a48;
    --rise-success-soft: #ecfdf3;
}

* {
    box-sizing: border-box;
}

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

body {
    background: var(--rise-panel);
    color: var(--rise-ink);
    font-family: "Manrope", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 56fr) minmax(520px, 44fr);
    min-height: 100vh;
    min-height: 100svh;
}

.login-visual {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #102b9b;
}

.login-visual__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100svh;
    object-fit: cover;
    object-position: center;
}

.login-visual::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    box-shadow: inset -24px 0 50px rgba(7, 16, 73, 0.12);
}

.login-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-height: 100vh;
    max-height: 100svh;
    padding: clamp(32px, 5vw, 76px);
    overflow-y: auto;
    background:
        radial-gradient(circle at 100% 0, rgba(84, 101, 180, 0.09), transparent 34%),
        radial-gradient(circle at 0 100%, rgba(237, 96, 73, 0.08), transparent 30%),
        var(--rise-panel);
}

.login-panel__inner {
    width: min(100%, 510px);
    margin: auto;
}

.login-mobile-brand {
    display: none;
}

.login-card {
    position: relative;
    width: 100%;
    padding: clamp(28px, 3vw, 42px);
    overflow: hidden;
    border: 1px solid rgba(216, 222, 235, 0.86);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 30px 70px rgba(28, 37, 71, 0.11),
        0 4px 16px rgba(28, 37, 71, 0.05);
    backdrop-filter: blur(14px);
}

.login-card::before {
    position: absolute;
    top: 0;
    left: 34px;
    width: 88px;
    height: 4px;
    border-radius: 0 0 8px 8px;
    background: var(--rise-coral);
    content: "";
}

.login-heading {
    margin-bottom: 28px;
    text-align: center;
}

.login-heading__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--rise-coral-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.login-heading__eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rise-coral);
    content: "";
}

.login-heading h1 {
    margin: 0;
    color: var(--rise-navy);
    font-family: "Sora", sans-serif;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.2;
}

.login-heading p {
    margin: 10px 0 0;
    color: var(--rise-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.login-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #fecdca;
    border-radius: 12px;
    background: var(--rise-danger-soft);
    color: var(--rise-danger);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.login-form {
    display: grid;
    gap: 17px;
}

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

.form-field label {
    color: var(--rise-ink);
    font-size: 0.79rem;
    font-weight: 800;
}

.field-control {
    position: relative;
}

.field-control__icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 19px;
    height: 19px;
    color: #8b94aa;
    pointer-events: none;
    transform: translateY(-50%);
}

.field-control input,
.field-control select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--rise-line);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--rise-ink);
    font-size: 0.88rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-control input {
    padding: 0 48px 0 46px;
}

.field-control select {
    padding: 0 42px 0 46px;
    appearance: none;
}

.field-control input::placeholder {
    color: #9aa2b4;
}

.field-control input:focus,
.field-control select:focus {
    border-color: var(--rise-coral);
    box-shadow: 0 0 0 4px rgba(237, 96, 73, 0.12);
}

.field-control select:disabled {
    cursor: not-allowed;
    background: #f5f6f9;
    color: #9299a8;
}

.field-control__action {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-grid;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7e879a;
    cursor: pointer;
    place-items: center;
    transform: translateY(-50%);
    transition: color 160ms ease, background 160ms ease;
}

.field-control__action:hover,
.field-control__action:focus-visible {
    outline: none;
    background: #f2f4f8;
    color: var(--rise-coral-dark);
}

.field-control__action svg {
    width: 19px;
    height: 19px;
}

.select-chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    color: #8992a5;
    pointer-events: none;
    transform: translateY(-50%);
}

.field-hint {
    min-height: 18px;
    margin: -2px 2px 0;
    color: var(--rise-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.field-hint.is-error {
    color: var(--rise-danger);
}

.field-hint.is-success {
    color: var(--rise-success);
}

.captcha-block {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--rise-line);
    border-radius: 14px;
    background: #f8f9fc;
}

.captcha-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#captchaCanvas {
    width: 220px;
    max-width: calc(100% - 48px);
    height: 66px;
    border-radius: 10px;
    background: #fff;
}

.captcha-refresh {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--rise-line);
    border-radius: 10px;
    background: #fff;
    color: var(--rise-coral-dark);
    cursor: pointer;
    place-items: center;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.captcha-refresh:hover,
.captcha-refresh:focus-visible {
    border-color: var(--rise-coral);
    outline: none;
    box-shadow: 0 0 0 4px rgba(237, 96, 73, 0.1);
    transform: rotate(18deg);
}

.captcha-refresh svg {
    width: 18px;
    height: 18px;
}

.captcha-answer {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--rise-line);
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--rise-ink);
    font-size: 0.85rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.captcha-answer:focus {
    border-color: var(--rise-coral);
    box-shadow: 0 0 0 4px rgba(237, 96, 73, 0.12);
}

.captcha-error {
    display: none;
    margin: 0;
    color: var(--rise-danger);
    font-size: 0.73rem;
    font-weight: 600;
    text-align: center;
}

.captcha-error.is-visible {
    display: block;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rise-coral), #f04438);
    box-shadow: 0 12px 26px rgba(237, 96, 73, 0.24);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover:not(:disabled),
.login-submit:focus-visible:not(:disabled) {
    outline: none;
    box-shadow: 0 16px 30px rgba(237, 96, 73, 0.3);
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.login-submit:disabled {
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.35);
    opacity: 0.58;
}

.public-registers {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--rise-line);
}

.public-registers__title {
    margin: 0 0 12px;
    color: var(--rise-ink);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
}

.public-registers__list {
    display: grid;
    max-height: 158px;
    gap: 8px;
    padding-right: 4px;
    overflow-y: auto;
}

.public-registers__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #e4e7ee;
    border-radius: 10px;
    background: #f7f8fa;
    color: #3d4558;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.public-registers__link::after {
    color: var(--rise-coral);
    content: "→";
    font-size: 1rem;
}

.public-registers__link:hover,
.public-registers__link:focus-visible {
    border-color: rgba(237, 96, 73, 0.45);
    outline: none;
    background: #fff6f3;
    color: var(--rise-coral-dark);
}

.login-footer {
    margin: 18px 0 0;
    color: #8b93a4;
    font-size: 0.68rem;
    text-align: center;
}

@media (max-width: 1120px) {
    .login-shell {
        grid-template-columns: minmax(0, 48fr) minmax(500px, 52fr);
    }

    .login-panel {
        padding: 34px;
    }
}

@media (max-width: 820px) {
    .login-shell {
        display: block;
        min-height: 100svh;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        display: block;
        min-height: 100svh;
        max-height: none;
        padding: 0 20px 34px;
        overflow: visible;
    }

    .login-panel__inner {
        width: min(100%, 540px);
    }

    .login-mobile-brand {
        position: relative;
        display: block;
        height: 188px;
        margin: 0 -20px -26px;
        overflow: hidden;
        border-radius: 0 0 30px 30px;
        box-shadow: 0 16px 34px rgba(18, 42, 131, 0.2);
    }

    .login-mobile-brand img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 13%;
    }

    .login-card {
        z-index: 1;
        margin-top: 0;
    }
}

@media (max-width: 460px) {
    .login-panel {
        padding-right: 14px;
        padding-left: 14px;
    }

    .login-mobile-brand {
        height: 166px;
        margin-right: -14px;
        margin-left: -14px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .login-heading {
        margin-bottom: 22px;
    }

    .login-heading h1 {
        font-size: 1.45rem;
    }
}

@media (min-width: 821px) and (max-height: 830px) {
    .login-panel {
        align-items: flex-start;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .login-card {
        padding: 28px 32px;
    }

    .login-heading {
        margin-bottom: 20px;
    }

    .login-form {
        gap: 13px;
    }

    .field-control input,
    .field-control select {
        height: 46px;
    }

    .captcha-block {
        padding: 10px 12px;
    }

    #captchaCanvas {
        height: 56px;
    }

    .public-registers {
        margin-top: 18px;
        padding-top: 16px;
    }

    .public-registers__list {
        max-height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
