@import url('design-tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: #f5f8fb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }

.login-layout {
    display: grid;
    grid-template-columns: minmax(440px, 47%) minmax(0, 1fr);
    min-height: 100vh;
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(36px, 4vw, 64px) clamp(40px, 5.2vw, 88px) 40px;
    color: #fff;
    background: radial-gradient(circle at 88% 68%, rgba(43, 127, 196, .28), transparent 38%), linear-gradient(145deg, #173a60 0%, #102b49 52%, #0b2039 100%);
}
.brand-panel::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: 1px;
    background: rgba(255, 255, 255, .1);
    content: "";
}
.brand-panel__top, .mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}
.brand-panel__top { position: relative; z-index: 1; }
.brand-mark {
    display: grid;
    flex: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    color: #fff;
    background: #2b7fc4;
    box-shadow: 0 8px 22px rgba(0, 15, 34, .16);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.08em;
    padding-right: 2px;
}
.brand-name {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.045em;
}
.brand-name__dot { color: #70c5fb; }
.brand-panel__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 50px 0 16px;
}
.brand-panel__eyebrow {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #a6c9e4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
}
.brand-panel__eyebrow-line {
    width: 23px;
    height: 2px;
    background: #56afea;
}
.brand-panel h1 {
    margin: 27px 0 17px;
    font-size: clamp(40px, 4vw, 62px);
    font-weight: 700;
    line-height: 1.13;
    letter-spacing: -.065em;
}
.brand-panel h1 em {
    color: #76c3f1;
    font-style: normal;
}
.brand-panel__content > p {
    max-width: 420px;
    margin: 0;
    color: #b8cfe1;
    font-size: 15px;
    line-height: 1.8;
}
.brand-panel__graphic {
    position: relative;
    align-self: center;
    width: min(100%, 460px);
    height: clamp(200px, 25vh, 300px);
    margin-top: clamp(30px, 6vh, 72px);
}
.graphic-grid {
    position: absolute;
    inset: 0;
    opacity: .38;
    background-image: linear-gradient(rgba(112, 183, 231, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 183, 231, .13) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at center, #000 12%, transparent 73%);
}
.graphic-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(141, 203, 244, .2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.graphic-orbit--outer { width: 350px; height: 350px; }
.graphic-orbit--inner { width: 235px; height: 235px; border-color: rgba(141, 203, 244, .32); }
.graphic-center {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 122px;
    height: 122px;
    place-items: center;
    border: 1px solid rgba(155, 210, 247, .36);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(54, 142, 210, .65), rgba(19, 69, 112, .76));
    box-shadow: 0 20px 60px rgba(0, 12, 31, .25), inset 0 1px rgba(255, 255, 255, .12);
    transform: translate(-50%, -50%) rotate(-9deg);
}
.graphic-center span {
    font-size: 62px;
    font-weight: 800;
    letter-spacing: -.09em;
    transform: rotate(9deg);
}
.graphic-node {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid #b5e6ff;
    border-radius: 50%;
    background: #2b7fc4;
    box-shadow: 0 0 0 6px rgba(74, 160, 221, .13);
}
.graphic-node--one { top: 24%; left: 23%; }
.graphic-node--two { top: 70%; right: 16%; }
.graphic-node--three { bottom: 15%; left: 37%; width: 7px; height: 7px; }
.brand-panel__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #86a8c2;
    font-size: 12px;
    letter-spacing: .02em;
}
.brand-panel__footer span { margin: 0 9px; color: #4e789a; }

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 60px clamp(32px, 6vw, 110px);
}
.form-panel__inner { width: min(100%, 430px); }
.mobile-brand { display: none; }
.form-heading { margin-bottom: 42px; }
.form-heading__eyebrow {
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .17em;
}
.form-heading h2 {
    margin: 15px 0 10px;
    color: #142f49;
    font-size: clamp(30px, 2.6vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.055em;
}
.form-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}
.form-field { margin-bottom: 24px; }
.form-field label {
    display: block;
    margin-bottom: 10px;
    color: #28445c;
    font-size: 13px;
    font-weight: 700;
}
.input-wrap { position: relative; }
.input-wrap input {
    display: block;
    width: 100%;
    height: 55px;
    padding: 0 48px;
    border: 1px solid #d9e3ec;
    border-radius: 10px;
    outline: none;
    color: #17354d;
    background: #fff;
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s;
}
.input-wrap input::placeholder { color: #9aabba; }
.input-wrap input:hover { border-color: #b6c9d9; }
.input-wrap input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(43, 127, 196, .12);
}
.input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 19px;
    height: 19px;
    color: #8297aa;
    pointer-events: none;
    transform: translateY(-50%);
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    color: #8297aa;
    background: transparent;
    transform: translateY(-50%);
}
.password-toggle:hover { color: var(--brand); background: #eef6fc; }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle:focus-visible, .submit-button:focus-visible {
    outline: 3px solid #9fd1f3;
    outline-offset: 2px;
}
.error-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #f4c8c8;
    border-radius: 9px;
    color: #ad3030;
    background: #fff3f3;
    font-size: 13px;
    line-height: 1.5;
}
.error-message[hidden] { display: none; }
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 55px;
    margin-top: 31px;
    border: 1px solid var(--brand);
    border-radius: 10px;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(43, 127, 196, .17);
    font-size: 14px;
    font-weight: 700;
    transition: background .18s, box-shadow .18s, transform .18s;
}
.submit-button:hover {
    background: var(--brand-hover);
    box-shadow: 0 10px 22px rgba(43, 127, 196, .22);
    transform: translateY(-1px);
}
.submit-button:disabled { cursor: wait; opacity: .76; transform: none; }
.submit-button svg { width: 18px; height: 18px; }
.form-panel__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 74px;
    padding-top: 22px;
    border-top: 1px solid #e2eaf2;
    color: #91a2b1;
    font-size: 11px;
}

@media (max-width: 900px) {
    .login-layout { grid-template-columns: minmax(340px, 44%) minmax(0, 1fr); }
    .brand-panel { padding-inline: 36px; }
    .brand-panel h1 { font-size: 40px; }
    .form-panel { padding-inline: 38px; }
}
@media (max-width: 700px) {
    .login-layout { display: block; }
    .brand-panel { display: none; }
    .form-panel {
        min-height: 100vh;
        min-height: 100svh;
        padding: 36px 24px;
        background: #f7f9fc;
    }
    .mobile-brand { display: flex; margin-bottom: clamp(56px, 12vh, 100px); }
    .mobile-brand .brand-name { color: #17354d; }
    .mobile-brand .brand-name__dot { color: var(--brand); }
    .form-heading { margin-bottom: 36px; }
    .form-panel__footer { margin-top: 68px; }
}
@media (max-width: 380px) {
    .form-panel { padding-inline: 20px; }
    .form-panel__footer { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .input-wrap input, .submit-button { transition: none; }
}
