:root {
    --page-bg: #ededee;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text: #111820;
    --muted: #5f6871;
    --border: #c9ced3;
    --border-strong: #aeb5bc;
    --blue: #075697;
    --blue-dark: #06457a;
    --blue-soft: #e8f1f9;
    --success-bg: #e2f3eb;
    --success-text: #176745;
    --error: #a5252f;
    --shadow: 0 16px 42px rgba(29, 39, 48, 0.14);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);

    /*
     * Hero-kuvan oma vaalea harmaa tausta on hieman tummempi kuin vanha
     * sivupohja. Vasemmalla käytetään siksi lähes samaa sävyä kuin kuvassa,
     * ja oikealle siirrytään hyvin pehmeästi vaaleampaan sävyyn.
     *
     * Tarkoitus on häivyttää kuvan suorakulmainen reuna ilman että itse
     * hero-assettia tarvitsee käsitellä tai autentikointiin liittyvää HTML:ää
     * muuttaa.
     */
    background:
        linear-gradient(
            90deg,
            #ededee 0%,
            #ededee 45%,
            #f0f1f2 62%,
            #f4f5f6 100%
        );
}

button,
input {
    font: inherit;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.95fr);
}

.login-hero {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 84px);
    border-right: 1px solid rgba(145, 153, 160, 0.16);
}

.login-hero-image {
    display: block;
    width: min(100%, 980px);
    max-height: 82vh;
    object-fit: contain;
    filter: drop-shadow(0 10px 28px rgba(27, 50, 67, 0.08));
}

.login-panel-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 76px);
}

.login-card {
    width: min(100%, 430px);
    padding: 28px 28px 18px;
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.product-pill {
    width: fit-content;
    margin: 0 auto 18px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.08;
}

.login-intro {
    max-width: 340px;
    margin: 12px auto 16px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.service-info-button {
    display: block;
    margin: 0 auto 18px;
    padding: 8px 14px;
    border: 1px solid #8bb8df;
    border-radius: 999px;
    color: var(--blue);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.service-info-button:hover {
    background: var(--blue-soft);
}

.service-info {
    margin: -4px 0 18px;
    padding: 12px 14px;
    border: 1px solid #d5dbe0;
    border-radius: 12px;
    background: #f8fafb;
    color: #46515a;
    font-size: 13px;
    line-height: 1.45;
}

label {
    display: block;
    margin: 14px 0 7px;
    font-size: 13px;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fbfbfc;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.input-shell:focus-within {
    border-color: #4688bb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 117, 171, 0.12);
}

.input-icon {
    width: 42px;
    flex: 0 0 42px;
    text-align: center;
    color: #49545d;
    font-size: 15px;
}

.input-shell input {
    min-width: 0;
    flex: 1 1 auto;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.password-toggle {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 0;
    background: transparent;
    color: #4c5961;
    cursor: pointer;
}

.login-message {
    min-height: 20px;
    margin: 10px 2px 6px;
    color: var(--error);
    font-size: 13px;
}

.login-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(90deg, var(--blue-dark), #0872bd);
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(5, 84, 145, 0.18);
}

.login-submit:hover:not(:disabled) {
    filter: brightness(1.04);
}

.login-submit:disabled {
    opacity: 0.68;
    cursor: wait;
}

.auth-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 16px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 13px;
}

.auth-status-dot {
    width: 9px;
    height: 9px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.login-footer {
    margin-top: 18px;
    color: #7b838a;
    text-align: center;
    font-size: 12px;
}

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

    .login-hero {
        min-height: 42vh;
        padding-bottom: 12px;
        border-right: 0;
    }

    .login-hero-image {
        max-height: 44vh;
    }

    .login-panel-wrap {
        padding-top: 12px;
    }
}

@media (max-width: 520px) {
    .login-hero {
        min-height: auto;
        padding: 24px 20px 8px;
    }

    .login-panel-wrap {
        padding: 14px 16px 28px;
    }

    .login-card {
        padding: 24px 18px 16px;
        border-radius: 20px;
    }
}
