/* Food Solutions ERP — interface (RTL, Food Solutions identity: teal + orange) */
:root {
	--accent: #E8853F;
	--orange: #17675F;
	--orange-600: #0F4A44;
	--orange-50: #E4F1EF;
	--ink: #0D3632;
	--ink-2: #1F4A4F;
	--ink-3: #3E5C60;
	--cream: #EEF5F5;
	--tan: #F0A06A;
	--bg: #F3F6F6;
	--card: #FFFFFF;
	--line: #DCE6E6;
	--text: #22262C;
	--muted: #6E737B;
	--green: #1E9E6A;
	--green-50: #E7F6EF;
	--amber: #C77A06;
	--amber-50: #FFF4DF;
	--red: #D64545;
	--red-50: #FDECEC;
	--blue: #2F6FDB;
	--blue-50: #EAF1FD;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(43, 47, 54, .05), 0 6px 20px rgba(43, 47, 54, .06);
	--font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--orange-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; color: var(--ink); }
h1 { font-size: 22px; font-weight: 700; }
h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
code { font-size: 12px; background: var(--cream); padding: 2px 6px; border-radius: 6px; direction: ltr; display: inline-block; }
.muted { color: var(--muted); }
.small, small { font-size: 12.5px; }
.strong { font-weight: 600; }
.hidden { display: none !important; }
.break { word-break: break-all; display: block; }
.mt { margin-top: 16px; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--ink); color: #D5D8DD; position: fixed; inset: 0 0 0 auto; display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; color: var(--tan); font-size: 11.5px; letter-spacing: .2px; }
.logo-img { max-width: 140px; object-fit: contain; }
.sidebar nav { overflow-y: auto; padding: 8px 10px 20px; flex: 1; }
.nav-group { margin-top: 12px; }
.nav-title { display: block; font-size: 11.5px; color: #8E949D; padding: 4px 10px; font-weight: 600; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #D5D8DD; padding: 8px 10px; border-radius: 10px; margin: 1px 0; text-decoration: none; font-size: 14px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.on { background: var(--orange); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(23,103,95,.35); }
.side-foot { padding: 14px 18px; font-size: 12px; color: var(--tan); border-top: 1px solid rgba(255,255,255,.07); }
.main { flex: 1; margin-right: 252px; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(243,246,246,.9); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.top-title { font-weight: 600; flex: 1; color: var(--ink); }
.user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--cream); color: var(--ink); }
.menu-toggle { display: none; }
.content { padding: 24px 28px 60px; max-width: 1400px; width: 100%; }
.nav-scrim { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: var(--tan); background: #F7FBFB; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-600); border-color: var(--orange-600); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--cream); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn.danger, .danger { color: var(--red); }
.btn.loading { opacity: .6; pointer-events: none; }
form.inline { display: inline; }

/* ---------- Page ---------- */
.page-head, .hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p, .hello p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card.center { text-align: center; }
.section-title { margin: 22px 0 10px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 15px; }
.card > .section-title:first-child, form > .section-title:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }

/* ---------- Flash ---------- */
.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; transition: opacity .6s; }
.flash.fade { opacity: 0; }
.flash-success { background: var(--green-50); border-color: #BDE6D2; color: #11724B; }
.flash-error { background: var(--red-50); border-color: #F4C4C4; color: #A12F2F; }
.flash-warning { background: var(--amber-50); border-color: #F2D49B; color: #8A5300; }
.flash-info { background: var(--blue-50); border-color: #C7D9F7; color: #23529F; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--orange-50); color: var(--orange-600); display: grid; place-items: center; flex: none; }
.stat-ic .ic { width: 22px; height: 22px; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; }
.stat strong { display: block; font-size: 19px; color: var(--ink); font-weight: 700; }
.stat strong small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat > div > small { color: var(--muted); font-size: 11.5px; }
.stat.green .stat-ic { background: var(--green-50); color: var(--green); }
.stat.amber .stat-ic { background: var(--amber-50); color: var(--amber); }
.stat.red .stat-ic { background: var(--red-50); color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: right; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #F8FBFB; }
.table td { padding: 10px; border-bottom: 1px solid #E6EEEE; vertical-align: middle; }
.table tbody tr:hover td { background: #F5FAFA; }
.table .num { text-align: left; direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table td.num small { direction: rtl; }
.table tr.sec td { background: var(--cream); font-weight: 600; color: var(--ink); }
.table tr.tot td { font-weight: 600; border-top: 1px solid var(--line); }
.table tr.grand td { font-weight: 700; background: var(--ink); color: #fff; font-size: 15px; }
.table tr.grand.pos td { background: var(--green); }
.table tr.grand.neg td { background: var(--ink); }
.table.journal tr.jstart td { border-top: 2px solid var(--line); }
.table td.indent { padding-right: 34px; color: var(--ink-3); }
.row-actions { white-space: nowrap; text-align: left; }
.row-actions form { display: inline-block; margin-inline-start: 4px; }

/* lines editing */
.table.lines td { padding: 6px 4px; }
.table.lines input, .table.lines select { width: 100%; min-width: 70px; }
.table.lines .i-ex { margin-top: 4px; font-size: 12px; }
.table.payroll input.sm { width: 90px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EEF0F2; color: var(--ink-3); }
.b-green { background: var(--green-50); color: var(--green); }
.b-amber { background: var(--amber-50); color: var(--amber); }
.b-red { background: var(--red-50); color: var(--red); }
.b-blue { background: var(--blue-50); color: var(--blue); }
.b-grey { background: #EEF0F2; color: var(--ink-3); }
.chip { display: inline-block; background: var(--cream); padding: 1px 9px; border-radius: 999px; font-size: 12px; margin: 2px; }

/* ---------- Forms ---------- */
.grid-form { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.w-full { flex: 1 1 100%; }
.w-half { flex: 1 1 calc(50% - 16px); min-width: 220px; }
.w-third { flex: 1 1 calc(33.33% - 16px); min-width: 170px; }
.w-twothird { flex: 1 1 calc(66.66% - 16px); min-width: 240px; }
.w-auto { flex: 0 1 auto; }
label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.req { color: var(--red); }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #CFDCDC; border-radius: 10px; background: #fff; color: var(--text); width: 100%; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(23,103,95,.15); }
input[type=number], input[type=date], input[type=month], input.num { direction: ltr; text-align: right; }
input:user-invalid, select:user-invalid { border-color: #EBA6A6; }
input[disabled] { background: #F6F4F1; color: var(--muted); }
.help { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; padding: 3px 0; }
.check input { width: auto; accent-color: var(--orange); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.danger-zone { border-top: 1px dashed var(--line); margin-top: 18px; padding-top: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filters .field { min-width: 130px; }
.search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 420px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.mini-form .field { margin-bottom: 10px; }
.mini-form .form-actions { margin-top: 6px; }
.calc { padding: 9px 11px; background: var(--cream); border-radius: 10px; font-size: 13px; }
.logo-preview { display: flex; align-items: center; gap: 14px; margin-top: 14px; }

.totals-box { margin: 18px 0 6px auto; margin-right: auto; margin-left: 0; max-width: 360px; background: var(--cream); border-radius: 12px; padding: 12px 16px; }
.totals-box > div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals-box b { direction: ltr; font-variant-numeric: tabular-nums; }
.totals-box .grand { border-top: 1px solid var(--tan); margin-top: 6px; padding-top: 8px; font-size: 16px; font-weight: 700; color: var(--ink); }
.totals-box .grand b { color: var(--orange-600); }

/* ---------- Detail layout ---------- */
.view-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.side .card h3 { font-size: 14.5px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack form { display: block; }
.stack form .btn { width: 100%; justify-content: center; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin-bottom: 16px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.kv span { color: var(--muted); font-size: 12px; }
.kv .wide { grid-column: 1 / -1; }
.pay-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pay-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #E6EEEE; font-size: 13.5px; }
.pay-list li > span:first-child, .pay-list li > a:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pay-list li b { direction: ltr; white-space: nowrap; }
.pay-list form { margin: 0; }
.pay-list .btn-sm { padding: 2px 6px; }
.qr { width: 180px; margin: 6px auto 10px; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.zmsg { background: #F4F8F8; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; direction: ltr; text-align: left; max-height: 260px; overflow: auto; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .ic { width: 42px; height: 42px; color: var(--tan); }
.empty p { margin: 8px 0 14px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pager a { padding: 4px 11px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); }
.pager a.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; text-decoration: none; }
.tabs a.on { color: var(--orange-600); border-color: var(--orange); }
.report-title { text-align: center; margin: 6px 0 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* bars */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 170px 1fr 100px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { background: var(--cream); height: 10px; border-radius: 99px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.hbar b { direction: ltr; text-align: left; }

/* dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dash-grid .card { margin: 0; }
.span2 { grid-column: span 2; }
.chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: middle; }
.sw.s1, svg.bars .s1 { background: var(--orange); fill: var(--orange); }
.sw.s2, svg.bars .s2 { background: var(--accent); fill: var(--accent); }
svg.bars { width: 100%; height: auto; display: block; margin-top: 8px; }
svg.bars .grid { stroke: #E4ECEC; stroke-width: 1; }
svg.bars .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; text-align: center; }
.mini-stats div { background: var(--cream); border-radius: 10px; padding: 8px 4px; }
.mini-stats b { display: block; font-size: 20px; color: var(--ink); }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.setup { border-color: #BFDDE0; background: linear-gradient(180deg, #F2F9F9, #fff); }
.setup h3 { display: flex; gap: 8px; align-items: center; color: var(--orange-600); }
.setup ol { margin: 0; padding-right: 20px; }
.setup li { padding: 3px 0; }
.setup li.done { color: var(--green); text-decoration: line-through; }
.setup li.done a { color: var(--green); }

/* ZATCA wizard */
.step { display: flex; gap: 16px; }
.step-n { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.step.done .step-n { background: var(--green); color: #fff; }
.step.locked { opacity: .55; }
.step-body { flex: 1; min-width: 0; }
.step-body p { margin: 0 0 10px; }
pre.code { direction: ltr; text-align: left; background: var(--ink); color: #E8EAED; padding: 12px; border-radius: 10px; font-size: 11.5px; overflow: auto; }
details summary { cursor: pointer; color: var(--orange-600); margin-top: 10px; font-size: 13px; }
.checks { list-style: none; padding: 0; margin: 12px 0 0; }
.checks li { padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; }
.checks li.ok { background: var(--green-50); color: #11724B; }
.checks li.bad { background: var(--red-50); color: #A12F2F; }
.checks .ic { vertical-align: middle; }
.explain { padding-right: 18px; margin: 0; font-size: 13px; }
.explain li { margin-bottom: 8px; }

/* ---------- Login ---------- */
.fg-login { background: var(--ink); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { background: radial-gradient(1200px 600px at 80% 10%, rgba(242,140,40,.22), transparent 60%), var(--ink); color: #fff; display: grid; place-items: center; padding: 40px; }
.login-brand-inner { max-width: 420px; }
.login-brand h2 { color: #fff; font-size: 30px; margin: 16px 0 4px; }
.tagline { color: var(--accent); font-size: 18px; font-weight: 600; margin: 0; }
.tagline-en { color: var(--tan); margin: 2px 0 24px; letter-spacing: .3px; }
.login-points { list-style: none; padding: 0; margin: 0; }
.login-points li { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: #D5D8DD; }
.login-points .ic { color: var(--accent); }
.login-form { background: var(--bg); display: grid; place-items: center; padding: 30px 20px; }
.login-card { width: 100%; max-width: 380px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 24px; }
.login-card p { margin: -8px 0 4px; }

/* ---------- Print documents ---------- */
.print-body { background: #E9E6E1; }
.print-bar { display: flex; gap: 10px; justify-content: center; padding: 14px; position: sticky; top: 0; background: rgba(233,230,225,.9); backdrop-filter: blur(6px); z-index: 5; }
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 30px; background: #fff; padding: 14mm 14mm 10mm; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,.12); font-size: 12.5px; display: flex; flex-direction: column; overflow: hidden; }
.sheet::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--orange) 0 35%, var(--accent) 35% 100%); }
.watermark { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-25deg); font-size: 80px; font-weight: 700; color: rgba(214,69,69,.10); white-space: nowrap; pointer-events: none; }
.inv-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.inv-co { display: flex; gap: 12px; align-items: center; }
.inv-co h2 { font-size: 20px; }
.inv-co .en, .inv-title .en { color: var(--muted); font-size: 12px; direction: ltr; }
.inv-title { text-align: left; }
.inv-title h1 { font-size: 22px; color: var(--orange-600); }
.inv-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--cream); border-radius: 10px; padding: 8px 12px; margin: 12px 0; }
.inv-strip span { display: block; color: var(--muted); font-size: 10.5px; }
.inv-strip b { font-size: 12.5px; }
.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.inv-meta .box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.inv-meta h4 { font-size: 12.5px; color: var(--orange-600); margin-bottom: 6px; }
.inv-meta table { width: 100%; border-collapse: collapse; }
.inv-meta td { padding: 3px 0; vertical-align: top; }
.inv-meta td:first-child { color: var(--muted); width: 45%; font-size: 11.5px; }
.inv-items { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.inv-items th { background: var(--ink); color: #fff; font-weight: 600; padding: 7px 6px; font-size: 11.5px; text-align: center; }
.inv-items th small { color: var(--tan); font-weight: 400; font-size: 9.5px; }
.inv-items td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.inv-items td.desc, .inv-items th.desc { text-align: right; }
.inv-items tbody tr:nth-child(even) td { background: #F8FBFB; }
.inv-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.qr-col { text-align: center; }
.qr-col .qr { margin: 0 0 4px; width: 150px; }
.qr-col small { color: var(--muted); font-size: 10px; }
.inv-totals { border-collapse: collapse; min-width: 330px; }
.inv-totals td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.inv-totals td:last-child { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; font-weight: 600; }
.inv-totals tr.grand td { background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; border: 0; }
.inv-notes { margin-top: 14px; padding: 10px 12px; background: var(--cream); border-radius: 10px; font-size: 11.5px; }
.inv-bank { margin-top: 8px; font-size: 11.5px; }
.inv-brand { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.slip .net-box { margin: 14px 0; background: var(--ink); color: #fff; border-radius: 10px; padding: 14px; text-align: center; font-size: 16px; }
.slip .net-box b { color: var(--accent); font-size: 20px; }
.slip .signs { display: flex; justify-content: space-between; margin-top: 50px; }
.slip .signs div { border-top: 1px solid var(--ink-3); padding-top: 6px; width: 40%; text-align: center; color: var(--muted); }

@media print {
	@page { size: A4; margin: 0; }
	.no-print, .sidebar, .topbar, .print-bar, .page-head .actions, .filters, .tabs { display: none !important; }
	body, .print-body { background: #fff; }
	.sheet { box-shadow: none; margin: 0; width: auto; min-height: 297mm; }
	.main { margin: 0; }
	.content { padding: 0; }
	.card { box-shadow: none; border: 0; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.view-grid { grid-template-columns: 1fr; }
	.dash-grid { grid-template-columns: 1fr 1fr; }
	.span2 { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.sidebar { transform: translateX(100%); }
	.nav-open .sidebar { transform: none; box-shadow: -10px 0 40px rgba(0,0,0,.25); }
	.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
	.main { margin-right: 0; }
	.menu-toggle { display: inline-grid; }
	.topbar { padding: 10px 16px; }
	.content { padding: 18px 16px 50px; }
	.hide-sm { display: none !important; }
	.dash-grid, .two-col { grid-template-columns: 1fr; }
	.login-wrap { grid-template-columns: 1fr; }
	.login-brand { padding: 30px 20px; }
	.hbar { grid-template-columns: 110px 1fr 80px; }
	.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
	.stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
	.stat strong { font-size: 16px; }
	.table thead { display: none; }
	.table:not(.lines):not(.payroll):not(.journal) tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
	.table:not(.lines):not(.payroll):not(.journal) td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 6px; }
	.table:not(.lines):not(.payroll):not(.journal) td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
	.table.lines thead, .table.payroll thead, .table.journal thead { display: table-header-group; }
	.sheet { width: 100%; min-height: auto; padding: 16px; }
	.inv-strip, .inv-meta { grid-template-columns: 1fr 1fr; }
	.inv-foot { flex-direction: column-reverse; align-items: stretch; }
}

/* Food Solutions logo */
.brand .logo-img { height: 46px !important; width: 46px !important; background: #fff; border-radius: 12px; padding: 4px; flex: none; }
.login-logo { display: inline-block; background: #fff; border-radius: 20px; padding: 16px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-logo .logo-img { display: block; max-width: 100%; }
.inv-co .logo-img { max-width: 90px; object-fit: contain; }
