/**
 * QA Fish portal theme (aligned with qafish.com corporate styling)
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --qafish-navy: #004386;
    --qafish-teal: #0091b1;
    --qafish-text: #555555;
    --qafish-nav: #444444;
    --qafish-border: #d4d8df;
    --qafish-white: #ffffff;
    --bs-primary: #004386;
    --bs-primary-rgb: 0, 67, 134;
    --bs-link-color: #0091b1;
    --bs-link-hover-color: #004386;
    --bs-body-font-family: 'Poppins', sans-serif;
    --bs-body-color: #555555;
}

body.qafish-body {
    font-family: 'Poppins', sans-serif;
    color: var(--qafish-text);
    font-size: 15px;
    background: var(--qafish-white);
    margin: 0;
}

/* Header */
.qafish-header {
    background: var(--qafish-white);
    border-top: 5px solid var(--qafish-navy);
}

.qafish-header-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0 0;
    gap: 1rem;
}

.qafish-logo-link {
    display: inline-block;
    text-decoration: none;
}

.qafish-logo img {
    display: block;
    max-width: 180px;
    height: auto;
}

.qafish-app-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 15px;
    font-weight: 600;
    color: var(--qafish-navy);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.qafish-logo-link:hover .qafish-app-title {
    color: var(--qafish-teal);
}

.qafish-header-cta {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.25rem 0;
}

.qafish-feed-now-btn {
    font-size: 15px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 67, 134, 0.2);
}

.qafish-feed-now-btn:hover,
.qafish-feed-now-btn:focus {
    box-shadow: 0 3px 10px rgba(0, 145, 177, 0.3);
}

.qafish-feed-now-btn.active {
    background-color: var(--qafish-teal);
    border-color: var(--qafish-teal);
}

.qafish-header-meta {
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: var(--qafish-navy);
}

.qafish-contact-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.qafish-contact-list li {
    display: inline-block;
    margin-left: 1.25rem;
}

.qafish-contact-list a {
    color: var(--qafish-teal);
    text-decoration: none;
}

.qafish-contact-list a:hover {
    color: var(--qafish-navy);
}

.qafish-user-bar {
    display: inline-block;
    background: var(--qafish-navy);
    color: var(--qafish-white);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 0 0 5px 5px;
    margin-top: 4px;
}

.qafish-user-bar a {
    color: var(--qafish-white);
    text-decoration: none;
}

.qafish-user-bar a:hover {
    text-decoration: underline;
}

/* Navigation */
.qafish-nav {
    border-top: 1px solid var(--qafish-border);
    margin-top: 1rem;
    padding: 1rem 0 1.25rem;
}

.qafish-nav .nav {
    justify-content: flex-end;
    gap: 0.25rem;
}

.qafish-nav .nav-link {
    color: var(--qafish-nav);
    font-size: 14px;
    font-weight: 500;
    padding: 0.35rem 0;
    margin-left: 2rem;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.qafish-nav .nav-link:hover,
.qafish-nav .nav-link.active {
    color: var(--qafish-teal);
    border-bottom-color: var(--qafish-teal);
}

.qafish-nav .dropdown-menu {
    border-color: var(--qafish-border);
    font-size: 14px;
}

/* Page hero banner (site photo — same on all pages) */
.qafish-page-hero {
    background: url('../img/image2.png') no-repeat center center;
    background-size: cover;
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
}

.qafish-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 67, 134, 0.5),
        rgba(0, 67, 134, 0.72)
    );
}

.qafish-page-hero .container {
    position: relative;
    z-index: 1;
}

.qafish-page-hero h1 {
    color: var(--qafish-white);
    font-size: 30px;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.qafish-site-card-img {
    height: 160px;
    object-fit: cover;
}

/* Main content */
.qafish-main {
    padding: 2.5rem 0 3rem;
    min-height: 40vh;
}

.qafish-main h1,
.qafish-main h2,
.qafish-main h3,
.qafish-main h4 {
    color: var(--qafish-navy);
    font-weight: 500;
}

/* Buttons */
.btn-qafish-primary {
    background-color: var(--qafish-navy);
    border-color: var(--qafish-navy);
    color: var(--qafish-white);
    font-weight: 500;
    padding: 0.65rem 1.5rem;
}

.btn-qafish-primary:hover,
.btn-qafish-primary:focus {
    background-color: var(--qafish-teal);
    border-color: var(--qafish-teal);
    color: var(--qafish-white);
}

.btn-qafish-outline {
    background-color: transparent;
    border: 2px solid var(--qafish-navy);
    color: var(--qafish-navy);
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
}

.btn-qafish-outline:hover {
    background-color: var(--qafish-navy);
    color: var(--qafish-white);
}

.btn-primary {
    background-color: var(--qafish-teal);
    border-color: var(--qafish-teal);
}

.btn-primary:hover {
    background-color: var(--qafish-navy);
    border-color: var(--qafish-navy);
}

/* Cards & tables */
.card {
    border-color: var(--qafish-border);
    border-radius: 0;
}

.card-header {
    background: var(--qafish-white);
    border-bottom: 1px solid var(--qafish-border);
    color: var(--qafish-navy);
    font-weight: 500;
}

.table thead th {
    color: var(--qafish-navy);
    font-weight: 500;
    border-bottom-width: 1px;
}

/* Login page */
.qafish-login-hero {
    background: url('../img/image2.png') no-repeat center center;
    background-size: cover;
    padding: 4.5rem 1rem;
    text-align: center;
    position: relative;
}

.qafish-login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 67, 134, 0.5),
        rgba(0, 67, 134, 0.72)
    );
}

.qafish-login-hero .container {
    position: relative;
    z-index: 1;
}

.qafish-login-hero h1 {
    color: var(--qafish-white);
    font-size: 30px;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.qafish-login-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

.qafish-login-intro {
    text-align: center;
    color: var(--qafish-text);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--qafish-border);
}

.qafish-login-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
}

@media (max-width: 576px) {
    .qafish-login-fields {
        grid-template-columns: 1fr;
    }
}

.qafish-login-fields label {
    display: block;
    font-weight: 600;
    color: var(--qafish-nav);
    margin-bottom: 0.35rem;
}

.qafish-login-fields .form-control {
    border: 1px solid var(--qafish-border);
    border-radius: 5px;
    height: 44px;
    font-size: 16px;
}

.qafish-login-submit {
    text-align: center;
    margin-top: 2rem;
}

.qafish-login-submit .btn {
    min-width: 180px;
    background: var(--qafish-teal);
    border-color: var(--qafish-teal);
    font-weight: 500;
    padding: 0.75rem 2rem;
}

.qafish-login-submit .btn:hover {
    background: var(--qafish-navy);
    border-color: var(--qafish-navy);
}

/* Footer */
.qafish-footer {
    background: var(--qafish-navy);
    color: var(--qafish-white);
    margin-top: auto;
}

.qafish-footer-top {
    padding: 3rem 0;
    font-size: 14px;
    line-height: 1.9;
}

.qafish-footer h3 {
    font-size: 20px;
    color: var(--qafish-white);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 1rem;
}

.qafish-footer a {
    color: var(--qafish-white);
}

.qafish-footer-logo img {
    max-width: 170px;
    margin-bottom: 1.5rem;
}

.qafish-footer-bottom {
    background: var(--qafish-teal);
    padding: 1.25rem 0;
    font-size: 14px;
}

.qafish-footer-bottom p {
    margin: 0;
}

/* Flash messages */
.message {
    border-radius: 0;
}

/* Cage grid highlight */
.border-warning {
    border-color: #f0ad4e !important;
}

/* Site view — lines & cages map */
.qafish-lines-map-wrap {
    margin-bottom: 1rem;
}

.qafish-lines-map {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1rem;
    align-items: flex-end;
}

.qafish-line-column {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
}

.qafish-lines-map:has(.qafish-line-track-cell--has-stock) .qafish-line-column,
.qafish-line-track--activity .qafish-line-column {
    min-width: 118px;
    padding-right: 4px;
    overflow: visible;
}

.qafish-lines-map:has(.qafish-line-track-cell--has-stock) .qafish-line-track,
.qafish-line-track--activity {
    overflow: visible;
}

.qafish-lines-map-wrap:has(.qafish-line-track-cell--has-stock) {
    overflow-x: auto;
}

.qafish-line-column--inactive {
    opacity: 0.55;
    filter: grayscale(0.85);
}

.qafish-line-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--qafish-navy);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    max-width: 88px;
}

.qafish-line-header:hover {
    color: var(--qafish-teal);
}

button.qafish-line-header--toggle {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

button.qafish-line-header--toggle:hover {
    color: var(--qafish-teal);
}

button.qafish-line-header--toggle.qafish-line-header--all-selected .qafish-line-label {
    color: var(--qafish-teal);
}

.qafish-line-label {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    word-break: break-word;
}

.qafish-line-header .badge {
    margin-top: 0.35rem;
    font-size: 10px;
}

.qafish-line-track {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}

.qafish-line-pair {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 4px;
}

.qafish-line-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--qafish-teal);
    border-radius: 2px;
    z-index: 0;
}

.qafish-line-column--inactive .qafish-line-track::before {
    background: #9aa3ad;
}

.qafish-line-track-cell {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 34px;
    overflow: visible;
}

.qafish-line-track-cell--has-stock {
    width: 34px;
    margin-left: auto;
    margin-right: auto;
}

.qafish-line-track-cell-core {
    position: relative;
    display: block;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.qafish-cage-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 2px;
    border: 2px solid var(--qafish-navy);
    background: var(--qafish-white);
    color: var(--qafish-navy);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
}

a.qafish-cage-node:hover {
    background: var(--qafish-teal);
    border-color: var(--qafish-teal);
    color: var(--qafish-white);
}

.qafish-cage-node--due {
    border-color: #e8a317;
    box-shadow: 0 0 0 1px #e8a317;
}

/* Feed activity map: traffic-light due status */
.qafish-cage-node--feed-ok {
    border-color: #2d8a4e;
    box-shadow: 0 0 0 1px #2d8a4e;
    background: #eef8f1;
}

.qafish-cage-node--feed-upcoming {
    border-color: #e8a317;
    box-shadow: 0 0 0 1px #e8a317;
    background: #fff9e6;
}

.qafish-cage-node--feed-due {
    border-color: #c0392b;
    box-shadow: 0 0 0 1px #c0392b;
    background: #fdecea;
    color: #922b21;
}

button.qafish-cage-picker.qafish-cage-node--feed-ok:hover,
button.qafish-cage-picker.qafish-cage-node--feed-upcoming:hover,
button.qafish-cage-picker.qafish-cage-node--feed-due:hover {
    color: var(--qafish-white);
}

.qafish-cage-picker--selected.qafish-cage-node--feed-ok,
.qafish-cage-picker--selected.qafish-cage-node--feed-upcoming,
.qafish-cage-picker--selected.qafish-cage-node--feed-due {
    color: var(--qafish-white);
}

/* Cage capacity (to-sea page) */
.qafish-cage-node--capacity-near {
    border-color: #e8a317;
    box-shadow: 0 0 0 1px #e8a317;
    background: #fff9e6;
}

.qafish-cage-node--capacity-at {
    border-color: var(--qafish-teal);
    box-shadow: 0 0 0 1px var(--qafish-teal);
    background: #e8f4f8;
}

.qafish-cage-node--capacity-over {
    border-color: #c0392b;
    box-shadow: 0 0 0 1px #c0392b;
    background: #fdecea;
    color: #922b21;
}

button.qafish-cage-picker.qafish-cage-node--capacity-near:hover,
button.qafish-cage-picker.qafish-cage-node--capacity-at:hover,
button.qafish-cage-picker.qafish-cage-node--capacity-over:hover {
    color: var(--qafish-white);
}

.qafish-lines-map-legend-capacity::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 2px solid transparent;
    vertical-align: middle;
    margin-right: 0.25rem;
    margin-bottom: 2px;
}

.qafish-lines-map-legend-capacity--near::before {
    border-color: #e8a317;
    background: #fff9e6;
}

.qafish-lines-map-legend-capacity--at::before {
    border-color: var(--qafish-teal);
    background: #e8f4f8;
}

.qafish-lines-map-legend-capacity--over::before {
    border-color: #c0392b;
    background: #fdecea;
}

.qafish-cage-picker--selected.qafish-cage-node--capacity-near,
.qafish-cage-picker--selected.qafish-cage-node--capacity-at,
.qafish-cage-picker--selected.qafish-cage-node--capacity-over {
    color: var(--qafish-white);
}

.qafish-cage-node--missing {
    border-style: dashed;
    border-color: #bbb;
    color: #999;
    background: #f5f5f5;
}

.qafish-cage-node--no-activity-stock,
.qafish-cage-node--no-feed-stock {
    border-color: #c8d0d6;
    color: #9aa5ad;
    background: #eef1f3;
    cursor: not-allowed;
    opacity: 0.85;
}

.qafish-line-column--inactive .qafish-cage-node {
    border-color: #8a9299;
    color: #6c757d;
}

.qafish-lines-map-legend {
    font-size: 14px;
}

/* Single siteline track (detail view) */
.qafish-line-track--single {
    margin: 0 auto;
}

.siteline-track-card .card-body {
    min-height: 200px;
    overflow-x: auto;
}

.qafish-cage-node--occupied {
    background: #e8f4f8;
}

.qafish-cage-node--by-grade {
    /* Opaque grade fill via inline CSS variables (GradePalette). */
    background-color: var(--grade-bg);
}

a.qafish-cage-node.qafish-cage-node--by-grade:hover,
button.qafish-cage-picker.qafish-cage-node--by-grade:hover {
    background: var(--grade-border);
    border-color: var(--grade-border);
    color: var(--qafish-white);
}

.qafish-cage-node--current {
    background: var(--qafish-teal);
    border-color: var(--qafish-teal);
    color: var(--qafish-white);
    box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.35);
    cursor: default;
}

.qafish-line-column--highlight .qafish-line-header {
    color: var(--qafish-teal);
}

.qafish-line-column--highlight .qafish-line-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cage-site-map-card .qafish-lines-map-wrap {
    margin-bottom: 0;
}

.cage-site-map-card .qafish-lines-map {
    padding-bottom: 0.5rem;
    max-width: 100%;
}

.qafish-cage-node-stock {
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 4px;
    transform: translateY(-50%);
    display: block;
    width: max-content;
    max-width: 76px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--qafish-text);
    text-align: left;
    pointer-events: none;
    user-select: none;
}

.qafish-cage-node-stock-line {
    display: block;
    white-space: nowrap;
}

.qafish-cage-node-stock-line--grade {
    font-weight: 400;
    margin-top: 1px;
}

.qafish-cage-node-stock-line--feed {
    font-weight: 400;
    margin-top: 1px;
    color: #5c6b7a;
}

.qafish-cage-node-stock-line--feed-ok {
    color: #2d8a4e;
    font-weight: 600;
}

.qafish-cage-node-stock-line--feed-upcoming {
    color: #b45309;
    font-weight: 600;
}

.qafish-cage-node-stock-line--feed-due {
    color: #c0392b;
    font-weight: 700;
}

.qafish-line-column--inactive .qafish-cage-node-stock-line--feed-ok {
    color: #3d7a52;
}

.qafish-line-column--inactive .qafish-cage-node-stock-line--feed-upcoming {
    color: #9a6b12;
}

.qafish-line-column--inactive .qafish-cage-node-stock-line--feed-due {
    color: #a93226;
}

.qafish-line-column--inactive .qafish-cage-node-stock {
    color: #6c757d;
}

.qafish-lines-map-legend-feed {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.qafish-lines-map-legend-feed-item::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 2px solid transparent;
    vertical-align: middle;
    margin-right: 0.35rem;
    margin-bottom: 2px;
}

.qafish-lines-map-legend-feed--ok::before {
    border-color: #2d8a4e;
    background: #eef8f1;
}

.qafish-lines-map-legend-feed--upcoming::before {
    border-color: #e8a317;
    background: #fff9e6;
}

.qafish-lines-map-legend-feed--due::before {
    border-color: #c0392b;
    background: #fdecea;
}

.qafish-lines-map-legend-grades {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.qafish-lines-map-legend-grade-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.qafish-lines-map-legend-swatch,
.grade-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 2px solid transparent;
    vertical-align: middle;
    flex-shrink: 0;
}

.qafish-customer-combobox {
    position: relative;
}

.qafish-customer-combobox-dropdown {
    position: absolute;
    z-index: 1060;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.qafish-customer-combobox-dropdown .list-group-item {
    border-left: 0;
    border-right: 0;
}

.qafish-customer-combobox-dropdown .list-group-item:first-child {
    border-top: 0;
}

/* Nav: feeds due alert */
.qafish-nav-link-due-feeds {
    position: relative;
}

.qafish-nav-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #e8a317;
    color: var(--qafish-navy);
    font-size: 0.75em;
    font-weight: 800;
    line-height: 1;
    vertical-align: super;
}

.qafish-nav-link-due-feeds.active .qafish-nav-alert,
.qafish-nav-link-due-feeds:hover .qafish-nav-alert {
    background: var(--qafish-white);
    color: var(--qafish-teal);
}

/* Due feeds list */
.due-feeds-day--due .card-header {
    background: #fff9e6;
    border-bottom-color: #e8a317;
}

.due-feeds-day--upcoming .card-header {
    background: #f4f8fa;
    border-bottom-color: var(--qafish-border);
}

.due-feeds-block + .due-feeds-block {
    border-top: 1px solid var(--qafish-border);
}

.due-feeds-block-header {
    background: #f8f9fa;
    font-size: 14px;
}

.due-feeds-day-summary {
    background: #f8f9fa;
    font-size: 14px;
}

.activity-harvest-outlet-row .form-label {
    font-size: 13px;
}

.activity-harvest-total.text-danger {
    font-weight: 600;
}

.due-feeds-table th {
    font-size: 13px;
    white-space: nowrap;
}

.due-feeds-day--embedded + .due-feeds-day--embedded {
    border-top: 1px solid var(--qafish-border);
}

.due-feeds-day--dashboard .due-feeds-day-header {
    background: #fff9e6;
}

/* Dashboard */
.dashboard-intro {
    max-width: 36rem;
}

.dashboard-feed-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.dashboard-grade-card {
    border-color: var(--qafish-border);
}

.dashboard-grade-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    background: #f8fafb;
    border-bottom-color: var(--qafish-border);
}

.dashboard-grade-card-title {
    font-weight: 600;
    color: var(--qafish-nav);
}

.dashboard-grade-card-total {
    font-variant-numeric: tabular-nums;
    color: var(--qafish-teal);
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-grade-card-body {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.dashboard-grade-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 220px;
}

.dashboard-site-map-card {
    border-color: var(--qafish-border);
}

.dashboard-site-map-card-header {
    background: #f8fafb;
    border-bottom-color: var(--qafish-border);
}

.dashboard-site-map-card-title {
    font-weight: 600;
    color: var(--qafish-nav);
}

.dashboard-site-map-card-body {
    padding: 0.75rem 0.5rem 0.5rem;
}

.dashboard-site-map-card .qafish-lines-map-wrap {
    margin-bottom: 0;
}

.qafish-lines-map-wrap--compact .qafish-lines-map {
    gap: 0.65rem;
    padding: 0.25rem 0.15rem 0.5rem;
}

.qafish-lines-map-wrap--compact .qafish-line-column {
    min-width: 40px;
}

.qafish-lines-map-wrap--compact .qafish-line-header {
    font-size: 10px;
    margin-bottom: 0.35rem;
    max-width: 52px;
}

.qafish-lines-map-wrap--compact .qafish-line-header .badge {
    display: none;
}

.qafish-lines-map-wrap--compact .qafish-line-track {
    gap: 6px;
}

.qafish-lines-map-wrap--compact .qafish-line-pair {
    gap: 2px;
}

.qafish-lines-map-wrap--compact .qafish-line-track-cell {
    min-height: 22px;
}

.qafish-lines-map-wrap--compact .qafish-line-track-cell--has-stock {
    width: 22px;
}

.qafish-lines-map-wrap--compact .qafish-line-track-cell-core {
    width: 22px;
    height: 22px;
}

.qafish-lines-map-wrap--compact .qafish-cage-node {
    width: 22px;
    height: 22px;
    font-size: 9px;
    border-width: 1.5px;
}

.qafish-lines-map-wrap--compact .qafish-line-track::before {
    width: 2px;
    margin-left: -1px;
}

.dashboard-site-maps-legend {
    padding-left: 0.25rem;
}

.due-feeds-day--embedded:last-child .due-feeds-block:last-child .due-feeds-table {
    margin-bottom: 0;
}

/* Siteline line tabs & cage picking */
.qafish-line-tabs {
    border-bottom-color: var(--qafish-border);
}

.qafish-line-tabs .nav-link {
    color: var(--qafish-nav);
    font-weight: 500;
    font-size: 14px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
}

.qafish-line-tabs .nav-link:hover {
    color: var(--qafish-teal);
    border-bottom-color: var(--qafish-border);
}

.qafish-line-tabs .nav-link.active {
    color: var(--qafish-teal);
    background: transparent;
    border-bottom-color: var(--qafish-teal);
}

.siteline-cage-toolbar {
    width: 100%;
}

button.qafish-cage-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

button.qafish-cage-picker:hover {
    border-color: var(--qafish-teal);
    color: var(--qafish-teal);
}

.qafish-cage-picker--selected {
    background: var(--qafish-teal) !important;
    border-color: var(--qafish-teal) !important;
    color: var(--qafish-white) !important;
    box-shadow: 0 0 0 2px rgba(0, 145, 177, 0.35);
}

.qafish-cage-picker--selected.qafish-cage-node--due {
    box-shadow: 0 0 0 2px #e8a317, 0 0 0 4px rgba(0, 145, 177, 0.35);
}

/* Siteline stats panel */
.siteline-stats .card-header {
    font-size: 14px;
}

.siteline-stat-dl dt {
    font-weight: 500;
    color: var(--qafish-text);
}

.siteline-stat-dl dd {
    margin-bottom: 0.35rem;
}

.siteline-capacity-ring {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: conic-gradient(
        var(--qafish-teal) calc(var(--capacity) * 1%),
        #e9ecef calc(var(--capacity) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.siteline-capacity-value {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--qafish-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--qafish-navy);
}

.siteline-grade-weights li:last-child {
    border-bottom: none !important;
}

/* Activity batch forms (feed / to sea / harvest) */
.qafish-activity-nav .nav-link {
    color: var(--qafish-nav);
    font-weight: 500;
}

.qafish-activity-nav .nav-link.active {
    color: var(--qafish-teal);
    border-bottom-color: var(--qafish-teal);
}

.activity-batch-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.activity-batch-card-header-main {
    flex: 1 1 240px;
    min-width: 0;
}

.activity-site-photos {
    flex: 0 0 auto;
}

.activity-batch-card .card-body {
    overflow-x: auto;
}

.site-photo {
    text-align: center;
}

.site-photo-img {
    display: block;
    object-fit: cover;
    border: 1px solid var(--qafish-border);
    border-radius: 0.375rem;
}

.site-photo--activity .site-photo-img,
.site-photo--activity .site-photo-placeholder {
    width: 140px;
    height: 90px;
}

.site-photo--panel .site-photo-img,
.site-photo--panel .site-photo-placeholder {
    width: 180px;
    height: 120px;
}

.site-photo--thumb .site-photo-img,
.site-photo--thumb .site-photo-placeholder {
    width: 120px;
    height: 80px;
}

.site-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8eef5 0%, #d4dce8 100%);
    border: 1px solid var(--qafish-border);
    border-radius: 0.375rem;
    color: var(--qafish-navy);
}

.site-photo-placeholder-abbr {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-photo-caption {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--qafish-nav);
    line-height: 1.2;
}

.activity-cage-details-card .card-header {
    font-size: 14px;
}

.activity-cage-detail-row {
    border-color: var(--qafish-border);
}

.activity-cage-detail-row .card-body {
    padding: 1rem 1.25rem;
}

.activity-cage-details-empty[hidden] {
    display: none !important;
}

.activity-individual-toggle-wrap .form-check-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--qafish-nav);
}

.activity-selected-summary .activity-selected-cage-badge {
    font-weight: 500;
}

#activity-shared-panel[hidden],
.activity-individual-panel[hidden] {
    display: none !important;
}

a.siteline-activity-link.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.qafish-lines-map-legend-due::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 2px solid #e8a317;
    vertical-align: middle;
    margin-right: 0.35rem;
    margin-bottom: 2px;
}

.activity-harvest-panel[hidden] {
    display: none !important;
}

.activity-harvest-grade {
    border-color: var(--qafish-border);
    background: #fafcfd;
}

.activity-harvest-grade-title {
    font-weight: 600;
    color: var(--qafish-nav);
}

.activity-harvest-expected strong {
    color: var(--qafish-teal);
}

/* Shed stock summary */
.shed-stock-summary {
    border-color: var(--qafish-border);
}

.shed-stock-summary-table-wrap {
    max-width: none;
}

.shed-stock-grade-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 260px;
    max-width: 20rem;
    margin: 0 auto;
}

.shed-stock-summary-body {
    margin-top: 0.25rem;
}

@media (min-width: 768px) {
    .shed-stock-grade-chart-wrap {
        margin: 0;
        max-width: none;
    }
}

.shed-stock-summary-table thead th {
    font-weight: 600;
    color: var(--qafish-nav);
    border-bottom-width: 1px;
}

.shed-stock-summary-table tbody td:first-child {
    font-weight: 500;
    color: var(--qafish-nav);
}

.shed-stock-summary-table tbody td:last-child,
.shed-stock-summary-total-row td {
    color: var(--qafish-teal);
    font-variant-numeric: tabular-nums;
}

.shed-stock-summary-total-row th,
.shed-stock-summary-total-row td {
    border-top: 2px solid var(--qafish-border);
    font-weight: 600;
}

.shed-stock-summary-total-row strong {
    color: var(--qafish-teal);
    font-size: 1.125rem;
}

.shed-stock-sort-select {
    width: auto;
    min-width: 12rem;
}

/* Shed stock bins */
.shed-stock-outlet {
    border-color: var(--qafish-border);
}

.shed-stock-outlet--empty {
    opacity: 0.85;
}

.shed-stock-outlet-weight strong {
    color: var(--qafish-teal);
    font-size: 1.25rem;
}

.shed-stock-progress {
    height: 0.5rem;
    background-color: #e8eef2;
}

.shed-stock-outlet--capacity-near .progress-bar {
    background-color: #e8a317;
}

.shed-stock-outlet--capacity-at .progress-bar {
    background-color: #c9a227;
}

.shed-stock-outlet--capacity-over .progress-bar {
    background-color: #c0392b;
}

.shed-stock-outlet--capacity-ok .progress-bar,
.shed-stock-outlet--empty .progress-bar {
    background-color: var(--qafish-teal);
}

/* Cage activity seasons */
.cage-activity-seasons .accordion-item {
    border-color: var(--qafish-border);
}

.cage-activity-seasons .accordion-button {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    background-color: #fff;
    color: var(--qafish-text);
    box-shadow: none;
}

.cage-activity-seasons .accordion-button:not(.collapsed) {
    background-color: #f4f8fa;
    color: var(--qafish-teal);
}

.cage-activity-seasons .accordion-button:focus {
    box-shadow: inset 0 0 0 1px rgba(0, 109, 119, 0.25);
}

.cage-activity-season-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    text-align: left;
}

.cage-activity-season-label {
    font-weight: 600;
}

.cage-activity-season-summary {
    font-size: 0.8125rem;
    font-weight: 400;
}

.cage-activity-current-season {
    background-color: #f4f8fa;
}

.cage-previous-seasons {
    border-color: var(--qafish-border);
}

.cage-previous-seasons > .card-header {
    background-color: #f8f9fa;
    color: var(--qafish-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

.cage-previous-seasons .accordion-button {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.cage-previous-seasons .accordion-button:not(.collapsed) {
    background-color: #fff;
    color: var(--qafish-text);
}

.cage-previous-seasons .cage-activity-season-label {
    font-weight: 500;
}

.data-analysis-chart-card .card-header {
    background-color: #f8f9fa;
}

.data-analysis-chart-wrap {
    position: relative;
    width: 100%;
}

.data-analysis-chart-wrap--pie {
    min-height: 280px;
}

.data-analysis-chart-wrap--bar {
    min-height: 320px;
}

.data-analysis-chart-wrap--line {
    min-height: 280px;
}

.data-analysis-weekly-charts .data-analysis-chart-wrap--line {
    min-height: 240px;
}
