/* KBC Touch — login */

:root {
    --kb-navy: #0d2a50;
    --kb-navy-dark: #021e43;
    --kb-accent: #0097db;
    --kb-accent-soft: #e5f4ff;
    --kb-text: #0d2a50;
    --kb-muted: #45658f;
    --kb-border: #bfdaff;
    --kb-white: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.kb-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 42% 58%;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
    color: var(--kb-text);
    background: var(--kb-white);
}

.kb-hero {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.12) 100%),
        url('touch-background.jpg') center / cover no-repeat;
}

.kb-hero__logo {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    display: block;
}

.kb-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--kb-white);
}

.kb-topnav {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    padding: 0;
    flex-shrink: 0;
    color: var(--kb-navy);
}

@media (min-width: 901px) {
    .kb-topnav {
        position: fixed;
        top: 18px;
        right: 40px;
        left: auto;
        color: var(--kb-navy);
    }
}

.kb-topnav__item {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--kb-navy);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    height: 24px;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

.kb-topnav__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
}

.kb-topnav__label {
    line-height: 1;
    display: inline-block;
}

.kb-menu {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
}

.kb-menu__btn.is-open {
    border: 2px solid var(--kb-navy);
    border-radius: 6px;
    padding: 6px 10px;
    margin: -6px -10px;
}

.kb-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 16px 18px;
    border: 2px solid var(--kb-navy);
    border-radius: 8px;
    background: var(--kb-white);
    box-shadow: 0 10px 28px rgba(13, 42, 80, 0.14);
}

.kb-menu__link {
    display: block;
    margin-bottom: 14px;
    color: var(--kb-navy);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.kb-menu__link:hover {
    text-decoration: underline;
}

.kb-menu__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--kb-navy);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.kb-menu__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.kb-menu__switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #c5d9f2;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.kb-menu__switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--kb-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}

.kb-menu__toggle input:checked + .kb-menu__switch {
    background: var(--kb-accent);
}

.kb-menu__toggle input:checked + .kb-menu__switch::after {
    transform: translateX(18px);
}

.kb-menu__langs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.kb-menu__lang {
    border: 0;
    background: transparent;
    color: var(--kb-navy);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.kb-menu__lang:hover {
    color: var(--kb-accent);
}

.kb-menu__sep {
    color: #91b3e3;
    font-size: 14px;
    line-height: 1;
}

.kb-high-contrast {
    --kb-navy: #000000;
    --kb-navy-dark: #000000;
    --kb-text: #000000;
    --kb-border: #000000;
    --kb-accent: #0066aa;
}

.kb-high-contrast .kb-field__input,
.kb-high-contrast .kb-method,
.kb-high-contrast .kb-menu__panel {
    border-width: 3px;
}

.kb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 520px;
    width: 100%;
    margin: 0;
    padding: 64px 48px 64px 56px;
}

.kb-back-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 28px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kb-navy);
}

.kb-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 4px;
    color: var(--kb-accent);
    text-decoration: none;
    flex-shrink: 0;
}

.kb-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.kb-method {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 18px;
    border: 2px solid var(--kb-border);
    border-radius: 8px;
    background: var(--kb-white);
    color: var(--kb-navy);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
}

.kb-method--active {
    border-color: var(--kb-accent);
    background: var(--kb-accent-soft);
    color: var(--kb-navy);
}

.kb-method__icon {
    flex-shrink: 0;
    color: var(--kb-navy);
}

.kb-form {
    max-width: 100%;
}

.kb-field {
    margin-bottom: 28px;
}

.kb-field__label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--kb-navy);
}

.kb-field__input {
    width: 100%;
    border: 2px solid var(--kb-border);
    border-radius: 8px;
    padding: 14px 16px;
    font: inherit;
    font-size: 16px;
    color: var(--kb-navy);
    background: var(--kb-white);
    outline: none;
    transition: border-color 0.15s ease;
}

.kb-field__input::placeholder {
    color: #91b3e3;
}

.kb-field__input:focus {
    border-color: var(--kb-accent);
}

.kb-field__input--short {
    max-width: 140px;
}

.kb-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 16px 24px;
    border: 0;
    border-radius: 8px;
    background: var(--kb-navy);
    color: var(--kb-white);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.kb-btn:hover {
    background: var(--kb-navy-dark);
}

.kb-card {
    background: var(--kb-white);
}

.kb-card h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--kb-navy);
}

.kb-card p {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--kb-muted);
    line-height: 1.5;
}

.kb-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff6f5;
    color: #b92028;
    font-size: 14px;
}

.kb-challenge {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--kb-muted);
}

.kb-lead {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--kb-muted);
}

.kb-success {
    text-align: center;
    padding: 24px 0;
}

.kb-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--kb-accent-soft);
    color: var(--kb-accent);
    font-size: 28px;
    font-weight: 700;
}

.kb-page .portal-qr-frame {
    margin: 0 0 20px;
    border: 2px solid var(--kb-border);
    border-radius: 8px;
    background: #fff;
}

.kb-page .portal-qr-btn.kb-btn,
.kb-page .kb-btn.portal-qr-btn {
    width: 100%;
}

.kb-page .portal-qr-hint {
    margin-top: 12px;
}

@media (max-width: 900px) {
    .kb-page {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        min-height: 100vh;
    }

    .kb-hero {
        display: flex;
        align-items: center;
        justify-content: space-between;
        order: 1;
        flex-shrink: 0;
        min-height: 64px;
        height: 64px;
        padding: 0 16px;
        background: var(--kb-navy);
    }

    .kb-hero__logo {
        position: static;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .kb-topnav {
        position: static;
        color: #fff;
        gap: 20px;
        padding: 0;
    }

    .kb-topnav__item {
        color: #fff;
        height: 28px;
        gap: 0;
    }

    .kb-topnav__label {
        display: none;
    }

    .kb-topnav__icon {
        width: 22px;
        height: 22px;
    }

    .kb-menu__btn.is-open {
        border-color: #fff;
    }

    .kb-menu__panel {
        right: 0;
        left: auto;
    }

    .kb-main {
        order: 2;
        flex: 1;
        min-height: 0;
    }

    .kb-content {
        padding: 20px 20px 48px;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .kb-topnav__label {
        display: none;
    }
}
