/******************************************************************************
 * DobrýChov Office design system for Admidio 4.2 / Bootstrap 4
 *
 * This compatibility layer follows the core Admidio stylesheet. It keeps the
 * markup contracts used by Admidio and DobrýChov modules while presenting them as
 * one compact administrative interface.
 *****************************************************************************/

:root {
    --kchls-brand-700: #286f7d;
    --kchls-brand-600: #3c8796;
    --kchls-brand-500: #4c9aaa;
    --kchls-brand-100: #dceff2;
    --kchls-brand-050: #edf7f8;
    --kchls-navy-900: #063856;
    --kchls-navy-800: #0a4564;
    --kchls-navy-700: #125675;
    --kchls-ink-900: #17232d;
    --kchls-ink-700: #394957;
    --kchls-ink-500: #687784;
    --kchls-line-strong: #c9d3da;
    --kchls-line: #dbe2e7;
    --kchls-canvas: #f3f6f8;
    --kchls-surface: #ffffff;
    --kchls-surface-muted: #f7f9fa;
    --kchls-success: #217346;
    --kchls-success-bg: #e7f4ec;
    --kchls-warning: #96630b;
    --kchls-warning-bg: #fff4dc;
    --kchls-danger: #b4232d;
    --kchls-danger-bg: #fbeaec;
    --kchls-info: #246985;
    --kchls-info-bg: #e5f2f7;
    --kchls-radius-sm: 4px;
    --kchls-radius: 6px;
    --kchls-shadow-sm: 0 1px 2px rgba(6, 56, 86, 0.06);
    --kchls-shadow-md: 0 5px 16px rgba(6, 56, 86, 0.09);
    --kchls-topbar-height: 64px;
    --kchls-sidebar-width: 264px;
    --kchls-content-gutter: 28px;
}

/* Base and typography */

html {
    min-height: 100%;
    font-size: 15px;
}

body.admidio {
    min-height: 100vh;
    margin: 0;
    color: var(--kchls-ink-900);
    background: var(--kchls-canvas);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
    body.admidio:not(.admidio-reduced) {
        padding-top: var(--kchls-topbar-height);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--kchls-ink-900);
    font-weight: 650;
    line-height: 1.25;
}

h1 { font-size: 1.65rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }

p:last-child { margin-bottom: 0; }

a,
.btn-link,
.page-link,
a.btn {
    color: var(--kchls-brand-700);
    text-decoration: none;
}

a:hover,
.btn-link:hover,
.page-link:hover,
a.btn:hover {
    color: var(--kchls-navy-900);
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(76, 154, 170, 0.28);
    outline-offset: 2px;
}

::selection {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-100);
}

/* Application shell */

.admidio-app-shell {
    padding-right: 0;
    padding-left: 0;
}

.admidio-app-layout {
    min-height: calc(100vh - var(--kchls-topbar-height));
    margin-right: 0;
    margin-left: 0;
}

@media (min-width: 768px) {
    .admidio-app-layout {
        display: grid;
        grid-template-columns: var(--kchls-sidebar-width) minmax(0, 1fr);
    }

    .admidio-app-layout > .admidio-sidebar-spacer,
    .admidio-app-layout > .admidio-content-col {
        width: auto;
        max-width: none;
        flex: none;
    }

    .kchls-navigation-drawer {
        display: contents !important;
    }
}

.admidio-content-col {
    min-width: 0;
    padding: 0;
    background: var(--kchls-canvas);
}

.admidio-content {
    display: flex;
    min-height: calc(100vh - var(--kchls-topbar-height) - 43px);
    flex-direction: column;
    padding: 22px var(--kchls-content-gutter) 0;
}

/* Topbar and brand */

#admidio-main-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    width: 100%;
    min-height: var(--kchls-topbar-height);
    margin: 0;
    padding: 0 20px 0 14px;
    color: #ffffff;
    background: var(--kchls-brand-700);
    border-top: 3px solid var(--kchls-brand-500);
    border-bottom: 1px solid rgba(6, 56, 86, 0.22);
    box-shadow: 0 2px 8px rgba(6, 56, 86, 0.12);
}

#admidio-main-navbar .admidio-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: #ffffff;
}

#admidio-main-navbar .admidio-brand:hover,
#admidio-main-navbar .admidio-brand:focus { color: #ffffff; }

.admidio-brand-logo-frame {
    display: inline-flex;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#admidio-main-navbar .navbar-brand .admidio-brand-logo {
    width: auto;
    max-width: none;
    height: 56px;
    flex: 0 0 auto;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

.admidio-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.15;
}

.admidio-brand-context {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.admidio-brand-name {
    overflow: hidden;
    margin-top: 3px;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#admidio-main-navbar .navbar-collapse { min-width: 0; }

#admidio-main-navbar .navbar-nav {
    align-items: center;
    gap: 4px;
}

#admidio-main-navbar .nav-link.admidio-account-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 10px;
    color: #ffffff;
    border-radius: var(--kchls-radius-sm);
    font-size: 13px;
    font-weight: 500;
}

#admidio-main-navbar .admidio-user-identity {
    max-width: 240px;
}

#admidio-main-navbar .admidio-user-identity > i {
    flex: 0 0 auto;
    margin-right: 7px;
}

#admidio-main-navbar .admidio-user-identity-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#admidio-main-navbar .kchls-membership-badge {
    display: inline-flex;
    min-height: 16px;
    flex: 0 0 auto;
    align-items: center;
    margin-left: 7px;
    padding: 0 5px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(6, 56, 86, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    white-space: nowrap;
}

#admidio-main-navbar .kchls-membership-badge-guest {
    color: rgba(255, 255, 255, 0.78);
    background: rgba(6, 56, 86, 0.1);
}

#admidio-main-navbar .nav-link.admidio-account-link:hover,
#admidio-main-navbar .nav-link.admidio-account-link:focus {
    color: #ffffff;
    background: rgba(6, 56, 86, 0.2);
}

#admidio-main-navbar .admidio-language-switch {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--kchls-radius-sm);
    font-size: 0.76rem;
    white-space: nowrap;
}

#admidio-main-navbar .admidio-language-switch > .fas {
    margin-right: 5px;
}

#admidio-main-navbar .admidio-language-choice {
    min-width: 26px;
    padding: 2px 4px;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    border: 0;
    border-radius: 3px;
    font: inherit;
    cursor: pointer;
}

#admidio-main-navbar .admidio-language-choice:hover,
#admidio-main-navbar .admidio-language-choice:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    outline: 0;
}

#admidio-main-navbar .admidio-language-choice.active,
#admidio-main-navbar .admidio-language-choice:disabled {
    color: #ffffff;
    background: rgba(6, 56, 86, 0.2);
    font-weight: 700;
    cursor: default;
    opacity: 1;
}

#admidio-main-navbar .admidio-language-separator {
    color: rgba(255, 255, 255, 0.38);
}

#admidio-main-navbar .admidio-theme-switch {
    margin-right: 2px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

#admidio-main-navbar .admidio-theme-switch > i {
    margin-right: 6px;
}

#admidio-main-navbar .navbar-toggler {
    padding: 5px 8px;
    border-color: rgba(255, 255, 255, 0.55);
}

/* Sidebar navigation */

.admidio-sidebar {
    padding: 0;
    color: #ffffff;
    background: var(--kchls-navy-900);
    border-right: 1px solid rgba(6, 56, 86, 0.2);
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
}

@media (min-width: 768px) {
    .admidio-sidebar {
        position: fixed;
        top: var(--kchls-topbar-height);
        bottom: 0;
        left: 0;
        z-index: 100;
        width: var(--kchls-sidebar-width);
        height: calc(100vh - var(--kchls-topbar-height));
    }

    .admidio-menu-list { display: block !important; }
}

.admidio-headline-mobile-menu {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.admidio-headline-mobile-menu .btn {
    padding: 4px 7px;
    color: #ffffff;
}

.admidio-menu-list {
    padding: 12px 10px 24px;
    overflow-y: auto;
}

.admidio-menu-header {
    margin: 16px 8px 5px;
    padding: 0;
    color: rgba(218, 239, 244, 0.66);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admidio-menu-header:first-child { margin-top: 4px; }
.admidio-menu-node .nav-item { width: 100%; }

.admidio-menu-list .nav-link {
    display: flex;
    min-height: 36px;
    align-items: center;
    margin: 1px 0;
    padding: 7px 9px;
    color: rgba(255, 255, 255, 0.82);
    border-radius: var(--kchls-radius-sm);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.28;
    transition: color 120ms ease, background-color 120ms ease;
}

.admidio-menu-list .nav-link > .fas,
.admidio-menu-list .nav-link > .fab,
.admidio-menu-list .dropdown-item > .fas,
.admidio-menu-list .dropdown-item > .fab {
    width: 20px;
    flex: 0 0 20px;
    margin-right: 7px;
    color: #9bc8d2;
    text-align: center;
}

.admidio-menu-list .nav-link:hover,
.admidio-menu-list .nav-link:focus,
.admidio-menu-list .nav-link.active {
    color: #ffffff;
    background: var(--kchls-navy-700);
}

.admidio-menu-list .nav-link.active {
    box-shadow: inset 3px 0 0 #80c2cf;
    font-weight: 500;
}

.admidio-menu-list .nav-link:hover > .fas,
.admidio-menu-list .nav-link:focus > .fas,
.admidio-menu-list .nav-link.active > .fas,
.admidio-menu-list .nav-link:hover > .fab,
.admidio-menu-list .nav-link:focus > .fab,
.admidio-menu-list .nav-link.active > .fab { color: #ffffff; }

@media (min-width: 768px) {
    #admidio-mobile-drawer #admidio-main-menu .nav-link {
        color: rgba(255, 255, 255, 0.82);
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link:hover,
    #admidio-mobile-drawer #admidio-main-menu .nav-link:focus,
    #admidio-mobile-drawer #admidio-main-menu .nav-link.active {
        color: #ffffff;
        background: var(--kchls-navy-700);
    }
}

.admidio-menu-list .badge {
    margin-left: auto;
    color: var(--kchls-navy-900);
    background: #d8edf1;
}

.admidio-menu-list .dropdown-menu {
    min-width: 230px;
    padding: 6px;
    border-color: var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-md);
}

.admidio-menu-list .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: var(--kchls-ink-700);
    border-radius: var(--kchls-radius-sm);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.28;
}

.admidio-menu-list .dropdown-item:hover,
.admidio-menu-list .dropdown-item:focus,
.admidio-menu-list .dropdown-item.active {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-050);
}

.admidio-menu-list .dropdown-item.active {
    font-weight: 500;
}

/* The sidebar lives inside the navbar drawer, so override admidio.css' more
   specific #admidio-main-navbar a typography without changing its colors. */
#admidio-main-navbar #admidio-main-menu .nav-link,
#admidio-main-navbar #admidio-main-menu .dropdown-item {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.28;
}

#admidio-main-navbar #admidio-main-menu .nav-link.active,
#admidio-main-navbar #admidio-main-menu .dropdown-item.active {
    font-weight: 500;
}

/* Breadcrumb and page heading */

.admidio-breadcrumb {
    min-height: 52px;
    background: var(--kchls-surface);
    border-bottom: 1px solid var(--kchls-line);
}

.admidio-breadcrumb .breadcrumb {
    min-height: 52px;
    align-items: center;
    margin: 0;
    padding: 10px var(--kchls-content-gutter);
    background: transparent;
    border-radius: 0;
}

.breadcrumb-item {
    display: flex;
    min-width: 0;
    align-items: center;
    color: var(--kchls-ink-500);
}

.breadcrumb-item:not(.active),
.breadcrumb-item:not(.active) > a {
    color: var(--kchls-ink-500);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #9aa8b2;
    font-size: 12px;
}

.breadcrumb-item.active {
    color: var(--kchls-ink-900);
    font-size: 19px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.01em;
}

.breadcrumb-item.active .admidio-icon-chain {
    flex: 0 0 auto;
    color: var(--kchls-brand-700);
    font-size: 14px;
}

.admidio-page-header-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admidio-content-header {
    display: block;
    min-height: 43px;
    margin-bottom: 20px;
}

.admidio-module-headline {
    margin: 0;
    padding-top: 2px;
    color: var(--kchls-ink-900);
    font-size: 24px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: -0.015em;
}

.admidio-content-header-title-redundant {
    min-height: 0;
    margin-bottom: 0;
}

.admidio-content-header-title-redundant .admidio-module-headline {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Page actions and buttons */

.admidio-page-workspace {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: start;
}

.admidio-page-actions {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 52px;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 16px;
    padding: 8px 10px;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

.admidio-page-actions:empty { display: none; }

.admidio-module-content { display: contents; }

.admidio-module-content > * {
    min-width: 0;
    max-width: 100%;
    grid-column: 1 / -1;
}

.admidio-module-content > .navbar-filter {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    grid-column: 1;
    grid-row: 1;
}

.admidio-module-content > .admidio-blog,
.admidio-module-content > .admidio-field-group,
.admidio-module-content > .table-responsive,
.admidio-module-content > .dataTables_wrapper {
    width: 100%;
    max-width: none;
}

.admidio-module-content > .row {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
}

@supports selector(:has(*)) {
    .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter)::before {
        content: "";
        z-index: 0;
        align-self: stretch;
        grid-column: 1 / -1;
        grid-row: 1;
        background: var(--kchls-surface-muted);
        border: 1px solid var(--kchls-line);
        border-radius: var(--kchls-radius);
    }

    .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter) > .admidio-page-actions,
    .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter) > .admidio-module-content > .navbar-filter {
        margin-bottom: 0;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .admidio-page-workspace:not(:has(> .admidio-page-actions:not(:empty))) > .admidio-module-content > .navbar-filter {
        grid-column: 1 / -1;
    }

    .admidio-page-workspace:has(> .admidio-page-actions:not(:empty)) > .admidio-module-content > :first-child:not(.navbar-filter),
    .admidio-page-workspace > .admidio-module-content > .navbar-filter + * {
        margin-top: 16px;
    }
}

.admidio-menu-function-node {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.admidio-menu-function-node .nav-link { margin: 0; }

.admidio-menu-function-node .btn {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    font-size: 0.86rem;
}

.btn {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: var(--kchls-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: none;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-sm,
.btn-group-sm > .btn {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 0.82rem;
}

.btn-lg,
.btn-group-lg > .btn {
    min-height: 42px;
    padding: 9px 16px;
    font-size: 0.98rem;
}

.btn-primary,
a.btn-primary {
    color: #ffffff !important;
    background: var(--kchls-brand-700);
    border-color: var(--kchls-brand-700);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
a.btn-primary:hover {
    color: #ffffff !important;
    background: var(--kchls-navy-800);
    border-color: var(--kchls-navy-800);
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: #ffffff;
    background: #85a8af;
    border-color: #85a8af;
}

.btn-secondary,
a.btn-secondary {
    color: var(--kchls-ink-700) !important;
    background: var(--kchls-surface);
    border-color: var(--kchls-line-strong);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:not(:disabled):not(.disabled):active,
a.btn-secondary:hover {
    color: var(--kchls-navy-900) !important;
    background: var(--kchls-brand-050);
    border-color: #9fbcc3;
}

.btn-danger,
a.btn-danger {
    color: #ffffff !important;
    background: var(--kchls-danger);
    border-color: var(--kchls-danger);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active,
a.btn-danger:hover,
a.btn-danger:focus,
a.btn-danger:active {
    color: #ffffff !important;
    background: #8f1c24;
    border-color: #8f1c24;
}

.btn-danger.disabled,
.btn-danger:disabled,
a.btn-danger.disabled {
    color: #ffffff !important;
    background: var(--kchls-danger);
    border-color: var(--kchls-danger);
    opacity: 0.65;
}

.btn-link {
    min-height: auto;
    padding-right: 4px;
    padding-left: 4px;
    font-weight: 600;
}

.btn:focus,
.btn.focus,
.form-control:focus,
.custom-select:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection,
input[type="checkbox"]:focus,
input[type="radio"]:focus,
button:focus {
    border-color: var(--kchls-brand-500);
    box-shadow: 0 0 0 3px rgba(76, 154, 170, 0.18) !important;
}

.btn-group-vertical { display: block; }

.btn .fas,
.btn .fab,
.nav-link .fas,
.nav-link .fab,
.alert .fas,
.alert .fab,
.admidio-profile-user-right .fas,
.checkbox .fas,
label img,
.form-control-static img,
.admidio-icon-link .fas,
a .fas,
a .fab,
.admidio-icon-chain { margin-right: 6px; }

/* Forms */

form,
.message { max-width: 1100px; }

label,
.control-label {
    color: var(--kchls-ink-700);
    font-size: 0.88rem;
    font-weight: 600;
}

.admidio-form-field { margin-bottom: 16px; }

.form-control,
.custom-select,
select.form-control,
textarea.form-control,
.select2-container--bootstrap4 .select2-selection {
    min-height: 38px;
    color: var(--kchls-ink-900);
    background-color: var(--kchls-surface);
    border-color: var(--kchls-line-strong);
    border-radius: var(--kchls-radius-sm);
    font-size: 0.93rem;
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control::placeholder { color: #8997a2; }

.form-control:focus,
.custom-select:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection {
    color: var(--kchls-ink-900);
    background: #ffffff;
}

.form-control:disabled,
.form-control[readonly] {
    color: var(--kchls-ink-500);
    background: #edf1f3;
}

.form-control-static {
    margin-bottom: 0;
    padding-top: 7px;
}

.help-block,
.form-text,
.characters-count {
    display: block;
    margin-top: 5px;
    color: var(--kchls-ink-500);
    font-size: 0.8rem;
}

.admidio-form-group-required .control-label::after,
.admidio-form-group-required .checkbox label::after,
.admidio-form-required-notice span::after {
    margin-left: 4px;
    color: var(--kchls-danger);
    font-family: "Font Awesome 5 Free", sans-serif;
    font-size: 0.42rem;
    vertical-align: super;
    white-space: nowrap;
    content: "\f111";
}

.admidio-form-required-notice {
    display: block;
    width: 100%;
    max-width: 1100px;
    margin: 4px 0 14px;
    color: var(--kchls-ink-500);
    font-size: 0.76rem;
    text-align: right;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--kchls-brand-700);
}

.checkbox label,
.radio-inline {
    display: inline-flex;
    align-items: center;
    color: var(--kchls-ink-900);
    font-weight: 400;
}

.radio-inline { margin: 5px 18px 5px 0; }

input[type="date"] {
    width: 190px;
    max-width: 100%;
}

input[type="time"] {
    width: 112px;
    max-width: 100%;
}

.datetime-date-control,
.datetime-time-control { display: inline-block; }

.datetime-time-control {
    width: 112px !important;
    margin-left: 10px;
}

.form-inline > div,
.form-inline .form-group { padding-right: 12px; }
.form-inline label { padding-right: 6px; }

.form-upload input[type="file"] {
    max-width: 100%;
    padding: 6px;
    background: var(--kchls-surface-muted);
    border: 1px dashed var(--kchls-line-strong);
    border-radius: var(--kchls-radius-sm);
}

.form-group-editor > .control-label { margin-bottom: 7px; }
.form-custom-content > div > div { margin-top: 5px; }

.admidio-icon-link {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    cursor: pointer;
}

.admidio-info-icon {
    margin-left: 5px;
    color: var(--kchls-brand-700);
    cursor: help;
}

#admidio-password-strength {
    height: 8px !important;
    margin-top: 8px;
    background: var(--kchls-line);
    border-radius: 4px;
}

#admidio-password-strength-minimum {
    position: absolute;
    margin-top: -5px;
    border: 9px solid transparent;
    border-right-width: 0;
    border-left-color: var(--kchls-navy-900);
}

.password-icon { cursor: pointer; }

.custom-highlight,
.custom-highlight:focus {
    border-color: var(--kchls-brand-500);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(76, 154, 170, 0.18);
}

/* Cards and grouped content */

.card {
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    background: var(--kchls-surface);
    box-shadow: var(--kchls-shadow-sm);
}

.card-header {
    padding: 13px 16px;
    color: var(--kchls-ink-900);
    background: var(--kchls-surface-muted);
    border-bottom: 1px solid var(--kchls-line);
    font-size: 1rem;
    font-weight: 650;
}

.card-body { padding: 16px; }

.card-footer {
    padding: 11px 16px;
    color: var(--kchls-ink-500);
    background: var(--kchls-surface-muted);
    border-top: 1px solid var(--kchls-line);
}

.card-header .fas,
.card-header .fab {
    margin-right: 8px;
    color: var(--kchls-brand-700);
}

.card-header .float-right .fas,
.card-header .dropdown .fas,
.card-header .dropdown .fab { margin-right: 0; }

.admidio-blog,
.admidio-field-group {
    max-width: 1100px;
    margin-bottom: 22px;
    border: 1px solid var(--kchls-line);
}

.admidio-blog .card-header,
.admidio-blog .card-body,
.admidio-blog .card-footer,
.admidio-field-group .card-header,
.admidio-field-group .card-body,
.admidio-field-group .card-footer { background: var(--kchls-surface); }

.admidio-blog .card-header,
.admidio-field-group .card-header { background: var(--kchls-surface-muted); }
.admidio-blog .card-footer { font-size: 0.8rem; }

/* Dates: detailed event-card typography */

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-header {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body {
    color: var(--kchls-ink-700);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > .row > [class*="col-"] {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 19px;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > .row > [class*="col-"]:nth-child(odd) {
    color: var(--kchls-ink-700);
    font-weight: 500;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > .row > [class*="col-"]:nth-child(even) {
    color: var(--kchls-ink-900);
    font-size: 14px;
    font-weight: 500;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > .row strong {
    font-weight: 500;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > p,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > ul,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > ol {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h1,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h2,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h3,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h4,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h5,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > h6,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-body > p strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-footer,
#admidio-events .admidio-module-content > .admidio-blog[id^="dat_"] > .card-footer .admidio-info-created-edited {
    font-size: 12px !important;
    font-weight: 400;
    line-height: 17px;
}

/* Announcements: contain stored rich HTML; scroll wide tables on narrow viewports. */

#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] {
    min-width: 0;
    max-width: 100%;
}

#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body img {
    max-width: 100%;
    height: auto;
}

#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body iframe,
#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body embed,
#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body object,
#admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body video {
    max-width: 100%;
}

@media (max-width: 991.98px) {

    #admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        font-size: 13px;
        line-height: 1.45;
        table-layout: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    #admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body table th,
    #admidio-announcements .admidio-module-content > .admidio-blog[id^="ann_"] > .card-body table td {
        min-width: 112px;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

}

/* Groups and roles card view */

#admidio-groups-roles .admidio-module-content > h2 {
    margin: 22px 0 12px;
    color: var(--kchls-ink-900);
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.01em;
}

#admidio-groups-roles .admidio-module-content > .navbar-filter + h2 {
    margin-top: 4px;
}

#admidio-groups-roles .admidio-module-content > .row.admidio-margin-bottom {
    display: grid;
    width: 100%;
    margin: 0 0 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

#admidio-groups-roles .admidio-module-content > .row.admidio-margin-bottom > [class*="col-"] {
    display: flex;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
    flex: none;
}

#admidio-groups-roles .admidio-card {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: none;
}

#admidio-groups-roles .admidio-card > .card-body {
    width: 100%;
    min-width: 0;
    padding: 16px;
    color: var(--kchls-ink-700);
    background: var(--kchls-surface);
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

#admidio-groups-roles .admidio-card .card-title {
    margin: 0 0 9px;
    color: var(--kchls-ink-900);
    font-size: 17px;
    font-weight: 600;
    line-height: 22px;
    overflow-wrap: anywhere;
}

#admidio-groups-roles .admidio-card .list-group {
    display: flex;
    margin: 0 0 14px;
    flex-direction: column;
}

#admidio-groups-roles .admidio-card .list-group-item {
    padding: 0 0 10px;
    color: var(--kchls-ink-700);
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

#admidio-groups-roles .admidio-card .list-group-item h6 {
    margin: 0 0 3px;
    color: var(--kchls-ink-500);
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

#admidio-groups-roles .admidio-card .list-group-item:last-child {
    display: flex;
    order: 20;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 2px;
    padding: 10px 0 0;
    color: var(--kchls-ink-500);
    border-top: 1px solid var(--kchls-line);
    font-size: 12px;
    font-weight: 500;
    line-height: 17px;
}

#admidio-groups-roles .admidio-card .list-group-item:last-child > .d-block {
    display: inline !important;
}

@supports selector(:has(*)) {
    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) {
        display: flex;
        order: 30;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
        padding: 10px 0 0;
        border-top: 1px solid var(--kchls-line);
    }

    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link {
        display: inline-flex;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        color: var(--kchls-ink-500);
        background: transparent;
        border: 1px solid transparent;
        border-radius: var(--kchls-radius-sm);
        text-decoration: none;
    }

    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link:hover,
    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link:focus {
        color: var(--kchls-brand-700);
        background: var(--kchls-brand-050);
        border-color: var(--kchls-line);
        outline: 0;
    }

    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link:has(.fa-trash-alt) {
        color: #94535a;
    }

    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link:has(.fa-trash-alt):hover,
    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link:has(.fa-trash-alt):focus {
        color: var(--kchls-danger);
        background: #fff3f3;
        border-color: #e8c9cc;
    }

    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link > .fas,
    #admidio-groups-roles .admidio-card .list-group-item:first-child:has(> a.admidio-icon-link:first-child) > .admidio-icon-link > .fab {
        margin: 0;
    }
}

#admidio-groups-roles .admidio-card > .card-body > .btn.btn-primary {
    align-self: flex-start;
    min-height: 34px;
    margin-top: auto !important;
    padding: 6px 10px;
    color: var(--kchls-ink-700) !important;
    background: var(--kchls-surface);
    border-color: var(--kchls-line-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

#admidio-groups-roles .admidio-card > .card-body > .btn.btn-primary:hover,
#admidio-groups-roles .admidio-card > .card-body > .btn.btn-primary:focus {
    color: var(--kchls-navy-900) !important;
    background: var(--kchls-brand-050);
    border-color: var(--kchls-brand-500);
}

@media (min-width: 1600px) {
    #admidio-groups-roles .admidio-module-content > .row.admidio-margin-bottom {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    #admidio-groups-roles .admidio-module-content > .row.admidio-margin-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    #admidio-groups-roles .admidio-module-content > .row.admidio-margin-bottom {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

.admidio-field-group .list-group-item {
    padding: 10px 0;
    background: transparent;
    border-color: var(--kchls-line);
}

.admidio-field-group .list-group-item .list-group-item { padding: 0; }

.card .admidio-info-created-edited,
.card-footer .admidio-info-created-edited {
    margin: 0;
    font-size: 0.8rem !important;
}

.admidio-blog-comment {
    margin-bottom: 14px;
    background: var(--kchls-surface-muted);
}

.admidio-blog-comment .card-header,
.admidio-blog-comment .card-body,
.admidio-blog-comment .card-footer { background: var(--kchls-surface-muted); }

.admidio-blog-comment .card-header {
    padding-bottom: 10px;
    font-size: 0.95rem;
}

.admidio-blog .card-body > .btn {
    display: block;
    margin-top: 14px;
    text-align: left;
}

/* Dashboard */

.admidio-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: start;
    margin: 0;
    padding: 0 0 22px;
}

.kchls-dashboard-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 16px;
}

.admidio-overview-plugin {
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
}

.admidio-overview-grid .admidio-card {
    display: flex;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    overflow: visible !important;
    box-shadow: none;
}

.admidio-overview-grid .admidio-card .card-body {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    padding: 18px;
    overflow: visible !important;
}

.kchls-dashboard-column-secondary .admidio-card .card-body {
    padding: 16px;
}

.admidio-overview-grid .admidio-plugin-content {
    display: flex;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    flex-direction: column;
    color: var(--kchls-ink-900);
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    overflow: visible !important;
}

.admidio-overview-grid .admidio-plugin-content > h1,
.admidio-overview-grid .admidio-plugin-content > h2,
.admidio-overview-grid .admidio-plugin-content > h3,
.admidio-overview-grid .admidio-plugin-content > h4 {
    flex: 0 0 auto;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--kchls-line);
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

.admidio-overview-grid ul,
.admidio-overview-grid ol {
    margin-bottom: 0;
}

.admidio-overview-grid .admidio-plugin-content > .list-group,
.admidio-overview-grid .kchls-widget-list {
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    overflow: visible !important;
}

.admidio-overview-grid .list-group-item {
    padding: 10px 0;
    background: transparent;
    border-width: 0 0 1px;
    border-color: var(--kchls-line);
}

.admidio-overview-grid .list-group-item > h5 {
    margin: 0 0 4px;
    color: var(--kchls-ink-900);
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
}

.admidio-overview-grid .list-group-item > div {
    color: var(--kchls-ink-700);
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

.admidio-overview-grid .list-group-item > div p,
.admidio-overview-grid .list-group-item > div li {
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

.admidio-overview-grid .list-group-item em,
.admidio-overview-grid .list-group-item small {
    color: var(--kchls-ink-500);
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
}

.admidio-overview-grid .list-group-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

.admidio-overview-grid img {
    max-width: 100%;
    height: auto;
    border-radius: var(--kchls-radius-sm);
}

/* Work-focused dashboard cards. */

.kchls-dashboard-card .card-body {
    display: flex;
    flex-direction: column;
}

.kchls-dashboard-card-title {
    flex: 0 0 auto;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--kchls-line);
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

.kchls-dashboard-column-secondary .kchls-dashboard-card-title {
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: 15px;
    line-height: 21px;
}

.kchls-dashboard-card .admidio-plugin-content > h3 {
    display: none;
}

/* Plugin-specific normalization of titles, metadata and controls. */

/* Guest login keeps the native Admidio form and only normalizes its presentation. */

.kchls-dashboard-guest #admidio-plugin-login-form .kchls-login-card {
    background: #f4f8fa;
    border-color: #cfdbe2;
    border-top: 3px solid #5d95a8;
    box-shadow: none;
}

.kchls-dashboard-guest #admidio-plugin-login-form .kchls-dashboard-card-title {
    color: #17324a;
}

#admidio-plugin-login-form #plugin_login_form,
#admidio-plugin-login-form #plugin-login-form {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    overflow: visible !important;
}

#admidio-plugin-login-form #plugin-login-form .form-group {
    margin-bottom: 11px;
}

#admidio-plugin-login-form #plugin-login-form label {
    margin-bottom: 4px;
    color: var(--kchls-ink-700);
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

#admidio-plugin-login-form #plugin-login-form .form-control {
    width: 100%;
    min-height: 36px;
    padding: 6px 9px;
    background-color: #ffffff;
    font-size: 13px;
    line-height: 18px;
}

#admidio-plugin-login-form #plugin-login-form .input-group {
    width: 100%;
    margin-bottom: 11px;
}

#admidio-plugin-login-form #plugin-login-form .input-group .form-control {
    width: 1%;
    flex: 1 1 auto;
    margin-bottom: 0;
}

#admidio-plugin-login-form #plugin-login-form .input-group-text {
    min-width: 38px;
    justify-content: center;
    padding: 6px 9px;
    color: var(--kchls-ink-500);
    background: var(--kchls-surface-muted);
    border-color: var(--kchls-line-strong);
    cursor: pointer;
}

#admidio-plugin-login-form #plugin-login-form .form-check {
    margin: 1px 0 11px;
}

#admidio-plugin-login-form #plugin-login-form .form-check-label {
    margin-bottom: 0;
    font-weight: 400;
}

#admidio-plugin-login-form #plugin-login-form button[type="submit"] {
    display: inline-flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    margin: 1px 0 0;
    padding: 7px 12px;
    font-size: 13px;
}

#admidio-plugin-login-form #plugin_login_form > .btn-group-vertical {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--kchls-line);
}

#admidio-plugin-login-form #plugin_login_form > .btn-group-vertical .btn.admidio-icon-link {
    width: auto;
    min-height: 0;
    padding: 0;
    color: var(--kchls-brand-700);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 17px;
    text-align: left;
    white-space: normal;
    box-shadow: none;
}

#admidio-plugin-login-form #plugin_login_form > .btn-group-vertical .btn.admidio-icon-link:hover,
#admidio-plugin-login-form #plugin_login_form > .btn-group-vertical .btn.admidio-icon-link:focus {
    color: var(--kchls-brand-900);
    background: transparent;
    text-decoration: underline;
}

#admidio-plugin-login-form #plugin_login_form > .btn-group-vertical .btn.admidio-icon-link > i {
    margin-right: 5px;
}

#plugin-latest-documents-files .list-group-item {
    padding: 8px 0;
}

#plugin-latest-documents-files .btn.admidio-icon-link {
    display: inline-flex;
    min-height: 0;
    align-items: baseline;
    gap: 7px;
    padding: 0;
    color: var(--kchls-brand-700);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    text-align: left;
    white-space: normal;
}

#plugin-latest-documents-files .btn.admidio-icon-link > i {
    width: 14px;
    flex: 0 0 14px;
    margin-right: 0;
    color: var(--kchls-ink-500);
    text-align: center;
}

#plugin_sidebar_announcements .list-group-item > h5 a,
#plugin_sidebar_dates .list-group-item > h5 a {
    color: var(--kchls-brand-700);
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
}

#plugin_sidebar_dates .list-group-item > h5 {
    margin-bottom: 6px;
    color: var(--kchls-ink-500);
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
}

#plugin_sidebar_dates .list-group-item > h5 a {
    display: block;
    margin-top: 2px;
}

#plugin_sidebar_dates .list-group-item > strong,
#plugin_sidebar_dates .list-group-item > span {
    font-size: 12px;
    line-height: 17px;
}

#plugin_sidebar_dates .list-group-item > strong {
    font-weight: 600;
}

#plugin_sidebar_dates .list-group-item {
    padding: 12px 0;
}

#plugin_sidebar_dates .list-group-item:first-child,
#plugin_sidebar_announcements .list-group-item:first-child {
    padding-top: 0;
}

#plugin_sidebar_dates .list-group-item > div {
    margin-top: 6px;
}

#plugin_sidebar_announcements .list-group-item {
    padding: 14px 0;
}

#plugin_sidebar_announcements .list-group-item > h5 {
    margin-bottom: 5px;
}

#plugin_sidebar_announcements .list-group-item > div + div {
    margin-top: 4px;
}

/* Personalized read-only widgets. */

.kchls-dashboard-authenticated .kchls-my-registrations-card,
.kchls-dashboard-authenticated .kchls-my-dogs-card,
.kchls-dashboard-authenticated .kchls-my-breeding-requests-card {
    background: #f4f8fa;
    border-color: #c9d8df;
    border-top: 3px solid #5d95a8;
    box-shadow: none;
}

.kchls-membership-summary-card .card-body {
    padding: 14px 16px;
}

.kchls-membership-summary-card .kchls-dashboard-card-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.kchls-membership-validity {
    color: var(--kchls-ink-900);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.kchls-membership-renewal-note {
    margin: 4px 0 0;
    color: var(--kchls-ink-500);
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
}

.kchls-membership-summary-expiring {
    background: #fffaf0;
    border-color: #e4d5ae;
    border-left: 3px solid #bd9747;
}

.kchls-widget-list {
    width: 100%;
}

.kchls-widget-list .kchls-widget-item,
.kchls-widget-list .kchls-widget-item:last-child {
    padding: 9px 0;
    font-size: 13px;
    line-height: 18px;
}

.kchls-widget-list .kchls-widget-item:first-child {
    padding-top: 0;
}

.kchls-widget-item-title {
    color: var(--kchls-brand-700);
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
}

.kchls-widget-metadata {
    margin-top: 2px;
    color: var(--kchls-ink-500) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 17px !important;
}

.kchls-widget-empty {
    margin: 0;
    padding: 4px 0 10px;
    color: var(--kchls-ink-500);
    font-size: 13px;
    line-height: 18px;
}

.kchls-widget-footer-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 9px;
    color: var(--kchls-brand-700);
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

.kchls-widget-footer-link > i {
    margin-right: 6px;
}

.kchls-my-registrations-card .kchls-widget-list .kchls-widget-item,
.kchls-my-registrations-card .kchls-widget-list .kchls-widget-item:last-child {
    padding: 11px 0;
}

.kchls-registration-event-heading {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
}

.kchls-registration-date {
    color: var(--kchls-ink-500) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 17px !important;
    white-space: nowrap;
}

.kchls-registration-subjects {
    display: grid;
    gap: 5px;
    margin: 7px 0 0 96px;
    padding-left: 12px;
    border-left: 1px solid var(--kchls-line);
}

.kchls-registration-subject {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.kchls-registration-subject-name {
    min-width: 0;
    color: var(--kchls-ink-700);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.kchls-status-badge {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    padding: 1px 6px;
    border: 1px solid transparent;
    border-radius: var(--kchls-radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
}

.kchls-status-confirmed {
    color: var(--kchls-success);
    background: var(--kchls-success-bg);
    border-color: rgba(42, 122, 76, 0.18);
}

.kchls-status-registered {
    color: var(--kchls-warning);
    background: var(--kchls-warning-bg);
    border-color: rgba(145, 102, 21, 0.18);
}

.kchls-status-waiting {
    color: var(--kchls-brand-700);
    background: var(--kchls-surface-muted);
    border-color: var(--kchls-line-strong);
}

.kchls-breeding-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-top: 7px;
}

.kchls-breeding-pdf-link {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    gap: 5px;
    color: var(--kchls-brand-700);
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

.kchls-breeding-pdf-link:hover,
.kchls-breeding-pdf-link:focus {
    color: var(--kchls-navy-900);
    text-decoration: underline;
}

.kchls-status-payment {
    color: var(--kchls-warning);
    background: var(--kchls-warning-bg);
    border-color: rgba(150, 99, 11, 0.18);
}

.kchls-status-processing {
    color: var(--kchls-info);
    background: var(--kchls-info-bg);
    border-color: rgba(36, 105, 133, 0.18);
}

.kchls-status-cancelled {
    color: var(--kchls-danger);
    background: var(--kchls-danger-bg);
    border-color: rgba(180, 35, 45, 0.16);
}

.kchls-status-neutral {
    color: var(--kchls-ink-700);
    background: var(--kchls-surface-muted);
    border-color: var(--kchls-line);
}

.kchls-registration-table-subject,
.kchls-registration-table-status {
    min-height: 22px;
    padding: 1px 0;
    font-size: 13px;
    line-height: 20px;
}

/* The monthly calendar remains a secondary, compact dashboard aid. */

#admidio-plugin-calendar #plgCalendarContent {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

#admidio-plugin-calendar #plgCalendarTable {
    width: 100%;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 1px;
}

#admidio-plugin-calendar #plgCalendarTable th,
#admidio-plugin-calendar #plgCalendarTable td {
    height: auto;
    padding: 5px 2px;
    color: var(--kchls-ink-700);
    font-size: 12px;
    line-height: 17px;
    text-align: center;
}

#admidio-plugin-calendar #plgCalendarTable th.plgCalendarHeader {
    padding-top: 2px;
    padding-bottom: 8px;
    color: var(--kchls-ink-900);
    font-size: 13px;
    font-weight: 600;
}

#admidio-plugin-calendar #plgCalendarTable th.plgCalendarHeader > a {
    display: inline-flex;
    min-width: 24px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    color: var(--kchls-brand-700);
    border-radius: var(--kchls-radius-sm);
}

#admidio-plugin-calendar #plgCalendarTable th.plgCalendarHeader > a:hover,
#admidio-plugin-calendar #plgCalendarTable th.plgCalendarHeader > a:focus {
    background: var(--kchls-surface-muted);
    text-decoration: none;
}

#admidio-plugin-calendar #plgCalendarTable td > a,
#admidio-plugin-calendar #plgCalendarTable td > span {
    display: inline-flex;
    min-width: 23px;
    min-height: 23px;
    align-items: center;
    justify-content: center;
}

#admidio-plugin-calendar #plgCalendarTable td.plgCalendarToday {
    color: #ffffff;
    background: var(--kchls-navy-700);
    border-radius: var(--kchls-radius-sm);
}

#admidio-plugin-calendar #plgCalendarTable td.plgCalendarToday > a,
#admidio-plugin-calendar #plgCalendarTable td.plgCalendarToday > span {
    color: #ffffff;
    background: transparent;
}

#admidio-plugin-calendar #plgCalendarReset {
    margin-top: 8px;
    font-size: 12px;
    line-height: 17px;
    text-align: center;
}

#plugin_random_photo > a:first-of-type {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
}

#plugin_random_photo > a:first-of-type img {
    width: 100%;
    height: auto !important;
    max-height: none;
    margin: 0;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center;
}

#admidio-plugin-random-photo .admidio-card,
#admidio-plugin-random-photo .card-body,
#admidio-plugin-random-photo #plugin_random_photo {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

#plugin_random_photo > a:last-of-type:not(:first-of-type) {
    flex: 0 0 auto;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

/* Tables and data grids */

.table-responsive,
.dataTables_wrapper { margin-bottom: 22px; }

.table-responsive {
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-sm);
}

.table {
    width: 100%;
    margin-bottom: 18px;
    color: var(--kchls-ink-900);
    background: var(--kchls-surface);
    font-size: 0.88rem;
}

.table-responsive > .table { margin-bottom: 0; }

.table th,
.table td {
    padding: 9px 11px;
    vertical-align: middle;
    border-top-color: var(--kchls-line);
}

.table thead th {
    color: var(--kchls-ink-700);
    background: #edf2f4;
    border-top: 0;
    border-bottom: 1px solid var(--kchls-line-strong);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-striped tbody tr:nth-of-type(odd) { background: var(--kchls-surface-muted); }

.table-hover tbody tr:hover {
    color: var(--kchls-ink-900);
    background: var(--kchls-brand-050);
}

.table-bordered,
.table-bordered th,
.table-bordered td { border-color: var(--kchls-line); }

.admidio-group-heading td {
    color: var(--kchls-navy-800);
    background: var(--kchls-brand-050);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--kchls-ink-500);
    font-size: 0.82rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 34px;
    margin-left: 6px;
    border: 1px solid var(--kchls-line-strong);
    border-radius: var(--kchls-radius-sm);
}

/* Filters, navigation, pagination and accordions */

.navbar button { margin-bottom: 0; }
.navbar label { margin-right: 8px; }

.navbar-filter {
    min-height: 52px;
    margin: 0 0 16px;
    padding: 8px 10px;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: none;
}

.navbar-filter .navbar-brand:empty { display: none !important; }

.navbar-filter .navbar-collapse { min-width: 0; }

.navbar-filter .form-inline {
    width: 100%;
    max-width: none;
    margin: 0;
    align-items: center;
    gap: 6px 10px;
}

.navbar-filter .form-inline > div,
.navbar-filter .form-group {
    margin: 0;
    padding-right: 0;
}

.navbar-filter .form-group {
    display: flex;
    align-items: center;
}

.navbar-filter label {
    margin: 0 7px 0 0;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.navbar-filter .form-control,
.navbar-filter .custom-select,
.navbar-filter .select2-selection {
    min-height: 32px;
    font-size: 0.84rem;
}

.nav-tabs { border-bottom-color: var(--kchls-line-strong); }

.nav-tabs .nav-link {
    padding: 8px 12px;
    color: var(--kchls-ink-500);
    border-radius: var(--kchls-radius-sm) var(--kchls-radius-sm) 0 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    color: var(--kchls-navy-900);
    border-color: var(--kchls-line) var(--kchls-line) var(--kchls-line-strong);
}

.nav-tabs .nav-link.active {
    color: var(--kchls-navy-900);
    background: var(--kchls-surface);
    border-color: var(--kchls-line-strong) var(--kchls-line-strong) var(--kchls-surface);
}

.tab-content {
    margin-bottom: 22px;
    padding-top: 16px;
}

.pagination { margin-bottom: 22px; }

.page-link {
    min-width: 34px;
    padding: 6px 9px;
    color: var(--kchls-brand-700);
    border-color: var(--kchls-line);
    text-align: center;
}

.page-item.active .page-link {
    color: #ffffff;
    background: var(--kchls-navy-800);
    border-color: var(--kchls-navy-800);
}

.page-item.disabled .page-link {
    color: #9ba7af;
    background: var(--kchls-surface-muted);
}

.accordion .card { margin-bottom: 8px; }

.accordion .card-header {
    color: var(--kchls-brand-700);
    cursor: pointer;
}

.accordion .card-header:hover {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-050);
}

.dropdown-menu {
    padding: 6px;
    border-color: var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-md);
}

.dropdown-item {
    padding: 7px 10px;
    border-radius: var(--kchls-radius-sm);
    font-size: 0.88rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-050);
}

.dropdown-menu .btn { text-align: left; }

/* Alerts, badges and statuses */

.alert {
    max-width: 1100px;
    padding: 11px 14px;
    border-width: 1px 1px 1px 4px;
    border-radius: var(--kchls-radius-sm);
    font-size: 0.9rem;
}

.alert-info {
    color: #174e64;
    background: var(--kchls-info-bg);
    border-color: #acd4e2 #acd4e2 #acd4e2 var(--kchls-info);
}

.alert-success {
    color: #185737;
    background: var(--kchls-success-bg);
    border-color: #b8ddc8 #b8ddc8 #b8ddc8 var(--kchls-success);
}

.alert-warning {
    color: #704a08;
    background: var(--kchls-warning-bg);
    border-color: #efd49b #efd49b #efd49b var(--kchls-warning);
}

.alert-danger {
    color: #7f1921;
    background: var(--kchls-danger-bg);
    border-color: #efbbc0 #efbbc0 #efbbc0 var(--kchls-danger);
}

.badge {
    margin-left: 5px;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-primary,
.badge-info {
    color: #ffffff;
    background: var(--kchls-brand-700);
}

.badge-secondary,
.badge-light {
    color: var(--kchls-ink-700);
    background: #e7ecef;
}

.badge-success { background: var(--kchls-success); }
.badge-warning { color: #ffffff; background: var(--kchls-warning); }
.badge-danger { background: var(--kchls-danger); }

.admidio-event-highlight .card-header,
tr.admidio-event-highlight { background: var(--kchls-brand-050); }

.admidio-event-approval-state-attend .fas { color: var(--kchls-success) !important; }
.admidio-event-approval-state-tentative .fas { color: var(--kchls-warning) !important; }
.admidio-event-approval-state-cancel .fas { color: var(--kchls-danger) !important; }

/* Modal, popover and messages */

.modal-content {
    border: 0;
    border-radius: var(--kchls-radius);
    box-shadow: 0 14px 40px rgba(6, 56, 86, 0.22);
}

.modal-header {
    align-items: center;
    padding: 15px 18px;
    background: var(--kchls-surface-muted);
    border-bottom-color: var(--kchls-line);
}

.modal-title { font-size: 1.12rem; }

.modal-header .close {
    margin: -8px -6px -8px auto;
    padding: 8px;
    color: var(--kchls-ink-700);
    text-shadow: none;
}

.modal-body { padding: 18px; }

.modal-footer {
    padding: 12px 18px;
    background: var(--kchls-surface-muted);
    border-top-color: var(--kchls-line);
}

.popover {
    border-color: var(--kchls-line);
    box-shadow: var(--kchls-shadow-md);
}

.popover-header {
    color: #ffffff;
    background: var(--kchls-navy-900);
    border-bottom-color: var(--kchls-navy-800);
}

.popover-body {
    color: var(--kchls-ink-700);
    background: var(--kchls-surface);
}

.message { margin-bottom: 22px; }

.message .lead {
    color: var(--kchls-ink-900);
    font-size: 1rem;
    line-height: 1.55;
}

/* General Admidio helpers */

.admidio-blog,
.admidio-field-group,
.admidio-img-presenter,
.admidio-info-created-edited,
.admidio-margin-bottom,
.admidio-content-subheader { margin-bottom: 22px; }

.admidio-content-subheader {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--kchls-line);
}

.admidio-opacity-reduced { opacity: 0.48; }
.list-unstyled li { padding-top: 6px; }
.admidio-info-created { display: block; }

.admidio-info-created-edited {
    color: var(--kchls-ink-500);
    font-size: 0.78rem;
}

.admidio-profile-user-right { cursor: help; }
.admidio-album-thumbnail { margin-bottom: 18px; }

/* Photo albums: keep the module thumbnail centred, but separate it from the card edge. */
#admidio-photos .admidio-album > .admidio-card > a:first-child > .card-img-top {
    max-width: 100%;
    height: auto;
    margin-top: 18px;
    object-fit: contain;
    object-position: center;
}

.admidio-img-presenter img {
    max-width: 100%;
    height: auto;
    border-radius: var(--kchls-radius-sm);
}

.progress {
    height: 12px !important;
    background: var(--kchls-line);
    border-radius: 4px;
}

/* Footer */

#imprint.admidio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    margin-bottom: 0;
    padding: 18px 0 20px;
    color: var(--kchls-ink-500);
    border-top: 1px solid var(--kchls-line);
    font-size: 0.76rem;
}

.admidio-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px 12px;
}

.admidio-footer-links a + a {
    position: relative;
    padding-left: 12px;
}

.admidio-footer-links a + a::before {
    position: absolute;
    left: 0;
    color: var(--kchls-line-strong);
    content: "·";
}

/* Reduced and standalone pages */

body.admidio-reduced { padding: 24px; }

.admidio-reduced-shell {
    width: 100%;
    max-width: 1280px;
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-sm);
}

.admidio-reduced .admidio-content {
    min-height: auto;
    padding: 24px;
}

#admidio-back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 7px;
    font-size: 0.88rem;
    font-weight: 600;
}

/* DobrýChov module tables and pedigree */

/* Row search in the pedigree register */

#radkove_hledani .kchls-pedigree-mode-nav {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    padding: 3px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#radkove_hledani .kchls-pedigree-mode {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 12px;
    color: var(--kchls-ink-700);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius-sm);
    font-size: 0.87rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

#radkove_hledani .kchls-pedigree-mode:hover,
#radkove_hledani .kchls-pedigree-mode:focus {
    color: var(--kchls-navy-800);
    background: var(--kchls-brand-050);
    border-color: var(--kchls-line-strong);
    text-decoration: none;
}

#radkove_hledani .kchls-pedigree-mode.is-active,
#radkove_hledani .kchls-pedigree-mode[aria-current="page"] {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-100);
    border-color: #9fc4ce;
}

#radkove_hledani .kchls-pedigree-mode .fa {
    color: var(--kchls-brand-700);
    font-size: 0.8rem;
}

#radkove_hledani .kchls-pedigree-search,
#radkove_hledani .kchls-pedigree-search > .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#radkove_hledani .kchls-pedigree-search > .container > .row:first-child {
    margin: 0;
}

#radkove_hledani .kchls-pedigree-search > .container > .row:first-child > .col-md-12 {
    padding: 0;
}

#radkove_hledani .kchls-pedigree-search-heading {
    display: none;
}

#radkove_hledani .form-search-wrap2 {
    margin: 0;
    padding: 16px;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-sm);
}

#radkove_hledani .kchls-pedigree-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) minmax(160px, 0.85fr) minmax(240px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

#radkove_hledani .kchls-pedigree-search-form > .row {
    display: contents;
}

#radkove_hledani .kchls-pedigree-search-form .col-md-4,
#radkove_hledani .kchls-pedigree-search-form .col-md-12 {
    width: auto;
    max-width: none;
    margin: 0 !important;
    padding: 0;
    flex: none;
    text-align: left !important;
}

#radkove_hledani .kchls-pedigree-search-form label {
    display: block;
    margin: 0 0 5px;
    color: var(--kchls-ink-700);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

#radkove_hledani .kchls-pedigree-search-form .form-control {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    font-size: 0.87rem;
}

#radkove_hledani .kchls-pedigree-search-form .btn {
    width: auto;
    min-width: 104px;
    min-height: 36px;
    padding: 6px 14px;
}

#radkove_hledani .kchls-pedigree-results {
    margin: 16px 0 0;
}

#radkove_hledani .kchls-pedigree-results > .col-md-12,
#radkove_hledani .kchls-pedigree-pagination > .col-md-12 {
    padding: 0;
}

#radkove_hledani .kchls-pedigree-results #table:empty {
    display: none;
}

#radkove_hledani .kchls-pedigree-pagination {
    gap: 8px;
    margin: 0;
}

#radkove_hledani .kchls-pedigree-pagination:has(button:not([style*="display:none"])) {
    margin-top: 12px;
}

@media (max-width: 1199.98px) {
    #radkove_hledani .kchls-pedigree-search-form {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    }

    #radkove_hledani .kchls-pedigree-search-form .col-md-12 {
        display: flex;
        justify-content: flex-end;
    }
}

@media (max-width: 767.98px) {
    #radkove_hledani .kchls-pedigree-mode-nav {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    #radkove_hledani .kchls-pedigree-mode {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    #radkove_hledani .form-search-wrap2 {
        padding: 14px;
    }

    #radkove_hledani .kchls-pedigree-search-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    #radkove_hledani .kchls-pedigree-search-form .col-md-12,
    #radkove_hledani .kchls-pedigree-search-form .btn {
        display: block;
        width: 100%;
    }
}

/* Breed planner: native DobrýChov Office workspace and components. */

#chov_breed_planner .kbp-wrap {
    width: 100%;
    min-width: 0;
    padding-bottom: 28px;
}

#chov_breed_planner .kbp-intro {
    margin: 0 0 16px;
    color: var(--kchls-ink-700);
    font-size: 0.94rem;
}

#chov_breed_planner .kbp-intro p { margin: 0; }

#chov_breed_planner .kchls-pedigree-mode-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 18px;
    padding: 3px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_breed_planner .kchls-pedigree-mode {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 12px;
    color: var(--kchls-ink-700);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius-sm);
    font-size: 0.87rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

#chov_breed_planner a.kchls-pedigree-mode:hover,
#chov_breed_planner a.kchls-pedigree-mode:focus {
    color: var(--kchls-navy-800);
    background: var(--kchls-brand-050);
    border-color: var(--kchls-line-strong);
    text-decoration: none;
}

#chov_breed_planner .kchls-pedigree-mode.is-active,
#chov_breed_planner .kchls-pedigree-mode[aria-current="page"] {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-100);
    border-color: var(--kchls-brand-500);
}

#chov_breed_planner .kchls-pedigree-mode.is-disabled {
    color: var(--kchls-ink-500);
    background: var(--kchls-surface-muted);
    border-color: transparent;
    cursor: default;
}

#chov_breed_planner .kchls-pedigree-mode small {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.82;
}

#chov_breed_planner .kbp-card {
    min-width: 0;
    margin-bottom: 16px;
}

#chov_breed_planner .kbp-selection-card .card-body {
    padding-bottom: 18px;
}

#chov_breed_planner .kbp-breed-field {
    max-width: 520px;
    margin-bottom: 0;
}

#chov_breed_planner .kbp-parent-grid {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--kchls-line);
}

#chov_breed_planner .kbp-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#chov_breed_planner .kbp-grid > * { min-width: 0; }

#chov_breed_planner .kbp-parent-field { margin-bottom: 0; }

#chov_breed_planner .kbp-selection-card label {
    margin-bottom: 5px;
    color: var(--kchls-ink-700);
    font-size: 0.84rem;
    font-weight: 600;
}

#chov_breed_planner .kbp-results { position: relative; }

#chov_breed_planner .kbp-dropdown {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 20;
    display: none;
    max-height: 300px;
    overflow: auto;
    color: var(--kchls-ink-900);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line-strong);
    border-radius: 0 0 var(--kchls-radius) var(--kchls-radius);
    box-shadow: var(--kchls-shadow-md);
}

#chov_breed_planner .kbp-option {
    padding: 9px 11px;
    border-bottom: 1px solid var(--kchls-line);
    cursor: pointer;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-option:last-child { border-bottom: 0; }

#chov_breed_planner .kbp-option:hover {
    background: var(--kchls-brand-050);
}

#chov_breed_planner .kbp-picked {
    display: none;
    margin-top: 10px;
    padding: 11px 12px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-picked.is-visible { display: block; }

#chov_breed_planner .kbp-picked-name {
    color: var(--kchls-ink-900);
    font-weight: 650;
}

#chov_breed_planner .kbp-picked-meta {
    margin-top: 2px;
    color: var(--kchls-ink-700);
    font-size: 0.86rem;
}

#chov_breed_planner .kbp-picked-links {
    margin-top: 7px;
    font-size: 0.82rem;
}

#chov_breed_planner .kbp-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

#chov_breed_planner .kbp-status {
    color: var(--kchls-ink-700);
    font-size: 0.9rem;
}

#chov_breed_planner .kbp-status.is-error { color: var(--kchls-danger); }
#chov_breed_planner .kbp-status.is-ok { color: var(--kchls-success); }
#chov_breed_planner .kbp-output { display: none; }

#chov_breed_planner .kbp-result-title {
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

#chov_breed_planner .kbp-result-note {
    margin: 0 0 14px;
    color: var(--kchls-ink-500);
    font-size: 0.84rem;
}

#chov_breed_planner .kbp-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

#chov_breed_planner .kbp-pair-dog {
    min-width: 0;
    padding: 14px 16px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_breed_planner .kbp-pair-role {
    color: var(--kchls-ink-500);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

#chov_breed_planner .kbp-pair-name {
    margin-top: 3px;
    color: var(--kchls-ink-900);
    font-size: 1.05rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-pair-meta {
    min-height: 20px;
    margin-top: 3px;
    color: var(--kchls-ink-700);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-pedigree-link { margin-top: 10px; }

#chov_breed_planner .kbp-pair-x {
    align-self: center;
    color: var(--kchls-ink-500);
    font-size: 1.6rem;
    font-weight: 300;
    text-align: center;
}

#chov_breed_planner .kbp-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

#chov_breed_planner .kbp-metric {
    min-width: 0;
    padding: 13px;
    text-align: center;
    background: var(--kchls-brand-050);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_breed_planner .kbp-metric span {
    display: block;
    color: var(--kchls-ink-700);
    font-size: 0.79rem;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-metric strong {
    display: block;
    margin-top: 4px;
    color: var(--kchls-navy-900);
    font-size: 1.42rem;
    line-height: 1.25;
}

#chov_breed_planner .kbp-metric small {
    display: block;
    margin-top: 4px;
    color: var(--kchls-ink-500);
    font-size: 0.71rem;
    line-height: 1.3;
}

#chov_breed_planner .kbp-relation {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    color: var(--kchls-info);
    background: var(--kchls-info-bg);
    border: 1px solid var(--kchls-info);
    border-radius: var(--kchls-radius);
}

#chov_breed_planner .kbp-relation strong {
    display: block;
    margin-bottom: 2px;
}

#chov_breed_planner .kbp-relation.is-close {
    color: var(--kchls-warning);
    background: var(--kchls-warning-bg);
    border-color: var(--kchls-warning);
}

#chov_breed_planner .kbp-relation.is-very-close {
    color: var(--kchls-danger);
    background: var(--kchls-danger-bg);
    border-color: var(--kchls-danger);
}

#chov_breed_planner .kbp-warn {
    margin-top: 10px;
    padding: 10px 12px;
    color: var(--kchls-warning);
    background: var(--kchls-warning-bg);
    border: 1px solid var(--kchls-warning);
    border-radius: var(--kchls-radius);
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-info {
    margin-top: 10px;
    padding: 10px 12px;
    color: var(--kchls-info);
    background: var(--kchls-info-bg);
    border: 1px solid var(--kchls-info);
    border-radius: var(--kchls-radius);
}

#chov_breed_planner .kbp-tech {
    margin-top: 12px;
    color: var(--kchls-ink-500);
    font-size: 0.74rem;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-table-card .card-header h3 {
    margin: 0;
    font-size: 1rem;
}

#chov_breed_planner .kbp-table-card .card-header p {
    margin: 3px 0 0;
    color: var(--kchls-ink-500);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

#chov_breed_planner .kbp-table-region {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

#chov_breed_planner .kbp-table {
    width: 100%;
    min-width: 420px;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.87rem;
}

#chov_breed_planner .kbp-table th,
#chov_breed_planner .kbp-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--kchls-line);
    vertical-align: top;
}

#chov_breed_planner .kbp-table th {
    color: var(--kchls-ink-700);
    background: var(--kchls-surface-muted);
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

#chov_breed_planner .kbp-table tr:last-child td { border-bottom: 0; }

#chov_breed_planner .kbp-ancestor-name {
    color: var(--kchls-ink-900);
    font-weight: 600;
    overflow-wrap: anywhere;
}

#chov_breed_planner .kbp-generation {
    color: var(--kchls-ink-700);
    white-space: normal;
}

#chov_breed_planner .kbp-expand { margin-top: 10px; }

#chov_breed_planner .kbp-empty {
    margin: 0;
    color: var(--kchls-ink-500);
}

@media (max-width: 1199.98px) {
    #chov_breed_planner .kbp-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    #chov_breed_planner .kbp-result-grid,
    #chov_breed_planner .kbp-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    #chov_breed_planner .kbp-pair-x {
        line-height: 1;
        transform: rotate(90deg);
    }
}

@media (max-width: 767.98px) {
    #chov_breed_planner .kchls-pedigree-mode-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    #chov_breed_planner .kchls-pedigree-mode {
        flex: 0 0 auto;
    }

    #chov_breed_planner .kbp-parent-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #chov_breed_planner .kbp-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #chov_breed_planner .kbp-actions .btn { width: 100%; }
}

@media (max-width: 575.98px) {
    #chov_breed_planner .kbp-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    #chov_breed_planner .kbp-selection-card .card-body,
    #chov_breed_planner .kbp-summary-card .card-body,
    #chov_breed_planner .kbp-table-card .card-body {
        padding: 14px;
    }

    #chov_breed_planner .kbp-pair-dog { padding: 13px 14px; }
    #chov_breed_planner .kbp-pedigree-link { width: 100%; }
    #chov_breed_planner .kbp-table { font-size: 0.82rem; }
}

/* Pedigree tools: shared navigation, responsive subject card and isolated graph scroller. */

#chov_pedigree_tools #kchls-pedigree-tools {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#chov_pedigree_tools .kchls-pedigree-mode-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 18px;
    padding: 3px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_pedigree_tools .kchls-pedigree-mode {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 12px;
    color: var(--kchls-ink-700);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius-sm);
    font-size: 0.87rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

#chov_pedigree_tools .kchls-pedigree-mode:hover,
#chov_pedigree_tools .kchls-pedigree-mode:focus {
    color: var(--kchls-navy-800);
    background: var(--kchls-brand-050);
    border-color: var(--kchls-line-strong);
    text-decoration: none;
}

#chov_pedigree_tools .kchls-pedigree-mode.is-active,
#chov_pedigree_tools .kchls-pedigree-mode[aria-current="page"] {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-100);
    border-color: var(--kchls-brand-500);
}

#chov_pedigree_tools .kpt-filter-card,
#chov_pedigree_tools .kpt-output,
#chov_pedigree_tools .kpt-output > * {
    min-width: 0;
    max-width: 100%;
}

#chov_pedigree_tools .kpt-filter-card { overflow: visible; }

#chov_pedigree_tools .kpt-breed-card .form-group {
    max-width: 520px;
}

#chov_pedigree_tools .kpt-filter-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

#chov_pedigree_tools .kpt-filter-card label {
    margin-bottom: 5px;
    color: var(--kchls-ink-700);
    font-size: 0.84rem;
    font-weight: 600;
}

#chov_pedigree_tools .kpt-search-wrap { position: relative; }

#chov_pedigree_tools .kpt-results {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 30;
}

#chov_pedigree_tools .kpt-results:empty { display: none; }

#chov_pedigree_tools .kpt-results .list-group {
    max-height: 300px;
    overflow-y: auto;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line-strong);
    border-radius: var(--kchls-radius);
    box-shadow: var(--kchls-shadow-md);
}

#chov_pedigree_tools .kpt-results .list-group-item { overflow-wrap: anywhere; }

#chov_pedigree_tools .kpt-picked {
    color: var(--kchls-ink-900);
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-controls-card .form-row { row-gap: 10px; }

#chov_pedigree_tools #kpt-status {
    color: var(--kchls-ink-700);
    font-size: 0.9rem;
}

#chov_pedigree_tools .kpt-pedigree-subject-card .card-body { padding: 18px; }

#chov_pedigree_tools .kpt-pedigree-subject {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

#chov_pedigree_tools .kpt-pedigree-subject-photo {
    display: flex;
    width: 150px;
    min-height: 112px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: var(--kchls-surface-muted);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_pedigree_tools .kpt-pedigree-subject-photo img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 136px;
    object-fit: contain;
}

#chov_pedigree_tools .kpt-pedigree-subject-copy { min-width: 0; }

#chov_pedigree_tools .kpt-pedigree-subject-copy h2 {
    margin: 0 0 3px;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-pedigree-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

#chov_pedigree_tools .kpt-pedigree-metrics > div {
    min-width: 0;
    padding: 12px;
    text-align: center;
    background: var(--kchls-brand-050);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_pedigree_tools .kpt-pedigree-metrics span {
    display: block;
    color: var(--kchls-ink-700);
    font-size: 0.78rem;
}

#chov_pedigree_tools .kpt-pedigree-metrics strong {
    display: block;
    margin-top: 4px;
    color: var(--kchls-navy-900);
    font-size: 1.34rem;
    line-height: 1.25;
}

#chov_pedigree_tools .kpt-pedigree-context-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

#chov_pedigree_tools .kpt-pedigree-graph-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

#chov_pedigree_tools .kpt-pedigree-graph-card > .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#chov_pedigree_tools .kpt-pedigree-help {
    display: block;
    margin-top: 2px;
    color: var(--kchls-ink-500);
    font-size: 0.77rem;
    font-weight: 400;
}

#chov_pedigree_tools .kpt-pedigree-deep-help {
    max-width: 360px;
    color: var(--kchls-info);
    font-size: 0.79rem;
    font-weight: 600;
    text-align: right;
}

#chov_pedigree_tools .kpt-pedigree-graph-card > .card-body {
    min-width: 0;
    max-width: 100%;
    padding: 12px;
    overflow: hidden;
}

#chov_pedigree_tools .kpt-pedigree-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--kchls-line-strong) var(--kchls-surface-muted);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

#chov_pedigree_tools .kpt-pedigree-graph {
    margin: 0;
    color: var(--kchls-ink-900);
}

#chov_pedigree_tools .kpt-pedigree-graph thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    color: var(--kchls-ink-700);
    background: var(--kchls-surface-muted);
    border-color: var(--kchls-line);
    font-size: 0.76rem;
    font-weight: 650;
    text-align: center;
}

#chov_pedigree_tools .kpt-pedigree-cell {
    background-clip: padding-box;
    border-color: var(--kchls-line) !important;
    transition: opacity 140ms ease, box-shadow 140ms ease;
}

#chov_pedigree_tools .kpt-pedigree-node {
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-pedigree-node .kpt-pedigree-dog {
    max-width: 100%;
    color: var(--kchls-navy-800);
    font-size: inherit;
    line-height: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-pedigree-node-photo {
    width: auto;
    max-width: 72px;
    height: auto;
    max-height: 56px;
    float: left;
    margin: 0 8px 4px 0;
    object-fit: contain;
}

#chov_pedigree_tools .kpt-pedigree-node-clear { clear: both; }

#chov_pedigree_tools .kpt-repeat-toggle {
    display: inline-flex;
    min-width: 28px;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    margin: 0 5px 4px 0;
    padding: 1px 6px;
    color: var(--kchls-navy-800);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-brand-500);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

#chov_pedigree_tools .kpt-repeat-toggle:hover,
#chov_pedigree_tools .kpt-repeat-toggle:focus {
    color: var(--kchls-navy-900);
    background: var(--kchls-brand-100);
}

#chov_pedigree_tools .kpt-pedigree-scroll.has-repeat-highlight .kpt-pedigree-cell {
    opacity: 0.42;
}

#chov_pedigree_tools .kpt-pedigree-scroll.has-repeat-highlight .kpt-pedigree-cell[data-highlighted="1"] {
    position: relative;
    z-index: 2;
    opacity: 1;
    box-shadow: inset 0 0 0 3px var(--kchls-brand-700);
}

#chov_pedigree_tools .kpt-pedigree-scroll.is-deep-pedigree .kpt-pedigree-cell {
    padding: 6px !important;
}

#chov_pedigree_tools .kpt-pedigree-scroll.is-deep-pedigree .kpt-pedigree-node {
    font-size: 0.82rem;
}

#chov_pedigree_tools .kpt-page {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

#chov_pedigree_tools .kpt-search-filter-card .form-row,
#chov_pedigree_tools .kpt-search-card .form-row {
    row-gap: 12px;
}

#chov_pedigree_tools .kpt-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

#chov_pedigree_tools .kpt-search-actions .btn {
    margin: 0 !important;
}

#chov_pedigree_tools .kpt-output .card-header {
    color: var(--kchls-navy-900);
    background: var(--kchls-surface-muted);
    border-bottom-color: var(--kchls-line);
    font-weight: 650;
}

#chov_pedigree_tools .kpt-result-summary-card .card-body,
#chov_pedigree_tools .kpt-result-section-card .card-body,
#chov_pedigree_tools .kpt-line-card .card-body {
    min-width: 0;
    padding: 18px;
}

#chov_pedigree_tools .kpt-result-summary-card h3 {
    margin: 0 0 5px;
    color: var(--kchls-navy-900);
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-result-title {
    margin: 13px 0 8px;
    color: var(--kchls-brand-700);
    font-size: 1.08rem;
    font-weight: 700;
}

#chov_pedigree_tools .kpt-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

#chov_pedigree_tools .kpt-metrics > div {
    min-width: 0;
    padding: 13px 12px;
    text-align: center;
    background: var(--kchls-brand-050);
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius);
}

#chov_pedigree_tools .kpt-metrics span {
    display: block;
    color: var(--kchls-ink-700);
    font-size: 0.78rem;
    line-height: 1.3;
}

#chov_pedigree_tools .kpt-metrics strong {
    display: block;
    margin-top: 5px;
    color: var(--kchls-navy-900);
    font-size: 1.22rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#chov_pedigree_tools .kpt-relationship-metrics > div:first-child {
    background: var(--kchls-info-bg);
}

#chov_pedigree_tools .kpt-relationship-metrics > div:first-child strong {
    font-size: 0.98rem;
}

#chov_pedigree_tools .kpt-line-grid > [class*="col-"] {
    display: flex;
}

#chov_pedigree_tools .kpt-line-card {
    width: 100%;
}

#chov_pedigree_tools .kpt-line-card ol {
    margin: 0;
    padding-left: 1.35rem;
}

#chov_pedigree_tools .kpt-line-card li + li {
    margin-top: 7px;
}

#chov_pedigree_tools .kpt-table-region {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

#chov_pedigree_tools .kpt-data-table {
    min-width: 620px;
    margin-bottom: 0;
}

#chov_pedigree_tools .kpt-data-table thead th {
    color: var(--kchls-ink-700);
    background: var(--kchls-surface-muted);
    border-bottom-color: var(--kchls-line-strong);
    white-space: nowrap;
}

#chov_pedigree_tools .kpt-data-table td {
    vertical-align: middle;
}

#chov_pedigree_tools .kpt-search-results-table {
    min-width: 1040px;
}

#chov_pedigree_tools .kpt-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

#chov_pedigree_tools .kpt-row-actions .btn {
    margin: 0;
    border-radius: var(--kchls-radius-sm) !important;
}

@media (max-width: 1199.98px) {
    #chov_pedigree_tools .kpt-pedigree-metrics,
    #chov_pedigree_tools .kpt-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    #chov_pedigree_tools .kchls-pedigree-mode-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    #chov_pedigree_tools .kchls-pedigree-mode { flex: 0 0 auto; }

    #chov_pedigree_tools .kpt-pedigree-subject {
        grid-template-columns: minmax(0, 1fr);
    }

    #chov_pedigree_tools .kpt-pedigree-subject-photo {
        width: 132px;
        min-height: 96px;
    }

    #chov_pedigree_tools .kpt-pedigree-graph-card > .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    #chov_pedigree_tools .kpt-pedigree-deep-help {
        max-width: none;
        text-align: left;
    }

    #chov_pedigree_tools .kpt-pedigree-context-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }

    #chov_pedigree_tools .kpt-filter-card .card-body,
    #chov_pedigree_tools .kpt-result-summary-card .card-body,
    #chov_pedigree_tools .kpt-result-section-card .card-body,
    #chov_pedigree_tools .kpt-line-card .card-body {
        padding: 14px;
    }

    #chov_pedigree_tools .kpt-search-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #chov_pedigree_tools .kpt-search-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    #chov_pedigree_tools .kpt-pedigree-metrics,
    #chov_pedigree_tools .kpt-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    #chov_pedigree_tools .kpt-pedigree-context-actions .btn {
        width: 100%;
        flex-basis: 100%;
    }

    #chov_pedigree_tools .kpt-pedigree-graph-card > .card-body { padding: 8px; }
}

/* Pedigree report: wide screen workspace with an isolated mobile scroller. */

@media screen {
    #rodokmen .kchls-pedigree-page {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 0 6px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    #rodokmen .kchls-pedigree-page > .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    #rodokmen .kchls-pedigree-page > .container > .row {
        width: 100%;
        margin: 0;
    }

    #rodokmen .kchls-pedigree-page > .container > .row > .col-md-12 {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 0;
        flex: none;
    }

    #rodokmen .kchls-pedigree-page table.report {
        width: 100%;
        max-width: none;
        margin: 0;
        table-layout: auto;
    }

    #rodokmen .kchls-pedigree-page table.report td.reportheader {
        padding: 14px 16px;
        background: var(--kchls-surface);
        border-bottom-color: var(--kchls-line-strong);
    }

    #rodokmen .kchls-pedigree-page .printable {
        display: flex;
        justify-content: flex-end;
        margin: 0 0 4px;
        font-size: 12px;
        font-weight: 500;
        line-height: 17px;
    }

    #rodokmen .kchls-pedigree-page .reportname {
        margin: 0 0 8px;
        color: var(--kchls-ink-500);
        font-size: 13px;
        font-weight: 600;
        line-height: 18px;
    }

    #rodokmen .kchls-pedigree-page .headcontainer {
        display: flex;
        min-width: 0;
        align-items: flex-start;
        gap: 16px;
    }

    #rodokmen .kchls-pedigree-page .headleft {
        flex: 0 0 auto;
    }

    #rodokmen .kchls-pedigree-page .headleft:empty {
        display: none;
    }

    #rodokmen .kchls-pedigree-page .headright {
        min-width: 0;
        flex: 1 1 auto;
    }

    #rodokmen .kchls-pedigree-page .namewithtitles {
        margin: 0 0 3px;
        font-size: 21px;
        font-weight: 600;
        line-height: 1.3;
    }

    #rodokmen .kchls-pedigree-page .subjectdetails {
        color: var(--kchls-ink-700);
        font-size: 13px;
        font-weight: 400;
        line-height: 1.5;
    }

    #rodokmen .kchls-pedigree-page .subjectlinks,
    #rodokmen .kchls-pedigree-page .genlinks {
        margin-top: 7px;
        font-size: 12px;
        font-weight: 400;
        line-height: 17px;
    }

    #rodokmen .kchls-pedigree-page img.pedphoto {
        width: auto;
        max-width: 150px !important;
        height: auto !important;
        object-fit: contain;
    }
}

@media screen and (max-width: 991.98px) {
    #rodokmen .kchls-pedigree-page table.report {
        width: 1100px;
        min-width: 1100px;
    }
}

.rtable {
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    vertical-align: top;
    white-space: nowrap;
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line);
    border-collapse: collapse;
    border-spacing: 0;
    border-radius: var(--kchls-radius);
    -webkit-overflow-scrolling: touch;
}

.rtable th,
.rtable td {
    padding: 7px 10px;
    border: 1px solid var(--kchls-line);
}

.rtable th {
    color: var(--kchls-ink-700);
    background: #edf2f4;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-align: left;
    text-transform: uppercase;
}

.rtable--flip {
    display: flex;
    overflow: hidden;
    background: var(--kchls-surface);
}

.rtable--flip thead {
    display: flex;
    min-width: min-content;
    flex-shrink: 0;
}

.rtable--flip tbody {
    position: relative;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--kchls-surface);
}

.rtable--flip tr {
    display: flex;
    min-width: min-content;
    flex-direction: column;
    flex-shrink: 0;
}

.rtable--flip td,
.rtable--flip th { display: block; }

.rtable--flip td {
    border-left: 0;
    background-image: none !important;
}

.rtable td:first-child,
.rtable td:last-child,
.rtable--flip tbody tr:first-child,
.rtable--flip tbody tr:last-child {
    background-image: none;
}

.rtable--flip th:not(:last-child),
.rtable--flip td:not(:last-child) { border-bottom: 0; }

table.search,
table.report,
table.result {
    width: 100%;
    color: var(--kchls-ink-900);
    background: var(--kchls-surface);
    border: 1px solid var(--kchls-line-strong);
    border-collapse: collapse;
    font-size: 0.86rem;
}

table.search { max-width: 800px; }

table.search th,
table.report th,
table.result th {
    padding: 8px 9px;
    color: var(--kchls-ink-700);
    background: #edf2f4;
    border: 1px solid var(--kchls-line-strong);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

table.search td,
table.report tbody > tr td,
table.result td,
tr.result td {
    padding: 7px 9px;
    border: 1px solid var(--kchls-line);
    text-align: left;
}

table.result tr:nth-of-type(even),
tr.altresult { background: var(--kchls-surface-muted); }

span.legendcolor {
    display: inline-block;
    width: 20px;
}

div.legenditem {
    display: inline-block;
    margin-left: 0;
    padding: 4px;
}

.form-table { width: 100%; }
.btn-sub { margin-left: 8px; }

div.subject,
div.namewithtitles {
    color: var(--kchls-ink-900);
    font-size: 1.45rem;
    font-weight: 650;
}

.subjectcall {
    color: var(--kchls-ink-500);
    font-size: 1rem;
    font-style: italic;
}

div.subjectdetails {
    color: var(--kchls-ink-700);
    font-size: 0.84rem;
    font-weight: 600;
}

div.subjectlinks,
div.genlinks {
    margin-top: 9px;
    color: var(--kchls-brand-700);
    font-size: 0.8rem;
}

div.subjectlinks a,
div.genlinks a { color: var(--kchls-brand-700); }
span.ancestor { font-size: 0.8rem; }

span.ancestordetails {
    color: var(--kchls-ink-700);
    font-size: 0.76rem;
    word-break: break-word;
}

span.ancestorsiblings {
    color: var(--kchls-success);
    font-size: 0.76rem;
}

.field-wrapper,
.field-wrapper-matka,
.field-wrapper-stene {
    padding: 10px;
    border: 1px solid var(--kchls-line);
    border-radius: var(--kchls-radius-sm);
}

.field-wrapper {
    background: #e3f3f7;
    border-color: #acd5df;
}

.field-wrapper-matka {
    background: #fbecef;
    border-color: #e8bbc3;
}

.field-wrapper-stene {
    background: #eef1f3;
    border-color: #ccd5da;
}

/* Responsive behavior */

@media (max-width: 1199.98px) and (min-width: 992px) {
    .admidio-overview-grid {
        grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
    }
}

@media (max-width: 991.98px) {
    .admidio-page-workspace {
        display: flex;
        flex-direction: column;
    }

    .admidio-page-actions {
        width: 100%;
        min-height: 0;
        order: 1;
        margin-bottom: 10px;
        padding: 8px;
    }

    .admidio-module-content > .navbar-filter {
        width: 100%;
        min-height: 0;
        order: 2;
        margin-bottom: 16px;
        padding: 10px;
    }

    .admidio-module-content > *:not(.navbar-filter) { order: 3; }

    @supports selector(:has(*)) {
        .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter)::before {
            content: none;
        }

        .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter) > .admidio-page-actions {
            margin-bottom: 10px;
            background: var(--kchls-surface);
            border-color: var(--kchls-line);
        }

        .admidio-page-workspace:has(> .admidio-page-actions:not(:empty), > .admidio-module-content > .navbar-filter) > .admidio-module-content > .navbar-filter {
            margin-bottom: 16px;
            background: var(--kchls-surface);
            border-color: var(--kchls-line);
        }

        .admidio-page-workspace:has(> .admidio-page-actions:not(:empty)) > .admidio-module-content > :first-child:not(.navbar-filter),
        .admidio-page-workspace > .admidio-module-content > .navbar-filter + * {
            margin-top: 0;
        }
    }

    .admidio-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .kchls-dashboard-column {
        display: contents;
    }

    #admidio-plugin-sidebar-dates { order: 1; }
    #admidio-plugin-my-registrations { order: 2; }
    #admidio-plugin-my-dogs { order: 3; }
    #admidio-plugin-my-breeding-requests { order: 4; }
    #admidio-plugin-latest-documents-files { order: 5; }
    #admidio-plugin-sidebar-announcements { order: 6; }
    #admidio-plugin-current-breedings { order: 7; }
    #admidio-plugin-calendar { order: 8; }
    #admidio-plugin-random-photo { order: 9; }

    .kchls-dashboard-authenticated #admidio-plugin-membership-summary { order: 1; }
    .kchls-dashboard-authenticated #admidio-plugin-my-registrations { order: 2; }
    .kchls-dashboard-authenticated #admidio-plugin-my-dogs { order: 3; }
    .kchls-dashboard-authenticated #admidio-plugin-my-breeding-requests { order: 4; }
    .kchls-dashboard-authenticated #admidio-plugin-sidebar-dates { order: 5; }
    .kchls-dashboard-authenticated #admidio-plugin-latest-documents-files { order: 6; }
    .kchls-dashboard-authenticated #admidio-plugin-sidebar-announcements { order: 7; }
    .kchls-dashboard-authenticated #admidio-plugin-current-breedings { order: 8; }
    .kchls-dashboard-authenticated #admidio-plugin-calendar { order: 9; }
    .kchls-dashboard-authenticated #admidio-plugin-random-photo { order: 10; }

    .kchls-dashboard-guest #admidio-plugin-login-form { order: 1; }
    .kchls-dashboard-guest #admidio-plugin-sidebar-dates { order: 2; }
    .kchls-dashboard-guest #admidio-plugin-latest-documents-files { order: 3; }
    .kchls-dashboard-guest #admidio-plugin-sidebar-announcements { order: 4; }
    .kchls-dashboard-guest #admidio-plugin-current-breedings { order: 5; }
    .kchls-dashboard-guest #admidio-plugin-calendar { order: 6; }
    .kchls-dashboard-guest #admidio-plugin-random-photo { order: 7; }
}

@media (max-width: 991.98px) and (min-width: 768px) {
    :root {
        --kchls-sidebar-width: 232px;
        --kchls-content-gutter: 22px;
    }

    .admidio-brand-context { display: none; }
    .admidio-brand-name { margin-top: 0; }
}

@media (max-width: 767.98px) {
    :root {
        --kchls-content-gutter: 16px;
        --kchls-mobile-topbar-height: 60px;
    }

    body.admidio:not(.admidio-reduced) {
        padding-top: var(--kchls-mobile-topbar-height);
    }

    #admidio-main-navbar.fixed-top {
        position: fixed;
        top: 0;
    }

    #admidio-main-navbar {
        min-height: var(--kchls-mobile-topbar-height);
        justify-content: flex-start;
        padding: 0 12px;
    }

    #admidio-main-navbar .admidio-brand {
        flex: 0 1 auto;
        margin-right: 0;
    }

    .admidio-brand-logo-frame {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    #admidio-main-navbar .navbar-brand .admidio-brand-logo {
        height: 52px;
        object-fit: contain;
        object-position: center;
    }

    #admidio-main-navbar .navbar-toggler {
        display: inline-flex;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 0;
        background-color: transparent;
        border: 1px solid transparent;
        border-radius: var(--kchls-radius-sm);
        box-shadow: none !important;
    }

    #admidio-main-navbar .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath stroke='rgba%28255,255,255,0.88%29' stroke-linecap='round' stroke-width='2' d='M3 6h18M3 12h18M3 18h18'/%3e%3c/svg%3e");
        background-position: center;
        background-size: 20px 20px;
    }

    #admidio-main-navbar .navbar-toggler:focus,
    #admidio-main-navbar .navbar-toggler.collapsed,
    #admidio-main-navbar .navbar-toggler[aria-expanded="false"] {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none !important;
    }

    #admidio-main-navbar .navbar-toggler:focus:not(:focus-visible) {
        outline: 0;
    }

    #admidio-main-navbar .navbar-toggler:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.9);
        outline-offset: 2px;
        box-shadow: none !important;
    }

    #admidio-main-navbar .navbar-toggler[aria-expanded="true"],
    #admidio-main-navbar .navbar-toggler[aria-expanded="true"]:focus {
        background-color: rgba(6, 56, 86, 0.16);
        border-color: rgba(255, 255, 255, 0.2);
    }

    #admidio-main-navbar .navbar-toggler:active {
        background-color: rgba(6, 56, 86, 0.22);
    }

    @media (hover: hover) {
        #admidio-main-navbar .navbar-toggler[aria-expanded="false"]:hover {
            background-color: transparent;
            border-color: rgba(255, 255, 255, 0.16);
        }

        #admidio-main-navbar .navbar-toggler[aria-expanded="true"]:hover {
            background-color: rgba(6, 56, 86, 0.2);
            border-color: rgba(255, 255, 255, 0.24);
        }
    }

    .admidio-brand-context { display: none; }

    .admidio-brand-name {
        max-width: calc(100vw - 145px);
        margin-top: 0;
        font-size: 0.98rem;
    }

    #admidio-main-navbar .kchls-navigation-drawer {
        position: fixed;
        top: var(--kchls-mobile-topbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1029;
        width: 100%;
        max-width: 100vw;
        flex-direction: column;
        color: #ffffff;
        background: var(--kchls-navy-900);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #admidio-main-navbar .kchls-navigation-drawer.show,
    #admidio-main-navbar .kchls-navigation-drawer.collapsing {
        display: flex;
    }

    #admidio-main-navbar .kchls-navigation-drawer.collapsing {
        height: calc(100vh - var(--kchls-mobile-topbar-height)) !important;
        transition: none;
    }

    #admidio-main-navbar .kchls-navigation-account {
        display: block;
        width: 100%;
        flex: 0 0 auto;
        padding: 8px 0 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    #admidio-main-navbar .navbar-nav { align-items: stretch; }
    #admidio-main-navbar .admidio-language-switch-item {
        padding: 4px 12px;
    }
    #admidio-main-navbar .admidio-language-switch {
        width: 100%;
        justify-content: flex-start;
        padding-left: 7px;
        box-sizing: border-box;
    }
    #admidio-main-navbar .nav-link.admidio-account-link {
        width: 100%;
        padding-left: 19px;
    }
    #admidio-main-navbar #admidio-mobile-drawer .nav-link.admidio-theme-switch {
        width: calc(100% - 24px);
        margin-right: 12px;
        margin-left: 12px;
        padding-left: 6px;
        box-sizing: border-box;
    }
    #admidio-main-navbar #admidio-mobile-drawer .kchls-navigation-account .admidio-account-link > .fas,
    #admidio-main-navbar #admidio-mobile-drawer .kchls-navigation-account .admidio-account-link > .fab {
        width: 20px;
        flex: 0 0 20px;
        margin-right: 7px;
        text-align: center;
    }
    #admidio-main-navbar .admidio-user-identity { max-width: 100%; }

    .admidio-app-layout {
        display: block;
        min-height: auto;
    }

    .admidio-sidebar-spacer { display: none; }

    #admidio-main-navbar .kchls-navigation-drawer > .admidio-sidebar {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
        max-height: none;
        flex: 0 0 auto;
        background: transparent;
        border: 0;
        overflow: visible;
    }

    #admidio-main-navbar .kchls-navigation-drawer #admidio-main-menu {
        display: block !important;
        max-height: none;
        padding-top: 8px;
        overflow: visible;
    }

    #admidio-mobile-drawer #admidio-main-menu .admidio-menu-header {
        color: #b7d0d9;
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link {
        color: #f3f7fa;
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link > .fab {
        color: #b8d6df;
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link:hover,
    #admidio-mobile-drawer #admidio-main-menu .nav-link:focus {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link.active {
        color: #ffffff;
        background: var(--kchls-navy-700);
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link:hover > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link:focus > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link.active > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link:hover > .fab,
    #admidio-mobile-drawer #admidio-main-menu .nav-link:focus > .fab,
    #admidio-mobile-drawer #admidio-main-menu .nav-link.active > .fab {
        color: #ffffff;
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link.disabled,
    #admidio-mobile-drawer #admidio-main-menu .nav-link[aria-disabled="true"] {
        color: rgba(243, 247, 250, 0.52);
        background: transparent;
    }

    #admidio-mobile-drawer #admidio-main-menu .nav-link.disabled > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link.disabled > .fab,
    #admidio-mobile-drawer #admidio-main-menu .nav-link[aria-disabled="true"] > .fas,
    #admidio-mobile-drawer #admidio-main-menu .nav-link[aria-disabled="true"] > .fab {
        color: rgba(184, 214, 223, 0.52);
    }

    .admidio-breadcrumb .breadcrumb {
        min-height: 48px;
        padding-right: var(--kchls-content-gutter);
        padding-left: var(--kchls-content-gutter);
        overflow: visible;
        flex-wrap: wrap;
        row-gap: 2px;
        white-space: normal;
    }

    .admidio-breadcrumb {
        min-height: 48px;
    }

    .breadcrumb-item:not(.active) {
        max-width: 36vw;
    }

    .breadcrumb-item:not(.active) > a {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-item.active {
        max-width: 100%;
        font-size: 18px;
        line-height: 22px;
    }

    .admidio-content {
        min-height: auto;
        padding-top: 18px;
    }

    .admidio-content-header {
        min-height: 0;
        margin-bottom: 18px;
    }

    .admidio-content-header-title-redundant {
        margin-bottom: 0;
    }

    .admidio-module-headline {
        font-size: 24px;
        font-weight: 600;
        line-height: 30px;
    }

    .navbar-filter .navbar-brand,
    .navbar-filter .navbar-toggler { display: none !important; }

    .navbar-filter .navbar-collapse {
        display: flex !important;
        flex-basis: 100%;
    }

    .navbar-filter .form-inline {
        align-items: stretch;
        flex-direction: column;
    }

    .navbar-filter .form-group {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .navbar-filter label {
        margin: 0 0 4px;
        white-space: normal;
    }

    .navbar-filter .form-control,
    .navbar-filter .custom-select,
    .navbar-filter .select2-container { width: 100% !important; }

    .admidio-overview-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .admidio-overview-grid .admidio-plugin-content > .list-group {
        max-height: none;
        overflow: visible;
    }

    #admidio-plugin-latest-documents-files #plugin-latest-documents-files,
    #admidio-plugin-latest-documents-files #plugin-latest-documents-files .list-group,
    #admidio-plugin-latest-documents-files #plugin-latest-documents-files .list-group-item {
        min-width: 0;
        max-width: 100%;
    }

    #admidio-plugin-latest-documents-files #plugin-latest-documents-files .btn.admidio-icon-link {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .kchls-registration-event-heading {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
    }

    .kchls-registration-subjects {
        margin-left: 86px;
    }

    .admidio-menu-function-node {
        width: 100%;
        justify-content: flex-start;
    }

    .admidio-menu-function-node .nav-item { flex: 1 1 auto; }

    .admidio-menu-function-node .nav-link {
        width: 100%;
        margin: 0;
    }

    #imprint.admidio-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .admidio-footer-links { justify-content: flex-start; }
    body.admidio-reduced { padding: 0; }

    .admidio-reduced-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .admidio-reduced .admidio-content { padding: 18px 16px; }
}

/* Chov advisor actions: mobile-only layout for the management page. */
@media (max-width: 767.98px) {
    .chov-advisor-breed-filter > [class*="col-"],
    .chov-advisor-search > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .chov-advisor-action-row {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .chov-advisor-action-row > .btn {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        margin-left: 0 !important;
        padding: 8px 10px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .chov-advisor-action-row > #editDogButton {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .admidio-overview-plugin {
        width: 100%;
    }

    .admidio-card .card-body { padding: 16px; }

    .kchls-registration-event-heading {
        display: block;
    }

    .kchls-registration-event-heading .kchls-registration-date {
        margin-bottom: 2px;
    }

    .kchls-registration-subjects {
        margin: 8px 0 0;
        padding-left: 10px;
    }

    .kchls-registration-subject {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .kchls-registration-subject .kchls-status-badge {
        justify-self: start;
    }

    .form-group.row > .control-label { margin-bottom: 6px; }

    .datetime-time-control {
        margin-top: 8px;
        margin-left: 0;
    }

    .btn-group {
        display: flex;
        width: 100%;
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        margin-left: 0 !important;
        border-radius: var(--kchls-radius-sm) !important;
    }

    .table th,
    .table td { padding: 8px; }
}

@media (min-width: 768px) {
    .offset-sm-3.btn { margin-left: 25%; }
    .form-control-small { width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body * { visibility: hidden; }

    #printable-section,
    #printable-section * { visibility: visible; }

    #printable-section {
        position: absolute;
        top: 0;
        left: 0;
    }
}

@page kchls-pedigree-landscape {
    size: landscape;
    margin: 10mm;
}

@media print {
    body#chov_pedigree_tools {
        page: kchls-pedigree-landscape;
        padding: 0 !important;
        background: #ffffff;
    }

    body#chov_pedigree_tools #admidio-main-navbar,
    body#chov_pedigree_tools .admidio-sidebar,
    body#chov_pedigree_tools .admidio-breadcrumb,
    body#chov_pedigree_tools .admidio-content-header,
    body#chov_pedigree_tools .admidio-footer,
    body#chov_pedigree_tools #kchls-pedigree-tools > .kchls-pedigree-mode-nav,
    body#chov_pedigree_tools #kchls-pedigree-tools > .kpt-filter-card,
    body#chov_pedigree_tools #kchls-pedigree-tools > .row,
    body#chov_pedigree_tools .kpt-pedigree-context-actions {
        display: none !important;
    }

    body#chov_pedigree_tools #kpt-output,
    body#chov_pedigree_tools #kpt-output * {
        visibility: visible !important;
    }

    body#chov_pedigree_tools #kpt-output {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
    }

    body#chov_pedigree_tools .kpt-pedigree-subject-card,
    body#chov_pedigree_tools .kpt-pedigree-graph-card {
        break-inside: avoid;
        box-shadow: none;
    }

    body#chov_pedigree_tools .kpt-pedigree-scroll {
        width: auto;
        max-width: none;
        overflow: visible !important;
        scrollbar-width: none;
    }
}
/* DobrýChov photo cards preserve the established natural-width thumbnail contract. */
.card-img-top {
    width: auto;
    display: block;
    margin: 0 auto;
}
