:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #f9fbfa;
  --surface-hover: #f1f5f2;
  --line: #e2e8e4;
  --line-strong: #d3ddd6;
  --text: #17211b;
  --muted: #66736a;
  --muted-2: #8a958d;
  --green: #168846;
  --green-strong: #0f6f38;
  --green-soft: #e8f5ed;
  --amber: #b8750b;
  --amber-soft: #fff3d9;
  --red: #c33d3d;
  --red-soft: #fdeaea;
  --blue: #2d6cdf;
  --blue-soft: #eaf1ff;
  --shadow-sm: 0 1px 2px rgba(22, 42, 29, .04), 0 6px 18px rgba(22, 42, 29, .04);
  --shadow-lg: 0 20px 60px rgba(20, 38, 26, .14);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar: 272px;
  --topbar: 64px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }
[hidden] { display: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); transition: grid-template-columns .22s ease; }
.app-shell.sidebar-unpinned { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; transition: transform .22s ease, box-shadow .22s ease; }
.app-shell.sidebar-unpinned .sidebar { transform: translateX(-100%); }
.app-shell.sidebar-unpinned.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
.sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(13,25,17,.24); backdrop-filter: blur(1px); }
.brand { height: var(--topbar); display: flex; align-items: center; gap: 11px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #24a85d, #0d6f37); box-shadow: 0 8px 20px rgba(22, 136, 70, .2); }
.brand-copy { min-width: 0; flex: 1; }
.sidebar-brand-actions { display: flex; align-items: center; gap: 4px; }
.sidebar-control,.side-panel-control { width: 31px; height: 31px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s ease,color .15s ease,border-color .15s ease; }
.sidebar-control:hover,.side-panel-control:hover { color: var(--text); background: var(--surface-hover); border-color: var(--line); }
.sidebar-control.active,.side-panel-control.active { color: var(--green-strong); background: var(--green-soft); border-color: #cfe5d7; }
.sidebar-control svg,.side-panel-control svg { width: 16px; height: 16px; }
.brand-name { font-weight: 760; letter-spacing: -.02em; font-size: 18px; }
.brand-tag { color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 16px 12px 20px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-heading { padding: 0 9px 8px; color: var(--muted-2); font-size: 10px; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.nav-link, .nav-parent { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; cursor: pointer; text-align: left; color: #263229; font-weight: 560; transition: background .16s ease, color .16s ease, transform .16s ease; }
.nav-link:hover, .nav-parent:hover { background: var(--surface-hover); }
.nav-link:active, .nav-parent:active { transform: scale(.99); }
.nav-link.active { color: var(--green-strong); background: var(--green-soft); font-weight: 700; }
.nav-icon { width: 20px; height: 20px; color: #657168; flex: 0 0 auto; }
.nav-link.active .nav-icon { color: var(--green); }
.nav-label { min-width: 0; flex: 1; }
.nav-chevron { width: 16px; height: 16px; color: var(--muted-2); transition: transform .2s ease; }
.nav-parent[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-children { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-children.open { grid-template-rows: 1fr; }
.nav-children-inner { overflow: hidden; padding-left: 31px; }
.nav-child { min-height: 36px; display: flex; align-items: center; gap: 10px; border-radius: 9px; padding: 7px 10px; color: #4f5d54; font-size: 13px; font-weight: 540; cursor: pointer; }
.nav-child::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #bac3bd; }
.nav-child:hover { background: var(--surface-hover); color: var(--text); }
.nav-child.active { background: var(--green-soft); color: var(--green-strong); font-weight: 700; }
.nav-child.active::before { background: var(--green); }
.sidebar-user { margin: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 11px; display: flex; align-items: center; gap: 10px; background: var(--surface-soft); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--green-strong); background: var(--green-soft); flex: 0 0 auto; }
.user-copy { min-width: 0; flex: 1; }
.user-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.user-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.icon-button:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.icon-button svg { width: 18px; height: 18px; }

.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; height: var(--topbar); z-index: 20; background: rgba(255,255,255,.93); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.mobile-menu { display: none; }
.app-shell.sidebar-unpinned .mobile-menu { display: inline-grid; }
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.breadcrumb strong { color: var(--text); font-weight: 670; }
.topbar-spacer { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 9px; }
.topbar-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.content { width: min(1600px, 100%); margin: 0 auto; padding: 30px 28px 48px; }
.page { animation: page-in .2s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.page-title-wrap { min-width: 0; flex: 1; }
.eyebrow { margin-bottom: 7px; color: var(--green); font-weight: 780; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: 7px; font-size: 20px; letter-spacing: -.02em; }
h3 { margin-bottom: 6px; font-size: 15px; }
.page-subtitle { margin-bottom: 0; color: var(--muted); max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.button { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); cursor: pointer; font-weight: 680; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { border-color: #becbc2; box-shadow: 0 5px 16px rgba(25,43,31,.07); }
.button:active { transform: translateY(1px); box-shadow: none; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: white; border-color: var(--green); background: linear-gradient(180deg, #23964f, #168846); box-shadow: 0 8px 18px rgba(22,136,70,.16); }
.button.primary:hover { border-color: var(--green-strong); background: var(--green-strong); }
.button.danger { color: var(--red); border-color: #f0c7c7; background: #fffafa; }
.button.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.button.small { min-height: 34px; padding: 6px 10px; border-radius: 9px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card { min-height: 126px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: flex-start; }
.kpi-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); flex: 0 0 auto; }
.kpi-icon.amber { color: var(--amber); background: var(--amber-soft); }
.kpi-icon.blue { color: var(--blue); background: var(--blue-soft); }
.kpi-icon.red { color: var(--red); background: var(--red-soft); }
.kpi-icon svg { width: 22px; height: 22px; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 620; }
.kpi-value { margin-top: 3px; font-size: 27px; font-weight: 780; line-height: 1.1; letter-spacing: -.035em; }
.kpi-note { margin-top: 6px; color: var(--muted); font-size: 11px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.panel-header { min-height: 62px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-title { min-width: 0; flex: 1; }
.panel-title h2, .panel-title h3 { margin-bottom: 2px; }
.panel-title p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 18px; }
.toolbar { padding: 15px 18px; display: grid; grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, 240px)) auto; gap: 12px; align-items: end; border-bottom: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field-label { color: #56625a; font-size: 11px; font-weight: 690; }
.input, .select, .textarea { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; color: var(--text); background: var(--surface); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder, .textarea::placeholder { color: #9da7a0; }
.input:focus, .select:focus, .textarea:focus { border-color: #75b88e; box-shadow: 0 0 0 3px rgba(22,136,70,.1); }
.textarea { min-height: 92px; resize: vertical; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; color: var(--muted-2); transform: translateY(-50%); pointer-events: none; }
.input-with-icon .input { padding-left: 37px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; padding-top: 5px; color: var(--green-strong); font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.data-table th { padding: 12px 16px; color: #657168; background: #fbfcfb; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 790; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #fbfdfb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 680; }
.cell-sub { margin-top: 2px; color: var(--muted); font-size: 11px; }
.product-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.product-thumb { width: 38px; height: 38px; border: 1px solid #dce6df; border-radius: 10px; display: grid; place-items: center; overflow: hidden; color: var(--green-strong); background: linear-gradient(145deg, #ecf7f0, #f8fbf9); font-weight: 780; flex: 0 0 auto; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 760; line-height: 1; text-transform: capitalize; }
.badge.green { color: var(--green-strong); background: var(--green-soft); }
.badge.amber { color: #8d5800; background: var(--amber-soft); }
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.blue { color: #2458ad; background: var(--blue-soft); }
.badge.gray { color: #59655d; background: #eef2ef; }
.stock-low { color: var(--red); font-weight: 750; }
.stock-ok { color: var(--green-strong); font-weight: 650; }
.panel-footer { min-height: 58px; padding: 11px 16px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.panel-footer .spacer { flex: 1; }
.pagination { display: flex; gap: 6px; }
.page-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
.page-button.active { color: white; border-color: var(--green); background: var(--green); }
.page-button:disabled { opacity: .45; cursor: not-allowed; }

.tabs { display: flex; gap: 3px; overflow-x: auto; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f7; }
.tab { min-height: 36px; padding: 7px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 650; }
.tab.active { color: var(--green-strong); background: var(--surface); box-shadow: 0 1px 5px rgba(25,45,31,.08); }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; }
.stack { display: grid; gap: 14px; }
.mini-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: var(--surface); }
.mini-card h3 { margin-bottom: 4px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 12px; }
.progress { height: 7px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: #edf2ee; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.empty-state { min-height: 250px; padding: 36px 20px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 13px; border-radius: 17px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { color: var(--text); font-size: 17px; }
.error-state { margin: 16px; border: 1px solid #f1caca; border-radius: 12px; padding: 14px; color: #9f2e2e; background: #fff7f7; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef2ef 25%, #f8faf8 40%, #eef2ef 65%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(16,28,20,.34); backdrop-filter: blur(3px); animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(720px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.6); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal.small { width: min(500px, 100%); }
.modal.large { width: min(980px, 100%); }
.modal-header { padding: 17px 19px; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-header-copy { min-width: 0; flex: 1; }
.modal-header h2 { margin-bottom: 2px; font-size: 19px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-body { overflow: auto; padding: 19px; }
.modal-footer { padding: 13px 19px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fbfcfb; }
.drawer-backdrop { place-items: stretch end; padding: 0; }
.drawer { width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); box-shadow: -20px 0 60px rgba(16,28,20,.16); animation: slide-in .2s ease; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .8; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { padding: 18px 20px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.drawer-title { min-width: 0; flex: 1; }
.drawer-title h2 { margin-bottom: 2px; }
.drawer-title p { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-body { overflow: auto; padding: 20px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-soft); }
.detail-label { color: var(--muted); font-size: 10px; font-weight: 730; text-transform: uppercase; letter-spacing: .05em; }
.detail-value { margin-top: 4px; font-weight: 670; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 10px; }
.timeline-item { position: relative; padding: 0 0 12px 20px; border-left: 1px solid var(--line); }
.timeline-item::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item strong { display: block; }
.timeline-item span { color: var(--muted); font-size: 11px; }

.toast-root { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(380px, calc(100vw - 36px)); }
.toast { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; background: var(--surface); box-shadow: var(--shadow-lg); animation: toast-in .2s ease; }
.toast.success { border-color: #bfe1ca; }
.toast.error { border-color: #efc3c3; }
.toast-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: 0 0 auto; }
.toast.error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast-message { min-width: 0; flex: 1; }
.toast-message strong { display: block; }
.toast-message span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); background: var(--surface); }
.login-visual { position: relative; padding: clamp(36px, 6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: white; background: radial-gradient(circle at 12% 12%, rgba(255,255,255,.16), transparent 30%), linear-gradient(145deg, #0e6e38, #143e28 70%); }
.login-visual::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -150px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.035), 0 0 0 120px rgba(255,255,255,.025); }
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .brand-mark { background: rgba(255,255,255,.16); box-shadow: none; }
.login-brand strong { font-size: 21px; }
.login-copy { position: relative; z-index: 1; max-width: 620px; }
.login-copy h1 { max-width: 600px; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.05em; }
.login-copy p { max-width: 540px; margin-bottom: 0; color: rgba(255,255,255,.72); font-size: 16px; }
.login-form-side { padding: 30px; display: grid; place-items: center; background: #fbfcfb; }
.login-card { width: min(430px, 100%); border: 1px solid var(--line); border-radius: 22px; padding: 30px; background: var(--surface); box-shadow: var(--shadow-sm); }
.login-card h2 { font-size: 28px; }
.login-card > p { color: var(--muted); }
.login-card form { margin-top: 24px; display: grid; gap: 15px; }
.login-card .button { margin-top: 4px; width: 100%; }
.login-error { border: 1px solid #efc7c7; border-radius: 10px; padding: 10px 12px; color: var(--red); background: var(--red-soft); font-size: 12px; }

.chart-bars { min-height: 190px; display: flex; align-items: flex-end; gap: 10px; padding: 18px 6px 2px; }
.chart-bar { flex: 1; min-width: 24px; display: grid; align-content: end; gap: 7px; text-align: center; }
.chart-bar span { min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #2aa85d, #168846); }
.chart-bar label { color: var(--muted); font-size: 10px; }
.report-table { max-height: 540px; overflow: auto; }

@media (max-width: 1200px) {
  :root { --sidebar: 248px; }
  .kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); transition: transform .22s ease; }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .main { min-width: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 16px 40px; }
  .page-header { flex-direction: column; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar > :first-child { grid-column: 1 / -1; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { min-height: 100vh; padding: 18px; }
  .sidebar-brand-actions { display: none; }
  .sidebar-scrim { background: rgba(13,25,17,.28); }
}

@media (max-width: 620px) {
  .topbar-user .user-copy { display: none; }
  .breadcrumb span:first-child, .breadcrumb .slash { display: none; }
  .kpi-grid, .kpi-grid.five { grid-template-columns: 1fr; }
  .kpi-card { min-height: 105px; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar > :first-child { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .form-section { grid-column: auto; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .panel-header, .panel-footer { flex-wrap: wrap; }
  .page-actions .button { flex: 1; }
}

/* Product workspace: one active product interface, scoped to the clean inventory module. */
.clickable-row { cursor: pointer; }
.clickable-row:focus { outline: 2px solid rgba(22, 136, 70, .28); outline-offset: -2px; }
.danger-icon { color: var(--red); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.workspace-header-actions { min-width: 0; display: flex; align-items: center; gap: 14px; }
.workspace-delete-button { flex: 0 0 auto; white-space: nowrap; }
.delete-confirmation { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; }
.delete-warning-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--red); background: #fff0f0; }
.delete-warning-icon svg { width: 22px; height: 22px; }
.delete-confirmation > div:last-child > strong { display: block; font-size: 16px; }
.delete-confirmation p { margin: 6px 0 16px; color: var(--muted); line-height: 1.55; }
.delete-confirmation code { border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--text); background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.delete-error { margin-top: 12px; border: 1px solid #efcaca; border-radius: 10px; padding: 10px 12px; color: #8f2727; background: #fff7f7; font-size: 11px; line-height: 1.45; }
.delete-error strong { display: block; }
.delete-error ul { margin: 7px 0 0; padding-left: 18px; }
.text-button, .workspace-back { border: 0; padding: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--green-strong); background: transparent; cursor: pointer; font-weight: 700; }
.text-button svg, .workspace-back svg { width: 17px; height: 17px; }
.workspace-back { margin-bottom: 16px; }
.product-workspace-page { max-width: 1500px; margin: 0 auto; }
.product-workspace-header, .ingredient-workspace-header, .packing-workspace-header { min-height: 144px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-product-image { width: 92px; height: 92px; border: 1px solid var(--line); border-radius: 20px; display: grid; place-items: center; overflow: hidden; color: var(--green-strong); background: linear-gradient(145deg, #eaf7ef, #fbfdfb); font-size: 25px; font-weight: 800; }
.workspace-product-image img { width: 100%; height: 100%; object-fit: cover; }
.workspace-product-copy { min-width: 0; }
.workspace-product-copy h1 { margin: 6px 0 4px; font-size: clamp(27px, 3vw, 38px); }
.workspace-product-copy p { margin: 0; color: var(--muted); }
.workspace-status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.workspace-summary { display: grid; grid-template-columns: repeat(3, minmax(86px, 1fr)); gap: 8px; }
.workspace-summary > div { min-width: 90px; border-left: 1px solid var(--line); padding: 5px 0 5px 17px; }
.workspace-summary span, .workspace-summary strong { display: block; }
.workspace-summary span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.workspace-summary strong { margin-top: 5px; font-size: 16px; }
.product-tabs { position: sticky; top: calc(var(--topbar) + 8px); z-index: 12; margin: 16px 0; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; padding: 5px; background: rgba(249, 251, 250, .94); backdrop-filter: blur(12px); box-shadow: 0 4px 16px rgba(20, 38, 26, .04); scrollbar-width: thin; }
.product-tab { min-height: 38px; border: 0; border-radius: 10px; padding: 8px 13px; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; font-weight: 680; }
.product-tab:hover { color: var(--text); background: var(--surface-hover); }
.product-tab.active { color: var(--green-strong); background: var(--surface); box-shadow: 0 1px 5px rgba(25, 45, 31, .09); }
.product-tab-panel { min-height: 420px; }
.workspace-form { display: grid; gap: 16px; }
.workspace-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-card-header { min-height: 48px; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 16px; }
.workspace-card-header > div { min-width: 0; flex: 1; }
.workspace-card-header h2 { margin-bottom: 3px; }
.workspace-card-header p { margin: 0; color: var(--muted); font-size: 12px; }
.workspace-form-footer { min-height: 66px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-form-footer span { min-width: 0; flex: 1; color: var(--muted); font-size: 12px; }
.general-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
.product-image-editor { align-self: start; display: grid; gap: 10px; }
.product-image-preview { aspect-ratio: 1; width: 100%; border: 1px solid var(--line); border-radius: 18px; display: grid; place-items: center; overflow: hidden; color: var(--green-strong); background: linear-gradient(145deg, #eaf7ef, #fbfdfb); font-size: 34px; font-weight: 820; }
.product-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-button { position: relative; overflow: hidden; }
.image-upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.product-image-editor small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.essential-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.essential-fields .wide { grid-column: 1 / -1; }
.field-help { color: var(--muted-2); font-size: 10px; line-height: 1.35; }
.input[readonly] { color: var(--muted); background: #f5f7f5; }
.file-input { padding-top: 7px; }
.multi-select { min-height: 130px; }
.form-accordion { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.form-accordion summary { min-height: 64px; padding: 15px 18px; display: flex; align-items: center; gap: 15px; cursor: pointer; list-style: none; }
.form-accordion summary::-webkit-details-marker { display: none; }
.form-accordion summary > span { min-width: 0; flex: 1; }
.form-accordion summary strong, .form-accordion summary small { display: block; }
.form-accordion summary small { margin-top: 2px; color: var(--muted); }
.form-accordion summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .18s ease; }
.form-accordion[open] summary svg { transform: rotate(180deg); }
.form-accordion[open] summary { border-bottom: 1px solid var(--line); }
.accordion-content { padding: 18px; }
.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toggle-grid.wide { grid-column: 1 / -1; }
.toggle-field { min-height: 62px; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; background: var(--surface-soft); cursor: pointer; }
.toggle-field > span { min-width: 0; flex: 1; }
.toggle-field strong, .toggle-field small { display: block; }
.toggle-field strong { font-size: 12px; }
.toggle-field small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.toggle-field input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-field i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #dce3de; transition: background .18s ease; flex: 0 0 auto; }
.toggle-field i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(20, 38, 26, .18); transition: transform .18s ease; }
.toggle-field input:checked + i { background: var(--green); }
.toggle-field input:checked + i::after { transform: translateX(16px); }
.inventory-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inventory-stat-grid article { min-height: 100px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.inventory-stat-grid span, .inventory-stat-grid strong { display: block; }
.inventory-stat-grid span { color: var(--muted); font-size: 11px; font-weight: 670; }
.inventory-stat-grid strong { margin-top: 8px; font-size: 25px; }
.location-cards { display: grid; gap: 10px; }
.location-cards article { min-height: 66px; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface-soft); }
.location-cards article > div:last-child { text-align: right; }
.location-cards strong, .location-cards span { display: block; }
.location-cards span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.document-grid { display: grid; gap: 10px; }
.document-card { min-height: 76px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 12px; background: var(--surface-soft); }
.document-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); flex: 0 0 auto; }
.document-icon svg { width: 20px; height: 20px; }
.document-copy { min-width: 0; flex: 1; }
.document-copy span, .document-copy strong, .document-copy small { display: block; }
.document-copy span { color: var(--green-strong); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.document-copy strong { margin-top: 2px; }
.document-copy small { margin-top: 3px; color: var(--muted); }
.workspace-loading { min-height: 600px; }

@media (max-width: 1180px) {
  .product-workspace-header, .ingredient-workspace-header, .packing-workspace-header { grid-template-columns: auto minmax(0, 1fr); }
  .workspace-header-actions { grid-column: 1 / -1; width: 100%; border-top: 1px solid var(--line); padding-top: 15px; }
  .workspace-summary { min-width: 0; flex: 1; }
  .workspace-summary > div:first-child { border-left: 0; padding-left: 0; }
  .essential-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .product-workspace-header, .ingredient-workspace-header, .packing-workspace-header { grid-template-columns: 70px minmax(0, 1fr); padding: 16px; }
  .workspace-product-image { width: 70px; height: 70px; border-radius: 16px; }
  .workspace-header-actions { align-items: flex-end; }
  .workspace-summary { grid-template-columns: repeat(3, 1fr); }
  .workspace-summary > div { min-width: 0; padding-left: 10px; }
  .general-layout { grid-template-columns: 1fr; }
  .product-image-editor { grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
  .product-image-editor small { grid-column: 2; }
  .essential-fields { grid-template-columns: 1fr; }
  .essential-fields .wide { grid-column: auto; }
  .inventory-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toggle-grid { grid-template-columns: 1fr; }
  .workspace-card { padding: 16px; }
}

@media (max-width: 520px) {
  .product-workspace-header, .ingredient-workspace-header, .packing-workspace-header { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
  .workspace-product-image { width: 58px; height: 58px; border-radius: 14px; }
  .workspace-product-copy h1 { font-size: 24px; }
  .workspace-header-actions { align-items: stretch; flex-direction: column; }
  .workspace-delete-button { width: 100%; }
  .workspace-summary { width: 100%; grid-template-columns: 1fr; }
  .workspace-summary > div { border-left: 0; border-top: 1px solid var(--line); padding: 9px 0 0; }
  .workspace-summary > div:first-child { border-top: 0; }
  .product-tabs { top: calc(var(--topbar) + 4px); margin-inline: -2px; }
  .product-image-editor { grid-template-columns: 1fr; }
  .product-image-preview { width: 130px; }
  .product-image-editor small { grid-column: auto; }
  .inventory-stat-grid { grid-template-columns: 1fr; }
  .workspace-form-footer { align-items: stretch; flex-direction: column; }
  .workspace-form-footer .button { width: 100%; }
  .workspace-card-header { flex-direction: column; }
  .workspace-card-header .button { width: 100%; }
  .document-card { align-items: flex-start; flex-wrap: wrap; }
  .document-card .actions { width: 100%; justify-content: flex-start; padding-left: 54px; }
}

/* Ingredient Master — single active, database-backed workspace */
.ingredient-workspace-page { min-width: 0; }
.ingredient-summary { grid-template-columns: repeat(4, minmax(96px, 1fr)); }
.ingredient-list-toolbar { grid-template-columns: minmax(320px, 1fr) minmax(170px, 230px) minmax(150px, 210px) auto; }
.ingredient-list-table { min-width: 1440px; }
.ingredient-list-table tbody tr { cursor: pointer; }
.ingredient-list-table tbody tr:focus { outline: 2px solid #75b88e; outline-offset: -2px; }
.ingredient-list-table .stock-low { color: var(--red); font-weight: 750; }
.ingredient-inventory-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cost-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cost-grid article { min-height: 94px; border: 1px solid var(--line); border-radius: 15px; padding: 15px; background: var(--surface-soft); }
.cost-grid span, .cost-grid strong { display: block; }
.cost-grid span { color: var(--muted); font-size: 11px; font-weight: 680; }
.cost-grid strong { margin-top: 7px; font-size: 21px; letter-spacing: -.02em; }
.recipe-control-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.recipe-control-badges .badge { font-size: 9px; }
.lot-control-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-inline { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 22px; color: var(--muted); text-align: center; background: var(--surface-soft); }
.activity-timeline { display: grid; gap: 0; }
.activity-timeline article { position: relative; min-height: 76px; padding: 4px 0 20px 34px; }
.activity-timeline article:not(:last-child)::before { content: ""; position: absolute; top: 18px; bottom: -2px; left: 9px; width: 1px; background: var(--line-strong); }
.activity-dot { position: absolute; top: 7px; left: 3px; width: 13px; height: 13px; border: 3px solid var(--surface); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--line-strong); }
.activity-timeline strong, .activity-timeline span, .activity-timeline small { display: block; }
.activity-timeline span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.activity-timeline small { margin-top: 5px; color: var(--muted-2); font-size: 10px; }
.ingredient-tabs .product-tab:disabled { opacity: .38; cursor: not-allowed; }

@media (max-width: 1320px) {
  .ingredient-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-inventory-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .ingredient-list-toolbar { grid-template-columns: 1fr 1fr; }
  .ingredient-list-toolbar .field:first-child { grid-column: 1 / -1; }
  .lot-control-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .ingredient-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-inventory-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lot-control-form .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .ingredient-list-toolbar { grid-template-columns: 1fr; }
  .ingredient-list-toolbar .field:first-child { grid-column: auto; }
  .ingredient-list-toolbar .button { width: 100%; }
  .ingredient-summary, .ingredient-inventory-stats, .cost-grid { grid-template-columns: 1fr; }
}

.lot-disposition-note { border: 1px solid #d9e8de; border-radius: 12px; padding: 11px 13px; color: var(--green-strong); background: var(--green-soft); font-size: 11px; line-height: 1.45; }

@media (max-width: 620px) {
  .delete-confirmation { grid-template-columns: 1fr; }
  .delete-warning-icon { width: 42px; height: 42px; }
}

/* Product recipe workspace */
.workspace-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.manufacturing-recipe-strip,
.recipe-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.recipe-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.recipe-summary-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.manufacturing-recipe-strip > div,
.recipe-summary-grid > article { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: #fbfcfb; }
.manufacturing-recipe-strip span,
.recipe-summary-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.manufacturing-recipe-strip strong,
.recipe-summary-grid strong { display: block; overflow: hidden; color: var(--text); font-size: 16px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.recipe-master-card .form-accordion { margin-top: 18px; }
.recipe-master-card .textarea { min-height: 112px; }
.form-section-title { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 15px; }
.form-section-title strong { font-size: 14px; }
.form-section-title span { color: var(--muted); font-size: 12px; }
.current-recipe-row { background: var(--green-soft); }
.recipe-bom-table td { vertical-align: top; }
.recipe-line-form .toggle-grid { margin-top: 2px; }

@media (max-width: 1100px) {
  .recipe-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .manufacturing-recipe-strip,
  .recipe-summary-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .workspace-card-actions { width: 100%; justify-content: stretch; }
  .workspace-card-actions .button { flex: 1 1 auto; }
  .manufacturing-recipe-strip,
  .recipe-summary-grid,
  .recipe-summary-grid.compact { grid-template-columns: 1fr 1fr; }
  .recipe-summary-grid > article:last-child { grid-column: 1 / -1; }
}

/* Product recipe source-of-truth architecture */
.source-of-truth-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #cfe5d8;
  border-radius: 14px;
  background: #f3faf6;
}
.source-of-truth-note strong {
  flex: 0 0 auto;
  color: #17653a;
  font-size: 13px;
}
.source-of-truth-note span {
  color: #486156;
  font-size: 13px;
  line-height: 1.45;
}
.recipe-version-picker {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.recipe-version-picker .field {
  width: min(520px, 100%);
  margin: 0;
}
.selected-version-row {
  background: #f4faf6;
}
.workspace-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 720px) {
  .source-of-truth-note,
  .recipe-version-picker {
    align-items: stretch;
    flex-direction: column;
  }
  .workspace-card-actions {
    justify-content: flex-start;
    width: 100%;
  }
}


/* Initial boot state: prevents a silent white page when a module cannot load. */
.boot-state{min-height:100vh;display:grid;place-items:center;padding:32px;background:#f6f8f7}
.boot-card{display:grid;justify-items:center;gap:12px;max-width:460px;padding:32px;text-align:center;color:#1d2a22;background:#fff;border:1px solid #e5ebe7;border-radius:20px;box-shadow:0 18px 48px rgba(20,48,31,.08)}
.boot-card span{color:#68766e;font-size:14px;line-height:1.55}
.boot-spinner{width:30px;height:30px;border:3px solid #dce7df;border-top-color:#16794a;border-radius:50%;animation:boot-spin .8s linear infinite}
.boot-error{border-color:#efd6d6}
.boot-error strong{color:#9f2d2d}
@keyframes boot-spin{to{transform:rotate(360deg)}}


/* Admin partner and employee management */
.portal-toolbar { display:grid; grid-template-columns:minmax(280px,520px); gap:12px; padding:16px; border-bottom:1px solid var(--line); }
.portal-toolbar .field { margin:0; }
.data-table .button.small { min-height:32px; padding:6px 11px; font-size:11px; }
@media(max-width:720px){.portal-toolbar{grid-template-columns:1fr}.portal-toolbar .input{width:100%}}

/* Production execution */
.production-tabs{display:inline-flex;gap:4px;padding:4px;background:#eef3ef;border:1px solid var(--line);border-radius:12px;margin:0 0 16px}.production-tabs button{border:0;background:transparent;padding:9px 14px;border-radius:9px;font-weight:750;color:var(--muted);cursor:pointer}.production-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 3px 12px rgba(18,55,35,.08)}
.progress-inline,.progress-track{height:7px;background:#e7eee9;border-radius:999px;overflow:hidden;min-width:110px}.progress-inline span,.progress-track span{display:block;height:100%;background:var(--green);border-radius:inherit}.progress-track.large{height:11px}.production-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}.production-summary-grid>div{padding:14px;border:1px solid var(--line);border-radius:12px;background:#fbfcfb}.production-summary-grid small,.production-summary-grid strong{display:block}.production-summary-grid small{color:var(--muted);margin-bottom:7px}.production-action-bar{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 24px}.production-detail h3{margin:24px 0 12px}.event-list{border:1px solid var(--line);border-radius:14px;overflow:hidden}.event-row{display:flex;justify-content:space-between;gap:20px;padding:13px 15px;border-bottom:1px solid var(--line)}.event-row:last-child{border-bottom:0}.event-row strong,.event-row small{display:block}.event-row small,.event-row time{color:var(--muted);font-size:12px}.scale-admin-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:18px 20px;border-bottom:1px solid var(--line)}.scale-admin-head h3{margin:0 0 5px}.scale-station-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:18px}.scale-station-card{border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff}.scale-station-card header{display:flex;justify-content:space-between;gap:14px}.scale-station-card h3{margin:9px 0 4px}.scale-station-card p{margin:0;color:var(--muted)}.scale-live-value{font-size:34px;font-weight:800;margin:18px 0 5px}.connection-pill,.status-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.connection-pill.online,.status-badge.green{background:#e6f5eb;color:#177044}.connection-pill.offline,.status-badge.gray{background:#eef1ef;color:#65726b}.device-list{display:grid;gap:7px;margin-top:16px}.device-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;border:1px solid var(--line);background:#fafcfb;border-radius:11px;padding:11px;text-align:left;cursor:pointer}.device-row strong,.device-row small{display:block}.device-row small{color:var(--muted);margin-top:3px}.compact-empty{padding:18px}.production-page .field.compact{max-width:240px}
@media(max-width:900px){.production-summary-grid,.scale-station-grid{grid-template-columns:1fr}.scale-admin-head{flex-direction:column}.production-page .field.compact{max-width:none}}
.modal.xlarge{width:min(1280px,100%)}

/* Browser-connected WebHID scale station */
.browser-scale-model{display:grid;gap:4px;margin:14px 0;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fafcfa}.browser-scale-model strong{font-size:15px}.browser-scale-model small{color:var(--muted)}.field-help{display:block;color:var(--muted);font-size:11px;margin-top:5px}

/* Packing Materials — shared list and measurement controls. */
.packing-material-table { min-width: 1540px; }
.packing-dimensions-field { gap: 7px; }
.packing-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(90px, .45fr);
  gap: 10px;
  align-items: end;
}
.packing-dimensions-grid label { display: grid; gap: 5px; }
.packing-dimensions-grid label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.packing-measurement-pair > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.packing-bottle-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(90px, .55fr);
  gap: 10px;
  align-items: end;
}
.packing-bottle-dimensions-grid label { display: grid; gap: 5px; }
.packing-bottle-dimensions-grid label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.bottle-spec-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.bottle-shape-preview {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.bottle-shape-preview strong { margin-top: 14px; font-size: 14px; }
.bottle-shape-preview small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.bottle-shape-figure { position: relative; width: 104px; height: 190px; }
.bottle-shape-figure span,
.bottle-shape-figure::before,
.bottle-shape-figure::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 2px solid #789486; background: rgba(255,255,255,.78); }
.bottle-shape-figure span { top: 4px; width: 42px; height: 18px; border-radius: 5px 5px 2px 2px; z-index: 3; }
.bottle-shape-figure::after { top: 21px; width: 31px; height: 34px; border-top: 0; border-radius: 0 0 7px 7px; z-index: 2; }
.bottle-shape-figure::before { top: 46px; width: 88px; height: 137px; border-radius: 34px 34px 18px 18px; box-shadow: inset 12px 0 18px rgba(34,71,50,.05); }
.bottle-shape-preview[data-shape="cylinder"] .bottle-shape-figure::before { width: 78px; border-radius: 16px 16px 12px 12px; }
.bottle-shape-preview[data-shape="oval"] .bottle-shape-figure::before { width: 96px; border-radius: 48% 48% 35% 35%; }
.bottle-shape-preview[data-shape="square"] .bottle-shape-figure::before { width: 86px; border-radius: 8px; }
.bottle-shape-preview[data-shape="rectangular"] .bottle-shape-figure::before { width: 72px; border-radius: 7px; }
.bottle-shape-preview[data-shape="flask"] .bottle-shape-figure::before { width: 96px; border-radius: 10px 10px 22px 22px; clip-path: polygon(31% 0,69% 0,100% 100%,0 100%); }
.bottle-shape-preview[data-shape="specialty-custom"] .bottle-shape-figure::before { width: 92px; border-radius: 42px 14px 32px 12px; transform: translateX(-50%) rotate(-2deg); }
.measurement-unit-readout {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .packing-dimensions-grid, .packing-bottle-dimensions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottle-spec-layout { grid-template-columns: 1fr; }
  .bottle-shape-preview { min-height: 250px; }
}

@media (max-width: 520px) {
  .packing-dimensions-grid, .packing-bottle-dimensions-grid { grid-template-columns: 1fr; }
}

/* Packing Materials — product-style workspace replacing the legacy master popup. */
.packing-workspace-page { min-width: 0; }
.packing-workspace-header .workspace-header-actions { justify-content: flex-end; }
.packing-header-buttons { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; }
.packing-header-buttons .button { white-space: nowrap; }
.workspace-mode-label { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.packing-row-actions { min-width: 104px; flex-wrap: nowrap; }
.packing-row-actions .button { white-space: nowrap; }
.packing-action-trigger { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; color: var(--muted); }
.packing-header-action-trigger { width: 40px; height: 40px; border-radius: 10px; }
.packing-action-trigger[aria-expanded="true"],
.packing-action-trigger.active { color: var(--green-strong); border-color: #b8d8c2; background: var(--green-soft); }
.packing-action-popover { position: fixed; z-index: 140; width: 190px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); box-shadow: 0 18px 45px rgba(16, 28, 20, .18); animation: packing-action-menu-in .14s ease; }
.packing-action-menu-item { width: 100%; min-height: 40px; border: 0; border-radius: 9px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; color: var(--text); background: transparent; cursor: pointer; text-align: left; font: inherit; font-size: 12px; font-weight: 680; }
.packing-action-menu-item svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); }
.packing-action-menu-item:hover,
.packing-action-menu-item:focus-visible,
.packing-action-menu-item.active { outline: none; color: var(--green-strong); background: var(--green-soft); }
.packing-action-menu-item:hover svg,
.packing-action-menu-item:focus-visible svg,
.packing-action-menu-item.active svg { color: currentColor; }
.packing-action-menu-item.danger { color: var(--red); }
.packing-action-menu-item.danger:hover,
.packing-action-menu-item.danger:focus-visible { background: var(--red-soft); }
.packing-action-menu-item:disabled { opacity: .45; cursor: not-allowed; background: transparent; }
@keyframes packing-action-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.packing-pricing-fields { margin-top: 18px; }
.workspace-view-mode .toggle-field { cursor: default; }
.workspace-view-mode .input:disabled,
.workspace-view-mode .select:disabled,
.workspace-view-mode .textarea:disabled { opacity: 1; color: var(--text); -webkit-text-fill-color: var(--text); background: var(--surface-soft); cursor: default; }
.workspace-view-mode .toggle-field input:disabled + i { opacity: .82; }
.archive-banner { margin-top: 14px; border: 1px solid #e9c676; border-radius: 14px; padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; color: #725310; background: #fffaf0; }
.archive-banner strong, .archive-banner span { display: block; }
.archive-banner strong { flex: 0 0 auto; }
.archive-banner span { color: #846829; line-height: 1.45; }
.dependency-list { margin: -4px 0 15px; padding-left: 19px; color: var(--muted); line-height: 1.55; }
.dependency-list li + li { margin-top: 3px; }

@media (max-width: 1180px) {
  .packing-workspace-header .workspace-header-actions { justify-content: space-between; }
  .packing-header-buttons { justify-content: flex-start; }
}

@media (max-width: 780px) {
  .packing-row-actions { min-width: 0; justify-content: flex-start; }
  .packing-workspace-header .workspace-header-actions { align-items: stretch; flex-direction: column; }
  .packing-header-buttons { width: 100%; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .packing-header-buttons .button { flex: 1 1 auto; }
  .packing-header-action-trigger { flex: 0 0 40px; }
  .archive-banner { flex-direction: column; }
}

/* Customer sales workspace */
.customer-statement-filter .panel-body{display:flex;align-items:end;gap:14px}.customer-statement-filter .field{width:min(420px,100%)}
.customer-line-editor{margin:18px 0;border:1px solid var(--border);border-radius:16px;background:var(--surface-subtle,#fafafa);overflow:hidden}
.customer-line-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid var(--border);background:#fff}
.customer-line-header>div{display:grid;gap:2px}.customer-line-header span{font-size:12px;color:var(--muted)}
.customer-line-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(180px,1fr) 100px 120px 40px;gap:10px;align-items:end;padding:12px 14px;border-bottom:1px solid var(--border)}
.customer-line-row:last-child{border-bottom:0}.customer-line-row .field{margin:0}.customer-line-remove{margin-bottom:2px}
.check-row{display:flex;align-items:center;gap:9px;margin-top:14px;font-size:13px;color:var(--text)}
.button.compact{min-height:34px;padding:7px 11px;font-size:12px}
@media(max-width:900px){.customer-line-row{grid-template-columns:1fr 1fr}.customer-line-row .field.small{grid-column:auto}.customer-line-remove{justify-self:end}.customer-line-row [data-product]{min-width:0}}
@media(max-width:620px){.customer-line-header{align-items:flex-start}.customer-line-row{grid-template-columns:1fr}.customer-line-remove{justify-self:end}.customer-statement-filter .field{width:100%}}

/* Customer invoice editor — replaces the invoice popup with one full workspace */
.customer-invoice-workspace{margin:-30px -28px -48px;min-height:calc(100vh - var(--topbar));padding:0 0 88px;background:#f3f5f6}
.customer-invoice-workspace>form{min-height:calc(100vh - var(--topbar))}
.invoice-workspace-header{min-height:76px;padding:15px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);background:#fff}
.invoice-title-group{display:flex;align-items:flex-start;gap:12px;min-width:0}.invoice-title-group h1{font-size:22px;margin:0 0 3px}.invoice-title-group p{margin:0;color:var(--muted);font-size:12px}.invoice-title-group .eyebrow{margin:0 0 2px}
.invoice-header-actions,.invoice-footer-actions,.invoice-footer-links{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.invoice-lock-banner{margin:16px 22px 0;padding:13px 15px;display:flex;align-items:flex-start;gap:10px;border:1px solid #e9c676;border-radius:12px;color:#725310;background:#fffaf0}.invoice-lock-banner span{color:#846829}
.invoice-editor-card{margin:16px 22px 0;border:1px solid #d9e0dc;border-radius:14px;background:#fff;box-shadow:0 8px 26px rgba(20,38,26,.055);overflow:hidden}
.invoice-payment-banner{min-height:72px;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);background:#fff}.invoice-payment-banner>div{display:grid;gap:3px}.invoice-payment-banner span{color:var(--muted);font-size:12px}
.invoice-switch{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;font-weight:750;color:var(--green-strong)}.invoice-switch input{position:absolute;opacity:0;pointer-events:none}.invoice-switch i{position:relative;width:36px;height:20px;border-radius:999px;background:#cbd5ce;transition:.18s}.invoice-switch i::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(20,38,26,.2);transition:.18s}.invoice-switch input:checked+i{background:var(--green)}.invoice-switch input:checked+i::after{transform:translateX(16px)}.invoice-switch input:disabled+i{opacity:.55}
.invoice-customer-section{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(410px,.65fr);gap:30px;padding:22px 20px;background:#f6f7f8;border-bottom:1px solid var(--line)}
.invoice-section-label{font-size:12px;font-weight:780;color:#39453d}.invoice-customer-picker{min-width:0}.invoice-customer-controls{display:flex;align-items:center;gap:8px;margin-top:8px}.invoice-customer-controls .select{max-width:430px}.invoice-customer-summary{margin-top:13px;display:grid;gap:3px;color:var(--muted);font-size:12px}.invoice-customer-summary strong{color:var(--text);font-size:14px}.invoice-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 13px}.invoice-meta-grid .field,.invoice-reference-grid .field{margin:0}
.invoice-reference-grid{display:grid;grid-template-columns:minmax(240px,1fr) minmax(240px,1fr) minmax(240px,1fr);gap:12px;padding:15px 20px;border-bottom:1px solid var(--line);background:#fff}
.invoice-products-section{padding:20px}.invoice-products-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.invoice-products-heading p{margin:3px 0 0;color:var(--muted);font-size:12px}.invoice-products-actions{display:flex;gap:7px;flex-wrap:wrap}
.invoice-lines-table{overflow-x:auto;border:1px solid var(--line);border-radius:11px;background:#fff}.invoice-line-head,.invoice-line-row{min-width:1020px;display:grid;grid-template-columns:minmax(230px,1.45fr) minmax(220px,1.25fr) 84px 116px 112px 70px 42px;gap:0;align-items:center}.invoice-line-head{min-height:38px;color:#5c685f;font-size:10px;font-weight:760;text-transform:uppercase;letter-spacing:.04em;background:#f7f9f8;border-bottom:1px solid var(--line)}.invoice-line-head span{padding:0 9px}.invoice-line-row{min-height:56px;border-bottom:1px solid var(--line)}.invoice-line-row:last-child{border-bottom:0}.invoice-line-row>.select,.invoice-line-row>.input{min-height:55px;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent}.invoice-line-row>.select:focus,.invoice-line-row>.input:focus{position:relative;z-index:1;box-shadow:inset 0 0 0 2px #75b88e}.invoice-line-amount{height:55px;padding:0 10px;display:flex;align-items:center;justify-content:flex-end;border-right:1px solid var(--line);font-variant-numeric:tabular-nums}.invoice-tax-check{height:55px;display:grid;place-items:center;gap:2px;border-right:1px solid var(--line);font-size:9px;color:var(--muted)}.invoice-tax-check input{accent-color:var(--green)}.invoice-line-row>.icon-button{margin:auto;width:32px;height:32px;border:0;color:var(--red)}
.invoice-lower-grid{display:grid;grid-template-columns:minmax(360px,1fr) minmax(330px,420px);gap:36px;padding:22px 20px 30px;border-top:1px solid var(--line)}.invoice-notes-stack{max-width:560px;display:grid;gap:14px}.invoice-notes-stack .textarea{min-height:76px;resize:vertical}.invoice-attachment-card{min-height:76px;padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px dashed var(--line-strong);border-radius:11px;background:#fafcfa}.invoice-attachment-card>div{display:grid;gap:3px}.invoice-attachment-card span{color:var(--muted);font-size:11px}
.invoice-totals-panel{align-self:start;padding:3px 0}.invoice-total-row,.invoice-balance-row{min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:20px;font-variant-numeric:tabular-nums}.invoice-total-row.muted{color:var(--muted);font-size:12px}.invoice-total-control{min-height:48px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px}.invoice-total-control>label{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#48544c}.invoice-total-control>label>div{position:relative;width:145px;display:flex;align-items:center}.invoice-total-control .select{width:54px;border-radius:9px 0 0 9px}.invoice-total-control .select+.input{border-left:0;border-radius:0 9px 9px 0}.invoice-total-control .input{min-height:36px;padding-top:7px;padding-bottom:7px;text-align:right}.invoice-total-control strong{min-width:92px;text-align:right}.input-prefix,.input-suffix{position:absolute;z-index:1;color:var(--muted);font-size:12px}.input-prefix{left:10px}.input-suffix{right:10px}.input-prefix+.input{padding-left:24px}.invoice-total-control [data-tax-rate]{padding-right:25px}.invoice-grand-total{margin-top:8px;padding-top:12px;border-top:1px solid var(--line);font-size:15px}.invoice-grand-total strong{font-size:18px}.invoice-balance-row{margin-top:8px;padding:12px 0;border-top:1px solid var(--line);color:var(--green-strong);font-weight:800;font-size:15px}
.invoice-action-footer{position:sticky;z-index:12;bottom:0;min-height:70px;margin-top:18px;padding:13px 22px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);box-shadow:0 -8px 24px rgba(20,38,26,.06)}
.invoice-locked .invoice-editor-card input:disabled,.invoice-locked .invoice-editor-card select:disabled,.invoice-locked .invoice-editor-card textarea:disabled{color:#4d5951;background:#f7f8f7;opacity:1}

@media(max-width:1150px){.invoice-customer-section{grid-template-columns:1fr}.invoice-meta-grid{max-width:680px}.invoice-reference-grid{grid-template-columns:1fr 1fr}.invoice-lower-grid{grid-template-columns:1fr minmax(320px,390px)}}
@media(max-width:900px){.customer-invoice-workspace{margin:-22px -16px -40px}.invoice-editor-card{margin:12px 12px 0}.invoice-workspace-header{padding:13px 14px}.invoice-lock-banner{margin:12px 12px 0}.invoice-customer-section,.invoice-products-section,.invoice-reference-grid,.invoice-lower-grid{padding-left:14px;padding-right:14px}.invoice-reference-grid{grid-template-columns:1fr}.invoice-lower-grid{grid-template-columns:1fr}.invoice-notes-stack{max-width:none}.invoice-totals-panel{max-width:none}.invoice-action-footer{padding:11px 14px}}
@media(max-width:620px){.invoice-workspace-header{align-items:flex-start}.invoice-header-actions{justify-content:flex-end}.invoice-header-actions .button{font-size:0;width:40px;padding:8px}.invoice-customer-controls{align-items:stretch;flex-direction:column}.invoice-customer-controls .select{max-width:none}.invoice-meta-grid{grid-template-columns:1fr 1fr}.invoice-payment-banner{align-items:flex-start}.invoice-products-heading{flex-direction:column}.invoice-products-actions{width:100%}.invoice-products-actions .button{flex:1}.invoice-action-footer{align-items:stretch;flex-direction:column}.invoice-footer-links,.invoice-footer-actions{width:100%;justify-content:space-between}.invoice-footer-actions .button{flex:1}.invoice-lock-banner{flex-direction:column}}
@media(max-width:440px){.invoice-meta-grid{grid-template-columns:1fr}.invoice-title-group h1{font-size:19px}.invoice-footer-links{display:none}}

@media print{
  .sidebar,.topbar,.invoice-workspace-header .icon-button,.invoice-header-actions,.invoice-payment-banner,.invoice-products-actions,.invoice-line-row>.icon-button,.invoice-action-footer,.invoice-lock-banner{display:none!important}
  .app-shell{display:block}.main{display:block}.content{width:100%;max-width:none;padding:0}.customer-invoice-workspace{margin:0;padding:0;background:#fff}.invoice-editor-card{margin:0;border:0;box-shadow:none}.invoice-customer-section{background:#fff}.invoice-lines-table{overflow:visible}.invoice-line-head,.invoice-line-row{min-width:0;grid-template-columns:2fr 1.5fr .5fr .7fr .8fr .4fr}.invoice-line-head span:last-child,.invoice-line-row>*:last-child{display:none}.invoice-lower-grid{grid-template-columns:1fr 340px}.input,.select,.textarea{border-color:#d6ddd8!important;box-shadow:none!important}
}

/* Employee Portal customer-sales access assignment */
.employee-access-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.employee-access-heading>div:first-child{display:grid;gap:4px}.employee-access-actions{display:flex;gap:8px}.employee-access-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.employee-access-card{position:relative;display:grid;grid-template-columns:auto 1fr;gap:11px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.employee-access-card:hover{border-color:#a9cbb7;box-shadow:0 8px 22px rgba(29,75,48,.07)}.employee-access-card:has(input:checked){border-color:#63a77d;background:#f3faf5;box-shadow:0 0 0 2px rgba(46,129,78,.08)}.employee-access-card input{margin-top:3px}.employee-access-card strong,.employee-access-card small{display:block}.employee-access-card strong{font-size:13px}.employee-access-card small{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45}.employee-access-note{margin-top:12px;padding:12px 14px;border-radius:12px;background:#f5f8f6;color:var(--muted);font-size:12px;line-height:1.5}@media(max-width:980px){.employee-access-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.employee-access-heading{align-items:flex-start;flex-direction:column}.employee-access-grid{grid-template-columns:1fr}}

/* People / HR lifecycle — one connected implementation from recruiting to archival */
.people-page{min-width:0}.people-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.people-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.people-list-card,.people-compliance-card,.people-report-card{min-width:0}.people-mini-list{display:grid}.people-mini-row{min-height:66px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--line)}.people-mini-row:first-child{border-top:0}.people-mini-row>div{min-width:0;display:grid;gap:4px}.people-mini-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.people-mini-row span,.people-empty-mini{color:var(--muted);font-size:12px}.people-empty-mini{padding:24px 18px;text-align:center}.people-control-list{display:grid;gap:12px;padding:0 18px 18px}.people-control{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fbfdfb}.people-control-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;color:var(--green-strong);background:var(--green-soft)}.people-control-icon svg{width:19px;height:19px}.people-control>div:last-child{display:grid;gap:4px}.people-control span{color:var(--muted);font-size:11px;line-height:1.5}
.people-section-tabs,.employee-workspace-tabs{position:relative;z-index:2;display:flex;gap:4px;overflow-x:auto;margin-bottom:16px;padding:5px;border:1px solid var(--line);border-radius:14px;background:#f7f9f7;scrollbar-width:thin;pointer-events:auto}.employee-tab{position:relative;z-index:1;flex:0 0 auto;min-height:38px;padding:8px 13px;border:0;border-radius:10px;color:#5d675f;background:transparent;font:inherit;font-size:12px;font-weight:720;cursor:pointer;white-space:nowrap;pointer-events:auto;touch-action:manipulation}.employee-tab:hover{color:var(--text);background:#fff}.employee-tab.active{color:var(--green-strong);background:#fff;box-shadow:0 1px 5px rgba(20,38,26,.11)}
.employee-cell{display:flex;align-items:center;gap:11px}.employee-list-avatar,.employee-workspace-avatar{display:grid;place-items:center;border:1px solid #cfe6d7;color:var(--green-strong);background:linear-gradient(145deg,#e8f7ed,#fbfdfb);font-weight:820}.employee-list-avatar{width:38px;height:38px;border-radius:12px}.employee-workspace-page{max-width:1540px;margin:0 auto}.employee-workspace-header{min-height:148px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:20px;align-items:center;margin-bottom:16px;padding:22px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.employee-workspace-avatar{width:92px;height:92px;border-radius:22px;font-size:28px}.employee-workspace-header .workspace-header-actions{align-items:center}.employee-overview-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:16px}.employee-stack{display:grid;gap:16px}.employee-record-card{min-width:0}.employee-definition-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin:0}.employee-definition-list>div{min-height:60px;padding:11px 0;border-top:1px solid var(--line)}.employee-definition-list>div:nth-child(-n+2){border-top:0}.employee-definition-list dt{color:var(--muted);font-size:10px;font-weight:760;text-transform:uppercase;letter-spacing:.05em}.employee-definition-list dd{margin:5px 0 0;font-size:13px;font-weight:650;line-height:1.45}.employee-lifecycle-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.employee-lifecycle-strip>div{min-height:70px;padding:13px;border:1px solid var(--line);border-radius:13px;background:#fafcfa}.employee-lifecycle-strip span,.employee-lifecycle-strip strong{display:block}.employee-lifecycle-strip span{color:var(--muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.employee-lifecycle-strip strong{margin-top:7px;font-size:13px}.people-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.people-form-grid .field.wide,.people-form-grid .toggle-card{grid-column:1/-1}
.people-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.people-bars{display:grid;gap:14px;padding:0 18px 20px}.people-bar-row{display:grid;gap:7px}.people-bar-label{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:12px}.people-bar-label span{color:var(--muted)}.people-bar-track{height:9px;border-radius:999px;overflow:hidden;background:#edf1ee}.people-bar-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5ca876,#2f7e4b)}
@media(max-width:1240px){.people-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.employee-workspace-header{grid-template-columns:auto minmax(0,1fr)}.employee-workspace-header .workspace-header-actions{grid-column:1/-1;padding-top:14px;border-top:1px solid var(--line)}.people-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.people-dashboard-grid,.people-report-grid,.employee-overview-grid{grid-template-columns:1fr}.employee-workspace-header{grid-template-columns:72px minmax(0,1fr);padding:16px}.employee-workspace-avatar{width:72px;height:72px;border-radius:17px}.employee-definition-list{grid-template-columns:1fr}.employee-definition-list>div:nth-child(2){border-top:1px solid var(--line)}}
@media(max-width:650px){.people-kpis{grid-template-columns:1fr}.people-form-grid{grid-template-columns:1fr}.employee-workspace-header{grid-template-columns:58px minmax(0,1fr);gap:12px}.employee-workspace-avatar{width:58px;height:58px;border-radius:14px;font-size:20px}.employee-workspace-header .workspace-header-actions{align-items:stretch;flex-direction:column}.employee-workspace-header .workspace-summary{width:100%;grid-template-columns:1fr}.employee-lifecycle-strip{grid-template-columns:1fr}.people-mini-row{align-items:flex-start;flex-direction:column}.people-report-grid{grid-template-columns:1fr}}
@media print{.people-section-tabs,.employee-workspace-tabs,.page-actions,.workspace-back,.workspace-header-actions .button,.employee-record-card .button{display:none!important}.people-dashboard-grid,.people-report-grid{grid-template-columns:1fr 1fr}.panel,.workspace-card,.employee-workspace-header{break-inside:avoid;box-shadow:none}}

/* Product pack sizes and pack-specific packing-material assignments */
.product-packaging-shell { padding: 0; overflow: hidden; }
.product-packaging-header { margin: 0; padding: 20px 20px 12px; }
.workspace-subtabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.workspace-subtab { min-height: 38px; border: 1px solid transparent; border-radius: 10px; padding: 8px 13px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 720; white-space: nowrap; }
.workspace-subtab:hover { color: var(--text); background: #f6f9f7; }
.workspace-subtab.active { color: var(--green-strong); border-color: #cbe5d3; background: var(--green-soft); box-shadow: 0 2px 8px rgba(25, 104, 55, .06); }
.product-packaging-subpanel { padding: 20px; }
.pack-size-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.pack-size-main { min-width: 0; }
.pack-section-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.pack-section-heading > div { flex: 1; min-width: 0; }
.pack-section-heading h3 { margin: 0 0 4px; font-size: 17px; }
.pack-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pack-base-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.pack-base-summary > div { min-height: 92px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafcfa; }
.pack-base-summary span,.pack-base-summary strong,.pack-base-summary small { display: block; }
.pack-base-summary span { color: var(--muted); font-size: 10px; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
.pack-base-summary strong { margin-top: 7px; color: var(--green-strong); font-size: 24px; }
.pack-base-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pack-size-table { min-width: 1180px; }
.pack-assignment-table { min-width: 1250px; }
.pack-positive { color: var(--green-strong); }
.pack-calculator-card { position: sticky; top: calc(var(--topbar) + 82px); display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg,#fbfdfb,#f6faf7); box-shadow: var(--shadow-sm); }
.pack-calculator-title { display: flex; gap: 10px; align-items: center; }
.pack-calculator-title svg { width: 22px; height: 22px; color: var(--green-strong); }
.pack-calculator-title strong,.pack-calculator-title span { display: block; }
.pack-calculator-title strong { font-size: 14px; }
.pack-calculator-title span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.pack-calculator-results { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pack-calculator-results > div { padding: 12px; border: 1px solid #d8e9dd; border-radius: 12px; background: #fff; }
.pack-calculator-results span,.pack-calculator-results strong { display: block; }
.pack-calculator-results span { color: var(--muted); font-size: 10px; }
.pack-calculator-results strong { margin-top: 5px; color: var(--green-strong); font-size: 22px; }
.pack-formula-note,.pack-example-list { display: grid; gap: 5px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.pack-formula-note strong,.pack-example-list strong { font-size: 11px; }
.pack-formula-note span,.pack-example-list span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.pack-modal-preview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 12px; border: 1px solid #cfe6d7; border-radius: 14px; background: var(--green-soft); }
.pack-modal-preview > div { min-width: 0; }
.pack-modal-preview span,.pack-modal-preview strong { display: block; }
.pack-modal-preview span { color: var(--muted); font-size: 10px; }
.pack-modal-preview strong { margin-top: 5px; color: var(--green-strong); font-size: 21px; }
.pack-settings-form { padding-top: 2px; }
.packing-pack-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 4px 7px; border: 1px solid #cfe6d7; border-radius: 8px; background: var(--green-soft); color: var(--green-strong); font-size: 10px; }
.packing-pack-link strong { font-size: 10px; }
.packing-pack-link span { color: var(--muted); }
@media(max-width:1180px){.pack-size-layout{grid-template-columns:1fr}.pack-calculator-card{position:static}.pack-base-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.product-packaging-header,.product-packaging-subpanel{padding:16px}.workspace-subtabs{padding:0 16px 10px}.pack-section-heading{flex-direction:column}.pack-section-heading .button{width:100%}.pack-base-summary,.pack-modal-preview{grid-template-columns:1fr}.pack-calculator-results{grid-template-columns:1fr}}

/* Controlled recipe versions and ingredient tolerances */
.source-of-truth-note.amber{background:#fff8e8;border-color:#efd69a;color:#735514}.source-of-truth-note.amber strong{color:#735514}.recipe-approval-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}.recipe-approval-strip>div{padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fafcfa}.recipe-approval-strip span,.recipe-approval-strip strong{display:block}.recipe-approval-strip span{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}.recipe-approval-strip strong{margin-top:5px}.recipe-history-list{display:grid}.recipe-history-list article{display:flex;justify-content:space-between;gap:18px;padding:15px 20px;border-top:1px solid var(--line)}.recipe-history-list article:first-child{border-top:0}.recipe-history-list strong,.recipe-history-list span{display:block}.recipe-history-list span,.recipe-history-list time{color:var(--muted);font-size:12px;margin-top:4px}.recipe-history-list p{margin:7px 0 0;color:var(--ink);font-size:13px}.recipe-tolerance-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px;border:1px solid #cfe2d6;border-radius:14px;background:#f3faf6}.recipe-tolerance-preview>div{padding:11px 12px;border-radius:10px;background:#fff}.recipe-tolerance-preview span,.recipe-tolerance-preview strong{display:block}.recipe-tolerance-preview span{font-size:11px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.04em}.recipe-tolerance-preview strong{margin-top:6px;color:var(--green);font-size:17px}.workspace-card-actions .button.danger{border-color:#efc7c4;background:#fff7f6;color:#bc302b}.recipe-bom-table td{vertical-align:top}@media(max-width:900px){.recipe-approval-strip,.recipe-tolerance-preview{grid-template-columns:1fr}.recipe-history-list article{display:block}.recipe-history-list time{display:block;margin-top:8px}}

/* Recipe quantity display: oz / g / kg */
.recipe-bom-header-actions{align-items:flex-end;gap:10px;flex-wrap:wrap}.recipe-mass-display-control{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:190px}.recipe-mass-display-control>span,.recipe-stored-unit>span{font-size:10px;font-weight:850;letter-spacing:.055em;text-transform:uppercase;color:var(--muted)}.recipe-mass-display-control>small,.recipe-stored-unit>small{font-size:10px;line-height:1.35;color:var(--muted)}.recipe-unit-segmented{display:inline-grid;grid-template-columns:repeat(3,minmax(46px,1fr));gap:3px;padding:4px;border:1px solid var(--line);border-radius:12px;background:#f2f6f3}.recipe-unit-segmented button{border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:850;line-height:1;padding:9px 12px;cursor:pointer;text-transform:lowercase}.recipe-unit-segmented button:hover:not(:disabled){color:var(--green)}.recipe-unit-segmented button.active{background:#fff;color:var(--green);box-shadow:0 1px 5px rgba(18,63,44,.12)}.recipe-unit-segmented button:disabled{opacity:.35;cursor:not-allowed}.recipe-unit-editor{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,.7fr);gap:14px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fafcfb}.recipe-stored-unit{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;padding-left:14px;border-left:1px solid var(--line)}.recipe-stored-unit strong{font-size:18px;color:var(--ink)}.recipe-unit-input{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.recipe-unit-input .input{border:0;border-radius:0;box-shadow:none}.recipe-unit-input>span{min-width:48px;padding:0 12px;color:var(--muted);font-size:12px;font-weight:850;text-align:center;border-left:1px solid var(--line);text-transform:lowercase}
@media(max-width:900px){.recipe-bom-header-actions{width:100%;align-items:stretch}.recipe-mass-display-control{width:100%}.recipe-unit-segmented{width:100%}.recipe-unit-editor{grid-template-columns:1fr}.recipe-stored-unit{padding:12px 0 0;border-left:0;border-top:1px solid var(--line)}}


/* Inline finished-product pack quantity editing */
.pack-inline-edit-note { display:flex; gap:10px; align-items:flex-start; margin:0 0 14px; padding:11px 13px; border:1px solid #d8e9dd; border-radius:12px; background:#f5faf6; color:var(--muted); font-size:11px; line-height:1.45; }
.pack-inline-edit-note strong { flex:0 0 auto; color:var(--green-strong); }
.pack-inline-quantity-table { min-width:880px; }
.pack-equivalent-edit { display:inline-flex; flex-direction:column; align-items:flex-start; gap:3px; min-width:150px; padding:6px 8px; border:1px solid transparent; border-radius:10px; background:transparent; text-align:left; cursor:pointer; }
.pack-equivalent-edit strong { color:var(--green-strong); font-size:15px; line-height:1; }
.pack-equivalent-edit span { color:var(--muted); font-size:10px; }
.pack-equivalent-edit:hover:not(:disabled),.pack-equivalent-edit:focus-visible { border-color:#cfe6d7; background:var(--green-soft); outline:none; }
.pack-equivalent-edit:disabled { cursor:not-allowed; opacity:.65; }
.pack-inline-equivalent-editor { display:grid; grid-template-columns:minmax(105px,140px) auto; gap:6px 8px; align-items:end; min-width:230px; }
.pack-inline-equivalent-editor label { display:grid; gap:4px; }
.pack-inline-equivalent-editor label>span { color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.pack-inline-equivalent-editor .input { min-height:34px; padding:7px 9px; font-weight:800; color:var(--green-strong); }
.pack-inline-equivalent-preview { grid-column:1/-1; color:var(--muted); font-size:10px; }
.pack-inline-equivalent-preview strong { color:var(--text); }
.pack-inline-equivalent-actions { display:flex; gap:4px; align-items:center; }
.success-icon { color:var(--green-strong); border-color:#cfe6d7; background:var(--green-soft); }
@media(max-width:720px){.pack-inline-edit-note{display:block}.pack-inline-edit-note strong{display:block;margin-bottom:4px}.pack-inline-equivalent-editor{min-width:210px}}


/* Purchasing vendors: supplier master, PO, receiving, payables, and checks */
.vendor-purchasing-page .panel{overflow:hidden}.vendor-purchasing-page .data-table{min-width:980px}.vendor-receipt-layout{display:grid;gap:0}.vendor-receipt-layout>section+section{border-top:1px solid var(--line)}.panel-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 20px 8px}.panel-section-heading h2{margin:0;font-size:18px}.panel-section-heading p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.po-line-card{position:relative;margin-top:12px;padding:15px 52px 15px 15px;border:1px solid var(--line);border-radius:14px;background:#fafcfa}.po-line-remove{position:absolute;right:12px;top:12px}.vendor-purchasing-page input[type="checkbox"][data-check-id]{width:17px;height:17px;accent-color:var(--green-strong)}
@media(max-width:720px){.panel-section-heading{padding:16px 16px 8px}.po-line-card{padding:14px 48px 14px 14px}.vendor-purchasing-page .page-actions{width:100%}.vendor-purchasing-page .page-actions .button{flex:1}}

/* Vendor dashboard: supplier balances, bills, purchase commitments, and payment readiness */
.vendor-dashboard-page .vendor-page-header{align-items:center}
.vendor-dashboard-page .vendor-page-header h1{font-size:30px;letter-spacing:-.035em}
.vendor-header-actions{align-items:center}
.vendor-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.vendor-summary-card{min-height:118px;padding:17px 18px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:4px;border:0;border-radius:14px;text-align:left;cursor:pointer;box-shadow:var(--shadow-sm);transition:transform .16s ease,box-shadow .16s ease}
.vendor-summary-card:hover,.vendor-summary-card:focus-visible{transform:translateY(-2px);box-shadow:0 14px 34px rgba(20,38,26,.14);outline:none}
.vendor-summary-card span{font-size:11px;font-weight:850;letter-spacing:.045em;text-transform:uppercase;opacity:.85}
.vendor-summary-card strong{font-size:27px;line-height:1.1;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.vendor-summary-card small{font-size:11px;font-weight:750;opacity:.88}
.vendor-summary-card.unbilled{color:#073d43;background:linear-gradient(135deg,#27c5ce,#83e1df)}
.vendor-summary-card.overdue{color:#fff;background:linear-gradient(135deg,#e66d16,#ee8b3a)}
.vendor-summary-card.open-bills{color:#27313a;background:linear-gradient(135deg,#dfe6ea,#eef2f4)}
.vendor-summary-card.paid{color:#fff;background:linear-gradient(135deg,#13933f,#21ad52)}
.vendor-dashboard-page>.panel{overflow:hidden}
.vendor-dashboard-toolbar{min-height:112px;padding:18px 20px 15px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);background:#fff}
.vendor-dashboard-toolbar>div:first-child{display:grid;gap:13px;min-width:min(100%,520px)}
.vendor-filter-line{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}
.vendor-filter-chip{padding:6px 10px;border:1px solid #d8e2dc;border-radius:8px;background:#edf2ef;color:#536159;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.vendor-clear-filter{padding:0;border:0;background:transparent;color:var(--green-strong);font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.vendor-search{width:min(100%,360px);min-height:40px;padding:0 12px;display:flex;align-items:center;gap:9px;border:1px solid var(--line-strong);border-radius:9px;background:#fff}
.vendor-search:focus-within{border-color:#74b98e;box-shadow:0 0 0 3px rgba(22,136,70,.1)}
.vendor-search svg{width:18px;height:18px;color:var(--muted)}
.vendor-search input{width:100%;border:0;outline:0;background:transparent;color:var(--text)}
.vendor-table-tools{display:flex;align-items:center;gap:8px}
.vendor-dashboard-page .data-table{min-width:1320px}
.vendor-dashboard-page .data-table th{white-space:nowrap}
.vendor-dashboard-page .data-table td{vertical-align:middle}
.vendor-dashboard-page input[type="checkbox"][data-vendor-id]{width:17px;height:17px;accent-color:var(--green-strong)}
.vendor-name-button,.vendor-link-button{padding:0;border:0;background:transparent;color:var(--green-strong);font:inherit;text-align:left;cursor:pointer}
.vendor-name-button{display:grid;gap:3px}
.vendor-name-button strong{font-size:13px;color:var(--text)}
.vendor-name-button small{font-size:10px;color:var(--muted)}
.vendor-link-button{font-size:12px;font-weight:780}
.vendor-link-button:hover,.vendor-email-link:hover{text-decoration:underline}
.vendor-email-link{color:#265f9a;font-size:12px}
.vendor-action-wrap{display:flex;align-items:center;gap:6px;white-space:nowrap}
.vendor-action-wrap .icon-button{width:30px;height:30px}
.vendor-ach-status,.vendor-dashboard-page td>strong+.vendor-overdue-copy{display:grid;gap:2px}
.vendor-ach-status strong{font-size:12px}
.vendor-ach-status small,.vendor-overdue-copy{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.vendor-ach-status.ready strong{color:var(--green-strong)}
.vendor-ach-status.pending strong{color:var(--amber)}
.vendor-ach-status.missing strong,.vendor-overdue-copy{color:var(--red)}
@media(max-width:1180px){.vendor-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.vendor-dashboard-page .vendor-page-header{align-items:flex-start}.vendor-summary-grid{grid-template-columns:1fr}.vendor-summary-card{min-height:100px}.vendor-dashboard-toolbar{align-items:stretch;flex-direction:column}.vendor-dashboard-toolbar>div:first-child,.vendor-search{width:100%}.vendor-table-tools{align-self:flex-end}}
@media print{.sidebar,.topbar,.vendor-page-header .page-actions,.vendor-summary-grid,.vendor-dashboard-toolbar .vendor-table-tools{display:none!important}.app-shell{display:block}.main,.content{margin:0;padding:0}.vendor-dashboard-page .panel{border:0;box-shadow:none}.vendor-dashboard-page .data-table{min-width:0;font-size:10px}}

/* Vendor detail and purchase-order workspace */
.vendor-detail-page,.purchase-order-workspace{max-width:none}
.vendor-detail-topline,.po-workspace-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.vendor-detail-left-actions{display:flex;align-items:center;gap:10px}.vendor-directory-toggle{display:none}.vendor-directory-collapsed .vendor-directory-toggle{display:inline-flex}
.back-link{display:inline-flex;align-items:center;gap:7px;padding:0;border:0;background:transparent;color:var(--green-strong);font:inherit;font-size:13px;font-weight:800;cursor:pointer}
.back-link svg{width:15px;height:15px;transform:rotate(180deg)}
.vendor-detail-actions{display:flex;align-items:center;gap:9px}
.vendor-detail-shell{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;min-height:650px;transition:grid-template-columns .2s ease,gap .2s ease}.vendor-detail-page.vendor-directory-collapsed .vendor-detail-shell{grid-template-columns:0 minmax(0,1fr);gap:0}
.vendor-directory-panel{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-sm);opacity:1;transform:translateX(0);transition:opacity .16s ease,transform .2s ease,border-color .2s ease}.vendor-detail-page.vendor-directory-collapsed .vendor-directory-panel{width:0;min-width:0;opacity:0;transform:translateX(-10px);visibility:hidden;pointer-events:none;border-color:transparent}.vendor-detail-page.vendor-directory-unpinned:not(.vendor-directory-collapsed) .vendor-directory-panel{box-shadow:0 18px 42px rgba(20,38,26,.12)}
.vendor-directory-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 14px 10px}.side-panel-controls{display:flex;align-items:center;gap:4px}.side-panel-controls .icon-button{width:31px;height:31px;border-radius:9px}.side-panel-controls .icon-button svg{width:16px;height:16px}
.vendor-directory-head strong{font-size:18px}
.vendor-directory-search{margin:0 12px 10px;min-height:39px;padding:0 10px;display:flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:9px;background:#fff}
.vendor-directory-search svg{width:17px;height:17px;color:var(--muted)}
.vendor-directory-search input{width:100%;border:0;outline:0;background:transparent;font:inherit}
.vendor-directory-sort{margin:0 12px 8px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;color:var(--green-strong);font-size:12px;font-weight:800;text-align:center}
.vendor-directory-list{max-height:550px;overflow:auto;border-top:1px solid var(--line)}
.vendor-directory-row{width:100%;padding:12px 14px;display:grid;gap:3px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;cursor:pointer}
.vendor-directory-row:hover{background:#f7faf8}.vendor-directory-row.active{background:#e8f1ff}
.vendor-directory-row strong{font-size:12px;color:var(--text)}.vendor-directory-row span{font-size:11px;color:var(--muted)}
.vendor-directory-empty{padding:24px 14px;color:var(--muted);font-size:12px;text-align:center}
.vendor-detail-main{min-width:0}
.vendor-profile-card{padding:20px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-sm)}
.vendor-profile-title{display:flex;align-items:center;gap:10px;margin-bottom:18px}.vendor-profile-title h1{margin:0;font-size:27px;letter-spacing:-.035em}
.vendor-profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.vendor-profile-grid>div{display:grid;gap:5px;align-content:start}.vendor-profile-grid span,.vendor-detail-cell span{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.vendor-profile-grid strong{font-size:12px;line-height:1.55}.vendor-profile-grid .vendor-ach-status small{display:none}
.vendor-detail-tabs{display:flex;align-items:center;gap:18px;margin-top:14px;padding:0 14px;border-bottom:1px solid var(--line)}
.vendor-detail-tabs button{padding:12px 0;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:800;cursor:pointer}
.vendor-detail-tabs button.active{border-color:var(--green-strong);color:var(--text)}
.vendor-transaction-panel{margin-top:12px;overflow:hidden}
.vendor-transaction-toolbar{padding:14px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line)}
.vendor-transaction-toolbar .select{width:auto;min-width:170px}.vendor-filter-search{min-width:220px;min-height:40px;padding:0 10px;display:flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:9px}
.vendor-filter-search svg{width:17px;height:17px;color:var(--muted)}.vendor-filter-search input{width:100%;border:0;outline:0;background:transparent}
.vendor-transaction-panel .data-table{min-width:900px}
.vendor-info-panel,.vendor-notes-panel{margin-top:12px;padding:20px}.vendor-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.vendor-detail-cell{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fafcfa}.vendor-detail-cell strong{font-size:13px;line-height:1.45}
.vendor-notes-panel{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.vendor-notes-panel h2{margin:0 0 8px}.vendor-notes-panel p{margin:0;color:var(--muted);line-height:1.65;white-space:pre-wrap}
.vendor-new-transaction{position:relative}.vendor-new-transaction summary{list-style:none;cursor:pointer}.vendor-new-transaction summary::-webkit-details-marker{display:none}.vendor-new-transaction summary svg{width:14px;height:14px}
.vendor-transaction-dropdown{position:absolute;right:0;top:calc(100% + 7px);z-index:20;width:210px;padding:7px;border:1px solid var(--line);border-radius:11px;background:#fff;box-shadow:0 18px 45px rgba(17,35,23,.18)}
.vendor-transaction-dropdown button{width:100%;padding:10px 11px;border:0;border-radius:7px;background:transparent;color:var(--text);font:inherit;font-size:12px;text-align:left;cursor:pointer}.vendor-transaction-dropdown button:hover{background:#f1f6f2;color:var(--green-strong)}

.purchase-order-workspace{padding-bottom:88px}.po-workspace-header h1{margin:8px 0 0;font-size:25px}.po-workspace-total{display:grid;gap:4px;text-align:right}.po-workspace-total span{color:var(--muted);font-size:11px;text-transform:capitalize}.po-workspace-total strong{font-size:25px}
.po-header-panel,.po-items-panel{padding:18px}.po-header-fields{display:grid;grid-template-columns:1.3fr 1.4fr .8fr .9fr;gap:12px}.po-address-grid{display:grid;grid-template-columns:1fr 1fr 1fr .7fr;gap:12px;margin-top:16px}.po-address-grid .textarea{min-height:110px}.po-date-fields{display:grid;gap:10px}.po-shipping-address{margin-top:8px}
.po-items-panel{margin-top:14px}.po-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.po-section-heading h2{margin:0;font-size:18px}.po-section-heading p{margin:5px 0 0;color:var(--muted);font-size:12px}
.po-items-table{overflow:auto;border:1px solid var(--line);border-radius:11px}.po-items-head,.po-workspace-line{min-width:1060px;display:grid;grid-template-columns:34px minmax(240px,1.5fr) minmax(230px,1.35fr) 110px 95px 115px 110px 42px;gap:8px;align-items:center}
.po-items-head{padding:9px 10px;background:#f6f8f6;color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.po-workspace-line{padding:9px 10px;border-top:1px solid var(--line);background:#fff}.po-workspace-line:first-child{border-top:0}.po-line-number{color:var(--muted);font-size:12px;text-align:center}.po-item-select-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center}.po-item-select-wrap small{grid-column:1/-1;color:var(--muted);font-size:9px}.po-inline-create{padding:7px 8px;border:1px solid var(--line);border-radius:7px;background:#f7faf8;color:var(--green-strong);font-size:10px;font-weight:800;cursor:pointer}.po-workspace-line>[data-line-amount]{text-align:right;font-size:12px}.po-line-actions{display:flex;gap:8px;margin-top:10px}
.po-bottom-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:40px;margin-top:22px}.po-bottom-grid .textarea{min-height:100px}.field-help{display:block;margin-top:6px;color:var(--muted);font-size:10px;line-height:1.45}.po-totals{display:grid;align-content:start}.po-totals label{min-height:42px;display:grid;grid-template-columns:1fr 130px;align-items:center;gap:12px;border-bottom:1px solid var(--line);font-size:12px}.po-totals label>strong{text-align:right}.po-totals .input{height:34px;text-align:right}.po-grand-total{font-size:15px!important;font-weight:850}.po-grand-total strong{font-size:19px}
.po-workspace-footer{position:fixed;right:0;bottom:0;left:var(--sidebar);z-index:18;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);box-shadow:0 -8px 28px rgba(18,37,24,.08)}.app-shell.sidebar-unpinned .po-workspace-footer{left:0}.po-workspace-footer>div{display:flex;align-items:center;gap:8px}.po-readonly-note{color:var(--muted);font-size:12px}

@media(max-width:1180px){.vendor-detail-shell{grid-template-columns:220px minmax(0,1fr)}.vendor-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.po-header-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.po-address-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vendor-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.po-workspace-footer{left:0}}
@media(max-width:760px){.vendor-detail-topline,.po-workspace-header{align-items:flex-start;flex-direction:column}.vendor-detail-left-actions{width:100%;justify-content:space-between}.vendor-detail-actions{width:100%;justify-content:flex-end}.vendor-detail-shell{grid-template-columns:1fr}.vendor-directory-panel{max-height:300px}.vendor-directory-list{max-height:210px}.vendor-profile-grid,.vendor-info-grid,.po-header-fields,.po-address-grid,.po-bottom-grid{grid-template-columns:1fr}.vendor-transaction-toolbar{align-items:stretch;flex-direction:column}.vendor-transaction-toolbar .select,.vendor-filter-search{width:100%;min-width:0}.vendor-notes-panel{flex-direction:column}.po-workspace-footer{padding:10px;align-items:stretch;flex-direction:column}.po-workspace-footer>div{width:100%;justify-content:space-between}.po-workspace-footer .button{flex:1}.purchase-order-workspace{padding-bottom:150px}}
@media print{.vendor-directory-panel,.vendor-detail-topline,.vendor-detail-tabs,.vendor-transaction-toolbar,.po-workspace-footer,.po-workspace-header .back-link,.po-section-heading .button,.po-line-actions,.po-inline-create,.danger-icon{display:none!important}.vendor-detail-shell{display:block}.po-items-table{overflow:visible}.po-items-head,.po-workspace-line{min-width:0}.purchase-order-workspace{padding-bottom:0}}

/* Vendor Purchase Order — full-width accounting workspace (v38) */
.qb-po-workspace{padding:0 0 86px;max-width:none;background:#fff;min-height:calc(100vh - var(--topbar))}
.qb-po-titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 22px;border-bottom:1px solid #d9e1dc;background:#fff}
.qb-po-title-left{display:flex;align-items:center;gap:16px;min-width:0}.qb-po-title-left h1{margin:0;font-size:22px;font-weight:640;white-space:nowrap}.qb-po-title-left .back-link{margin:0}
.qb-po-title-tools{display:flex;gap:8px}
.qb-po-header-sheet{padding:18px 22px 0;background:#edf6fb;border-bottom:1px solid #d9e4e8}
.qb-po-top-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:start}
.qb-po-vendor-fields{display:grid;grid-template-columns:220px 280px;gap:8px 12px;align-items:end}.qb-po-vendor-fields .field{margin:0}.qb-po-status-field{grid-column:1/-1;display:flex;align-items:center;gap:7px;color:#36483f;font-size:11px}.qb-po-status-field .select{min-height:29px;width:auto;padding:4px 28px 4px 8px;text-transform:uppercase;font-weight:780;background:transparent;border:0;box-shadow:none}
.qb-po-amount-box{text-align:right;min-width:260px}.qb-po-amount-box>span{display:block;color:#52665b;font-size:10px;font-weight:850;letter-spacing:.05em}.qb-po-amount-box>strong{display:block;margin-top:4px;font-size:32px;font-weight:520;line-height:1.15;color:#1f2c25}.qb-po-header-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px}.qb-po-header-actions .button{min-height:36px}
.qb-po-split-menu{position:relative;margin-left:-8px}.qb-po-split-menu>summary{list-style:none;width:36px;height:36px;display:grid;place-items:center;border:1px solid #0d6941;border-left:0;border-radius:0 8px 8px 0;background:var(--green-strong);color:#fff;cursor:pointer}.qb-po-split-menu>summary::-webkit-details-marker{display:none}.qb-po-split-menu>div{position:absolute;right:0;top:42px;z-index:40;width:190px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow-lg)}.qb-po-split-menu>div button,.qb-po-more>div button{width:100%;border:0;border-radius:7px;padding:9px 10px;background:transparent;text-align:left;font:inherit;font-size:12px;cursor:pointer}.qb-po-split-menu>div button:hover,.qb-po-more>div button:hover{background:var(--green-soft);color:var(--green-strong)}
.qb-po-address-grid{display:grid;grid-template-columns:220px 250px 300px minmax(160px,1fr);gap:16px;align-items:start;margin-top:22px}.qb-po-address-field .textarea,.qb-po-shipto-field .textarea{min-height:112px;background:#fff}.qb-po-shipto-field .select{margin-bottom:7px}.qb-po-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px}.qb-po-date-grid .field:nth-child(3){grid-column:1}.qb-po-store{justify-self:end;width:min(100%,220px)}
.qb-po-category-details{margin-top:14px;border-top:1px solid rgba(67,98,80,.14);padding:12px 4px}.qb-po-category-details summary{cursor:pointer;font-size:13px;font-weight:760}.qb-po-category-details>div{padding:10px 0 2px;color:var(--muted);font-size:11px;line-height:1.5}
.qb-po-item-sheet{padding:18px 22px 22px;background:#fff}.qb-po-item-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}.qb-po-item-heading h2{margin:0;font-size:14px;font-weight:760}.qb-po-table-wrap{overflow:auto;border-top:1px solid #cfd9d3;border-bottom:1px solid #cfd9d3}
.qb-po-table-head,.qb-po-line{min-width:1190px;display:grid;grid-template-columns:26px 30px minmax(260px,1.3fr) minmax(260px,1.65fr) 105px 105px 125px 105px 80px 38px;align-items:center}.qb-po-table-head{min-height:38px;color:#34483d;font-size:10px;font-weight:850;border-bottom:1px solid #cfd9d3}.qb-po-table-head>span{padding:0 7px}.qb-po-line{min-height:52px;border-bottom:1px solid #e1e7e3;background:#fff}.qb-po-line:hover{background:#f8fbf9}.qb-po-line>*{min-width:0;margin:0 5px}.qb-po-line .input,.qb-po-line .select{min-height:34px;border-radius:4px;padding:6px 8px;font-size:12px}.qb-po-drag{color:#a2b0a8;text-align:center;font-size:12px;letter-spacing:-2px}.po-line-number{text-align:center;color:#405349}.qb-po-product-cell{display:grid;gap:2px}.qb-po-product-cell small,.qb-po-qty-cell small{color:var(--muted);font-size:9px}.qb-po-qty-cell{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px}.qb-po-qty-cell small{min-width:26px;text-align:right}.qb-po-line>[data-line-amount]{text-align:right;padding-right:8px;font-size:12px}.qb-po-received{text-align:center;color:#53675d;font-size:12px}.qb-po-closed{display:grid;place-items:center}.qb-po-closed input{width:17px;height:17px;accent-color:var(--green-strong)}
.qb-po-bottom-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:32px;margin-top:28px}.qb-po-bottom-grid .textarea{min-height:110px}.qb-po-attachments{display:grid;grid-template-columns:1fr auto;gap:8px 12px;margin-top:12px;padding:14px;border:1px dashed #c8d5cd;border-radius:9px}.qb-po-attachments strong{font-size:12px}.qb-po-attachments small{grid-column:1/-1;color:var(--muted);font-size:10px}.qb-po-total-box{display:grid;align-content:start;gap:8px}.qb-po-total-box>div,.qb-po-total-box>label{display:grid;grid-template-columns:1fr 140px;gap:12px;align-items:center;min-height:38px}.qb-po-total-box span{font-size:12px}.qb-po-total-box strong{text-align:right}.qb-po-total-box .input{text-align:right;min-height:34px}.qb-po-total-line{margin-top:5px;padding-top:10px;border-top:1px solid var(--line)}.qb-po-total-line strong{font-size:19px}
.qb-po-footer{display:grid;grid-template-columns:1fr auto 1fr}.qb-po-footer>div:last-child{justify-self:end}.qb-po-footer-center{justify-self:center}.qb-po-more{position:relative}.qb-po-more>summary{list-style:none;min-height:38px;padding:9px 12px;border-radius:8px;cursor:pointer;color:#30453a;font-size:12px}.qb-po-more>summary::-webkit-details-marker{display:none}.qb-po-more>div{position:absolute;left:50%;bottom:44px;transform:translateX(-50%);z-index:45;width:210px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow-lg)}
.qb-receipt-header{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.qb-receive-table{overflow:auto;border:1px solid var(--line);border-radius:10px;margin-bottom:16px}.qb-receive-head,.qb-receive-line{min-width:1180px;display:grid;grid-template-columns:70px minmax(210px,1.3fr) 90px 110px 125px 100px minmax(230px,1.25fr) 145px;gap:8px;align-items:center}.qb-receive-head{padding:10px;background:#f5f8f6;color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase}.qb-receive-line{padding:10px;border-top:1px solid var(--line)}.qb-receive-line strong,.qb-receive-line small{display:block}.qb-receive-line strong{font-size:12px}.qb-receive-line small{margin-top:3px;color:var(--muted);font-size:9px}.qb-receive-check{display:grid;place-items:center}.qb-receive-check input{width:17px;height:17px;accent-color:var(--green-strong)}.qb-receive-lot-fields{display:grid;grid-template-columns:1fr 1fr;gap:5px}.qb-receive-lot-fields [data-expiration]{grid-column:1/-1}.qb-receive-line .input,.qb-receive-line .select{min-height:34px;padding:6px 8px;font-size:11px}
@media(max-width:1100px){.qb-po-address-grid{grid-template-columns:1fr 1fr}.qb-po-store{justify-self:stretch;width:100%}.qb-po-bottom-grid{grid-template-columns:1fr}.qb-receipt-header{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.qb-po-titlebar,.qb-po-top-grid,.qb-po-item-heading{align-items:flex-start}.qb-po-titlebar,.qb-po-top-grid,.qb-po-item-heading{display:flex;flex-direction:column}.qb-po-amount-box{width:100%;text-align:left}.qb-po-header-actions{justify-content:flex-start}.qb-po-vendor-fields,.qb-po-address-grid,.qb-po-date-grid,.qb-receipt-header{grid-template-columns:1fr}.qb-po-vendor-fields{width:100%}.qb-po-store{width:100%}.qb-po-header-sheet,.qb-po-item-sheet{padding-left:14px;padding-right:14px}.qb-po-footer{display:flex}.qb-po-footer-center{justify-self:auto}.qb-po-footer>div:last-child{justify-self:auto}.qb-po-bottom-grid{gap:18px}}
@media print{.qb-po-title-tools,.qb-po-header-actions,.qb-po-item-heading .button,.qb-po-footer,.qb-po-split-menu,.danger-icon{display:none!important}.qb-po-workspace{padding-bottom:0}.qb-po-header-sheet{background:#fff}.qb-po-table-wrap{overflow:visible}.qb-po-table-head,.qb-po-line{min-width:0}}

/* v39 landed-cost allocation */
.qb-po-landed-flag{display:flex;align-items:center;gap:5px;margin-top:2px;color:#5e7167;font-size:9px;font-weight:650;line-height:1.2}.qb-po-landed-flag[hidden]{display:none}.qb-po-landed-flag input{width:13px;height:13px;accent-color:var(--green-strong)}
.qb-po-total-box>.qb-po-landed-note{display:block;min-height:0;padding:8px 10px;border-radius:7px;background:#f5f8f6;color:#5d7066;font-size:9px;line-height:1.45}
.qb-checkbox-row{display:flex;align-items:flex-start;gap:8px;color:#405349;font-size:12px;line-height:1.4}.qb-checkbox-row input{margin-top:2px;accent-color:var(--green-strong)}
.qb-receive-cost{display:grid;gap:3px}.qb-receive-cost small{margin:0;color:#1f6d43;font-weight:700;font-size:8.5px;line-height:1.2}

/* Employee Portal password recovery */
.portal-security-card{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:#f8fbf9}.portal-security-card>div:first-child{display:grid;gap:4px}.portal-security-card strong{font-size:14px}.portal-security-card small{color:var(--muted);line-height:1.45}.portal-security-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.password-reset-result{display:grid;gap:16px}.password-reset-result-status{display:grid;gap:5px;padding:14px 16px;border:1px solid #cfe4d7;border-radius:14px;background:#f3faf6}.password-reset-result-status span{color:var(--muted);font-size:13px}.password-reset-result-actions{display:flex;gap:10px;flex-wrap:wrap}.password-reset-email-warning{display:grid;gap:4px;padding:13px 15px;border:1px solid #ecd9a8;border-radius:13px;background:#fff9ea;color:#74510d;line-height:1.5}.password-reset-email-warning strong{font-size:13px}.password-reset-email-warning span{font-size:12px}.button:disabled{opacity:.48;cursor:not-allowed}@media(max-width:760px){.portal-security-card{align-items:stretch;flex-direction:column}.portal-security-actions{justify-content:flex-start}.portal-security-actions .button{flex:1}}

/* Recipe builder: saved version = recipe header + ordered ingredients + BOM + audit */
.recipe-builder-section{margin-top:22px;padding-top:22px;border-top:1px solid var(--line)}
.recipe-builder-header{padding:0 0 14px}.recipe-builder-header h3{margin:0;font-size:18px}.recipe-builder-header p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.recipe-builder-stats{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:11px 13px;margin-bottom:12px;border:1px solid var(--line);border-radius:12px;background:#fafcfa;color:var(--muted);font-size:11px}.recipe-builder-stats strong{color:var(--ink)}
.recipe-builder-table{min-width:980px}.recipe-builder-row{transition:background .12s ease,opacity .12s ease}.recipe-builder-row.dragging{opacity:.45;background:#eef8f1}.recipe-builder-row.drag-over{outline:2px solid rgba(24,145,78,.35);outline-offset:-2px;background:#f2fbf5}
.recipe-drag-cell{white-space:nowrap}.recipe-drag-handle{display:inline-grid;place-items:center;width:30px;height:30px;margin-right:7px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-weight:900;letter-spacing:-3px;cursor:grab}.recipe-drag-handle:active{cursor:grabbing}.recipe-builder-row:hover .recipe-drag-handle{border-color:#bcd9c6;color:var(--green-strong);background:var(--green-soft)}
.recipe-change-log{display:grid}.recipe-change-log article{display:flex;justify-content:space-between;gap:20px;padding:14px 18px;border-top:1px solid var(--line)}.recipe-change-log article:first-child{border-top:0}.recipe-change-log strong,.recipe-change-log span{display:block}.recipe-change-log span{margin-top:4px;color:var(--muted);font-size:12px}.recipe-change-log p{margin:7px 0 0;max-width:900px;color:var(--ink);font-size:11px;line-height:1.5;word-break:break-word}.recipe-change-log time{flex:0 0 auto;color:var(--muted);font-size:11px;text-align:right}.change-arrow{display:inline!important;margin:0 5px!important;color:var(--green-strong)!important;font-weight:900}
@media(max-width:900px){.recipe-builder-header{align-items:stretch;flex-direction:column}.recipe-builder-header .workspace-card-actions{width:100%;align-items:stretch;flex-direction:column}.recipe-builder-header .button{width:100%}.recipe-change-log article{display:block}.recipe-change-log time{display:block;margin-top:8px;text-align:left}}

/* v48 — pack-aware invoice fulfillment, dealer pricing, backorders, and Production Board */
.invoice-fulfillment-banner{margin:16px 22px 0;padding:13px 15px;display:flex;align-items:flex-start;gap:10px;border:1px solid #b9dcc5;border-radius:12px;color:var(--green-strong);background:#f1faf4}.invoice-fulfillment-banner span{color:#4f6858}
.invoice-products-actions{align-items:center}.invoice-pack-mode{min-height:42px;display:flex;align-items:center;gap:10px;padding:7px 11px;border:1px solid var(--line);border-radius:11px;background:#f8faf8;cursor:pointer}.invoice-pack-mode.enabled{border-color:#a9d1b7;background:#eff9f2}.invoice-pack-mode input{width:17px;height:17px;accent-color:var(--green)}.invoice-pack-mode span{display:grid;gap:1px}.invoice-pack-mode strong{font-size:11px}.invoice-pack-mode small{max-width:245px;color:var(--muted);font-size:9px;line-height:1.35}
.invoice-inventory-note{display:flex;gap:9px;align-items:flex-start;margin-top:10px;padding:10px 12px;border:1px solid #dbe7df;border-radius:10px;background:#f8fbf9;color:var(--muted);font-size:10px;line-height:1.45}.invoice-inventory-note strong{flex:0 0 auto;color:var(--green-strong)}
.invoice-pack-lines .invoice-line-head,.invoice-pack-lines .invoice-line-row{min-width:1320px;grid-template-columns:minmax(220px,1.15fr) minmax(210px,1.05fr) minmax(220px,1.1fr) 90px 128px 112px 68px 42px}
.invoice-pack-line>.invoice-pack-select,.invoice-pack-line>div:has([data-line-rate]){min-height:55px;padding:5px 8px;border-right:1px solid var(--line);background:#fff}.invoice-pack-select{display:grid;align-content:center;gap:2px}.invoice-pack-select .select,.invoice-pack-line>div:has([data-line-rate]) .input{min-height:32px;border:1px solid transparent;background:transparent;box-shadow:none}.invoice-pack-select .select:focus,.invoice-pack-line>div:has([data-line-rate]) .input:focus{border-color:#75b88e;background:#fff}.invoice-pack-select small,.invoice-pack-line [data-price-source]{min-height:13px;display:block;overflow:hidden;color:var(--muted);font-size:9px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.invoice-pack-line>[data-line-description],.invoice-pack-line>[data-line-quantity]{min-height:55px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent}.invoice-pack-line>[data-line-description]:focus,.invoice-pack-line>[data-line-quantity]:focus{box-shadow:inset 0 0 0 2px #75b88e}

.customer-discount-editor{grid-column:1/-1;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8fbf9}.customer-discount-editor>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.customer-discount-editor>header div{display:grid;gap:3px}.customer-discount-editor>header small{color:var(--muted);font-size:10px}.customer-discount-list{display:grid;gap:8px}.customer-discount-row{display:grid;grid-template-columns:minmax(220px,1fr) 150px 38px;gap:8px;align-items:center}.input-with-suffix{position:relative}.input-with-suffix .input{padding-right:30px}.input-with-suffix>span{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:11px}

.production-board-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 0}.production-board-header h3{margin:0 0 4px;font-size:18px}.production-board-filters{padding:14px 20px;border-bottom:1px solid var(--line)}.production-board-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 20px}.production-board-card{min-width:0;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-sm)}.production-board-card.active{border-color:#8fc8a4;box-shadow:0 0 0 2px rgba(63,143,91,.07),var(--shadow-sm)}.production-board-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.production-board-card>header>div{display:flex;align-items:center;gap:8px}.production-board-rank{display:grid;place-items:center;min-width:30px;height:30px;padding:0 7px;border-radius:9px;background:var(--green-soft);color:var(--green-strong);font-size:11px;font-weight:850}.production-board-product{margin:14px 0 12px}.production-board-product h3{margin:0;font-size:17px}.production-board-product p{margin:4px 0 0;color:var(--muted);font-size:10px}.production-board-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.production-board-metrics>div{min-height:74px;padding:10px;border:1px solid var(--line);border-radius:11px;background:#fafcfa}.production-board-metrics small,.production-board-metrics strong,.production-board-metrics span{display:block}.production-board-metrics small{color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.production-board-metrics strong{margin-top:5px;font-size:17px}.production-board-metrics span{margin-top:2px;color:var(--muted);font-size:9px}.production-board-source{display:grid;gap:2px;margin-top:10px;padding:10px 12px;border-radius:10px;background:#f4f7f5}.production-board-source strong{font-size:11px}.production-board-source span{color:var(--muted);font-size:9px}.production-board-card>footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.production-board-card>footer .select{max-width:150px}

@media(max-width:1100px){.production-board-grid{grid-template-columns:1fr}.invoice-pack-mode{width:100%}.invoice-pack-mode span{flex:1}.invoice-products-actions{width:100%}}
@media(max-width:720px){.invoice-fulfillment-banner{margin:12px 12px 0;flex-direction:column}.customer-discount-row{grid-template-columns:1fr 110px 38px}.production-board-grid,.production-board-filters,.production-board-header{padding-left:14px;padding-right:14px}.production-board-metrics{grid-template-columns:1fr}.production-board-card>footer{align-items:stretch;flex-direction:column}.production-board-card>footer .button,.production-board-card>footer .select{width:100%;max-width:none}}
@media(max-width:520px){.customer-discount-row{grid-template-columns:1fr 1fr}.customer-discount-row .icon-button{grid-column:2;justify-self:end}.invoice-pack-mode small{max-width:none}}

@media print{
  .invoice-fulfillment-banner,.invoice-pack-mode,.invoice-inventory-note{display:none!important}
  .invoice-pack-lines .invoice-line-head,.invoice-pack-lines .invoice-line-row{min-width:0;grid-template-columns:1.45fr 1fr 1.3fr .5fr .65fr .7fr .4fr}
  .invoice-pack-lines .invoice-line-head span:last-child,.invoice-pack-lines .invoice-line-row>*:last-child{display:none}
}
.customer-category-discounts{grid-column:1/-1;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8fbf9}.customer-category-discounts .customer-line-header{padding:0 0 10px;border:0;background:transparent}.customer-category-discounts [data-category-discounts]{display:grid;gap:8px}.customer-category-discounts>.field-help{display:block;margin-top:9px}

/* v48 — department production boards */
.production-department-boards{display:grid;gap:18px;margin-top:14px}
.production-department-board{border:1px solid var(--border,#dce5df);border-radius:20px;background:var(--surface,#fff);overflow:hidden}
.production-department-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--border,#e3e9e5);background:linear-gradient(180deg,rgba(244,250,246,.92),rgba(255,255,255,.98))}
.production-department-header h3{margin:3px 0 0;font-size:20px}
.production-department-summary{display:grid;grid-template-columns:auto auto;column-gap:8px;align-items:baseline;text-align:right}
.production-department-summary strong{font-size:22px;color:var(--brand,#16753b)}
.production-department-summary span{font-size:12px;color:var(--muted,#637168)}
.production-department-summary small{grid-column:1/-1;margin-top:3px;color:var(--muted,#637168)}
.production-department-board .production-board-grid{padding:16px}
@media(max-width:800px){.production-department-header{align-items:flex-start;flex-direction:column}.production-department-summary{text-align:left}}

/* v50 — physical production display manager */
.physical-screen-manager{margin:16px 20px 0;padding:16px;border:1px solid var(--line);border-radius:16px;background:#f9fbfa}.physical-screen-manager-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.physical-screen-manager-head h3{margin:2px 0 4px;font-size:18px}.physical-screen-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.physical-screen-card{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.physical-screen-card.disabled{opacity:.66}.physical-screen-card>header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.physical-screen-card h4{margin:7px 0 3px;font-size:15px}.physical-screen-card p{margin:0;color:var(--muted);font-size:10px}.physical-screen-link{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:12px 0;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#f7faf8}.physical-screen-link code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#315d45}.physical-screen-card>footer{display:flex;gap:7px;flex-wrap:wrap}.empty-state-inline{grid-column:1/-1;padding:18px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);text-align:center}
@media(max-width:1000px){.physical-screen-grid{grid-template-columns:1fr}}@media(max-width:720px){.physical-screen-manager{margin:12px 14px 0}.physical-screen-manager-head{flex-direction:column}.physical-screen-link{grid-template-columns:1fr}.physical-screen-card>footer .button{flex:1}}

/* v60 — inline product-category creation */
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}.field-label-row>.field-label{min-width:0}.field-inline-action{flex:0 0 auto;font-size:11px;line-height:1;white-space:nowrap}.field-inline-action svg{width:14px;height:14px}@media(max-width:620px){.field-label-row{align-items:flex-start}.field-inline-action{font-size:10px}}

/* v62 · BOM lot traceability + draft procurement */
.bom-material-row { cursor: pointer; }
.bom-material-row:hover td { background: rgba(24, 137, 77, .045); }
.bom-material-row:focus { outline: 2px solid var(--green, #16894d); outline-offset: -2px; }
.bom-material-link { color: var(--green, #16894d); }
.bom-lot-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.bom-lot-summary article { border:1px solid var(--line,#dfe7e1); border-radius:14px; padding:14px 16px; background:#fff; display:flex; flex-direction:column; gap:5px; }
.bom-lot-summary article span { color:var(--muted,#66756b); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.bom-lot-summary article strong { font-size:19px; }
.bom-lot-summary article small { color:var(--muted,#66756b); }
.bom-lot-section { border-top:1px solid var(--line,#dfe7e1); padding-top:18px; margin-top:18px; }
.bom-lot-section > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:12px; }
.bom-lot-section > header h3 { margin:0 0 4px; }
.bom-lot-section > header p { margin:0; color:var(--muted,#66756b); }
.bom-procurement-header { align-items:center !important; }
.bom-order-qty { display:flex; flex-direction:column; gap:4px; min-width:150px; }
.bom-order-qty span { font-size:11px; font-weight:700; color:var(--muted,#66756b); text-transform:uppercase; }
.link-button { border:0; background:none; color:var(--green,#16894d); padding:0; font:inherit; font-weight:700; cursor:pointer; }
@media (max-width: 900px) {
  .bom-lot-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bom-lot-section > header { align-items:flex-start; flex-direction:column; }
  .bom-procurement-header .workspace-card-actions { width:100%; flex-wrap:wrap; }
}
@media (max-width: 600px) { .bom-lot-summary { grid-template-columns:1fr; } }

/* v65 — canonical Recipe units: g for mass, L for liquid volume */
.recipe-dual-unit-control{min-width:330px;gap:7px}.recipe-unit-pair{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:7px;width:100%}.recipe-unit-pair>small{font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.recipe-unit-segmented{grid-template-columns:repeat(auto-fit,minmax(46px,1fr));width:100%}.recipe-unit-segmented button{text-transform:none}.recipe-stored-unit strong{text-transform:none}@media(max-width:720px){.recipe-dual-unit-control{min-width:0}.recipe-unit-pair{grid-template-columns:1fr}.recipe-unit-pair>small{margin-top:2px}}

/* v67 — employee-assignment labor costing + production analytics */
.production-team-field{align-self:stretch}.production-team-select{min-height:112px;padding:7px}.production-team-select option{padding:7px 9px;border-radius:6px}.production-team-select option:checked{font-weight:800}.field-help-inline{color:var(--muted);font-size:10px;font-weight:650;text-align:right}.production-summary-grid-teams{grid-template-columns:repeat(4,minmax(0,1fr))}
.production-cost-section{margin:22px 0;padding:18px;border:1px solid var(--line);border-radius:18px;background:#fbfdfb}.production-cost-section .section-heading,.analytics-pivot-section .section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.production-cost-section .section-heading h3,.analytics-pivot-section .section-heading h3{margin:3px 0 0}.production-cost-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.production-cost-cards article{display:grid;gap:4px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:#fff}.production-cost-cards article.total{border-color:rgba(22,137,77,.32);background:var(--green-soft)}.production-cost-cards small{color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}.production-cost-cards strong{font-size:19px}.production-cost-cards span{color:var(--muted);font-size:10px}.production-cost-note{margin:12px 0;color:var(--muted);font-size:10px;line-height:1.55}.compact-table td,.compact-table th{padding-top:9px;padding-bottom:9px}
.production-analytics-workspace{display:grid;gap:16px;padding:18px}.analytics-filter-bar{display:grid;grid-template-columns:150px 150px minmax(230px,1fr) minmax(290px,1.35fr) auto;gap:12px;align-items:end;padding:15px;border:1px solid var(--line);border-radius:15px;background:#f8fbf9}.analytics-multi-filter .select{min-height:92px;padding:6px}.analytics-filter-actions{display:flex;gap:8px;align-items:center;padding-bottom:1px}.analytics-explainer{padding:11px 13px;border:1px solid rgba(22,137,77,.18);border-radius:11px;background:var(--green-soft);color:#365d47;font-size:11px;line-height:1.5}.analytics-chart-card,.analytics-pivot-section{padding:17px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-sm)}.analytics-chart-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:8px}.analytics-chart-card h3{margin:3px 0 2px;font-size:17px}.analytics-chart-card p{margin:4px 0 0;color:var(--muted);font-size:10px}.analytics-chart-scroll{overflow-x:auto;overflow-y:hidden;padding:4px 0 0}.analytics-chart-scroll svg{display:block;max-width:none}.analytics-grid-line{stroke:var(--line);stroke-width:1}.analytics-axis-text{fill:var(--muted);font-size:9px;font-weight:650}.analytics-axis-label{font-size:8px}.analytics-cost-ingredient{fill:#2f8f58}.analytics-cost-packaging{fill:#8dbb9d}.analytics-cost-labor{fill:#b6c8bb}.analytics-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:9px;font-weight:800}.analytics-legend span{display:inline-flex;align-items:center;gap:6px}.analytics-legend span:before{content:"";width:10px;height:10px;border-radius:3px;background:#ccc}.analytics-legend .ingredient:before{background:#2f8f58}.analytics-legend .packaging:before{background:#8dbb9d}.analytics-legend .labor:before{background:#b6c8bb}.analytics-trend-line{stroke-width:2;opacity:.65}.analytics-trend-point{stroke:#fff;stroke-width:2}.analytics-trend-line.series-0,.analytics-trend-point.series-0{stroke:#287b4a;fill:#287b4a}.analytics-trend-line.series-1,.analytics-trend-point.series-1{stroke:#557a68;fill:#557a68}.analytics-trend-line.series-2,.analytics-trend-point.series-2{stroke:#7a8f80;fill:#7a8f80}.analytics-trend-line.series-3,.analytics-trend-point.series-3{stroke:#406b56;fill:#406b56}.analytics-trend-line.series-4,.analytics-trend-point.series-4{stroke:#9aaa9f;fill:#9aaa9f}.analytics-trend-line.series-5,.analytics-trend-point.series-5{stroke:#6a756e;fill:#6a756e}.analytics-change,.analytics-delta{font-size:9px;font-weight:850}.analytics-change.up,.analytics-delta.up{fill:#16753b;color:#16753b}.analytics-change.down,.analytics-delta.down{fill:#a73a36;color:#a73a36}.analytics-change.flat,.analytics-delta.flat{fill:var(--muted);color:var(--muted)}.analytics-delta{display:inline-flex;white-space:nowrap}.analytics-empty{min-height:180px;display:grid;place-items:center;color:var(--muted);font-size:11px}.analytics-table{min-width:1080px}
@media(max-width:1280px){.analytics-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-filter-actions{grid-column:1/-1}.production-summary-grid-teams{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.production-cost-cards,.production-summary-grid-teams,.analytics-filter-bar{grid-template-columns:1fr}.analytics-filter-actions{grid-column:auto;align-items:stretch;flex-direction:column}.analytics-chart-card>header{flex-direction:column}.field-help-inline{display:none}.production-analytics-workspace{padding:12px}.production-cost-section{padding:13px}}

/* v69 — batched event-driven realtime connection status */
.realtime-indicator{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:6px 10px;border:1px solid #dfe8e2;border-radius:999px;background:#fff;color:#66756d;font-size:12px;font-weight:750;white-space:nowrap}.realtime-dot{width:8px;height:8px;border-radius:50%;background:#a0aaa4;box-shadow:0 0 0 3px rgba(160,170,164,.12)}.realtime-indicator[data-status="live"]{color:#147a45;background:#f2fbf6;border-color:#cfeada}.realtime-indicator[data-status="live"] .realtime-dot{background:#20a45a;box-shadow:0 0 0 3px rgba(32,164,90,.14)}.realtime-indicator[data-status="connecting"],.realtime-indicator[data-status="reconnecting"]{color:#8a6411;background:#fffaf0;border-color:#eedfb9}.realtime-indicator[data-status="connecting"] .realtime-dot,.realtime-indicator[data-status="reconnecting"] .realtime-dot{background:#d39a25;animation:realtimePulse 1.15s ease-in-out infinite}.realtime-indicator[data-status="unsupported"],.realtime-indicator[data-status="stopped"]{color:#8c3b35;background:#fff5f4;border-color:#f1d2cf}.realtime-indicator[data-pending="true"]:after{content:"update waiting";font-size:10px;color:#8a6411;margin-left:2px}@keyframes realtimePulse{0%,100%{opacity:.4;transform:scale(.9)}50%{opacity:1;transform:scale(1.12)}}@media(max-width:760px){.realtime-indicator{padding:6px 8px}.realtime-indicator [data-realtime-label]{display:none}.realtime-indicator[data-pending="true"]:after{display:none}}


/* v72 Employee Portal administrator-created PIN */
.portal-pin-card{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.85fr);gap:18px;align-items:start;padding:16px;border:1px solid var(--line);border-radius:15px;background:#f8faf8}
.portal-pin-copy strong,.portal-pin-copy small{display:block}.portal-pin-copy small{margin-top:5px;color:var(--muted);line-height:1.45}
.portal-pin-state{display:inline-flex!important;width:max-content;margin-top:10px;padding:5px 9px;border-radius:999px;background:#eef1ef;color:#6b756f;font-size:11px;font-weight:800}.portal-pin-state.configured{background:#e6f4eb;color:#14643f}
.portal-pin-controls{display:grid;gap:9px}.portal-pin-input{font-size:18px;font-weight:850;letter-spacing:.18em}.portal-pin-clear{display:flex;align-items:center;gap:8px;color:#a33;font-size:12px;font-weight:750;cursor:pointer}
@media(max-width:760px){.portal-pin-card{grid-template-columns:1fr}}

/* v75 — recipe ratio basis / assigned ratio */
.input-pair{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:8px}.recipe-builder-table th:nth-child(4),.recipe-builder-table td:nth-child(4){min-width:165px}.recipe-builder-stats{flex-wrap:wrap}.recipe-builder-stats [data-recipe-ratio-basis]{white-space:nowrap}@media(max-width:760px){.input-pair{grid-template-columns:1fr}.recipe-builder-table th:nth-child(4),.recipe-builder-table td:nth-child(4){min-width:145px}}
/* v76 inventory audit */
.audit-mini-progress{height:6px;background:#edf2ee;border-radius:999px;overflow:hidden;margin-top:6px}.audit-mini-progress span{display:block;height:100%;background:var(--accent,#17944c);border-radius:inherit}.audit-builder{border:1px solid var(--border,#dde4df);border-radius:14px;padding:14px;margin:14px 0}.audit-builder-controls{display:grid;grid-template-columns:180px 200px minmax(220px,1fr) auto;gap:10px;align-items:end}.audit-catalog{border:1px solid var(--border,#dde4df);border-radius:12px;margin-top:12px;max-height:360px;overflow:auto}.audit-catalog-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:11px 12px;border-bottom:1px solid var(--border,#edf1ee);cursor:pointer}.audit-catalog-row:last-child{border-bottom:0}.audit-catalog-row span{min-width:0}.audit-catalog-row strong,.audit-catalog-row small{display:block}.audit-catalog-row small{color:var(--muted,#6d766f);margin-top:2px}.audit-method-pill{white-space:nowrap;border-radius:999px;padding:5px 9px;background:#eef4ef;font-size:12px}.audit-method-pill.scale{background:#edf5ff}.audit-selection-summary{display:flex;justify-content:space-between;gap:12px;padding-top:10px;color:var(--muted,#6d766f)}.audit-detail-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.audit-detail-summary>div{border:1px solid var(--border,#dde4df);border-radius:12px;padding:12px}.audit-detail-summary span,.audit-detail-summary strong{display:block}.audit-detail-summary span{font-size:12px;color:var(--muted,#6d766f);margin-bottom:5px}@media(max-width:800px){.audit-builder-controls{grid-template-columns:1fr}.audit-detail-summary{grid-template-columns:1fr}.audit-catalog-row{grid-template-columns:auto 1fr}.audit-method-pill{grid-column:2}}

/* v78 audit assignment editing / row actions */
.audit-assignment-row{cursor:pointer;transition:background .16s ease}.audit-assignment-row:hover{background:#f8fbf9}.audit-assignment-row:focus{outline:2px solid #76b98f;outline-offset:-2px}.audit-actions-head,.audit-actions-cell{width:54px;text-align:right}.audit-row-menu{position:relative;display:inline-block}.audit-row-menu>summary{list-style:none}.audit-row-menu>summary::-webkit-details-marker{display:none}.audit-more-button{width:34px;height:34px;border:1px solid var(--line);border-radius:10px;background:#fff}.audit-more-button svg{width:18px;height:18px}.audit-row-menu[open] .audit-more-button{border-color:#8dc3a0;background:#f0f8f3}.audit-row-menu-popover{position:absolute;z-index:80;top:40px;right:0;width:210px;padding:6px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 14px 36px rgba(31,57,43,.17);text-align:left}.audit-row-menu-popover button{width:100%;min-height:42px;padding:8px 10px;border:0;border-radius:9px;display:flex;align-items:center;gap:10px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.audit-row-menu-popover button:hover:not(:disabled){background:#f2f8f4}.audit-row-menu-popover button.danger{color:#b42318}.audit-row-menu-popover button.danger:hover:not(:disabled){background:#fff1f0}.audit-row-menu-popover button:disabled{opacity:.43;cursor:not-allowed}.audit-row-menu-popover button svg{width:17px;height:17px;flex:0 0 auto}.audit-row-menu-popover button span{display:grid;gap:1px}.audit-row-menu-popover button small{font-size:9px;color:var(--muted)}.audit-editable-notice,.audit-readonly-notice{margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:10px}.audit-editable-notice{border-color:#b9dfc7;background:#f1faf4;color:#245d39}.audit-readonly-notice{border-color:#ead5aa;background:#fff9ed;color:#73551f}

/* v79 audit assignment actions */
.audit-actions-cell{overflow:visible!important;position:relative;min-width:56px}.audit-row-menu{position:relative;display:inline-flex!important;justify-content:flex-end;overflow:visible}.audit-more-button{display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer}.audit-more-glyph{font-size:24px;line-height:1;font-weight:700;letter-spacing:0;color:#314b3d;transform:translateY(-1px)}.audit-row-menu-popover{display:block}.audit-row-menu:not([open]) .audit-row-menu-popover{display:none}.audit-row-menu[open] .audit-row-menu-popover{display:block}.audit-assignment-row td:last-child{overflow:visible}.audit-admin-page .table-wrap{overflow:visible}.audit-admin-page .data-table{overflow:visible}

/* v80 Audit action menu visibility fix.
   The generic .panel uses overflow:hidden for rounded tables, which clipped
   the audit assignment action popover below the final row. Audit needs its
   action layer to escape the table/panel without changing the rest of ERP. */
.audit-admin-page > .panel,
.audit-admin-page .panel:has(.audit-row-menu) {
  overflow: visible !important;
}
.audit-admin-page .table-wrap {
  overflow: visible !important;
}
.audit-admin-page .data-table,
.audit-admin-page .data-table tbody,
.audit-admin-page .data-table tr,
.audit-admin-page .audit-actions-cell,
.audit-admin-page .audit-row-menu {
  overflow: visible !important;
}
.audit-admin-page .audit-actions-cell {
  position: relative;
  z-index: 30;
}
.audit-admin-page .audit-row-menu[open] {
  z-index: 3000;
}
.audit-admin-page .audit-row-menu-popover {
  z-index: 3100;
  top: calc(100% + 6px);
  right: 0;
}
.audit-admin-page .audit-row-menu[open] .audit-row-menu-popover {
  display: block !important;
}

/* v81 audit inventory reconciliation */
.audit-reconcile-note{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;margin:0 0 12px;border:1px solid #dbe8df;border-radius:12px;background:#f7fbf8;color:#53645a}.audit-reconcile-note strong{white-space:nowrap;color:#244b34}.audit-reconcile-wrap{overflow:auto!important}.audit-reconcile-table td strong,.audit-reconcile-table td small{display:block}.audit-reconcile-table td small{margin-top:3px;color:var(--muted,#6d766f)}.audit-post-row td{padding-top:0!important;background:#fbfdfb}.audit-post-controls{display:grid;grid-template-columns:190px minmax(260px,1fr) auto;gap:10px;align-items:end;padding:12px;border:1px solid #dfe9e2;border-radius:12px;background:#f8fbf9}.audit-post-controls .field{margin:0}.audit-posted-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#e6f6eb;color:#13733a;font-size:12px;font-weight:700}.audit-posted-detail{display:grid;gap:3px;padding:11px 12px;border:1px solid #cde6d5;border-radius:12px;background:#f2faf5;color:#31533d}.audit-posted-detail small{color:#6f7d73}.stock-positive{color:#13733a}@media(max-width:900px){.audit-post-controls{grid-template-columns:1fr}.audit-reconcile-note{display:grid}}


/* v83 — type-to-search selectors for purchase orders and invoices */
.type-search-combobox{position:relative;min-width:0;width:100%}
.type-search-combobox>.input{width:100%;min-width:0}
.qb-po-product-cell .type-search-combobox>.input{min-height:38px;border-color:#b8d7c1;background:#fff}
.invoice-line-row>.type-search-combobox{height:55px;border-right:1px solid var(--line);display:flex;align-items:center}
.invoice-line-row>.type-search-combobox>.input{height:55px;min-height:55px;border:0;border-radius:0;box-shadow:none;background:transparent}
.invoice-line-row>.type-search-combobox>.input:focus{position:relative;z-index:1;box-shadow:inset 0 0 0 2px #75b88e}
