:root {
  color-scheme: only light;
  --ink: #182b25;
  --muted: #728079;
  --line: #e5ebe7;
  --canvas: #f5f7f5;
  --paper: #fff;
  --green: #176342;
  --green-dark: #104a31;
  --green-soft: #e9f4ed;
  --orange: #c56b28;
  --red: #b94d42;
  --shadow: 0 16px 42px rgba(30, 52, 42, .055);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.topbar { position: sticky; z-index: 50; top: 0; display: flex; align-items: center; gap: 22px; min-height: 72px; padding: 0 max(24px, calc((100vw - 1220px)/2)); border-bottom: 1px solid rgba(221, 229, 224, .9); background: #fff; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 750; letter-spacing: -.025em; }
.brand-logo { display: block; width: 44px; height: 44px; object-fit: contain; }
.topbar-actions, .heading-actions { display: flex; align-items: center; gap: 14px; }
.topbar-actions { margin-left: auto; }
.app-navigation { position: relative; z-index: 70; flex: 0 0 auto; }
.menu-trigger { display: flex; width: 46px; min-height: 46px; align-items: center; justify-content: center; padding: 0; border: 1px solid #d7e3db; border-radius: 12px; background: #fff; color: #263e32; cursor: pointer; list-style: none; box-shadow: 0 5px 18px rgba(30,52,42,.1); }
.menu-trigger::-webkit-details-marker { display: none; }
.menu-trigger:hover, .app-navigation[open] .menu-trigger { border-color: #bed4c5; background: #f5faf6; }
.menu-glyph { display: flex; width: 18px; flex-direction: column; gap: 4px; }
.menu-glyph i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--green); }
.menu-glyph i:nth-child(2) { width: 13px; }
.menu-panel { position: fixed; z-index: 80; top: 72px; bottom: 12px; left: 12px; width: min(340px, calc(100vw - 28px)); overflow-y: auto; overscroll-behavior: contain; padding: 16px; border: 1px solid #e1e8e3; border-radius: 19px; background: #fff; box-shadow: 0 22px 60px rgba(19,45,32,.22); animation: menu-appear .16s ease-out; }
@keyframes menu-appear { from { opacity: 0; transform: translateX(-10px) scale(.985); } to { opacity: 1; transform: translateX(0) scale(1); } }
.menu-panel-heading { display: flex; align-items: center; justify-content: space-between; margin: 1px 3px 12px; }
.menu-panel-heading > div { display: flex; flex-direction: column; gap: 2px; }
.menu-panel-heading strong { font-size: 19px; letter-spacing: -.03em; }
.menu-panel-mark { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid #ecd28b; border-radius: 13px; background: #fff9e9; color: #78531b; font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.menu-link-list { display: grid; gap: 3px; }
.menu-link { display: flex; min-height: 54px; align-items: center; gap: 11px; padding: 7px 9px; border-radius: 12px; color: #2a3d33; }
.menu-link:hover, .menu-link:focus-visible, .menu-link[aria-current="page"] { outline: 0; background: #f0f7f2; color: var(--green-dark); }
.menu-link[aria-current="page"] { box-shadow: inset 3px 0 #24774e; }
.menu-link-icon { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border: 1px solid #e5eee8; border-radius: 11px; background: #f8fbf9; color: var(--green); font-size: 17px; font-weight: 700; }
.menu-link > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.menu-link strong { font-size: 12px; }
.menu-link small { margin-top: 4px; color: #839088; font-size: 10px; }
.menu-divider { display: flex; align-items: center; gap: 10px; margin: 9px 4px 5px; color: #819087; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.menu-divider::after { height: 1px; flex: 1; background: #e8ede9; content: ""; }
.topbar-actions form { margin: 0; }
.user-profile { display: flex; min-width: 0; align-items: center; gap: 7px; }
.user-profile-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 1px solid #d8e6dc; border-radius: 50%; background: #f3f8f4; color: var(--green); }
.user-profile-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.workspace-switch select { max-width: 210px; border: 0; outline: 0; background: transparent; color: #344940; font-size: 13px; font-weight: 650; }
.workspace-switch .searchable-select-input { width: auto; max-width: 210px; min-height: 36px; padding: 6px 28px 6px 8px; border: 0; background: transparent; color: #344940; font-size: 13px; font-weight: 650; }
.user-chip { color: #617168; font-size: 13px; }
.link-button, .back-link { border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 650; cursor: pointer; }
.page-shell { width: min(1220px, calc(100% - 48px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: 36px 0 72px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(30px, 4vw, 38px); line-height: 1.12; letter-spacing: -.045em; }
h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.page-heading p, .form-intro p { margin-bottom: 0; }
.eyebrow { color: #73837b; font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #fff; box-shadow: 0 5px 12px rgba(23,99,66,.15); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { border-color: #d8e6dc; background: var(--green-soft); color: var(--green-dark); }
.button-quiet { border-color: var(--line); background: #fff; color: #52645a; }
.button-wide { width: 100%; min-height: 47px; }
.today-hero { position: relative; display: flex; min-height: 228px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; margin-bottom: 20px; padding: 30px 36px; border: 1px solid #194e39; border-radius: 24px; background: radial-gradient(ellipse at 88% 5%, rgba(231,194,101,.19), transparent 34%), linear-gradient(118deg, #102f25 0%, #174a34 60%, #1e5a3d 100%); color: #fff; box-shadow: 0 18px 42px rgba(22,65,44,.17); }
.today-hero::before { position: absolute; top: -136px; right: 19%; width: 360px; height: 360px; border: 1px solid rgba(239,216,159,.16); border-radius: 50%; content: ""; box-shadow: 0 0 0 36px rgba(239,216,159,.035), 0 0 0 72px rgba(239,216,159,.025); }
.today-hero-copy, .today-hero-side { position: relative; z-index: 1; }
.today-hero-copy { max-width: 560px; }
.today-overline { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 17px; color: #d6e6da; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.today-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #e3bd63; box-shadow: 0 0 0 4px rgba(227,189,99,.14); }
.today-overline-divider { color: rgba(232,219,181,.52); }
.today-date { margin: 0 0 3px; color: #a8c0b1; font-size: 9px; font-weight: 750; letter-spacing: .18em; }
.today-hero h1 { margin: 0; color: #fff; font-size: clamp(42px, 6vw, 60px); font-weight: 760; letter-spacing: -.065em; line-height: 1; }
.today-title-period { color: #e3bd63; }
.today-intro { max-width: 420px; margin: 10px 0 0; color: #d2e0d7; font-size: 14px; }
.today-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.today-hero-stats a { display: flex; align-items: baseline; gap: 7px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.08); color: #d2e0d7; font-size: 12px; font-weight: 650; text-decoration: none; }
.today-hero-stats a:hover { background: rgba(255,255,255,.15); }
.today-hero-stats strong { color: #f0d487; font-size: 22px; line-height: 1; }
.today-hero-stats a.today-hero-stat-alert { border-color: #f0d487; background: #f0d487; color: #3b2a07; }
.today-hero-stats a.today-hero-stat-alert strong { color: #8a3b12; }
.catalog-flagged-group { padding: 10px 12px; border: 1px solid #f0c98f; border-radius: 14px; background: #fff6e8; }
.catalog-flagged-group h3 { color: #8a3b12; }
.catalog-flagged-group > summary { cursor: pointer; }
.catalog-flagged-group > summary h3 { display: inline; }
.today-hero-side { display: flex; align-items: center; gap: 26px; }
.today-hero-mark { position: relative; display: grid; width: 100px; height: 100px; flex: 0 0 100px; place-items: center; border: 1px solid rgba(236,210,140,.7); border-radius: 50%; color: #f0d487; font-size: 17px; font-weight: 850; letter-spacing: .16em; box-shadow: inset 0 0 0 6px rgba(236,210,140,.07), 0 0 36px rgba(236,210,140,.06); transform: rotate(-10deg); }
.today-hero-mark::before { position: absolute; inset: 7px; border: 1px solid rgba(236,210,140,.38); border-radius: 50%; content: ""; }
.today-hero-mark i { position: absolute; top: 50%; left: 50%; width: 2px; height: 22px; border-radius: 2px; background: #e3bd63; transform-origin: center -10px; }
.today-hero-mark i:nth-of-type(1) { transform: translate(-50%, -100%) rotate(45deg); }
.today-hero-mark i:nth-of-type(2) { transform: translate(-50%, -100%) rotate(90deg); }
.today-hero-mark i:nth-of-type(3) { transform: translate(-50%, -100%) rotate(135deg); }
.today-hero-actions { display: flex; min-width: 180px; flex-direction: column; gap: 9px; }
.button-hero-primary, .button-hero-secondary { justify-content: flex-start; min-height: 45px; padding: 0 14px; border-radius: 12px; }
.button-hero-primary { background: #f1d487; color: #183b2b; box-shadow: 0 7px 18px rgba(11,35,22,.2); }
.button-hero-primary:hover { background: #f7e1a4; }
.button-hero-secondary { border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.1); color: #fff; }
.button-hero-secondary:hover { background: rgba(255,255,255,.17); }
.button-hero-primary > span, .button-hero-secondary > span { font-size: 18px; line-height: 1; }
.recent-sections { display: flex; align-items: center; gap: 10px; margin: -7px 0 20px; overflow: hidden; }
.recent-sections-label { flex: 0 0 auto; color: #687c71; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.recent-sections-links { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.recent-sections-links a { display: inline-flex; min-height: 35px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid #dce8e0; border-radius: 9px; background: #fff; color: #476053; font-size: 12px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.recent-sections-links a:hover { border-color: #a9cdb6; background: var(--green-soft); color: var(--green-dark); }
.recent-sections-links a:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.metric-grid-single { grid-template-columns: minmax(0, 1fr); }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.metric-card { position: relative; min-height: 127px; overflow: hidden; padding: 17px 20px; }
.metric-card::after { position: absolute; right: -23px; bottom: -50px; width: 120px; height: 120px; border: 1px solid rgba(23,99,66,.08); border-radius: 50%; content: ""; box-shadow: 0 0 0 15px rgba(23,99,66,.025), 0 0 0 30px rgba(23,99,66,.018); }
.metric-topline { display: flex; align-items: center; justify-content: space-between; }
.metric-label, .metric-foot { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { position: relative; z-index: 1; display: block; margin: 5px 0 0; font-size: 29px; line-height: 1.2; letter-spacing: -.04em; }
.history-day-link { color: inherit; text-decoration: none; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.history-day-link:hover { border-color: #9bc7aa; box-shadow: 0 10px 24px rgba(23,99,66,.12); transform: translateY(-1px); }
.history-day-link:focus-visible { outline: 3px solid #d6b85e; outline-offset: 3px; }
.history-quick-search { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: end; gap: 10px; margin: 0 0 16px; padding: 14px; border: 1px solid #dfe8e2; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.history-quick-search label { padding-bottom: 11px; color: #31463b; font-size: 12px; font-weight: 750; }
.history-quick-search .button { min-height: 42px; }
.quick-category-filters { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; overflow: hidden; }
.quick-category-filters > span { flex: 0 0 auto; color: #687c71; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.quick-category-filters > div { display: flex; gap: 7px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.quick-category-filters a { display: inline-flex; min-height: 33px; flex: 0 0 auto; align-items: center; padding: 0 11px; border: 1px solid #dce8e0; border-radius: 99px; background: #fff; color: #52695d; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.quick-category-filters a:hover, .quick-category-filters a[aria-current="page"] { border-color: #a9cdb6; background: var(--green-soft); color: var(--green-dark); }
.quick-category-filters a:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.metric-foot { margin-top: 7px; font-size: 11px; }
.metric-icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #e3ebe5; border-radius: 10px; background: #f6faf7; color: var(--green); font-size: 15px; font-weight: 800; }
.metric-arrow { margin-left: 3px; color: #73927f; font-weight: 800; }
.metric-open { border-top: 3px solid #397d58; }
.metric-purchases { border-top: 3px solid #c98d43; }
.metric-highlight { background: linear-gradient(130deg, #eaf4ed, #f2f7f0); border-color: #d5e7db; border-top: 3px solid #c5a34b; }
.metric-highlight .metric-label, .metric-highlight .metric-foot { color: #587765; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(350px, .8fr); align-items: start; gap: 20px; }
.worker-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.id-thumb img { display: block; width: 160px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #dfe5e1); }
.worker-cell-value { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.panel { overflow: hidden; padding: 23px; }
/* An open searchable dropdown must not be clipped by its card or hidden under the next one. */
.panel:has(.searchable-select-input[aria-expanded="true"]) { position: relative; z-index: 40; overflow: visible; }
.daily-chores-panel { margin-bottom: 20px; border-color: #cde0d3; }
.daily-chores-intro { margin: -7px 0 15px; }
.item-flag-panel { margin-bottom: 18px; border-color: #f0c98f; background: #fffaf2; }
.item-flag-panel summary { cursor: pointer; }
.item-flag-form { display: grid; gap: 10px; margin-top: 12px; max-width: 520px; }
.item-flag-form label { display: grid; gap: 4px; font-weight: 650; }
.daily-chore-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.daily-chore-summary-card { display: flex; min-height: 112px; flex-direction: column; justify-content: center; padding: 17px 19px; border: 1px solid #d9e8de; border-radius: 14px; background: #f8fcf9; transition: transform .16s ease, border-color .16s ease; }
.daily-chore-summary-card:hover { border-color: #aacbb6; transform: translateY(-2px); }
.daily-chore-summary-card span, .daily-chore-summary-card small { color: var(--muted); font-size: 12px; font-weight: 650; }
.daily-chore-summary-card strong { margin: 1px 0; color: var(--green-dark); font-size: 32px; line-height: 1.15; }
.daily-chore-summary-pending { border-color: #f0dfcd; background: #fffaf5; }
.daily-chore-summary-pending strong { color: #a75d2e; }
.daily-chore-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.daily-chore-filters a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #617168; font-size: 13px; font-weight: 700; }
.daily-chore-filters a:hover, .daily-chore-filters a[aria-current="page"] { border-color: #b9d5c3; background: var(--green-soft); color: var(--green-dark); }
.daily-chore-list { display: flex; flex-direction: column; gap: 10px; }
.daily-chore-row { display: flex; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.daily-chore-row:first-child { border-top: 0; padding-top: 0; }
.daily-chore-row:has(.task-manage) { flex-wrap: wrap; }
.task-manage { flex-basis: 100%; }
.task-manage summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.task-manage[open] { display: grid; gap: 12px; }
.daily-chore-copy { display: flex; flex: 1 1 190px; flex-direction: column; gap: 4px; min-width: 0; }
.daily-chore-entry-form { display: flex; flex: 2 1 480px; align-items: center; gap: 8px; }
.daily-chore-entry-form select { width: 145px; }
.daily-chore-entry-form input, .daily-chore-entry-form textarea { min-width: 120px; flex: 1; }
.daily-chore-entry-form textarea { min-height: 37px; resize: vertical; }
.daily-chore-entry-form .daily-chore-photo-input { display: inline-flex; width: auto; min-width: max-content; height: 37px; align-items: center; gap: 5px; padding: 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
.daily-chore-photo-input input { position: absolute; width: 1px; min-width: 1px; height: 1px; opacity: 0; }
.daily-chore-proof { display: flex; flex-wrap: wrap; gap: 7px; }
.daily-chore-proof a { font-size: 12px; }
.featured-chores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.featured-chore { padding: 6px 11px; border: 1px solid #e3ece6; border-left: 4px solid #c9d3cd; border-radius: 9px; font-size: 13px; }
.featured-chore-completed { border-left-color: #2e8b62; }
.featured-chore-not_completed, .featured-chore-pending { border-left-color: #d98b3a; }
.daily-chore-audit { white-space: nowrap; }
.today-panel { border-radius: 19px; }
.open-requirements-panel { margin-bottom: 20px; }
.requirement-estimate-summary { margin: 5px 0 0; }
.requirement-share-header-form { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.requirement-share-header-form input { min-width: 0; flex: 1; }
.requirement-share-header-form .button { min-height: 34px; flex: 0 0 auto; padding: 0 10px; font-size: 11px; }
.requirement-share { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 560px; margin: 0 auto; padding: 10px 12px 10px 16px; border: 1px solid #cfe2d5; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(20, 40, 30, .18); }
.requirement-share[hidden] { display: none; }
.requirement-share-actions { display: flex; gap: 8px; }
.requirement-share .button { min-height: 34px; flex: 0 0 auto; padding: 0 12px; font-size: 12px; }
.requirement-share-select { display: grid; width: 32px; min-height: 32px; align-self: stretch; place-items: center; cursor: pointer; }
.requirement-share-select input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); cursor: pointer; }
.requirement-estimate { color: #5c7465; font-size: 10px; font-weight: 750; }
.requirement-edited { padding: 2px 6px; border-radius: 7px; background: #f0f3f1; color: #596d61; font-size: 10px; font-weight: 750; white-space: nowrap; }
.purchase-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.purchase-summary-metrics .metric-highlight { grid-column: auto; }
.credit-amount, .metric-card .credit-amount, .metric-foot .credit-amount { color: var(--orange); }
.vendor-credit-panel { margin-bottom: 20px; }
.vendor-credit-panel .panel-heading p { margin: 5px 0 0; }
.vendor-credit-list { display: flex; flex-direction: column; }
.vendor-credit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid #eef1ef; }
.vendor-credit-row:first-child { border-top: 0; }
.vendor-credit-row > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.vendor-credit-row > div:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-credit-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 14px; }
.vendor-credit-actions > strong { color: #8c453d; font-size: 15px; }
.vendor-credit-actions .button { min-height: 34px; padding: 0 12px; font-size: 11px; }
.purchase-activity-panel { margin-bottom: 20px; }
.purchase-activity-heading { align-items: flex-start; gap: 14px; }
.purchase-tabs { display: flex; gap: 4px; margin: 0 -2px 14px; padding: 4px; overflow-x: auto; border: 1px solid #dbe8df; border-radius: 11px; background: #f6faf7; scrollbar-width: thin; }
.purchase-tab { display: inline-flex; min-height: 40px; flex: 1 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #52645a; cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; white-space: nowrap; }
.purchase-tab span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 99px; background: #e6eee9; color: #5a7062; font-size: 10px; }
.purchase-tab[aria-selected="true"] { background: #fff; color: var(--green-dark); box-shadow: 0 1px 5px rgba(22, 65, 44, .12); }
.purchase-tab[aria-selected="true"] span { background: #e2f0e6; color: var(--green); }
.purchase-tab:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.catalog-tabs { display: flex; gap: 4px; margin: 0 -2px 18px; padding: 4px; overflow-x: auto; border: 1px solid #dbe8df; border-radius: 11px; background: #f6faf7; scrollbar-width: thin; }
.catalog-tab { display: inline-flex; min-height: 40px; flex: 1 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: 8px; color: #52645a; font-size: 12px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.catalog-tab span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 99px; background: #e6eee9; color: #5a7062; font-size: 10px; }
.catalog-tab[aria-selected="true"] { background: #fff; color: var(--green-dark); box-shadow: 0 1px 5px rgba(22, 65, 44, .12); }
.catalog-tab[aria-selected="true"] span { background: #e2f0e6; color: var(--green); }
.catalog-tab:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.category-group { margin-top: 18px; }
.category-group:first-child { margin-top: 0; }
.category-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 7px; border-bottom: 1px solid #dfe8e2; }
.category-group-heading h3 { margin: 0; color: #496257; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.category-group-heading .requirement-share-select + h3 { flex: 1; }
.open-requirements-panel .category-group, .upcoming-panel .category-group { margin-top: 15px; padding: 0 14px 5px; border: 1px solid #d9e8de; border-radius: 15px; background: #fbfdfb; box-shadow: 0 5px 14px rgba(30,52,42,.035); }
.open-requirements-panel .category-group:first-child, .upcoming-panel .category-group:first-child { margin-top: 0; }
.open-requirements-panel .category-group-heading, .upcoming-panel .category-group-heading { margin: 0 -14px; padding: 11px 14px; border-bottom: 2px solid #c7dece; border-radius: 14px 14px 0 0; background: #edf7f0; }
.open-requirements-panel .category-group-heading h3, .upcoming-panel .category-group-heading h3 { color: var(--green-dark); font-size: 12px; letter-spacing: .09em; }
.open-requirements-panel .category-group-heading .count-pill, .upcoming-panel .category-group-heading .count-pill { border: 1px solid #cce0d2; background: #fff; color: var(--green-dark); }
.open-requirements-panel .category-group .requirement-row:first-child, .upcoming-panel .category-group .requirement-row:first-child { border-top: 0; }
.count-pill { display: inline-grid; min-width: 27px; height: 27px; place-items: center; padding: 0 7px; border-radius: 8px; background: #f0f3f1; color: #52645a; font-size: 12px; font-weight: 700; }
.requirement-list, .purchase-list { display: flex; flex-direction: column; }
.requirement-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) auto auto; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #eef1ef; }
.requirement-detail-link { text-decoration: underline; text-decoration-color: #c6d5cc; text-underline-offset: 3px; }
.requirement-detail-link:hover { color: var(--green); }
.requirement-purchase-cta { display: inline-grid; width: 24px; height: 24px; place-items: center; flex: 0 0 24px; border: 1px solid #c9dfd1; border-radius: 50%; background: #edf6f0; color: var(--green); font-size: 14px; font-weight: 800; line-height: 1; text-decoration: none; transition: background .16s ease, color .16s ease, transform .16s ease; }
@media (hover: hover) { .requirement-purchase-cta:hover { transform: translateY(-1px); background: var(--green); color: #fff; } }
.requirement-purchase-cta:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.requirement-skip-form, .heading-actions form { margin: 0; }
.requirement-skip-cta { display: inline-grid; width: 24px; height: 24px; place-items: center; padding: 0; border: 1px solid #ebd9d3; border-radius: 50%; background: #fff8f6; color: #9b5949; font-size: 19px; font-weight: 500; line-height: 1; cursor: pointer; }
.requirement-skip-cta:hover, .requirement-skip-cta:focus-visible { border-color: #d8a697; background: #f9eae5; color: #813d30; }
.button-danger-quiet { border-color: #ead5ce; background: #fff8f6; color: #8f4e40; }
.button-danger-quiet:hover { background: #f9eae5; }
.row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 4px; }
.row-title strong, .purchase-description strong { font-size: 13px; }
/* Requirement rows: name and badges first, then the purchase/skip icons as one group on the same line. */
.row-title > .priority, .row-title > .requirement-edited { order: 1; flex-shrink: 0; }
.row-title > .requirement-purchase-cta, .row-title > .requirement-skip-form { order: 2; flex-shrink: 0; }
.row-title > .requirement-purchase-cta:first-of-type { margin-left: 8px; }
.row-title:has(> .requirement-purchase-cta) { flex-wrap: nowrap; }
.purchase-rate { margin-left: 7px; color: #5c7465; font-size: 10px; font-weight: 750; white-space: nowrap; }
.small { font-size: 11px; }
.priority { padding: 2px 7px; border-radius: 99px; background: #f2f4f3; color: #66766e; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.priority-normal { background: var(--green-soft); color: var(--green); }
.priority-high { background: #fff0e6; color: #ae5c25; }
.priority-urgent { background: #fde8e6; color: #b42318; }
.priority-slider { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.priority-slider input[type="range"] { width: 52px; height: 14px; margin: 0; accent-color: #66766e; cursor: pointer; }
.priority-slider.priority-normal input[type="range"] { accent-color: var(--green); }
.priority-slider.priority-high input[type="range"] { accent-color: #ae5c25; }
.priority-slider.priority-urgent input[type="range"] { accent-color: #b42318; }
.priority-slider span { min-width: 44px; }
.priority-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #66766e; }
.priority-dot-normal { background: var(--green); }
.priority-dot-high { background: #ae5c25; }
.priority-dot-urgent { background: #b42318; }
.quick-category-filters a small { margin-left: 5px; color: var(--muted); font-size: .85em; font-weight: 600; }
@media (max-width: 640px) { .priority-slider span { display: none; } .priority-slider input[type="range"] { width: 46px; } }
.quantity-block { display: flex; flex-direction: column; text-align: right; white-space: nowrap; }
.quantity-block strong { font-size: 12px; }
.status { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 8px; background: #fff4e8; color: #a4612c; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-partially_purchased { background: #eaf2fc; color: #426797; }
.status-purchased { background: var(--green-soft); color: var(--green); }
.status-skipped { background: #f2f3f3; color: #718078; }
.purchase-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid #eef1ef; }
.purchase-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; background: #f0f5f1; color: var(--green); font-size: 13px; font-weight: 750; }
.purchase-description { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.purchase-description strong, .purchase-description span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase-cost { font-size: 12px; white-space: nowrap; }
.inline-empty { display: flex; align-items: center; gap: 12px; padding: 22px 0 10px; border-top: 1px solid #eef1ef; }
.inline-empty strong { font-size: 13px; }
.inline-empty p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.check-icon, .bag-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; background: var(--green-soft); color: var(--green); font-size: 17px; font-weight: 700; }
.bag-icon { background: #f3f5f4; color: #718078; }
.back-link { display: inline-block; margin-bottom: 22px; padding: 0; }
.form-layout { max-width: 720px; margin: 4px auto 0; }
.form-intro { margin-bottom: 20px; }
.form-intro h1 { margin-top: 7px; }
.catalog-shortcut { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: -4px 0 18px; padding: 12px 14px; border: 1px solid #dfe9e2; border-radius: 12px; background: #f9fcfa; }
.catalog-shortcut .button { min-height: 36px; padding: 0 12px; }
.form-panel { padding: 26px; }
.stack-form { display: flex; flex-direction: column; gap: 16px; }
.purchase-batch-layout { max-width: 790px; }
.purchase-batch-section { display: grid; gap: 15px; }
.purchase-step-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.purchase-step-heading > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #eadba9; border-radius: 12px; background: #fff9e8; color: #785d20; font-size: 11px; font-weight: 850; }
.purchase-step-heading h2 { margin: 0; font-size: 17px; }
.purchase-step-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.purchase-receipt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.purchase-items-section { padding-top: 20px; border-top: 1px solid var(--line); }
.purchase-entry-lines { display: grid; gap: 11px; }
.purchase-entry-line { display: grid; gap: 10px; padding: 14px; border: 1px solid #e5ebe7; border-radius: 15px; background: linear-gradient(145deg, #fff, #fbfcfb); }
.purchase-entry-line[hidden], .purchase-vendor-card[hidden] { display: none; }
.purchase-entry-line-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid #edf1ee; }
.purchase-entry-line-heading strong { color: #31463b; font-size: 12px; }
.purchase-quick-item { display: grid; gap: 10px; margin-top: 9px; padding: 12px; border: 1px solid #cfe2d6; border-radius: 12px; background: #f4faf6; }
.purchase-quick-item[hidden] { display: none; }
.purchase-quick-item > div:first-child > strong { color: #24583d; font-size: 13px; }
.purchase-quick-item .help-text { margin: 3px 0 0; }
.purchase-quick-item fieldset { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(140px, .8fr) minmax(150px, .8fr) auto; align-items: end; gap: 8px; min-width: 0; padding: 0; border: 0; }
.purchase-quick-item fieldset label { display: grid; gap: 4px; color: #475b50; font-size: 11px; font-weight: 650; }
.purchase-unplanned-toggle { display: flex !important; align-items: center; gap: 8px; margin: 4px 0 0; color: #55685e; font-size: 12px; font-weight: 600; cursor: pointer; }
.purchase-unplanned-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.purchase-credit-toggle { display: flex; align-items: flex-start; gap: 10px; margin: -2px 0 2px; padding: 12px 13px; border: 1px solid #cfe2d6; border-radius: 11px; background: #f4faf6; color: #24583d; cursor: pointer; }
.purchase-credit-toggle input { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; accent-color: var(--green); }
.purchase-credit-toggle span { display: grid; gap: 3px; }
.purchase-credit-toggle strong { font-size: 12px; }
.purchase-credit-toggle small { color: var(--muted); font-size: 10px; font-weight: 500; }
.searchable-select-add-item { color: #176343; font-weight: 700; }
.searchable-select-add-item:hover, .searchable-select-add-item[aria-selected="true"] { background: #eaf4ee; color: #124d32; }
.purchase-remove-line { color: #9c5148; font-size: 11px; }
.purchase-remove-line:disabled { color: #a4aea8; cursor: not-allowed; }
.purchase-delete-marker { display: none; }
.purchase-add-line { justify-self: start; }
.purchase-quantity-unit { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; }
.purchase-pricing-field { display: grid; grid-template-columns: auto minmax(130px, 1fr); align-items: end; gap: 8px 12px; padding: 10px 12px; border: 1px solid #e8eee9; border-radius: 11px; background: #f9fbf9; }
.purchase-pricing-heading { display: flex; min-height: 43px; flex-direction: column; justify-content: center; gap: 4px; }
.purchase-pricing-heading > span { color: #31463b; font-size: 11px; font-weight: 750; }
.purchase-price-toggle { display: inline-flex; width: fit-content; padding: 2px; border: 1px solid #dfe8e2; border-radius: 8px; background: #fff; }
.purchase-price-toggle button { min-height: 27px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: #63736a; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.purchase-price-toggle button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-dark); box-shadow: inset 0 0 0 1px #d6e8db; }
.purchase-price-input .form-control { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
.purchase-price-hint { grid-column: 1 / -1; margin: -3px 0 0; color: var(--muted); font-size: 10px; }
.purchase-extra-fields { border-top: 1px solid #edf1ee; padding-top: 8px; }
.purchase-extra-fields summary { display: flex; align-items: center; gap: 8px; color: #52645a; cursor: pointer; font-size: 11px; font-weight: 700; list-style-position: inside; }
.purchase-extra-fields summary span { color: #8b9891; font-size: 10px; font-weight: 500; }
.purchase-extra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 11px; }
.purchase-notes-field { grid-column: 1 / -1; }
.purchase-extra-grid textarea.form-control { min-height: 60px; }
.purchase-price-input[hidden] { display: none; }
.purchase-delete-line { display: flex; align-items: center; gap: 8px; color: #9b463e; font-size: 11px; font-weight: 700; }
.purchase-delete-line input { accent-color: #a83f35; }
.purchase-deleted-history { margin-top: 15px; }
.purchase-deleted-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 11px 12px; border: 1px solid #edc9c4; border-radius: 10px; background: #fff0ed; color: #70423e; }
.purchase-deleted-row > div { display: flex; min-width: 0; flex-direction: column; }
.purchase-deleted-row > div > span { color: #8b6d69; font-size: 10px; }
.purchase-deleted-row > strong { white-space: nowrap; }
.purchase-restore-button { min-height: 30px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
.history-primary form { margin-top: 8px; }
.purchase-line-deleted { background: #fff2ef; box-shadow: inset 4px 0 #c87970; }
.history-row.purchase-line-deleted, .detail-purchase-row.purchase-line-deleted { padding-right: 14px; padding-left: 18px; border-radius: 0 10px 10px 0; }
.purchase-deleted-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; background: #f5d9d5; color: #963e36; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.purchase-batch-actions { justify-content: flex-end; padding-top: 17px; border-top: 1px solid var(--line); }
.purchase-vendor-card { padding: 19px; }
.purchase-vendor-card .form-fieldset { display: grid; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.form-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field label { color: #31463b; font-size: 12px; font-weight: 700; }
.required-mark { margin-left: 3px; color: var(--red); }
.form-control { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dce4df; border-radius: 9px; outline: none; background: #fff; color: var(--ink); font-size: 13px; }
.form-control:focus { border-color: #67a785; box-shadow: 0 0 0 3px rgba(53,135,91,.12); }
.searchable-select { position: relative; width: 100%; }
.searchable-select::after { position: absolute; top: 17px; right: 14px; width: 8px; height: 8px; border-right: 2px solid #344940; border-bottom: 2px solid #344940; content: ""; pointer-events: none; transform: rotate(45deg); }
.searchable-select-input { width: 100%; min-height: 44px; padding: 10px 38px 10px 12px; border: 1px solid #dce4df; border-radius: 9px; outline: none; background: #fff; color: var(--ink); font-size: 13px; }
.searchable-select-input:focus { border-color: #67a785; box-shadow: 0 0 0 3px rgba(53,135,91,.12); }
.searchable-select-options { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; left: 0; max-height: 240px; overflow: auto; padding: 5px; border: 1px solid #dce4df; border-radius: 9px; background: #fff; box-shadow: 0 10px 24px rgba(27, 44, 35, .16); }
.searchable-select-option { display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.searchable-select-option:hover, .searchable-select-option[aria-selected="true"] { background: var(--green-soft); color: #244936; }
.searchable-select-option[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.searchable-select-heading { padding: 8px 11px 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.searchable-select-empty { padding: 10px 11px; color: var(--muted); font-size: 12px; }
.searchable-select-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
input.quantity-input { appearance: textfield; -moz-appearance: textfield; }
input.quantity-input::-webkit-inner-spin-button, input.quantity-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
textarea.form-control { min-height: 82px; resize: vertical; }
.file-input { padding: 8px; }
.help-text { color: var(--muted); font-size: 11px; }
.field-error, .form-error { color: var(--red); font-size: 12px; }
.form-error { padding: 10px 12px; border: 1px solid #f2d5d1; border-radius: 8px; background: #fff5f3; }
.location-capture-status { display: inline-flex; width: 38px; height: 28px; align-items: center; justify-content: center; margin: 0; border: 1px solid #ead8a6; border-radius: 999px; background: #fff9e9; color: #73551b; font-size: 13px; font-weight: 800; letter-spacing: -.05em; cursor: help; }
.location-capture-status[data-state="granted"], .location-capture-status[data-state="saving"] { border-color: #cfe2d6; background: #f0f7f2; color: #24583d; }
.location-capture-status[data-state="blocked"] { border-color: #f2d5d1; background: #fff5f3; color: #9e4139; }
.location-capture-status[hidden] { display: none; }
.form-error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.form-error-summary li + li { margin-top: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.submit-loading-status { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--muted); font-size: 12px; font-weight: 700; }
.submit-loading-status::before { width: 13px; height: 13px; border: 2px solid #b8c9be; border-top-color: var(--green); border-radius: 50%; content: ''; animation: submit-loading-spin .7s linear infinite; }
@keyframes submit-loading-spin { to { transform: rotate(360deg); } }
.history-filters { margin-bottom: 18px; }
.history-filters-summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; touch-action: manipulation; }
.history-filters-summary::-webkit-details-marker { display: none; }
.history-filters-summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.history-filters-summary strong { color: var(--green-dark); font-size: 15px; }
.history-filters-toggle { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; color: var(--green); font-size: 12px; font-weight: 750; }
.history-filters-toggle::before { display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.history-filters-toggle::after { content: "Show filters"; }
.history-filters[open] .history-filters-summary { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.history-filters[open] .history-filters-toggle::before { transform: rotate(225deg) translateY(-1px); }
.history-filters[open] .history-filters-toggle::after { content: "Hide filters"; }
.catalog-form-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, .85fr); align-items: start; gap: 16px; margin-bottom: 18px; }
.vendor-form-actions { display: flex; align-items: center; gap: 8px; }
.vendor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vendor-card { display: flex; flex-direction: column; min-width: 0; }
.vendor-card .panel-heading { gap: 10px; margin-bottom: 12px; }
.vendor-card .panel-heading h2 { margin-top: 4px; }
.vendor-contact { margin: -4px 0 9px; color: #31463b; font-size: 13px; font-weight: 650; }
.vendor-detail { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0; font-size: 12px; }
.vendor-detail a { overflow-wrap: anywhere; }
.vendor-open, .vendor-closed { font-weight: 700; }
.vendor-open { color: var(--green); }
.vendor-closed { color: var(--red); }
.vendor-paid { color: var(--green); }
.vendor-due { color: var(--red); font-weight: 700; }
.vendor-card[hidden] { display: none; }
.vendor-search { margin: 18px 0 14px; }
div[id$="off_days"] { display: flex; flex-wrap: wrap; gap: 6px 14px; }
div[id$="off_days"] label { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.vendor-phone-list { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.vendor-address { margin: 7px 0; color: #52645a; font-size: 12px; }
.vendor-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.vendor-footer > span { display: flex; flex-direction: column; }
.vendor-footer strong { font-size: 14px; }
.vendor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; font-size: 12px; }
.vendor-actions .vendor-call { min-height: 32px; padding: 0 12px; font-size: 12px; text-decoration: none; }
.vendor-archived { opacity: .72; }
.catalog-side-forms { display: flex; flex-direction: column; gap: 16px; }
.catalog-form-card { padding: 21px; }
.catalog-current { margin-top: 18px; }
.catalog-search-sticky { position: sticky; z-index: 35; top: 72px; margin: -10px 0 18px; padding: 10px 0; background: rgba(245,247,245,.94); backdrop-filter: blur(12px); }
.catalog-search-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 14px; margin: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 8px 22px rgba(30,52,42,.07); }
.catalog-search-field label { grid-column: 1; }
.catalog-search-field .form-control { grid-column: 1; }
.catalog-search-field .help-text { grid-column: 2; grid-row: 2; }
.catalog-search-field label { color: #31463b; font-size: 12px; font-weight: 700; }
.catalog-search-field .catalog-variance-filter { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.catalog-list { display: flex; flex-direction: column; }
.catalog-category-group + .catalog-category-group { margin-top: 17px; }
.catalog-category-group h3 { margin: 0; padding: 10px 0 6px; color: #52645a; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.catalog-row { touch-action: pan-y; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #eef1ef; }
.catalog-row[hidden] { display: none; }
.catalog-row > div { display: flex; flex-direction: column; }
.catalog-row-actions { display: flex; align-items: center; gap: 16px; }
.catalog-rate-note { max-width: 620px; margin: 7px 0 0; }
.catalog-metric-row { gap: 22px; }
.catalog-item-main { min-width: 190px; }
.catalog-item-main strong a { color: var(--green); text-decoration: underline; text-decoration-color: #b9d7c4; text-underline-offset: 3px; }
.catalog-item-main strong a:hover { text-decoration-color: currentColor; }
.catalog-purchase-metrics { min-width: 360px; flex: 1; flex-direction: row !important; align-items: stretch; gap: 20px; }
.catalog-purchase-metrics > span { display: flex; min-width: 145px; flex-direction: column; justify-content: center; }
.catalog-purchase-metrics > span + span { padding-left: 20px; border-left: 1px solid var(--line); }
.catalog-purchase-metrics small { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.catalog-purchase-metrics b { color: var(--green-dark); }
.catalog-detail-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.catalog-detail-metrics .metric-card { display: flex; min-height: 132px; flex-direction: column; justify-content: center; }
.catalog-detail-metrics .metric-card small { color: inherit; font-size: .58em; }
.catalog-chart-panel, .catalog-recent-purchases { margin-top: 18px; }
.catalog-chart-wrap { position: relative; width: 100%; min-height: 240px; margin-top: 13px; }
.catalog-chart-wrap canvas { display: block; width: 100%; min-height: 240px; }
.catalog-chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0 0 45px; color: var(--muted); font-size: 12px; }
.catalog-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.catalog-chart-legend i { display: inline-block; width: 16px; height: 8px; border-radius: 2px; }
.catalog-legend-quantity { background: #86bd9e; }
.catalog-legend-rate { height: 3px !important; background: #c56b28; }
.catalog-edit-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.catalog-row-highlight { border-radius: 8px; background: var(--green-soft); outline: 2px solid #b9d7c4; outline-offset: -2px; }
.catalog-no-results { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.catalog-name-autocomplete { position: relative; }
.catalog-name-suggestions { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; left: 0; max-height: 240px; overflow: auto; padding: 5px; border: 1px solid #dce4df; border-radius: 9px; background: #fff; box-shadow: 0 10px 24px rgba(27, 44, 35, .16); }
.catalog-name-suggestion { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.catalog-name-suggestion:hover, .catalog-name-suggestion:focus-visible { background: var(--green-soft); }
.catalog-name-suggestion strong { font-size: 13px; }
.catalog-name-suggestion span, .catalog-name-no-match { color: var(--muted); font-size: 11px; }
.catalog-name-no-match { padding: 10px; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.record-list { display: flex; flex-direction: column; margin-top: 14px; }
.record-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid #eef1ef; }
.record-row > div:first-child { min-width: 0; }
.row-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; }
.row-actions form { margin: 0; }
.compact-list { margin: 7px 0 0; padding-left: 20px; color: #52645a; font-size: 12px; }
.inline-form { margin: 0 0 14px; }
.inline-form-row { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; }
.filter-form > label { display: flex; flex-direction: column; gap: 6px; color: #31463b; font-size: 12px; font-weight: 700; }
.filter-form { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)) auto; align-items: end; gap: 12px; }
.history-view-option label { color: var(--green-dark); }
.history-view-option .form-control { border-color: #c7ded0; background: #f8fcf9; }
.filter-actions { display: flex; gap: 8px; }
.history-metrics { margin-bottom: 18px; }
.history-results { padding-bottom: 12px; }
.history-export-status { align-self: center; color: #5c7465; font-size: 11px; }
.history-export-button.is-loading { cursor: wait; opacity: .72; }
.history-export-button.is-loading::before { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; vertical-align: -1px; animation: history-export-spin .7s linear infinite; }
@keyframes history-export-spin { to { transform: rotate(360deg); } }
.recently-recorded-panel { margin-bottom: 20px; border-color: #eadbb4; background: #fffdf7; }
.recently-recorded-intro { max-width: 720px; margin: -7px 0 10px; font-size: 12px; }
.recently-recorded-list { display: flex; flex-direction: column; margin-bottom: 9px; }
.recently-recorded-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 18px; padding: 12px 0; border-top: 1px solid #f0ead7; }
.recently-recorded-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.recently-recorded-copy strong { font-size: 13px; }
.recently-recorded-timing { color: #7b6e54; font-size: 11px; font-weight: 650; }
.recently-recorded-row .purchase-cost { color: #875d21; }
.today-purchases-note { margin: 3px 0 0; font-size: 11px; }
.history-backdated-note { color: #956427; font-size: 11px; font-weight: 700; }
.history-category-group { margin-top: 24px; padding: 0 16px 4px; border: 1px solid #dbe8df; border-radius: 15px; background: #fbfdfb; }
.history-category-group:first-of-type { margin-top: 0; }
.history-category-group .category-group-heading { margin: 0 -16px; padding: 11px 16px; border-bottom: 2px solid #c7dece; border-radius: 14px 14px 0 0; background: #edf7f0; }
.category-group-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.category-group-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 1px solid #c6dfcf; border-radius: 8px; background: #fff; color: var(--green); font-size: 15px; line-height: 1; }
.category-group-kicker { display: block; margin-bottom: 1px; color: #6a8173; font-size: 9px; font-weight: 800; letter-spacing: .13em; line-height: 1.1; text-transform: uppercase; }
.history-category-group .category-group-heading h3 { color: var(--green-dark); font-size: 13px; letter-spacing: .06em; }
.history-category-group .count-pill { border: 1px solid #cce0d2; background: #fff; color: var(--green-dark); }
.history-list { display: flex; flex-direction: column; }
.history-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 6px 18px; padding: 15px 0; border-top: 1px solid #eef1ef; }
.history-primary { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.history-primary .row-title { margin-bottom: 0; }
.history-rate-badge { padding: 3px 6px; border: 1px solid #d6e4db; border-radius: 4px; background: #f7fbf8; color: #506b5b; font-size: 10px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.ledger-table td { padding: 10px; border-bottom: 1px solid #eef1ef; vertical-align: top; white-space: nowrap; }
.ledger-table tr:last-child td { border-bottom: 0; }
.ledger-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table .purchase-variance { display: block; width: fit-content; margin: 4px 0 0 auto; }
.purchase-variance { display: inline-block; padding: 3px 6px; border: 1px solid; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.purchase-average-rate { display: inline-block; padding: 3px 6px; border: 1px solid #cbded3; border-radius: 4px; background: #f0f8f3; color: #316449; font-size: 10px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.purchase-variance-high { color: #9a2f1d; border-color: #f0c4bc; background: #fff1ee; }
.purchase-variance-medium { color: #9a5718; border-color: #f0d1ae; background: #fff3e8; }
.purchase-variance-low { color: #176348; border-color: #b9dfc9; background: #eaf7ef; }
.purchase-variance-none { color: #66736d; border-color: #dce3df; background: #f7f9f8; }
.catalog-item-history-link:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.catalog-item-history-link:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.history-row-actions { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 2px; }
.history-row-actions .text-link { font-weight: 700; }
.history-cost { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.history-cost strong { font-size: 13px; }
.receipt-actions { grid-column: 1 / -1; margin-top: 5px; }
.receipt-actions summary { display: inline-flex; align-items: center; gap: 7px; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.receipt-actions summary::-webkit-details-marker { display: none; }
.receipt-actions summary::before { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: rotate(-45deg); transition: transform .15s ease; }
.receipt-actions[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.receipt-actions summary span { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 5px; background: #eaf2ed; color: #486156; font-size: 10px; }
.history-receipts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.receipt-links { display: inline-flex; align-items: center; gap: 5px; padding: 3px; border: 1px solid #dce8e0; border-radius: 9px; background: #fff; }
.receipt-number { display: inline-grid; width: 19px; height: 19px; place-items: center; color: #61786b; font-size: 10px; font-weight: 800; }
.receipt-icon-action { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid #cfe1d6; border-radius: 7px; background: #f6fbf8; color: var(--green); }
.receipt-icon-action:hover { border-color: #9fc8ad; background: var(--green-soft); color: var(--green-dark); }
.receipt-icon-action:focus-visible { outline: 3px solid #d6b85e; outline-offset: 2px; }
.receipt-icon-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.requirement-detail-list { display: flex; flex-direction: column; gap: 16px; }
.requirement-detail-card { padding-bottom: 18px; }
.requirement-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; }
.requirement-metrics .metric-card { min-height: 105px; padding: 15px; }
.requirement-metrics .metric-card strong { font-size: 21px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-section-heading h3 { margin: 0; font-size: 15px; }
.detail-purchase-list { display: flex; flex-direction: column; }
.detail-purchase-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 13px 0; border-top: 1px solid #eef1ef; }
.detail-purchase-row > div:first-child, .detail-purchase-cost { display: flex; flex-direction: column; }
.detail-purchase-cost { align-items: flex-end; white-space: nowrap; }
.detail-empty { margin: 12px 0 0; }
.text-link { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.field-invalid .form-control { border-color: #d99188; }
.messages { margin: -18px 0 18px; }
.draft-status { align-items: center; background: #f2f7f4; border: 1px solid #d7e7de; border-radius: 0.75rem; color: #355a49; display: flex; font-size: 0.9rem; gap: 1rem; justify-content: space-between; padding: 0.7rem 0.9rem; }
.draft-files { align-items: center; color: #536d60; display: flex; flex-wrap: wrap; font-size: 0.9rem; gap: 0.75rem; margin: -0.35rem 0 0.5rem; }
.draft-list { display: grid; gap: 0.75rem; }
.draft-card { align-items: center; border: 1px solid var(--line, #dfe8e3); border-radius: 1rem; display: flex; gap: 1.25rem; justify-content: space-between; padding: 1.2rem; }
.draft-card h2 { font-size: 1.2rem; margin: 0.25rem 0; }
.draft-card p { margin: 0; }
.message { padding: 11px 14px; border-radius: 9px; background: #eaf4ed; color: var(--green-dark); font-size: 13px; }
.message-warning { background: #fff4df; color: #7a4a00; }
.message-error { background: #fdecea; color: var(--red); }
.unit-mismatch { color: var(--red); font-weight: 600; }
/* Keep a focused field (and the browser's "fill in this field" bubble) clear of the sticky top bar. */
input, select, textarea { scroll-margin-top: 96px; }
.auth-wrap { display: grid; min-height: 68vh; place-items: center; }
.auth-card { width: min(420px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 17px; }
.auth-brand-logo { display: block; width: 138px; height: 138px; object-fit: contain; }
.auth-card h1 { margin-top: 8px; font-size: 30px; }
.auth-card .stack-form { margin-top: 24px; }
.empty-state { display: flex; min-height: 55vh; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.setup-state { max-width: 480px; margin: auto; }
.setup-state h1 { margin: 14px 0 8px; font-size: 29px; }
.setup-state p { margin-bottom: 18px; color: var(--muted); }
.empty-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--green-soft); color: var(--green); font-size: 29px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); border: 0; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .daily-chore-summary { grid-template-columns: 1fr; } .daily-chore-row, .daily-chore-entry-form { align-items: stretch; flex-direction: column; } .daily-chore-entry-form select { width: 100%; } .daily-chore-audit { white-space: normal; } }
@media (max-width: 640px) {
  .workers-table, .workers-table tbody, .workers-table tr, .workers-table td { display: block; width: 100%; }
  .workers-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .workers-table tr { margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .workers-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 0; border: 0; text-align: right; }
  .workers-table td::before { content: attr(data-label); flex: 0 0 39%; color: var(--muted); font-size: 11px; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
  .workers-table .worker-cell-value { min-width: 0; flex: 1; }
  .workers-table td[data-label=""] { justify-content: stretch; padding-top: 10px; }
  .workers-table td[data-label=""]::before { display: none; }
  .workers-table td[data-label=""] .button { width: 100%; justify-content: center; }
  .draft-card { align-items: stretch; flex-direction: column; }
  .draft-card .row-actions { justify-content: flex-start; }
  .catalog-search-sticky { top: 60px; margin: -8px 0 13px; padding: 8px 0; }
  .catalog-search-field { grid-template-columns: minmax(0, 1fr); }
  .catalog-search-field .help-text { grid-column: 1; grid-row: auto; }
  .catalog-search-field .catalog-variance-filter { grid-column: 1; grid-row: auto; }
  .purchase-quick-item fieldset { grid-template-columns: minmax(0, 1fr); }
  .topbar { min-height: 60px; gap: 8px; padding: 0 12px; }
  .brand { min-width: 0; gap: 6px; font-size: 12px; }
  .brand > span { display: none; }
  .brand-logo { width: 34px; height: 34px; flex: 0 0 34px; }
  .topbar-actions { min-width: 0; flex: 0 1 auto; gap: 7px; }
  .topbar-actions form { flex: 0 0 auto; }
  .topbar-actions .link-button { white-space: nowrap; font-size: 12px; }
  .workspace-switch select { width: 60px; font-size: 10px; }
  .workspace-switch .searchable-select-input { width: 60px; font-size: 10px; }
  .user-profile { gap: 5px; }
  .user-profile-icon { width: 27px; height: 27px; flex-basis: 27px; }
  .user-profile-icon svg { width: 16px; height: 16px; }
  .user-chip { display: block; max-width: 54px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .app-navigation { top: auto; bottom: auto; left: auto; }
  .menu-trigger { width: 42px; min-height: 42px; }
  .menu-panel { top: 60px; right: auto; bottom: 0; left: 0; width: min(320px, calc(100vw - 42px)); border-top-left-radius: 0; border-bottom-left-radius: 0; }
  .page-shell { width: calc(100% - 30px); padding: 28px 0 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 21px; }
  .heading-actions { width: 100%; flex-wrap: wrap; gap: 9px; }
  .heading-actions .button { flex: 1 1 120px; padding: 0 9px; font-size: 12px; }
  .today-hero { min-height: 0; flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 13px; padding: 24px 21px 20px; border-radius: 20px; }
  .today-hero::before { top: -205px; right: -90px; width: 300px; height: 300px; }
  .today-overline { margin-bottom: 13px; font-size: 8px; }
  .today-hero h1 { font-size: 45px; }
  .today-intro { max-width: 320px; font-size: 12px; }
  .today-hero-side { justify-content: flex-start; }
  .today-hero-mark { display: none; }
  .today-hero-actions { width: 100%; min-width: 0; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .recent-sections { margin: -1px 0 14px; align-items: flex-start; flex-direction: column; gap: 6px; }
  .recent-sections-links { width: 100%; max-width: 100%; }
  .button-hero-primary, .button-hero-secondary { flex: 1; min-height: 42px; justify-content: center; padding: 0 8px; font-size: 11px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
  .metric-highlight { grid-column: 1 / -1; }
  .metric-card { min-height: 103px; padding: 13px 12px; border-radius: 12px; }
  .history-quick-search { grid-template-columns: 1fr auto; align-items: center; }
  .history-quick-search label { grid-column: 1 / -1; padding: 0; }
  .quick-category-filters { align-items: flex-start; flex-direction: column; gap: 5px; }
  .quick-category-filters > div { width: 100%; max-width: 100%; }
  .metric-label { font-size: 10px; }
  .metric-card strong { margin-top: 7px; font-size: clamp(19px, 5vw, 26px); }
  .metric-foot { margin-top: 5px; font-size: 9px; }
  .metric-grid-single { grid-template-columns: 1fr; }
  .metric-grid-single .metric-highlight { grid-column: auto; }
  .purchase-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-summary-metrics .metric-highlight { grid-column: auto; }
  .panel { padding: 17px 15px; border-radius: 13px; }
  .open-requirements-panel, .vendor-credit-panel, .purchase-activity-panel { margin-bottom: 13px; }
  .vendor-credit-panel .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .vendor-credit-panel .panel-heading .button { width: 100%; justify-content: center; }
  .vendor-credit-actions { gap: 9px; }
  .purchase-activity-heading { align-items: stretch; flex-direction: column; }
  .purchase-activity-heading .button { width: 100%; min-height: 42px; justify-content: center; }
  .purchase-tabs { margin-bottom: 12px; }
  .purchase-tab { min-height: 44px; padding: 0 12px; }
  .catalog-tabs { margin-bottom: 14px; }
  .catalog-tab { min-height: 44px; padding: 0 12px; }
  .content-grid { gap: 13px; }
  .open-requirements-panel .category-group, .upcoming-panel .category-group { margin-top: 12px; padding: 0 11px 3px; border-radius: 12px; }
  .open-requirements-panel .category-group-heading, .upcoming-panel .category-group-heading { margin: 0 -11px; padding: 10px 11px; border-radius: 11px 11px 0 0; }
  .requirement-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px 12px; padding: 18px 0; }
  .requirement-share-select { grid-row: 1 / span 2; }
  .requirement-main { min-width: 0; grid-column: 2 / -1; }
  .quantity-block { grid-column: 2; grid-row: 2; align-items: flex-start; min-width: 0; text-align: left; white-space: normal; }
  .requirement-row .status { grid-column: 3; grid-row: 2; align-self: start; }
  .requirement-share-header-form { align-items: stretch; flex-wrap: wrap; }
  .requirement-share-header-form .button { min-width: 96px; }
  .form-panel { padding: 19px 16px; }
  .purchase-receipt-fields { grid-template-columns: minmax(0, 1fr); }
  .purchase-entry-line { gap: 9px; padding: 12px; }
  .purchase-pricing-field { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .purchase-pricing-heading { min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .purchase-price-hint { grid-column: 1; }
  .purchase-extra-grid { gap: 9px; }
  .purchase-batch-actions { justify-content: stretch; }
  .purchase-batch-actions .button { flex: 1; }
  .auth-card { padding: 26px 21px; }
  .auth-brand-logo { width: 118px; height: 118px; }
  .filter-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .filter-form .field:nth-child(3), .filter-form .field:nth-child(5) { grid-column: auto; }
  .filter-actions { flex-wrap: wrap; }
  .filter-actions .button { flex: 1 1 130px; min-height: 42px; justify-content: center; }
  .history-filters-summary { min-height: 48px; }
  .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .filter-actions .button { flex: 1; }
  .history-row { grid-template-columns: 1fr auto; gap: 7px 10px; }
  .purchase-detail-panel,
  .purchase-detail-panel .history-list,
  .purchase-detail-panel .history-row,
  .purchase-detail-panel .history-primary { min-width: 0; }
  .purchase-detail-panel .history-row { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 8px; }
  .purchase-detail-panel .history-primary { overflow-wrap: anywhere; }
  .purchase-detail-panel .row-title { min-width: 0; flex-wrap: wrap; }
  .purchase-detail-panel .history-cost { min-width: 0; align-items: flex-start; white-space: normal; overflow-wrap: anywhere; }
  .requirement-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .requirement-metrics .metric-card { min-height: 90px; padding: 12px; }
  .requirement-metrics .metric-card strong { font-size: 18px; }
  .detail-section-heading { align-items: flex-start; flex-direction: column; }
  .detail-purchase-row { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-form-grid { grid-template-columns: 1fr; }
  /* Phone rows: name line, two metric columns with value and unit on one line, then one action bar. */
  .catalog-metric-row { align-items: stretch; flex-wrap: wrap; gap: 10px; padding: 14px 0; }
  .catalog-row > .catalog-item-main { min-width: 0; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
  .catalog-item-main .priority, .catalog-item-main .status { order: 1; }
  .catalog-purchase-metrics { min-width: 0; flex: 1 1 100%; gap: 12px; }
  .catalog-purchase-metrics > span { display: block; min-width: 0; flex: 1; font-size: 13px; }
  .catalog-purchase-metrics > span + span { padding-left: 12px; }
  .catalog-purchase-metrics small { display: block; }
  .catalog-purchase-metrics b { font-size: 16px; }
  .catalog-purchase-metrics .purchase-average-rate, .catalog-purchase-metrics .purchase-variance { display: block; width: fit-content; max-width: 100%; margin-top: 5px; white-space: normal; }
  .catalog-row > .catalog-row-actions { flex: 1 1 100%; flex-direction: row; align-items: center; gap: 18px; }
  .catalog-row-actions .button { min-height: 34px; padding: 0 12px; }
  .catalog-row-actions > form:first-child { margin-right: auto; }
  .catalog-detail-metrics { grid-template-columns: 1fr; gap: 9px; }
  .catalog-detail-metrics .metric-card { min-height: 92px; }
  .catalog-chart-legend { margin-left: 0; }
  .vendor-grid { grid-template-columns: 1fr; }
  .vendor-footer { align-items: flex-start; flex-direction: column; }
  .vendor-actions { justify-content: flex-start; }
}
.audit-history-panel,
.audit-edit-lines {
  margin-top: 1.25rem;
}

.audit-timeline {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.audit-entry {
  border-left: 2px solid var(--line, #dce5df);
  padding: 0 0 0.15rem 1rem;
}

.audit-entry-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.audit-change-list,
.audit-change-list ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.audit-edit-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.8rem 1rem;
  border-top: 1px solid var(--line, #dce5df);
  margin-top: 0.8rem;
  padding-top: 1rem;
}

.audit-edit-line .field {
  margin: 0;
}
.audit-edit-line.purchase-entry-line {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line, #dce5df);
  border-radius: 14px;
  background: #fbfcfb;
}

.civil-work-layout { grid-template-columns: minmax(290px, .78fr) minmax(0, 1.22fr); align-items: start; }
.civil-work-form-panel, .civil-work-list-panel { min-width: 0; }
.civil-work-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 15px; color: var(--muted, #73837b); font-weight: 650; }
.civil-work-filter select { width: auto; min-width: 150px; }
.civil-work-list { display: grid; }
.civil-work-card { min-width: 0; padding: 18px 0; border-top: 1px solid var(--line, #dce5df); }
.civil-work-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.civil-work-card-heading > div { min-width: 0; }
.civil-work-card h3 { margin: 8px 0 4px; overflow-wrap: anywhere; }
.civil-work-location { margin: 0; color: var(--muted, #73837b); font-weight: 650; overflow-wrap: anywhere; }
.civil-work-description { margin: 12px 0; overflow-wrap: anywhere; }
.civil-work-photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.civil-work-photo-strip a { display: grid; gap: 5px; width: min(145px, calc(50% - 5px)); color: var(--muted, #73837b); font-size: 12px; text-decoration: none; }
.civil-work-photo-strip img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line, #dce5df); border-radius: 10px; background: #f0f3f1; }
.civil-work-photo-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-planned { color: #9c5b22; background: #fff1e5; }
.status-in_progress { color: #275e88; background: #eaf4fc; }
.status-completed { color: #176348; background: #e8f4ed; }
.status-cancelled { color: #6c7470; background: #eef0ef; }

@media (max-width: 760px) {
  .civil-work-layout { grid-template-columns: 1fr; }
  .civil-work-card-heading { align-items: flex-start; }
}

.record-location-map { display: block; width: 100%; height: 280px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--canvas); }
@media (max-width: 640px) { .record-location-map { height: 220px; } .record-location-panel .panel-heading { flex-wrap: wrap; gap: 8px; } }

/* Today: Open requirements and Purchases as two side-by-side views */
.today-view-tabs { margin: 18px 0 16px; }
.today-view-tabs .purchase-tab { flex: 1 1 0; min-width: 0; min-height: 48px; font-size: 14px; }
@media (max-width: 640px) { .today-view-tabs .purchase-tab { padding: 0 8px; font-size: 13px; } }

.voice-entry { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dd-link-recipe { display: inline-block; }
.dd-link-recipe summary { list-style: none; cursor: pointer; }
.dd-link-recipe summary::-webkit-details-marker { display: none; }
.dd-link-recipe[open] form { display: flex; gap: .4rem; margin-top: .4rem; }
[data-recipe-line] div[id$="-component_type"] { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
[data-recipe-line] div[id$="-component_type"] label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }

/* Repeated item cards: tint, darker border and a green bar so each item stands apart. */
.purchase-entry-line, .audit-edit-line, .audit-edit-line.purchase-entry-line, .inline-form-row {
  padding: 14px;
  border: 1px solid #c9d4cd;
  border-left: 4px solid #2f6b4f;
  border-radius: 14px;
  background: #f6f8f6;
  box-shadow: 0 1px 2px rgba(24, 43, 37, .06);
}
:is(.purchase-entry-line, .audit-edit-line, .inline-form-row) :is(.form-control, .form-select) { border-color: #c9d4cd; }

/* Per-item purchase flags: badge with note, or a collapsed flag form. */
.line-flag { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .35rem; }
.line-flag-form { margin-top: .35rem; }
.line-flag-form summary { cursor: pointer; width: fit-content; }
button.requirement-purchase-cta { cursor: pointer; padding: 0; }
button.requirement-purchase-cta.is-noted { background: var(--green); color: #fff; }
.requirement-note { display: flex; gap: 8px; margin-top: 8px; max-width: 300px; }
/* 16px text stops iOS zooming on focus; compact height keeps the row short. */
.requirement-note input { width: 0; flex: 1 1 0; height: 36px; padding: 4px 10px; border: 1px solid #d5ddd8; border-radius: 10px; background: #fff; font-size: 16px; }
.requirement-note input::placeholder { color: #9aa6a0; font-size: 14px; }
.requirement-note input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px #e1efe6; }
@media (max-width: 640px) { .requirement-share-select { align-self: start; min-height: 28px; } .requirement-note { max-width: none; } }
.catalog-metric-row { touch-action: pan-y; }
.catalog-metric-row[data-require-url] { user-select: none; }
.catalog-item-main [data-in-requirement-badge][hidden] { display: none; }
.catalog-metric-row[data-require-url] { transition: transform .15s ease, background-color .15s ease; }
.catalog-metric-row.swipe-add { background: #e7f4ec; box-shadow: inset 4px 0 0 #2f8a57; }
.catalog-metric-row.swipe-remove { background: #fbeceb; box-shadow: inset -4px 0 0 #c0392b; }
.catalog-play-toggle { cursor: pointer; }
.catalog-playing .catalog-flagged-group { padding: 0; border: 0; background: none; box-shadow: none; }
.catalog-playing .catalog-flagged-group > summary { display: none; }
.catalog-removal { margin-top: 16px; }
.catalog-delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1ef; }
.catalog-audit-row { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #eef1ef; }
.catalog-audit-row > div { display: flex; flex-direction: column; gap: 2px; }
.catalog-search-field { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.catalog-chip-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.catalog-chip-row::-webkit-scrollbar { display: none; }
.catalog-chip-divider { flex: 0 0 1px; height: 22px; background: var(--line); }
.catalog-chips { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.catalog-chips label { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border: 1px solid #d5ddd8; border-radius: 8px; background: #fff; color: #31463b; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.catalog-chips label:hover { background: var(--green-soft); }
.catalog-chips input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-chips label:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.catalog-chips label:has(input:checked)::before { content: "✓"; margin-right: 6px; }
.catalog-chips label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.catalog-chips:disabled label { opacity: .5; cursor: default; }
.catalog-category-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.catalog-category-card > summary { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f3f8f4; cursor: pointer; list-style: none; }
.catalog-category-card > summary::-webkit-details-marker { display: none; }
.catalog-category-card > summary::before { content: "›"; display: inline-block; width: 14px; color: var(--green); font-size: 20px; line-height: 1; transition: transform .15s; }
.catalog-category-card[open] > summary::before { transform: rotate(90deg); }
.catalog-category-card > summary h3 { flex: 1; padding: 0; color: var(--green-dark); font-size: 13px; }
.catalog-category-card > .catalog-row { padding-left: 14px; padding-right: 14px; }
.catalog-playing .catalog-category-card > summary { display: none; }
.catalog-playing .catalog-category-card { border: 0; }
.catalog-chip-row > * { flex: 0 0 auto; }
.catalog-segmented { display: flex; margin: 0; padding: 0; border: 1px solid #c4cfc8; border-radius: 999px; overflow: hidden; }
.catalog-segmented label { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border-left: 1px solid #c4cfc8; color: #31463b; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
.catalog-segmented label:first-of-type { border-left: 0; }
.catalog-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-segmented label:has(input:checked) { background: var(--green-soft); color: var(--green-dark); }
.catalog-segmented label:has(input:checked)::before { content: "✓"; margin-right: 6px; }
.catalog-segmented label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: -2px; }
.catalog-segmented:disabled { opacity: .5; }
.catalog-segmented:disabled label { cursor: default; }
