:root {
    --navy: #000000;
    --navy-light: #1a1a1a;
    --text: #111827;
    --muted: #667085;
    --border: #9ca3af;
}

* {
    box-sizing: border-box;
}

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

html {
    font-size: 112.5%;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

body {
    background: #fff;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: #fff;
}

.visual-panel {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #000;
}

.visual-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    background: url("pix/ktu_background_1.webp") 15% top / cover no-repeat;
    transform: scale(1.1);
    transform-origin: 15% top;
}

.visual-panel::after {
    position: absolute;
    inset: 0;
    content: "";
    /*background: linear-gradient(90deg, rgb(0 0 0 / 45%), rgb(0 0 0 / 17%)),
        linear-gradient(0deg, rgb(0 0 0 / 44%), transparent 58%);*/
}

.visual-copy {
    position: absolute;
    z-index: 1;
    top: 43%;
    left: clamp(2rem, 7vw, 7rem);
    width: min(23rem, 70%);
    color: #fff;
}

.visual-copy h1 {
    max-width: 13ch;
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.login-panel {
    display: flex;
    min-width: 0;
    padding: clamp(2rem, 4.7vw, 5.25rem);
    background: #fff;
}

.panel-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    max-width: 31rem;
    min-height: 100%;
    margin: 0 auto;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #050505;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 5.5rem;
    object-fit: contain;
}

.language-select {
    min-width: 4.25rem;
    padding: 0.65rem 1.2rem 0.65rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23273248' stroke-width='2'/%3E%3C/svg%3E");
    background-position: right 0.65rem center;
    background-repeat: no-repeat;
    background-size: 0.65rem auto;
    color: #273248;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    appearance: none;
    text-align: center;
    text-align-last: center;
}

.login-content {
    margin-top: clamp(4rem, 10vh, 8.5rem);
}

.product-name {
    margin: 0;
    color: var(--navy);
    font-size: clamp(2.8rem, 4.2vw, 4.6rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.product-description {
    margin: 1.05rem 0 2.5rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.login-methods {
    display: grid;
    gap: 0.85rem;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.2rem;
    padding: 0.8rem 1rem;
    border: 2px solid var(--navy);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.button-primary {
    background: var(--navy);
    color: #fff;
}

.button-primary:hover {
    background: var(--navy-light);
    box-shadow: 0 0.4rem 0.9rem rgb(0 0 0 / 25%);
    transform: translateY(-2px);
}

.button-secondary {
    background: #fff;
    color: var(--navy);
}

.button-secondary:hover {
    background: #f2f2f2;
    color: var(--navy);
    box-shadow: 0 0.4rem 0.9rem rgb(0 0 0 / 18%);
    transform: translateY(-2px);
}

.button:focus-visible,
.text-input:focus-visible,
.footer-link:focus-visible,
.brand:focus-visible,
.forgot-password:focus-visible {
    outline: 3px solid #555;
    outline-offset: 3px;
}

.language-select:focus {
    border-color: var(--navy);
    outline: none;
}

.native-login {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

.failed-login {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #fce8e6;
    color: #8a1c16;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-field {
    margin-bottom: 1.2rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.text-input {
    width: 100%;
    height: 2.8rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
}

.forgot-password {
    display: inline-block;
    margin: 0 0 1.2rem;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.2em;
    transition: color 150ms ease, text-decoration-color 150ms ease;
}

.forgot-password:hover {
    color: var(--navy);
    text-decoration-color: currentColor;
}

.panel-footer {
    margin-top: auto;
    padding-top: clamp(2.5rem, 7vh, 5rem);
}

.footer-links {
    display: grid;
    gap: 1rem;
    padding-top: 1.4rem;
    border-top: 1px solid #d4d7dc;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--navy);
    text-decoration: underline;
}

.cookie-notice-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.footer-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.75rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.cookie-modal {
    width: min(38rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: 0.35rem;
    background: #fff;
    color: var(--text);
    box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
}

.cookie-modal::backdrop {
    background: rgb(0 0 0 / 50%);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
}

.cookie-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
}

.cookie-modal-close {
    padding: 0.25rem 0.5rem;
    border: 0;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
}

.cookie-modal-body {
    overflow-y: auto;
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #dee2e6;
}

.cookie-modal-footer .button {
    width: auto;
    min-height: auto;
    padding: 0.55rem 1rem;
}

@media (min-width: 761px) and (max-height: 800px) {
    .login-panel {
        padding-block: 2.5rem;
    }

    .panel-footer {
        padding-top: 0.75rem;
    }
}

@media (max-width: 760px) {
    .login-page {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
        box-shadow: none;
    }

    .visual-panel {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 1.5rem;
    }

    .brand-logo {
        width: auto;
        height: 4.75rem;
    }

    .login-content {
        margin-top: 3.5rem;
    }

    .product-name {
        font-size: 3rem;
    }

    .panel-footer {
        padding-top: 3.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button,
    .forgot-password {
        transition: none;
    }
}
