/* Auth shell: shared login + registration */

.auth-page-body {
    overflow-x: hidden;
}

/* Registration: full-width purple column only (no left hero / marketing image). */
.auth-page-body.auth-register-full .login-image-container {
    display: none !important;
}

@media (min-width: 1200px) {
    .auth-page-body.auth-register-full > .login-right {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
}

.login-right {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Vertically center auth form block; ::before/::after flex spacers when content is short; column scrolls when form + footer exceed viewport */
.auth-main-column {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.auth-main-column::before,
.auth-main-column::after {
    content: '';
    flex: 1 1 0;
    min-height: 0;
    pointer-events: none;
}

.auth-content-wrap {
    flex: 0 0 auto;
    width: 100%;
    max-width: min(100%, 90rem);
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 1.5rem;
}

/* Wider, roomier auth cards (login + register) */
.login-right .login-form.auth-form-card {
    max-width: min(100%, 36rem);
    padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem);
    margin-left: auto;
    margin-right: auto;
}

.login-right .login-form.auth-form-card.reg-wizard-shell {
    max-width: min(100%, 62rem);
    padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.5rem) 1.75rem;
}

/* Registration (public): same shell as login — subtitle + intent under title */
.register-page-lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.98rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.register-page-intent {
    color: rgba(255, 255, 255, 0.85);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
}

.register-tos-consent {
    margin-top: 1.15rem;
    margin-bottom: 0.35rem;
    padding: 1rem 1.15rem;
    background: rgba(57, 49, 104, 0.07);
    border: 1px solid rgba(57, 49, 104, 0.22);
    border-radius: 0.65rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.register-tos-heading {
    margin-bottom: 0.5rem;
    font-size: clamp(15px, 1.06rem, 17px);
    font-weight: 700;
    color: var(--dark-purple, #393168);
    line-height: 1.3;
}

.register-tos-check .register-tos-checkbox {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.2rem !important;
    cursor: pointer;
    flex-shrink: 0;
}

.register-tos-label {
    color: var(--dark-purple, #393168) !important;
    font-size: clamp(15px, 1.06rem, 17px);
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
}

.register-tos-link {
    color: var(--medium-purple, #5c4da3) !important;
    font-size: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.register-complete-page .reg-profile-card {
    max-width: min(100%, 42rem);
    padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.5rem) 2rem;
}

/* Complete profile inside app (base.jinja): wider card, dashboard-friendly shell */
.reg-complete-page--app .reg-profile-card {
    max-width: min(100%, 58rem);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.75rem) 2rem;
    background: #fff;
    border-radius: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0.35rem 1.25rem rgba(57, 49, 104, 0.08);
}

.reg-complete-page--app .reg-complete-inner {
    max-width: min(100%, 58rem);
}

/* Two-step complete profile: stepper (light surface, matches dashboard card) */
.reg-complete-stepper.reg-complete-stepper--surface {
    border-radius: 0.85rem;
    padding: 0.55rem 0.45rem 0.65rem;
    margin-bottom: 1rem;
    background: #f3f4f8;
    border: 1px solid rgba(57, 49, 104, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.reg-complete-stepper--surface .reg-progress.reg-progress--complete-profile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.45rem 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.reg-complete-stepper--surface .reg-progress-item {
    flex: 1 1 0;
    min-width: 0;
    list-style: none;
    display: flex;
}

.reg-complete-stepper--surface a.reg-progress-step {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.reg-complete-stepper--surface .reg-progress-step {
    flex: 1 1 6.5rem;
    min-width: min(100%, 7.5rem);
    max-width: none;
    color: #393168;
    background: #fff;
    border: 1px solid rgba(57, 49, 104, 0.12);
    box-shadow: 0 1px 2px rgba(57, 49, 104, 0.04);
}

.reg-complete-stepper--surface .reg-progress-step:hover {
    background: #fafbff;
    border-color: rgba(57, 49, 104, 0.2);
    color: #2a2145;
}

.reg-complete-stepper--surface .reg-progress-step.is-current {
    color: #1f185a;
    background: rgba(13, 110, 253, 0.09);
    border-color: rgba(13, 110, 253, 0.35);
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.12);
}

.reg-complete-stepper--surface .reg-step-badge {
    background: rgba(57, 49, 104, 0.08);
    color: var(--bs-primary, #0d6efd);
    border: 1px solid transparent;
}

.reg-complete-stepper--surface .reg-progress-step.is-current .reg-step-badge {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    border-color: rgba(13, 110, 253, 0.35);
}

.reg-complete-stepper--surface .reg-progress-step.is-done .reg-step-badge {
    background: rgba(25, 135, 84, 0.12);
    border: 1px solid rgba(25, 135, 84, 0.35);
}

.reg-complete-stepper--surface .reg-progress-step.is-done .reg-step-num {
    display: none;
}

.reg-complete-stepper--surface .reg-progress-step.is-done .reg-step-tick {
    display: inline-block !important;
    color: #198754;
}

.reg-complete-stepper--surface .reg-progress-step.is-locked {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.55);
}

/* Step 2 on krok 1: submit stejného formuláře jako „Pokračovat“ */
.reg-complete-stepper--surface button.reg-progress-step.reg-progress-step--submit {
    font: inherit;
    font-weight: 600;
    text-align: center;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.reg-complete-stepper--surface button.reg-progress-step.reg-progress-step--submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 186, 51, 0.45);
    outline: none;
}

.reg-complete-privacy-banner {
    border-radius: 0.85rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #d8f0e0 45%, #cfead8 100%);
    color: #1b4332;
    border: 1px solid rgba(25, 135, 84, 0.22) !important;
    box-shadow: 0 2px 12px rgba(25, 135, 84, 0.08);
}

.reg-complete-privacy-banner__icon {
    font-size: 1.75rem;
    line-height: 1;
    color: #198754;
    margin-top: 0.05rem;
}

.reg-complete-privacy-banner__text {
    line-height: 1.5;
    font-weight: 500;
}

.reg-complete-datum-phone-row .reg-section {
    height: 100%;
}

/* Same vertical band for label + hint so birth (flatpickr) and phone inputs line up */
.reg-complete-datum-phone-row .reg-complete-field-lead {
    min-height: 2.85rem;
    line-height: 1.4;
}

.reg-complete-datum-phone-row .flatpickr-alt-input.form-control,
.reg-complete-datum-phone-row input.form-control[autocomplete="tel"] {
    min-height: calc(1.5em + 0.75rem + 2px);
}

.register-page .auth-page-title {
    margin-bottom: 0.35rem !important;
}

.login-right:has(.register-page) {
    min-height: 100vh;
}

.login-right:has(.register-page) .register-page {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.login-right:has(.register-page) .register-page > .reg-wizard-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Form card entrance */
@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-card {
    animation: authCardIn 0.45s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .auth-form-card {
        animation: none;
    }

    .reg-wizard-panel.is-active {
        animation: none !important;
    }
}

/* Registration wizard — stepper fixed; panels scroll; nav docked (no white bar) */
.reg-wizard {
    width: 100%;
    margin: 0 auto 1.5rem auto;
}

.register-page .reg-wizard-shell.reg-wizard {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.register-page .reg-wizard-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-height: min(68vh, calc(100vh - 10.5rem));
}

@media (min-width: 992px) {
    .register-page .reg-wizard-body {
        max-height: min(68vh, calc(100vh - 10.5rem));
    }
}

.register-page .reg-wizard-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.reg-wizard-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.register-page .reg-progress {
    flex-shrink: 0;
}

.register-page .reg-nav {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: 0.4rem;
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

/* Step „Údaje“: Zpět / Pokračovat only at bottom of scroll — users scroll the form to reach them. */
.register-page .reg-wizard-scroll .reg-nav--scroll-end {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    padding-bottom: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 575.98px) {
    .register-page .reg-wizard-body {
        min-height: min(62vh, calc(100vh - 9rem));
    }
}

.reg-edc-tos-row .edc-toggle {
    max-width: 100%;
}

.reg-wizard-panel[hidden] {
    display: none !important;
}

.reg-wizard-panel:not([hidden]) {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: regPanelIn 0.32s ease-out both;
}

@keyframes regPanelIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step indicator (3 steps: compact tiles) */
.reg-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.45rem 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.reg-wizard-shell .reg-progress-step {
    flex: 1 1 5rem;
    min-width: 4.75rem;
    max-width: 7.5rem;
    font-size: 0.72rem;
    padding: 0.55rem 0.35rem 0.5rem;
}

.reg-wizard-shell .reg-step-label {
    line-height: 1.2;
}

.reg-progress-step {
    flex: 1 1 6.5rem;
    min-width: min(100%, 7.5rem);
    max-width: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem 0.55rem;
    border-radius: 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    word-break: break-word;
    hyphens: auto;
}

.reg-progress-step:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
}

.reg-progress-step:focus {
    outline: none;
}

.reg-progress-step:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 186, 51, 0.45);
}

.reg-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    position: relative;
}

.reg-progress-step.is-done .reg-step-badge {
    background: rgba(129, 183, 40, 0.35);
    border: 1px solid rgba(180, 220, 100, 0.5);
}

.reg-step-tick {
    display: none !important;
}

.reg-progress-step.is-done .reg-step-num {
    display: none;
}

.reg-progress-step.is-done .reg-step-tick {
    display: inline-block !important;
    font-size: 1.1rem;
    line-height: 1;
    color: #c8f28a;
}

.reg-progress-step.is-current {
    color: #fff;
    background: rgba(255, 186, 51, 0.22);
    border-color: rgba(255, 186, 51, 0.55);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.reg-progress-step.is-current .reg-step-badge {
    background: rgba(255, 186, 51, 0.45);
    color: #2a2145;
}

.reg-step-label {
    max-width: 100%;
    padding: 0 0.15rem;
}

.reg-section {
    margin-bottom: 1.25rem;
    padding: clamp(1.25rem, 3vw, 1.65rem);
    border-radius: 0.85rem;
    background: rgba(248, 249, 250, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.reg-section h3,
.reg-section h4 {
    word-wrap: break-word;
}

.reg-section h4.text-primary {
    font-size: 1rem;
}

/* Entity type: card radios */
.entity-type-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .entity-type-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.entity-type-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 0.9rem 0.95rem;
    border: 2px solid rgba(57, 49, 104, 0.12);
    border-radius: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    min-width: 0;
}

.entity-type-card:hover {
    border-color: rgba(57, 49, 104, 0.35);
}

.entity-type-card:has(.entity-type-input:checked),
.entity-type-card.is-selected {
    border-color: var(--bs-primary);
    background: rgba(13, 110, 253, 0.07);
    box-shadow: 0 4px 16px rgba(57, 49, 104, 0.12);
}

.entity-type-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.entity-type-card-body {
    flex: 1;
    min-width: 0;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.entity-type-icon-wrap {
    flex-shrink: 0;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(57, 49, 104, 0.08);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.entity-type-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--bs-primary);
}

.entity-type-card:hover .entity-type-icon-wrap {
    background: rgba(57, 49, 104, 0.12);
}

.entity-type-card:has(.entity-type-input:checked) .entity-type-icon-wrap,
.entity-type-card.is-selected .entity-type-icon-wrap {
    background: rgba(13, 110, 253, 0.18);
    color: var(--bs-primary);
}

.entity-type-card:has(.entity-type-input:checked) .entity-type-icon,
.entity-type-card.is-selected .entity-type-icon {
    color: var(--bs-primary);
}

.reg-section-lead {
    max-width: 36rem;
    line-height: 1.45;
}

.entity-type-title {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: var(--dark-purple, #393168);
}

/* Doklad: typ (karty) + číslo vedle sebe — horní hrany sladěné */
.reg-doc-identity-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.25rem;
    align-items: start;
}

@media (min-width: 576px) {
    .reg-doc-identity-row {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: start;
    }

    /* Sloupec čísla — výš s inputem zarovnaným k hornímu okraji karet typu */
    .reg-doc-number-col {
        padding-top: 0;
        margin-top: -0.2rem;
    }

    .reg-doc-number-field .form-label {
        margin-bottom: 0.35rem !important;
    }

    .reg-doc-number-field .form-text {
        margin-top: 0.25rem !important;
    }
}

.reg-doc-type-col,
.reg-doc-number-col {
    min-width: 0;
}

.reg-doc-number-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.document-type-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (max-width: 399px) {
    .document-type-cards {
        grid-template-columns: 1fr;
    }
}

.document-type-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 0.85rem 0.75rem;
    border: 2px solid rgba(57, 49, 104, 0.12);
    border-radius: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    min-width: 0;
}

.document-type-card:hover {
    border-color: rgba(57, 49, 104, 0.35);
}

.document-type-card:has(.document-type-input:checked),
.document-type-card.is-selected {
    border-color: var(--bs-primary);
    background: rgba(13, 110, 253, 0.07);
    box-shadow: 0 4px 16px rgba(57, 49, 104, 0.12);
}

.document-type-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.document-type-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.document-type-icon-wrap {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(57, 49, 104, 0.08);
    transition: background 0.2s ease;
}

.document-type-icon {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--bs-primary);
}

.document-type-card:hover .document-type-icon-wrap {
    background: rgba(57, 49, 104, 0.12);
}

.document-type-card:has(.document-type-input:checked) .document-type-icon-wrap,
.document-type-card.is-selected .document-type-icon-wrap {
    background: rgba(13, 110, 253, 0.18);
}

.document-type-title {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: var(--dark-purple, #393168);
}

/* Login card — stejné zaoblení a „karta“ jako registrace */
.login-right .login-form.auth-form-card.login-auth-card {
    border-radius: 0.85rem;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 2.75rem) 1.5rem;
    max-width: min(100%, 36rem);
    width: 100%;
    background: rgba(248, 249, 250, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 4px 6px rgba(57, 49, 104, 0.06),
        0 12px 32px rgba(57, 49, 104, 0.1);
    overflow: visible;
    margin-bottom: 1.5rem;
}

.login-page-logo {
    margin-bottom: 1.5rem !important;
}

.login-page-title {
    margin-bottom: 1.25rem !important;
}

/* Aligned pairs (číslo popisné / orientační): label + input + hint column */
.reg-split-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
}

@media (max-width: 499px) {
    .reg-split-2 {
        grid-template-columns: 1fr;
    }
}

.reg-section--street-tight h4 {
    margin-bottom: 0.5rem !important;
}

.reg-section--street-tight .form-group .form-label {
    margin-bottom: 0.2rem !important;
}

.reg-section--street-tight .form-text {
    margin-top: 0.15rem !important;
    line-height: 1.35;
}

.reg-split-2--tight {
    gap: 0.5rem 0.85rem !important;
}

.reg-section--street-tight .reg-field-stack {
    gap: 0.25rem;
}

.reg-section--street-tight .reg-field-stack .form-label.reg-label-pair {
    min-height: 0;
    align-items: flex-start;
    padding-top: 0;
}

.reg-section--street-tight .reg-field-stack .form-text {
    margin-top: 0.1rem !important;
}

.reg-field-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.reg-field-stack .form-label.reg-label-pair {
    min-height: 2.85rem;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
    line-height: 1.25;
}

.reg-field-stack .form-control {
    margin-top: 0;
}

.reg-field-stack .form-text {
    margin-top: 0.15rem;
    margin-bottom: 0;
}

/* Fields: stable grid, long text wraps */
.reg-wizard .form-label {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    margin-bottom: 0.35rem;
}

.reg-wizard .form-control,
.reg-wizard .form-select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.reg-wizard .form-text {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    display: block;
}

.reg-field-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
}

@media (min-width: 576px) {
    .reg-field-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.reg-birth-input {
    max-width: 18rem;
}

.reg-section .flatpickr-alt-input.form-control {
    max-width: 18rem;
    cursor: pointer;
    background-color: #fff;
}

.flatpickr-calendar.open {
    z-index: 2500;
}

/* Kompaktnější krok „Osoba a doklad“ (jméno, datum, doklad) */
.reg-wizard-panel--osoba-compact .reg-section h4 {
    margin-bottom: 0.35rem !important;
}

.reg-wizard-panel--osoba-compact .reg-doc-identity-row {
    gap: 0.55rem;
}

@media (min-width: 576px) {
    .reg-wizard-panel--osoba-compact .reg-doc-identity-row {
        gap: 0.75rem;
    }
}

/* Floating info video (draggable header, native resize, dismiss) */
.auth-info-video-dock {
    position: fixed;
    z-index: 1040;
    left: 1rem;
    bottom: 1rem;
    right: auto;
    top: auto;
    width: min(22rem, calc(100vw - 2rem));
    height: 12.375rem;
    min-width: 200px;
    min-height: 118px;
    max-width: calc(100vw - 2rem);
    max-height: min(80vh, 600px);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
    border-radius: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
    background: rgba(22, 20, 40, 0.98);
    backdrop-filter: blur(10px);
}

.auth-info-video-dock--dragging {
    cursor: grabbing;
    user-select: none;
}

.auth-info-video-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    background: rgba(0, 0, 0, 0.38);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.6rem 0.6rem 0 0;
    cursor: grab;
    touch-action: none;
}

.auth-info-video-dock--dragging .auth-info-video-head {
    cursor: grabbing;
}

.auth-info-video-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.2;
}

.auth-info-video-drag-icon {
    opacity: 0.65;
    font-size: 1rem;
}

.auth-info-video-close {
    flex-shrink: 0;
    opacity: 0.88;
}

.auth-info-video-frame {
    flex: 1 1 auto;
    min-height: 0;
    background: #07070d;
    border-radius: 0 0 0.5rem 0.5rem;
}

.auth-info-video-el {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 5rem;
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .auth-info-video-dock {
        width: min(18rem, calc(100vw - 2rem));
        height: 10.125rem;
    }
}

/* Client-side wizard validation (inline, no system alert()) */
.reg-wizard-client-alert {
    margin: 0 0.15rem 0.9rem 0.15rem;
    padding: 0.5rem 0.75rem 0.55rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 228, 228, 0.98);
    background: rgba(120, 32, 48, 0.35);
    border: 1px solid rgba(230, 110, 125, 0.45);
    border-radius: 0.5rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.reg-wizard .form-control.is-invalid.reg-client-invalid,
.reg-wizard .form-check-input.is-invalid.reg-client-invalid {
    border-color: rgba(230, 120, 135, 0.9);
}

.reg-wizard-scroll .reg-client-msg {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.edc-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    background: #edecf3;
    border: 1px solid #d9d7e6;
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    max-width: 100%;
}

.edc-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.edc-toggle-btn {
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    color: #4b4377;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
    user-select: none;
}

.edc-toggle-input:checked + .edc-toggle-btn {
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

.filled-button,
.reg-nav .btn {
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
}

.filled-button:hover:not(:disabled),
.reg-nav .btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.filled-button:active:not(:disabled) {
    transform: translateY(0);
}

.filled-button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.login-input:focus,
.reg-section .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(57, 49, 104, 0.2);
    border-color: rgba(57, 49, 104, 0.45);
}

.reg-nav {
    margin-top: 0.75rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.reg-error-fade {
    animation: errFade 0.25s ease-out both;
}

@keyframes errFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.signature-container canvas {
    max-width: 100%;
    height: auto !important;
    max-height: min(200px, 28vh);
}

.form-check-label {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
