/* Goënga theme on top of Bootstrap 5.3 and Blazor.Bootstrap.
   Brand colours from the logo: sage #83997D (letters) and gold #C19F3A (cart, cleaver).
   Sage itself is too light for white text (2.9:1), so buttons and links use the darker sage-700. Gold is an accent:
   fills, lines and dots, never small text on white. */

:root {
    --brand-sage: #83997d;
    --brand-sage-50: #f3f6f2;
    --brand-sage-100: #e4ebe2;
    --brand-sage-200: #cad6c6;
    --brand-sage-600: #6b8266;
    --brand-sage-700: #566c52;
    --brand-sage-800: #455842;
    --brand-gold: #c19f3a;
    --brand-gold-50: #fbf6e9;
    --brand-gold-100: #f4e9c8;
    --brand-gold-700: #8a6f1f;

    --app-bg: #f6f6f2;
    --app-surface: #ffffff;
    --app-ink: #1f2a1e;
    --app-muted: #6b7466;
    --app-border: #e3e6dd;
    --app-radius: 14px;
    --app-radius-sm: 10px;
    --app-shadow: 0 1px 2px rgba(31, 42, 30, 0.04), 0 4px 16px rgba(31, 42, 30, 0.04);
    --app-sidebar-width: 256px;

    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-font-size: 0.9375rem;
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-bg);
    --bs-border-color: var(--app-border);
    --bs-secondary-color: var(--app-muted);
    --bs-primary: var(--brand-sage-700);
    --bs-primary-rgb: 86, 108, 82;
    --bs-link-color: var(--brand-sage-700);
    --bs-link-color-rgb: 86, 108, 82;
    --bs-link-hover-color: var(--brand-sage-800);
    --bs-link-hover-color-rgb: 69, 88, 66;
    --bs-border-radius: var(--app-radius-sm);
    --bs-focus-ring-color: rgba(131, 153, 125, 0.35);
}

body {
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .font-brand {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    color: var(--app-ink);
    letter-spacing: -0.01em;
}

h1:focus {
    outline: none;
}

a {
    text-decoration: none;
}

/* ---- Buttons ---- */

.btn {
    font-weight: 600;
    border-radius: var(--app-radius-sm);
    padding: 0.5rem 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--brand-sage-700);
    --bs-btn-border-color: var(--brand-sage-700);
    --bs-btn-hover-bg: var(--brand-sage-800);
    --bs-btn-hover-border-color: var(--brand-sage-800);
    --bs-btn-active-bg: var(--brand-sage-800);
    --bs-btn-active-border-color: var(--brand-sage-800);
    --bs-btn-disabled-bg: var(--brand-sage-600);
    --bs-btn-disabled-border-color: var(--brand-sage-600);
    --bs-btn-focus-shadow-rgb: 131, 153, 125;
}

.btn-outline-secondary, .btn-secondary.btn-outline {
    --bs-btn-color: var(--app-ink);
    --bs-btn-border-color: var(--app-border);
    --bs-btn-hover-bg: var(--brand-sage-50);
    --bs-btn-hover-color: var(--app-ink);
    --bs-btn-hover-border-color: var(--brand-sage-200);
    --bs-btn-active-bg: var(--brand-sage-100);
    --bs-btn-active-color: var(--app-ink);
}

.btn-light {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--brand-sage-50);
    --bs-btn-hover-border-color: var(--brand-sage-100);
    --bs-btn-color: var(--app-muted);
    --bs-btn-hover-color: var(--app-ink);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
}

/* ---- Forms ---- */

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--app-ink);
    margin-bottom: 0.375rem;
}

.form-text {
    color: var(--app-muted);
}

.form-control, .form-select {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    border-radius: var(--app-radius-sm);
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--brand-sage);
    box-shadow: 0 0 0 0.2rem rgba(131, 153, 125, 0.25);
}

.form-control:disabled {
    background-color: var(--brand-sage-50);
    color: var(--app-muted);
}

.form-check-input:checked {
    background-color: var(--brand-sage-700);
    border-color: var(--brand-sage-700);
}

.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2383997d'/%3e%3c/svg%3e");
}

.form-check {
    margin-bottom: 0.375rem;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    border-color: #c0392b;
}

.validation-message {
    color: #b3261e;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ---- Cards ---- */

.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--app-border);
    --bs-card-border-radius: var(--app-radius);
    --bs-card-inner-border-radius: calc(var(--app-radius) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    box-shadow: var(--app-shadow);
}

.card-header {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
    border-bottom-color: var(--app-border);
}

/* Overview: what needs doing, each a row linking to where it is done */
.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-list > li + li {
    border-top: 1px solid var(--app-border);
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    color: var(--app-ink);
}

.action-item:hover {
    background: var(--brand-sage-50);
}

.action-list > li:last-child .action-item {
    border-radius: 0 0 var(--app-radius) var(--app-radius);
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    font-size: 1.0625rem;
}

.action-sage {
    background: var(--brand-sage-100);
    color: var(--brand-sage-700);
}

.action-gold {
    background: var(--brand-gold-100);
    color: var(--brand-gold-700);
}

.action-danger {
    background: #f8e3e1;
    color: #a63b30;
}

.action-text {
    flex: 1 1 auto;
    min-width: 0;
}

.action-title {
    display: block;
    font-weight: 600;
}

.action-sub {
    display: block;
    color: var(--app-muted);
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-chevron {
    flex: none;
    color: var(--app-muted);
}

/* Overview: the open orders of the coming days */
.dash-orders {
    padding: 0.25rem 0 0.5rem;
}

.dash-day {
    padding: 0.75rem 1.25rem 0.25rem;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-order-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-order {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.4375rem 1.25rem;
    color: var(--app-ink);
}

.dash-order:hover {
    background: var(--brand-sage-50);
}

.dash-order-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.dash-order-meta {
    flex: none;
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.dash-order-more {
    padding: 0.25rem 1.25rem;
    font-size: 0.8125rem;
}

/* Key figures above a detail page */
.stat .card-body {
    padding: 1rem 1.25rem;
}

.stat-label {
    display: block;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    display: block;
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    margin-top: 0.25rem;
}

.stat .cell-sub {
    display: block;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.stat .cell-sub.text-success {
    color: var(--brand-sage-700) !important;
}

a.stat:hover {
    border-color: var(--brand-sage-200);
}

/* ---- Page header ---- */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

.page-header .page-subtitle {
    color: var(--app-muted);
    margin: 0.25rem 0 0;
}

.page-header .page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--app-muted);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header .page-back:hover {
    color: var(--brand-sage-700);
}

/* ---- Toolbar above a list ---- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

.search-input {
    position: relative;
    flex: 1 1 18rem;
    max-width: 26rem;
}

.search-input .bi {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-muted);
    pointer-events: none;
}

.search-input .form-control {
    padding-left: 2.5rem;
    background-color: var(--brand-sage-50);
    border-color: transparent;
}

.search-input .form-control:focus {
    background-color: var(--app-surface);
    border-color: var(--brand-sage);
}

/* Segmented choice, e.g. sales channel above the product list */
.segmented {
    display: inline-flex;
    padding: 0.1875rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
}

.segmented button {
    border: 0;
    background: transparent;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-muted);
}

.segmented button:hover {
    color: var(--app-ink);
}

.segmented button.active {
    background: var(--app-surface);
    color: var(--brand-sage-800);
    box-shadow: 0 1px 3px rgba(31, 42, 30, 0.12);
}

/* ---- Data tables (Blazor.Bootstrap Grid inside .data-card) ---- */

.data-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    overflow: hidden;
}

.data-card .table-responsive, .data-card .grid-container {
    margin: 0;
}

.data-table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--brand-sage-50);
    --bs-table-hover-color: var(--app-ink);
    margin-bottom: 0;
}

.data-table > thead > tr > th {
    background: transparent;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.data-table > thead > tr > th a, .data-table > thead > tr > th span {
    color: inherit;
}

.data-table > tbody > tr > td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--app-border);
    vertical-align: middle;
}

.data-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.data-table > tbody > tr {
    cursor: pointer;
}

.data-table.no-row-click > tbody > tr {
    cursor: default;
}

.data-table .cell-title {
    font-weight: 600;
    color: var(--app-ink);
}

.data-table .cell-sub {
    display: block;
    color: var(--app-muted);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.data-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.data-table tr.row-archived td {
    color: var(--app-muted);
}

.data-table tr.row-archived .cell-title {
    color: var(--app-muted);
    font-weight: 500;
}

.text-empty {
    color: #b9bfb4;
}

/* Pagination and page size under the grid. Blazor.Bootstrap renders one flex row:
   nav > ul.pagination, a div with the page-size select and its label, and .bb-grid-pagination-text. */
.data-card .d-flex:has(> nav .pagination) {
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: 0 !important;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--app-border);
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.data-card .d-flex:has(> nav .pagination) > div:not(.bb-grid-pagination-text) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.data-card .d-flex:has(> nav .pagination) .form-select {
    width: auto;
    padding: 0.3125rem 2rem 0.3125rem 0.75rem;
    background-position: right 0.625rem center;
    font-size: 0.8125rem;
    color: var(--app-ink);
    border-radius: 8px;
}

.data-card .bb-grid-pagination-text {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pagination {
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-color: var(--app-ink);
    --bs-pagination-hover-bg: var(--brand-sage-50);
    --bs-pagination-hover-color: var(--app-ink);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-active-bg: var(--brand-sage-700);
    --bs-pagination-active-border-color: var(--brand-sage-700);
    --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(131, 153, 125, 0.25);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: transparent;
    --bs-pagination-disabled-color: #c3c8bf;
    --bs-pagination-padding-x: 0.5rem;
    --bs-pagination-padding-y: 0.25rem;
    --bs-pagination-font-size: 0.8125rem;
    margin-bottom: 0;
    gap: 0.125rem;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 8px !important;
    font-variant-numeric: tabular-nums;
}

.pagination .page-item.active .page-link {
    font-weight: 600;
}

/* Editable lines of a packing slip: a tinted body and firmer borders so the white fields stand out */
.slip-lines > tbody {
    --app-border: #cdd3c6;
    --bs-border-color: #cdd3c6;
}

.slip-lines > tbody > tr > td {
    padding: 0.625rem 0.5rem;
    vertical-align: top;
    background: var(--app-bg);
}

.slip-lines .input-group-text {
    background: var(--brand-sage-50);
}

.slip-lines > tbody > tr > td:first-child,
.slip-lines > thead > tr > th:first-child {
    padding-left: 1.25rem;
}

.slip-lines > tbody > tr:has(+ .remark-row) > td {
    border-bottom: 0;
}

.slip-lines .remark-row > td {
    padding-top: 0;
}

.slip-lines .cell-sub {
    font-size: 0.75rem;
}

.slip-totals {
    max-width: 26rem;
}

.slip-total {
    border-top: 1px solid var(--app-border);
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.125rem;
}

/* Quick add under the lines: product, quantity, Enter */
.quick-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--app-border);
    background: var(--brand-sage-50);
}

/* The product typeahead drops below the card: let it out, and round the corners on the parts instead */
.data-card:has(.quick-add) {
    overflow: visible;
}

.data-card:has(.quick-add) > .table-responsive {
    border-radius: var(--app-radius) var(--app-radius) 0 0;
}

.data-card > .quick-add:last-child {
    border-radius: 0 0 var(--app-radius) var(--app-radius);
}

.quick-add-product {
    flex: 1 1 18rem;
    max-width: 28rem;
}

.quick-add-quantity {
    width: 11rem;
}

fieldset:disabled .form-control, fieldset:disabled .form-select {
    background-color: var(--app-surface);
    color: var(--app-ink);
}

/* Invoicing: one row per customer that opens to its packing slips */
.invoice-run .run-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

.invoice-run .run-customer {
    border-bottom: 1px solid var(--app-border);
}

.invoice-run .run-customer:last-child {
    border-bottom: 0;
}

.invoice-run .run-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
}

/* Count and amount in their own columns, so they line up under each other */
.invoice-run .run-count {
    width: 9rem;
    text-align: right;
    color: var(--app-muted);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.invoice-run .run-count-selected {
    display: block;
    font-size: 0.75rem;
    color: var(--brand-sage-700);
}

.invoice-run .run-amount {
    width: 7.5rem;
    text-align: right;
}

.invoice-run .run-row:hover {
    background: var(--brand-sage-50);
}

.invoice-run .run-customer.open .run-row {
    background: var(--brand-sage-100);
}

.invoice-run .run-slips > :not(caption) > * > * {
    padding: 0.4rem 0.75rem;
    background: transparent;
}

.invoice-run .run-slips th {
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-run .run-slips td:first-child, .invoice-run .run-slips th:first-child {
    padding-left: 1.25rem;
}

.invoice-run .run-slip {
    cursor: pointer;
}

.invoice-run .run-slip:hover > td {
    background: var(--brand-sage-50);
}

/* ---- Chips: quiet labels instead of loud badges ---- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5rem;
    white-space: nowrap;
    background: #eef0eb;
    color: #4d5649;
}

.chip + .chip {
    margin-left: 0.25rem;
}

.chip-sage {
    background: var(--brand-sage-100);
    color: var(--brand-sage-800);
}

.chip-gold {
    background: var(--brand-gold-100);
    color: var(--brand-gold-700);
}

.chip-outline {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--app-border);
    color: var(--app-muted);
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}

.dot-gold {
    background: var(--brand-gold);
}

.dot-sage {
    background: var(--brand-sage);
}

.dot-muted {
    background: #c3c8bf;
}

/* ---- List groups (related products) ---- */

.list-group {
    --bs-list-group-border-color: var(--app-border);
    --bs-list-group-border-radius: var(--app-radius-sm);
}

/* ---- Dialogs (ConfirmBox) ---- */

.modal-content {
    border: 0;
    border-radius: var(--app-radius);
    box-shadow: 0 12px 48px rgba(31, 42, 30, 0.18);
}

.modal-header {
    border-bottom: 0;
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-title {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
}

.modal-body {
    padding: 0.5rem 1.5rem 1rem;
    color: var(--app-muted);
}

.modal-footer {
    border-top: 0;
    padding: 0.5rem 1.5rem 1.5rem;
    gap: 0.5rem;
}

.modal-backdrop.show {
    opacity: 0.3;
}

/* ---- Toasts ---- */

.toast {
    border-radius: var(--app-radius-sm);
    box-shadow: var(--app-shadow);
}

/* ---- Errors ---- */

.blazor-error-boundary {
    background: #b3261e;
    padding: 1rem 1rem 1rem 1.25rem;
    color: white;
    border-radius: var(--app-radius-sm);
}

.blazor-error-boundary::after {
    content: "Er is een fout opgetreden.";
}

/* ---- Sign-in pages ---- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 15% 10%, var(--brand-gold-50) 0, transparent 40%),
        radial-gradient(circle at 85% 90%, var(--brand-sage-100) 0, transparent 45%),
        var(--app-bg);
}

.auth-card {
    width: 100%;
    max-width: 26rem;
}

.auth-card .auth-logo {
    display: block;
    width: 14rem;
    max-width: 80%;
    margin: 0 auto 2rem;
}

.auth-card .card-body {
    padding: 2rem;
}

/* Orders, grouped per delivery day */
.order-day {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.order-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
}

.order-row + .order-row {
    border-top: 1px solid var(--app-border);
}

.order-row:hover {
    background: var(--brand-sage-50);
}

.order-row .cell-title,
.order-row .cell-sub {
    display: block;
}

/* Order list: a tile per day on top, then the orders of each day as rows */
.day-tile {
    color: var(--app-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.day-tile:hover:not(:disabled) {
    border-color: var(--brand-sage-200);
}

.day-tile:disabled {
    opacity: 0.55;
}

.day-tile.active {
    border-color: var(--brand-sage-700);
    box-shadow: 0 0 0 1px var(--brand-sage-700);
}

.day-tile.late {
    border-color: #efc4bf;
    background: #fdf3f2;
}

.day-tile.late .stat-label,
.day-tile.late .stat-value {
    color: #a63b30;
}

.ol-day {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    margin: 0 0 0.5rem;
}

.ol-day h2 {
    margin: 0;
    font-size: 1.0625rem;
}

.ol-day.late h2 {
    color: #a63b30;
}

.ol-day-date {
    color: var(--app-muted);
    font-size: 0.875rem;
}

.ol-day-count {
    margin-left: auto;
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.ol-order {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
}

.ol-order + .ol-order {
    border-top: 1px solid var(--app-border);
}

.ol-order:hover {
    background: var(--brand-sage-50);
}

/* How it leaves the shop: pickup sage, delivery gold, PostNL dark */
.ol-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--brand-sage-100);
    color: var(--brand-sage-700);
    font-size: 1.25rem;
}

.ol-method.delivery {
    background: var(--brand-gold-100);
    color: var(--brand-gold-700);
}

.ol-method.shipping {
    background: var(--brand-sage-800);
    color: #fff;
}

.ol-main {
    flex: 1 1 auto;
    min-width: 0;
}

.ol-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.ol-note {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    max-width: 100%;
    margin-top: 0.375rem;
    padding: 0.125rem 0.625rem;
    border-radius: 8px;
    background: var(--brand-gold-50);
    color: var(--brand-gold-700);
    font-size: 0.8125rem;
}

.ol-col {
    flex: 0 0 11rem;
    min-width: 0;
}

.ol-col-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ol-col-title .bi {
    color: var(--app-muted);
}

.ol-col-sub {
    display: block;
    color: var(--app-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.ol-col-sub:hover {
    color: var(--brand-sage-700);
}

.ol-action {
    flex: 0 0 8rem;
    text-align: right;
}

@media (max-width: 575.98px) {
    .ol-order {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }

    .ol-action {
        flex-basis: 100%;
    }
}

.min-w-0 {
    min-width: 0;
}

/* Quantity with its unit in one field: number left, st/kg toggle right */
.qty-field {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.1875rem 0.1875rem 0;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--app-surface);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.qty-field:focus-within {
    border-color: var(--brand-sage);
    box-shadow: 0 0 0 0.2rem rgba(131, 153, 125, 0.25);
}

.qty-field input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0.25rem 0.5rem 0.25rem 0.75rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--app-ink);
}

.qty-field-sm input {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
    font-size: 0.875rem;
}

.qty-unit {
    flex: none;
    padding: 0 0.625rem 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-muted);
}

.unit-toggle {
    flex: none;
    display: inline-flex;
    padding: 0.125rem;
    border-radius: 6px;
    background: var(--brand-sage-50);
}

.unit-toggle button {
    border: 0;
    background: transparent;
    min-width: 2rem;
    padding: 0.125rem 0.375rem;
    border-radius: 5px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--app-muted);
}

.unit-toggle button:hover {
    color: var(--app-ink);
}

.unit-toggle button.active {
    background: var(--app-surface);
    color: var(--brand-sage-800);
    box-shadow: 0 1px 2px rgba(31, 42, 30, 0.15);
}

fieldset:disabled .qty-field {
    background: var(--bs-secondary-bg);
}

.qty-field input::-webkit-outer-spin-button,
.qty-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

/* Public payment page */
.pay-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.375rem 1rem;
    margin: 0;
}

.pay-summary dt {
    font-weight: 400;
    color: var(--app-muted);
}

.pay-summary dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pay-summary .pay-amount {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
}

.pay-status {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
}

.pay-status-done > .bi {
    font-size: 1.75rem;
    color: var(--brand-sage);
}

/* Choosing what to make, e.g. own slaughter or wholesale batch */
.choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    text-align: left;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.choice-card:hover,
.choice-card:focus-visible {
    border-color: var(--brand-sage);
    box-shadow: 0 0 0 0.2rem rgba(131, 153, 125, 0.2);
}

.choice-card > .bi {
    font-size: 1.5rem;
    color: var(--brand-sage-700, #566c52);
}

.choice-title {
    font-family: "Nunito", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.0625rem;
    color: var(--app-ink);
}

.choice-text {
    font-size: 0.875rem;
    color: var(--app-muted);
}

/* Revenue bars: calm columns, value above, label below */
.bar-chart {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    height: 14rem;
    overflow-x: auto;
}

.bar-column {
    flex: 1 1 0;
    min-width: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem;
}

.bar {
    width: 100%;
    max-width: 3.5rem;
    border-radius: 6px 6px 2px 2px;
    background: var(--brand-sage);
    transition: background 0.15s ease-in-out;
}

.bar-column:hover .bar {
    background: var(--brand-sage-800);
}

.bar-chart-compact {
    height: 11rem;
}

/* The period still running: not complete yet, so in gold */
.bar-column.current .bar {
    background: var(--brand-gold);
}

.bar-value,
.bar-label {
    font-size: 0.75rem;
    color: var(--app-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Ranked lists, e.g. best customers: name, detail and amount, with a thin bar under it */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: rank;
}

.rank-list > li {
    counter-increment: rank;
    padding: 0.5rem 0;
}

.rank-list > li + li {
    border-top: 1px solid var(--app-border);
}

.rank-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.rank-row::before {
    content: counter(rank);
    width: 1.25rem;
    flex: none;
    font-size: 0.75rem;
    color: var(--app-muted);
    font-variant-numeric: tabular-nums;
}

.rank-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--app-ink);
    text-decoration: none;
}

a.rank-name:hover {
    text-decoration: underline;
}

.rank-meta {
    flex: none;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.rank-amount {
    flex: none;
    width: 6.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rank-bar {
    height: 4px;
    margin: 0.375rem 0 0 2rem;
    border-radius: 2px;
    background: var(--brand-sage-50);
}

.rank-bar > span {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--brand-sage);
}

/* Under postal code and house number: the address found, or that there is none (AddressFields) */
.address-hint {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
}

.address-hint.found {
    color: var(--brand-sage-700);
}

.address-hint.missing {
    color: var(--brand-gold-700);
}

/* The photo of a product on the order site (ProductImageCard) */
.product-photo-edit {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.product-photo {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 8rem;
    height: 8rem;
    border-radius: var(--app-radius-sm);
    overflow: hidden;
    background: var(--brand-sage-50);
    color: var(--brand-sage);
    font-size: 2rem;
}

.product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-photo-busy {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.7);
}

/* Parcels on their way: like the parcel under "mijn bestellingen" in the webshop */
.ship-card {
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

.ship-card-problem {
    border-color: var(--brand-gold);
    box-shadow: var(--app-shadow);
}

.ship-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.875rem;
}

.ship-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--brand-sage-50);
    color: var(--brand-sage-700);
    font-size: 1.125rem;
}

.ship-card-problem .ship-icon {
    background: var(--brand-gold-50);
    color: var(--brand-gold-700);
}

.ship-text {
    flex: 1 1 14rem;
    min-width: 0;
}

.ship-title {
    display: block;
    font-weight: 600;
    color: var(--app-ink);
}

.ship-detail {
    display: block;
    color: var(--app-muted);
    font-size: 0.875rem;
}

.ship-track {
    border-radius: 999px;
    background: var(--brand-sage-50);
    color: var(--brand-sage-800);
    font-weight: 500;
}

.ship-track:hover {
    background: var(--brand-sage-100);
    color: var(--brand-sage-800);
}

.ship-icon-button {
    color: var(--app-muted);
}

.ship-icon-button:hover {
    background: var(--brand-sage-50);
    color: var(--app-ink);
}

/* Five steps from label to delivered, as bars */
.ship-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0.875rem 0 0;
}

.ship-steps > li {
    padding-top: 0.5rem;
    border-top: 4px solid rgba(86, 108, 82, 0.18);
    font-size: 0.75rem;
    line-height: 1.25;
    color: var(--app-muted);
}

.ship-steps > li.done {
    border-top-color: var(--brand-sage-700);
    color: var(--app-ink);
}

.ship-steps > li[aria-current=step] {
    font-weight: 700;
    color: var(--brand-sage-700);
}

.ship-card-problem .ship-steps > li.done {
    border-top-color: var(--brand-gold);
}

/* Who it goes to, the PostNL point, the code and the packing slip, each under its own small heading */
.ship-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 1rem;
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--app-border);
}

.ship-facts > dl {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 0;
}

.ship-facts dt {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-muted);
}

.ship-facts dd {
    margin: 0;
    font-size: 0.875rem;
    color: var(--app-ink);
}

.ship-facts dd > span {
    display: block;
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.ship-history-toggle {
    margin-left: auto;
    padding-right: 0;
    text-decoration: none;
}

.ship-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ship-timeline {
    list-style: none;
    padding: 0.75rem 0 0 0.75rem;
    margin: 0.75rem 0 0;
    border-left: 2px solid var(--brand-sage-100);
    font-size: 0.8125rem;
}

.ship-timeline > li {
    display: flex;
    gap: 0.75rem;
    padding: 0.125rem 0;
}

.ship-time {
    flex: none;
    width: 6.5rem;
    color: var(--app-muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .ship-steps > li {
        font-size: 0.625rem;
    }
}

/* A shipping label as it comes out of the Zebra */
.pdf-frame {
    display: block;
    width: 100%;
    height: 75vh;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
}

.label-preview {
    display: flex;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
}

.label-preview > img {
    max-width: 100%;
    max-height: 60vh;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(31, 42, 30, 0.12);
}

/* The signed-in user in the menu: name to the own account */
.app-user-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.app-user-link:hover .app-user-name {
    text-decoration: underline;
}

/* Choosing a user's role: the role with what it may */
.role-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    cursor: pointer;
}

.role-option.active {
    border-color: var(--brand-sage);
    background: var(--brand-sage-50);
}

.role-option .form-check-input {
    margin-top: 0.25rem;
    flex: none;
}

/* A temporary password, shown once */
.temp-password {
    padding: 0.875rem 1rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 1.375rem;
    letter-spacing: 0.08em;
    text-align: center;
}

/* The batch for new lines, under the quick add */
.quick-add-batch {
    padding-top: 0;
    border-top: 0;
}

.quick-add-batch .form-select {
    max-width: 24rem;
}

/* Tracing */
.trace-origin dt {
    font-weight: 400;
    color: var(--app-muted);
}

.trace-origin dd {
    margin-bottom: 0.5rem;
}

.trace-customer + .trace-customer {
    border-top: 1px solid var(--app-border);
}

.trace-customer {
    padding: 0.875rem 1.25rem;
}

.trace-lines {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.trace-lines > li {
    display: flex;
    gap: 0.75rem;
    padding: 0.125rem 0;
}

.trace-lines .trace-date {
    flex: none;
    width: 6rem;
    color: var(--app-muted);
    font-variant-numeric: tabular-nums;
}

.trace-lines .trace-qty {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.coverage-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--brand-gold-50);
    overflow: hidden;
}

.coverage-bar > span {
    display: block;
    height: 100%;
    background: var(--brand-sage);
}

/* Allergens */
.allergen-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.allergen-toggle {
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface);
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.allergen-toggle:hover:not(:disabled) {
    border-color: var(--brand-gold);
    color: var(--app-ink);
}

.allergen-toggle.active {
    border-color: var(--brand-gold);
    background: var(--brand-gold-50);
    color: var(--brand-gold-700, #8a6f22);
    font-weight: 600;
}

.allergen-toggle:disabled {
    opacity: 0.45;
}

.allergen-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* The ingredient list as on screen and as on the scale label */
.declaration-preview {
    padding: 0.75rem 1rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-sage-50);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.declaration-preview strong {
    font-weight: 700;
    color: var(--app-ink);
}

.declaration-label {
    padding: 0.625rem 0.875rem;
    border: 1px dashed var(--app-border);
    border-radius: var(--app-radius-sm);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

@media (min-width: 1400px) {
    .declaration-card {
        position: sticky;
        top: 1.5rem;
    }
}

/* The save buttons under a long form: they stick to the bottom of the screen while the form scrolls */
.form-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 0;
    background: var(--app-bg);
    border-top: 1px solid var(--app-border);
}
