/* Kamz Meats business system. PROVISIONAL palette: change the variables below when the brand arrives. */
:root {
  --bg: #F6F4F0; --card: #FFFFFF; --line: #E4E1DA; --ink: #1B1B1D; --mute: #6E6C68;
  --side: #231E1E; --side-text: #CFC8C3;
  --acc: #9B1C2E; --acc-ink: #FFFFFF; --acc-soft: #F7E6E8; --acc-dark: #7E1625;
  --ok: #2F7D4F; --ok-soft: #E3F2E9; --warn: #A86508; --warn-soft: #FBEBD0; --bad: #B3261E; --bad-soft: #F9DEDC;
  --chip: #EFECE6; --gold: #C9A66B; --ink2: #3A3335;
  --r: 12px; --side-w: 232px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--acc); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2 { margin: 0; line-height: 1.25; } h2 { font-size: 16px; margin-bottom: 12px; }
p { margin: 0 0 10px; } hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 4px; }
code { font-family: var(--mono); }
[hidden] { display: none !important; }

/* shell */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 14px 10px; z-index: 30; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 8px 16px; }
.brand:hover { text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--acc); color: var(--acc-ink); font-weight: 700; }
.side nav { flex: 1; }
.grp { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #8d857f; padding: 16px 10px 6px; }
.side nav a { display: block; color: var(--side-text); padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.side nav a.on { background: var(--acc); color: var(--acc-ink); font-weight: 600; }
.me { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 8px 4px; font-size: 13.5px; }
.me .who { display: flex; flex-direction: column; margin-bottom: 8px; color: #fff; } .me .who span { color: var(--side-text); font-size: 12.5px; }
.me a, .linkbtn { color: var(--side-text); background: none; border: 0; padding: 2px 0; font: inherit; cursor: pointer; display: block; text-align: left; }
.me a:hover, .linkbtn:hover { color: #fff; text-decoration: underline; }
.scrim { display: none; }
.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 24px; height: 56px; position: sticky; top: 0; z-index: 10; }
.top h1 { font-size: 18px; flex: 1; } .top .date { color: var(--mute); font-size: 13.5px; }
.burger { display: none; background: none; border: 0; width: 38px; height: 38px; padding: 9px 8px; margin-left: -8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.burger i { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.page { padding: 22px 24px 8px; max-width: 1180px; width: 100%; flex: 1; }
.foot { text-align: center; color: var(--mute); font-size: 12.5px; padding: 18px 12px 22px; } .foot a { color: var(--mute); text-decoration: underline; }

/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; } .card-head h2 { margin: 0; }
.narrow { max-width: 620px; } .center { text-align: center; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } .head p { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .form .actions { margin-top: 6px; }
.muted { color: var(--mute); } .lead { font-size: 16px; } .note { color: var(--mute); font-size: 13px; margin: 10px 0 0; }
.bignum { font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--acc); margin-bottom: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; display: flex; flex-direction: column; }
.kpi .l { color: var(--mute); font-size: 13px; font-weight: 500; } .kpi .v { font-size: 28px; font-weight: 700; line-height: 1.25; } .kpi .s { color: var(--mute); font-size: 13px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; } .cols > .card { margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 24px; margin: 0; } .facts.one { grid-template-columns: 1fr; }
.facts dt { color: var(--mute); font-size: 12.5px; } .facts dd { margin: 2px 0 0; font-weight: 500; }
.secret { font-size: 22px; letter-spacing: .04em; background: var(--chip); padding: 6px 12px; border-radius: 8px; user-select: all; }

/* tabs */
.tabs { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.tabs a { padding: 6px 16px; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: 14px; } .tabs a:hover { text-decoration: none; }
.tabs a.on { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }

/* tables */
.tw { overflow-x: auto; }
.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--mute); text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr:hover { background: #FBFAF7; } .t tr.dim td { color: var(--mute); }
.t tfoot td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--ink); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; } .nw { white-space: nowrap; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* pills, alerts, bars */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--mute); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.acc { background: var(--acc-soft); color: var(--acc); }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: #1E5A38; border-color: #C8E4D3; }
.alert.error { background: var(--bad-soft); color: #8E1D17; border-color: #F0C4C0; }
.alert.warn { background: var(--warn-soft); color: #7C4A05; border-color: #F0D9AE; }
.alerts { list-style: none; margin: 0; padding: 0; } .alerts li { padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid var(--line); }
.alerts li:last-child { border: 0; } .alerts li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.barrow { margin-bottom: 14px; } .bl { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-weight: 500; }
.bar { height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 4px; transition: width .25s; } .bar i.c2 { background: var(--ink2); } .bar i.c3 { background: var(--gold); }

/* forms */
.form { display: block; } .form h2 { margin-top: 4px; }
.field { margin-bottom: 14px; } .field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #D4D0C7; border-radius: 9px; padding: 10px 12px; min-height: 42px; }
input.r { text-align: right; font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(155,28,46,.28); outline-offset: 1px; border-color: var(--acc); }
.grid2, .grid3, .grid4 { display: grid; gap: 0 16px; } .grid2 { grid-template-columns: repeat(2, 1fr); } .grid3 { grid-template-columns: repeat(3, 1fr); } .grid4 { grid-template-columns: repeat(4, 1fr); }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-weight: 500; } .check input { width: 18px; height: 18px; accent-color: var(--acc); }
.inline { display: inline-flex; gap: 10px; align-items: center; } .inline select { width: auto; min-height: 38px; padding: 6px 10px; }
.dates label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13.5px; } .dates input { width: auto; min-height: 38px; padding: 6px 10px; }
.btn { display: inline-block; font: inherit; font-weight: 600; border-radius: 999px; padding: 10px 20px; border: 1px solid transparent; cursor: pointer; text-align: center; line-height: 1.2; }
.btn:hover { text-decoration: none; } .btn.block { display: block; width: 100%; }
.btn.primary { background: var(--acc); color: var(--acc-ink); } .btn.primary:hover { background: var(--acc-dark); }
.btn.sec { background: #fff; color: var(--ink); border-color: #D4D0C7; } .btn.sec:hover { background: var(--chip); }
.btn.danger { background: #fff; color: var(--bad); border-color: #E3B4B0; } .btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 6px 14px; font-size: 13.5px; } .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* slaughter form */
.split { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; } .split > .card { margin-bottom: 0; }
.live { position: sticky; top: 76px; } .live .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; } .live .row span { color: var(--mute); }
.live .note { margin-top: 12px; } #balance { margin: 12px 0 0; }
.outs { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; } .outs .out { max-width: 130px; margin-left: auto; }
.outs label { font-weight: 500; font-size: 14.5px; margin: 0; }

/* auth */
body.bare { background: var(--bg); }
.auth { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; gap: 14px; }
.auth-card { width: min(380px, 100%); padding: 28px 26px; margin: 0; }
.auth-brand { text-align: center; margin-bottom: 18px; } .auth-brand .mark { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; margin-bottom: 8px; }
.auth-brand h1 { font-size: 20px; } .auth-brand p { color: var(--mute); margin: 2px 0 0; }
.auth .foot { padding: 0; }
.pager { display: flex; justify-content: center; gap: 18px; margin: 14px 0 0; color: var(--mute); }

@media (max-width: 960px) {
  .main { margin-left: 0; } .burger { display: flex; } .top { padding: 0 16px; }
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  body.nav-open .side { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
  .page { padding: 16px 16px 4px; } .cols, .split { grid-template-columns: 1fr; } .live { position: static; }
  .grid4 { grid-template-columns: repeat(2, 1fr); } .top .date { display: none; }
}
@media (max-width: 620px) {
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .card { padding: 16px; } .bignum { font-size: 38px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi .v { font-size: 22px; }
  .btn { padding: 12px 20px; } input[type=text], input[type=password], input[type=date], select { min-height: 46px; font-size: 16px; }
  .head .actions { width: 100%; } .head .actions .btn { flex: 1; }
}
@media print { .side, .top, .scrim, .actions, .foot, .burger { display: none !important; } .main { margin: 0; } body { background: #fff; } .card { border: 0; padding: 0; } }

/* Codex selected UI: warm neutral workspace, burgundy actions and quiet sage details. */
:root{--bg:#f6f5f2;--card:#fff;--line:#e7e9e1;--ink:#293027;--mute:#7a8471;--side:#fcfcfa;--side-text:#717b67;--acc:#8c2838;--acc-dark:#70212e;--acc-soft:#f8edf0;--ok:#4b7c5e;--ok-soft:#eef6ef;--chip:#eef0e8;--r:11px;--side-w:232px}body{font-size:13px}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button,input,select{font:inherit}a:hover{text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #c99ca5;outline-offset:3px}.side{padding:30px 18px 18px;border-right:1px solid var(--line)}.brand{padding:0 10px 26px;color:var(--ink);gap:11px}.brand b{font-size:17px;letter-spacing:-.7px}.brand small{font-size:8px;letter-spacing:2.4px;color:#929987;margin-top:3px}.mark{width:37px;height:37px;border-radius:10px;font-size:20px}.grp{font:600 9px/1.4 var(--font);letter-spacing:1.5px;color:#9ba28e;padding:20px 12px 9px}.side nav a{display:flex;gap:12px;align-items:center;padding:11px 12px;font-size:12px;margin:3px 0;font-weight:450}.side nav a svg{width:16px;height:16px}.side nav a:hover{background:#eff1e9;color:#49533f}.side nav a.on{background:var(--acc);color:white}.me{border-top:1px solid var(--line);font-size:10px;margin-top:25px;padding:17px 5px 0}.me .who{display:flex;flex-direction:row;align-items:center;gap:10px;color:var(--ink)}.me .who small{font-size:10px}.user-avatar{width:32px;height:32px;border-radius:50%;background:#e8ecdf;color:#6e7a5e;display:grid;place-items:center;font-weight:600}.user-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}.me a,.me .linkbtn{color:#818b74;font-size:9px}.me a:hover,.me .linkbtn:hover{color:var(--acc)}.top{height:80px;padding:0 35px;background:#fcfcf9;position:static;justify-content:space-between}.breadcrumb{font-size:11px;color:#969f8a;display:flex;gap:13px;align-items:center}.breadcrumb svg{width:10px;height:10px}.breadcrumb b{font-weight:500;color:#5d6a50}.topmeta{display:flex;gap:9px;align-items:center;font-size:10px;color:#8c967f}.top .date{font-size:10px;margin-left:18px}.connection-dot{height:5px;width:5px;background:#6e9a72;border-radius:50%}.page{max-width:1500px;padding:30px 35px 10px;margin:0 auto}h1{font-size:26px;letter-spacing:-.8px;font-weight:700;margin-bottom:8px}h2{font-size:14px;letter-spacing:-.2px;margin-bottom:17px}p.muted{font-size:11px;line-height:1.8}.head{margin-bottom:25px}.eyebrow{text-transform:uppercase;letter-spacing:1.6px;font-size:9px;color:#9aa28e;margin-bottom:8px!important}.card{padding:22px;margin-bottom:21px}.card-head{margin-bottom:20px}.btn{border-radius:7px;padding:10px 14px;font-size:11px;min-height:36px;display:inline-flex;gap:7px;align-items:center;justify-content:center}.btn.sec{background:#fff;border-color:#dee3d5;color:#617052}.btn.primary{background:var(--acc);border-color:var(--acc)}.actions{gap:9px}.kpis{gap:16px;margin-bottom:23px}.kpi{padding:21px 20px}.kpi .l{font-size:11px;font-weight:450;margin-bottom:10px}.kpi .v{font-size:29px;letter-spacing:-1px;margin-bottom:10px}.kpi .s{font-size:10px}.cols{gap:21px}.t{font-size:11px}.t th{font:500 9px/1.4 var(--font);letter-spacing:.5px;background:#fafbf6;padding:13px 12px;color:#939e85}.t td{padding:15px 12px;color:#657455}.t td b{color:#434f38}.t .btn{font-size:10px;padding:5px 9px;min-height:28px}.t small{font-size:9px}.pill{font-size:9px;padding:4px 7px;border-radius:5px}.field{margin-bottom:17px}.field label{font-size:11px;color:#7e8b6d;margin-bottom:8px}.field input,.field select,.field textarea,input,select{font-size:12px;border-radius:7px;border-color:#dfe4d5;color:#4c5c3e;background:#fff}.field small,small{font-size:10px}.hint,.note{font-size:10px;color:#949e87;line-height:1.8;margin:13px 0}.plain-form{margin-top:20px}.inline-form{display:inline-block;margin-left:12px}.empty{padding:35px!important;text-align:center;color:#9aa48c!important}.linkbtn{color:var(--acc);font-size:11px}.linkbtn:hover{color:var(--acc-dark)}.foot{font-size:9px;display:flex;justify-content:space-between;text-align:left;padding:20px 35px 26px;color:#a0aa92}.sale-workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}.sale-summary{position:sticky;top:20px}.sale-summary .btn{width:100%;margin-top:15px}.sale-total{font-size:32px;letter-spacing:-1px;font-weight:750;margin:20px 0 4px}.sale-line input{width:90px;padding:10px}.sale-line select{max-width:220px;padding:10px}.product-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin:15px 0 25px}.product-tile{border:1px solid #e4e8dc;background:#fff;border-radius:9px;padding:14px;text-align:left;color:#5b6a4d;font-size:11px;cursor:pointer}.product-tile:hover{border-color:#bb8d98;background:#fcf8f9}.product-tile b{display:block;font-size:11px;margin:12px 0 7px}.product-tile span{font-size:10px;color:#98a086}.product-tile .tile-symbol{display:grid;place-items:center;background:#f6edef;color:#b27e89;width:30px;height:30px;border-radius:7px;font-size:19px}.invoice-totals{margin:20px 0 0 auto;width:280px}.invoice-totals p{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:10px}.note-entry{padding:16px 0;border-bottom:1px solid var(--line)}.grid3,.grid2,.grid4{gap:18px}.alert{font-size:12px;border-radius:8px}.tabs{border-radius:7px}.tabs a{border-radius:5px;font-size:11px}.bar{height:5px;background:#eef2e8}.bar i{background:#9caf8c}.bar i.c2{background:#c0aab1}.bar i.c3{background:#c8b684}.barrow .bl{font-size:11px}.facts dt{font-size:10px}.facts dd{font-size:13px}.dashboard-layout{display:grid;grid-template-columns:1.8fr 1fr;gap:21px}.chart-panel{padding:22px 22px 8px}.livechart{width:100%;height:220px;margin-top:10px}.livechart text{font-size:10px;fill:#9ba58e;stroke:none;font-family:var(--font)}.livechart line{stroke:#edf0e6;stroke-width:1}.legend{display:flex;gap:15px;font-size:10px;color:#879478}.legend i{display:inline-block;width:7px;height:7px;background:#8c2838;margin-right:5px;border-radius:2px}.legend .sage{background:#bdc9b5}.dashboard-chart-footer{border-top:1px solid var(--line);font-size:10px;color:#98a18c;padding-top:16px;margin-top:10px;display:flex;justify-content:space-between}.quicklinks{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}.quicklinks a{font-size:10px}.auth{background:#f6f5f2}.auth .mark{margin-bottom:20px}.check{font-size:11px;margin:12px 0;display:flex;align-items:center;gap:8px}.check input{width:auto}.filters input{max-width:260px}.filters .field{margin:0}.split .live{height:max-content}.form input,.form select{max-width:100%}
@media(max-width:1150px){.side{--side-w:210px}.main{margin-left:210px}.page{padding:25px}.top{padding:0 25px}.sale-workspace{grid-template-columns:minmax(0,1fr) 280px}.product-picker{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.sale-workspace,.dashboard-layout,.cols{grid-template-columns:1fr}.sale-summary{position:static}.product-picker{grid-template-columns:repeat(3,1fr)}.kpis{grid-template-columns:repeat(2,1fr)}.topmeta .date{display:none}.grid4{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.side{width:232px}.main{margin-left:0}.burger{display:flex;flex-shrink:0}.top{height:64px;padding:0 17px;justify-content:flex-start}.topmeta{margin-left:auto}.topmeta span:not(.connection-dot){display:none}.page{padding:24px 17px 8px}.head{align-items:flex-start;gap:16px}.kpis{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:15px}.kpi .v{font-size:25px}.kpi .s{font-size:9px}.card{padding:17px}.product-picker{grid-template-columns:repeat(2,1fr)}.foot{padding:20px 17px;gap:15px;font-size:8px}.grid3,.grid2,.grid4{grid-template-columns:1fr}.sale-line select{max-width:170px}.sale-line input{width:85px}.sale-workspace{gap:0}.side{transform:translateX(-100%)}.nav-open .side{transform:translateX(0)}.nav-open .scrim{display:block}.breadcrumb{gap:7px;font-size:10px}.form .actions{gap:8px}.livechart{height:180px}}
.offline-banner{grid-column:1/-1;padding:15px;background:#fbf4e5;border:1px solid #e8d7b4;border-radius:8px;font-size:12px;color:#8c713c}.offline-tools{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}

.card,.sale-workspace>*,.dashboard-layout>*,.cols>*,.grid2>*,.grid3>*,.grid4>*{min-width:0}.tw{max-width:100%;width:100%}.sale-workspace{min-width:0}.livechart rect{stroke:none}.kpi .v small{display:inline;font-size:13px;font-weight:400;letter-spacing:0}.main,.page{min-width:0}@media(max-width:720px){.sale-workspace{display:block}.sale-summary{width:100%}.offline-tools{margin-top:16px}.topmeta{display:none}}
