:root {
    --bg: #f3f7fc;
    --surface: #ffffff;
    --border: #dbe6f5;
    --text: #142033;
    --muted: #6d7b8f;
    --blue: #1c6cf2;
    --blue-dark: #1053c7;
    --shadow: 0 12px 28px rgba(17, 49, 88, 0.08);
    --history-filter-label-size: 0.66rem;
    --history-filter-field-size: 0.78rem;
    --history-filter-field-height: 32px;
    --history-filter-gap: 8px;
    --history-filter-padding: 10px;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html {
    font-size: 14px;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, #deebff 0 10%, transparent 45%),
        radial-gradient(circle at 90% 95%, #dbe7ff 0 14%, transparent 55%),
        var(--bg);
}

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px 1fr;
}

.sidebar {
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 88% 92%, rgba(13, 84, 190, 0.36) 0%, rgba(13, 84, 190, 0) 48%),
        linear-gradient(180deg, #3d84e5 0%, #61a7ff 72%, #4f96f0 100%);
    color: #fff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
}

.brand {
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 14px 13px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 14%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(160deg, #f4c65a 0%, #deaf3f 56%, #be861f 100%);
    border: 1px solid rgba(130, 92, 28, 0.56);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        inset 0 -1px 0 rgba(130, 92, 28, 0.34),
        0 12px 24px rgba(30, 41, 59, 0.2);
}

.brand::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 15px;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 56%);
}

.brand::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0) 0%, rgba(96, 165, 250, 0.55) 18%, rgba(37, 99, 235, 0.72) 52%, rgba(96, 165, 250, 0) 100%);
}

.brand > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.brand-mark {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #f6fff9;
    background: linear-gradient(155deg, #7effb3 0%, #38d19a 52%, #149b79 100%);
    border: 1px solid rgba(209, 250, 229, 0.98);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 0 rgba(10, 91, 70, 0.44),
        0 0 0 2px rgba(187, 247, 208, 0.48),
        0 0 20px rgba(52, 211, 153, 0.72),
        0 0 34px rgba(110, 255, 189, 0.52),
        0 12px 24px rgba(10, 91, 70, 0.34);
}

.brand-mark::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 7px;
    width: 28px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.04) 100%);
    filter: blur(0.2px);
    pointer-events: none;
}

.brand-logo {
    width: 25px;
    height: 25px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.72)) drop-shadow(0 0 10px rgba(209, 250, 229, 0.62));
}

.brand h1 {
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.06;
    color: #1b365a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
    margin: 0;
}

.brand p {
    width: fit-content;
    margin: 0;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #ffd84d;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22), 0 0 10px rgba(255, 216, 77, 0.24);
    background: rgba(7, 31, 78, 0.42);
    border: 1px solid rgba(134, 239, 172, 0.34);
}

.menu {
    display: grid;
    gap: 10px;
    position: relative;
    margin-top: 4px;
    padding-top: 24px;
}

.menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 16%, rgba(255, 255, 255, 0.55) 84%, transparent 100%);
}

.menu::after {
    content: "Navigation";
    position: absolute;
    top: -10px;
    left: 12px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.28px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(120deg, rgba(30, 91, 188, 0.96) 0%, rgba(42, 111, 219, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 7px 15px rgba(9, 46, 110, 0.28);
}

.menu-group {
    display: grid;
    gap: 6px;
}

.menu-group + .menu-group {
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.menu a {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 36%, rgba(7, 48, 119, 0.2) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 6px 14px rgba(8, 34, 87, 0.2);
    font-weight: 600;
    letter-spacing: 0.12px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.menu a::before {
    content: "";
    position: relative;
    z-index: 1;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f4cf73 0%, #cc9424 100%);
    box-shadow: 0 0 0 3px rgba(204, 148, 36, 0.24);
    flex: 0 0 auto;
}

.menu a::after {
    content: "";
    position: absolute;
    top: -32px;
    left: -82%;
    width: 58%;
    height: 150%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(18deg);
    transition: left 0.52s ease;
    pointer-events: none;
}

.menu .menu-parent {
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(8, 34, 87, 0.38);
}

.menu a:hover,
.menu a.active {
    background:
        linear-gradient(128deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 44%, rgba(8, 51, 123, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.44);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        0 12px 22px rgba(8, 34, 87, 0.3);
    transform: translateX(4px) translateY(-1px);
}

.menu a:hover::after,
.menu a.active::after {
    left: 130%;
}

.menu a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-offset: 2px;
}

.submenu {
    position: relative;
    display: grid;
    gap: 7px;
    padding: 6px 0 2px 14px;
    margin-left: 8px;
}

.submenu::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.18) 100%);
}

.submenu .submenu-item {
    min-height: 33px;
    padding: 7px 10px;
    font-size: 0.8rem;
    border-radius: 10px;
    background: linear-gradient(122deg, rgba(8, 34, 87, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.submenu .submenu-item::before {
    width: 5px;
    height: 5px;
    background: #d9a638;
    box-shadow: 0 0 0 3px rgba(217, 166, 56, 0.2);
}

.submenu .submenu-item:hover {
    background: linear-gradient(122deg, rgba(255, 255, 255, 0.3) 0%, rgba(8, 56, 133, 0.26) 100%);
    border-color: rgba(255, 255, 255, 0.38);
}

.menu a.active::before {
    box-shadow: 0 0 0 4px rgba(217, 166, 56, 0.3), 0 0 12px rgba(240, 195, 92, 0.55);
}

.sidebar-card {
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 14px;
    background: rgba(10, 28, 60, 0.2);
}

.sidebar-card h2 {
    margin: 0;
    font-size: 0.92rem;
}

.sidebar-card p {
    margin: 8px 0 14px;
    font-size: 1.08rem;
    font-weight: 700;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-card button {
    background: #bff3cf;
    color: #2f2f2f;
    border: 1px solid #8fdcad;
}

.button-secondary {
    background: #eaf2ff;
    color: #184a93;
    border: 1px solid #bfd6fb;
}

.content {
    padding: 22px;
    display: grid;
    align-content: start;
    gap: 16px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.dashboard-home .topbar {
    position: relative;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 88% 92%, rgba(13, 84, 190, 0.36) 0%, rgba(13, 84, 190, 0) 48%),
        linear-gradient(180deg, #3d84e5 0%, #61a7ff 72%, #4f96f0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 14px 24px rgba(16, 46, 94, 0.22);
}

.dashboard-home .topbar::before {
    content: "Accueil";
    position: absolute;
    top: -10px;
    left: 16px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #2b3d58;
    background: linear-gradient(160deg, #ffedba 0%, #efbb49 100%);
    border: 1px solid rgba(164, 113, 16, 0.62);
    box-shadow: 0 7px 15px rgba(103, 67, 11, 0.3);
}

.delivery-page .topbar::before {
    content: "Relevé des silos";
}

.water-page .topbar::before {
    content: "Relevé d'eau";
}

.readings-page .topbar::before {
    content: "Relevé Silos/Eau";
}

.chariot-readings-page .topbar::before {
    content: "Relevé des chariots";
}

.reading-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.reading-mode-switch label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #c9d9ec;
    border-radius: 8px;
    background: #f8fbff;
    color: #27405f;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.reading-mode-switch input {
    width: 16px;
    height: 16px;
    accent-color: #1c6cf2;
}

.reading-mode-switch label:has(input:checked) {
    border-color: #8dbbf9;
    background: #eaf3ff;
    box-shadow: inset 0 0 0 1px rgba(28, 108, 242, 0.16);
}

.eggs-page .topbar::before {
    content: "Pesées Oeufs";
}

.bands-page .topbar::before {
    content: "Création lots / ventilation";
}

.profiles-page .topbar::before {
    content: "Administration";
}

.dashboard-home .topbar > div:first-child {
    display: grid;
    gap: 4px;
}

.dashboard-home .home-highlight-title {
    position: relative;
    width: fit-content;
    margin: 0;
    padding: 4px 2px 8px;
    font-size: 1.48rem;
    letter-spacing: 0.28px;
    color: #fff6dd;
    text-shadow: 0 1px 0 rgba(7, 32, 75, 0.58);
}

.dashboard-home .home-highlight-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffd676 0%, #efb83d 44%, #e9f2ff 100%);
}

.dashboard-home .topbar p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e6efff;
}

.session-user {
    display: grid;
    gap: 3px;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 12px;
    color: #17345b;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 16px rgba(12, 42, 88, 0.14);
}

.session-user span {
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #5b6f8a;
}

.session-user strong {
    color: #17345b;
    font-size: 0.92rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-actions button {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: #183459;
    background: #fff4d0;
    box-shadow: 0 8px 18px rgba(12, 42, 88, 0.18);
}

.topbar-actions .button-secondary {
    background: #edf6ff;
    color: #1d4f90;
}

.topbar-actions .view-button.active {
    color: #14345b;
    background: #ffe6a1;
    border-color: rgba(164, 113, 16, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 10px 20px rgba(103, 67, 11, 0.22);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 14px;
}

.stat-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 112px;
    padding: 16px;
    display: grid;
    align-content: center;
    gap: 6px;
    border-left: 5px solid #2f80ed;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
    color: #183459;
}

.stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.28px;
    text-transform: uppercase;
}

.stat-detail {
    color: #496074;
    font-weight: 700;
}

.stat-alert {
    border-left-color: #d64b3b;
    background: linear-gradient(135deg, #fff 0%, #fff3ef 100%);
}

.home-board {
    display: grid;
    grid-template-columns: minmax(320px, 1.3fr) minmax(280px, 0.9fr);
    grid-template-areas:
        "alarms reminders"
        "alarms events";
    gap: 16px;
    align-items: start;
}

.panel {
    padding: 16px;
}

.alarm-panel {
    grid-area: alarms;
}

.events-panel {
    grid-area: events;
}

.home-board > .panel:nth-child(2) {
    grid-area: reminders;
}

.panel-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 1.05rem;
}

.panel-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.history-filter-group {
    display: flex;
    align-items: end;
    justify-content: end;
    gap: var(--history-filter-gap);
    flex-wrap: wrap;
}

.history-site-filter {
    min-width: 168px;
    display: grid;
    gap: 3px;
}

.history-site-filter span {
    color: var(--muted);
    font-size: var(--history-filter-label-size);
    font-weight: 850;
    text-transform: uppercase;
}

.history-band-number-filter {
    min-width: 132px;
}

.history-site-filter select,
.history-site-filter input {
    width: 100%;
    min-height: var(--history-filter-field-height);
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: var(--history-filter-field-size);
    font-weight: 700;
}

.history-site-filter select:focus,
.history-site-filter input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.history-pagination__button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #bfd5f7;
    background: #eef4ff;
    color: #1459c7;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.history-pagination__button:hover:not(:disabled) {
    border-color: #9cc2f9;
    background: #e6f0ff;
}

.history-pagination__button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.history-pagination__info {
    min-width: 104px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #365983;
}

.technique-report-panel {
    display: grid;
    gap: 12px;
}

.technique-report-summary {
    min-height: 36px;
    padding: 9px 12px;
    border: 1px solid #d8e5f6;
    border-radius: 8px;
    color: #27405f;
    background: #f8fbff;
    font-size: 0.88rem;
    font-weight: 800;
}

.technique-report-chart {
    display: grid;
    gap: 14px;
}

.report-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
}

.report-mode-switch legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.report-mode-switch label {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    color: #27405f;
    background: #f8fbff;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    cursor: pointer;
}

.report-mode-switch input {
    width: 14px;
    height: 14px;
    accent-color: #1c6cf2;
}

.report-mode-switch label:has(input:checked) {
    border-color: #8dbbf9;
    background: #eaf3ff;
    box-shadow: inset 0 0 0 1px rgba(28, 108, 242, 0.16);
}

.report-chart-empty {
    min-height: 88px;
    display: grid;
    place-items: center;
    border: 1px dashed #c9d9ed;
    border-radius: 8px;
    color: #71839b;
    background: #fbfdff;
    font-size: 0.86rem;
    font-weight: 800;
}

.report-chart-card {
    overflow-x: auto;
    border: 1px solid #d8e5f6;
    border-radius: 8px;
    background: #ffffff;
}

.report-chart-card-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 4px;
}

.report-chart-card-heading h4 {
    margin: 0;
    color: #183459;
    font-size: 0.98rem;
}

.report-chart-card-heading span {
    color: #5d718a;
    font-size: 0.78rem;
    font-weight: 800;
}

.report-chart-card svg {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
}

.report-chart-bg {
    fill: #ffffff;
}

.report-chart-grid {
    stroke: #e6eef9;
    stroke-width: 1;
}

.report-chart-axis {
    stroke: #8aa5c4;
    stroke-width: 1.4;
}

.report-chart-line {
    fill: none;
    stroke: #1c6cf2;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.report-chart-line--mortality {
    stroke: #1c6cf2;
    stroke-width: 2.4;
}

.report-chart-line--guide {
    stroke: #6f7b8d;
    stroke-width: 2.2;
    stroke-dasharray: 7 6;
}

.report-chart-dot {
    fill: #ffffff;
    stroke: #1c6cf2;
    stroke-width: 2;
    cursor: pointer;
}

.report-chart-dot--mortality {
    stroke: #1c6cf2;
}

.report-chart-dot--partial {
    fill: #fff7df;
    stroke: #e09a18;
    stroke-width: 2.6;
}

.report-chart-dot--guide {
    stroke: #6f7b8d;
    stroke-width: 1.8;
}

.report-chart-click-state {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin: 0 12px 2px;
    padding: 7px 9px;
    border: 1px solid #d8e5f6;
    border-radius: 6px;
    background: #f8fbff;
    color: #27405f;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: normal;
}

.report-chart-click-state span {
    display: inline-flex;
    min-width: 0;
}

.report-chart-label {
    fill: #5d718a;
    font-size: 0.72rem;
    font-weight: 800;
}

.report-chart-label--week {
    fill: #17447c;
    font-size: 0.54rem;
    font-weight: 900;
}

.report-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 12px 12px;
}

.report-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #27405f;
    font-size: 0.78rem;
    font-weight: 800;
}

.report-chart-legend-swatch {
    width: 14px;
    height: 4px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.report-chart-legend-swatch--mortality {
    background: #d11f49;
}

.report-chart-legend-swatch--partial {
    background: #e09a18;
}

.report-chart-legend-swatch--guide {
    background: repeating-linear-gradient(
        90deg,
        #6f7b8d 0 7px,
        transparent 7px 12px
    );
    border: 1px solid rgba(111, 123, 141, 0.3);
}

.report-chart-scale-note {
    color: #7a4a5a;
    font-size: 0.74rem;
    font-weight: 800;
}

.panel-count {
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #17447c;
    background: #e8f1ff;
    border: 1px solid #c9dcf7;
    font-weight: 900;
}

.timeline-list,
.event-list {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid #e2e9f4;
    border-radius: 10px;
    background: #fbfdff;
}

.timeline-item .time {
    color: #193d68;
    font-weight: 900;
}

.timeline-item h4,
.event-item h4 {
    margin: 0;
    font-size: 0.95rem;
}

.timeline-item p,
.event-item p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.4;
}

.status-badge {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.severity-critical {
    border-left: 5px solid #d64032;
}

.severity-critical .status-badge {
    color: #8e1d15;
    background: #ffe5e0;
}

.severity-warning {
    border-left: 5px solid #d99a21;
}

.severity-warning .status-badge {
    color: #76500f;
    background: #fff1cf;
}

.severity-info {
    border-left: 5px solid #2f80ed;
}

.severity-info .status-badge {
    color: #19518f;
    background: #e5f0ff;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #edf2f8;
}

.task-list li:last-child {
    border-bottom: 0;
}

.task-list label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-weight: 700;
}

.task-list input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #1c6cf2;
}

.task-list time {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.event-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    background: #f8fbff;
    border: 1px solid #e2eaf5;
}

.event-item time {
    min-height: 54px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    align-content: center;
    color: #1b477e;
    background: #e8f1ff;
    border: 1px solid #cfe0f8;
}

.event-item time strong {
    line-height: 1;
    font-size: 1.25rem;
}

.event-item time span {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.delivery-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 14px;
}

.delivery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
        "entry controls";
    gap: 12px;
    align-items: stretch;
}

.bands-page .delivery-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "entry"
        "controls";
}

.delivery-form {
    grid-area: form;
}

.delivery-table-panel {
    grid-area: table;
    min-width: 0;
}

.delivery-entry-panel {
    grid-area: entry;
    min-width: 0;
}

.delivery-control-column {
    grid-area: controls;
    display: grid;
    gap: 10px;
    align-content: stretch;
    grid-template-rows: auto 1fr;
}

.delivery-table-block {
    margin-top: 14px;
}

.delivery-checklist {
    border-color: #cddcf1;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ventilation-panel {
    grid-area: controls;
    min-width: 0;
    border-color: #cddcf1;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.control-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid #e2eaf5;
}

.control-progress {
    min-width: 46px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #17447c;
    background: #e8f1ff;
    border: 1px solid #c7dbf6;
    font-weight: 900;
}

.control-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.control-list li {
    border: 1px solid #e2eaf5;
    border-radius: 11px;
    background: #ffffff;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.control-list li:has(input:checked) {
    border-color: #a9dfbb;
    background: #f2fbf5;
    box-shadow: inset 0 0 0 1px rgba(49, 168, 95, 0.1);
}

.control-list label {
    display: grid;
    grid-template-columns: 18px 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    cursor: pointer;
}

.control-list input {
    width: 18px;
    height: 18px;
    accent-color: #31a85f;
}

.control-marker {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #1b477e;
    background: #e8f1ff;
    border: 1px solid #cfe0f8;
    font-weight: 900;
}

.control-list li:has(input:checked) .control-marker {
    color: #1d5b34;
    background: #dff7e7;
    border-color: #a9dfbb;
}

.control-list strong {
    display: block;
    color: #203a58;
    font-size: 0.94rem;
}

.control-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
    font-weight: 650;
}

.delivery-creator-card {
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid #d7e5f6;
    border-radius: 10px;
    background: #ffffff;
}

.delivery-creator-card span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.delivery-creator-card strong {
    color: #17447c;
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    align-items: end;
}

.delivery-alf-fields {
    grid-template-columns:
        minmax(142px, 0.75fr)
        minmax(112px, 0.55fr)
        minmax(170px, 0.95fr)
        minmax(132px, 0.7fr)
        minmax(220px, 1.25fr);
    gap: 10px;
}

.delivery-alf-fields .delivery-inline-summary {
    min-height: 0;
    align-content: end;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.delivery-alf-fields .delivery-inline-summary > span {
    font-size: 0.74rem;
    letter-spacing: 0.18px;
}

.delivery-alf-fields .delivery-inline-summary select {
    min-height: 40px;
    padding: 9px 10px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 650;
}

.chariot-calibration {
    width: fit-content;
    max-width: 100%;
    display: grid;
    grid-template-columns: 156px 104px;
    gap: 7px;
    align-items: end;
    margin: 0;
    padding: 8px;
    border: 1px solid #d7e5f6;
    border-radius: 8px;
    background: #fbfdff;
}

.chariot-calibration legend {
    padding: 0 6px;
    color: #60738b;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.chariot-calibration label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chariot-calibration label span {
    color: #60738b;
    font-size: 0.66rem;
    font-weight: 850;
    text-transform: uppercase;
}

.chariot-calibration input {
    width: 100%;
    min-height: 30px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.chariot-calibration input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.chariot-duration-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    min-width: 0;
}

.chariot-duration-fields input {
    min-width: 0;
}

.chariot-sheet-scroll {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    border: 1px solid #b9cbe4;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 49, 88, 0.08);
}

.chariot-sheet {
    display: grid;
    gap: 0;
    width: max-content;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

.chariot-sheet-row {
    display: grid;
    grid-template-columns:
        118px
        92px
        78px
        124px
        86px
        156px
        124px;
    min-height: 38px;
}

.chariot-sheet-row + .chariot-sheet-row {
    border-top: 1px solid #b9cbe4;
}

.chariot-sheet-row > * {
    min-width: 0;
    border-right: 1px solid #b9cbe4;
}

.chariot-sheet-row > *:last-child {
    border-right: 0;
}

.chariot-sheet-head {
    min-height: 34px;
    color: #17345b;
    background: linear-gradient(180deg, #f5f9ff 0%, #e3edf9 100%);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.chariot-sheet-head span {
    display: grid;
    place-items: center;
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #aebfd6;
}

.chariot-sheet-row label {
    position: relative;
    display: grid;
}

.chariot-sheet-row label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.chariot-sheet-row label .chariot-duration-fields {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.chariot-sheet-row input,
.chariot-sheet-row select {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 0;
    padding: 5px 6px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
}

.chariot-sheet-row select {
    text-overflow: ellipsis;
}

.chariot-sheet-row input {
    text-align: center;
}

.chariot-sheet-row input:focus,
.chariot-sheet-row select:focus {
    position: relative;
    z-index: 1;
    outline: 2px solid rgba(28, 108, 242, 0.32);
    outline-offset: -2px;
    background: #fbfdff;
}

.chariot-sheet-row input[readonly] {
    color: #17447c;
    background: #eef6ff;
    font-weight: 850;
    cursor: default;
}

.chariot-sheet-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.chariot-sheet-row input[type="number"]::-webkit-outer-spin-button,
.chariot-sheet-row input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.chariot-readings-page .delivery-entry-panel {
    grid-area: auto;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.chariot-readings-page .delivery-entry-panel .panel-heading {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid #dbe6f5;
    background: #f8fbff;
}

.chariot-readings-page .delivery-entry-panel form {
    padding: 16px;
}

.chariot-readings-page .delivery-form-actions {
    margin-top: 14px;
}

.chariot-sheet-actions {
    width: 778px;
    justify-content: flex-end;
}

.chariot-history-panel {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 0;
    overflow: hidden;
    border-color: #b9d3f4;
    background:
        linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow:
        0 18px 34px rgba(17, 49, 88, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.chariot-history-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #2f80ed 0%, #43c58f 48%, #f0b94e 100%);
}

.chariot-history-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 20px 20px 0;
}

.history-eyebrow {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    color: #17447c;
    background: #e8f1ff;
    border: 1px solid #c8dcf8;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.24px;
    text-transform: uppercase;
}

.chariot-history-hero h3 {
    margin: 9px 0 4px;
    color: #17345b;
    font-size: 1.25rem;
}

.chariot-history-hero p {
    max-width: 660px;
    margin: 0;
    color: #60738b;
    font-weight: 650;
    line-height: 1.45;
}

.chariot-history-filters {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(126px, 156px) minmax(122px, 132px) auto;
    gap: var(--history-filter-gap);
    align-items: end;
    margin: 0 20px;
    padding: var(--history-filter-padding);
    border: 1px solid #d7e5f6;
    border-radius: 10px;
    background: #fbfdff;
}

.chariot-history-filters label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chariot-history-filters label span {
    color: #60738b;
    font-size: var(--history-filter-label-size);
    font-weight: 900;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.chariot-history-filters select,
.chariot-history-filters input {
    width: 100%;
    min-height: var(--history-filter-field-height);
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: var(--history-filter-field-size);
    font-weight: 700;
}

.chariot-history-filters select:focus,
.chariot-history-filters input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.chariot-history-filters button {
    width: var(--history-filter-field-height);
    min-height: var(--history-filter-field-height);
    padding: 0;
    font-size: var(--history-filter-field-size);
    white-space: nowrap;
}

.chariot-history-filters .chariot-history-reset {
    height: var(--history-filter-field-height);
    border: 1px solid #bfd5f7;
    border-radius: 8px;
    background: #eef4ff;
}

.chariot-history-scroll {
    margin: 0 20px 20px;
    overflow-x: auto;
}

.chariot-history-list {
    display: grid;
    gap: 8px;
    min-width: 860px;
}

.chariot-history-row {
    display: grid;
    grid-template-columns: minmax(94px, 0.75fr) minmax(70px, 0.55fr) minmax(130px, 1fr) minmax(120px, 0.9fr) minmax(82px, 0.62fr) minmax(100px, 0.72fr) minmax(112px, 0.8fr) minmax(54px, auto);
    gap: 8px;
    align-items: center;
    min-height: 40px;
    padding: 8px 9px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
    text-align: center;
}

.chariot-history-row:not(.chariot-history-head) {
    border-left: 4px solid #43c58f;
    box-shadow: 0 8px 16px rgba(17, 49, 88, 0.05);
    font-size: 0.82rem;
}

.chariot-history-row:not(.chariot-history-head):hover,
.chariot-history-row.editing {
    border-color: #b8d6f8;
    border-left-color: #2f80ed;
    background: #f8fbff;
}

.chariot-history-row.editing {
    border-color: #e6c36a;
    border-left-color: #f0b94e;
    background: #fff9e9;
    box-shadow: inset 0 0 0 1px rgba(240, 185, 78, 0.32);
}

.chariot-history-head {
    min-height: 38px;
    color: #60738b;
    background: #eef5ff;
    border-color: #d4e3f8;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.chariot-history-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.chariot-history-row time,
.chariot-history-row span {
    color: #263f5e;
    font-weight: 750;
}

.chariot-history-row strong {
    color: #17447c;
    font-size: 0.88rem;
    font-weight: 900;
}

.chariot-passage-badge {
    justify-self: center;
    min-width: 40px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #17447c !important;
    background: #e8f1ff;
    border: 1px solid #c8dcf8;
    font-size: 0.72rem;
    font-weight: 900 !important;
}

.chariot-history-empty {
    min-height: 58px;
    display: grid;
    place-items: center;
    border: 1px dashed #c9d9ed;
    border-radius: 10px;
    color: #71839b;
    background: #fbfdff;
    font-weight: 800;
}

.chariot-history-actions {
    justify-self: center;
}

.band-mode-toggle {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
}

.band-mode-panel {
    margin-bottom: 14px;
}

.delivery-entry-panel .band-mode-toggle {
    display: none;
}

.bands-mode-ventilation .delivery-layout {
    grid-template-areas:
        "controls";
}

.band-mode-toggle legend {
    width: 100%;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.band-mode-toggle label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    background: #ffffff;
    color: #27415f;
    font-weight: 800;
}

.band-mode-toggle input {
    width: auto;
    min-height: auto;
    padding: 0;
}

.delivery-inline-summary {
    min-height: 40px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid #dbe6f5;
    border-radius: 9px;
    background: #f8fbff;
}

.delivery-inline-summary > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.delivery-inline-summary strong {
    color: #17447c;
    font-size: 1.28rem;
    line-height: 1;
}

.delivery-inline-summary input {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 5px 8px;
    color: #17447c;
    background: #ffffff;
    font: inherit;
    font-size: 1.12rem;
    font-weight: 850;
    text-align: center;
}

.delivery-inline-summary select {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 5px 8px;
    color: #17447c;
    background: #ffffff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 850;
}

.delivery-inline-summary input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.delivery-inline-summary input[type="number"]::-webkit-outer-spin-button,
.delivery-inline-summary input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.delivery-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.band-form-actions {
    grid-column: 1 / -1;
}

[data-lot-creation-content] {
    grid-column: 1 / -1;
    display: grid;
    min-width: 0;
}

.ventilation-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.delivery-table-actions {
    margin-top: 10px;
}

.delivery-control-actions {
    align-self: end;
    justify-content: center;
    margin-top: 0;
}

.delivery-form-actions button {
    min-height: 34px;
    padding: 7px 12px;
    color: #14345b;
    background: #ffe6a1;
    border: 1px solid rgba(164, 113, 16, 0.68);
    border-radius: 9px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 6px 12px rgba(103, 67, 11, 0.14);
}

.delivery-form-actions .button-secondary {
    color: #184a93;
    background: #eaf2ff;
    border-color: #bfd6fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 6px 12px rgba(17, 49, 88, 0.08);
}

.delivery-form-actions .button-secondary:hover {
    border-color: #9cc2f9;
    background: #e2efff;
}

.band-sheet,
.ventilation-sheet {
    display: grid;
    gap: 0;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    background: #ffffff;
}

.band-sheet {
    grid-column: 1 / -1;
}

.bande-main-fields {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(126px, 0.82fr) repeat(3, minmax(126px, 0.82fr));
    gap: 8px;
    margin-top: 10px;
}

.bande-main-fields > label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.bande-main-fields > label > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.bande-main-fields input,
.bande-main-fields select {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    background: #fff;
    color: #173556;
}

.bande-main-fields input:focus,
.bande-main-fields select:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.band-entry-row,
.ventilation-row {
    display: grid;
}

.band-entry-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.78fr) minmax(0, 0.92fr) minmax(0, 0.82fr) minmax(0, 0.82fr) minmax(0, 0.68fr);
    min-width: 900px;
}

.band-sheet--lot .band-entry-row {
    grid-template-columns: minmax(190px, 1.25fr) minmax(160px, 0.9fr) minmax(170px, 0.9fr) minmax(160px, 0.85fr);
    min-width: 760px;
}

.ventilation-row {
    grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 0.92fr) minmax(160px, 1fr) minmax(150px, 0.78fr) minmax(145px, 0.82fr) minmax(145px, 0.82fr) 34px;
    min-width: 960px;
}

.bande-ventilation-sheet .ventilation-row {
    grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(190px, 1.25fr) minmax(150px, 1fr) 34px;
    min-width: 720px;
}

.band-entry-row > span,
.band-entry-row > input,
.band-entry-row > select,
.ventilation-row > span,
.ventilation-row > input,
.ventilation-row > select,
.ventilation-row > button {
    min-height: 38px;
    border: 0;
    border-right: 1px solid #d7e3f1;
    border-bottom: 1px solid #d7e3f1;
    border-radius: 0;
    background: #fbfdff;
    color: var(--text);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 650;
    min-width: 0;
}

.band-entry-row > span,
.ventilation-row > span {
    display: grid;
    place-items: center start;
    padding: 7px 5px;
    color: #27415f;
    background: #eef5ff;
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.12;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.band-entry-row > input,
.band-entry-row > select,
.ventilation-row > input,
.ventilation-row > select {
    padding: 6px 5px;
}

.band-entry-row > [hidden] {
    display: none;
}

.ventilation-row > button {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    padding: 0;
    box-shadow: none;
}

.ventilation-row > :last-child {
    border-right: 0;
}

.band-entry-row > :last-child {
    border-right: 0;
}

.band-entry-row:last-child > *,
.ventilation-row:last-child > * {
    border-bottom: 0;
}

.band-entry-head > span,
.ventilation-head > span {
    min-height: 34px;
}

.form-grid label,
.delivery-row label,
.observation-field {
    display: grid;
    gap: 0;
    min-width: 0;
    color: #27415f;
    font-weight: 800;
}

.form-grid label[hidden] {
    display: none;
}

.form-grid label span,
.delivery-row label span,
.observation-field span {
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.delivery-row:not(.delivery-head) label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.delivery-row input,
.observation-field textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbea;
    border-radius: 9px;
    padding: 9px 10px;
    color: var(--text);
    background: #fbfdff;
    font: inherit;
    font-weight: 650;
}

.observation-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbea;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fbff;
    font: inherit;
}

.observation-field select:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.form-grid textarea {
    resize: vertical;
    min-height: 84px;
}

.observation-field {
    margin-top: 16px;
}

.observation-field textarea {
    min-height: 124px;
    resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.delivery-row input:focus,
.observation-field textarea:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.delivery-building-label {
    min-height: 40px;
    display: grid;
    align-content: center;
    padding: 0 12px;
    border: 1px solid #cfdbea;
    border-radius: 10px;
    background: #f8fbff;
    color: #1d2733;
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.delivery-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.delivery-row input[type="number"]::-webkit-outer-spin-button,
.delivery-row input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.water-table {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.water-row {
    display: grid;
    grid-template-columns: 0.8fr 1fr 0.8fr 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
}

.water-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.water-head span,
.water-row .water-building-label,
.water-row output,
.water-row .status-badge {
    text-align: center;
}

.water-building-label {
    min-height: 40px;
    display: grid;
    align-content: center;
    padding: 0 12px;
    border: 1px solid #cfdbea;
    border-radius: 10px;
    background: #f8fbff;
    color: #1d2733;
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.water-row input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbea;
    border-radius: 9px;
    padding: 9px 10px;
    color: var(--text);
    background: #fbfdff;
    font: inherit;
    font-weight: 650;
    text-align: center;
}

.water-row input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.water-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.water-row input[type="number"]::-webkit-outer-spin-button,
.water-row input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.water-row output {
    color: #17447c;
    font-weight: 850;
}

.water-history {
    display: grid;
    gap: 7px;
}

.water-history-row {
    display: grid;
    grid-template-columns: repeat(var(--water-history-columns, 3), minmax(0, 1fr));
    gap: 7px;
    align-items: center;
    padding: 9px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.water-history-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    cursor: default;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.water-history-row > * {
    min-width: 0;
    text-align: center;
}

.water-history-row strong {
    color: #17447c;
}

.consumption-filter-panel {
    margin-bottom: 18px;
}

.consumption-history-filter {
    margin: 12px 0 16px;
    gap: var(--history-filter-gap);
    align-items: end;
}

.consumption-history-filter label,
.consumption-building-filter {
    display: grid;
    gap: 3px;
}

.consumption-history-filter label span,
.consumption-building-filter span {
    color: var(--muted);
    font-size: var(--history-filter-label-size);
    font-weight: 850;
    text-transform: uppercase;
}

.consumption-history-filter select,
.consumption-history-filter input,
.consumption-building-filter select {
    min-height: var(--history-filter-field-height);
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: var(--history-filter-field-size);
    font-weight: 700;
}

.consumption-history-filter label:first-child {
    min-width: 170px;
}

.consumption-history-filter label:nth-child(2),
.consumption-history-filter label:nth-child(3),
.consumption-history-filter label:nth-child(4) {
    max-width: 150px;
}

.consumption-building-filter {
    min-width: 180px;
}

.consumption-table {
    display: grid;
    gap: 10px;
}

.consumption-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) repeat(2, minmax(160px, 1fr)) repeat(3, minmax(110px, 0.9fr)) minmax(58px, 0.35fr);
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #ffffff;
}

.consumption-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.consumption-row:not(.consumption-head):not(.consumption-empty) {
    cursor: default;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.consumption-row.editing {
    background: #fff8e6;
    border-color: #e6c36a;
    box-shadow: inset 0 0 0 1px rgba(198, 148, 36, 0.16);
}

.consumption-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.consumption-row strong {
    color: #17447c;
}

.consumption-actions {
    justify-content: center;
}

.consumption-time-input {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--text);
    background: #fbfdff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.consumption-time-input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.consumption-time-input[readonly] {
    color: #17447c;
    background: #f4f8fd;
    cursor: default;
}

.consumption-number-input {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--text);
    background: #fbfdff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.consumption-number-input[readonly] {
    color: #17447c;
    background: #f4f8fd;
    cursor: default;
}

.consumption-calculated-input {
    font-weight: 750;
}

.consumption-number-input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.consumption-number-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.consumption-number-input[type="number"]::-webkit-outer-spin-button,
.consumption-number-input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.mortality-entry-panel {
    grid-area: auto;
    margin-bottom: 18px;
}

.mortality-page .deliveries-list-panel {
    grid-column: 1 / -1;
}

.mortality-form-grid {
    grid-template-columns: minmax(130px, 150px) minmax(220px, 300px);
    justify-content: start;
}

.mortality-table,
.mortality-history {
    display: grid;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
}

.mortality-table {
    margin-top: 14px;
}

.mortality-history-filters {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(140px, 180px) minmax(118px, 132px) auto;
    gap: var(--history-filter-gap);
    align-items: end;
    justify-content: end;
    padding: var(--history-filter-padding);
    border: 1px solid #d7e5f6;
    border-radius: 10px;
    background: #fbfdff;
}

.mortality-history-filters label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.mortality-history-filters label span {
    color: #60738b;
    font-size: var(--history-filter-label-size);
    font-weight: 900;
    text-transform: uppercase;
}

.mortality-history-filters select,
.mortality-history-filters input {
    width: 100%;
    min-height: var(--history-filter-field-height);
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: var(--history-filter-field-size);
    font-weight: 700;
}

.mortality-history-filters select:focus,
.mortality-history-filters input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.mortality-history-reset {
    width: var(--history-filter-field-height);
    min-height: var(--history-filter-field-height);
    border: 1px solid #bfd5f7;
    border-radius: 8px;
    padding: 0;
    color: #184a93;
    background: #eef4ff;
    font-size: var(--history-filter-field-size);
    font-weight: 900;
    cursor: pointer;
}

.mortality-row,
.mortality-history-row {
    display: grid;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.mortality-row {
    grid-template-columns: minmax(220px, 280px) 112px 112px;
    padding: 10px 12px;
}

.mortality-history-row {
    grid-template-columns: 96px minmax(170px, 220px) minmax(145px, 185px) 82px 82px 52px;
    padding: 8px 10px;
    font-size: 0.82rem;
}

.mortality-head,
.mortality-history-head {
    background: #eef5ff;
    border-color: #cfe0f8;
    color: #294765;
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.mortality-row > *,
.mortality-history-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.mortality-number-input {
    width: 100%;
    min-height: 32px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: center;
}

.mortality-number-input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.mortality-number-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mortality-number-input[type="number"]::-webkit-outer-spin-button,
.mortality-number-input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.mortality-history-row strong {
    color: #17447c;
    font-size: 0.88rem;
}

.mortality-history-row.editing {
    border-color: #f0b94e;
    background: #fff9e9;
    box-shadow: inset 0 0 0 1px rgba(240, 185, 78, 0.32);
}

.mortality-empty,
.mortality-history-empty {
    color: #7b8da3;
}

.consumption-empty {
    color: #7b8da3;
}

.water-history-row.editing {
    border-color: #f0b94e;
    background: #fff9e9;
    box-shadow: inset 0 0 0 1px rgba(240, 185, 78, 0.32);
}

.eggs-page {
    --weighing-label-font-size: 0.68rem;
    --weighing-cell-font-size: 0.82rem;
    --weighing-head-font-size: 0.68rem;
    --weighing-caption-font-size: 0.82rem;
}

.eggs-page .delivery-entry-panel {
    padding: 14px;
}

.eggs-page .delivery-entry-panel > .form-grid {
    grid-template-columns:
        minmax(126px, 0.75fr)
        minmax(108px, 0.58fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(126px, 0.7fr)
        minmax(126px, 0.7fr);
    gap: 0;
    overflow-x: auto;
    border: 1px solid #c8d6e8;
    background: #ffffff;
}

.eggs-page.is-hens-mode .delivery-entry-panel > .form-grid {
    grid-template-columns:
        minmax(126px, 0.75fr)
        minmax(82px, 0.42fr)
        minmax(108px, 0.58fr)
        minmax(170px, 1fr)
        minmax(170px, 1fr)
        minmax(138px, 0.76fr);
}

.eggs-page .delivery-entry-panel > .form-grid > label,
.eggs-page .delivery-entry-panel > .form-grid > .delivery-inline-summary {
    min-height: 58px;
    border: 0;
    border-right: 1px solid #d6e1ef;
    border-bottom: 1px solid #d6e1ef;
    border-radius: 0;
    padding: 6px 8px;
    background: #ffffff;
}

.eggs-page .delivery-entry-panel > .form-grid > label > span,
.eggs-page .delivery-entry-panel > .form-grid > .delivery-inline-summary > span {
    margin-bottom: 3px;
    color: #60738b;
    font-size: var(--weighing-label-font-size);
    font-weight: 900;
    letter-spacing: 0.16px;
}

.eggs-page .delivery-entry-panel > .form-grid input,
.eggs-page .delivery-entry-panel > .form-grid select,
.eggs-page .delivery-entry-panel > .form-grid .delivery-inline-summary input,
.eggs-page .delivery-entry-panel > .form-grid .delivery-inline-summary select {
    min-height: 30px;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 4px 6px;
    background: #ffffff;
    font-size: var(--weighing-cell-font-size);
    font-weight: 750;
}

.eggs-page .delivery-entry-panel > .form-grid input:focus,
.eggs-page .delivery-entry-panel > .form-grid select:focus {
    position: relative;
    z-index: 2;
    outline: 2px solid #2f80ed;
    outline-offset: -2px;
    border-color: #2f80ed;
}

.eggs-page .delivery-entry-panel > .form-grid .delivery-inline-summary strong {
    min-height: 30px;
    display: grid;
    align-content: center;
    color: #17447c;
    font-size: var(--weighing-cell-font-size);
    line-height: 1.1;
}

.eggs-page .delivery-entry-panel > .form-grid .weighing-week-summary strong {
    color: #0f766e;
    font-weight: 900;
}

.eggs-table {
    display: grid;
    min-width: 0;
}

.eggs-sheet {
    display: grid;
    gap: 0;
    min-width: 0;
    border: 1px solid #c8d6e8;
    background: #ffffff;
}

.eggs-sheet-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 34px;
    padding: 6px 9px;
    color: #294765;
    border-bottom: 1px solid #c8d6e8;
    background: #f7fbff;
}

.eggs-sheet-caption strong {
    font-size: var(--weighing-caption-font-size);
    font-weight: 900;
}

.eggs-sheet-caption span {
    color: var(--muted);
    font-size: var(--weighing-caption-font-size);
    font-weight: 650;
}

.eggs-sheet-scroll {
    overflow-x: auto;
    padding-bottom: 0;
}

.eggs-sheet-grid {
    display: grid;
    min-width: max-content;
}

.eggs-sheet-row {
    display: grid;
    grid-template-columns: 184px repeat(15, 76px);
    align-items: stretch;
}

.eggs-sheet-head {
    color: #294765;
    font-size: var(--weighing-head-font-size);
    font-weight: 850;
    text-transform: uppercase;
}

.eggs-sheet-head span {
    display: grid;
    min-height: 30px;
    place-items: center;
    border-right: 1px solid #c8d6e8;
    border-bottom: 1px solid #c8d6e8;
    background: #eef6ff;
    text-align: center;
}

.eggs-sheet-label,
.eggs-sheet-row input {
    min-height: 38px;
    border: 0;
    border-right: 1px solid #d6e1ef;
    border-bottom: 1px solid #d6e1ef;
    border-radius: 0;
    background: #ffffff;
}

.eggs-sheet-label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-content: center;
    padding: 5px 7px;
    background: #fbfdff;
}

.eggs-bucket-row .eggs-sheet-label {
    background: #f2f7ff;
}

.eggs-sheet-label strong,
.eggs-sheet-label output {
    color: #17447c;
    font-weight: 850;
}

.eggs-sheet-label output {
    font-size: var(--weighing-cell-font-size);
}

.eggs-sheet-label select {
    width: 100%;
    min-height: 28px;
    border: 1px solid #c8d6e8;
    border-radius: 0;
    padding: 4px 6px;
    color: #17447c;
    background: #ffffff;
    font: inherit;
    font-size: var(--weighing-cell-font-size);
    font-weight: 700;
}

.eggs-sheet-label .status-badge {
    justify-self: start;
    padding: 3px 6px;
    font-size: var(--weighing-label-font-size);
}

.eggs-sheet-row input {
    width: 76px;
    padding: 6px 5px;
    color: var(--text);
    font: inherit;
    font-size: var(--weighing-cell-font-size);
    font-weight: 700;
    text-align: center;
}

.eggs-sheet-row input:focus,
.eggs-sheet-label select:focus {
    position: relative;
    z-index: 2;
    outline: 2px solid #2f80ed;
    outline-offset: -2px;
    border-color: #2f80ed;
    background: #ffffff;
}

.eggs-sheet-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.eggs-sheet-row input[type="number"]::-webkit-outer-spin-button,
.eggs-sheet-row input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.eggs-sheet-row.row-error input,
.eggs-sheet-row.row-error .eggs-sheet-label {
    background: #fff7f7;
}

.eggs-sheet-empty {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px dashed #c9d9ed;
    border-radius: 10px;
    color: #71839b;
    background: #fbfdff;
    font-weight: 750;
}

.weighing-mode-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.weighing-mode-group legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.weighing-mode-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    min-width: 96px;
    padding: 0 14px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #fbfdff;
    color: #27415f;
    font-weight: 850;
    cursor: pointer;
}

.weighing-mode-group input {
    width: 16px;
    height: 16px;
    accent-color: #1c6cf2;
}

.weighing-mode-group label:has(input:checked) {
    border-color: #8dbbf9;
    background: #eaf3ff;
    box-shadow: inset 0 0 0 1px rgba(28, 108, 242, 0.16);
}

.hens-table {
    display: grid;
    min-width: 0;
    border: 1px solid #c8d6e8;
    background: #ffffff;
}

.eggs-page.is-hens-mode .delivery-table-block[data-hens-only] {
    margin-top: 14px;
}

.eggs-row,
.hens-row {
    display: grid;
    grid-template-columns: 0.65fr 0.95fr 0.8fr 1.1fr 1.1fr 0.9fr;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

.hens-row {
    grid-template-columns: 0.9fr 0.9fr 1.1fr 1.1fr 1fr;
}

.eggs-page.is-hens-mode .hens-row {
    grid-template-columns:
        minmax(160px, 1fr)
        minmax(130px, 0.78fr)
        minmax(150px, 0.95fr)
        minmax(150px, 0.95fr)
        minmax(135px, 0.85fr);
    gap: 0;
}

.eggs-head,
.hens-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: var(--weighing-head-font-size);
    font-weight: 850;
    text-transform: uppercase;
}

.hens-head span,
.hens-row > span,
.hens-row output,
.hens-row input {
    min-height: 38px;
    border-right: 1px solid #d6e1ef;
    border-bottom: 1px solid #d6e1ef;
    border-radius: 0;
}

.eggs-page.is-hens-mode .hens-row > *,
.eggs-page.is-hens-mode .hens-head > * {
    font-size: var(--weighing-cell-font-size);
}

.eggs-page.is-hens-mode .hens-head > * {
    font-size: var(--weighing-head-font-size);
}

.hens-head span {
    display: grid;
    place-items: center;
    min-height: 30px;
    background: #eef6ff;
}

.hens-row > span,
.hens-row output {
    display: grid;
    align-content: center;
    padding: 6px 7px;
    background: #ffffff;
    font-size: var(--weighing-cell-font-size);
}

.eggs-head span,
.hens-head span,
.eggs-row output,
.hens-row output,
.eggs-row .status-badge {
    text-align: center;
}

.hens-row .status-badge {
    text-align: center;
}

.eggs-row input,
.hens-row input {
    width: 100%;
    min-height: 38px;
    border-top: 0;
    border-left: 0;
    padding: 6px 7px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: var(--weighing-cell-font-size);
    font-weight: 650;
    text-align: center;
}

.eggs-row input:focus,
.hens-row input:focus {
    outline: 2px solid rgba(28, 108, 242, 0.25);
    border-color: #73a6f8;
}

.eggs-row input[type="number"],
.hens-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.eggs-row input[type="number"]::-webkit-outer-spin-button,
.eggs-row input[type="number"]::-webkit-inner-spin-button,
.hens-row input[type="number"]::-webkit-outer-spin-button,
.hens-row input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.eggs-row output,
.hens-row output {
    color: #17447c;
    font-size: var(--weighing-cell-font-size);
    font-weight: 850;
}

.eggs-history {
    display: grid;
    gap: 7px;
}

.hens-history {
    display: grid;
    gap: 7px;
}

.eggs-history-row,
.hens-history-row {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr 1.1fr 1fr 1fr;
    gap: 7px;
    align-items: center;
    padding: 9px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.hens-history-row {
    grid-template-columns: 0.9fr 1.1fr 1.1fr 1fr 1fr 0.55fr;
}

.eggs-history-head,
.hens-history-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    cursor: default;
    font-size: var(--weighing-cell-font-size);
    font-weight: 850;
    text-transform: uppercase;
}

.eggs-history-row > *,
.hens-history-row > * {
    min-width: 0;
    font-size: var(--weighing-cell-font-size);
    text-align: center;
}

.eggs-history-row strong,
.hens-history-row strong {
    color: #17447c;
}

.hens-history-actions {
    justify-self: center;
}

.eggs-history-row.editing,
.hens-history-row.editing {
    border-color: #f0b94e;
    background: #fff9e9;
    box-shadow: inset 0 0 0 1px rgba(240, 185, 78, 0.32);
}

.synthesis-selector-panel {
    display: grid;
    gap: 4px;
}

.building-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.building-radio-group legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.building-radio-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    min-width: 76px;
    padding: 0 14px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #fbfdff;
    color: #27415f;
    font-weight: 850;
    cursor: pointer;
}

.building-radio-group input {
    width: 16px;
    height: 16px;
    accent-color: #1c6cf2;
}

.building-radio-group label:has(input:checked) {
    border-color: #8dbbf9;
    background: #eaf3ff;
    box-shadow: inset 0 0 0 1px rgba(28, 108, 242, 0.16);
}

.synthesis-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.summary-kpi {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce7f5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.summary-kpi strong {
    color: #17447c;
    font-size: 1.55rem;
    line-height: 1;
}

.synthesis-list {
    display: grid;
    gap: 8px;
}

.synthesis-row {
    display: grid;
    grid-template-columns: 0.85fr 0.9fr 0.95fr 1fr 0.75fr minmax(180px, 1.5fr);
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
}

.synthesis-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.synthesis-row > * {
    min-width: 0;
    text-align: center;
}

.synthesis-row > *:last-child {
    text-align: left;
    overflow-wrap: anywhere;
}

.synthesis-row time,
.synthesis-row span {
    color: #263f5e;
    font-weight: 750;
}

.bands-list {
    display: grid;
    gap: 8px;
}

.bands-row {
    display: grid;
    grid-template-columns: 1.2fr 0.95fr 0.85fr 0.9fr 0.9fr 0.9fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
}

.bands-mode-lot .bands-row {
    grid-template-columns: 1.15fr 0.9fr 0.9fr 0.9fr auto;
}

.bands-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.bands-row > * {
    min-width: 0;
    text-align: center;
}

.bands-row span,
.bands-row time {
    color: #263f5e;
    font-weight: 750;
}

.bands-row strong {
    color: #17447c;
}

.ventilation-history-list {
    display: grid;
    gap: 8px;
}

.ventilation-history-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(150px, 1fr) minmax(110px, 0.78fr) minmax(76px, 0.44fr) minmax(92px, 0.58fr) minmax(94px, 0.62fr) minmax(94px, 0.62fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
}

.bande-history-list .ventilation-history-row {
    grid-template-columns: minmax(138px, 1fr) minmax(138px, 1fr) minmax(102px, 0.68fr) minmax(82px, 0.5fr) minmax(74px, 0.44fr) minmax(84px, 0.5fr);
    cursor: pointer;
}

.bande-history-list .ventilation-history-row:not(.ventilation-history-head):hover {
    border-color: #b9d4f5;
    background: #f8fbff;
}

.ventilation-history-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.ventilation-history-row > * {
    min-width: 0;
    text-align: center;
}

.ventilation-history-row span,
.ventilation-history-row time {
    color: #263f5e;
    font-weight: 750;
}

.ventilation-history-row strong {
    color: #17447c;
}

.profiles-list {
    display: grid;
    gap: 8px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
}

.profile-layout .delivery-entry-panel {
    grid-area: auto;
}

.profile-form-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    justify-items: stretch;
    align-items: end;
}

.profile-form-grid label,
.profile-form-grid .profile-form-actions {
    justify-self: stretch;
}

.profile-form-grid label span {
    text-align: left;
}

.profiles-row {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 1fr 1.2fr 0.85fr 0.95fr 0.85fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #ffffff;
}

.profiles-head {
    color: #294765;
    background: #eef6ff;
    border-color: #cfe0f8;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.profiles-row > * {
    min-width: 0;
    text-align: center;
}

.profiles-row span,
.profiles-row time {
    color: #263f5e;
    font-weight: 750;
}

.profiles-row strong {
    color: #17447c;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
}

.profiles-actions {
    justify-content: flex-end;
}

.profile-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 0;
}

.bands-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 6px;
}

.history-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.history-icon-action {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    box-shadow: none;
    transition: transform 0.14s ease, opacity 0.14s ease, filter 0.14s ease;
    flex: 0 0 auto;
    line-height: 0;
}

.history-icon-action:hover {
    transform: translateY(-1px);
    opacity: 0.9;
    filter: brightness(1.03);
}

.history-icon-action:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.history-icon-action svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 auto;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.12));
}

.history-icon-action--edit {
    color: #1459c7;
}

.history-icon-action--reset {
    color: #9a650f;
}

.history-icon-action--delete {
    color: #d11f49;
}

.field-wide {
    grid-column: 1 / -1;
}

.delivery-table {
    display: grid;
    gap: 8px;
    overflow-x: auto;
}

.delivery-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) 110px;
    gap: 10px;
    align-items: end;
    min-width: 700px;
    padding: 10px;
    border: 1px solid #e2eaf5;
    border-radius: 10px;
    background: #fbfdff;
}

.delivery-page[data-silo-weight-only="true"] .delivery-row {
    grid-template-columns: minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(140px, 1fr);
    min-width: 420px;
}

.delivery-head {
    align-items: center;
    min-height: 38px;
    color: #60738b;
    background: #eef5ff;
    border-color: #d4e3f8;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.delivery-head span {
    overflow-wrap: anywhere;
}

.delivery-row output {
    min-height: 40px;
    display: grid;
    align-content: center;
    color: #173d6a;
    font-weight: 900;
}

.delivery-status {
    align-self: center;
    justify-self: start;
    color: #1d5b34;
    background: #dff7e7;
}

.delivery-status.pending {
    color: #76500f;
    background: #fff1cf;
}

.delivery-status.error {
    color: #8e1d15;
    background: #ffe5e0;
}

.delivery-row.row-complete {
    border-left: 5px solid #31a85f;
}

.delivery-row.row-pending {
    border-left: 5px solid #d99a21;
}

.delivery-row.row-error {
    border-left: 5px solid #d64032;
}

.deliveries-list-panel {
    width: 100%;
}

.deliveries-list {
    display: grid;
    gap: 8px;
}

.silo-weight-history {
    display: grid;
    gap: 8px;
}

.silo-weight-history-row {
    display: grid;
    grid-template-columns: minmax(90px, 0.75fr) minmax(70px, 0.55fr) minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(80px, 0.7fr) minmax(100px, 0.8fr) minmax(46px, auto);
    gap: 8px;
    align-items: center;
    text-align: center;
    padding: 11px;
    border: 1px solid #e2eaf5;
    border-radius: 10px;
    background: #fbfdff;
}

.silo-weight-history-head {
    min-height: 38px;
    color: #60738b;
    background: #eef5ff;
    border-color: #d4e3f8;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.silo-weight-history-row time,
.silo-weight-history-row span {
    color: #263f5e;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.silo-weight-history-row strong {
    color: #17447c;
    font-size: 0.92rem;
    text-align: center;
    white-space: nowrap;
}

.deliveries-list-row {
    display: grid;
    grid-template-columns: minmax(88px, 0.9fr) minmax(54px, 0.52fr) repeat(6, minmax(70px, 0.78fr)) minmax(112px, 0.95fr) minmax(46px, auto);
    gap: 7px;
    align-items: center;
    text-align: center;
    padding: 11px;
    border: 1px solid #e2eaf5;
    border-radius: 10px;
    background: #fbfdff;
}

.deliveries-list-row:not(.deliveries-list-head) {
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.deliveries-list-row:not(.deliveries-list-head):hover,
.deliveries-list-row.editing {
    background: #fff8e6;
    border-color: #e6c36a;
    box-shadow: inset 0 0 0 1px rgba(198, 148, 36, 0.16);
}

.deliveries-list-head {
    min-height: 38px;
    color: #60738b;
    background: #eef5ff;
    border-color: #d4e3f8;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.deliveries-list-row time,
.deliveries-list-row span {
    color: #263f5e;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.deliveries-list-row strong {
    color: #17447c;
    font-size: 0.92rem;
    text-align: center;
    white-space: nowrap;
}

.delivery-history-actions,
.silo-weight-history-actions {
    justify-self: center;
}

.water-history-actions {
    justify-self: center;
}

body.technique-module .form-grid input,
body.technique-module .form-grid select,
body.technique-module .delivery-inline-summary input,
body.technique-module .delivery-inline-summary select,
body.technique-module .delivery-row input,
body.technique-module .water-row input,
body.technique-module .chariot-sheet-row input,
body.technique-module .chariot-sheet-row select,
body.technique-module .observation-field select {
    font-size: 0.82rem;
}

.placeholder-panel {
    width: min(760px, 100%);
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.placeholder-panel h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.placeholder-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 1120px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 16px;
    }

    .sidebar-card {
        margin-top: 0;
    }

    .home-board {
        grid-template-columns: 1fr;
        grid-template-areas:
            "alarms"
            "reminders"
            "events";
    }

    .delivery-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "entry"
            "controls";
    }

    .bande-main-fields {
        grid-template-columns: 1fr 1fr;
    }

    .bands-page .delivery-layout {
        grid-template-columns: 1fr;
    }

    .synthesis-kpis {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .content {
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions,
    .topbar-actions button {
        width: 100%;
    }

    .home-stats {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .eggs-page .delivery-entry-panel > .form-grid {
        grid-template-columns: repeat(6, minmax(118px, 1fr));
    }

    .bande-main-fields {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .status-badge {
        width: fit-content;
    }

    .deliveries-list-row {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .synthesis-row {
        grid-template-columns: 1fr;
    }

    .bands-row {
        grid-template-columns: 1fr;
    }

    .ventilation-history-row {
        grid-template-columns: 1fr;
    }

    .profiles-row {
        grid-template-columns: 1fr;
    }

    .chariot-history-hero,
    .chariot-history-filters {
        grid-template-columns: 1fr;
    }

    .chariot-history-list {
        min-width: 0;
    }

    .chariot-history-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .mortality-history-filters {
        grid-template-columns: 1fr;
    }

    .mortality-row,
    .mortality-history-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .chariot-passage-badge {
        justify-self: start;
    }

}
