:root {
    --ink: #18211e;
    --muted: #65716c;
    --canvas: #f4f2ec;
    --surface: #fff;
    --line: #dddcd5;
    --brand: #173f35;
    --brand-deep: #0f3028;
    --mint: #dcebe4;
    --gold: #e8b94f;
    --red: #a83b36;
    --green: #337254;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(20, 31, 27, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #63a98e; outline-offset: 3px; }
h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.04em; line-height: 1.05; }
h2, h3, h4, h5, h6 { line-height: 1.2; }
form { margin: 0; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--surface); padding: .75rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #ffffff1f; background: rgba(23, 63, 53, .96); color: white; backdrop-filter: blur(12px); }
.site-header__inner { width: min(1180px, calc(100% - 2rem)); min-height: 76px; margin: auto; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: white; text-decoration: none; line-height: 1.15; }
.brand__mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 13px; background: var(--gold); color: var(--brand-deep); font-size: .8rem; font-weight: 850; letter-spacing: .08em; }
.brand small, .user-menu small { display: block; margin-top: .18rem; color: #c5d8d1; font-size: .75rem; font-weight: 500; }
.primary-nav { display: flex; margin-left: 1rem; }
.primary-nav a { color: #dbe8e3; text-decoration: none; padding: .55rem .8rem; border-radius: 9px; font-weight: 700; }
.primary-nav a[aria-current="page"] { background: #ffffff18; color: white; }
.user-menu { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.user-menu__identity { text-align: right; font-size: .88rem; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2.25rem 0 5rem; }

.page-heading { position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: 24px; background: var(--brand); color: white; box-shadow: var(--shadow); }
.page-heading::after { content: ""; position: absolute; right: -6rem; top: -8rem; width: 19rem; aspect-ratio: 1; border-radius: 50%; background: #ffffff0a; }
.page-heading h1 { margin-bottom: .4rem; }
.page-heading p:last-child { margin: 0; color: #d3e4de; }
.page-heading__icon { display: grid; flex: 0 0 auto; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 18px; background: var(--gold); color: var(--brand); }
.page-heading__icon svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.eyebrow { margin-bottom: .3rem; color: #e8c979 !important; font-size: .75rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.section-heading { margin-bottom: 1.25rem; }
.section-heading h1 { margin-bottom: .45rem; }
.section-heading > p:last-child { max-width: 680px; margin-bottom: 0; color: var(--muted); }
.section-heading .eyebrow { color: #8a651c !important; }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.plain-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.panel { overflow: hidden; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel.elevated { box-shadow: var(--shadow); }
.panel__header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: #f8f8f5; font-weight: 800; }
.panel__body { padding: 1.25rem; }
.borderless { border: 0; }
.border-strong { border-color: #aeb5b1; }
.section-bar { color: white; }
.section-bar--production { background: #315e72; }
.section-bar--prepack { background: #337254; }
.section-bar--attention { background: #8b3732; }
.feature-card--gold, .feature-card--orange, .feature-card--blue { min-height: 100%; color: white; border: 0; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease; }
.feature-card--gold { background: linear-gradient(145deg, #8b6519, #6d4c0b); }
.feature-card--orange { background: linear-gradient(145deg, #a95128, #7c371b); }
.feature-card--blue { background: linear-gradient(145deg, #376f87, #255367); }
.plain-link:hover [class*="feature-card--"] { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(20,31,27,.15); }
.feature-card__heading { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.feature-icon { display: grid; place-items: center; width: 46px; aspect-ratio: 1; border-radius: 14px; background: #ffffff20; }
.feature-icon svg { width: 24px; }
.feature-list { margin: .25rem 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .58rem 0; border-top: 1px solid #ffffff20; font-size: .9rem; }
.feature-list li span { flex: 0 0 auto; opacity: .8; }
.metric-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .55rem; padding: .72rem .8rem; border-radius: 10px; background: #ffffff17; font-size: .88rem; }
.metric-row strong { display: grid; place-items: center; min-width: 32px; height: 28px; border-radius: 99px; background: #ffffff24; }
.feature-card__footer { margin-top: 1rem; font-size: .8rem; }
.staff-card-heading, .staff-sale-item, .flex { display: flex; }
.staff-card-heading { align-items: center; justify-content: space-between; gap: 1rem; }
.staff-card-icon { font-size: 1.7rem; }
.staff-card-subtitle, .staff-card-note, .subdued { opacity: .78; }
.staff-sale-badge { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .7rem; border-radius: 999px; background: #ffffff22; font-size: 1.1rem; font-weight: 800; }
.staff-sale-list, .bare-list { margin: 1rem 0; padding: 0; list-style: none; }
.staff-sale-item { align-items: center; gap: .7rem; padding: .6rem 0; border-top: 1px solid #ffffff20; }
.staff-item-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-item-chip { margin-left: auto; padding: .18rem .55rem; border-radius: 99px; background: #ffffff20; font-size: .8rem; }

.section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: 1.25rem; padding: .35rem; border: 1px solid var(--line); border-radius: 14px; background: #e9e8e2; }
.section-tabs a { padding: .7rem .8rem; border-radius: 10px; color: #52605b; text-align: center; text-decoration: none; font-size: .9rem; font-weight: 750; }
.section-tabs a[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px #1b2b2520; }

.record-list { display: grid; }
.record-row { display: block; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; color: inherit; text-decoration: none; }
.record-row:last-child { border-bottom: 0; }
.record-row--action:hover { background: #f8faf8; }
.priority-critical { border-left-color: var(--red); }
.priority-warning { border-left-color: #cb861f; }
.priority-info { border-left-color: #3d718a; }
.priority-normal { border-left-color: #89928e; }
.status-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .24rem .58rem; border-radius: 99px; font-size: .73rem; font-weight: 800; line-height: 1.2; }
.tone-danger { background: #f6dedb; color: #812d29; }
.tone-warning { background: #f8e8bd; color: #6c4a08; }
.tone-success { background: #dcece3; color: #24573f; }
.tone-info, .tone-primary { background: #dcebf0; color: #285b70; }
.tone-neutral { background: #e8ebe9; color: #47514d; }
.tone-light { background: #f4f4f0; }

.button { appearance: none; display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: .4rem; padding: .6rem .9rem; border: 1px solid transparent; border-radius: 10px; background: var(--brand); color: white; cursor: pointer; font: inherit; font-weight: 750; line-height: 1.1; text-decoration: none; }
.button:hover { filter: brightness(.95); }
.button--primary { background: var(--brand); }
.button--neutral, .button--quiet { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button--outline { border-color: #85a89b; background: transparent; color: var(--brand); }
.button--inverse { border-color: #ffffff66; background: #ffffff10; color: white; }
.button--warning { background: #d99826; color: #2e2107; }
.button--success { background: var(--green); }
.button--danger { background: var(--red); }
.button--link { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--brand); text-decoration: underline; }
.button--wide, .full-width { width: 100%; }
.button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.calendar-toolbar { display: flex; align-items: center; justify-content: center; background: var(--brand); }

.field-label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 800; }
.field { width: 100%; min-height: 48px; margin-bottom: 1rem; padding: .7rem .8rem; border: 1px solid #b8bfbb; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.field:focus { border-color: #47836b; box-shadow: 0 0 0 4px #63a98e22; outline: none; }
.signin-card { max-width: 470px; margin: clamp(1rem, 8vh, 5rem) auto 0; }
.action-group { padding-top: .5rem; }
.action-group hr { height: 1px; margin: 1.25rem 0; border: 0; background: var(--line); }
.action-row { display: flex; justify-content: flex-end; }
.product-header { font-size: 1.35rem; }
.panel-title { font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.align-end { text-align: right; }
.rate { margin-bottom: .45rem; font-size: clamp(1.8rem, 5vw, 2.65rem); }
.rate--critical { color: var(--red); }
.rate--warning { color: #a96311; }
.rate--healthy { color: var(--green); }
.sold-date { text-decoration: line-through; }
.sold-date--expired { color: var(--red); }
.sold-date--marked-down { color: #a96311; }
.sold-date--sold { color: var(--green); }
.notice { margin-bottom: 1rem; padding: 1rem; border-radius: 12px; }
.notice--warning { border: 1px solid #e4bf63; background: #fff5d9; color: #59400d; }

.content-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.span-full { grid-column: 1 / -1; }
.span-main { grid-column: span 10; }
.span-aside { grid-column: span 2; }
.span-half { grid-column: span 6; }
.span-third { grid-column: span 4; }
.span-two-thirds { grid-column: span 8; }
.detail-layout { margin-top: 1rem; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.data-table--striped tbody tr:nth-child(even) { background: #f7f7f3; }
.data-table--bordered { border: 1px solid var(--line); }
.data-table--compact th, .data-table--compact td { padding: .5rem; }
.data-table--interactive tbody tr:hover, .data-table .is-selected { background: var(--mint); }
.table-heading { background: #f2f2ee; }
.responsive-image { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.product-image { max-height: 250px; object-fit: contain; }
.empty-icon { display: block; font-size: 4rem; color: #a8afab; }
.status-stack { display: flex; flex-wrap: wrap; gap: .4rem; }

.calendar-container { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: .75rem; }
.calendar-day { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calendar-day.is-today { border: 2px solid var(--brand); box-shadow: 0 6px 18px #173f3520; }
.calendar-day.is-past { opacity: .7; }
.calendar-day-header { padding: 1rem; border-bottom: 1px solid var(--line); background: #eeeee9; }
.day-info { display: grid; gap: .1rem; }
.calendar-day.is-today .calendar-day-header { background: var(--brand); color: white; }
.day-number { font-size: 1.8rem; font-weight: 850; }
.day-name { font-weight: 800; }
.day-month, .item-brand { color: var(--muted); font-size: .78rem; }
.calendar-day.is-today .day-month { color: #cadbd5; }
.calendar-day-body { padding: .65rem; }
.calendar-item { margin-bottom: .55rem; padding: .65rem; border-radius: 9px; background: #f0f1ed; font-size: .86rem; font-weight: 750; }
.calendar-item a { color: inherit; text-decoration: none; }
.status-marked-down { border-left: 3px solid #c4891f; background: #fff4d7; }
.status-sold { background: #e4ede8; text-decoration: line-through; }
.status-expired { background: #f3dddd; color: #7c302c; text-decoration: line-through; }
.needs-markdown { box-shadow: inset 0 0 0 2px var(--red); }
.no-items { padding: 1rem .25rem; color: #929b97; text-align: center; font-size: .85rem; }
.calendar-nav-btn { min-width: 8rem; }
.record-list--flush { margin: 0; }
.staff-dashboard-card, .staff-expiring-card { height: 100%; }
.staff-sale-item-empty { opacity: .78; }
.staff-sale-item-icon { width: 1.2rem; text-align: center; }

.flex { gap: .75rem; }
.align-center { align-items: center; }
.spread { justify-content: space-between; }
.center-content { justify-content: center; }
.stack { flex-direction: column; }
.grow { flex-grow: 1; }
.strong { font-weight: 800; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.text-inverse { color: white; }
.text-strong { color: var(--ink); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-end { text-align: right; }
.rounded { border-radius: 12px; }
.round { border-radius: 50%; }
.space-none { margin: 0; }
.space-xxs { margin-bottom: .25rem; }
.space-xs { margin-bottom: .5rem; }
.space-sm { margin-bottom: 1rem; }
.space-lg { margin-bottom: 1.5rem; }
.space-top-sm { margin-top: 1rem; }
.space-top-lg { margin-top: 1.5rem; }
.space-left-xxs { margin-left: .25rem; }
.space-right-xs { margin-right: .5rem; }
.space-right-sm { margin-right: 1rem; }
.pad-none { padding: 0; }
.pad-sm { padding: .5rem; }
.pad-md { padding: 1rem; }
.pad-lg { padding: 1.5rem; }
.pad-xl { padding: 2rem; }
.pad-left-md { padding-left: 1rem; }
.pad-inline-md { padding-inline: 1rem; }
.pad-block-sm { padding-block: .5rem; }
.pad-block-md { padding-block: 1rem; }
.surface-white { background: white; }
.translucent { background: #ffffff22; }
.full-height { height: 100%; }
.d-inline { display: inline; }
.flex-row { flex-direction: row; }
.text-md { font-size: 1rem; }
.center-block { margin-inline: auto; }
.notice__heading { margin-bottom: .4rem; }
.notice__link { color: inherit; font-weight: 750; }
.label-sm { font-size: .78rem; }
.label-md { font-size: 1rem; }
.heading-md { font-size: 1.65rem; }
.heading-sm { font-size: 1.25rem; }

@media (max-width: 880px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .calendar-container { grid-template-columns: repeat(3, 1fr); }
    .span-third, .span-two-thirds { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .site-header { position: static; }
    .site-header__inner { min-height: 68px; flex-wrap: wrap; padding: .7rem 0; }
    .brand { flex: 1 1 auto; }
    .primary-nav { order: 3; width: 100%; margin-left: 0; }
    .user-menu__identity { display: none; }
    .page-shell { width: min(100% - 1rem, 1180px); padding-top: 1rem; }
    .page-heading { align-items: flex-start; border-radius: 18px; }
    .page-heading__icon { width: 48px; border-radius: 14px; }
    .dashboard-grid, .calendar-container { grid-template-columns: 1fr; }
    .section-tabs { grid-template-columns: 1fr; }
    .content-grid { display: block; }
    .span-main, .span-aside, .span-half, .span-third, .span-two-thirds { margin-bottom: .75rem; }
    .record-row .text-end { min-width: 7.5rem; }
    .button-group { display: grid; grid-template-columns: 1fr 1fr; }
}
