/* Shared styles for mib:Peppol API access pages (login / registration) */

:root {
    --brand-blue: #1778c2;
    --brand-blue-dark: #105e9b;
    --brand-purple: #8c2d97;
    --text-main: #1f2d3d;
    --text-muted: #5b6b7b;
    --border: #d4dde7;
    --error: #c0392b;
    --success: #1e7e34;
    --warning: #9a6700;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, #eaf3fb 0%, #f6f9fc 45%, #f3ecf7 100%);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    background: #ffffff;
    width: 100%;
    max-width: 720px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(23, 120, 194, 0.14);
    padding: 40px 48px 36px;
    position: relative;
}

.card.narrow {
    max-width: 440px;
}

.brand {
    text-align: center;
    margin-bottom: 8px;
}

.brand img {
    max-width: 260px;
    height: auto;
}

h1 {
    font-size: 1.45rem;
    margin: 18px 0 6px;
    text-align: center;
}

p.lead {
    margin: 0 0 26px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
}

label .req {
    color: var(--error);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdff;
    transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(23, 120, 194, 0.15);
}

.field-error {
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 4px;
}

input.invalid, select.invalid {
    border-color: var(--error);
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.consent a {
    color: var(--brand-blue);
}

.consent a:hover {
    text-decoration: underline;
}

.consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-blue);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.captcha-row img {
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 52px;
}

.captcha-row input {
    max-width: 180px;
}

.captcha-refresh {
    background: none;
    border: none;
    color: var(--brand-blue);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}

.captcha-refresh:hover {
    text-decoration: underline;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    margin-top: 26px;
    padding: 13px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: filter .15s, transform .05s;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(1px);
}

.alt-link {
    margin-top: 22px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.alt-link a {
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: none;
}

.alt-link a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.alert.error {
    background: #fdecea;
    color: var(--error);
    border: 1px solid #f5c6c0;
}

.alert.info {
    background: #e8f1fb;
    color: var(--brand-blue-dark);
    border: 1px solid #c5dcf2;
}

.alert.warning {
    background: #fff8e1;
    color: var(--warning);
    border: 1px solid #f3e2a9;
}

.alert.success {
    background: #e9f7ef;
    color: var(--success);
    border: 1px solid #c3e6cd;
}

.confirm-icon {
    width: 72px;
    height: 72px;
    margin: 6px auto 18px;
    border-radius: 50%;
    background: #e9f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon svg {
    width: 38px;
    height: 38px;
    stroke: var(--success);
}

.steps {
    margin: 24px 0 4px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 18px 44px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-note {
    margin-top: 28px;
    text-align: center;
    font-size: 0.75rem;
    color: #93a3b3;
}

.footer-note a {
    color: var(--brand-blue);
}

.footer-note a:hover {
    text-decoration: underline;
}

/* ── Page content wrapper (constrains switcher width to card width) ── */

.page-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.page-content.wide {
    max-width: 1020px;
}

.page-content.narrow {
    max-width: 440px;
}

/* ── Language switcher (pill / segmented control) ── */

.lang-switcher {
    display: flex;
    align-items: center;
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 100px;
    padding: 3px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.lang-switcher a {
    display: block;
    padding: 4px 13px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-decoration: none;
    color: var(--text-muted);
    transition: background .15s, color .15s, box-shadow .15s;
    line-height: 1.3;
}

.lang-switcher a.active {
    background: #ffffff;
    color: var(--brand-blue-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.13);
}

.lang-switcher a:hover:not(.active) {
    color: var(--text-main);
}

.intro-box {
    background: #f0f7ff;
    border: 1px solid #c5dcf2;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.intro-box p {
    margin: 0 0 10px;
    line-height: 1.55;
}

.intro-box-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-blue-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.intro-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.6;
}

.intro-steps li {
    margin: 4px 0;
}

.password-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f0ff 100%);
    border: 2px solid var(--brand-blue);
    border-radius: 12px;
    padding: 20px 20px 16px;
    margin-top: 4px;
}

.password-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-blue-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.password-section-title svg {
    width: 16px;
    height: 16px;
    stroke: var(--brand-blue);
    fill: none;
    flex-shrink: 0;
}

.password-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.password-requirements {
    grid-column: 1 / -1;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.75);
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

.password-requirements ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.password-requirements li {
    margin: 2px 0;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 38px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color .12s, background .12s;
}

.password-toggle:hover {
    color: var(--brand-blue);
    background: rgba(23, 120, 194, 0.08);
    text-decoration: none;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 640px) {
    .card {
        padding: 28px 22px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .password-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Two-column split layout (registration page) ── */

.card.split {
    max-width: 1020px;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}

.split-left {
    flex: 0 0 370px;
    background: linear-gradient(160deg, #d8ebf9 0%, #e0d6f5 100%);
    border-right: 1px solid var(--border);
    padding: 36px 26px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.split-left a {
    color: var(--brand-blue);
}

.split-left .brand {
    text-align: left;
    margin-bottom: 0;
}

.split-left .brand img {
    max-width: 180px;
}

.split-left h1 {
    font-size: 1.18rem;
    margin: 16px 0 6px;
    text-align: left;
}

.split-left p.lead {
    text-align: left;
    font-size: 0.82rem;
    margin: 0 0 18px;
}

.desc-section {
    flex: 1;
}

.desc-title {
    font-size: 0.77rem;
    font-weight: 700;
    color: var(--brand-blue-dark);
    margin-bottom: 6px;
}

.desc-text {
    font-size: 0.81rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}

.split-left .intro-steps {
    font-size: 0.81rem;
    padding-left: 18px;
    margin: 0;
}

.split-left .intro-steps li {
    margin: 5px 0;
}

.split-left .footer-note {
    margin-top: 24px;
    text-align: left;
}

/* ── Right panel (form) ── */

.split-right {
    flex: 1;
    padding: 24px 28px 22px;
    overflow-y: auto;
    max-height: 92vh;
}

.split-right label {
    font-size: 0.74rem;
    margin-bottom: 3px;
}

.split-right input[type="text"],
.split-right input[type="email"],
.split-right input[type="tel"],
.split-right input[type="password"],
.split-right select {
    padding: 8px 10px;
    font-size: 0.87rem;
}

.split-right .grid {
    gap: 9px 14px;
}

.split-right .btn-primary {
    margin-top: 12px;
    padding: 11px 18px;
    font-size: 0.95rem;
}

.split-right .alt-link {
    margin-top: 12px;
    font-size: 0.85rem;
}

.split-right .password-input-wrapper input {
    padding-right: 38px;
}

.split-right .password-section {
    padding: 13px 14px 11px;
}

.split-right .password-section-title {
    font-size: 0.79rem;
    margin-bottom: 10px;
}

.split-right .password-requirements {
    font-size: 0.72rem;
    padding: 7px 11px;
    margin-top: 2px;
}

.split-right .consent {
    font-size: 0.79rem;
    margin-top: 2px;
}

.split-right .captcha-row img {
    height: 42px;
}

.split-right .alert {
    margin-bottom: 10px;
    font-size: 0.82rem;
    padding: 9px 12px;
}

.split-right .field-error {
    font-size: 0.72rem;
}

/* Mobile: stack vertically */
@media (max-width: 720px) {
    .card.split {
        flex-direction: column;
        max-width: 540px;
    }

    .split-left {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 24px 22px 18px;
    }

    .split-left .brand,
    .split-left h1,
    .split-left p.lead,
    .split-left .footer-note {
        text-align: center;
    }

    .split-right {
        max-height: none;
        padding: 22px 22px 20px;
    }

    .split-right input[type="text"],
    .split-right input[type="email"],
    .split-right input[type="tel"],
    .split-right input[type="password"],
    .split-right select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .split-right label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
}
