:root {
    --lollers-ink: #1c241f;
    --lollers-forest: #1f5c3a;
    --lollers-brand-red: #a11f2c;
    --lollers-paper: #f3efe6;
    --lollers-panel: #fffdf8;
}

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 0% -10%, rgba(196, 92, 38, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(15, 61, 46, 0.14), transparent 50%),
        linear-gradient(180deg, #f7f3ea 0%, var(--lollers-paper) 45%, #ebe4d6 100%);
    color: var(--lollers-ink);
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

.nav-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 0;
}

.nav-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.app-version {
    flex: none;
    display: block;
    padding: 0.7rem 1.25rem;
    border-top: 1px solid rgba(28, 36, 31, 0.12);
    background: #f7f3ea;
    color: rgba(28, 36, 31, 0.7);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    user-select: all;
}

.brand-mark {
    font-family: "Fraunces", Georgia, serif !important;
    letter-spacing: 0.02em;
}

.iihf-logo {
    display: block;
    height: auto;
}

.login-brand {
    width: min(100%, 420px);
    margin-bottom: 1rem;
}

.login-logo-full {
    width: 100%;
    max-width: 420px;
}

.login-mark {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.app-topbar {
    background: #ffffff !important;
    color: var(--lollers-ink) !important;
    border-bottom: 1px solid rgba(28, 36, 31, 0.1);
    box-shadow: 0 1px 0 rgba(28, 36, 31, 0.04);
}

.appbar-mark {
    height: 40px;
    width: 40px;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.appbar-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    min-width: 0;
}

.appbar-titles .brand-mark {
    color: var(--lollers-forest) !important;
    margin: 0;
}

.appbar-company {
    display: none;
    color: var(--lollers-brand-red) !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 600px) {
    .appbar-company {
        display: block;
    }
}

.app-subtitle {
    opacity: 0.85;
}

.app-main {
    min-height: 100vh;
}

.login-main {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-shell {
    min-height: calc(100vh - 0px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(31, 92, 58, 0.35), transparent 60%),
        linear-gradient(160deg, #0b0b0b 0%, #141414 55%, #1a1a1a 100%);
}

.login-panel {
    width: min(100%, 420px);
    background: var(--lollers-panel);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 18px 50px rgba(15, 61, 46, 0.28);
}

.home-panel,
.about-content {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.08);
    border-radius: 12px;
}

.about-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
}

.selected-doc {
    background: rgba(15, 61, 46, 0.08);
    border-radius: 8px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(28, 36, 31, 0.45);
    backdrop-filter: blur(2px);
}

.loading-card {
    background: var(--lollers-panel);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    text-align: center;
    min-width: min(90vw, 260px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui {
    background: #b32121;
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2500;
    color: #fff;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: #fff;
}

@media (max-width: 600px) {
    .login-panel {
        padding: 1.5rem 1.15rem;
    }
}

/* —— Returns module —— */
.returns-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.25rem;
    animation: returns-fade-up 0.45s ease-out both;
}

.returns-toolbar {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 14px;
    animation: returns-fade-up 0.5s ease-out 0.05s both;
}

.returns-search {
    min-width: min(100%, 280px);
    flex: 1 1 280px;
}

.returns-table {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.08);
    border-radius: 14px;
    overflow: hidden;
    animation: returns-fade-up 0.55s ease-out 0.1s both;
}

.returns-row {
    cursor: pointer;
}

.returns-cust {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.25;
}

.returns-cust strong {
    font-weight: 600;
}

.returns-cust span {
    color: rgba(28, 36, 31, 0.65);
    font-size: 0.85rem;
}

.returns-line-card,
.qa-card {
    background: #fff;
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.qa-card:hover {
    border-color: rgba(31, 92, 58, 0.35);
    box-shadow: 0 8px 24px rgba(15, 61, 46, 0.08);
    transform: translateY(-1px);
}

.qa-card-selected {
    border-color: rgba(31, 92, 58, 0.45);
    box-shadow: 0 0 0 1px rgba(31, 92, 58, 0.2);
}

.qa-list-with-fab {
    padding-bottom: 6.5rem;
}

.qa-submit-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(243, 239, 230, 0) 0%, rgba(243, 239, 230, 0.92) 28%, #f3efe6 100%);
    pointer-events: none;
}

.qa-submit-bar-inner {
    pointer-events: auto;
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    padding: 0.85rem 1rem;
    background: #fffdf8;
    border: 1px solid rgba(15, 61, 46, 0.14);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(28, 36, 31, 0.16);
}

@media (min-width: 960px) {
    .qa-submit-bar {
        /* leave room for MudDrawer when open on desktop */
        padding-left: calc(1rem + var(--mud-drawer-width-left, 0px));
    }
}

.returns-line-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.8rem;
    color: rgba(28, 36, 31, 0.7);
}

.returns-credit-ref {
    color: var(--lollers-forest);
    font-weight: 600;
}

.qa-card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.qa-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 1rem;
    align-items: start;
}

.qa-card-image {
    position: sticky;
    top: 0.5rem;
    width: 160px;
    max-width: 160px;
}

.returns-line-with-image {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 0.75rem;
    align-items: start;
}

.returns-image-thumb {
    position: relative;
    display: block;
    box-sizing: border-box;
    border: 1px solid rgba(15, 61, 46, 0.14);
    border-radius: 10px;
    overflow: hidden !important;
    background: #f0ebe1;
    cursor: zoom-in;
}

.returns-image-thumb img {
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
}

.returns-image-zoom {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(28, 36, 31, 0.72);
    color: #fff;
}

.returns-image-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-sizing: border-box;
    border: 1px dashed rgba(15, 61, 46, 0.2);
    border-radius: 10px;
    color: rgba(28, 36, 31, 0.45);
    font-size: 0.75rem;
    background: rgba(255, 253, 248, 0.6);
}

.returns-image-full {
    display: grid;
    place-items: center;
    max-height: min(75vh, 720px);
    overflow: auto;
    background: #111;
    border-radius: 8px;
}

.returns-image-full img {
    max-width: 100%;
    max-height: min(75vh, 720px);
    object-fit: contain;
}

@media (max-width: 720px) {
    .qa-card-body,
    .returns-line-with-image {
        grid-template-columns: 1fr;
    }

    .qa-card-image {
        width: 140px;
        max-width: 140px;
    }
}

.qa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.qa-list {
    animation: returns-fade-up 0.5s ease-out 0.08s both;
}

.returns-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.returns-feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
    animation: returns-fade-up 0.5s ease-out both;
}

.returns-feature-link:nth-child(2) { animation-delay: 0.06s; }
.returns-feature-link:nth-child(3) { animation-delay: 0.12s; }

.returns-feature-card {
    height: 100%;
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.returns-feature-link:hover .returns-feature-card {
    border-color: rgba(31, 92, 58, 0.4);
    box-shadow: 0 10px 28px rgba(15, 61, 46, 0.1);
    transform: translateY(-2px);
}

.returns-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(31, 92, 58, 0.1);
    margin-bottom: 0.35rem;
}

.returns-feature-cta {
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lollers-forest);
}

.returns-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.returns-config-link {
    text-decoration: none;
    color: inherit;
    padding: 0.9rem 1rem;
    background: rgba(255, 253, 248, 0.7);
    border: 1px solid rgba(15, 61, 46, 0.08);
    border-radius: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.returns-config-link:hover {
    background: #fff;
    border-color: rgba(31, 92, 58, 0.28);
}

@keyframes returns-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .returns-hero,
    .returns-toolbar,
    .returns-table,
    .qa-list,
    .returns-feature-link {
        animation: none;
    }

    .qa-card:hover,
    .returns-feature-link:hover .returns-feature-card {
        transform: none;
    }
}

/* Pricechanger */
.pc-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(161, 31, 44, 0.08), transparent 45%),
        linear-gradient(135deg, var(--lollers-panel) 0%, #f4efe3 100%);
    border: 1px solid rgba(15, 61, 46, 0.1);
    animation: returns-fade-up 0.45s ease-out both;
}

.pc-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lollers-brand-red);
}

.pc-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.pc-stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    align-items: center;
    text-align: left;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 61, 46, 0.1);
    background: var(--lollers-panel);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.pc-stat:hover {
    border-color: rgba(31, 92, 58, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 61, 46, 0.08);
}

.pc-stat-icon {
    grid-row: span 2;
    color: var(--lollers-forest);
    background: rgba(31, 92, 58, 0.1);
    border-radius: 10px;
    padding: 0.45rem;
    width: 2.3rem !important;
    height: 2.3rem !important;
}

.pc-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.pc-stat-label {
    font-size: 0.78rem;
    color: rgba(28, 36, 31, 0.65);
}

.pc-card {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 14px;
    padding: 1rem 1.1rem;
}

.pc-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.pc-card-head .mud-icon-root {
    color: var(--lollers-forest);
}

.pc-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(31, 92, 58, 0.12);
    color: var(--lollers-forest);
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-pill.muted {
    background: rgba(28, 36, 31, 0.06);
    color: rgba(28, 36, 31, 0.6);
    font-weight: 500;
}

.pc-count {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(28, 36, 31, 0.07);
}

.pc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.pc-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(28, 36, 31, 0.6);
    margin-bottom: 0.35rem;
}

.pc-empty {
    padding: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(28, 36, 31, 0.55);
}

.pc-list {
    padding: 0.75rem;
}

.pc-list-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.25rem 0.5rem;
}

.pc-list-title {
    font-weight: 600;
}

.pc-list-search {
    margin-bottom: 0.5rem !important;
}

.pc-list-body {
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pc-list-item {
    display: block;
    width: 100%;
    flex: none;
    text-align: left;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    color: inherit;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    word-break: break-word;
}

.pc-list-item:hover {
    background: rgba(31, 92, 58, 0.07);
}

.pc-list-item.active {
    background: var(--lollers-forest);
    color: #fff;
    font-weight: 600;
}

.pc-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.5rem 1rem;
    border: 2px dashed rgba(31, 92, 58, 0.3);
    border-radius: 12px;
    background: rgba(31, 92, 58, 0.03);
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pc-drop:hover,
.pc-drop:focus-within {
    border-color: var(--lollers-forest);
    background: rgba(31, 92, 58, 0.07);
}

.pc-drop.has-file {
    border-style: solid;
    border-color: rgba(31, 92, 58, 0.45);
}

.pc-drop.disabled {
    opacity: 0.55;
}

.pc-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pc-drop-icon {
    color: var(--lollers-forest);
    font-size: 2rem !important;
}

.pc-drop-title {
    font-weight: 600;
    word-break: break-all;
}

.pc-drop-hint {
    font-size: 0.78rem;
    color: rgba(28, 36, 31, 0.6);
}

.pc-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.65rem;
}

.pc-tile {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(31, 92, 58, 0.05);
}

.pc-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.pc-tile-label {
    font-size: 0.78rem;
    color: rgba(28, 36, 31, 0.65);
}

.pc-tile-sub {
    font-size: 0.7rem;
    margin-top: 0.2rem;
    color: rgba(28, 36, 31, 0.55);
}

.pc-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.88rem;
}

.pc-facts dt {
    color: rgba(28, 36, 31, 0.6);
}

.pc-facts dd {
    margin: 0;
}

.pc-letters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
}

.pc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.pc-lookup {
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    background: rgba(31, 92, 58, 0.03);
}

.pc-lookup-head,
.pc-create-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pc-lookup-head .mud-input-control,
.pc-create-row .mud-input-control {
    flex: 1 1 180px;
}

.pc-grid {
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.pc-grid-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
    background: rgba(31, 92, 58, 0.03);
}

.pc-grid-body {
    overflow: auto;
}

.pc-grid table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.pc-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f1ea;
    text-align: left;
    font-weight: 600;
    padding: 0.45rem 0.6rem;
    white-space: nowrap;
    border-bottom: 1px solid rgba(15, 61, 46, 0.12);
}

.pc-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.pc-grid td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.06);
    vertical-align: top;
}

.pc-grid .num {
    text-align: right;
    white-space: nowrap;
}

.pc-grid tbody tr {
    cursor: pointer;
}

.pc-grid tbody tr.static {
    cursor: default;
}

.pc-grid tbody tr:not(.static):hover {
    background: rgba(31, 92, 58, 0.06);
}

.pc-grid tbody tr.active {
    background: rgba(31, 92, 58, 0.16);
}

.pc-grid .pc-check {
    width: 2rem;
    text-align: center;
}

.pc-grid .pc-check input {
    pointer-events: none;
    accent-color: var(--lollers-forest);
}

.pc-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(28, 36, 31, 0.06);
}

.pc-seg button {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.85rem;
    color: inherit;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
}

.pc-seg button.active {
    background: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.pc-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pc-status {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.3rem;
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    color: inherit;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.pc-status:hover:not(.static) {
    background: rgba(31, 92, 58, 0.05);
}

.pc-status.active {
    border-color: rgba(31, 92, 58, 0.35);
    background: rgba(31, 92, 58, 0.07);
}

.pc-status.static {
    cursor: default;
}

.pc-status-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.85rem;
}

.pc-status-bar {
    grid-column: 1 / -1;
}

.pc-create {
    border-top: 1px dashed rgba(15, 61, 46, 0.15);
    padding-top: 0.75rem;
}

.pc-manage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.pc-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pc-action {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.6rem;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border-radius: 9px;
    cursor: pointer;
}

.pc-action:hover {
    background: rgba(31, 92, 58, 0.05);
}

.pc-action.on {
    background: rgba(31, 92, 58, 0.1);
}

.pc-action input {
    grid-row: span 2;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--lollers-forest);
}

.pc-action-label {
    font-size: 0.9rem;
}

.pc-action-date {
    font-size: 0.72rem;
    color: rgba(28, 36, 31, 0.55);
}

.pc-steps {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pc-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}

.pc-steps small {
    grid-column: 2;
    color: var(--lollers-brand-red);
    word-break: break-word;
}

.pc-dup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pc-dup-chip {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    border: 1px solid rgba(15, 61, 46, 0.2);
    background: #fff;
    font: inherit;
    font-size: 0.78rem;
    color: inherit;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
}

.pc-dup-chip:hover {
    border-color: var(--lollers-forest);
}

.pc-dup-chip.active {
    background: var(--lollers-forest);
    border-color: var(--lollers-forest);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .pc-hero {
        animation: none;
    }

    .pc-stat:hover {
        transform: none;
    }
}

.db-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
}

.db-toolbar .mud-input-control {
    width: 12.5rem;
    flex: 0 0 auto;
}

.db-toolbar .db-hint {
    flex: 1 0 100%;
    max-width: none;
    margin: 0.1rem 0 0;
}

.db-hint {
    margin-top: 0.35rem;
    color: rgba(28, 36, 31, 0.62);
    font-size: 0.78rem;
    max-width: 42rem;
}

.db-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.db-compare {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.db-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    font: inherit;
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 14px;
    padding: 0.95rem 1rem 0.85rem;
    cursor: pointer;
    min-width: 0;
    box-shadow: 0 8px 22px rgba(28, 36, 31, 0.04);
}

.db-card:hover {
    border-color: rgba(31, 92, 58, 0.45);
}

.db-card strong {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.db-card.on {
    border-color: var(--lollers-forest);
    box-shadow: inset 0 0 0 1px var(--lollers-forest);
}

.db-meter {
    display: block;
    width: 100%;
    height: 6px;
    margin-top: 0.55rem;
    border-radius: 99px;
    background: rgba(31, 92, 58, 0.12);
    overflow: hidden;
}

.db-meter i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--lollers-forest);
}

.db-kicker,
.db-title,
.db-lines {
    color: rgba(28, 36, 31, 0.68);
    font-size: 0.78rem;
}

.db-delta {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.db-delta.up {
    color: var(--lollers-forest);
}

.db-delta.down {
    color: var(--lollers-brand-red);
}

.db-blocks {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.db-block,
.db-panel {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 16px;
    padding: 1rem 1.05rem;
    box-shadow: 0 10px 28px rgba(28, 36, 31, 0.04);
    min-width: 0;
    max-width: 100%;
}

.db-block-head,
.db-panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.db-block-head a {
    color: var(--lollers-forest);
    font-weight: 600;
}

.db-panel-head span {
    color: rgba(28, 36, 31, 0.62);
    font-size: 0.8rem;
}

.db-search {
    min-width: 14rem;
    max-width: 22rem;
}

.db-filter-row th {
    padding: 0.25rem 0.35rem 0.45rem;
    background: #fff;
}

.db-col-filter {
    width: 100%;
    min-width: 5.5rem;
    box-sizing: border-box;
    border: 1px solid rgba(28, 36, 31, 0.16);
    border-radius: 6px;
    padding: 0.28rem 0.4rem;
    font: inherit;
    font-size: 0.75rem;
    color: var(--lollers-ink);
    background: #fff;
}

.db-trend {
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    height: 220px;
    margin-top: 0.85rem;
    padding: 0.35rem 0.15rem 0.2rem;
    border-bottom: 1px solid rgba(28, 36, 31, 0.12);
    background: repeating-linear-gradient(
        to top,
        transparent,
        transparent 43px,
        rgba(28, 36, 31, 0.06) 44px
    );
}

.db-trend-mini {
    height: 84px;
    margin-top: 0.85rem;
    padding-bottom: 0;
    background-size: 100% 28px;
}

.db-bar {
    flex: 0 0 52px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.db-plot {
    flex: 1;
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.db-plot i {
    display: block;
    width: 100%;
    border-radius: 7px 7px 2px 2px;
    background: linear-gradient(180deg, #2f7a4e 0%, var(--lollers-forest) 100%);
    min-height: 0;
}

.db-bar:hover .db-plot i,
.db-bar.on .db-plot i {
    background: #143d28;
}

.db-bar.on .db-label {
    font-weight: 700;
    color: var(--lollers-forest);
}

.db-label {
    flex: none;
    margin-top: 0.3rem;
    font-size: 0.68rem;
    text-align: center;
    white-space: nowrap;
}

.db-table-wrap {
    overflow: auto;
    max-height: 70vh;
    margin-top: 0.75rem;
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 12px;
}

.db-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 0.82rem;
}

.db-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f3ea;
    text-align: left;
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
}

.db-table td {
    padding: 0.4rem 0.65rem;
    border-top: 1px solid rgba(28, 36, 31, 0.08);
    white-space: nowrap;
}

.db-table tbody tr:nth-child(even) {
    background: rgba(247, 243, 234, 0.65);
}

.db-table tbody tr:hover {
    background: rgba(31, 92, 58, 0.06);
}

@media (max-width: 800px) {
    .db-compare {
        grid-template-columns: 1fr;
    }
}

.da-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.da-hub-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.12);
    text-decoration: none;
    color: inherit;
    min-height: 8.5rem;
}

.da-hub-card:hover {
    border-color: rgba(31, 92, 58, 0.35);
    box-shadow: 0 8px 24px rgba(15, 61, 46, 0.08);
}

.da-hub-card strong {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.15rem;
}

.da-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.35rem 0 0.15rem;
}

.da-years button {
    border: 1px solid rgba(15, 61, 46, 0.16);
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 0.82rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
}

.da-years button.on {
    background: var(--lollers-forest);
    border-color: var(--lollers-forest);
    color: #fff;
}

.da-picks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.da-pick {
    background: var(--lollers-panel);
    border: 1px solid rgba(15, 61, 46, 0.1);
    border-radius: 14px;
    padding: 0.7rem 0.8rem 0.55rem;
    min-width: 0;
}

.da-pick-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.4rem;
}

.da-pick-search {
    width: 100%;
    border: 1px solid rgba(15, 61, 46, 0.16);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font: inherit;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.da-pick-list {
    height: 240px;
    overflow: auto;
    border: 1px solid rgba(15, 61, 46, 0.08);
    border-radius: 8px;
    background: #fff;
}

.da-pick-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.5rem;
    min-height: 28px;
    font-size: 0.82rem;
    cursor: pointer;
}

.da-pick-row.on {
    background: rgba(31, 92, 58, 0.08);
}

.da-pick-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.da-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.da-link {
    border: 0;
    background: none;
    color: var(--lollers-forest);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
}

.da-row-on td {
    background: rgba(31, 92, 58, 0.1);
}

.da-chart-host,
.da-chart,
.da-chart-pie,
.da-svg,
.da-stacked,
.da-hbar {
    max-width: 100%;
    min-width: 0;
}

.da-chart-host {
    --da-chart-h: 178px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.da-chart-host.is-resizing {
    user-select: none;
    cursor: ns-resize;
}

.da-chart {
    padding: 0.25rem 0.15rem 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.da-chart-pie,
.da-svg {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    position: relative;
}

@media (min-width: 960px) {
    .da-chart-pie.has-legend,
    .da-svg.has-legend {
        grid-template-columns: minmax(0, 1fr) minmax(9rem, 14rem);
        align-items: center;
    }
}

.da-plot {
    min-width: 0;
    width: 100%;
}

.da-plot-scroll {
    width: 100%;
    max-width: 100%;
    height: var(--da-chart-h, 178px);
    min-width: 0;
}

.da-pie-wrap {
    position: relative;
    width: var(--da-chart-h, 178px);
    height: var(--da-chart-h, 178px);
    max-width: 100%;
    margin: 0 auto;
}

.da-pie-wrap svg {
    width: 100%;
    height: 100%;
    max-height: none;
}

.da-pie-centre {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.da-pie-centre strong {
    font-size: 0.95rem;
}

.da-pie-centre span {
    font-size: 0.72rem;
    color: rgba(28, 36, 31, 0.6);
}

.da-axis-row {
    display: flex;
    justify-content: space-between;
    gap: 0.15rem;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    color: rgba(28, 36, 31, 0.62);
    overflow: hidden;
}

.da-axis-row span {
    flex: 1 1 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.da-chart svg {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
    display: block;
}

.da-chart-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 14px;
    margin-top: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: ns-resize;
    touch-action: none;
    flex: 0 0 auto;
}

.da-chart-grip::after {
    content: "";
    width: 2.6rem;
    height: 4px;
    border-radius: 99px;
    background: rgba(15, 61, 46, 0.22);
}

.da-chart-grip:hover::after,
.da-chart-host.is-resizing .da-chart-grip::after {
    background: var(--lollers-forest);
}

.da-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.da-sort-dir {
    font-size: 0.7rem;
    color: var(--lollers-forest);
}

.da-chart-centre {
    font-size: 13px;
    font-weight: 700;
    fill: var(--lollers-ink);
}

.da-chart-centre-sub {
    font-size: 10px;
    fill: rgba(28, 36, 31, 0.6);
}

.da-axis {
    font-size: 9px;
    fill: rgba(28, 36, 31, 0.62);
}

.da-grid {
    stroke: rgba(28, 36, 31, 0.08);
    stroke-width: 1;
}

.da-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.da-legend button {
    display: grid;
    grid-template-columns: 0.7rem 1fr auto;
    gap: 0.45rem;
    align-items: center;
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    padding: 0.2rem 0;
}

.da-legend i {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 2px;
    display: inline-block;
}

.da-hbar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: var(--da-chart-h, 178px);
}

.da-hbar-row {
    display: grid;
    grid-template-columns: minmax(6rem, 14rem) 1fr auto;
    gap: 0.55rem;
    align-items: center;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
    padding: 0.15rem 0;
}

.da-hbar-label {
    text-align: left;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.da-hbar-track {
    display: block;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(15, 61, 46, 0.08);
    overflow: hidden;
}

.da-hbar-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.da-hbar-value {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.da-stacked-plot {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    width: 100%;
    height: var(--da-chart-h, 178px);
    min-height: var(--da-chart-h, 178px);
    max-width: 100%;
}

.da-stacked-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.da-stacked-stack {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    height: calc(var(--da-chart-h, 178px) - 1.35rem);
    background: rgba(15, 61, 46, 0.05);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.da-stacked-stack i {
    display: block;
    width: 100%;
}

.da-stacked-label {
    font-size: 0.68rem;
    color: rgba(28, 36, 31, 0.62);
}

@media (max-width: 800px) {
    .da-hbar-row {
        grid-template-columns: 1fr;
    }

    .da-legend {
        max-width: 100%;
    }
}

.wh-scan-btn {
    min-width: 48px;
    min-height: 48px;
}

.wh-scan-hit {
    display: inline-flex;
}

.wh-scan-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: #111;
    display: flex;
    flex-direction: column;
}

.wh-scan-overlay video {
    flex: 1;
    width: 100%;
    min-height: 40vh;
    object-fit: cover;
    background: #000;
}

.wh-scan-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem 1rem 1.35rem;
    background: #1c241f;
    color: #fff;
}

.wh-scan-overlay-nophoto .wh-scan-bar {
    flex: 1;
    justify-content: center;
}

.wh-scan-msg {
    color: #fff;
    font-size: 1rem;
    line-height: 1.4;
}

.wh-scan-photo {
    display: block;
    width: 100%;
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    background: #2e7d32;
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.wh-scan-close {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    text-align: center;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    cursor: pointer;
}

.wh-scan-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rpt-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    word-break: break-all;
}

.rpt-preview {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(28, 36, 31, 0.12);
    border-radius: 6px;
    overflow: hidden;
}

.rpt-frame {
    display: block;
    width: 100%;
    height: min(80vh, 1100px);
    min-height: 70vh;
    border: 0;
    background: #fff;
}

.rpt-sheet {
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(28, 36, 31, 0.12);
    border-radius: 6px;
}

.rpt-sheet-table {
    width: max-content;
    min-width: 100%;
    white-space: nowrap;
}

.rpt-sheet-table th,
.rpt-sheet-table td {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.rpt-steps {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.rpt-steps li {
    margin: 0.35rem 0;
}

.iw-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lollers-brand-red);
    margin-bottom: 0.35rem;
}

.iw-crumb a {
    color: inherit;
    text-decoration: none;
}

.iw-crumb a:hover {
    text-decoration: underline;
}

.iw-crumb span {
    color: rgba(161, 31, 44, 0.45);
    letter-spacing: 0;
}

.iw-crumb strong {
    color: var(--lollers-ink);
    letter-spacing: 0.08em;
}

.iw-main,
.iw-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    max-width: 36rem;
}

.iw-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.4rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(15, 61, 46, 0.16);
    background: var(--lollers-panel);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(28, 36, 31, 0.05);
}

.iw-menu-btn.span-2,
.iw-menu-back {
    grid-column: 1 / -1;
}

.iw-menu-btn strong {
    font-size: 1.02rem;
    font-weight: 700;
}

.iw-menu-btn span {
    font-size: 0.8rem;
    color: rgba(28, 36, 31, 0.62);
}

.iw-menu-btn:hover {
    border-color: rgba(31, 92, 58, 0.45);
    box-shadow: 0 10px 24px rgba(15, 61, 46, 0.1);
}

.iw-menu-back {
    margin-top: 1rem;
    max-width: 36rem;
    text-align: center;
    align-items: center;
    background: #f7f3ea;
    font-weight: 700;
}

@media (max-width: 520px) {
    .iw-main,
    .iw-menu {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .iw-menu-btn.span-2 {
        grid-column: auto;
    }
}

.rf-barcode {
    flex: 1 1 280px;
    min-width: min(100%, 280px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rf-photo {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.rf-photo-preview {
    width: min(100%, 280px);
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(15, 61, 46, 0.16);
    background: #fff;
}

.rf-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.rf-photo-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    overflow: hidden;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 61, 46, 0.28);
    background: #fff;
    color: #0f3d2e;
    font-weight: 600;
    cursor: pointer;
}

.rf-photo-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.rf-line-card {
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #fff;
}
