:root {
    --hen-blue: #3360cf;
    --hen-blue-dark: #244fac;
    --hen-green: #2fe476;
    --hen-grid: #28e981;
    --hen-bg: #e9e9e9;
    --hen-text: #101010;
    --hen-muted: #8a8a8a;
    --hen-shadow: 0 2px 9px rgba(0, 0, 0, 0.22);
    --hen-number-font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--hen-text);
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    background: var(--hen-bg);
}

.numeric-text,
.metric-value,
.detail-value,
.sales-item-total strong,
.sales-grand-total strong,
.table tbody td,
.table tfoot th,
.table tfoot td,
[data-table-total],
.mortality-card .value,
.mortality-card .meta,
.trend-up,
.trend-down {
    font-family: var(--hen-number-font);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: 0;
}

a {
    text-decoration: none;
}

.d-flex {
    display: flex;
}

.align-items-start {
    align-items: flex-start;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

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

.gap-2 {
    gap: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

.fw-bold {
    font-weight: 800;
}

.w-auto {
    width: auto;
}

.app-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 2px 0 14px rgba(15, 23, 42, 0.12);
    z-index: 4;
}

.brand-lockup {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 112px;
    padding: 22px 22px 10px;
}

.brand-card {
    display: block;
    width: 100%;
    padding: 14px 16px 12px;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    background: #f9fbff;
    text-align: center;
}

.brand-card img,
.logo-img {
    display: block;
    width: min(178px, 88%);
    max-height: 64px;
    object-fit: contain;
    margin-inline: auto;
}

.brand-subtitle {
    display: block;
    margin-top: 6px;
    color: #7a8699;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.side-nav {
    padding: 12px 14px 0;
}

.nav-section-label {
    margin: 18px 10px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #7a8494;
    text-transform: uppercase;
}

.side-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    min-height: 44px;
    margin-bottom: 6px;
    padding: 0 12px 0 8px;
    border-radius: 7px;
    color: #253044;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.side-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--hen-blue);
    opacity: 0;
    transform: scaleX(0.12);
    transform-origin: 24px center;
    transition: transform 0.28s ease, opacity 0.2s ease;
}

.side-link::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    z-index: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--hen-blue);
    box-shadow: 0 6px 14px rgba(51, 96, 207, 0.18);
    transform: translateY(-50%);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.side-link span {
    position: relative;
    z-index: 1;
}

.side-link:hover,
.side-link.active {
    color: #fff;
    box-shadow: 0 8px 16px rgba(51, 96, 207, 0.18);
}

.side-link:hover::before,
.side-link.active::before {
    opacity: 1;
    transform: scaleX(1);
}

.side-icon {
    position: relative;
    width: 26px;
    height: 26px;
    display: inline-block;
    color: currentColor;
    transform: scale(0.72);
    transform-origin: center;
}

.side-img-icon {
    z-index: 1;
    width: 32px;
    height: 32px;
    padding: 7px;
    object-fit: contain;
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: none;
    transition: transform 0.22s ease;
}

.side-link:hover::after,
.side-link.active::after {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36), 0 5px 12px rgba(15, 23, 42, 0.12);
}

.side-link:hover .side-img-icon,
.side-link.active .side-img-icon {
    filter: none;
    transform: scale(1.03);
}

.sidebar-account {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid #e6e8ee;
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}

.account-summary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: inherit;
    text-align: left;
    background: transparent;
    transition: border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.account-summary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--hen-blue);
    opacity: 0;
    transform: scaleX(0.12);
    transform-origin: 22px center;
    transition: transform 0.28s ease, opacity 0.2s ease;
}

.account-summary::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    z-index: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--hen-blue);
    box-shadow: 0 6px 14px rgba(51, 96, 207, 0.18);
    transform: translateY(-50%);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.account-summary:hover,
.account-summary:focus-within {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(51, 96, 207, 0.16);
}

.account-summary:hover::before,
.account-summary:focus-within::before {
    opacity: 1;
    transform: scaleX(1);
}

.account-summary:hover::after,
.account-summary:focus-within::after {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36), 0 5px 12px rgba(15, 23, 42, 0.12);
}

.account-avatar {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(51, 96, 207, 0.22);
    border-radius: 50%;
    position: relative;
    background: #edf3ff;
}

.account-avatar::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 7px;
    width: 12px;
    height: 12px;
    border: 1.8px solid var(--hen-blue);
    border-radius: 50%;
}

.account-avatar::after {
    content: "";
    position: absolute;
    left: 7px;
    bottom: 7px;
    width: 18px;
    height: 10px;
    border: 1.8px solid var(--hen-blue);
    border-radius: 50% 50% 0 0;
    border-bottom: 0;
}

.account-avatar-img {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    padding: 7px;
    display: block;
    object-fit: contain;
    opacity: 1;
    filter: brightness(0) invert(1);
    transition: transform 0.22s ease;
}

.account-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: block;
}

.account-name {
    display: block;
    overflow: hidden;
    color: #182234;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-role {
    display: block;
    overflow: hidden;
    color: var(--hen-blue);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-summary:hover .account-name,
.account-summary:focus-within .account-name,
.account-summary:hover .account-role,
.account-summary:focus-within .account-role {
    color: #fff;
}

.account-summary:hover .account-avatar-img,
.account-summary:focus-within .account-avatar-img {
    filter: none;
    transform: scale(1.03);
}

.account-logout-form {
    margin: 0;
}

.account-logout-inline {
    display: flex;
    justify-content: flex-end;
}

.account-logout-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: 1px solid #f0c5c1;
    border-radius: 6px;
    color: #b42318;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.account-logout-button:hover,
.account-logout-button:focus {
    color: #b42318;
    border-color: #f3a6a0;
    background: #fff1f0;
}

.logout-icon-img {
    width: 19px;
    height: 19px;
    display: block;
    object-fit: contain;
}

.app-panel {
    min-width: 0;
    background: var(--hen-bg);
}

.app-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 22px 0 28px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
}

.app-topbar h1 {
    margin: 0;
    padding: 18px 0 12px;
    color: var(--hen-blue);
    font-size: 38px;
    font-weight: 800;
    border-bottom: 4px solid var(--hen-blue);
}

.app-topbar time {
    color: var(--hen-blue);
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.app-content {
    padding: 42px 30px 34px;
}

.app-content > .container,
.app-content > .container-fluid {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.app-content h1,
.app-content h2 {
    color: var(--hen-blue);
    font-weight: 800;
}

.page-actions,
.table-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 700;
}

.filter-row select {
    width: auto;
    min-width: 180px;
}

.filter-row input[type="date"] {
    width: auto;
    min-width: 150px;
}

.filter-row input[type="month"] {
    width: auto;
    min-width: 160px;
}

.dashboard-filter,
.production-filter {
    flex-wrap: wrap;
}

.date-input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.date-input-action input {
    min-width: 0;
}

.btn-today {
    color: #fff;
    background: var(--hen-blue);
    border-color: var(--hen-blue);
    white-space: nowrap;
}

.btn-today:hover {
    color: #fff;
    background: var(--hen-blue-dark);
    border-color: var(--hen-blue-dark);
}

.readonly-metric,
input[readonly].readonly-metric {
    color: var(--hen-blue);
    font-weight: 800;
    background: #eef4ff;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #6f6f6f;
    font-size: 12px;
    font-weight: 700;
}

.form-intro {
    margin: -4px 0 18px;
    color: #68758c;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.auto-metric-note {
    margin: 4px 0 18px;
    padding: 10px 12px;
    color: var(--hen-blue);
    background: #eef4ff;
    border-left: 4px solid var(--hen-blue);
    font-size: 14px;
    font-weight: 700;
}

.btn,
.page-link {
    display: inline-block;
    border-radius: 5px;
    font-weight: 700;
    padding: 6px 12px;
    border: 1px solid transparent;
}

.btn-primary,
.btn-info,
.page-item.active .page-link {
    color: #fff;
    background: var(--hen-blue);
    border-color: var(--hen-blue);
}

.btn-primary:hover,
.btn-info:hover {
    background: var(--hen-blue-dark);
    border-color: var(--hen-blue-dark);
}

.btn-warning {
    color: #fff;
    background: #ffd900;
    border-color: #ffd900;
}

.btn-danger {
    background: #ed0909;
    border-color: #ed0909;
}

.btn-success,
.export-csv,
.export-excel {
    background: #05853e;
    border-color: #05853e;
}

.export-copy,
.export-print {
    background: #ffd900;
    border-color: #ffd900;
}

.export-pdf {
    background: #ed0909;
    border-color: #ed0909;
}

.table-responsive {
    background: #fff;
    padding: 18px;
    overflow-x: auto;
}

.action-page {
    max-width: 1120px;
}

.action-panel {
    background: #fff;
    padding: 28px;
    border-radius: 5px;
    box-shadow: var(--hen-shadow);
}

.card.action-panel {
    padding: 0;
    overflow: hidden;
}

.card.action-panel .card-header {
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 900;
}

.card.action-panel .card-body {
    padding: 28px;
}

.action-panel h1,
.action-panel h2,
.action-panel h3,
.action-panel h4,
.action-panel h5 {
    margin-top: 0;
}

.action-panel .form,
.action-panel form {
    margin-bottom: 0;
}

.action-panel label {
    margin-bottom: 6px;
    font-weight: 800;
}

.action-panel .form-group {
    margin-bottom: 18px;
}

.action-panel textarea,
.compact-note-input,
.note-field textarea {
    width: 100%;
    min-height: 58px;
    max-height: 92px;
    resize: vertical;
}

.note-field {
    width: 100%;
}

.action-panel .alert {
    box-shadow: none;
}

.production-form {
    display: grid;
    gap: 18px;
}

.form-section {
    padding: 16px;
    border: 1px solid #e4ebf7;
    border-radius: 6px;
    background: #fbfdff;
}

.form-section h2 {
    margin: 0 0 14px;
    color: var(--hen-blue);
    font-size: 1rem;
    font-weight: 800;
}

.production-form-grid {
    display: grid;
    gap: 14px;
    align-items: end;
}

.production-form-grid-main {
    grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr);
}

.production-form-grid-inputs {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.production-form-grid-metrics {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.production-form .form-group {
    margin-bottom: 0;
}

.compact-metric-field input {
    min-height: 42px;
}

.detail-panel {
    max-width: 1080px;
    padding: 22px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #eef4ff;
}

.detail-title {
    margin: 0;
    color: var(--hen-blue);
    font-size: 26px;
    font-weight: 900;
}

.detail-subtitle {
    margin-top: 3px;
    color: #666;
    font-size: 14px;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-section {
    margin-top: 16px;
}

.detail-section-title {
    margin: 0 0 10px;
    color: #111;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.detail-grid.compact-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-item {
    min-height: 64px;
    padding: 9px 11px;
    border: 1px solid #dbe6ff;
    background: #f8fbff;
}

.detail-label {
    display: block;
    margin-bottom: 3px;
    color: #68758c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-value {
    color: #111;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.detail-note {
    padding: 10px 12px;
    border-left: 4px solid var(--hen-blue);
    background: #eef4ff;
    font-weight: 700;
}

.detail-mini-table {
    padding: 0;
}

.detail-mini-table .table thead th {
    font-size: 15px;
    padding: 10px 8px;
}

.detail-mini-table .table tbody td {
    height: auto;
    min-height: 0;
    padding: 9px 8px;
    font-size: 14px;
}

.sales-meta-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) minmax(260px, 1.2fr) minmax(180px, 0.85fr);
    gap: 22px;
    align-items: start;
    padding-bottom: 28px;
    border-bottom: 2px solid #eef4ff;
}

.sales-meta-grid .form-group {
    margin: 0;
}

.sales-meta-grid label {
    display: block;
    margin-bottom: 8px;
}

.sales-meta-grid input,
.sales-meta-grid select {
    width: 100%;
    min-height: 46px;
}

.sales-meta-grid .date-input-action {
    grid-template-columns: minmax(0, 1fr) 88px;
}

.sales-items-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin: 22px 0 12px;
}

.sales-items-header h2 {
    margin: 0;
    color: var(--hen-blue);
    font-size: 22px;
    font-weight: 900;
}

.sales-item-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(110px, 0.7fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #dbe6ff;
    background: #f8fbff;
}

.sales-item-field label,
.sales-item-delete span {
    display: block;
    margin-bottom: 5px;
    color: #68758c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.sales-item-total {
    min-height: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sales-item-total span,
.sales-grand-total span {
    color: #68758c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.sales-item-total strong,
.sales-grand-total strong {
    color: var(--hen-blue);
    font-size: 18px;
    font-weight: 900;
}

.sales-item-delete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #ed0909;
}

.sales-grand-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
    margin: 14px 0 22px;
    padding: 12px;
    background: #eef4ff;
    border-left: 4px solid var(--hen-blue);
}

.sales-notes {
    margin: 0 0 18px;
}

.sales-notes textarea {
    min-height: 58px;
    max-height: 92px;
    resize: vertical;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table thead,
.table-dark {
    --bs-table-bg: var(--hen-blue);
    --bs-table-color: #fff;
}

.table thead th,
.table-dark th {
    min-width: 108px;
    color: #fff;
    background: var(--hen-blue) !important;
    border: 1px solid var(--hen-grid) !important;
    text-align: center;
    vertical-align: middle;
    font-size: 0.95rem;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
    padding: 16px 20px;
    white-space: normal;
}

.table tbody td {
    min-height: 58px;
    height: 58px;
    border: 1px solid var(--hen-grid);
    text-align: center;
    vertical-align: middle;
    font-size: 16px;
    line-height: 1.35;
    padding: 12px 16px;
    background: #fff;
}

.table-subtext {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.production-log-table thead th,
.dataTables_wrapper .production-log-table.dataTable thead th {
    min-width: 88px;
    padding: 12px 18px 12px 12px !important;
    font-size: 0.88rem;
}

.production-log-table tbody td {
    padding: 10px 12px;
    font-size: 0.95rem;
}

.production-log-table .table-subline {
    display: block;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
}

.table thead th.no-export,
.table tbody td.no-export {
    min-width: 132px;
}

.table tbody td.no-export {
    white-space: nowrap;
}

.table tfoot th,
.table tfoot td {
    border: 1px solid var(--hen-grid);
    background: #eef4ff;
    color: var(--hen-blue);
    text-align: center;
    vertical-align: middle;
    font-size: 18px;
    font-weight: 900;
    padding: 14px;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fff;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #f5fff9;
}

.table .btn-sm {
    min-width: 44px;
    padding: 3px 8px;
    font-size: 0.78rem;
    line-height: 1.2;
    color: #fff;
}

.table tbody td.no-export .btn-sm,
.table tbody td.no-export form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.table tbody td.no-export .btn-sm {
    justify-content: center;
}

.table tbody td.no-export .btn-sm + .btn-sm,
.table tbody td.no-export form {
    margin-left: 4px;
}

.dataTables_wrapper {
    padding: 0;
    font-family: inherit;
}

.dt-action-row,
.dt-control-row,
.dt-footer-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 12px 0;
}

.dt-action-row {
    justify-content: flex-end;
    padding-top: 0;
}

.dt-control-row {
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 0;
}

.dt-footer-row {
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 0;
}

.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    color: var(--hen-text) !important;
    font-size: 16px;
    font-weight: 800;
}

.dataTables_length label,
.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    min-height: 36px;
    border: 1px solid #b6b6b6;
    border-radius: 0;
    background: #fff;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_filter input {
    width: min(280px, 52vw);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 42px;
    margin-left: 3px;
    padding: 6px 12px !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 5px !important;
    color: #5f5f5f !important;
    font-weight: 800;
    background: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    border-color: var(--hen-blue) !important;
    background: var(--hen-blue) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #fff !important;
    border-color: var(--hen-blue-dark) !important;
    background: var(--hen-blue-dark) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #9a9a9a !important;
    border-color: #d5d5d5 !important;
    background: #f5f5f5 !important;
}

.dataTables_wrapper table.dataTable.no-footer {
    border-bottom: 0;
}

.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table.dataTable thead td {
    border-bottom: 1px solid var(--hen-grid) !important;
    text-align: center;
    vertical-align: middle;
    padding: 16px 28px 16px 20px !important;
    white-space: normal;
}

.dt-buttons {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.dt-buttons .dt-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 86px;
    margin: 0 !important;
    padding: 8px 14px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.12);
    background-image: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.dt-buttons .dt-button:hover,
.dt-buttons .dt-button:focus {
    color: #fff !important;
    filter: brightness(0.94);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
}

.dt-buttons .dt-button:active {
    transform: translateY(0);
}

.dt-export-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dt-buttons .dt-button span {
    display: inline-block;
}

.dt-buttons .buttons-copy,
.dt-buttons .buttons-print {
    background: #c99500 !important;
    border-color: #b98700 !important;
}

.dt-buttons .buttons-csv,
.dt-buttons .buttons-excel {
    background: #05853e !important;
    border-color: #047237 !important;
}

.dt-buttons .buttons-pdf {
    background: #ed0909 !important;
    border-color: #d40808 !important;
}

@media (max-width: 576px) {
    .dt-buttons {
        justify-content: flex-start;
    }

    .dt-buttons .dt-button {
        min-width: calc(50% - 4px);
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .section-heading > span {
        white-space: normal;
    }
}

.pagination {
    margin-top: 24px;
    justify-content: flex-end !important;
}

.page-link {
    color: #5f5f5f;
    min-width: 48px;
    text-align: center;
    border-color: #d5d5d5;
}

.card,
.metric-card,
.activity-card {
    border: 0;
    border-radius: 5px !important;
    box-shadow: var(--hen-shadow);
}

.dashboard-tabs {
    display: flex;
    gap: 22px;
    margin: -24px 0 30px;
    font-size: 26px;
    font-weight: 800;
}

.dashboard-tabs a {
    color: #808080;
    padding: 10px 4px 18px;
}

.dashboard-tabs .active {
    color: var(--hen-blue);
    border-bottom: 4px solid var(--hen-blue);
}

.message-stack {
    margin-bottom: 16px;
}

.forecast-run-status {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 520px;
    margin: 0 0 20px;
    padding: 16px 18px;
    border-left: 4px solid var(--hen-blue);
}

.forecast-run-status .metric-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

.forecast-run-status-text {
    color: #1f3763;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.forecast-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.forecast-toolbar label {
    display: block;
    margin-bottom: 5px;
    color: #5f6878;
    font-size: 0.78rem;
    font-weight: 600;
}

.forecast-method-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: -4px 0 18px;
}

.forecast-method-strip div {
    padding: 14px 16px;
    border: 1px solid #e3e8f4;
    border-left: 4px solid var(--hen-blue);
    border-radius: 5px;
    background: #fff;
    box-shadow: var(--hen-shadow);
}

.forecast-method-strip strong,
.forecast-method-strip span {
    display: block;
}

.forecast-method-strip strong {
    color: #1f3763;
    font-size: 0.95rem;
    font-weight: 800;
}

.forecast-method-strip span {
    margin-top: 3px;
    color: #667085;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.35;
}

.form-error {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 0.84rem;
    font-weight: 700;
}

.form-error-summary {
    display: grid;
    gap: 4px;
    margin: 16px 0;
    padding: 14px 16px;
    color: #7a271a;
    background: #fff4f2;
    border: 1px solid #fecdca;
    border-left: 5px solid #d92d20;
    border-radius: 6px;
}

.form-error-summary strong {
    color: #b42318;
    font-size: 0.95rem;
}

.form-error-summary span,
.form-error-summary small {
    color: #7a271a;
    font-size: 0.86rem;
    font-weight: 700;
}

.form-error-summary-list {
    display: grid;
    gap: 3px;
    margin-top: 4px;
}

.errorlist {
    margin: 6px 0 0;
    padding: 0;
    color: #b42318;
    font-size: 0.84rem;
    font-weight: 700;
    list-style: none;
}

.form-group:has(.form-error) input:not([readonly]),
.form-group:has(.form-error) select,
.form-group:has(.form-error) textarea,
.sales-item-field:has(.form-error) input,
.sales-item-field:has(.form-error) select {
    border-color: #d92d20;
    background: #fffafa;
    box-shadow: 0 0 0 0.14rem rgba(217, 45, 32, 0.12);
}

.form-group:has(.form-error) label,
.sales-item-field:has(.form-error) label {
    color: #b42318;
}

.sales-item-field.has-error select,
.sales-item-field.has-error input {
    border-color: #b42318;
    box-shadow: 0 0 0 0.12rem rgba(180, 35, 24, 0.12);
}

.sales-item-error-row {
    grid-column: 1 / -1;
    margin-bottom: -4px;
}

.forecast-maintenance-panel {
    margin-bottom: 18px;
    border-left: 4px solid #f79009;
}

.forecast-maintenance-panel summary {
    cursor: pointer;
    color: #344054;
    font-size: 0.96rem;
    font-weight: 800;
}

.forecast-maintenance-panel summary::marker {
    color: var(--hen-blue);
}

.forecast-maintenance-form {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
}

.forecast-maintenance-form label {
    display: block;
    margin-bottom: 5px;
    color: #5f6878;
    font-size: 0.78rem;
    font-weight: 600;
}

.maintenance-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.testing-cleanup {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e6e8ee;
}

.testing-cleanup strong {
    display: block;
    color: #b42318;
    font-size: 0.94rem;
    font-weight: 800;
}

.testing-cleanup p {
    margin: 3px 0 0;
    color: #667085;
    font-size: 0.84rem;
    font-weight: 500;
}

.testing-cleanup form {
    margin: 0;
}

.forecast-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.forecast-overview-cards {
    margin-top: 18px;
}

.forecast-overview-cards .metric-value,
.forecast-cards .metric-value,
.forecast-insight-grid .metric-value {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.forecast-insight-grid .analytics-insight-card {
    padding: 18px 20px;
}

.forecast-insight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.forecast-insight-grid .metric-card-main {
    min-height: 92px;
}

.forecast-insight-grid .metric-icon {
    align-self: center;
}

.dashboard-section,
.analytics-section {
    margin-bottom: 28px;
}

.dashboard-section + .dashboard-section,
.analytics-section + .analytics-section {
    margin-top: 8px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dfe7f5;
}

.section-heading h2 {
    margin: 0;
    color: var(--hen-blue);
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: 0;
}

.section-heading p {
    max-width: 760px;
    margin: 5px 0 0;
    color: #667085;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
}

.section-heading > span {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: #3153a8;
    background: #eef3ff;
    border: 1px solid #d8e3ff;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.analytics-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.analytics-insight-card {
    min-height: 136px;
    padding: 20px;
    border-left: 5px solid #d0d5dd;
    border-radius: 5px;
    background: #fff;
    box-shadow: var(--hen-shadow);
}

.analytics-insight-card.good {
    border-left-color: #05853e;
}

.analytics-insight-card.warning {
    border-left-color: #f79009;
}

.analytics-insight-card.danger {
    border-left-color: #ed0909;
}

.analytics-insight-card.neutral {
    border-left-color: var(--hen-blue);
}

.analytics-insight-card .metric-value {
    font-size: 34px;
}

.analytics-insight-card.good .metric-value {
    color: #05853e;
}

.analytics-insight-card.warning .metric-value {
    color: #b54708;
}

.analytics-insight-card.danger .metric-value {
    color: #ed0909;
}

.analytics-conclusion {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.analytics-notes {
    margin: 0;
    padding-left: 20px;
    color: #344054;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.6;
}

.analytics-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.forecast-chart-card {
    margin-bottom: 18px;
}

.forecast-chart-card-primary {
    padding: 22px;
}

.forecast-disclaimer {
    margin: -6px 0 14px;
    padding: 10px 12px;
    border-left: 4px solid #f79009;
    border-radius: 6px;
    color: #7a2e0e;
    background: #fff6e6;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

#actualForecastChart,
#actualSalesForecastChart,
#experimentalForecastChart {
    width: 100% !important;
    height: 340px !important;
}

.plotly-forecast-chart {
    width: 100%;
    min-height: 430px;
}

.sales-forecast-link-card {
    border-left: 4px solid #12b76a;
}

.sales-forecast-link-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.sales-forecast-link-body > div {
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fbff;
}

.sales-forecast-link-body strong {
    display: block;
    margin-top: 4px;
    color: #344054;
    font-size: 1.05rem;
}

.experimental-forecast-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.experimental-forecast-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 230px;
}

.experimental-forecast-panel h3 {
    margin: 0;
    color: var(--hen-blue);
    font-size: 1.08rem;
    font-weight: 800;
}

.experimental-forecast-panel p {
    margin: 0;
    color: #667085;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
}

.experimental-forecast-panel code,
.metric-meta code {
    display: block;
    padding: 10px 12px;
    color: #344054;
    background: #f3f6fb;
    border: 1px solid #dfe7f5;
    border-radius: 6px;
    font-size: 0.84rem;
    white-space: normal;
}

.experimental-forecast-panel .btn {
    margin-top: auto;
    align-self: flex-start;
}

.forecast-chart-card .detail-header {
    gap: 16px;
    align-items: flex-start;
}

.forecast-range-pill {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--hen-blue);
    background: #eef4ff;
    border: 1px solid #d7e3ff;
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    justify-content: flex-end;
}

.chart-controls label {
    display: block;
    margin-bottom: 4px;
    color: #5f6878;
    font-size: 0.75rem;
    font-weight: 600;
}

.chart-controls select {
    min-width: 128px;
}

.chart-check {
    display: inline-flex !important;
    min-height: 31px;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #344054 !important;
    white-space: nowrap;
}

.chart-check input {
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-grid-secondary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.monthly-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-notebook-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 0;
    min-height: 520px;
    padding: 22px 0 22px 24px;
    border: 1px solid #dfe7f5;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(51, 96, 207, 0.10), transparent 32px),
        #f5f8ff;
    box-shadow: var(--hen-shadow);
}

.notebook-paper {
    position: relative;
    min-width: 0;
    padding: 22px 26px 18px 30px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background:
        linear-gradient(#fff 0 0) padding-box,
        repeating-linear-gradient(to bottom, transparent 0 37px, rgba(51, 96, 207, 0.08) 38px 39px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.notebook-paper::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: rgba(217, 45, 32, 0.16);
}

.notebook-chart-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 0 0 12px 16px;
    border-bottom: 1px solid rgba(51, 96, 207, 0.12);
}

.notebook-chart-heading h3 {
    margin: 0;
    color: var(--hen-blue);
    font-size: 1.08rem;
    font-weight: 800;
}

.notebook-chart-heading p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 0.88rem;
    font-weight: 500;
}

.notebook-chart-meta {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: #3153a8;
    background: #eef3ff;
    border: 1px solid #d8e3ff;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.notebook-heading-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.chart-granularity-controls {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #d8e3ff;
    border-radius: 6px;
    background: #f8fbff;
}

.chart-granularity-button {
    min-height: 31px;
    padding: 6px 10px;
    border: 0;
    border-right: 1px solid #d8e3ff;
    color: #3153a8;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.chart-granularity-button:last-child {
    border-right: 0;
}

.chart-granularity-button.active,
.chart-granularity-button:hover {
    color: #fff;
    background: var(--hen-blue);
}

.dashboard-notebook-plot-wrap {
    position: relative;
    min-height: 410px;
    padding-left: 8px;
}

.dashboard-notebook-chart {
    width: 100%;
    min-height: 410px;
}

.notebook-bookmarks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding-top: 48px;
}

.notebook-bookmark {
    width: 76px;
    min-height: 43px;
    margin-left: -1px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-left: 0;
    border-radius: 0 9px 9px 0;
    color: #fff;
    background: var(--hen-blue);
    box-shadow: 0 7px 14px rgba(15, 23, 42, 0.14);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
    transition: transform 0.18s ease, filter 0.18s ease, width 0.18s ease;
}

.notebook-bookmark:hover,
.notebook-bookmark:focus,
.notebook-bookmark.active {
    width: 86px;
    transform: translateX(4px);
    filter: brightness(0.96);
}

.notebook-bookmark.green {
    background: #12a150;
}

.notebook-bookmark.violet {
    background: #7c3aed;
}

.notebook-bookmark.amber {
    background: #e88411;
}

.notebook-bookmark.red {
    background: #d92d20;
}

.notebook-bookmark span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card {
    min-height: 124px;
    padding: 20px;
    background: #fff;
    border: 1px solid #edf1f7;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.metric-card.featured {
    color: var(--hen-text);
    background: #fff;
    border-color: #edf1f7;
}

.metric-card-main {
    min-height: 84px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 14px;
    align-items: center;
}

.metric-label {
    color: #111;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
}

.metric-value {
    margin-top: 8px;
    color: var(--hen-blue);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.05;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.trend-up {
    color: var(--hen-green);
}

.trend-down {
    color: #ed0909;
}

.metric-meta {
    color: var(--hen-muted);
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.change-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 6px;
    background: #f2f4f7;
    color: #667085;
    line-height: 1.2;
    white-space: normal;
}

.change-pill.good {
    color: #047a3d;
    background: #e8f7ee;
}

.change-pill.danger {
    color: #b42318;
    background: #fff0ed;
}

.change-pill.neutral {
    color: #344054;
    background: #eef3ff;
}

.monthly-analysis-notes {
    margin-top: 16px;
    padding: 16px 18px;
    border-left: 4px solid var(--hen-blue);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--hen-shadow);
}

.monthly-analysis-notes strong {
    display: block;
    margin-bottom: 8px;
    color: var(--hen-blue);
    font-size: 0.95rem;
    font-weight: 800;
}

.monthly-analysis-notes ul {
    margin: 0;
    padding-left: 18px;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.55;
}

.metric-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--hen-blue);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(51, 96, 207, 0.24);
}

.metric-icon img,
.metric-icon svg {
    width: 25px;
    height: 25px;
    display: block;
}

.metric-icon img {
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.metric-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-icon.success {
    color: #fff;
    background: #12a150;
    box-shadow: 0 8px 18px rgba(18, 161, 80, 0.24);
}

.metric-icon.warning {
    color: #fff;
    background: #e88411;
    box-shadow: 0 8px 18px rgba(232, 132, 17, 0.24);
}

.metric-icon.danger {
    color: #fff;
    background: #d92d20;
    box-shadow: 0 8px 18px rgba(217, 45, 32, 0.24);
}

.metric-icon.blue {
    color: #fff;
    background: var(--hen-blue);
    box-shadow: 0 8px 18px rgba(51, 96, 207, 0.24);
}

.chart-card {
    min-height: 278px;
    padding: 24px 38px;
    background: #fff;
    box-shadow: var(--hen-shadow);
    border-radius: 5px;
}

.egg-distribution-card {
    min-height: 250px;
}

.hen-housed-card {
    min-height: 360px;
}

.dashboard-line-chart-wrap {
    position: relative;
    min-height: 280px;
}

#dashboardHenHousedChart {
    width: 100% !important;
    height: 280px !important;
}

.dashboard-chart-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    background: #f8fbff;
    border: 1px dashed #cdd8ee;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 700;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: none;
}

.donut-wrap {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
    gap: 30px;
    align-items: center;
}

.donut {
    width: 190px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(#42ad86 0 40%, #4bdd83 40% 74%, #7db8f3 74% 83%, #175ec8 83% 94%, #36d2ba 94% 100%);
    position: relative;
    justify-self: center;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 58px;
    border-radius: 50%;
    background: #fff;
}

.legend-row {
    display: grid;
    grid-template-columns: 18px 1fr 44px;
    gap: 10px;
    align-items: center;
    color: #838383;
    font-size: 18px;
    font-weight: 700;
}

.legend-swatch {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.mortality-section {
    margin-top: 28px;
}

.section-rule-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-rule-title::after {
    content: "";
    height: 4px;
    background: var(--hen-blue);
}

.mortality-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
    max-width: 980px;
    margin: 48px auto 0;
}

.mortality-card {
    min-height: 136px;
    padding: 28px;
    text-align: center;
    background: #fff;
    box-shadow: var(--hen-shadow);
    border-radius: 5px;
}

.mortality-card .label {
    font-size: 20px;
    font-weight: 900;
}

.mortality-card .value {
    color: var(--hen-blue);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.mortality-card .meta {
    font-size: 18px;
    font-weight: 700;
}

.form-control,
.form-select,
select {
    border-radius: 0;
    border: 1px solid #b6b6b6;
}

.alert {
    border-radius: 5px;
}

.auth-body {
    background:
        linear-gradient(158deg, rgba(47, 228, 118, 0.78) 0 32%, rgba(44, 172, 181, 0.68) 32% 60%, rgba(51, 96, 207, 0.85) 60% 100%),
        linear-gradient(23deg, #2ed878 0%, #2ca7bd 48%, #3360cf 100%);
}

.login-bg {
    min-height: 100vh;
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: min(860px, 92vw);
    min-height: 700px;
    padding: 74px 92px;
    border: 3px solid var(--hen-blue);
    border-radius: 8px;
    background: rgba(238, 250, 248, 0.84);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
}

.login-card .card-body {
    padding: 0;
}

.login-card .logo-img {
    width: min(360px, 88%);
    max-height: 150px;
    object-fit: contain;
    margin: 0 auto 34px;
}

.login-card .mb-3 {
    margin-bottom: 22px;
}

.login-card label {
    display: block;
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 800;
    color: #101010;
}

.login-card .form-control {
    min-height: 54px;
    font-size: 24px;
    background: #fff;
}

.login-card .btn {
    min-width: 310px;
    margin-top: 26px;
    padding: 10px 24px;
    border-radius: 13px;
    font-size: 32px;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 248px minmax(0, 1fr);
    }

    .side-link {
        grid-template-columns: 38px 1fr;
        font-size: 0.92rem;
    }

    .dashboard-grid,
    .dashboard-grid-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-item-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-meta-grid {
        grid-template-columns: 1fr;
    }

    .forecast-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-toolbar .btn {
        grid-column: 1 / -1;
    }

    .forecast-method-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-notebook-card {
        grid-template-columns: minmax(0, 1fr);
        padding-right: 18px;
    }

    .notebook-bookmarks {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px 0 0 14px;
    }

    .notebook-bookmark,
    .notebook-bookmark:hover,
    .notebook-bookmark:focus,
    .notebook-bookmark.active {
        width: auto;
        min-width: 78px;
        margin-left: 0;
        border-left: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 8px;
        transform: none;
    }

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

    .production-form-grid-main,
    .production-form-grid-inputs,
    .production-form-grid-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .maintenance-button-row,
    .testing-cleanup {
        justify-content: stretch;
        grid-template-columns: 1fr;
    }

    .maintenance-button-row .btn,
    .testing-cleanup .btn {
        width: 100%;
    }

    .forecast-cards {
        grid-template-columns: 1fr;
    }

    .analytics-insight-grid,
    .analytics-conclusion,
    .analytics-chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: relative;
        height: auto;
    }

    .side-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px;
    }

    .nav-section-label {
        grid-column: 1 / -1;
        margin: 8px 4px 0;
    }

    .side-link {
        margin: 0;
        font-size: 0.92rem;
        min-height: 42px;
    }

    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .app-topbar h1 {
        font-size: 30px;
    }

    .app-content {
        padding: 24px 12px;
    }

    .dashboard-grid,
    .dashboard-grid-secondary,
    .detail-grid,
    .mortality-cards,
    .donut-wrap {
        grid-template-columns: 1fr;
    }

    .detail-header {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-actions {
        justify-content: flex-start;
    }

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

    .sales-meta-grid .date-input-action {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .forecast-toolbar {
        grid-template-columns: 1fr;
    }

    .production-form-grid-main,
    .production-form-grid-inputs,
    .production-form-grid-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-notebook-card {
        padding: 14px;
    }

    .notebook-paper {
        padding: 16px;
    }

    .notebook-paper::before {
        display: none;
    }

    .notebook-chart-heading {
        flex-direction: column;
        padding-left: 0;
    }

    .sales-grand-total,
    .sales-items-header {
        align-items: stretch;
        flex-direction: column;
    }

    .table thead th {
        font-size: 18px;
    }

    .login-card {
        min-height: auto;
        padding: 40px 24px;
    }
}
