
body {
    font-size: .875rem;
}


.bi {
    display: inline-block;
    width: 1rem;
    height: 1rem;
}

/*
 * Sidebar
 */

@media (min-width: 768px) {
    .sidebar .offcanvas-lg {
        position: -webkit-sticky;
        position: sticky;
        top: 48px;
    }
    .navbar-search {
        display: block;
    }
}

.sidebar .nav-link {
    font-size: .875rem;
    font-weight: 500;
}

.sidebar .nav-link.active {
    color: #2470dc;
}

.sidebar-heading {
    font-size: .75rem;
}

.cm-sidebar-section-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
}

.cm-sidebar-section-chevron {
    font-size: .65rem;
    transition: transform .18s ease;
}

.cm-sidebar-section-toggle[aria-expanded="false"] .cm-sidebar-section-chevron {
    transform: rotate(-90deg);
}

/*
 * Navbar
 */

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .form-control {
    padding: .75rem 1rem;
}

.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .bd-placeholder-img-lg {
        font-size: 3.5rem;
    }
}

.b-example-divider {
    width: 100%;
    height: 3rem;
    background-color: rgba(0, 0, 0, .1);
    border: solid rgba(0, 0, 0, .15);
    border-width: 1px 0;
    box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.b-example-vr {
    flex-shrink: 0;
    width: 1.5rem;
    height: 100vh;
}

.bi {
    vertical-align: -.125em;
    fill: currentColor;
}

.nav-scroller {
    position: relative;
    z-index: 2;
    height: 2.75rem;
    overflow-y: hidden;
}

.nav-scroller .nav {
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 1rem;
    margin-top: -1px;
    overflow-x: auto;
    text-align: center;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.btn-bd-primary {
    --bd-violet-bg: #712cf9;
    --bd-violet-rgb: 112.520718, 44.062154, 249.437846;

    --bs-btn-font-weight: 600;
    --bs-btn-color: var(--bs-white);
    --bs-btn-bg: var(--bd-violet-bg);
    --bs-btn-border-color: var(--bd-violet-bg);
    --bs-btn-hover-color: var(--bs-white);
    --bs-btn-hover-bg: #6528e0;
    --bs-btn-hover-border-color: #6528e0;
    --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
    --bs-btn-active-color: var(--bs-btn-hover-color);
    --bs-btn-active-bg: #5a23c8;
    --bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
    z-index: 1500;
}

.bd-mode-toggle .dropdown-menu .active .bi {
    display: block !important;
}


.badge-small {
    font-size: 60%;
}

.btn-primary, .dt-button {
    background-color: #9d6844 !important;
    border: none;
    color: #fff;
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    vertical-align: middle;
;
}

.text-bg-primary {
    background-color: #9d6844 !important;

}
a, .page-link, .nav-link {
    color: #9d6844;
}

.page-item.active .page-link
{
    color: #ffffff;
    background-color: #9d6844;
    border-color: #9d6844;
}

.dt-button {
    margin-bottom: -2em;
}

div#cattleTable_wrapper div.row:first-of-type,
div#cattlePregnancyTable_wrapper div.row:first-of-type,
div#cattleWeighingTable_wrapper div.row:first-of-type{
    margin-top: -66px
}

div#cattleTable_filter, div#cattlePregnancyTable_filter, div#cattleWeighingTable_filter {
    margin-top: -10px;
}

.has-error > input {
    border-color: #dc3545;
}

.help-block {
    color: #dc3545;
    font-size: 0.85rem;
}

.dt-search{
    display: inline-block;
    float: right;
}

table.dataTable.table {
    margin-top:1rem;
}

.dt-info
{
    margin-top:0.5rem;
    margin-bottom: 0.5rem;
}

.navbar-info
{
    padding-left: 1rem;
    padding-top:0;
    padding-bottom: 0;
    font-weight: lighter;
    margin-bottom:0.5rem;
    font-size: 0.75rem;
}


body {
    cursor: default !important;
}

/*
 * CowManager UI
 * Gemeinsame Darstellung für Desktop und 8"-Tablets.
 */
:root {
    --cm-ink: #20312c;
    --cm-muted: #66726d;
    --cm-primary: #9d6844;
    --cm-primary-hover: #805236;
    --cm-slate: #596d70;
    --cm-success: #5f7d6d;
    --cm-success-hover: #4d685a;
    --cm-warning: #9a7442;
    --cm-danger: #a85f57;
    --cm-danger-hover: #8d4d47;
    --cm-neutral: #747c72;
    --cm-neutral-hover: #5e665d;
    --cm-accent: #9d6844;
    --cm-action-fire: #9a7442;
    --cm-action-insemination: #596d70;
    --cm-action-pregnancy: #66806b;
    --cm-action-birth: #92705f;
    --cm-action-weight: #747c72;
    --cm-topbar: #8e705a;
    --cm-surface: #ffffff;
    --cm-canvas: #f3f6f2;
    --cm-border: #d7e1db;
    --cm-radius: 14px;
    --cm-shadow: 0 6px 22px rgba(38, 59, 70, .08);
    --cm-sidebar-width: 246px;
    --cm-sidebar-collapsed-width: 72px;
    --cm-font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--cm-canvas);
    color: var(--cm-ink);
    font-family: var(--cm-font-family);
    font-size: 1rem;
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn,
.badge,
.sidebar-heading,
main .table > thead th {
    font-family: var(--cm-font-family);
}

main h2 {
    font-size: 1.45rem;
    font-weight: 650;
    line-height: 1.25;
}

main h3 {
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.3;
}

main h4 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.navbar-brand {
    font-weight: 600;
}

body > .container-fluid {
    max-width: none;
}

body > .container-fluid > .row {
    flex-wrap: nowrap;
}

main[role="main"] {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0;
    max-width: none;
    padding: 0 1.25rem 2rem !important;
}

main[role="main"] > .border-bottom:first-child {
    min-height: 74px;
    margin-bottom: 1.25rem !important;
    padding: 1rem .25rem .8rem !important;
    border-color: var(--cm-border) !important;
}

main[role="main"] > .border-bottom:first-child h1,
main[role="main"] > .border-bottom:first-child h2 {
    margin: 0;
    color: var(--cm-ink);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.card,
.cm-card,
.cm-form-card,
.modal-content {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow);
    overflow: hidden;
}

.cm-form-card {
    width: 100%;
    max-width: 760px;
    padding: 1.2rem;
}

.cm-form-card-wide {
    max-width: none;
}

.cm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cm-border);
}

.cm-table-card {
    overflow: auto;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow);
}

.card-header,
.modal-header {
    padding: 1rem 1.15rem;
    border-color: var(--cm-border);
    background: #f8fafb;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    margin: 0;
    color: var(--cm-ink);
    font-weight: 700;
}

.card-body,
.modal-body {
    padding: 1.15rem;
}

.modal-footer {
    padding: .9rem 1.15rem;
    border-color: var(--cm-border);
}

label,
.form-label,
.col-form-label {
    margin-bottom: .35rem;
    color: #43564f;
    font-weight: 650;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control,
.form-select,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: 46px;
    border: 1px solid #cbd6dd;
    border-radius: 9px;
    background-color: #fff;
    font-size: 1rem;
}

.form-control-sm {
    min-height: 42px;
    padding: .5rem .7rem;
    font-size: .95rem;
}

.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection {
    border-color: var(--cm-accent) !important;
    box-shadow: 0 0 0 .2rem rgba(157, 104, 68, .2) !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: .75rem;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

.btn {
    min-height: 42px;
    padding: .55rem .9rem;
    border-radius: 9px;
    font-weight: 650;
}

.btn-sm {
    min-height: 38px;
    padding: .42rem .7rem;
}

.btn-primary,
.dt-button {
    border-color: var(--cm-primary) !important;
    background-color: var(--cm-primary) !important;
    color: #fff !important;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.dt-button:hover {
    border-color: var(--cm-primary-hover) !important;
    background-color: var(--cm-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(157, 104, 68, .22);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--cm-primary) !important;
    color: var(--cm-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    border-color: var(--cm-primary) !important;
    background-color: var(--cm-primary) !important;
    color: #fff !important;
}

.btn-success {
    border-color: var(--cm-success) !important;
    background-color: var(--cm-success) !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    border-color: var(--cm-success-hover) !important;
    background-color: var(--cm-success-hover) !important;
}

.btn-outline-success {
    border-color: var(--cm-success) !important;
    color: var(--cm-success) !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active {
    border-color: var(--cm-success) !important;
    background-color: var(--cm-success) !important;
    color: #fff !important;
}

.btn-danger {
    border-color: var(--cm-danger) !important;
    background-color: var(--cm-danger) !important;
    color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    border-color: var(--cm-danger-hover) !important;
    background-color: var(--cm-danger-hover) !important;
}

.btn-outline-danger {
    border-color: var(--cm-danger) !important;
    color: var(--cm-danger) !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    border-color: var(--cm-danger) !important;
    background-color: var(--cm-danger) !important;
    color: #fff !important;
}

.btn-secondary {
    border-color: var(--cm-neutral) !important;
    background-color: var(--cm-neutral) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    border-color: #8c9993 !important;
    color: #52615b !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    border-color: var(--cm-neutral) !important;
    background-color: var(--cm-neutral) !important;
    color: #fff !important;
}

.btn-dark {
    border-color: var(--cm-slate) !important;
    background-color: var(--cm-slate) !important;
    color: #fff !important;
}

.btn-link {
    color: var(--cm-primary) !important;
}

.form-check-input:checked {
    border-color: var(--cm-primary);
    background-color: var(--cm-primary);
}

.form-check-input:focus {
    border-color: var(--cm-primary);
    box-shadow: 0 0 0 .2rem rgba(157, 104, 68, .18);
}

.text-bg-primary {
    background-color: var(--cm-primary) !important;
}

.text-bg-success {
    background-color: var(--cm-success) !important;
}

.text-bg-danger {
    background-color: var(--cm-danger) !important;
}

.badge {
    padding: .38em .62em;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.15;
}

.text-bg-warning {
    background-color: var(--cm-warning) !important;
    color: #fff !important;
}

.text-bg-info {
    background-color: var(--cm-slate) !important;
    color: #fff !important;
}

.text-bg-secondary {
    background-color: #918774 !important;
    color: #fff !important;
}

.text-bg-dark {
    background-color: var(--cm-ink) !important;
    color: #fff !important;
}

.page-link {
    color: var(--cm-primary);
}

.page-item.active .page-link {
    border-color: var(--cm-primary);
    background-color: var(--cm-primary);
}

.table-responsive,
.dataTables_wrapper,
.dt-container {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow);
}

div#cattleTable_wrapper div.row:first-of-type,
div#cattlePregnancyTable_wrapper div.row:first-of-type,
div#cattleWeighingTable_wrapper div.row:first-of-type {
    margin-top: 0;
}

div#cattleTable_filter,
div#cattlePregnancyTable_filter,
div#cattleWeighingTable_filter {
    margin-top: 0;
}

.table-responsive {
    overflow: auto;
}

.dataTables_wrapper,
.dt-container {
    padding: 1rem;
    overflow-x: auto;
}

.dataTables_wrapper .table-responsive,
.dt-container .table-responsive {
    border: 0;
    box-shadow: none;
}

main .table {
    margin-bottom: 0;
    color: var(--cm-ink);
    vertical-align: middle;
}

main .table:not(.dataTable) {
    overflow: hidden;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow);
}

main .table > thead th {
    padding: .8rem .75rem;
    border-bottom: 1px solid var(--cm-border);
    background: #f5f8f6;
    color: #52645d;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
    white-space: nowrap;
}

main .table > tbody td {
    padding: .75rem;
    border-color: #edf1f3;
}

main .table-hover > tbody > tr:hover > * {
    background-color: #eef5f1;
}

/* Tierbestand: monochrome Abstufungen der Kuhfell-Primärfarbe */
.cattle-inventory-page main .table > thead > tr > th {
    border-color: #ded3c5;
    background: #f0e3d7;
    color: #674833;
}

.cattle-inventory-page main .table > tbody > tr:nth-child(even) > * {
    background: #fcf8f4;
}

.cattle-inventory-page main .table > tbody > tr:hover > * {
    background: #f5e7db;
}

.cattle-inventory-page main .table a,
.cattle-inventory-page main .table .fa-venus,
.cattle-inventory-page main .table .fa-mars {
    color: var(--cm-primary);
}

.cattle-inventory-page .dataTables_info,
.cattle-inventory-page .dataTables_length,
.cattle-inventory-page .dataTables_filter {
    color: #71513b;
}

.cattle-inventory-page .dt-buttons .btn,
.cattle-inventory-page .dt-button {
    border-color: #9d6844 !important;
    background: #9d6844 !important;
    color: #fff !important;
}

.cattle-inventory-page .dt-buttons .btn:hover,
.cattle-inventory-page .dt-button:hover {
    border-color: #805236 !important;
    background: #805236 !important;
}

.cm-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.cm-weaning-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) minmax(320px, auto);
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--cm-border);
}

.cm-weaning-row:last-child {
    border-bottom: 0;
}

.cm-weaning-row-selected {
    margin-inline: -.75rem;
    padding-inline: .75rem;
    border-radius: .8rem;
    background: #f4e9df;
}

.cm-weaning-animal,
.cm-weaning-plan {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.cm-weaning-animal strong {
    font-size: 1.1rem;
}

.cm-weaning-animal a {
    width: fit-content;
}

.cm-weaning-animal small,
.cm-weaning-plan small {
    color: var(--cm-muted);
}

.cm-weaning-plan .badge {
    width: fit-content;
    margin-bottom: .15rem;
}

.cm-weaning-action {
    display: flex;
    align-items: center;
    gap: .6rem;
}

@media (max-width: 991.98px) {
    .cm-weaning-row {
        grid-template-columns: 1fr 1fr;
    }

    .cm-weaning-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .cm-weaning-row {
        grid-template-columns: 1fr;
    }

    .cm-weaning-action {
        grid-column: auto;
        align-items: stretch;
        flex-direction: column;
    }
}

.breeding-page main {
    padding-bottom: 3rem;
}

.cm-breeding-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.35fr);
    overflow: hidden;
    border: 1px solid #dfd2c4;
    border-radius: var(--cm-radius);
    background: #fbf5ef;
    box-shadow: var(--cm-shadow);
}

.cm-guide-item,
.cm-guide-warning {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 82px;
    padding: 1rem;
    border-right: 1px solid #eadfd3;
}

.cm-guide-item strong {
    color: var(--cm-primary);
    font-size: 1.35rem;
    white-space: nowrap;
}

.cm-guide-item span,
.cm-guide-warning {
    color: #654f40;
    font-size: .9rem;
}

.cm-guide-warning {
    border-right: 0;
    background: #f2e2d4;
    font-weight: 650;
}

.cm-guide-warning i {
    color: #9d6844;
    font-size: 1.2rem;
}

.breeding-page .card {
    border-color: #dfd2c4;
}

.breeding-page .card-header {
    border-bottom-color: #e6dacf;
    background: #f4e8dc;
    color: #674833;
}

.cm-breeding-table th:not(:first-child),
.cm-breeding-table td:not(:first-child) {
    white-space: nowrap;
}

.cm-trait-value {
    color: #6e4a33;
    font-weight: 750;
}

.cm-trait-value.is-high {
    color: #38634c;
}

.cm-trait-value.is-low {
    color: #9b493d;
}

.cm-detail-row,
.cm-detail-row:hover > * {
    background: #f9f2eb !important;
}

.cm-trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    padding: 1rem;
    border-top: 1px solid #eadfd3;
    border-bottom: 1px solid #eadfd3;
}

.cm-trait-card {
    padding: .8rem;
    border: 1px solid #e2d7cd;
    border-radius: 10px;
    background: #fff;
}

.cm-trait-card small {
    display: block;
    min-height: 2.4em;
    margin-top: .2rem;
    color: #72675f;
}

.cm-trait-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .55rem;
}

.cm-trait-meta span {
    padding: .18rem .42rem;
    border-radius: 999px;
    background: #f1e6dc;
    color: #71513b;
    font-size: .72rem;
    font-weight: 650;
}

.cm-cattle-breeding-source + .cm-cattle-breeding-source {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cm-border);
}

.cm-trait-card-primary {
    background: #f2e4d7;
    border-color: #c69b77;
    box-shadow: inset 3px 0 0 var(--cm-primary);
}

.cm-animal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.cm-animal-info-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: #fff;
    box-shadow: var(--cm-shadow);
}

.cm-animal-info-card h3 {
    margin-bottom: .65rem;
    color: #6e4a33;
    font-size: 1rem;
}

.cm-animal-info-card p {
    margin-bottom: 0;
    line-height: 1.65;
}

.cm-animal-info-card-link {
    display: flex;
    align-items: center;
}

.cm-cattle-detail {
    display: grid;
    gap: 1rem;
}

.cm-detail-card {
    overflow: hidden;
    border-color: var(--cm-border);
    box-shadow: var(--cm-shadow);
}

.cm-detail-card .card-header {
    min-height: 3.5rem;
}

.cm-source-lock {
    color: var(--cm-muted);
    font-size: .78rem;
    font-weight: 600;
}

.cm-animal-detail-grid,
.cm-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.cm-animal-detail-grid > div + div,
.cm-management-grid > div + div {
    padding-left: 1.5rem;
    border-left: 1px solid var(--cm-border);
}

.cm-animal-detail-grid h3,
.cm-management-section h3 {
    margin: 0 0 .75rem;
    color: #6e4a33;
    font-size: 1rem;
}

.cm-detail-list {
    display: grid;
    gap: .55rem;
    margin: 0;
}

.cm-detail-list > div {
    display: grid;
    grid-template-columns: minmax(115px, .75fr) minmax(0, 1.25fr);
    gap: .75rem;
    align-items: baseline;
}

.cm-detail-list dt {
    color: var(--cm-muted);
    font-size: .8rem;
    font-weight: 600;
}

.cm-detail-list dd {
    min-width: 0;
    margin: 0;
    font-weight: 600;
}

.cm-detail-list dd small {
    display: block;
    overflow-wrap: anywhere;
    color: var(--cm-muted);
    font-size: .72rem;
    font-weight: 500;
}

.cm-management-card {
    border-color: #d8c2ad;
}

.cm-management-card > .card-header {
    background: #f7efe7;
}

.cm-next-action {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-bottom: .9rem;
    padding: .7rem .8rem;
    border-left: 4px solid var(--cm-primary);
    border-radius: 0 9px 9px 0;
    background: #f7efe7;
}

.cm-next-action span {
    color: var(--cm-muted);
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
}

.cm-history-list {
    display: grid;
    gap: .75rem;
}

.cm-history-item {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .65rem;
    align-items: start;
    padding: .75rem;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: #fff;
}

.cm-history-item > i {
    padding-top: .2rem;
    color: var(--cm-primary);
    text-align: center;
}

.cm-history-item div {
    display: grid;
}

.cm-history-item span,
.cm-history-item small {
    color: var(--cm-muted);
}

.cm-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1.25rem;
    padding: .35rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--cm-border);
    border-radius: 12px;
    background: #f7f2ed;
}

.cm-report-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .8rem;
    border-radius: 9px;
    color: #71513b;
    font-size: .85rem;
    font-weight: 650;
    text-decoration: none;
}

.cm-report-tabs a:hover {
    background: #eee2d8;
    color: #573a27;
}

.cm-report-tabs a.active {
    background: var(--cm-primary);
    color: #fff;
    box-shadow: 0 3px 9px rgba(111, 71, 43, .18);
}

.cm-examination-sessions {
    display: grid;
    gap: .75rem;
}

.cm-examination-session {
    overflow: hidden;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: #fff;
    box-shadow: var(--cm-shadow);
}

.cm-examination-session > summary {
    display: grid;
    grid-template-columns: minmax(175px, .7fr) minmax(290px, 1.3fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    cursor: pointer;
    list-style: none;
    background: #fff;
}

.cm-examination-session > summary::-webkit-details-marker {
    display: none;
}

.cm-examination-session[open] > summary {
    border-bottom: 1px solid var(--cm-border);
    background: #f9f5f1;
}

.cm-examination-date {
    display: flex;
    gap: .7rem;
    align-items: center;
}

.cm-examination-date > i {
    color: var(--cm-primary);
    font-size: 1.2rem;
}

.cm-examination-date > span {
    display: grid;
}

.cm-examination-date small {
    color: var(--cm-muted);
}

.cm-examination-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.cm-examination-stats > span {
    padding: .3rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.cm-examination-stats .is-pregnant {
    background: #e3eee7;
    color: #365f49;
}

.cm-examination-stats .is-empty {
    background: #ece9e6;
    color: #655d57;
}

.cm-examination-stats .is-recheck {
    background: #f0e1d5;
    color: #754a2f;
}

.cm-examination-chevron {
    color: var(--cm-muted);
    transition: transform .2s ease;
}

.cm-examination-session[open] .cm-examination-chevron {
    transform: rotate(180deg);
}

.cm-breeding-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: .55rem;
}

.cm-breeding-summary-item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .65rem .75rem;
    border: 1px solid #e2d7cd;
    border-radius: 10px;
    background: #fff;
}

.cm-breeding-summary-item.is-primary {
    border-color: #c69b77;
    background: #f2e4d7;
}

.cm-breeding-summary-item small {
    color: #74665c;
    font-weight: 650;
}

.cm-breeding-summary-item strong {
    font-size: 1.25rem;
}

.cm-breeding-summary-item span {
    color: var(--cm-muted);
    font-size: .72rem;
}

.cm-breeding-details summary {
    width: fit-content;
    cursor: pointer;
    color: var(--cm-primary);
    font-weight: 650;
}

.cm-breeding-details[open] summary {
    margin-bottom: .5rem;
}

.cm-compact-breeding-values {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    min-width: 132px;
}

.cm-compact-breeding-values span {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    padding: .22rem .38rem;
    border-radius: 7px;
    background: #f2e4d7;
    color: #684933;
}

.cm-compact-breeding-values small {
    font-size: .67rem;
    font-weight: 650;
}

.cm-compact-breeding-values strong {
    font-size: .85rem;
}

.cm-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #766b62;
}

.cm-empty-state > i {
    margin-bottom: .8rem;
    color: #b49379;
    font-size: 2.4rem;
}

.cm-empty-state h3 {
    font-size: 1.15rem;
}

.cm-label-list {
    display: grid;
    gap: .7rem;
}

.cm-label-list > div {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: .5rem;
}

.cm-import-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid #eee4db;
}

.cm-import-row:last-child {
    border-bottom: 0;
}

.cm-import-row small {
    display: block;
    color: #7a7069;
}

.cm-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid #e3d8ce;
    border-radius: 10px;
    background: #fcf8f4;
    font-size: .9rem;
}

.cm-source-links > span {
    color: #74665d;
    font-weight: 650;
}

.cm-mating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.cm-mating-card {
    position: relative;
    overflow: hidden;
}

.cm-mating-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--cm-primary);
    content: "";
}

.cm-mating-card.is-blocked {
    opacity: .72;
}

.cm-mating-card.is-blocked::before {
    background: var(--cm-danger);
}

.cm-rank {
    color: #a07b60;
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .08em;
}

.cm-score {
    display: grid;
    min-width: 72px;
    height: 72px;
    place-content: center;
    border-radius: 50%;
    background: #f0e1d5;
    color: #674833;
    text-align: center;
}

.cm-score strong {
    font-size: 1.25rem;
    line-height: 1;
}

.cm-score span {
    margin-top: .2rem;
    font-size: .68rem;
    text-transform: uppercase;
}

.cm-mating-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1rem 0;
}

.cm-mating-meta span {
    padding: .24rem .5rem;
    border-radius: 999px;
    background: #f5eee8;
    color: #71513b;
    font-size: .75rem;
}

.cm-section-label {
    margin: .9rem 0 .4rem;
    color: #76675e;
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cm-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.cm-chip {
    padding: .32rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 650;
}

.cm-chip.is-positive {
    background: #e7f0ea;
    color: #38634c;
}

.cm-chip.is-caution {
    background: #f5e8dc;
    color: #8b5837;
}

.cm-score-details {
    margin-top: 1rem;
    color: #6d5d52;
    font-size: .85rem;
}

.cm-score-details summary {
    cursor: pointer;
    font-weight: 650;
}

@media (max-width: 1199.98px) {
    .cm-breeding-guide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cm-guide-warning {
        grid-column: 1 / -1;
        min-height: auto;
        border-top: 1px solid #eadfd3;
    }
}

@media (max-width: 767.98px) {
    .cm-animal-detail-grid,
    .cm-management-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cm-animal-detail-grid > div + div,
    .cm-management-grid > div + div {
        padding-top: 1rem;
        padding-left: 0;
        border-top: 1px solid var(--cm-border);
        border-left: 0;
    }

    .cm-detail-list > div {
        grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
    }

    .cm-report-tabs {
        width: 100%;
    }

    .cm-report-tabs a {
        flex: 1 1 130px;
        justify-content: center;
    }

    .cm-examination-session > summary {
        grid-template-columns: 1fr auto;
        gap: .75rem;
    }

    .cm-examination-stats {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .cm-examination-chevron {
        grid-column: 2;
        grid-row: 1;
    }

    .cm-breeding-guide {
        grid-template-columns: 1fr;
    }

    .cm-guide-item,
    .cm-guide-warning {
        grid-column: auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #eadfd3;
    }

    .cm-guide-warning {
        border-top: 0;
        border-bottom: 0;
    }

    .cm-mating-grid {
        grid-template-columns: 1fr;
    }
}

.alert {
    border: 0;
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(38, 55, 70, .09);
}

.cm-auth {
    position: relative;
    background:
        radial-gradient(circle at 15% 20%, rgba(95, 125, 109, .18), transparent 30rem),
        linear-gradient(145deg, #edf3ef, #f8faf8);
}

.cm-auth-card {
    width: 100%;
    max-width: 460px;
}

.cm-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    color: var(--cm-ink);
    font-size: 1.3rem;
    font-weight: 750;
}

.cm-auth-brand img {
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: 0 8px 22px rgba(66, 47, 34, .18);
}

.cm-legal-footer {
    color: #6f766f;
    font-size: .72rem;
    line-height: 1.45;
}

.cm-legal-footer a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(111, 118, 111, .45);
    text-underline-offset: 2px;
}

.cm-legal-footer a:hover {
    color: var(--cm-primary);
}

.cm-sidebar-legal-footer {
    margin-top: auto;
    padding: .75rem 1rem 1rem;
}

.cm-legal-page {
    width: min(760px, calc(100% - 2rem));
    margin: 2rem auto;
}

.cm-legal-page h1 {
    color: var(--cm-ink);
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.cm-legal-page h2 {
    margin-top: 1.5rem;
    color: var(--cm-ink);
    font-size: 1.08rem;
}

/* Navigation */
.navbar.sticky-top {
    min-height: 56px;
    background: var(--cm-topbar) !important;
    border-bottom: 0;
    box-shadow: none;
    z-index: 1040;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: var(--cm-sidebar-width);
    min-width: var(--cm-sidebar-width);
    background: transparent;
    box-shadow: none;
    transition: width .2s ease, min-width .2s ease;
}

.cm-brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
}

.cm-brand-mark img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    object-fit: contain;
    opacity: .92;
}

.cm-demo-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-left: .2rem;
    padding: .25rem .65rem;
    border: 2px solid #fff;
    border-radius: 7px;
    background: #fff;
    color: var(--cm-topbar);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
}

.cm-topbar-action {
    display: inline-grid;
    width: 40px;
    height: 40px;
    min-height: 40px !important;
    padding: 0 !important;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .24) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.cm-topbar-action:hover,
.cm-topbar-action:focus-visible {
    border-color: rgba(255, 255, 255, .42) !important;
    background: rgba(255, 255, 255, .18) !important;
    color: #fff !important;
}

.cm-table-sort {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-transform: inherit;
}

.cm-table-sort i {
    color: var(--cm-muted);
    font-size: .72rem;
}

.sidebar {
    flex: 0 0 var(--cm-sidebar-width);
    width: var(--cm-sidebar-width);
    max-width: var(--cm-sidebar-width);
    min-height: calc(100vh - 56px);
    border: 0 !important;
    border-right: 1px solid var(--cm-border) !important;
    background: #fff !important;
    transition: flex-basis .2s ease, width .2s ease, max-width .2s ease;
}

.sidebar .offcanvas-md,
.sidebar .offcanvas-body {
    background: #fff !important;
}

.sidebar .offcanvas-body {
    gap: .1rem;
}

.sidebar-heading {
    min-height: 26px;
    margin-top: 1.15rem !important;
    color: #718078 !important;
    font-size: .69rem;
    font-weight: 750;
    letter-spacing: .065em;
    white-space: nowrap;
}

.sidebar .nav {
    gap: .15rem;
    padding: 0 .55rem;
}

.sidebar .nav-link {
    min-height: 42px;
    padding: .62rem .75rem;
    border-radius: 9px;
    color: #536a61;
    font-size: .91rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color .15s ease, background-color .15s ease;
}

.sidebar .nav-link i {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: #edf4f0;
    color: var(--cm-primary);
}

.sidebar .nav-link.active {
    background: var(--cm-primary);
    color: #fff;
}

.navbar-info {
    margin: 0 .8rem .35rem;
    padding: 0;
    color: #6c7b74;
    white-space: nowrap;
}

.sidebar-collapse-toggle {
    display: none;
    width: 42px;
    min-width: 42px;
    padding: 0;
}

@media (min-width: 768px) {
    .sidebar {
        position: sticky;
        top: 56px;
        align-self: flex-start;
        height: calc(100vh - 56px);
    }

    .sidebar .offcanvas-md,
    .sidebar .offcanvas-body {
        height: 100%;
    }

    .sidebar-collapse-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar .nav.collapse {
        display: flex !important;
        height: auto !important;
        visibility: visible !important;
    }

    .cm-sidebar-section-toggle {
        pointer-events: none;
    }

    .cm-sidebar-section-chevron {
        display: none;
    }

    body.sidebar-collapsed {
        --cm-sidebar-width: var(--cm-sidebar-collapsed-width);
    }

    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-heading-label,
    body.sidebar-collapsed .navbar-info {
        display: none;
    }

    body.sidebar-collapsed .sidebar-heading {
        justify-content: center !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.sidebar-collapsed .sidebar .nav {
        padding-right: .45rem;
        padding-left: .45rem;
    }

    body.sidebar-collapsed .sidebar .nav-link {
        justify-content: center;
        gap: 0 !important;
        padding-right: .5rem;
        padding-left: .5rem;
        font-size: 0;
    }

    body.sidebar-collapsed .sidebar .nav-link i {
        font-size: 1rem;
    }

    body.sidebar-collapsed .sidebar-heading {
        font-size: 0;
    }

    body.sidebar-collapsed .sidebar-heading i {
        font-size: .78rem;
    }

    body.sidebar-collapsed .sidebar-collapse-toggle i {
        transform: rotate(180deg);
    }
}

@media (max-width: 991.98px) {
    main[role="main"] {
        padding-right: .8rem !important;
        padding-left: .8rem !important;
    }

    .card-body,
    .modal-body {
        padding: 1rem;
    }

    .btn {
        min-height: 46px;
    }

    main .table > thead th,
    main .table > tbody td {
        padding: .7rem .6rem;
    }
}

@media (max-width: 767.98px) {
    body > .container-fluid > .row {
        flex-wrap: wrap;
    }

    .navbar-brand {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .cm-topbar > .navbar-nav + .navbar-nav {
        margin-left: .4rem !important;
    }

    .sidebar {
        flex-basis: 0;
        width: 0;
        min-height: 0;
        border: 0 !important;
    }

    .sidebar .offcanvas-md {
        width: min(88vw, 320px);
    }

    .sidebar .nav-link {
        min-height: 48px;
        font-size: 1rem;
    }

    main[role="main"] > .border-bottom:first-child {
        min-height: 62px;
        margin-bottom: .9rem !important;
    }

    main[role="main"] {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    .dataTables_wrapper,
    .dt-container {
        padding: .7rem;
    }

    .dt-search,
    .dataTables_filter {
        float: none !important;
        width: 100%;
        margin: .35rem 0 .75rem !important;
    }

    .dt-search input,
    .dataTables_filter input {
        width: 100% !important;
        min-height: 44px;
        margin-left: 0 !important;
    }
}

@media print {
    .sidebar,
    .navbar.sticky-top {
        display: none !important;
    }

    body,
    main[role="main"] {
        background: #fff !important;
    }

    main[role="main"] {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* Cockpit */
.cm-dashboard-card {
    padding: 1.15rem;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow);
}

.cm-dashboard-card h3 {
    color: var(--cm-ink);
    font-size: 1.12rem;
    font-weight: 750;
}

.cm-card-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cm-card-title h3,
.cm-card-title p {
    margin: 0;
}

.cm-card-title p {
    margin-top: .2rem;
    color: var(--cm-muted);
}

.cm-card-title > i {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 10px;
    background: #e8f1ec;
    color: var(--cm-primary);
    font-size: 1.1rem;
}

.cm-action-btn {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: flex-start;
    gap: .7rem;
    border: 1px solid var(--cm-border);
    background: #f8faf8;
    color: var(--cm-ink);
    text-align: left;
}

.cm-action-btn i {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
}

.cm-action-btn:hover {
    border-color: #b8cbc1;
    background: #edf4f0;
    color: var(--cm-primary);
    transform: translateY(-1px);
}

.cm-action-fire i { background: var(--cm-action-fire); }
.cm-action-insemination i { background: var(--cm-action-insemination); }
.cm-action-pregnancy i { background: var(--cm-action-pregnancy); }
.cm-action-birth i { background: var(--cm-action-birth); }
.cm-action-weight i { background: var(--cm-action-weight); }

.cm-calendar-card {
    min-height: 100%;
}

.cm-calendar-card .fc {
    font-size: .92rem;
}

.cm-calendar-card .fc-toolbar {
    gap: .5rem;
    margin-bottom: 1rem;
}

.cm-calendar-card .fc-button {
    min-height: 40px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--cm-primary) !important;
}

.cm-calendar-card .fc-day-header,
.cm-calendar-card .fc-col-header-cell {
    padding: .6rem .2rem;
    background: #f5f8f6;
    color: #617169;
}

.cm-calendar-card .fc-event {
    border-radius: 5px;
}

.cm-calendar-task-summary {
    display: grid;
    gap: .65rem;
    margin: -.1rem 0 1rem;
    padding: .75rem;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: #f8faf8;
}

.cm-calendar-task-summary-below {
    margin: 1rem 0 0;
}

.cm-calendar-task-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cm-task-count {
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    padding: .35rem .65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #e8eef2;
    color: #52626e;
    font-size: .8rem;
    font-weight: 700;
}

.cm-task-filter {
    cursor: pointer;
    opacity: .68;
    transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.cm-task-filter:hover,
.cm-task-filter:focus-visible,
.cm-task-filter.is-active {
    opacity: 1;
}

.cm-task-filter.is-active {
    border-color: #7fa08f;
    box-shadow: 0 0 0 2px rgba(95, 125, 109, .14);
}

.cm-task-filter:focus-visible {
    outline: 2px solid var(--cm-primary);
    outline-offset: 2px;
}

.cm-task-count strong {
    color: var(--cm-ink);
    font-size: 1rem;
}

.cm-task-count-today {
    background: #e2f0e9;
    color: var(--cm-success);
}

.cm-task-count-overdue {
    background: #f8e8e6;
    color: var(--cm-danger);
}

.cm-task-count-overdue strong {
    color: var(--cm-danger);
}

.cm-task-count-stale {
    background: #eceff1;
    color: #5f6b73;
}

.cm-task-count-stale strong {
    color: #48545c;
}

.cm-calendar-task-details summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .35rem .15rem;
    color: var(--cm-primary);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.cm-calendar-task-details summary::-webkit-details-marker {
    display: none;
}

.cm-calendar-task-details summary > span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.cm-calendar-task-details[open] summary > .fa-chevron-down {
    transform: rotate(180deg);
}

.cm-calendar-task-details summary > .fa-chevron-down {
    transition: transform .15s ease;
}

.cm-calendar-task-list {
    display: grid;
    max-height: 360px;
    gap: .35rem;
    margin-top: .4rem;
    padding-right: .2rem;
    overflow-y: auto;
}

.cm-calendar-task-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .65rem;
    padding: .65rem;
    border: 1px solid #e3eaee;
    border-radius: 8px;
    background: #fff;
    color: var(--cm-ink);
    text-decoration: none;
}

.cm-calendar-task-item:hover {
    border-color: #aac1b5;
    color: var(--cm-primary);
}

.cm-calendar-task-item[hidden] {
    display: none;
}

.cm-calendar-task-dot {
    width: .75rem;
    height: .75rem;
    flex: 0 0 .75rem;
    border-radius: 50%;
}

.cm-calendar-task-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.cm-calendar-task-copy strong,
.cm-calendar-task-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-calendar-task-copy small {
    margin-top: .1rem;
    color: var(--cm-muted);
}

.cm-calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: -.15rem 0 1rem;
}

.cm-calendar-filter {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 36px;
    padding: .38rem .7rem;
    border: 1px solid #d9e1e6;
    border-radius: 999px;
    background: #fff;
    color: #52645d;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    transition: opacity .15s ease, border-color .15s ease, background-color .15s ease;
}

.cm-calendar-filter span {
    width: .7rem;
    height: .7rem;
    flex: 0 0 .7rem;
    border-radius: 50%;
}

.cm-calendar-filter.is-active {
    border-color: #9eb7aa;
    background: #f1f6f3;
}

.cm-calendar-filter:not(.is-active) {
    opacity: .48;
    text-decoration: line-through;
}

.cm-calendar-card .fc-daygrid-event {
    padding: 2px 4px;
    font-weight: 700;
}

.cm-calendar-card .fc-daygrid-more-link {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 5px;
    border-radius: 5px;
    background: #e8f0eb;
    color: var(--cm-primary);
    font-weight: 800;
}

.cm-calendar-card .fc-list-event-title a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.cm-calendar-card .fc-list-day-cushion {
    background: #f4f7f8;
}

.cm-chart-panel {
    text-align: center;
}

.cm-chart-panel h4 {
    margin: 0 0 .45rem !important;
    color: #52626e;
    font-size: .9rem;
    font-weight: 700;
}

.cm-chart-panel canvas {
    max-height: 230px;
}

.cm-pending-count {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    background: #f7edd7;
    color: var(--cm-warning);
    font-size: 1.05rem;
    font-weight: 800;
}

.cm-tvd-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: .75rem;
}

.cm-tvd-summary span {
    padding: .55rem;
    border-radius: 8px;
    background: #f5f8f6;
    color: var(--cm-muted);
    text-align: center;
}

.cm-tvd-summary strong {
    color: var(--cm-ink);
}

.cm-tvd-list {
    display: grid;
    gap: .2rem;
}

.cm-tvd-item {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .65rem .15rem;
    border-bottom: 1px solid #edf1f3;
}

.cm-tvd-item:last-child {
    border-bottom: 0;
}

.cm-tvd-item > .min-w-0 {
    min-width: 0;
    flex: 1 1 auto;
}

.cm-tvd-item strong,
.cm-tvd-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-tvd-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .4rem;
}

.cm-tvd-actions form {
    margin: 0;
}

.cm-tvd-actions .btn {
    display: inline-grid;
    width: 34px;
    min-height: 34px;
    padding: 0;
    place-items: center;
    border-radius: 8px;
}

.cm-tvd-item small {
    margin-top: .1rem;
    color: var(--cm-muted);
}

.cm-empty-compact {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .8rem;
    border-radius: 9px;
    background: #eaf4ee;
    color: var(--cm-success);
}

@media (max-width: 991.98px) {
    .cm-dashboard-card {
        padding: 1rem;
    }

    .cm-action-btn {
        min-height: 70px;
    }

    .cm-calendar-filters {
        flex-wrap: wrap;
        margin: 0 0 1rem;
        padding: 0;
        overflow: visible;
    }

    .cm-calendar-filter {
        flex: 0 0 auto;
        min-height: 40px;
    }

    .cm-calendar-card .fc-list-event td {
        padding-top: .7rem;
        padding-bottom: .7rem;
    }
}

@media (max-width: 575.98px) {
    .cm-quick-card .btn-outline-secondary {
        width: 100%;
    }

    .cm-action-btn {
        min-height: 62px;
        padding: .5rem;
        font-size: .88rem;
    }

    .cm-action-btn i {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .cm-chart-panel {
        flex: 0 0 100%;
        width: 100%;
    }

    .cm-calendar-card .fc-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .cm-calendar-filters {
        flex-wrap: wrap;
        margin: 0 0 1rem;
        padding: 0;
        overflow: visible;
    }

    .cm-calendar-filter {
        flex: 0 0 auto;
        min-height: 40px;
    }

    .cm-calendar-card .fc-toolbar-title {
        font-size: 1.25rem;
    }

    .cm-calendar-card .fc-header-toolbar .fc-toolbar-chunk:last-child {
        display: flex;
        overflow-x: auto;
    }

    .cm-calendar-card .fc-list-event td {
        padding-top: .7rem;
        padding-bottom: .7rem;
    }
}

/* Erfolgs-Toast (Meldung nach dem Speichern) */
.cm-toast {
    min-width: 360px;
    font-size: 1.08rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(38, 59, 70, .22);
}

.cm-toast .toast-body {
    padding: 1.05rem 1.25rem;
    font-weight: 650;
}

.cm-toast .fa-circle-check {
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .cm-toast {
        min-width: 0;
        width: calc(100vw - 1.5rem);
    }
}
