:root {
  --green-900: #0f3a1d;
  --green-800: #123f22;
  --green-700: #1b5a30;
  --green-600: #1f7a3a;
  --yellow: #e6d23a;
  --yellow-600: #c4b000;
  --yellow-soft: #fdf8df;
  --pink: #e0197d;
  --blue: #1f6fd1;
  --ink: #17251b;
  --ink-2: #3f4b43;
  --muted: #6f7a72;
  --line: #e6e6dc;
  --bg: #f6f5ef;
  --card: #ffffff;
  --danger: #d6263a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 25, .05), 0 2px 10px rgba(20, 40, 25, .04);
  --script: 'Yellowtail', cursive;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
.ic { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: var(--green-800); color: #eef3ea;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  padding: 18px 14px; overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; padding: 4px 6px 22px; }
.brand svg { width: 64px; height: 56px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 30px; font-weight: 800; color: var(--yellow); letter-spacing: -0.02em; }
.brand-text span { font-size: 21px; color: #fff; font-weight: 500; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: #e8efe5; font-weight: 500; font-size: 14.5px;
}
.nav-link:hover { background: rgba(255,255,255,.07); }
.nav-link.active { background: var(--yellow); color: var(--green-900); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding-top: 24px; }
.tagline-art svg { width: 130px; height: 120px; display: block; margin: 0 auto -8px; }
.tagline { font-family: var(--script); color: var(--yellow); font-size: 25px; line-height: 1.05; text-align: center; transform: rotate(-8deg); margin-bottom: 26px; }
.backup-link { border-top: 1px solid rgba(255,255,255,.14); border-radius: 0; padding-top: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 28px 0; justify-content: flex-end; }
.search { position: relative; width: min(280px, 100%); }
.search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1.5px solid #c9ccc2; background: #fff;
  padding: 0 16px 0 42px; outline: none;
}
.search input:focus { border-color: var(--green-600); }
.search-ic { position: absolute; left: 14px; top: 11px; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; cursor: pointer; color: var(--ink); position: relative;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.bell .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-800); color: var(--yellow);
  display: grid; place-items: center; font-weight: 700; text-decoration: none;
}
.menu-btn { display: none; margin-right: auto; }
.view { padding: 8px 28px 40px; max-width: 1320px; width: 100%; }
.scrim { display: none; }

/* ---------- popovers ---------- */
.pop-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); z-index: 30; min-width: 300px; padding: 10px;
}
.popover h4 { font-size: 13px; padding: 6px 8px; color: var(--muted); font-weight: 600; }
.pop-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.pop-item:hover { background: var(--bg); }
.pop-item small { color: var(--muted); display: block; }
.pop-empty { padding: 14px 8px; color: var(--muted); }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid #d7d9cf; background: #fff; cursor: pointer; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #b9bdb1; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.btn.primary:hover { background: var(--green-700); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--green-900); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f0c4ca; }
.btn.danger:hover { background: #fdf0f1; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-600); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.grow { flex: 1; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 19px; font-weight: 700; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card-head .more { margin-left: auto; font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.card-head .more .ic { width: 15px; height: 15px; }
.badge-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow-600); color: #fff; flex: none; }
.badge-ic .ic { width: 20px; height: 20px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat {
  border-radius: var(--radius); padding: 18px 18px 16px; border: 1.5px solid; position: relative; overflow: hidden;
  text-decoration: none; display: block; box-shadow: var(--shadow);
}
.stat::after { content: ''; position: absolute; right: -28px; top: -28px; width: 86px; height: 86px; border-radius: 50%; opacity: .55; }
.stat .badge-ic { width: 46px; height: 46px; margin-bottom: 14px; }
.stat .badge-ic .ic { width: 22px; height: 22px; }
.stat-label { font-weight: 700; font-size: 15.5px; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0; white-space: nowrap; }
.stat-sub { color: var(--ink-2); font-size: 14px; }
.stat-foot { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat-foot b { font-weight: 700; }
.stat-foot .ic { width: 16px; height: 16px; }
.stat.green { background: #eef8ef; border-color: #b6dfba; }
.stat.green .stat-label, .stat.green .stat-foot b, .stat.green .stat-foot .ic { color: var(--green-600); }
.stat.green .badge-ic { background: var(--green-600); }
.stat.green::after { background: #cfe9c8; }
.stat.pink { background: #fdecf4; border-color: #f4b2d1; }
.stat.pink .stat-label, .stat.pink .stat-foot b, .stat.pink .stat-foot .ic { color: var(--pink); }
.stat.pink .badge-ic { background: var(--pink); }
.stat.pink::after { background: #f8c6dd; }
.stat.blue { background: #ebf3fc; border-color: #b4d0f1; }
.stat.blue .stat-label, .stat.blue .stat-foot b, .stat.blue .stat-foot .ic { color: var(--blue); }
.stat.blue .badge-ic { background: var(--blue); }
.stat.blue::after { background: #c6dbf6; }
.stat.yellow { background: #fdf9e4; border-color: #eedf96; }
.stat.yellow .stat-label { color: var(--ink); }
.stat.yellow .stat-foot b, .stat.yellow .stat-foot .ic { color: var(--green-600); }
.stat.yellow .badge-ic { background: var(--yellow-600); }
.stat.yellow::after { background: #f5e88e; }
.stat-foot.down b, .stat-foot.down .ic { color: var(--danger) !important; }

/* ---------- dashboard grid ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.range-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-weight: 500; padding: 6px 0; }
.range-pop { min-width: 280px; padding: 14px; }
.range-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.range-presets button { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.range-presets button:hover { border-color: var(--green-600); }
.range-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }

.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.prod { padding: 4px 18px 18px; border-right: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.prod:hover { background: #fafaf6; }
.prod:nth-child(3n) { border-right: 0; }
.prod-top { display: flex; gap: 12px; }
.prod .badge-ic { width: 48px; height: 48px; }
.prod .badge-ic .ic { width: 22px; height: 22px; }
.prod-name { font-weight: 600; font-size: 13px; min-height: 34px; }
.prod-count { font-size: 30px; font-weight: 800; line-height: 1.1; }
.prod-pct { color: var(--muted); font-size: 12.5px; }
.bar { height: 9px; border-radius: 9px; background: #ececea; margin-top: 14px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 9px; }
.prod-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; align-items: center; }
.closed-box {
  border: 1.5px dashed #c9ccc2; border-radius: 10px; background: #fafaf6; padding: 16px 18px; display: flex; gap: 14px;
  align-items: center; cursor: pointer; text-decoration: none;
}
.closed-box:hover { border-color: var(--green-600); }
.closed-box .ok { color: #fff; background: var(--green-600); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; flex: none; align-self: flex-start; }
.closed-box .ok .ic { width: 14px; height: 14px; }
.closed-box .num { font-size: 28px; font-weight: 800; line-height: 1.15; }
.closed-box small { color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fafaf6; }
.tbl .r { text-align: right; }
.tbl .sub { color: var(--muted); font-size: 12.5px; }
.tbl .num-link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.tbl .chev { color: var(--ink-2); width: 30px; }
.tbl .chev .ic { width: 18px; height: 18px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .actions { white-space: nowrap; text-align: right; }
.empty-row td { text-align: center; color: var(--muted); padding: 30px 10px; }
.foot-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; flex-wrap: wrap; }
.foot-note .ic { width: 16px; height: 16px; }
.foot-note a { color: var(--ink); font-weight: 600; }
.overdue { color: var(--danger); }
.due-today { color: #b26a00; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--c); color: var(--fg, #fff); white-space: normal; max-width: 140px; line-height: 1.3; }
select.pill-select { border: 0; border-radius: 8px; padding: 5px 8px; font-size: 12px; font-weight: 600; background: var(--c); color: var(--fg, #fff); cursor: pointer; max-width: 190px; }
select.pill-select option { background: #fff; color: var(--ink); }

/* ---------- right column ---------- */
.promo {
  background: var(--green-800); border-radius: var(--radius); height: 226px; position: relative; overflow: hidden; color: var(--yellow);
}
.promo-text { font-family: var(--script); font-size: 38px; line-height: 1.02; position: absolute; left: 20px; top: 22px; transform: rotate(-10deg); transform-origin: left top; z-index: 1; }
.promo svg { position: absolute; right: -6px; bottom: -6px; width: 200px; height: 176px; }
.quick { display: flex; flex-direction: column; gap: 10px; }
.quick .card-head { margin-bottom: 4px; }
.quick .card-head h2 { font-size: 16px; }
.quick .card-head .ic { color: var(--yellow-600); }
.quick .btn { justify-content: flex-start; width: 100%; height: 42px; font-weight: 600; font-size: 13.5px; }
.tip { background: var(--yellow-soft); border: 1.5px solid #eedf96; border-radius: var(--radius); padding: 18px; position: relative; }
.tip h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.tip h3 .ic { color: var(--yellow-600); }
.tip p { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.tip .next-tip { font-size: 12px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, .input {
  border: 1.5px solid #d7d9cf; border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; min-height: 40px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(31,122,58,.12); }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field.check input { width: 18px; height: 18px; min-height: 0; }
.hint { color: var(--muted); font-size: 12.5px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h3 { font-size: 15px; }
.newcust { background: var(--bg); border-radius: 10px; padding: 14px; }

.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; padding: 6px 6px; font-weight: 600; }
.items td { padding: 4px 6px; vertical-align: middle; }
.items input { width: 100%; border: 1.5px solid #e0e1d8; border-radius: 8px; padding: 7px 9px; min-height: 36px; outline: none; background: #fff; }
.items input:focus { border-color: var(--green-600); }
.items .w-qty { width: 80px; }
.items .w-money { width: 110px; }
.items .r { text-align: right; white-space: nowrap; font-weight: 600; }
.items .empty td { color: var(--muted); padding: 14px 6px; }
.items-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.items-actions select { border: 1.5px solid #d7d9cf; border-radius: 8px; padding: 0 10px; height: 32px; background: #fff; font-size: 13px; }
.job-bottom { display: grid; grid-template-columns: 1fr 280px; gap: 18px; }
.totals { background: var(--bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.totals > div { display: flex; justify-content: space-between; gap: 10px; }
.totals .big { font-size: 18px; }
.totals .field { flex-direction: row; align-items: center; justify-content: space-between; }
.totals .field input { width: 130px; min-height: 36px; padding: 6px 10px; text-align: right; }
.totals .owing { border-top: 1px solid var(--line); padding-top: 8px; }
.totals .muted { color: var(--muted); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 30, 18, .45); display: grid; place-items: start center; padding: 40px 16px; overflow-y: auto; z-index: 100; animation: fade .12s ease; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: pop .14s ease; }
.modal.wide { width: min(920px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal header h2 { font-size: 19px; }
.modal header small { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: 13px; }
.modal-body { padding: 20px 22px; }
.modal footer { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfbf8; border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--green-900); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 220px; flex: 0 1 300px; }
.toolbar select.input { min-width: 0; flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid #d7d9cf; background: #fff; border-radius: 999px; padding: 6px 13px; cursor: pointer; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.count-note { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #eeede6; border-radius: 14px; padding: 12px; min-height: 300px; transition: background .12s; }
.col.over { background: #e3efe2; outline: 2px dashed var(--green-600); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-weight: 700; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.col-head .n { margin-left: auto; background: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.col-head small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.kcard { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--c); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .k-num { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kcard .k-title { font-weight: 700; margin: 2px 0; }
.kcard .k-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; gap: 8px; }
.col-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 20px 6px; border: 1.5px dashed #d2d3c9; border-radius: 10px; }

/* ---------- misc pages ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tpl-card h3 { font-size: 16px; margin-bottom: 4px; }
.tpl-card p { color: var(--muted); margin: 0 0 12px; font-size: 13px; min-height: 18px; }
.tpl-card ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.tpl-card .tpl-total { font-weight: 700; margin-bottom: 14px; }
.tpl-card .row { display: flex; gap: 8px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .ic { width: 40px; height: 40px; color: var(--yellow-600); margin-bottom: 8px; }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }

.status-row { display: grid; grid-template-columns: 44px 1fr 160px 70px 100px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row input[type=color] { width: 40px; height: 36px; border: 1.5px solid #d7d9cf; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.status-row .cnt { color: var(--muted); font-size: 12.5px; text-align: center; }
.status-row .btns { display: flex; gap: 2px; justify-content: flex-end; }
.status-head { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.quote { background: var(--green-800); color: #fff; border-radius: var(--radius); padding: 22px; position: sticky; top: 16px; }
.quote h2 { color: var(--yellow); font-size: 18px; margin-bottom: 14px; }
.quote .line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: #d9e4d6; font-size: 13.5px; }
.quote .line b { color: #fff; font-weight: 600; white-space: nowrap; }
.quote .sep { border-top: 1px solid rgba(255,255,255,.18); margin: 8px 0; }
.quote .total { font-size: 15px; color: #fff; }
.quote .total b { font-size: 26px; color: var(--yellow); }
.quote .unit { text-align: right; color: #c9d6c5; font-size: 13px; margin-top: -2px; }
.quote .btn { width: 100%; margin-top: 10px; }
.quote .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.quote .profit-box { background: rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }

.io-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.io-card h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 8px; }
.io-card h3 .ic { color: var(--yellow-600); }
.io-card p { color: var(--ink-2); margin: 0 0 14px; font-size: 13px; }
.io-card code { background: var(--bg); border-radius: 6px; padding: 2px 6px; font-size: 12px; word-break: break-word; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.methods { width: 100%; border-collapse: collapse; }
.methods th { font-size: 11.5px; text-transform: uppercase; color: var(--muted); text-align: left; padding: 4px 4px; font-weight: 600; letter-spacing: .03em; }
.methods td { padding: 3px 4px; }
.methods input { width: 100%; border: 1.5px solid #e0e1d8; border-radius: 8px; padding: 6px 8px; min-height: 34px; }
.methods .w { width: 84px; }

.search-group { margin-bottom: 18px; }
.search-group h2 { font-size: 16px; margin-bottom: 8px; }

.customer-jobs { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.customer-jobs h3 { font-size: 14px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.mini-stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.mini-stats small { color: var(--muted); display: block; font-size: 12px; }
.mini-stats b { font-size: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
  .calc { grid-template-columns: 1fr; }
  .quote { position: static; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px 0; }
  .view { padding: 8px 16px 32px; }
  .settings-grid, .job-bottom { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .prod:nth-child(3n) { border-right: 1px solid var(--line); }
  .prod:nth-child(2n) { border-right: 0; }
  .prod-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .page-head h1 { font-size: 24px; }
  .prod-grid { grid-template-columns: 1fr; }
  .prod { border-right: 0 !important; }
  .search { width: auto; flex: 1; }
  .status-row { grid-template-columns: 40px 1fr 90px; }
  .status-row .cnt { display: none; }
  .status-row .btns { grid-column: 1 / -1; }
  .mini-stats { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .head-actions, .toolbar { display: none !important; }
  .view { padding: 0; }
}

.calc-tabs .chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13.5px; }
.calc-tabs .chip .ic { width: 16px; height: 16px; }
