/* TrackNtrace — small hand-written utility stylesheet (Tailwind-like class names,
   but no external framework / CDN dependency — the whole app runs offline). */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; }
html, body { height: 100%; margin: 0; }
body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
table { border-collapse: collapse; }

/* ---------- layout ---------- */
.flex { display: flex; }
.inline-block { display: inline-block; }
.block { display: block; }
.grid { display: grid; }
.hidden { display: none !important; }
.fixed { position: fixed; }
.sticky { position: sticky; top: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.h-screen { height: 100vh; }
.w-full { width: 100%; }
.w-20 { width: 5rem; } .w-28 { width: 7rem; } .w-32 { width: 8rem; }
.w-40 { width: 10rem; } .w-56 { width: 14rem; } .w-64 { width: 16rem; }
.min-w-\[240px\] { min-width: 240px; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.min-h-\[200px\] { min-height: 200px; }
.cursor-pointer { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.italic { font-style: italic; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }

@media (min-width: 640px) { .sm\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 768px) { .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ---------- spacing ---------- */
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.space-y-1\.5 > * + * { margin-top: .375rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.p-2 { padding: .5rem; } .p-3 { padding: .75rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
.px-1 { padding-left: .25rem; padding-right: .25rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1rem; } .pt-4 { padding-top: 1rem; } .pt-1\.5 { padding-top: .375rem; }
.pl-3 { padding-left: .75rem; } .pr-2 { padding-right: .5rem; }

.mb-0\.5 { margin-bottom: .125rem; } .mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-6 { margin-top: 1.5rem; }
.mx-2 { margin-left: .5rem; margin-right: .5rem; } .mr-2 { margin-right: .5rem; }
.bottom-4 { bottom: 1rem; } .right-4 { right: 1rem; }

/* ---------- typography ---------- */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-\[10px\] { font-size: 10px; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: .025em; }

/* ---------- borders / radius / shadow ---------- */
.border { border: 1px solid #e2e8f0; }
.border-b { border-bottom: 1px solid #e2e8f0; }
.border-b-2 { border-bottom: 2px solid transparent; }
.border-t { border-top: 1px solid #e2e8f0; }
.border-l-2 { border-left: 2px solid #e2e8f0; }
.rounded { border-radius: .25rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-t-xl { border-top-left-radius: .75rem; border-top-right-radius: .75rem; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.last\:border-0:last-child { border: 0; }

/* ---------- colors ----------
   Clean white/slate-blue corporate palette: white surfaces with cool slate neutrals,
   a blue primary/brand, a distinct green for success/positive status, and amber/red
   kept for warning/danger (unchanged from the previous palette for continuity). */
.bg-white { background-color: #fff; }
.text-white { color: #fff; }

.bg-slate-50 { background-color: #f8fafc; } .bg-slate-100 { background-color: #eef2f7; }
.bg-slate-700 { background-color: #5B8DEF; } .bg-slate-800 { background-color: #2748A0; } .bg-slate-900 { background-color: #3B6FE8; }
.text-slate-100 { color: #eef2f7; } .text-slate-200 { color: #334155; } .text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; } .text-slate-500 { color: #64748b; } .text-slate-600 { color: #475569; }
.text-slate-800 { color: #1e293b; } .text-slate-900 { color: #0f172a; }
.border-slate-50 { border-color: #f8fafc; } .border-slate-100 { border-color: #eef2f7; }
.border-slate-200 { border-color: #e2e8f0; } .border-slate-700 { border-color: #334155; } .border-slate-900 { border-color: #0f172a; }

.bg-sky-50 { background-color: #EFF6FF; } .bg-sky-100 { background-color: #E4EEFC; }
.text-sky-700 { color: #1D4FA8; } .text-sky-800 { color: #1E3A8A; } .text-sky-900 { color: #172554; }
.border-sky-200 { border-color: #BFD7F8; }

.bg-emerald-100 { background-color: #E3F5E9; } .bg-emerald-600 { background-color: #1F9D55; }
.text-emerald-800 { color: #15803D; }

.bg-amber-50 { background-color: #fbf3e4; } .bg-amber-100 { background-color: #f5e4c8; } .bg-amber-200 { background-color: #efd3a0; }
.text-amber-800 { color: #7a4a15; } .text-amber-900 { color: #5c380f; }
.border-amber-200 { border-color: #efd3a0; }

.bg-rose-50 { background-color: #fbeeea; } .bg-rose-100 { background-color: #f6dad4; } .bg-rose-600 { background-color: #b23a2c; }
.text-rose-600 { color: #b23a2c; } .text-rose-700 { color: #8f2e22; }

.bg-purple-100 { background-color: #ece2f5; }
.text-purple-700 { color: #6b4a96; } .text-purple-800 { color: #55397a; }

.bg-teal-100 { background-color: #d3ece7; } .text-teal-800 { color: #0f6b5c; }

.bg-orange-100 { background-color: #f5dfc4; } .text-orange-800 { color: #7a4712; }
.bg-yellow-100 { background-color: #f5ebc4; } .text-yellow-800 { color: #6b550e; }
.bg-blue-100 { background-color: #E4EEFC; } .text-blue-800 { color: #1E3A8A; }

/* ---------- hover / focus ---------- */
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-700:hover { background-color: #5B8DEF; }
.hover\:bg-slate-800:hover { background-color: #2748A0; }
.hover\:text-slate-800:hover { color: #1e293b; }
.hover\:underline:hover { text-decoration: underline; }

/* ---------- app chrome ---------- */
.nav-link.active { background-color: #E4EEFC; color: #1D4FA8; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
table.data th { position: sticky; top: 0; background: #f8fafc; }
svg.barcode-svg { display: block; max-width: 150px; max-height: 32px; }

/* ---------- sidebar ---------- */
.sidebar { background: #ffffff; color: #1e293b; border-right: 1px solid #e2e8f0; }
.sidebar-logo-badge {
  width: 2.15rem; height: 2.15rem; border-radius: .55rem; background: #3B6FE8; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.nav-link { color: #334155; }
.nav-link:hover { background-color: #f1f5f9; color: #0f172a; }
.nav-link.active:hover { background-color: #E4EEFC; color: #1D4FA8; }

/* ---------- sidebar footer ---------- */
.sidebar-footer-links { padding: .5rem 0; }
.sidebar-footer-link { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; color: #475569; }
.sidebar-footer-link:hover { background: #f1f5f9; color: #0f172a; }

/* ---------- topbar ---------- */
.topbar {
  background: #fff; border-bottom: 1px solid #e2e8f0; padding: .9rem 1.5rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.topbar-left h1 { margin: 0; font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.topbar-subtitle { margin: .15rem 0 0; font-size: .875rem; color: #64748b; }
.topbar-right { display: flex; align-items: flex-start; gap: .75rem; }

.search-wrap { position: relative; }
.search-wrap input {
  width: 260px; padding: .5rem .75rem .5rem 2.1rem; border: 1px solid #e2e8f0; border-radius: .6rem;
  font-size: .8rem; background: #f8fafc;
}
.search-icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); font-size: .8rem; opacity: .5; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; width: 320px; max-height: 320px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: .6rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1); z-index: 40;
}
.search-hit { display: flex; flex-direction: column; padding: .55rem .8rem; border-bottom: 1px solid #eef2f7; }
.search-hit:last-child { border-bottom: none; }
.search-hit:hover { background: #f8fafc; }
.search-hit-title { font-size: .8rem; font-weight: 500; color: #0f172a; }
.search-hit-sub { font-size: .7rem; color: #64748b; }
.search-hit-empty { padding: .8rem; font-size: .8rem; color: #94a3b8; }

.icon-btn {
  position: relative; width: 2.4rem; height: 2.4rem; border-radius: 999px; border: 1px solid #e2e8f0;
  background: #fff; font-size: 1rem; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: #f8fafc; }
.notif-wrap { position: relative; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: #b23a2c; border: 2px solid #fff; }

.user-block { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.avatar-wrap { position: relative; }
.avatar-btn { display: flex; align-items: center; gap: .35rem; background: none; border: none; padding: 0; }
.avatar-circle {
  width: 2.4rem; height: 2.4rem; border-radius: 999px; background: #0f172a; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600;
}
.avatar-circle-sm { width: 1.6rem; height: 1.6rem; font-size: .65rem; flex-shrink: 0; }
.chevron { font-size: .65rem; color: #64748b; }
.topbar-date { font-size: .72rem; color: #94a3b8; }

.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: .6rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1); z-index: 40;
  padding: .35rem; text-align: left;
}
.dropdown-header { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; padding: .4rem .6rem .2rem; }
.dropdown-item {
  display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .6rem; border-radius: .4rem;
  border: none; background: none; font-size: .8rem; color: #1e293b; text-align: left; cursor: pointer;
}
.dropdown-item:hover { background: #eef2f7; }
.dropdown-item.active { background: #E3F5E9; }
.dropdown-item-title { display: block; font-weight: 500; }
.dropdown-item-sub { display: block; font-size: .68rem; color: #94a3b8; }
.dropdown-divider { height: 1px; background: #eef2f7; margin: .3rem 0; }
.dropdown-item-empty { padding: .6rem; font-size: .78rem; color: #94a3b8; }
.notif-item-dot { width: 6px; height: 6px; border-radius: 999px; background: #b9722a; flex-shrink: 0; }
.kebab-dropdown { right: 0; min-width: 170px; }

/* ---------- stat cards (v2, with sparkline + trend) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 1023px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card-v2 {
  background: #fff; border: 1px solid #e2e8f0; border-radius: .9rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  padding: 1.1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
}
.stat-card-left { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.stat-icon { width: 2.4rem; height: 2.4rem; border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: .3rem; }
.stat-card-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600; }
.stat-card-value { font-size: 1.6rem; font-weight: 700; color: #0f172a; }
.stat-card-trend { display: flex; align-items: center; gap: .4rem; font-size: .72rem; }
.stat-card-vs { color: #94a3b8; }
.trend-badge { font-weight: 600; }
.trend-up { color: #1F9D55; }
.trend-down { color: #b23a2c; }
.trend-neutral { color: #94a3b8; }
.stat-card-right { flex-shrink: 0; padding-top: .3rem; }

/* ---------- donut charts ---------- */
.donut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 1023px) { .donut-grid { grid-template-columns: 1fr; } }
.donut-card-body { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.donut-wrap { position: relative; flex-shrink: 0; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-total { font-size: 1.5rem; font-weight: 700; color: #0f172a; line-height: 1; }
.donut-label { font-size: .68rem; color: #94a3b8; margin-top: .15rem; }
.donut-legend { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: .45rem; }
.legend-row { display: flex; align-items: center; gap: .5rem; font-size: .78rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.legend-label { flex: 1; color: #334155; }
.legend-count { font-weight: 600; color: #0f172a; }
.legend-pct { color: #94a3b8; width: 2.6rem; text-align: right; }
.view-all-link { font-size: .78rem; color: #1D4FA8; font-weight: 500; white-space: nowrap; }
.view-all-link:hover { text-decoration: underline; }

/* ---------- row actions (view button + kebab) ---------- */
.row-actions { display: flex; align-items: center; gap: .4rem; position: relative; }
.btn-view { border: 1px solid #e2e8f0; border-radius: .4rem; padding: .25rem .6rem; font-size: .72rem; color: #0f172a; }
.btn-view:hover { background: #f8fafc; }
.kebab-wrap { position: relative; }
.kebab-btn { border: 1px solid #e2e8f0; border-radius: .4rem; background: #fff; width: 1.7rem; height: 1.7rem; font-size: .9rem; color: #64748b; }
.kebab-btn:hover { background: #f8fafc; }

.sparkline { display: block; }
input, select, textarea { outline: none; }
input:focus, select:focus, textarea:focus { border-color: #3B6FE8; box-shadow: 0 0 0 2px rgba(59,111,232,.15); }

/* ---------- documents tab ---------- */
.doc-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.25rem;
}
.doc-header-left { display: flex; align-items: flex-start; gap: .75rem; }
.doc-header-icon {
  width: 2.6rem; height: 2.6rem; border-radius: .7rem; background: #E4EEFC;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.doc-header-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.doc-header-sub { margin: .2rem 0 0; font-size: .8rem; color: #64748b; max-width: 40rem; }
.btn-download-all {
  display: inline-flex; align-items: center; gap: .4rem; background: #EAF1FE; color: #1D4FA8;
  border: 1px solid #BFD7F8; border-radius: .6rem; padding: .55rem 1rem; font-size: .82rem; font-weight: 600;
  white-space: nowrap;
}
.btn-download-all:hover { background: #E4EEFC; }

.doc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.doc-grid-wide { grid-template-columns: 1fr; }
@media (max-width: 1023px) { .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .doc-grid { grid-template-columns: 1fr; } }

.doc-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: .9rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  padding: 1rem; display: flex; flex-direction: column; gap: .7rem;
}
.doc-card-wide { padding: 1.1rem 1.25rem; }
.doc-card-head { display: flex; align-items: flex-start; gap: .65rem; }
.doc-icon-badge {
  width: 2.4rem; height: 2.4rem; border-radius: .6rem; display: flex; align-items: center;
  justify-content: center; font-size: 1.05rem; flex-shrink: 0;
}
.doc-card-title { font-size: .85rem; font-weight: 700; color: #0f172a; }
.doc-card-desc { font-size: .72rem; color: #64748b; margin-top: .1rem; }

.doc-dropzone {
  border: 1.5px dashed #BFD7F8; border-radius: .6rem; background: #F5F9FF; padding: .9rem .75rem;
  text-align: center; cursor: pointer; transition: background .1s, border-color .1s;
}
.doc-dropzone:hover, .doc-dropzone-active { background: #EAF1FE; border-color: #6D9EF0; }
.doc-dropzone-icon { font-size: 1.1rem; color: #1D4FA8; }
.doc-dropzone-text { font-size: .76rem; color: #334155; margin-top: .2rem; }
.doc-dropzone-text strong { color: #1D4FA8; }
.doc-dropzone-hint { font-size: .66rem; color: #94a3b8; margin-top: .15rem; }

.doc-file-row {
  display: flex; align-items: center; gap: .5rem; border-top: 1px solid #eef2f7; padding-top: .6rem;
}
.doc-file-icon { font-size: 1.05rem; flex-shrink: 0; }
.doc-file-info { flex: 1; min-width: 0; }
.doc-file-name {
  display: block; font-size: .78rem; font-weight: 600; color: #1D4FA8; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.doc-file-name:hover { text-decoration: underline; }
.doc-file-meta { font-size: .68rem; color: #94a3b8; }

/* ---------- production board (kanban) ---------- */
.prod-board-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 1439px) { .prod-board-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .prod-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prod-col {
  background: #fff; border: 1px solid #e2e8f0; border-radius: .8rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  display: flex; flex-direction: column; min-height: 15rem;
}
.prod-col-head {
  padding: .55rem .7rem; border-radius: .8rem .8rem 0 0; font-weight: 700; font-size: .78rem;
  display: flex; align-items: center; justify-content: space-between;
}
.prod-col-count { opacity: .75; font-weight: 600; }
.prod-col-body { padding: .5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; overflow-y: auto; }
.prod-col-foot { padding: .5rem; border-top: 1px solid #eef2f7; }
.prod-col-empty { text-align: center; padding: 1.4rem .5rem; color: #94a3b8; }
.prod-col-empty-icon { font-size: 1.3rem; opacity: .6; }
.prod-col-empty-text { font-size: .78rem; font-weight: 600; margin-top: .3rem; color: #64748b; }
.prod-col-empty-sub { font-size: .68rem; margin-top: .2rem; max-width: 11rem; margin-left: auto; margin-right: auto; }

.prod-part-card { display: flex; gap: .5rem; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .5rem; background: #f8fafc; }
.prod-part-icon {
  width: 1.9rem; height: 1.9rem; border-radius: .5rem; background: #fff; border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0;
}
.prod-part-body { min-width: 0; flex: 1; }
.prod-part-name { font-size: .78rem; font-weight: 700; color: #0f172a; }
.prod-part-meta { font-size: .68rem; color: #64748b; margin-top: .1rem; }
.prod-part-sub { font-size: .66rem; color: #94a3b8; margin-top: .15rem; }
.prod-part-barcode { font-family: ui-monospace, monospace; font-size: .6rem; color: #94a3b8; margin-top: .2rem; }
.prod-part-pack-btn {
  margin-top: .4rem; font-size: .65rem; font-weight: 600; color: #1D4FA8; background: #EAF1FE;
  border: 1px solid #BFD7F8; border-radius: .4rem; padding: .25rem .5rem; cursor: pointer; width: 100%; text-align: left;
}
.prod-part-pack-btn:hover { background: #E4EEFC; }
.prod-part-reject-btn {
  margin-top: .3rem; font-size: .65rem; font-weight: 600; color: #8f2e22; background: #fbeeea;
  border: 1px solid #efc2b7; border-radius: .4rem; padding: .25rem .5rem; cursor: pointer; width: 100%; text-align: left;
}
.prod-part-reject-btn:hover { background: #f6dad4; }

/* ---------- generic modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgb(15 23 42 / .45); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 1.25rem;
}
.modal-box {
  background: #fff; border-radius: 1.15rem; box-shadow: 0 24px 60px -18px rgb(15 23 42 / .30);
  width: 100%; max-width: 48rem; max-height: min(90vh, 980px); display: flex; flex-direction: column; overflow: hidden;
}
.modal-box-small { max-width: 38rem; min-height: min(58vh, 34rem); }
.modal-box-medium { max-width: 48rem; min-height: min(74vh, 44rem); }
.modal-box-large { max-width: 58rem; min-height: min(78vh, 48rem); }
.modal-box-b2c-payment { max-width: 43.5rem; min-height: min(74vh, 42rem); }
.modal-box-wide { max-width: 70rem; min-height: min(80vh, 50rem); }
.modal-head {
  padding: 1.3rem 1.5rem; border-bottom: 1px solid #e9eef5; display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 1.08rem; line-height: 1.35; color: #1e293b; }
.modal-close {
  border: none; background: #fff; font-size: 1.15rem; color: #94a3b8; cursor: pointer; width: 2.1rem; height: 2.1rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
}
.modal-close:hover { color: #0f172a; background: #f8fafc; }
.modal-body { padding: 1.5rem 1.5rem 1.65rem; overflow-y: auto; flex:1 1 auto; }
/* V68: more vertical breathing room inside data-entry popups without widening them. */
.modal-body .space-y-3 > * + * { margin-top: 1rem; }
.modal-body .space-y-2 > * + * { margin-top: .75rem; }
.modal-body form > .flex.justify-end:last-child { margin-top: 1.25rem; padding-top: .35rem; }
.modal-body .erp-field { min-width: 0; gap: 6px; }
.modal-body .erp-field label { font-size: 11px; font-weight: 800; color: #617089; letter-spacing: .045em; line-height: 1.2; }
.modal-body .erp-field input,
.modal-body .erp-field select,
.modal-body .erp-field textarea {
  width: 100%; border: 1px solid #d7dee8; border-radius: 10px; background: #fff; color: #1f2937;
  font-size: 13px; box-sizing: border-box;
}
.modal-body .erp-field input,
.modal-body .erp-field select { min-height: 44px; padding: 0 13px; }
.modal-body .erp-field textarea { min-height: 110px; padding: 12px 13px; resize: vertical; }
.b2c-payment-form { display:flex; flex-direction:column; gap:18px; min-height:420px; }
.b2c-payment-form .grid { row-gap:16px; }
.b2c-payment-form .erp-field input,
.b2c-payment-form .erp-field select { min-height:46px; }
.b2c-payment-form .erp-field textarea { min-height:86px; }
.b2c-payment-form .payment-form-actions { margin-top:auto; padding-top:4px; }
.modal-body .erp-field input:focus,
.modal-body .erp-field select:focus,
.modal-body .erp-field textarea:focus {
  border-color: #7aa5df; box-shadow: 0 0 0 3px rgba(59,130,246,.09); outline: none;
}
@media (max-width: 820px) {
  .modal-overlay { padding: .8rem; }
  .modal-box-small,
  .modal-box-medium,
  .modal-box-large,
  .modal-box-b2c-payment,
  .modal-box-wide { max-width: calc(100vw - 1.6rem); min-height:0; }
  .modal-head { padding: 1rem 1rem .95rem; }
  .modal-body { padding: 1rem; }
}

/* ---------- project overview: stepper, key metrics, activity, gallery ---------- */
.stepper-wrap { margin-top: .75rem; }
.stepper { position: relative; display: flex; justify-content: space-between; padding: 0 .25rem; }
.stepper-line-bg { position: absolute; top: 1.15rem; left: 2.6rem; right: 2.6rem; height: 3px; background: #e2e8f0; z-index: 0; border-radius: 999px; }
.stepper-line-fill { position: absolute; top: 1.15rem; left: 2.6rem; height: 3px; background: #b9722a; z-index: 0; border-radius: 999px; transition: width .3s; }
.stepper-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; flex: 1; }
.stepper-circle {
  width: 2.3rem; height: 2.3rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: .95rem; border: 2px solid #e2e8f0; background: #fff; color: #94a3b8;
}
.stepper-circle.done { background: #E3F5E9; border-color: #1F9D55; color: #15803D; font-weight: 700; }
.stepper-circle.current { background: #fbf3e4; border-color: #b9722a; color: #7a4a15; box-shadow: 0 0 0 4px #f5e4c8; }
.stepper-label { font-size: .7rem; font-weight: 600; color: #94a3b8; }
.stepper-label.done { color: #15803D; }
.stepper-label.current { color: #0f172a; }

.progress-bar { height: .4rem; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #5B8DEF, #3B6FE8); border-radius: 999px; transition: width .3s; }

.proj-image-wrap {
  border-radius: .7rem; overflow: hidden; aspect-ratio: 16/10; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0;
}
.proj-image { width: 100%; height: 100%; object-fit: cover; }
.proj-image-empty { text-align: center; color: #94a3b8; font-size: 1.6rem; }

.quick-action-btn {
  display: flex; align-items: center; gap: .4rem; border-radius: .6rem; padding: .6rem .7rem;
  font-size: .8rem; font-weight: 600;
}
.quick-action-btn:hover { filter: brightness(0.97); }

.metric-tile { display: flex; gap: .6rem; align-items: flex-start; }
.metric-tile-icon {
  width: 2.2rem; height: 2.2rem; border-radius: .55rem; display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.metric-tile-label { font-size: .66rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.metric-tile-value { font-size: 1.05rem; font-weight: 700; color: #0f172a; line-height: 1.3; }
.metric-tile-sub { font-size: .64rem; color: #94a3b8; }

.activity-list { display: flex; flex-direction: column; gap: .85rem; }
.activity-row { display: flex; gap: .65rem; align-items: flex-start; }
.activity-dot {
  width: 1.7rem; height: 1.7rem; border-radius: 999px; background: #eef2f7; display: flex;
  align-items: center; justify-content: center; font-size: .82rem; flex-shrink: 0;
}

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .5rem; border: 1px solid #e2e8f0; }

/* ---------- packing station ---------- */
.pack-part-row {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid #e2e8f0;
  border-radius: .5rem; background: #f8fafc;
}
.pack-part-row.pack-part-disabled { opacity: .65; }
.pack-part-row.pack-part-row-scanned {
  background: #fbf3e4; border-color: #d99a3d; box-shadow: 0 0 0 2px rgb(185 114 42 / .25);
}
.pack-part-scanned-flag { font-size: .8rem; flex-shrink: 0; }
.pack-bucket-select { min-width: 220px; }

/* ---------- login screen ---------- */
.login-screen {
  position: fixed; inset: 0; background: #0f172a; display: flex; align-items: center;
  justify-content: center; z-index: 200; padding: 1rem;
}
.login-card {
  background: #fff; border-radius: 1rem; box-shadow: 0 20px 50px -12px rgb(0 0 0 / .35);
  width: 100%; max-width: 22rem; padding: 2rem 1.75rem;
}
.login-logo { font-size: 1.3rem; font-weight: 800; color: #0f172a; }
.login-sub { font-size: .8rem; color: #64748b; margin-top: .2rem; }
.login-hint { font-size: .68rem; color: #94a3b8; margin-top: 1.25rem; line-height: 1.5; border-top: 1px solid #eef2f7; padding-top: .85rem; }
.login-hint code { background: #eef2f7; border-radius: .25rem; padding: .05rem .3rem; font-family: ui-monospace, monospace; }

/* ---------- reject list ---------- */
.reject-row {
  display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .9rem; border: 1px solid #efc2b7;
  border-radius: .6rem; background: #fbeeea;
}
.reject-row.reject-row-resolved { border-color: #e2e8f0; background: #f8fafc; }
.reject-row-body { flex: 1; min-width: 0; }
.reject-row-title { font-size: .85rem; font-weight: 700; color: #0f172a; }
.reject-row-meta { font-size: .72rem; color: #64748b; margin-top: .1rem; }
.reject-row-reason { font-size: .78rem; color: #334155; margin-top: .35rem; }
.reject-row-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ---------- customer chat (per-project WhatsApp-style thread) ---------- */
.chat-thread {
  display: flex; flex-direction: column; gap: .5rem; max-height: 26rem; overflow-y: auto;
  padding: .75rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .6rem;
}
.chat-bubble-row { display: flex; }
.chat-bubble-row-out { justify-content: flex-end; }
.chat-bubble-row-in { justify-content: flex-start; }
.chat-bubble { max-width: 75%; padding: .55rem .75rem; border-radius: .7rem; font-size: .82rem; line-height: 1.4; }
.chat-bubble-out { background: #3B6FE8; color: #fff; border-bottom-right-radius: .2rem; }
.chat-bubble-in { background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-bottom-left-radius: .2rem; }
.chat-bubble-meta { font-size: .65rem; opacity: .75; margin-top: .3rem; }


/* GST compliance workspace */
.gst-hero { background: linear-gradient(135deg,#fff 0%,#f5f8fc 100%); border:1px solid #e2e8f0; border-radius:16px; padding:20px 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.gst-hero-state { background:#fff; border:1px solid #dbe3ee; border-radius:999px; padding:8px 12px; font-size:12px; font-weight:600; color:#475569; white-space:nowrap; }
@media(max-width:900px){ .gst-hero{align-items:flex-start;flex-direction:column}.grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* GST V4 — invoice-to-dispatch workspace */
.invoice-summary-strip{display:grid;grid-template-columns:1.4fr repeat(4,1fr);background:#fff;border:1px solid #e2e8f0;border-radius:14px;margin:0 0 12px;overflow:hidden}.invoice-summary-strip>div{padding:13px 16px;border-right:1px solid #eef2f7}.invoice-summary-strip>div:last-child{border-right:0}.invoice-summary-strip small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;margin-bottom:4px}.invoice-summary-strip strong{font-size:13px;color:#1e293b}.gst-flow{display:flex;align-items:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:15px 18px;margin-bottom:16px;overflow-x:auto}.gst-flow-step{display:flex;align-items:center;gap:7px;position:relative;flex:1;min-width:150px;color:#94a3b8;font-size:12px}.gst-flow-step span{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#f1f5f9;border:1px solid #e2e8f0;font-weight:700;z-index:1}.gst-flow-step b{white-space:nowrap}.gst-flow-step i{height:2px;background:#e2e8f0;flex:1;margin:0 10px}.gst-flow-step.done{color:#166534}.gst-flow-step.done span{background:#ecfdf5;border-color:#bbf7d0}.gst-flow-step.done i{background:#bbf7d0}.gst-flow-step.active{color:#1e3a5f}.gst-flow-step.active span{background:#eff6ff;border-color:#bfdbfe}.gst-flow-step:last-child i{display:none}@media(max-width:900px){.invoice-summary-strip{grid-template-columns:repeat(2,1fr)}.invoice-summary-strip>div{border-bottom:1px solid #eef2f7}.gst-flow{padding:12px}.gst-flow-step{min-width:135px}}

/* GST V5 invoice workspace */
.invoice-entry-grid{display:grid;grid-template-columns:2fr 1fr .7fr 1fr .8fr .8fr 1fr;gap:.6rem;align-items:end;background:#fafafa;border-radius:12px;padding:12px}
/* V38 — form inputs have a browser-default min-width:auto (their intrinsic content width),
   which fights fr-based grid track sizing and made the item-table header row (plain text,
   small intrinsic width) drift out of alignment with the data rows (inputs, larger intrinsic
   width) by several px per column. min-width:0 on every grid cell removes that intrinsic
   floor so both rows size their tracks purely off the shared fr ratios. */
.invoice-entry-grid>*{min-width:0}
.invoice-field-label{display:block;font-size:11px;font-weight:600;color:#64748b;margin-bottom:4px}.invoice-entry-grid input:focus,.invoice-entry-grid select:focus{outline:2px solid #cbd5e1;outline-offset:1px}@media(max-width:1100px){.invoice-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-entry-grid .col-span-2{grid-column:span 2}}
/* GST V6 ERP workspace */
.erp-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.erp-kpi{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:14px}.erp-kpi small{display:block;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.05em}.erp-kpi strong{display:block;font-size:20px;margin-top:4px}.erp-section{border:1px solid #e2e8f0;border-radius:14px;background:#fff;padding:16px}.erp-two{display:grid;grid-template-columns:1.35fr .65fr;gap:16px}.erp-side{position:sticky;top:16px;align-self:start}.erp-actionbar{display:flex;gap:8px;flex-wrap:wrap;padding:10px;background:#f8fafc;border-radius:12px}.erp-muted{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px}.erp-field{display:flex;flex-direction:column;gap:4px}.erp-field label{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.04em}@media(max-width:900px){.erp-kpis{grid-template-columns:repeat(2,1fr)}.erp-two{grid-template-columns:1fr}.erp-side{position:static}}

/* GST V7 — visual system refresh */
:root{--ink:#172033;--muted:#738096;--line:#e7ebf1;--surface:#fff;--canvas:#f6f7f9;--accent:#566f9e;--accent-soft:#edf1f7;--success:#39745a;--warning:#a46d2c}
body{background:var(--canvas);color:var(--ink);letter-spacing:-.005em}.bg-slate-50{background:var(--canvas)}
#app{padding:24px 28px 36px;background:var(--canvas)}
.ui-icon{width:19px;height:19px;display:block}.sidebar{width:238px!important;background:#fbfbfc;border-right:1px solid var(--line)}
.sidebar>div:first-child{padding:18px 18px 16px!important;border-color:var(--line)}.sidebar-logo-badge,.brand-mark{width:34px;height:34px;border-radius:10px;background:#26334b;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;box-shadow:0 4px 12px rgba(38,51,75,.14)}
.nav-link{margin:2px 10px!important;padding:9px 11px!important;border-radius:9px;color:#566174;font-weight:500;gap:10px!important;transition:.15s ease}.nav-link:hover{background:#f0f7ff;color:#20406b}.nav-link.active,.nav-link.active:hover{background:#e7f3ff;color:#215b98;box-shadow:inset 3px 0 0 #72b6ee}.nav-icon{width:21px;display:flex;justify-content:center;color:#7b8799}.nav-link.active .nav-icon{color:#3f8fd3}.nav-link .ui-icon{width:18px;height:18px}
.sidebar-footer-links{border-color:var(--line);padding:8px}.sidebar-footer-link{border-radius:8px;padding:8px 10px;color:#657084}.sidebar-footer-link:hover{background:#f0f2f5}.footer-icon{width:20px;text-align:center;color:#7b8799}
.topbar{padding:15px 28px;background:rgba(255,255,255,.92);border-color:var(--line);backdrop-filter:blur(12px);align-items:center}.topbar-left h1{font-size:22px;letter-spacing:-.025em;color:#1c2638}.topbar-subtitle{color:#8490a2}.topbar-right{align-items:center}.search-wrap input{width:290px;height:40px;background:#f7f8fa;border-color:#e5e9ef;border-radius:10px;padding-left:36px;transition:.15s}.search-wrap input:focus{outline:none;border-color:#aebbd0;box-shadow:0 0 0 3px #eef1f6;background:#fff}.search-icon{left:11px;width:16px;height:16px;color:#8a95a5;opacity:1}.search-icon svg,.icon-btn svg{width:18px;height:18px;display:block}.icon-btn{width:40px;height:40px;border-color:#e5e9ef;color:#68758a;background:#fff}.avatar-circle{background:#33415b;width:40px;height:40px}.topbar-date{color:#9aa4b2}
.bg-white.rounded-xl.border,.stat-card-v2,.donut-card,.erp-section,.erp-kpi,.gst-hero,.invoice-summary-strip,.gst-flow{border-color:var(--line)!important;box-shadow:0 1px 2px rgba(20,30,50,.025),0 5px 18px rgba(20,30,50,.025)!important}
.stat-grid{gap:14px!important}.stat-card-v2{border-radius:14px!important;padding:17px!important;background:#fff;transition:transform .15s,box-shadow .15s}.stat-card-v2:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(20,30,50,.06)!important}.stat-icon{width:38px!important;height:38px!important;border-radius:10px!important;color:#52627b}.stat-icon .ui-icon{width:19px;height:19px}.stat-card-label{color:#7a8699!important;font-weight:600!important}.stat-card-value{color:#182235!important;font-size:25px!important;letter-spacing:-.03em}.trend-badge{border-radius:999px!important;font-weight:650!important}.section-heading{display:flex;align-items:center;gap:8px;color:#253148}.section-heading .ui-icon{width:17px;height:17px;color:#718099}
table.data th{background:#fafbfc;color:#7c8798;font-size:11px;text-transform:uppercase;letter-spacing:.045em;font-weight:650}table.data td{color:#3e4a5d}table.data tbody tr:hover{background:#fafbfd}.border{border-color:var(--line)}
button.bg-slate-900,.bg-slate-900{background:#33415b!important}.hover\:bg-slate-800:hover{background:#26334b!important}input,select,textarea{border-color:#dfe4eb!important;border-radius:8px!important}input:focus,select:focus,textarea:focus{outline:none!important;border-color:#a9b6ca!important;box-shadow:0 0 0 3px #f0f2f6}
.erp-actionbar{background:#f7f8fa}.erp-muted{background:#f8f9fb;border-color:var(--line)}.gst-hero{background:linear-gradient(135deg,#fff,#f7f8fb)}.gst-flow-step.done{color:#39745a}.gst-flow-step.active{color:#405a85}
.login-screen{background:radial-gradient(circle at 50% 20%,#34435f 0,#202a3c 42%,#151c29 100%)}.login-card{border-radius:18px;box-shadow:0 28px 70px rgba(0,0,0,.3);padding:30px}.login-logo{display:flex;align-items:center;gap:10px;font-size:20px}.login-logo .brand-mark{width:38px;height:38px}.login-card input{height:42px;background:#fafbfc}.login-card button{height:43px;background:#33415b!important}
@media(max-width:900px){.sidebar{width:205px!important}.topbar{padding:14px 18px}#app{padding:18px}.search-wrap input{width:220px}}

/* GST V8 — focused ERP screen polish */
.page-commandbar{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 1px 2px rgba(20,30,50,.025)}
.page-commandbar strong{display:block;font-size:14px;color:#253148}.page-commandbar span{display:block;font-size:12px;color:#8490a2;margin-top:2px}.page-command-actions{display:flex;gap:7px;flex-wrap:wrap}.command-btn,.quick-action,.action-with-icon{display:inline-flex!important;align-items:center;gap:7px}.command-btn{padding:7px 10px;border:1px solid #e4e8ee;border-radius:8px;background:#fafbfc;color:#536075;font-size:12px;font-weight:600}.command-btn:hover{background:#f1f3f6;color:#26334b}.command-btn .ui-icon,.quick-action .ui-icon,.action-with-icon .ui-icon{width:15px;height:15px}
.eyebrow{text-transform:uppercase;letter-spacing:.09em;font-size:10px;font-weight:750;color:#77859a}.gst-hero h2{letter-spacing:-.035em;color:#1d293b}.gst-hero-state{border-color:#dfe5ed;background:#f9fafb;color:#536075}
.prod-board-grid{gap:12px!important}.prod-col{border:1px solid #e4e8ee!important;border-radius:13px!important;background:#f9fafb!important;overflow:hidden;box-shadow:0 1px 2px rgba(20,30,50,.02)}.prod-col-head{padding:11px 12px!important;font-size:12px!important;font-weight:700!important}.prod-col-body{padding:9px!important;gap:8px!important}.prod-card{border-color:#e5e9ef!important;border-radius:10px!important;box-shadow:0 1px 2px rgba(20,30,50,.025)!important}.prod-col-count{background:rgba(255,255,255,.75)!important;border:1px solid rgba(100,116,139,.12);min-width:23px;text-align:center}.quick-action{width:100%;padding:9px 10px!important;background:#fff!important;border-color:#e3e7ed!important;color:#536075!important;border-radius:9px!important;font-size:12px!important;font-weight:600}.quick-action:hover{background:#f6f7f9!important;color:#26334b!important}
#prodScanForm input[name="barcode"]{background:#fbfcfd;border-width:1px!important;font-size:16px!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em}
.erp-section h3,.gst-hero h2,.donut-card h3{letter-spacing:-.02em}.erp-kpi{position:relative;overflow:hidden}.erp-kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#d8dee8}.erp-kpi strong{letter-spacing:-.03em;color:#1d293b}
#saleForm>.bg-white,#saleForm>div{box-shadow:0 12px 35px rgba(30,41,59,.07)!important}.invoice-entry-grid{background:#f8f9fb!important;border:1px solid #e7ebf1}.invoice-field-label,.erp-field label{font-weight:700!important;letter-spacing:.055em!important}
table.data{border-collapse:separate;border-spacing:0}table.data thead th:first-child{border-top-left-radius:8px}table.data thead th:last-child{border-top-right-radius:8px}table.data tbody td{padding-top:10px;padding-bottom:10px}
@media(max-width:900px){.page-commandbar{align-items:flex-start;flex-direction:column}.page-command-actions{width:100%}.command-btn{flex:1;justify-content:center}}

/* ---------- V9 production flow pipeline ---------- */
.prod-flow-shell{background:#fff;border:1px solid #e3e8ef;border-radius:16px;padding:18px;margin:18px 0;box-shadow:0 2px 8px rgba(20,30,50,.035)}
.prod-flow-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}.prod-flow-top h3{font-size:17px;font-weight:750;color:#1f2937;margin:2px 0}.prod-flow-top p{font-size:12px;color:#7b8799}.eyebrow{font-size:10px;letter-spacing:.12em;font-weight:800;color:#8b96a8}.prod-flow-health{display:grid;grid-template-columns:20px auto;align-items:center;column-gap:8px;padding:9px 12px;border:1px solid #e7ebf0;border-radius:11px;background:#fafbfc;color:#5d687a;min-width:190px}.prod-flow-health svg{width:17px;height:17px;grid-row:1/3}.prod-flow-health span{font-size:11px}.prod-flow-health small{font-size:10px;color:#98a2b2}.prod-flow-track{display:flex;align-items:stretch;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:thin}.prod-flow-node{position:relative;display:flex;align-items:center;gap:9px;min-width:150px;flex:1;padding:10px 28px 10px 10px;border:1px solid #e8ecf1;background:#fbfcfd;cursor:pointer;transition:.18s ease}.prod-flow-node:first-child{border-radius:12px 0 0 12px}.prod-flow-node:last-child{border-radius:0 12px 12px 0;padding-right:10px}.prod-flow-node:hover{background:#f4f7fa;transform:translateY(-1px);z-index:2}.prod-flow-icon{width:32px;height:32px;border-radius:9px;background:#fff;border:1px solid #e3e8ee;display:grid;place-items:center;color:#59677a;flex:none}.prod-flow-icon svg{width:16px;height:16px}.prod-flow-copy{display:flex;flex-direction:column;min-width:0}.prod-flow-copy strong{font-size:11px;color:#263246;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prod-flow-copy span{font-size:10px;color:#929cab;margin-top:2px}.prod-flow-arrow{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:17px;height:17px;border-radius:50%;background:#fff;border:1px solid #e0e5eb;display:grid;place-items:center;color:#a0a9b6;z-index:3}.prod-flow-arrow svg{width:11px;height:11px}.prod-stage-focus{animation:prodStageFocus 1.35s ease}@keyframes prodStageFocus{0%,100%{box-shadow:0 1px 2px rgba(20,30,50,.02)}30%{box-shadow:0 0 0 3px rgba(84,105,132,.16),0 8px 24px rgba(20,30,50,.08)}}.prod-inline-icon{display:flex;align-items:center;gap:4px}.prod-inline-icon svg,.prod-part-pack-btn svg,.prod-part-reject-btn svg{width:12px;height:12px;display:inline-block;vertical-align:-2px}.prod-part-pack-btn,.prod-part-reject-btn{display:flex;align-items:center;gap:5px}.prod-col-empty-icon svg{width:20px;height:20px;margin:auto}.prod-part-icon svg{width:15px;height:15px;color:#69778a}
@media(max-width:900px){.prod-flow-top{align-items:flex-start;flex-direction:column}.prod-flow-health{width:100%}.prod-flow-node{min-width:140px}.prod-flow-shell{padding:14px}}

/* V9.4 — invoice workspace inspired by modern accounting apps */
.invoice-top-actions,.invoice-workspace-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.invoice-toolbar-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #dfe4eb;border-radius:7px;background:#fff;color:#536075;font-size:12px;font-weight:600}.invoice-toolbar-btn:hover{background:#f6f8fa;color:#253148}.invoice-toolbar-btn.primary{background:#3f7edb;color:#fff;border-color:#3f7edb}.invoice-toolbar-btn .ui-icon{width:14px;height:14px}.invoice-workspace-head{background:#fff;border:1px solid #e3e8ef;border-radius:12px;margin-bottom:14px;overflow:hidden}.invoice-workspace-actions{padding:10px 12px;border-bottom:1px solid #edf0f4}.invoice-next-step{padding:9px 12px;background:#fafbfc;color:#64748b;font-size:12px}.invoice-next-step b{font-size:10px;color:#374151;margin-right:7px}.invoice-preview-shell{position:relative;background:#f4f6f8;border:1px solid #e0e5eb;border-radius:14px;padding:28px 18px 14px;overflow:hidden}.invoice-preview-status{position:absolute;left:9px;top:9px;z-index:2}.invoice-preview-status span{display:inline-block;background:#f59e0b;color:#fff;padding:4px 9px;border-radius:5px;font-size:9px;font-weight:800;letter-spacing:.05em}.invoice-paper{width:min(760px,94%);margin:auto;background:#fff;border:1px solid #aeb5bf;box-shadow:0 8px 22px rgba(30,41,59,.08);font-family:Arial,sans-serif;color:#222}.invoice-paper-head{display:flex;justify-content:space-between;align-items:flex-end;padding:14px 16px 10px;border-bottom:1px solid #aeb5bf}.invoice-paper-head>div{display:flex;flex-direction:column;gap:2px}.invoice-paper-head b{font-family:Georgia,serif;font-size:14px}.invoice-paper-head small{color:#6b7280}.invoice-paper-head h2{font-family:Georgia,serif;font-size:22px;font-weight:500;margin:0}.invoice-paper-meta{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #aeb5bf}.invoice-paper-meta>div{display:grid;grid-template-columns:100px 1fr;gap:3px 8px;padding:8px 12px;font-size:10px;border-right:1px solid #aeb5bf}.invoice-paper-meta>div:last-child{border-right:0}.invoice-paper-meta b{font-weight:700}.invoice-paper-subject{padding:6px 12px;font-size:10px;border-bottom:1px solid #aeb5bf;color:#374151}.invoice-paper-subject b{font-weight:700;margin-right:4px}.invoice-paper-parties{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #aeb5bf}.invoice-paper-parties>div{min-height:62px;padding:8px 12px;border-right:1px solid #aeb5bf;display:flex;flex-direction:column;font-size:10px}.invoice-paper-parties>div:last-child{border-right:0}.invoice-paper-parties small{font-size:8px;color:#6b7280;font-weight:800;margin-bottom:3px}.invoice-paper-parties span{white-space:pre-line;color:#4b5563;margin-top:2px}.invoice-paper table{width:100%;border-collapse:collapse;font-size:9px}.invoice-paper th,.invoice-paper td{padding:5px 6px;border-right:1px solid #c9ced5;border-bottom:1px solid #c9ced5;text-align:left}.invoice-paper th{background:#f3f4f6;font-weight:700}.invoice-paper th:last-child,.invoice-paper td:last-child{border-right:0}.invoice-paper .r{text-align:right}.invoice-paper .empty{text-align:center;color:#9ca3af;padding:15px}.invoice-paper-total{display:flex;justify-content:flex-end;gap:20px;padding:8px 12px;font-size:10px}.invoice-paper-total strong{font-size:11px}.invoice-paper-irn{border-top:1px solid #d1d5db;padding:6px 10px;font-size:8px;word-break:break-all}.invoice-preview-caption{text-align:center;color:#8a95a5;font-size:10px;margin-top:10px}
@media(max-width:900px){.invoice-paper{width:100%;overflow:auto}.invoice-paper-meta,.invoice-paper-parties{grid-template-columns:1fr}.invoice-paper-meta>div,.invoice-paper-parties>div{border-right:0;border-bottom:1px solid #aeb5bf}.invoice-workspace-actions{overflow-x:auto;flex-wrap:nowrap}.invoice-toolbar-btn{white-space:nowrap}}

/* V10 — compact accounting-document workspace, sized like modern invoice editors.
   Keep invoice / counter-sale / purchase entry comfortably narrow instead of stretching
   edge-to-edge on large monitors. The layout remains responsive below this width. */
.document-editor-shell,
.document-create-shell{
  width:min(1040px,100%);
  max-width:1040px;
  margin-left:0;
  margin-right:auto;
}
.document-create-shell > .bg-white,
.document-create-shell > div{
  width:100%;
  border-radius:10px!important;
  padding:18px!important;
}
.document-editor-shell .bg-white{
  border-radius:10px;
}
.document-editor-shell .invoice-workspace-head,
.document-editor-shell .invoice-preview-shell,
.document-editor-shell .erp-kpis{
  width:100%;
}
.document-editor-shell .invoice-preview-shell{
  padding-left:20px;
  padding-right:20px;
}
.document-editor-shell .invoice-paper{
  width:min(900px,96%);
}
.document-editor-shell .invoice-entry-grid{
  grid-template-columns:minmax(280px,2.2fr) 110px 82px 105px 92px 86px 108px;
  gap:8px;
  padding:10px;
  border-radius:8px;
}
.document-editor-shell table.data{
  table-layout:auto;
}
.document-editor-shell table.data th,
.document-editor-shell table.data td{
  white-space:nowrap;
}
.document-editor-shell table.data td:first-child,
.document-editor-shell table.data th:first-child{
  white-space:normal;
  min-width:210px;
}
.document-create-shell form input,
.document-create-shell form select,
.document-create-shell form textarea,
.document-editor-shell form input,
.document-editor-shell form select,
.document-editor-shell form textarea{
  min-height:34px;
  border-color:#dfe4eb;
  background:#fff;
}
.document-create-shell form input:focus,
.document-create-shell form select:focus,
.document-create-shell form textarea:focus,
.document-editor-shell form input:focus,
.document-editor-shell form select:focus,
.document-editor-shell form textarea:focus{
  outline:2px solid #cfe0fb;
  outline-offset:0;
  border-color:#7aa7ef;
}
.document-editor-shell--purchase > .bg-white:first-child{
  margin-bottom:14px;
}
.document-editor-shell--purchase form.grid-cols-6{
  grid-template-columns:minmax(310px,2fr) 115px 125px 140px;
  align-items:end;
}
.document-editor-shell--purchase form.grid-cols-6 .col-span-2{
  grid-column:span 1 / span 1;
}
.document-editor-shell--purchase form.grid-cols-6 button.col-span-2{
  grid-column:span 1 / span 1;
}
@media(min-width:1280px){
  #app:has(.document-editor-shell),
  #app:has(.document-create-shell:not(.hidden)){
    background:linear-gradient(90deg,var(--canvas) 0,var(--canvas) 1096px,#fafbfc 1096px,#fafbfc 100%);
  }
}
@media(max-width:1180px){
  .document-editor-shell .invoice-entry-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .document-editor-shell .invoice-entry-grid .col-span-2{
    grid-column:span 2 / span 2;
  }
  .document-editor-shell--purchase form.grid-cols-6{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .document-editor-shell,
  .document-create-shell{width:100%;max-width:none}
  .document-create-shell form.grid-cols-2,
  .document-create-shell form.grid-cols-3{
    grid-template-columns:1fr;
  }
  .document-create-shell form .col-span-2,
  .document-create-shell form .col-span-3{
    grid-column:span 1 / span 1;
  }
  .document-editor-shell .erp-kpis{grid-template-columns:1fr 1fr}
}

/* V37 — "once generated, only the PDF is shown" (new request, from real Zoho Books
   view-vs-edit invoice screenshots). The Sale Detail page's default VIEW mode now renders
   the full document in-page (every item, full totals/signature/bank block, not just a
   9-row teaser) instead of a raw editable data table; a separate EDIT mode (toggled by the
   Edit button) swaps in a Zoho-style editable header + item grid. These classes extend the
   existing .invoice-paper "mini preview" styling from V9.4 rather than replacing it, so
   print/preview styling stays visually consistent across the app. */
.invoice-status-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #e3e8ef;border-radius:10px;padding:10px 14px;margin-bottom:10px;font-size:12px}
.invoice-status-strip.is-einvoice{border-color:#bfe3d0}
.invoice-status-strip .status-strip-left{display:flex;align-items:center;gap:8px;color:#374151}
.invoice-status-strip .status-strip-badge{display:inline-flex;align-items:center;gap:4px;background:#16a34a;color:#fff;font-size:10px;font-weight:800;letter-spacing:.04em;padding:3px 8px;border-radius:5px;text-transform:uppercase}
.invoice-status-strip .status-strip-badge.muted{background:#94a3b8}
.invoice-status-strip a,.invoice-status-strip button.link-btn{color:#3f7edb;font-weight:600;background:none;border:none;padding:0;font-size:12px;cursor:pointer}
.invoice-payments-strip summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#374151;padding:10px 14px}
.invoice-payments-strip summary::-webkit-details-marker{display:none}
.invoice-payments-strip summary b{font-weight:700}
.invoice-payments-strip{background:#fff;border:1px solid #e3e8ef;border-radius:10px;margin-bottom:10px;overflow:hidden}
.invoice-payments-strip table{width:100%;font-size:11px;border-top:1px solid #edf0f4}
.invoice-payments-strip td{padding:6px 14px;border-bottom:1px solid #f3f5f7}
.invoice-paper-ribbon{position:absolute;top:14px;left:-32px;width:130px;transform:rotate(-45deg);background:#16a34a;color:#fff;text-align:center;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:3px 0;box-shadow:0 2px 6px rgba(0,0,0,.15);z-index:2}
.invoice-paper-full{overflow:visible}
.invoice-paper-totals-full{display:flex;justify-content:flex-end;border-top:1px solid #aeb5bf}
.invoice-paper-totals-full > div{width:280px}
.invoice-paper-totals-full .tf-row{display:flex;justify-content:space-between;padding:5px 12px;font-size:10px;border-bottom:1px solid #e3e6ea}
.invoice-paper-totals-full .tf-row.grand{font-size:12px;font-weight:800;background:#f7f7f7}
.invoice-paper-notes{padding:8px 14px;border-top:1px solid #aeb5bf;font-size:10px;color:#374151;line-height:1.5}
.invoice-paper-bank{padding:8px 14px;border-top:1px solid #aeb5bf;font-size:10px;color:#374151;line-height:1.6}
.invoice-paper-footer{display:grid;grid-template-columns:1.4fr 1fr 1fr;border-top:1px solid #aeb5bf;min-height:70px}
.invoice-paper-footer>div{padding:10px 14px;font-size:9.5px;color:#4b5563}
.invoice-paper-footer .sign{text-align:center;display:flex;flex-direction:column;justify-content:flex-end;border-left:1px solid #e3e6ea;font-weight:700;color:#374151}
/* Edit mode - reuses .invoice-entry-grid styling from the New Sale item grid so the two
   forms look/behave identically, per the request that editing an existing invoice "should
   look like this" (a real Zoho Books New/Edit Invoice screenshot). */
.invoice-edit-header{background:#fff;border:1px solid #e3e8ef;border-radius:12px;padding:16px;margin-bottom:14px}
.invoice-edit-header .erp-field label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.03em;color:#8a95a5;font-weight:700;margin-bottom:3px}
.invoice-edit-header .erp-field{margin-bottom:2px}
.invoice-edit-readonly{background:#f8fafc;color:#6b7280;border-radius:7px;padding:7px 10px;font-size:12px}

/* V39 — cleaner transaction workspace (Invoice / Counter Sale / Purchase)
   One visual system for headers, item grids and totals. */
.document-create-shell,
.document-editor-shell{max-width:1080px;width:min(1080px,100%)}
.document-create-shell>.bg-white,
.document-create-shell>div,
.document-editor-shell>.bg-white{box-shadow:none!important;border:1px solid #e4e9f0!important;background:#fff}

/* Flatten the many nested boxes inside transaction forms into one calm editor surface. */
.document-create-shell .erp-section{border:0;border-radius:0;box-shadow:none!important;padding:15px 0!important;background:#fff}
.document-create-shell .erp-section+.erp-section{border-top:1px solid #edf0f4}
.document-editor-shell--sales>form{background:#fff;border:1px solid #e3e8ef;border-radius:11px;padding:18px;box-shadow:0 2px 10px rgba(30,41,59,.035)}
.document-editor-shell--sales>form .invoice-edit-header{border:0;border-radius:0;margin:0;padding:0 0 16px;box-shadow:none}
.document-editor-shell--sales>form .erp-section{border:0;border-top:1px solid #edf0f4;border-radius:0;padding:16px 0;background:#fff;box-shadow:none!important}
.document-editor-shell--sales>form .erp-section.mt-4{margin-top:0}
.document-editor-shell--sales>form>.flex.gap-2.mt-4{border-top:1px solid #edf0f4;margin-top:0;padding-top:14px}

/* Exact shared columns for item header + every line row — no drift. */
.txn-items-section{overflow:visible}
.txn-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:9px}
.txn-section-head h4{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#617086;font-weight:800;margin:0}
.txn-section-head p{font-size:11px;color:#9aa5b5;margin:2px 0 0}
.txn-add-row-btn{border:1px solid #cfd8e5;background:#fff;color:#2f64bd;border-radius:6px;padding:5px 9px;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.txn-add-row-btn:hover{background:#f5f8fd}
.txn-line-table{overflow-x:auto;border:1px solid #e3e8ef;border-radius:9px;background:#fff}
.txn-line-grid{display:grid;grid-template-columns:minmax(260px,1fr) 110px 74px 105px 100px 80px 120px 36px;gap:8px;align-items:start;min-width:930px}
.txn-line-header{padding:8px 10px;background:#f7f9fb;border-bottom:1px solid #e6eaf0;color:#64748b;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.045em;align-items:center}
.txn-line-header>div:nth-last-child(2){text-align:right}
.txn-line-row{padding:9px 10px;border-bottom:1px solid #edf0f4;margin:0;background:#fff}
.txn-line-row:last-child{border-bottom:0}
.txn-line-row:hover{background:#fcfdff}
.txn-line-row input{height:35px;min-height:35px;border-color:#dce2ea;border-radius:7px;font-size:12px;background:#fff}
.txn-line-row input:focus{outline:2px solid #d9e7ff!important;border-color:#78a1e7!important}
.txn-line-item{min-width:0}
.txn-line-comment{display:block;width:100%;height:25px!important;min-height:25px!important;border:0!important;border-top:1px dashed #e7ebf0!important;border-radius:0!important;padding:5px 2px 0!important;margin-top:4px;color:#7b8798;font-size:10.5px!important;background:transparent!important}
.txn-stock-note{font-size:9.5px;color:#9aa5b5;margin:2px 0 0;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.txn-line-action{display:flex;align-items:center;justify-content:center;padding-top:0}
.txn-delete-btn{width:35px;height:35px;border:1px solid #f0d7d2;background:#fff;color:#b23a2c;border-radius:7px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.txn-delete-btn:hover{background:#fff5f3;border-color:#e9bdb5}
.txn-delete-btn .ui-icon{width:15px;height:15px}
.txn-line-row.is-locked{background:#fafbfc}

/* Totals sit in one disciplined block instead of floating across the full row. */
.txn-summary{width:355px;max-width:100%;margin:12px 0 0 auto;border-top:1px solid #e6eaf0;padding-top:7px}
.txn-summary-row{display:grid;grid-template-columns:1fr 135px;align-items:center;min-height:32px;padding:3px 0;color:#536075;font-size:12px}
.txn-summary-row>b{text-align:right;color:#253148;font-size:13px}
.txn-summary-row small{font-size:9px;color:#9aa5b5}
.txn-summary-row.adjustment input{height:31px!important;min-height:31px!important;text-align:right;border:1px solid #dce2ea;border-radius:6px;padding:4px 8px;width:135px}
.txn-summary-row.total{border-top:1px solid #dfe5ec;margin-top:4px;padding-top:7px;color:#172033;font-weight:800}
.txn-summary-row.total b{font-size:16px}

/* Cleaner Sales list — fewer columns, better hierarchy, combined GST status. */
.sales-filter-tabs{display:inline-flex;gap:3px;padding:3px;background:#eef2f7;border-radius:8px;margin-bottom:12px}
.sales-filter-tabs button{border:0;background:transparent;color:#66758a;padding:7px 12px;border-radius:6px;font-size:12px;font-weight:650;cursor:pointer}
.sales-filter-tabs button.active{background:#fff;color:#2456a8;box-shadow:0 1px 3px rgba(30,41,59,.09)}
.sales-list-card{background:#fff;border:1px solid #e3e8ef;border-radius:10px;overflow:hidden}
.sales-list-scroll{overflow-x:auto}
.sales-clean-table{min-width:900px;border-collapse:collapse}
.sales-clean-table th{position:static!important;background:#f7f9fb!important;color:#7a8798!important;font-size:10px;text-transform:uppercase;letter-spacing:.04em;font-weight:800;padding:10px 12px!important}
.sales-clean-table td{padding:11px 12px!important;border-bottom:1px solid #edf0f4;vertical-align:middle;color:#3d4b60;font-size:12px}
.sales-clean-table tbody tr:hover{background:#fafcff}
.sale-no-cell,.sale-customer-cell{display:flex;flex-direction:column;gap:1px}.sale-no-cell b,.sale-customer-cell b{color:#243247;font-weight:700}.sale-no-cell small,.sale-customer-cell small{color:#9aa5b5;font-size:10px}
.gst-compliance-cell{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.gst-compliance-cell small{color:#8d99a9;font-size:9.5px}

/* One combined compliance entry point. */
.gst-combined-strip{width:100%;display:grid;grid-template-columns:34px minmax(230px,1fr) 150px 150px 60px;gap:10px;align-items:center;background:#fff;border:1px solid #dfe6ef;border-radius:10px;padding:10px 12px;margin:0 0 10px;text-align:left;cursor:pointer;color:#35445a}
.gst-combined-strip:hover{border-color:#b9cce8;background:#fbfdff}
.gst-combined-icon{width:30px;height:30px;border-radius:8px;background:#edf4ff;color:#2f64bd;display:flex;align-items:center;justify-content:center}.gst-combined-icon .ui-icon{width:16px;height:16px}
.gst-combined-main{display:flex;flex-direction:column}.gst-combined-main b{font-size:12px;color:#253148}.gst-combined-main small{font-size:10px;color:#95a0af;margin-top:1px}
.gst-combined-status{display:flex;flex-direction:column;border-left:1px solid #edf0f4;padding-left:12px}.gst-combined-status small{font-size:9px;color:#9aa5b5;text-transform:uppercase;letter-spacing:.04em}.gst-combined-status b{font-size:11px;color:#45556b;margin-top:1px}
.gst-combined-open{font-size:11px;font-weight:700;color:#2f64bd;text-align:right}

/* Purchase screens follow the same visual rhythm. */
.document-editor-shell--purchase>.bg-white{box-shadow:none!important;border:1px solid #e3e8ef!important;border-radius:10px!important}
.document-editor-shell--purchase table.data th{background:#f7f9fb!important;color:#778497;font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:9px 10px}
.document-editor-shell--purchase table.data td{padding:10px;border-bottom:1px solid #edf0f4;vertical-align:middle}
.document-editor-shell--purchase form.grid-cols-6{border-top:1px solid #edf0f4!important;margin-top:10px;padding-top:12px!important;gap:8px!important}
.document-editor-shell--purchase form.grid-cols-6 input{height:35px;border-radius:7px;border-color:#dce2ea}

@media(max-width:980px){
  .gst-combined-strip{grid-template-columns:34px 1fr 110px 54px}.gst-combined-status:nth-of-type(4){display:none}
  .txn-line-table{margin-right:0}
}
@media(max-width:700px){
  .gst-combined-strip{grid-template-columns:34px 1fr 52px}.gst-combined-status{display:none!important}
  .txn-summary{width:100%}
  .document-editor-shell--sales>form{padding:12px}
}
.purchase-create-grid{display:grid;grid-template-columns:1.4fr .8fr 1.2fr;gap:10px;align-items:end}.purchase-create-actions{grid-column:1/-1;display:flex;gap:8px;padding-top:4px}
.purchase-overview-card{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:0;background:#fff;border:1px solid #e3e8ef;border-radius:10px;margin-bottom:12px;overflow:hidden}.purchase-overview-card>div{padding:12px 14px;border-right:1px solid #edf0f4}.purchase-overview-card>div:nth-child(4){border-right:0}.purchase-overview-card small{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#96a1b0;font-weight:800}.purchase-overview-card b{display:block;margin-top:3px;color:#28364b;font-size:13px}.purchase-overview-card a{color:#2f64bd;text-decoration:none}.purchase-note{grid-column:1/-1;border-top:1px solid #edf0f4!important;border-right:0!important}.purchase-note span{display:block;margin-top:3px;color:#5d6a7d;font-size:12px}
.purchase-entry-card,.purchase-lines-card{background:#fff;border:1px solid #e3e8ef;border-radius:10px;padding:14px;margin-bottom:12px}.purchase-entry-card{box-shadow:none!important}.po-entry-grid{display:grid;grid-template-columns:minmax(300px,1fr) 110px 135px 92px;gap:8px;align-items:end}.po-entry-grid .erp-field{margin:0}.po-entry-grid input{height:35px!important;min-height:35px!important}.po-add-btn{height:35px;color:#fff;background:#3b6fe8;border-color:#3b6fe8}.po-add-btn:hover{background:#315fca}.purchase-lines-card .txn-section-head{margin-bottom:8px}.purchase-lines-table th{background:#f7f9fb!important;color:#7b8798!important;font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:9px 10px!important}.purchase-lines-table td{padding:10px!important;border-bottom:1px solid #edf0f4;vertical-align:middle}.receive-inline{display:flex;align-items:center;gap:5px}.receive-inline input{width:76px;height:30px;border:1px solid #dce2ea;border-radius:6px;padding:4px 6px}.receive-inline button{border:0;background:none;color:#2f64bd;font-size:11px;font-weight:700;cursor:pointer}.purchase-summary{margin-top:8px}.purchase-help{padding:0 2px 12px}
@media(max-width:850px){.purchase-create-grid{grid-template-columns:1fr}.purchase-overview-card{grid-template-columns:1fr 1fr}.purchase-overview-card>div{border-bottom:1px solid #edf0f4}.po-entry-grid{grid-template-columns:minmax(260px,1fr) 90px 120px 85px;min-width:620px}.purchase-entry-card{overflow-x:auto}}

/* V40 — streamlined invoice/counter-sale detail view inspired by accounting apps.
   Keep only actions, payment history, GST document status and the document preview visible.
   Summary KPI cards / metadata blocks / the large Dispatch card are intentionally removed;
   those operations remain available from the More menu so the page stays calm. */
.invoice-detail-view{max-width:1180px;width:min(1180px,100%)}
.invoice-detail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e3e8ef;border-radius:10px 10px 0 0;padding:8px 10px;margin-bottom:12px;min-height:48px}
.invoice-detail-actions{display:flex;align-items:center;gap:3px;flex-wrap:wrap}
.invoice-detail-toolbar .invoice-toolbar-btn{border:0;border-right:1px solid #e8ecf1;border-radius:0;background:transparent;padding:7px 10px;color:#4f5d72;font-weight:600}
.invoice-detail-toolbar .invoice-toolbar-btn:hover{background:#f6f8fb;border-radius:6px}
.invoice-detail-toolbar .invoice-detail-actions>.invoice-toolbar-btn:last-of-type{border-right:0}
.invoice-detail-state{font-size:10px;font-weight:800;letter-spacing:.045em;text-transform:uppercase;border-radius:999px;padding:5px 9px;white-space:nowrap}
.invoice-detail-state.is-paid{background:#dcf6e7;color:#167a43}.invoice-detail-state.is-due{background:#fff3d8;color:#a26100}.invoice-detail-state.is-cancelled{background:#fde5e2;color:#b43d32}
.invoice-more-menu{position:relative}.invoice-more-menu>summary{list-style:none;cursor:pointer;min-width:36px;justify-content:center;font-size:15px;line-height:1}.invoice-more-menu>summary::-webkit-details-marker{display:none}
.invoice-more-popover{position:absolute;left:0;top:calc(100% + 6px);z-index:30;min-width:205px;background:#fff;border:1px solid #dde3eb;border-radius:9px;box-shadow:0 12px 30px rgba(30,41,59,.14);padding:5px;display:flex;flex-direction:column}
.invoice-more-popover button{border:0;background:transparent;text-align:left;padding:8px 10px;border-radius:6px;color:#4a586d;font-size:11.5px;cursor:pointer}.invoice-more-popover button:hover{background:#f5f7fa;color:#223047}.invoice-more-popover button.danger{color:#b23a2c}.invoice-more-popover button.danger:hover{background:#fff4f2}
.invoice-inline-email{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;background:#fff;border:1px solid #e3e8ef;border-radius:9px;padding:10px 12px;margin-bottom:10px;font-size:11px}.invoice-inline-email.hidden{display:none}.invoice-inline-email>div{display:flex;flex-direction:column;gap:3px}.invoice-inline-email label{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#7a8798;font-weight:800}.invoice-inline-email input{height:32px;border:1px solid #dce2ea;border-radius:6px;padding:5px 8px;min-width:240px}.invoice-inline-email button{height:32px;border:0;border-radius:6px;background:#31425d;color:#fff;padding:0 14px;font-size:11px;font-weight:700}.invoice-inline-email small{width:100%;color:#99a3b1}
.invoice-payments-strip{border-radius:8px;margin-bottom:10px}.invoice-payments-strip summary{min-height:40px;padding:9px 12px}.invoice-payments-strip summary>span:first-child{font-weight:650}.invoice-payments-strip summary>span:first-child b{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;padding:0 5px;border-radius:9px;background:#edf4ff;color:#3571d1;font-size:9px}.invoice-payments-right{display:flex;align-items:center;gap:9px;color:#7d899a;font-size:10.5px}.invoice-chevron{font-size:18px;color:#8390a2;transform:rotate(0deg);transition:.15s}.invoice-payments-strip[open] .invoice-chevron{transform:rotate(90deg)}.invoice-empty-strip{border-top:1px solid #edf0f4;padding:10px 14px;color:#9aa5b5;font-size:10.5px}
.invoice-gst-status-card{background:#fbfcfe;border:1px solid #dfe5ed;border-radius:10px;padding:12px 13px;margin-bottom:12px}.invoice-gst-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.invoice-gst-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:#263449}.invoice-gst-title>b{font-size:12px}.invoice-gst-doc-icon{width:22px;height:22px;display:grid;place-items:center;color:#20a35a}.invoice-gst-doc-icon .ui-icon{width:17px;height:17px}.invoice-status-chip{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;font-size:8.5px;font-weight:800;letter-spacing:.035em;text-transform:uppercase}.invoice-status-chip.ok{background:#dff5e8;color:#147943}.invoice-status-chip.bad{background:#fde5e2;color:#b23a2c}.invoice-status-chip.muted{background:#eef1f5;color:#68768a}.invoice-gst-open-btn{height:30px;border:1px solid #d6dde7;border-radius:6px;background:#fff;color:#4e5d72;padding:0 10px;font-size:10.5px;font-weight:650;white-space:nowrap;cursor:pointer}.invoice-gst-open-btn:hover{background:#f6f8fb}.invoice-gst-summary{font-size:10.5px;color:#627086;margin-top:7px;padding-left:29px}.invoice-link-btn{border:0;background:transparent;color:#3474d4;padding:0 3px;font-weight:700;cursor:pointer}.invoice-link-btn:hover{text-decoration:underline}.invoice-gst-sep{padding:0 6px;color:#a8b0bc}
.invoice-preview-shell--detail{border-radius:10px;background:#f6f7f9;border-color:#e2e6ec;padding:22px 18px 34px;margin-bottom:18px;min-height:560px}.invoice-preview-shell--detail .invoice-paper{width:min(760px,96%);box-shadow:0 3px 12px rgba(30,41,59,.06)}
@media(max-width:760px){.invoice-detail-toolbar{align-items:flex-start;flex-direction:column}.invoice-detail-state{align-self:flex-start}.invoice-gst-title-row{align-items:flex-start;flex-direction:column}.invoice-gst-open-btn{align-self:flex-start}.invoice-gst-summary{padding-left:0}.invoice-more-popover{right:0;left:auto}.invoice-detail-actions{width:100%;overflow-x:auto;flex-wrap:nowrap}.invoice-detail-toolbar .invoice-toolbar-btn{white-space:nowrap}.invoice-preview-shell--detail{padding:12px 6px 20px}}

/* V41 — Purchase Order editor restyled to the compact accounting-form proportions
   shown in the user's reference: smaller typography, narrow left-aligned form,
   lots of calm white space, a disciplined item grid, totals at lower-right and
   a sticky action footer. */
#appShell.purchase-create-mode .topbar{display:none!important}
#appShell.purchase-create-mode #app{padding:0!important;background:#fff!important;overflow-y:auto!important}
#appShell.purchase-create-mode main{background:#fff!important}
.purchase-bill-shell{min-height:100%;width:100%;background:#fff;color:#202939;font-size:12.5px;position:relative}
.purchase-bill-titlebar{height:58px;border-bottom:1px solid #e6e9ef;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 10px;background:#fff;position:sticky;top:0;z-index:25}
.purchase-bill-title{display:flex;align-items:center;gap:13px}
.purchase-bill-title h2{margin:0;font-size:20px;line-height:1;font-weight:500;color:#111827;letter-spacing:-.01em}
.purchase-bill-icon{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;color:#111827}
.purchase-bill-icon .ui-icon{width:24px;height:24px;stroke-width:1.7}
.purchase-bill-close{border:0;background:transparent;color:#d92d20;font-size:25px;line-height:1;width:34px;height:34px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:4px}
.purchase-bill-close:hover{background:#fff3f2}
.purchase-bill-form{min-height:calc(100vh - 58px);background:#fff;padding-bottom:55px}
.purchase-bill-workarea{width:min(1065px,calc(100% - 18px));margin:0;padding:27px 0 110px 8px}
.purchase-bill-header{width:100%}
.purchase-form-row{display:grid;grid-template-columns:160px 326px;align-items:center;column-gap:18px;min-height:46px;margin-bottom:2px}
.purchase-form-row>label{font-size:12.5px;color:#202939;font-weight:400;line-height:1.25}
.purchase-form-row>label>span{color:#e5484d;margin-left:1px}
.purchase-form-row input,.purchase-form-row select,.purchase-form-row textarea{width:100%;border:1px solid #d5dbe5;border-radius:4px;background:#fff;color:#344054;font-size:12.5px;outline:none;box-shadow:none;transition:border-color .12s,box-shadow .12s}
.purchase-form-row input,.purchase-form-row select{height:34px;padding:0 10px}
.purchase-form-row textarea{height:35px;min-height:35px;max-height:70px;padding:8px 10px;resize:vertical;line-height:17px}
.purchase-form-row input:focus,.purchase-form-row select:focus,.purchase-form-row textarea:focus{border-color:#4f8df7;box-shadow:0 0 0 1px #4f8df7}
.purchase-readonly{background:#fafbfc!important;color:#667085!important}
.purchase-vendor-row{grid-template-columns:160px 540px;min-height:84px;margin-top:-27px;margin-bottom:22px;padding:24px 0;background:#f8f9fb;box-shadow:0 0 0 100vmax #f8f9fb;clip-path:inset(0 -100vmax)}
.purchase-vendor-control{display:grid;grid-template-columns:minmax(0,1fr) 35px;align-items:center}
.purchase-vendor-control select{height:34px;border-radius:4px 0 0 4px}
.purchase-search-btn{height:34px;border:1px solid #4d8df7;border-left:0;border-radius:0 4px 4px 0;background:#4d8df7;color:#fff;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;padding:0 0 3px}
.purchase-search-btn:hover{background:#397cf0}
.purchase-dual-row{grid-template-columns:160px 326px 150px 150px;column-gap:18px}
.purchase-inline-label{padding-left:10px;color:#202939!important}
.purchase-header-divider{height:1px;background:#eceff3;width:100%;margin:28px 0 22px}
.purchase-subject-row{grid-template-columns:160px 326px;align-items:start;min-height:54px}
.purchase-subject-row>label{padding-top:9px}
.purchase-info-dot{display:inline-flex!important;color:#fff!important;background:#7f8a9b;width:13px;height:13px;border-radius:50%;font-size:9px;align-items:center;justify-content:center;margin-left:4px!important;font-weight:700}
.purchase-table-spacer{height:66px;border-bottom:1px solid #edf0f4}
.purchase-transaction-level{height:56px;display:flex;align-items:center;gap:8px;color:#475467;font-size:12px;padding-left:12px}
.purchase-transaction-level>span:first-child{color:#7b88a1;font-size:14px}
.purchase-chevron{font-size:15px;margin-left:14px;color:#667085}
.purchase-item-section{width:100%;border:1px solid #e2e6ed;border-radius:5px;overflow:hidden;background:#fff}
.purchase-item-section-head{height:46px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e2e6ed}
.purchase-item-section-head>b{font-size:12.5px;color:#1f2937;font-weight:600;text-transform:none;letter-spacing:0}
.purchase-bulk-action{border:0;background:transparent;color:#2764d8;font-size:12px;font-weight:500;padding:5px 0}
.purchase-create-table{width:100%;overflow-x:auto}
.purchase-create-grid{display:grid!important;grid-template-columns:minmax(290px,1.65fr) 145px 90px 105px 150px 120px 42px!important;gap:0!important;align-items:stretch!important;min-width:910px}
.purchase-create-grid-head{height:46px;background:#f8f9fb;color:#65758b;font-size:10.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;align-items:center!important}
.purchase-create-grid-head>div{height:100%;display:flex;align-items:center;padding:0 10px;border-right:1px solid #e7eaf0}
.purchase-create-grid-head>div:nth-last-child(-n+2){justify-content:flex-end}
.purchase-create-grid-head>div:last-child{border-right:0}
.purchase-create-grid-row{min-height:72px;background:#fff;border-top:1px solid #edf0f4;align-items:center!important}
.purchase-create-grid-row>div{min-width:0;height:100%;display:flex;align-items:center;padding:9px 9px;border-right:1px solid #edf0f4}
.purchase-create-grid-row>div:last-child{border-right:0;justify-content:center}
.purchase-create-grid-row input,.purchase-create-grid-row select{width:100%;height:38px;border:1px solid #d9dee7;border-radius:4px;padding:0 9px;background:#fff;color:#344054;font-size:12.5px;outline:none;min-width:0}
.purchase-create-grid-row input:focus,.purchase-create-grid-row select:focus{border-color:#4f8df7;box-shadow:0 0 0 1px #4f8df7}
.purchase-item-cell input[name="item_name"]{padding-left:11px}
.purchase-row-amount{justify-content:flex-end!important;font-weight:600;color:#111827;font-size:12.5px;white-space:nowrap}
.purchase-row-delete{width:30px;height:30px;border:0;background:transparent;color:#e5484d;border-radius:4px;font-size:18px;display:flex;align-items:center;justify-content:center;padding:0}
.purchase-row-delete:hover{background:#fff1f1}
.purchase-under-table{display:grid;grid-template-columns:1fr 500px;column-gap:26px;align-items:start;padding-top:20px;min-height:220px}
.purchase-add-row-bottom{justify-self:start;height:34px;border:1px solid #e0e5ec;border-radius:4px;background:#fff;color:#344054;font-size:12px;padding:0 11px;display:flex;align-items:center;gap:5px}
.purchase-add-row-bottom>span:first-child{color:#3478e5;font-size:15px}
.purchase-add-caret{margin-left:7px;color:#7d8797;border-left:1px solid #e3e7ed;padding-left:9px}
.purchase-create-summary{width:500px;background:#fbfbfc;border-radius:4px;padding:10px 13px 6px}
.purchase-create-summary>div{display:grid;grid-template-columns:1fr 155px;align-items:center;min-height:42px;font-size:12px;color:#344054}
.purchase-create-summary>div>span{font-weight:500}
.purchase-create-summary>div>b{text-align:right;color:#1f2937;font-weight:600;font-size:12.5px}
.purchase-adjustment-line input{width:122px;height:34px;justify-self:end;border:1px solid #d6dce5;border-radius:4px;text-align:right;padding:0 9px;font-size:12.5px;outline:none}
.purchase-adjustment-line input:focus{border-color:#4f8df7;box-shadow:0 0 0 1px #4f8df7}
.purchase-create-grand{border-top:1px solid #e4e7ec;margin-top:4px;padding-top:5px;min-height:48px!important}
.purchase-create-grand>span,.purchase-create-grand>b{font-size:14px!important;font-weight:700!important;color:#111827!important}
.purchase-create-footer{position:fixed;z-index:60;left:224px;right:0;bottom:0;height:54px;border-top:1px solid #dfe3e9;background:#fff;display:flex;align-items:center;gap:8px;padding:0 12px;box-shadow:0 -1px 4px rgba(16,24,40,.04)}
.purchase-save-primary,.purchase-save-secondary{height:34px;border-radius:4px;font-size:12px;font-weight:500;padding:0 13px}
.purchase-save-primary{border:1px solid #3f7ee8;background:#3f7ee8;color:#fff}.purchase-save-primary:hover{background:#3473dc}
.purchase-save-secondary{border:1px solid #d7dce4;background:#fff;color:#344054}.purchase-save-secondary:hover{background:#f8fafc}
.purchase-footer-note{margin-left:auto;color:#667085;font-size:11px}

@media(max-width:1180px){
  .purchase-bill-workarea{width:calc(100% - 18px)}
  .purchase-dual-row{grid-template-columns:145px 260px 125px 150px}
  .purchase-form-row{grid-template-columns:145px 300px}.purchase-vendor-row{grid-template-columns:145px 500px}.purchase-subject-row{grid-template-columns:145px 300px}
  .purchase-under-table{grid-template-columns:1fr 440px}.purchase-create-summary{width:440px}
}
@media(max-width:900px){
  #appShell.purchase-create-mode .sidebar{display:none}.purchase-create-footer{left:0}
  .purchase-bill-workarea{width:calc(100% - 12px);padding-left:6px}
  .purchase-vendor-row{grid-template-columns:125px minmax(0,1fr)}
  .purchase-form-row{grid-template-columns:125px minmax(220px,340px)}
  .purchase-dual-row{grid-template-columns:125px minmax(180px,1fr);row-gap:8px}.purchase-dual-row .purchase-inline-label{grid-column:1;padding-left:0}.purchase-dual-row select,.purchase-dual-row input:nth-of-type(2){grid-column:2}
  .purchase-subject-row{grid-template-columns:125px minmax(220px,340px)}
  .purchase-under-table{grid-template-columns:1fr}.purchase-create-summary{width:min(500px,100%);margin:18px 0 0 auto}
}
@media(max-width:620px){
  .purchase-bill-titlebar{height:52px}.purchase-bill-title h2{font-size:17px}.purchase-bill-form{padding-bottom:104px}
  .purchase-form-row,.purchase-vendor-row,.purchase-subject-row{grid-template-columns:1fr;row-gap:5px;margin-bottom:12px}.purchase-vendor-row{padding:18px 0}
  .purchase-form-row>label{font-size:11.5px}.purchase-inline-label{padding-left:0;margin-top:5px}
  .purchase-dual-row{grid-template-columns:1fr}.purchase-dual-row .purchase-inline-label,.purchase-dual-row select,.purchase-dual-row input:nth-of-type(2){grid-column:1}
  .purchase-table-spacer{height:30px}.purchase-transaction-level{height:46px}
  .purchase-under-table{padding-top:14px}.purchase-create-summary{width:100%}
  .purchase-create-footer{height:auto;min-height:54px;padding:9px 10px;flex-wrap:wrap}.purchase-footer-note{width:100%;margin-left:0}
}

/* ===== Items master refinement (V42) =====
   Keep item creation compact: half-width form + operational stock information.
   When the add form is closed, the overview uses the available width. */
.items-workbench{display:grid;grid-template-columns:1.05fr .95fr;gap:14px;align-items:stretch}
.items-workbench:not(.adding){grid-template-columns:1fr}
.items-workbench:not(.adding) .items-add-panel{display:none!important}
.items-add-panel,.items-insight-panel{background:#fff;border:1px solid #e4e8ee;border-radius:13px;box-shadow:0 1px 2px rgba(20,30,50,.025);padding:16px;min-width:0}
.items-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.items-panel-head h3{margin:2px 0 3px;font-size:15px;color:#1f2937;font-weight:750}
.items-panel-head p{margin:0;font-size:11px;line-height:1.45;color:#7d899a}
.items-eyebrow{font-size:9px;font-weight:800;letter-spacing:.13em;color:#8e99aa}
.items-panel-close{width:28px;height:28px;border:1px solid #e2e7ed;background:#fff;border-radius:7px;color:#7c8796;font-size:18px;line-height:1;display:grid;place-items:center}
.items-panel-close:hover{background:#f5f7f9;color:#334155}
.item-master-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.item-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.item-field-full{grid-column:1/-1}
.item-field>span{font-size:10px;font-weight:700;color:#68758a;letter-spacing:.01em}
.item-field input,.item-field select{height:36px;width:100%;border:1px solid #dfe4eb;border-radius:7px;background:#fff;padding:0 10px;color:#273449;outline:none;font-size:12px}
.item-field input:focus,.item-field select:focus{border-color:#7aa5df;box-shadow:0 0 0 2px rgba(59,130,246,.09)}
.item-form-actions{display:flex;align-items:center;gap:8px;margin-top:2px}
.item-primary-btn,.item-secondary-btn{height:34px;padding:0 14px;border-radius:7px;font-size:12px;font-weight:700}
.item-primary-btn{background:#334155;color:#fff;border:1px solid #334155}
.item-primary-btn:hover{background:#263447}
.item-secondary-btn{background:#fff;color:#526075;border:1px solid #dfe4eb}
.item-form-note{font-size:10px;line-height:1.45;color:#8a95a5;margin:0;padding-top:1px}
.items-insight-panel{display:flex;flex-direction:column}
.items-insight-head{margin-bottom:10px}
.items-mini-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
.items-mini-stats>div{border:1px solid #e9edf2;border-radius:9px;padding:9px 10px;background:#fafbfc;min-width:0}
.items-mini-stats span{display:block;font-size:9px;color:#8a95a5;text-transform:uppercase;letter-spacing:.055em;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.items-mini-stats strong{display:block;font-size:15px;color:#223047;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.items-mini-stats .attention{background:#fff8f7;border-color:#f2d4d0}
.items-mini-stats .attention strong{color:#b94b42}
.items-reorder-card{border:1px solid #e7ebf0;border-radius:10px;overflow:hidden;background:#fff;flex:1;min-height:150px}
.items-reorder-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;background:#fafbfc;border-bottom:1px solid #edf0f4}
.items-reorder-title>div{min-width:0}
.items-reorder-title strong{display:block;font-size:11px;color:#334155}
.items-reorder-title span{display:block;font-size:9px;color:#909aab;margin-top:2px}
.items-count-badge{font-size:9px!important;color:#a24a43!important;background:#fff0ee;border:1px solid #f2d3cf;border-radius:999px;padding:2px 7px;white-space:nowrap}
.items-reorder-list{max-height:245px;overflow:auto}
.item-reorder-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 11px;border-bottom:1px solid #f0f2f5}
.item-reorder-row:last-child{border-bottom:0}
.item-reorder-main{min-width:0}
.item-reorder-main strong{display:block;font-size:11px;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-reorder-main span{display:block;font-size:9px;color:#909bad;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-reorder-qty{text-align:right;flex:none}
.item-reorder-qty b{display:block;font-size:12px;color:#b84d45}
.item-reorder-qty span{display:block;font-size:9px;color:#9aa4b2}
.items-empty-alert{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:120px;padding:18px;color:#8792a3}
.items-empty-alert strong{font-size:11px;color:#59677b}
.items-empty-alert span{font-size:10px;margin-top:4px;max-width:360px;line-height:1.45}
.items-insight-foot{display:flex;gap:12px;flex-wrap:wrap;padding-top:8px;font-size:9px;color:#99a3b1}
.items-insight-foot span{position:relative;padding-left:9px}
.items-insight-foot span:before{content:"";position:absolute;left:0;top:5px;width:4px;height:4px;border-radius:50%;background:#c7ced8}
.items-table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.items-table-toolbar h3{font-size:14px;color:#253148;margin:0 0 2px;font-weight:750}
.items-table-toolbar>div>span{font-size:10px;color:#8b96a7}
.items-table-filters{display:flex;align-items:center;gap:8px}
.items-table-filters input,.items-table-filters select{height:32px;border:1px solid #dfe4eb;border-radius:7px;background:#fff;padding:0 9px;font-size:11px;color:#4a586d;outline:none}
.items-table-filters input{width:220px}
.items-table-filters input:focus,.items-table-filters select:focus{border-color:#8aaee0;box-shadow:0 0 0 2px rgba(59,130,246,.07)}
.items-table-scroll{overflow-x:auto}
.items-master-table{min-width:1160px}
.items-master-table th{font-size:10px;text-transform:uppercase;letter-spacing:.035em;color:#778397;background:#fafbfc;padding-top:8px;padding-bottom:8px}
.items-master-table td{vertical-align:middle}
.items-master-table input,.items-master-table select{height:27px;font-size:11px;border-color:#e0e5eb;background:#fff}
.items-master-table tr:hover td{background:rgba(248,250,252,.52)}

@media(max-width:1100px){
  .items-workbench{grid-template-columns:1fr}
  .items-mini-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .item-master-form{grid-template-columns:1fr}
  .item-field-full{grid-column:auto}
  .items-table-toolbar{align-items:flex-start;flex-direction:column}
  .items-table-filters{width:100%;flex-wrap:wrap}
  .items-table-filters input{width:min(100%,320px);flex:1}
}

/* ===== Sales payment + third-party cash control (V44) ===== */
.invoice-detail-toolbar .invoice-toolbar-btn.payment-action{color:#1d4ed8;font-weight:750}
.invoice-detail-toolbar .invoice-toolbar-btn.payment-action:hover{background:#eff6ff;color:#1d4ed8}
.sales-payment-quick-btn{border:1px solid #cbd5e1;background:#fff;color:#2563eb;border-radius:6px;padding:5px 8px;font-size:10px;font-weight:700;white-space:nowrap}
.sales-payment-quick-btn:hover{background:#eff6ff;border-color:#93c5fd}
.invoice-payment-table-wrap{overflow-x:auto;padding:0 12px 12px}
.invoice-payments-strip table th{font-size:10px;text-transform:uppercase;letter-spacing:.03em;color:#7b8798;background:#fafbfc}
.invoice-payment-delete{width:28px;height:28px;border:1px solid #f1d2cf;border-radius:6px;background:#fff;color:#c2413a;display:inline-grid;place-items:center}
.invoice-payment-delete:hover{background:#fff1f0}
.invoice-payment-delete .ui-icon{width:13px;height:13px}
.sale-payment-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:12px;border-bottom:1px solid #edf0f4;margin-bottom:14px}
.sale-payment-due{text-align:right;min-width:150px}.sale-payment-due small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#8a95a5}.sale-payment-due b{display:block;font-size:22px;color:#1f2937;margin-top:2px}
.sale-payment-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;padding:13px;background:#fafbfc;border:1px solid #e7ebf0;border-radius:10px;margin-bottom:16px}
.sale-payment-form .erp-field{min-width:0}.sale-payment-form .erp-field label{font-size:10px;color:#68758a;font-weight:700;margin-bottom:4px;display:block}.sale-payment-form input,.sale-payment-form select{width:100%;height:35px;border:1px solid #dfe4eb;border-radius:7px;background:#fff;padding:0 9px;font-size:12px;color:#273449;outline:none}.sale-payment-form input:focus,.sale-payment-form select:focus{border-color:#7aa5df;box-shadow:0 0 0 2px rgba(59,130,246,.08)}
.sale-payment-account-picker{display:flex;gap:6px}.sale-payment-account-picker select{flex:1}.sale-payment-account-picker button{width:35px;flex:none;border:1px solid #cbd5e1;background:#fff;border-radius:7px;color:#2563eb;font-size:18px}.sale-payment-account-field small{display:block;margin-top:4px;color:#9aa4b2;font-size:9px}.sale-payment-note{grid-column:span 2}.sale-payment-submit{display:flex;align-items:flex-end}.sale-payment-submit button{width:100%;height:35px;background:#25344d;color:#fff;border:1px solid #25344d;border-radius:7px;font-size:12px;font-weight:700}.sale-payment-submit button:hover{background:#1d293d}.sale-payment-paid-msg{padding:12px 14px;border:1px solid #cce8d7;background:#f1fbf5;color:#187542;border-radius:9px;font-size:12px;margin-bottom:15px}.sale-payment-history-head{display:flex;align-items:center;justify-content:space-between;margin:4px 0 8px}.sale-payment-history-head b{font-size:12px;color:#334155}.sale-payment-history-head span{font-size:10px;color:#94a3b8}.sale-payment-history{border:1px solid #e7ebf0;border-radius:9px;overflow:auto;max-height:290px}.sale-payment-history table{width:100%;border-collapse:collapse;font-size:11px}.sale-payment-history th,.sale-payment-history td{padding:8px 9px;border-bottom:1px solid #eef1f4;text-align:left;vertical-align:middle}.sale-payment-history th{background:#fafbfc;color:#788598;font-size:9px;text-transform:uppercase;letter-spacing:.04em}.sale-payment-history tr:last-child td{border-bottom:0}.sale-payment-manage{text-align:right;padding-top:9px}.sale-payment-manage a{font-size:10px;color:#2563eb}.sale-payment-manage a:hover{text-decoration:underline}
@media(max-width:820px){.sale-payment-form{grid-template-columns:1fr 1fr}.sale-payment-note{grid-column:1/-1}.sale-payment-submit{grid-column:1/-1}.sale-payment-modal-head{align-items:flex-start}.modal-box-wide{max-width:calc(100vw - 2rem)}}
@media(max-width:560px){.sale-payment-form{grid-template-columns:1fr}.sale-payment-note,.sale-payment-submit{grid-column:auto}.sale-payment-modal-head{flex-direction:column}.sale-payment-due{text-align:left}}

/* V50 multi-application shell */
.app-switcher-wrap{margin-top:14px;padding-top:12px;border-top:1px solid #e2e8f0;position:relative}
.app-switcher-wrap label{display:block;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;font-weight:700;margin-bottom:5px}
.app-switcher-wrap select{width:100%;height:36px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font-size:12px;font-weight:600;padding:0 28px 0 10px;outline:none}
.app-switcher-wrap select:focus{border-color:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.14)}
.app-switcher-current{font-size:10px;color:#64748b;margin-top:5px}
.app-nav-caption{padding:10px 16px 7px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:#94a3b8}
.app-nav-separator{height:1px;background:#e2e8f0;margin:9px 12px}

/* Direct Client / B2C workspace */
.direct-page{max-width:1180px}
.direct-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.direct-metric{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:15px 16px;min-height:92px}
.direct-metric small{display:block;color:#64748b;text-transform:uppercase;letter-spacing:.05em;font-size:10px;font-weight:700}
.direct-metric strong{display:block;margin-top:6px;font-size:23px;color:#0f172a;line-height:1.1}
.direct-metric span{display:block;margin-top:5px;font-size:11px;color:#94a3b8}
.direct-two-col{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:16px;align-items:start}
.direct-panel{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}
.direct-panel-head{padding:13px 15px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:12px}
.direct-panel-head h3{font-size:14px;font-weight:700;color:#0f172a;margin:0}
.direct-panel-head p{font-size:11px;color:#94a3b8;margin:2px 0 0}
.direct-panel-body{padding:14px 15px}
.direct-table{width:100%;border-collapse:collapse;font-size:12px}
.direct-table th{background:#f8fafc;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:9px 10px;border-bottom:1px solid #e2e8f0}
.direct-table td{padding:10px;border-bottom:1px solid #f1f5f9;vertical-align:top}
.direct-table tr:last-child td{border-bottom:0}
.direct-table tr.clickable:hover{background:#f8fafc;cursor:pointer}
.direct-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.direct-btn{height:34px;padding:0 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:6px;cursor:pointer;text-decoration:none}
.direct-btn:hover{background:#f8fafc}
.direct-btn.primary{background:#1e293b;color:#fff;border-color:#1e293b}
.direct-btn.success{background:#15803d;color:#fff;border-color:#15803d}
.direct-btn.danger{color:#be123c;border-color:#fecdd3;background:#fff1f2}
.direct-section-title{font-size:13px;font-weight:700;color:#0f172a;margin:0 0 10px}
.direct-summary-bar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden;margin-bottom:16px}
.direct-summary-bar>div{padding:13px 14px;border-right:1px solid #e2e8f0}
.direct-summary-bar>div:last-child{border-right:0}
.direct-summary-bar small{display:block;font-size:10px;text-transform:uppercase;color:#94a3b8;font-weight:700}
.direct-summary-bar strong{display:block;font-size:16px;margin-top:4px;color:#0f172a}
.direct-summary-bar strong.good{color:#15803d}.direct-summary-bar strong.warn{color:#b45309}
.direct-tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:16px;overflow:auto}
.direct-tabs a{padding:9px 12px;font-size:12px;color:#64748b;border-bottom:2px solid transparent;text-decoration:none;white-space:nowrap}
.direct-tabs a.active{color:#0f172a;border-color:#0f172a;font-weight:700}
.quote-editor{max-width:1120px}
.quote-header-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}
.quote-line-grid{display:grid;grid-template-columns:1.1fr 1.7fr .75fr .65fr .65fr .65fr .8fr 40px;gap:8px;align-items:end}
.quote-line-grid .erp-field input,.quote-line-grid .erp-field select{height:34px;font-size:12px}
.direct-note{font-size:11px;color:#64748b;line-height:1.45}
.cost-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cost-category-card{border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;background:#fff}
.cost-category-card small{color:#64748b;font-size:10px}.cost-category-card strong{display:block;margin-top:3px}
.app-hero{background:linear-gradient(135deg,#f8fafc,#fff);border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;margin-bottom:16px;display:flex;justify-content:space-between;gap:18px;align-items:center}
.app-hero h2{font-size:21px;margin:0;color:#0f172a}.app-hero p{font-size:12px;color:#64748b;margin:5px 0 0;max-width:760px}

@media(max-width:1100px){.direct-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.direct-two-col{grid-template-columns:1fr}.direct-summary-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.direct-summary-bar>div:nth-child(3){border-right:0}.quote-header-grid{grid-template-columns:1fr}.quote-line-grid{grid-template-columns:1fr 1.3fr .7fr .7fr}.cost-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.direct-metric-grid{grid-template-columns:1fr}.direct-summary-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-line-grid{grid-template-columns:1fr}.cost-category-grid{grid-template-columns:1fr}}

/* V54 — Direct Client B2C expense modal usability/alignment fix */
.direct-expense-form{display:flex;flex-direction:column;gap:15px;font-size:13px}
.direct-expense-grid{display:grid;gap:14px;align-items:end}
.direct-expense-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.direct-expense-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.direct-expense-form .erp-field{min-width:0;gap:6px}
.direct-expense-form .erp-field label{font-size:11px;font-weight:800;color:#617089;letter-spacing:.045em;line-height:1.2;min-height:14px}
.direct-expense-form .erp-field input,
.direct-expense-form .erp-field select{width:100%;height:42px!important;min-height:42px!important;border:1px solid #d7dee8!important;border-radius:8px!important;background:#fff!important;padding:0 12px!important;font-size:13px!important;line-height:40px!important;color:#1f2937!important;box-sizing:border-box}
.direct-expense-form .erp-field select{padding-right:34px!important;line-height:normal!important}
.direct-expense-form .erp-field input:focus,
.direct-expense-form .erp-field select:focus{border-color:#7aa5df!important;box-shadow:0 0 0 3px rgba(59,130,246,.09)!important}
.direct-expense-form .amount-field input{font-variant-numeric:tabular-nums;font-weight:650}
.direct-expense-third{padding:12px;border:1px solid #e5eaf0;border-radius:9px;background:#fafbfd}
.direct-expense-help{font-size:11px;line-height:1.5;color:#718096;background:#f8fafc;border:1px solid #e8edf3;border-radius:8px;padding:10px 12px}
.direct-expense-help strong{color:#46566e}
.direct-expense-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:2px}
.direct-expense-actions .direct-btn{min-width:92px;height:38px}
@media(max-width:850px){.direct-expense-grid.three,.direct-expense-grid.two{grid-template-columns:1fr 1fr}}
@media(max-width:580px){.direct-expense-grid.three,.direct-expense-grid.two{grid-template-columns:1fr}.direct-expense-form .erp-field input,.direct-expense-form .erp-field select{height:44px!important;min-height:44px!important}}

/* V58 — named B2C project service people + one-time agreed amount */
.service-agreement-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
.service-agreement-summary>div{min-width:0;padding:2px 4px}
.service-agreement-summary small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.045em;color:#7b8798;font-weight:800}
.service-agreement-summary strong{display:block;margin-top:4px;font-size:13px;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:850px){.service-agreement-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.service-agreement-summary{grid-template-columns:1fr}}

/* ==============================================================
   V66 — Slightly larger application typography
   Keeps layouts/dimensions essentially unchanged while improving
   readability across navigation, forms, tables, reports and B2C.
   Print/PDF templates are intentionally unchanged.
   ============================================================== */
body { font-size: 17px; }

/* Utility text used throughout the SPA */
.text-xs { font-size: 13px; line-height: 1.1rem; }
.text-\[10px\] { font-size: 11px; }
.text-sm { font-size: 15px; line-height: 1.35rem; }

/* Main shell / navigation */
.nav-link { font-size: 17px; }
.sidebar-footer-link { font-size: 14px; }
.app-switcher-wrap label { font-size: 11px; }
.app-switcher-wrap select { font-size: 13px; }
.app-switcher-current { font-size: 11px; }
.app-nav-caption { font-size: 11px; }
.topbar-subtitle { font-size: 15px; }
.topbar-date { font-size: 13px; }
.search-hit-title { font-size: 13px; }
.search-hit-sub { font-size: 12px; }

/* Common cards, forms and tables */
.invoice-field-label { font-size: 12px; }
.erp-field label { font-size: 12px; }
.erp-kpi small { font-size: 12px; }
.doc-header-sub { font-size: 13px; }
.doc-card-title { font-size: 14px; }
.doc-card-desc { font-size: 13px; }

/* Direct Client / Interior Projects */
.direct-panel-head h3 { font-size: 15px; }
.direct-panel-head p { font-size: 12px; }
.direct-table { font-size: 13px; }
.direct-table th { font-size: 11px; }
.direct-btn { font-size: 13px; }
.direct-section-title { font-size: 14px; }
.direct-summary-bar small { font-size: 11px; }
.direct-summary-bar strong { font-size: 17px; }
.direct-tabs a { font-size: 13px; }
.direct-note { font-size: 12px; }
.direct-metric small { font-size: 11px; }
.direct-metric span { font-size: 12px; }
.app-hero p { font-size: 13px; }
.quote-line-grid .erp-field input,
.quote-line-grid .erp-field select { font-size: 13px; }
.cost-category-card small { font-size: 11px; }

/* B2C payment / expense / service forms */
.direct-expense-form { font-size: 14px; }
.direct-expense-form .erp-field label { font-size: 12px; }
.direct-expense-form .erp-field input,
.direct-expense-form .erp-field select { font-size: 14px !important; }
.direct-expense-help { font-size: 12px; }
.service-agreement-summary small { font-size: 11px; }
.service-agreement-summary strong { font-size: 14px; }

/* Sales payment UI */
.sales-payment-quick-btn { font-size: 11px; }
.invoice-payments-strip table th { font-size: 11px; }
.sale-payment-due small { font-size: 11px; }
.sale-payment-form .erp-field label { font-size: 11px; }
.sale-payment-form input,
.sale-payment-form select { font-size: 13px; }
.sale-payment-submit button { font-size: 13px; }
.sale-payment-history-head b { font-size: 13px; }
.sale-payment-history-head span { font-size: 11px; }
.sale-payment-history { font-size: 12px; }
.sale-payment-history table { font-size: 12px; }
.sale-payment-history th { font-size: 10px; }
.sale-payment-manage a { font-size: 11px; }

/* ==============================================================
   V67 — Larger internal/content typography
   Slightly increases text inside cards, forms, tables, reports and
   transaction screens while preserving the overall layout density.
   ============================================================== */

/* Core content controls */
main input,
main select,
main textarea,
main button { font-size: 14px; }

/* General data tables / report rows */
table.data { font-size: 14px; }
table.data th { font-size: 12px; }
.page-commandbar strong { font-size: 15px; }
.page-commandbar span { font-size: 13px; }
.command-btn { font-size: 13px; }

/* Dashboard / KPI internals */
.metric-tile-label { font-size: 12px; }
.metric-tile-value { font-size: 18px; }
.metric-tile-sub { font-size: 11px; }
.erp-kpi strong { font-size: 21px; }

/* Sales / invoice internals */
.invoice-toolbar-btn { font-size: 13px; }
.invoice-next-step { font-size: 13px; }
.invoice-next-step b { font-size: 11px; }
.invoice-status-strip a,
.invoice-status-strip button.link-btn { font-size: 13px; }
.txn-line-row input { font-size: 13px; }
.sales-filter-tabs button { font-size: 13px; }
.sales-clean-table th { font-size: 11px; }
.sales-clean-table td { font-size: 13px; }
.invoice-more-popover button { font-size: 13px; }
.invoice-inline-email { font-size: 12px; }
.invoice-inline-email label { font-size: 10px; }
.invoice-inline-email button { font-size: 12px; }

/* On-screen invoice paper preview only */
.invoice-paper-meta>div { font-size: 11px; }
.invoice-paper-subject { font-size: 11px; }
.invoice-paper-parties>div { font-size: 11px; }
.invoice-paper-parties small { font-size: 9px; }
.invoice-paper table { font-size: 10px; }
.invoice-paper-total { font-size: 11px; }
.invoice-paper-total strong { font-size: 12px; }
.invoice-paper-irn { font-size: 9px; }
.invoice-preview-caption { font-size: 11px; }

/* Purchase internals */
.purchase-form-row input,
.purchase-form-row select,
.purchase-form-row textarea { font-size: 13.5px; }
.purchase-create-grid-row input,
.purchase-create-grid-row select { font-size: 13.5px; }
.purchase-adjustment-line input { font-size: 13.5px; }
.document-editor-shell--purchase table.data th,
.purchase-lines-table th { font-size: 11px; }
.purchase-lines-table td { font-size: 13px; }
.receive-inline button { font-size: 12px; }

/* Items master internals */
.item-field input,
.item-field select { font-size: 13.5px; }
.items-table-filters input,
.items-table-filters select { font-size: 12.5px; }
.items-master-table { font-size: 13px; }
.items-master-table th { font-size: 11px; }
.items-master-table input,
.items-master-table select { font-size: 12px; }

/* Direct Client / project internals */
.direct-table { font-size: 14px; }
.direct-table th { font-size: 12px; }
.direct-panel-head h3 { font-size: 16px; }
.direct-panel-head p { font-size: 13px; }
.direct-section-title { font-size: 15px; }
.direct-note { font-size: 13px; }
.direct-summary-bar small { font-size: 12px; }
.direct-summary-bar strong { font-size: 18px; }
.direct-tabs a { font-size: 14px; }
.direct-btn { font-size: 14px; }
.direct-metric small { font-size: 12px; }
.direct-metric strong { font-size: 24px; }
.direct-metric span { font-size: 13px; }
.cost-category-card small { font-size: 12px; }
.cost-category-card strong { font-size: 15px; }
.service-agreement-summary small { font-size: 12px; }
.service-agreement-summary strong { font-size: 15px; }

/* Modal internals */
.modal-head h3 { font-size: 18px; }
.modal-body { font-size: 14px; }
.modal-body .erp-field label { font-size: 12px; }
.modal-body .erp-field input,
.modal-body .erp-field select,
.modal-body .erp-field textarea { font-size: 14px; }

/* Payment internals */
.sale-payment-due small { font-size: 12px; }
.sale-payment-form .erp-field label { font-size: 12px; }
.sale-payment-form input,
.sale-payment-form select { font-size: 14px; }
.sale-payment-submit button { font-size: 14px; }
.sale-payment-history-head b { font-size: 14px; }
.sale-payment-history-head span { font-size: 12px; }
.sale-payment-history,
.sale-payment-history table { font-size: 13px; }
.sale-payment-history th { font-size: 11px; }
.sale-payment-manage a { font-size: 12px; }

/* Preserve compact mobile fit */
@media(max-width:820px){
  main input, main select, main textarea, main button { font-size: 13px; }
  .direct-table { font-size: 13px; }
  table.data { font-size: 13px; }
}

/* Company Payments & Accounts dashboard refresh */
.company-payments-shell { display: flex; flex-direction: column; gap: 18px; }
.company-payments-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.company-payments-hero-main { display: flex; align-items: flex-start; gap: 16px; max-width: 760px; }
.company-payments-hero-icon {
  width: 64px; height: 64px; border-radius: 18px; flex: 0 0 auto;
  display: flex; align-items: flex-end; justify-content: center; gap: 5px;
  background: linear-gradient(180deg, #f0f6ff 0%, #e6eefc 100%);
  border: 1px solid #deebff; box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.company-payments-hero-icon span { display: block; width: 10px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg,#77a8ff,#3d7cff); }
.company-payments-hero-icon span:nth-child(1) { height: 18px; opacity: .65; }
.company-payments-hero-icon span:nth-child(2) { height: 30px; }
.company-payments-hero-icon span:nth-child(3) { height: 42px; }
.company-payments-title { margin: 0; font-size: 20px; line-height: 1.15; font-weight: 800; color: #0f172a; }
.company-payments-subtitle { margin: 8px 0 0; color: #5f7194; font-size: 13.5px; line-height: 1.45; }
.company-payments-manage {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px;
  text-decoration: none; font-weight: 700; color: #2647ce; background: linear-gradient(180deg,#ffffff 0%,#f6f9ff 100%);
  border: 1px solid #dbe7ff; box-shadow: 0 10px 24px rgba(38,71,206,.08);
}
.company-payments-manage span { font-size: 20px; line-height: 1; }
.company-payments-filter {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(400px, 1.2fr); gap: 16px;
  padding: 18px 20px; border: 1px solid #e7eef8; border-radius: 20px;
  background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.company-payments-filter-label { display: flex; align-items: center; gap: 16px; }
.company-payments-filter-icon,
.company-payments-section-icon {
  width: 56px; height: 56px; border-radius: 16px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
  color: #3673ff; background: linear-gradient(180deg,#eef5ff 0%,#e5efff 100%);
}
.company-payments-filter-title { font-size: 15px; font-weight: 800; color: #16233f; }
.company-payments-filter-subtitle { font-size: 13px; color: #667a99; margin-top: 4px; }
.company-payments-filter-controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.company-payments-date-field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; color: #4e5f7d; font-size: 12px; font-weight: 700; }
.company-payments-date-input {
  height: 48px; border-radius: 14px; border: 1px solid #d4dfef; background: #fff;
  padding: 0 14px; font-size: 16px; color: #0f172a; box-shadow: inset 0 1px 2px rgba(15,23,42,.02);
}
.company-payments-apply {
  height: 48px; min-width: 130px; border: 0; border-radius: 14px; cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 800;
  background: linear-gradient(135deg,#4e8cff 0%,#2f6ee5 100%); box-shadow: 0 12px 24px rgba(47,110,229,.22);
}
.company-payments-filter-note {
  grid-column: 2; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: 16px; background: linear-gradient(180deg,#f5f8ff 0%,#edf3ff 100%); color: #586b8b;
}
.company-payments-filter-note-icon {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff; color: #3f72ea; font-weight: 800; border: 1px solid #d9e4ff; flex: 0 0 auto;
}
.company-payments-metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.company-payments-metric-card {
  position: relative; overflow: hidden; min-height: 196px; padding: 20px 22px; border-radius: 22px;
  border: 1px solid #e5ecf8; background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.04);
}
.company-payments-metric-card::after {
  content: ''; position: absolute; right: -8%; bottom: -36%; width: 64%; height: 72%;
  border-radius: 48% 52% 0 0 / 66% 56% 0 0; opacity: .35;
}
.company-payments-metric-top { display: flex; align-items: center; gap: 12px; }
.company-payments-card-glyph {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto;
  font-size: 24px; font-weight: 800; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.88);
}
.company-payments-metric-title { color: #1b2b54; font-size: 16px; line-height: 1.25; font-weight: 800; }
.company-payments-metric-value { margin-top: 18px; font-size: 28px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; color: #07122d; }
.company-payments-metric-subtitle { margin-top: 14px; min-height: 42px; color: #607391; font-size: 13px; line-height: 1.4; }
.company-payments-metric-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(143,162,199,.22); color: #4e6697; font-size: 13px; }
.company-payments-theme-blue { background: linear-gradient(180deg,#f8fbff 0%,#f1f6ff 100%); }
.company-payments-theme-blue .company-payments-card-glyph { color: #3572eb; background: rgba(234,242,255,.9); }
.company-payments-theme-blue::after { background: linear-gradient(180deg,rgba(124,165,255,.18),rgba(124,165,255,.34)); }
.company-payments-theme-teal { background: linear-gradient(180deg,#fbffff 0%,#f1fdfb 100%); }
.company-payments-theme-teal .company-payments-card-glyph { color: #11a89b; background: rgba(220,248,244,.95); }
.company-payments-theme-teal::after { background: linear-gradient(180deg,rgba(104,230,215,.14),rgba(104,230,215,.28)); }
.company-payments-theme-amber { background: linear-gradient(180deg,#fffdfa 0%,#fff7ea 100%); }
.company-payments-theme-amber .company-payments-card-glyph { color: #d89a1a; background: rgba(255,244,216,.95); }
.company-payments-theme-amber::after { background: linear-gradient(180deg,rgba(251,208,105,.16),rgba(251,208,105,.3)); }
.company-payments-theme-sand { background: linear-gradient(180deg,#fffdf7 0%,#fbf5e8 100%); }
.company-payments-theme-sand .company-payments-card-glyph { color: #c98b08; background: rgba(251,239,205,.95); }
.company-payments-theme-sand::after { background: linear-gradient(180deg,rgba(245,211,131,.14),rgba(245,211,131,.26)); }
.company-payments-theme-green { background: linear-gradient(180deg,#fbfffd 0%,#f0fcf5 100%); }
.company-payments-theme-green .company-payments-card-glyph { color: #21a566; background: rgba(224,248,233,.95); }
.company-payments-theme-green::after { background: linear-gradient(180deg,rgba(120,230,170,.15),rgba(120,230,170,.28)); }
.company-payments-theme-slate { background: linear-gradient(180deg,#ffffff 0%,#f6f9fd 100%); }
.company-payments-theme-slate .company-payments-card-glyph { color: #62738f; background: rgba(236,241,248,.95); }
.company-payments-theme-slate::after { background: linear-gradient(180deg,rgba(191,206,229,.16),rgba(191,206,229,.3)); }
.company-payments-lower-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr); gap: 16px; }
.company-payments-chart-card,
.company-payments-notes-card {
  border: 1px solid #e7edf7; border-radius: 20px; background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  padding: 20px 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.company-payments-section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.company-payments-section-head .company-payments-section-icon { width: 46px; height: 46px; font-size: 19px; border-radius: 14px; }
.company-payments-section-title { font-size: 16px; font-weight: 800; color: #182754; }
.company-payments-chart-body { display: flex; align-items: center; gap: 24px; }
.company-payments-donut {
  width: 178px; height: 178px; border-radius: 50%; position: relative; flex: 0 0 auto;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.85);
}
.company-payments-donut-hole {
  width: 112px; height: 112px; border-radius: 50%; background: rgba(255,255,255,.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.company-payments-donut-hole strong { font-size: 18px; line-height: 1.1; font-weight: 800; color: #0f172a; }
.company-payments-donut-hole span { margin-top: 6px; font-size: 13px; color: #6a7f9f; }
.company-payments-legend { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; }
.company-payments-legend-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.company-payments-legend-label { display: flex; align-items: center; gap: 10px; color: #486181; font-weight: 700; }
.company-payments-legend-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 4px rgba(255,255,255,.9); }
.company-payments-legend-value { font-weight: 800; color: #12203e; }
.company-payments-legend-percent { color: #6c80a0; font-weight: 700; min-width: 48px; text-align: right; }
.company-payments-notes-list { display: flex; flex-direction: column; gap: 14px; }
.company-payments-note-row { display: flex; align-items: flex-start; gap: 12px; color: #566b8f; line-height: 1.45; }
.company-payments-note-check {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: #ffffff; border: 1px solid #d9e5f8; color: #3ca06a; font-weight: 800;
}
.company-payments-empty { color: #8a9ab1; font-size: 13px; }

@media (max-width: 1180px) {
  .company-payments-filter { grid-template-columns: 1fr; }
  .company-payments-filter-note { grid-column: 1; }
  .company-payments-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-payments-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .company-payments-hero { flex-direction: column; }
  .company-payments-hero-main { max-width: none; }
  .company-payments-manage { width: 100%; justify-content: center; }
  .company-payments-filter { padding: 16px; }
  .company-payments-filter-controls { align-items: stretch; }
  .company-payments-date-field, .company-payments-apply { width: 100%; }
  .company-payments-apply { min-width: 0; }
  .company-payments-metrics-grid { grid-template-columns: 1fr; }
  .company-payments-chart-body { flex-direction: column; align-items: flex-start; }
  .company-payments-donut { width: 162px; height: 162px; }
  .company-payments-donut-hole { width: 104px; height: 104px; }
  .company-payments-legend-row { grid-template-columns: minmax(0, 1fr) auto; }
  .company-payments-legend-percent { grid-column: 2; }
}

/* V71 — compact/simple Company Payments & Accounts layout */
.company-payments-shell { gap: 12px; }
.company-payments-hero { align-items: center; gap: 12px; }
.company-payments-hero-main { gap: 12px; max-width: 820px; align-items: center; }
.company-payments-hero-icon {
  width: 48px; height: 48px; border-radius: 13px; gap: 4px;
  background: #f4f7fb; border-color: #e6ebf2; box-shadow: none;
}
.company-payments-hero-icon span { width: 7px; border-radius: 5px 5px 2px 2px; background: #4f83e8; }
.company-payments-hero-icon span:nth-child(1) { height: 13px; }
.company-payments-hero-icon span:nth-child(2) { height: 22px; }
.company-payments-hero-icon span:nth-child(3) { height: 31px; }
.company-payments-title { font-size: 18px; }
.company-payments-subtitle { margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: #64748b; }
.company-payments-manage {
  padding: 9px 13px; border-radius: 10px; gap: 7px; font-size: 12.5px;
  box-shadow: none; background: #fff; border-color: #dbe3ee; color: #3159ad;
}
.company-payments-manage:hover { background: #f8fafc; }
.company-payments-manage span { font-size: 17px; }

.company-payments-filter {
  grid-template-columns: minmax(220px,.72fr) auto minmax(270px,.9fr);
  align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border-color: #e5eaf1;
}
.company-payments-filter-label { gap: 11px; }
.company-payments-filter-icon,
.company-payments-section-icon {
  width: 42px; height: 42px; border-radius: 11px; font-size: 17px;
  color: #4b78d1; background: #f1f5fb;
}
.company-payments-filter-title { font-size: 13.5px; }
.company-payments-filter-subtitle { font-size: 11.5px; margin-top: 2px; }
.company-payments-filter-controls { gap: 9px; flex-wrap: nowrap; align-items: end; }
.company-payments-date-field { gap: 4px; min-width: 142px; font-size: 10.5px; }
.company-payments-date-input {
  height: 40px; border-radius: 9px; padding: 0 10px; font-size: 13px;
  border-color: #d8e0ea; box-shadow: none;
}
.company-payments-apply {
  height: 40px; min-width: 92px; border-radius: 9px; font-size: 12.5px;
  background: #3f73d8; box-shadow: none;
}
.company-payments-apply:hover { background: #3567c6; }
.company-payments-filter-note {
  grid-column: auto; gap: 9px; padding: 10px 12px; border-radius: 11px;
  background: #f7f9fc; color: #64748b; font-size: 11.5px; line-height: 1.35;
}
.company-payments-filter-note-icon {
  width: 22px; height: 22px; font-size: 11px; border-color: #e0e7f0;
  color: #5275bc; background: #fff;
}

.company-payments-metrics-grid { gap: 12px; }
.company-payments-metric-card {
  min-height: 132px; padding: 14px 16px; border-radius: 14px;
  background: #fff !important; border-color: #e4eaf2; box-shadow: none;
}
.company-payments-metric-card::after { display: none; }
.company-payments-metric-top { gap: 10px; }
.company-payments-card-glyph {
  width: 38px; height: 38px; border-radius: 10px; font-size: 17px;
  border: 0; background: #f3f6fa;
}
.company-payments-metric-title { font-size: 13.5px; color: #23304a; }
.company-payments-metric-value { margin-top: 9px; font-size: 23px; color: #111827; }
.company-payments-metric-subtitle {
  margin-top: 8px; min-height: 0; font-size: 11.5px; line-height: 1.3; color: #718096;
}
.company-payments-metric-meta {
  margin-top: 8px; padding-top: 7px; font-size: 11.5px; color: #64748b;
  border-top-color: #edf1f5;
}
.company-payments-theme-blue .company-payments-card-glyph { color: #3d6fc8; background: #eef4ff; }
.company-payments-theme-teal .company-payments-card-glyph { color: #168b80; background: #edf9f7; }
.company-payments-theme-amber .company-payments-card-glyph { color: #b27b12; background: #fff7e6; }
.company-payments-theme-sand .company-payments-card-glyph { color: #9f7924; background: #faf6ea; }
.company-payments-theme-green .company-payments-card-glyph { color: #218a5d; background: #eef8f2; }
.company-payments-theme-slate .company-payments-card-glyph { color: #63748c; background: #f1f4f8; }

.company-payments-lower-grid { gap: 12px; }
.company-payments-chart-card,
.company-payments-notes-card {
  padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: none; border-color: #e4eaf2;
}
.company-payments-section-head { gap: 10px; margin-bottom: 10px; }
.company-payments-section-head .company-payments-section-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.company-payments-section-title { font-size: 13.5px; color: #25324a; }
.company-payments-chart-body { gap: 18px; }
.company-payments-donut { width: 126px; height: 126px; }
.company-payments-donut-hole { width: 82px; height: 82px; box-shadow: none; }
.company-payments-donut-hole strong { font-size: 14px; }
.company-payments-donut-hole span { margin-top: 3px; font-size: 11px; }
.company-payments-legend { gap: 9px; }
.company-payments-legend-row { gap: 9px; font-size: 11.5px; }
.company-payments-legend-dot { width: 10px; height: 10px; box-shadow: none; }
.company-payments-notes-list { gap: 9px; }
.company-payments-note-row { gap: 9px; font-size: 11.5px; line-height: 1.35; }
.company-payments-note-check { width: 21px; height: 21px; font-size: 11px; }

@media (max-width: 1320px) {
  .company-payments-filter { grid-template-columns: minmax(210px,.7fr) auto; }
  .company-payments-filter-note { grid-column: 1 / -1; }
}
@media (max-width: 1040px) {
  .company-payments-filter { grid-template-columns: 1fr; }
  .company-payments-filter-controls { flex-wrap: wrap; }
  .company-payments-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .company-payments-title { font-size: 17px; }
  .company-payments-hero-icon { width: 42px; height: 42px; }
  .company-payments-metrics-grid { grid-template-columns: 1fr; }
  .company-payments-metric-card { min-height: 0; }
}


/* V72 — Company payments refined per latest feedback */
.company-payments-shell { gap: 10px; }
.company-payments-hero { align-items: center; }
.company-payments-title { font-size: 17px; line-height: 1.2; }
.company-payments-subtitle { font-size: 12px; line-height: 1.45; }
.company-payments-filter-title,
.company-payments-section-title,
.company-payments-metric-title { line-height: 1.3; }
.company-payments-filter-subtitle,
.company-payments-metric-subtitle,
.company-payments-metric-meta,
.company-payments-filter-note,
.company-payments-note-row { line-height: 1.45; }
.company-payments-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-payments-metric-card {
  min-height: 126px;
  padding: 13px 15px;
  border-radius: 12px;
}
.company-payments-metric-top { align-items: flex-start; }
.company-payments-card-glyph { width: 36px; height: 36px; border-radius: 9px; font-size: 16px; }
.company-payments-metric-title { font-size: 13px; }
.company-payments-card-hint { margin-top: 2px; font-size: 10.5px; color: #64748b; }
.company-payments-metric-value { margin-top: 8px; font-size: 22px; line-height: 1.1; }
.company-payments-metric-subtitle { margin-top: 6px; font-size: 11px; }
.company-payments-metric-meta { margin-top: 7px; padding-top: 7px; font-size: 11px; }
.company-payments-metric-card-clickable { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.company-payments-metric-card-clickable:hover { border-color: #d2dced; box-shadow: 0 3px 10px rgba(15,23,42,.05); transform: translateY(-1px); }
.company-payments-card-total {
  border-color: #f2c8c8 !important;
  background: #fff5f5 !important;
}
.company-payments-theme-rose .company-payments-card-glyph { color: #c63f3f; background: #ffe5e5; }
.company-payments-card-total .company-payments-metric-title,
.company-payments-card-total .company-payments-metric-value { color: #b42318; }
.company-payments-card-total .company-payments-metric-meta { color: #b54747; }
.company-payments-lower-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr); }
.company-payments-chart-card,
.company-payments-notes-card,
.company-payments-statement-card {
  padding: 14px 16px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fff;
}
.company-payments-statement-card { margin-top: 12px; }
.company-payments-statement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.company-payments-statement-head h4 { margin: 0; font-size: 14px; font-weight: 800; color: #1f2937; }
.company-payments-statement-head p { margin: 4px 0 0; font-size: 11.5px; color: #64748b; }
.company-payments-statement-close {
  border: 1px solid #d7dfe9; background: #fff; color: #334155; height: 34px; padding: 0 12px;
  border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.company-payments-statement-close:hover { background: #f8fafc; }
.company-payments-statement-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.company-payments-statement-summary > div { border: 1px solid #edf1f5; background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.company-payments-statement-summary span { display: block; font-size: 10.5px; color: #64748b; margin-bottom: 4px; }
.company-payments-statement-summary strong { font-size: 15px; color: #0f172a; }
.company-payments-statement-table-wrap { border: 1px solid #edf1f5; border-radius: 10px; }
.company-payments-statement-table-wrap table { font-size: 12px; }
.company-payments-statement-table-wrap thead th { font-size: 11px; }
@media (max-width: 1040px) {
  .company-payments-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-payments-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .company-payments-metrics-grid { grid-template-columns: 1fr; }
  .company-payments-statement-summary { grid-template-columns: 1fr; }
}

/* V73 — clean Dashboard-style Company Payments & Accounts */
.company-payments-shell { gap: 14px; }
.company-payments-hero {
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  padding: 2px 0 4px;
}
.company-payments-title { margin:0; font-size:16px; line-height:1.35; font-weight:750; color:#162033; }
.company-payments-subtitle { margin:4px 0 0; font-size:12px; line-height:1.45; color:#7a8aa4; }
.company-payments-manage {
  display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid #dfe5ee;
  border-radius:9px; background:#fff; box-shadow:none; font-size:12px; font-weight:650; color:#40526e;
}
.company-payments-manage:hover { background:#f8fafc; }
.company-payments-filter {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 14px;
  border:1px solid #e5e9ef; border-radius:12px; background:#fff;
}
.company-payments-filter-label { display:flex; align-items:center; gap:10px; min-width:230px; margin-right:auto; }
.company-payments-filter-icon { width:36px; height:36px; border-radius:9px; display:grid; place-items:center; background:#eef4ff; color:#4b7bd7; font-size:15px; }
.company-payments-filter-title { font-size:12.5px; line-height:1.3; font-weight:700; color:#26334a; }
.company-payments-filter-subtitle { margin-top:2px; font-size:11px; line-height:1.4; color:#8492a8; }
.company-payments-filter-controls { display:flex; align-items:end; gap:8px; flex-wrap:wrap; }
.company-payments-date-field { display:flex; flex-direction:column; gap:4px; min-width:140px; font-size:10.5px; line-height:1.2; font-weight:650; color:#64748b; }
.company-payments-date-input { height:36px; padding:0 10px; border:1px solid #d9e0e9; border-radius:8px; background:#fff; color:#1f2937; font-size:12.5px; }
.company-payments-apply { height:36px; min-width:78px; padding:0 14px; border:0; border-radius:8px; background:#315fbd; color:#fff; font-size:12px; font-weight:700; box-shadow:none; cursor:pointer; }
.company-payments-apply:hover { background:#294fa0; }

.company-payments-metrics-grid-five { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.company-payments-metric-card {
  min-height:132px; padding:14px 15px; border:1px solid #e4e9f0; border-radius:12px;
  background:#fff !important; box-shadow:none; position:relative; overflow:hidden;
}
.company-payments-metric-card::after { display:none !important; }
.company-payments-metric-top { display:flex; align-items:center; gap:10px; }
.company-payments-card-glyph { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; flex:0 0 auto; background:#f2f5f9 !important; color:#60728f !important; font-size:15px; font-weight:750; border:0; }
.company-payments-metric-title { font-size:12.5px; line-height:1.35; font-weight:700; color:#26334a; }
.company-payments-metric-value { margin-top:9px; font-size:21px; line-height:1.15; font-weight:760; color:#111827; letter-spacing:-.02em; }
.company-payments-metric-subtitle { margin-top:5px; min-height:0; font-size:11px; line-height:1.45; color:#78879e; }
.company-payments-metric-meta { margin-top:7px; padding-top:7px; border-top:1px solid #eef2f6; font-size:10.8px; line-height:1.45; color:#64748b; }
.company-payments-view-link { margin-top:6px; font-size:10.8px; line-height:1.2; font-weight:650; color:#315fbd; }
.company-payments-metric-card-clickable { cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.company-payments-metric-card-clickable:hover { border-color:#cfd8e5; box-shadow:0 3px 10px rgba(15,23,42,.045); transform:translateY(-1px); }
.company-payments-card-total { border-color:#cfe7d7 !important; background:#f8fdf9 !important; }
.company-payments-card-total .company-payments-card-glyph { background:#e9f7ee !important; color:#2d8454 !important; }
.company-payments-card-total .company-payments-metric-title,
.company-payments-card-total .company-payments-metric-value { color:#167044; }
.company-payments-card-total .company-payments-view-link { color:#167044; }
.company-payments-card-total .company-payments-metric-meta { color:#557563; border-top-color:#deefe4; }

.company-payments-statement-card { padding:14px 15px; border:1px solid #e4e9f0; border-radius:12px; background:#fff; }
.company-payments-statement-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.company-payments-statement-head h4 { margin:0; font-size:13.5px; line-height:1.3; font-weight:750; color:#1f2937; }
.company-payments-statement-head p { margin:3px 0 0; font-size:10.8px; line-height:1.4; color:#7b8799; }
.company-payments-statement-close { height:32px; padding:0 11px; border:1px solid #dce3eb; border-radius:8px; background:#fff; color:#475569; font-size:11px; font-weight:650; cursor:pointer; }
.company-payments-statement-close:hover { background:#f8fafc; }
.company-payments-statement-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.company-payments-statement-summary > div { padding:9px 10px; border:1px solid #edf1f5; border-radius:9px; background:#f8fafc; }
.company-payments-statement-summary span { display:block; margin-bottom:3px; font-size:10px; line-height:1.3; color:#7a8799; }
.company-payments-statement-summary strong { font-size:13px; line-height:1.25; color:#172033; }
.company-payments-statement-table-wrap { border:1px solid #edf1f5; border-radius:9px; overflow:auto; }
.company-payments-statement-table-wrap table { font-size:11.5px; }
.company-payments-statement-table-wrap thead { background:#f8fafc; }
.company-payments-statement-table-wrap th { padding:8px 10px; font-size:10.5px; line-height:1.3; color:#67758b; font-weight:700; white-space:nowrap; text-align:left; }
.company-payments-statement-table-wrap td { padding:8px 10px; line-height:1.4; color:#3d4b60; vertical-align:top; }
.company-payments-statement-table-wrap tr + tr td { border-top:1px solid #f0f3f6; }

.company-payments-lower-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.9fr); gap:12px; }
.company-payments-chart-card,.company-payments-notes-card { padding:13px 14px; border:1px solid #e4e9f0; border-radius:12px; background:#fff; box-shadow:none; }
.company-payments-section-head { margin-bottom:9px; }
.company-payments-section-title { font-size:12.5px; line-height:1.3; font-weight:700; color:#26334a; }
.company-payments-chart-body { display:flex; align-items:center; gap:16px; }
.company-payments-donut { width:110px; height:110px; }
.company-payments-donut-hole { width:72px; height:72px; box-shadow:none; }
.company-payments-donut-hole strong { font-size:12.5px; line-height:1.15; }
.company-payments-donut-hole span { margin-top:2px; font-size:10px; }
.company-payments-legend { gap:7px; }
.company-payments-legend-row { font-size:10.8px; line-height:1.35; }
.company-payments-legend-dot { width:9px; height:9px; box-shadow:none; }
.company-payments-notes-list { gap:7px; }
.company-payments-note-row { gap:8px; font-size:10.8px; line-height:1.45; color:#64748b; }
.company-payments-note-check { width:19px; height:19px; font-size:10px; }

@media (max-width: 1100px) {
  .company-payments-metrics-grid-five { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-payments-lower-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .company-payments-filter { align-items:stretch; }
  .company-payments-filter-label { min-width:100%; }
  .company-payments-filter-controls { width:100%; }
  .company-payments-date-field { flex:1 1 140px; }
  .company-payments-metrics-grid-five { grid-template-columns:1fr; }
  .company-payments-statement-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-payments-chart-body { flex-direction:column; align-items:flex-start; }
}


/* V74 — clean Dashboard-style Factory P&L */
.factory-report-shell { max-width: 1040px; width: 100%; }
.factory-report-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.factory-report-head h3 { margin:0; font-size:16px; line-height:1.35; font-weight:750; color:#162033; }
.factory-report-head p { margin:4px 0 0; max-width:650px; font-size:12px; line-height:1.45; color:#7a8aa4; }
.factory-report-filter { display:flex; align-items:end; gap:8px; flex-wrap:wrap; }
.factory-report-filter label { display:flex; flex-direction:column; gap:4px; font-size:10.5px; font-weight:650; color:#64748b; }
.factory-report-filter input { height:36px; min-width:140px; padding:0 10px; border:1px solid #d9e0e9; border-radius:8px; background:#fff; color:#1f2937; font-size:12.5px; }
.factory-report-filter button { height:36px; min-width:78px; padding:0 14px; border:0; border-radius:8px; background:#315fbd; color:#fff; font-size:12px; font-weight:700; cursor:pointer; }
.factory-report-filter button:hover { background:#294fa0; }
.factory-report-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.factory-report-card { min-height:128px; padding:14px 15px; border:1px solid #e4e9f0; border-radius:12px; background:#fff; box-shadow:none; }
.factory-report-card-clickable { cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.factory-report-card-clickable:hover { border-color:#cfd8e5; box-shadow:0 3px 10px rgba(15,23,42,.045); transform:translateY(-1px); }
.factory-report-card-top { display:flex; align-items:center; gap:10px; }
.factory-report-icon { width:36px; height:36px; border-radius:9px; display:grid; place-items:center; flex:0 0 auto; background:#f2f5f9; color:#60728f; font-size:10.5px; font-weight:800; }
.factory-report-card-title { font-size:12.5px; line-height:1.35; font-weight:700; color:#26334a; }
.factory-report-card-link { margin-top:2px; font-size:10.5px; line-height:1.25; color:#315fbd; font-weight:650; }
.factory-report-card-value { margin-top:10px; font-size:22px; line-height:1.15; font-weight:760; color:#111827; letter-spacing:-.02em; }
.factory-report-card-note { margin-top:6px; font-size:10.8px; line-height:1.45; color:#78879e; }
.factory-report-card-profit.is-profit { border-color:#cfe7d7; background:#f8fdf9; }
.factory-report-card-profit.is-profit .factory-report-icon { background:#e9f7ee; color:#2d8454; }
.factory-report-card-profit.is-profit .factory-report-card-value { color:#167044; }
.factory-report-card-profit.is-loss { border-color:#eccaca; background:#fff8f8; }
.factory-report-card-profit.is-loss .factory-report-icon { background:#ffecec; color:#b42318; }
.factory-report-card-profit.is-loss .factory-report-card-value { color:#b42318; }
.factory-report-small-note { margin-top:8px; font-size:10.5px; color:#8a97a9; }
.factory-statement-card { margin-top:12px; padding:14px 15px; border:1px solid #e4e9f0; border-radius:12px; background:#fff; }
.factory-statement-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.factory-statement-head h4 { margin:0; font-size:13.5px; line-height:1.3; font-weight:750; color:#1f2937; }
.factory-statement-head p { margin:3px 0 0; font-size:10.8px; line-height:1.4; color:#7b8799; }
.factory-statement-head button { height:32px; padding:0 11px; border:1px solid #dce3eb; border-radius:8px; background:#fff; color:#475569; font-size:11px; font-weight:650; cursor:pointer; }
.factory-statement-head button:hover { background:#f8fafc; }
.factory-statement-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.factory-statement-summary > div { padding:9px 10px; border:1px solid #edf1f5; border-radius:9px; background:#f8fafc; }
.factory-statement-summary span { display:block; margin-bottom:3px; font-size:10px; line-height:1.3; color:#7a8799; }
.factory-statement-summary strong { font-size:13px; line-height:1.25; color:#172033; }
.factory-statement-table-wrap { border:1px solid #edf1f5; border-radius:9px; overflow:auto; }
.factory-statement-table-wrap table { font-size:11.5px; }
.factory-statement-table-wrap thead { background:#f8fafc; }
.factory-statement-table-wrap th { padding:8px 10px; font-size:10.5px; line-height:1.3; color:#67758b; font-weight:700; text-align:left; white-space:nowrap; }
.factory-statement-table-wrap td { padding:8px 10px; line-height:1.4; color:#3d4b60; vertical-align:top; }
.factory-statement-table-wrap tr + tr td { border-top:1px solid #f0f3f6; }
.factory-statement-total-row { background:#f8fafc; font-weight:750; }
.factory-profit-calc { border:1px solid #edf1f5; border-radius:9px; overflow:hidden; }
.factory-profit-calc > div { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 12px; font-size:12px; line-height:1.35; }
.factory-profit-calc > div + div { border-top:1px solid #edf1f5; }
.factory-profit-calc span { color:#64748b; }
.factory-profit-calc strong { color:#1f2937; }
.factory-profit-calc-result { background:#f8fafc; font-size:13px !important; font-weight:750; }
.factory-formula-note,.factory-report-footer-note { margin-top:10px; padding:9px 10px; border:1px solid #edf1f5; border-radius:9px; background:#f8fafc; font-size:10.8px; line-height:1.45; color:#64748b; }
.factory-report-footer-note button { border:0; padding:0; background:transparent; color:#315fbd; font:inherit; font-weight:650; cursor:pointer; }
@media (max-width: 900px) { .factory-report-cards { grid-template-columns:1fr; } }
@media (max-width: 760px) { .factory-report-filter { width:100%; } .factory-report-filter label { flex:1 1 140px; } .factory-statement-summary { grid-template-columns:1fr; } }

/* V76 — consistent sky-blue selected sidebar item across every application */
#sidebar .nav-link.active,
#sidebar .nav-link.active:hover,
.nav-link.active,
.nav-link.active:hover {
  background: #e7f3ff !important;
  color: #215b98 !important;
  box-shadow: inset 3px 0 0 #72b6ee !important;
}
#sidebar .nav-link.active .nav-icon,
.nav-link.active .nav-icon {
  color: #3f8fd3 !important;
}
#sidebar .nav-link:hover,
.nav-link:hover {
  background: #f3f9ff;
  color: #204f7d;
}

/* V77 — clickable dashboard KPI detail panels + destructive action affordances */
.stat-card-v2-clickable { cursor:pointer; position:relative; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.stat-card-v2-clickable:hover { border-color:#bfd7ef; box-shadow:0 6px 18px rgba(45,92,145,.08)!important; transform:translateY(-1px); }
.stat-card-v2-clickable:focus { outline:2px solid #7ec1f4; outline-offset:2px; }
.stat-card-open { margin-top:6px; font-size:10.5px; line-height:1.25; font-weight:650; color:#3d78b5; }
.dashboard-detail-host { margin:0 0 18px; scroll-margin-top:18px; }
.dashboard-detail-card { border:1px solid #dfe8f2; border-radius:14px; background:#fff; overflow:hidden; }
.dashboard-detail-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; border-bottom:1px solid #edf1f5; background:#fbfdff; }
.dashboard-detail-head h3 { margin:0; font-size:14px; line-height:1.3; font-weight:750; color:#1d2b42; }
.dashboard-detail-head p { margin:3px 0 0; font-size:10.8px; line-height:1.4; color:#7a899e; }
.dashboard-detail-head button { height:31px; padding:0 11px; border:1px solid #dbe3ec; border-radius:8px; background:#fff; color:#526174; font-size:11px; font-weight:650; cursor:pointer; }
.dashboard-detail-head button:hover { background:#f5f9fd; }
.dashboard-detail-scroll { overflow:auto; max-height:360px; }
.dashboard-detail-table { font-size:11.8px; }
.dashboard-detail-table thead { position:sticky; top:0; z-index:1; background:#f8fafc; }
.dashboard-detail-table th { padding:8px 10px; font-size:10.5px; color:#6b7a90; font-weight:700; white-space:nowrap; }
.dashboard-detail-table td { padding:8px 10px; vertical-align:middle; }
.sales-delete-link,.jobwork-delete-link { border:0; background:none; padding:4px 6px; color:#b42318; font-size:11px; font-weight:650; cursor:pointer; }
.sales-delete-link:hover,.jobwork-delete-link:hover { text-decoration:underline; }
.jobwork-delete-btn { border:1px solid #efcaca; background:#fff7f7; color:#b42318; padding:7px 10px; border-radius:8px; font-size:11px; font-weight:700; cursor:pointer; }
.jobwork-delete-btn:hover { background:#ffeded; }
@media(max-width:760px){ .dashboard-detail-scroll{max-height:440px}.dashboard-detail-table{min-width:680px} }

/* V78 — separate overall Project timeline and factory JobWork timeline */
.timeline-form-section {
  border: 1px solid #e3e9f1;
  border-radius: 12px;
  background: #fbfdff;
  padding: 13px 14px;
}
.timeline-form-section-jobwork { background: #fcfdfb; border-color: #e2ebe5; }
.timeline-form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.timeline-form-head strong { font-size: 13px; color: #23304a; }
.timeline-form-head span { font-size: 10.8px; color: #7b8799; }
.timeline-preview {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  background: #fff;
  font-size: 11.5px;
  line-height: 1.35;
  color: #51627c;
  font-weight: 650;
}
.timeline-separation-note {
  padding: 10px 12px;
  border-radius: 9px;
  background: #eef7ff;
  border: 1px solid #dcecff;
  color: #45617f;
  font-size: 11.5px;
  line-height: 1.45;
}
.project-timeline-card {
  border: 1px solid #e4eaf2;
  border-radius: 12px;
  background: #fff;
  padding: 12px 13px;
}
.project-timeline-head,
.jobwork-timeline-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.project-timeline-head > div:first-child,
.jobwork-timeline-summary-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.project-timeline-head strong,
.jobwork-timeline-summary-head h3 { margin: 0; font-size: 13px; font-weight: 750; color: #23304a; }
.project-timeline-head span,
.jobwork-timeline-summary-head p { margin: 0; font-size: 10.8px; line-height: 1.35; color: #7c899c; }
.project-timeline-status,
.jobwork-timeline-summary-head > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf7f1;
  color: #2f7451;
  font-size: 10.5px;
  font-weight: 700;
}
.project-timeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.project-timeline-grid > div,
.jobwork-timeline-summary-grid > div {
  min-width: 0;
  border: 1px solid #edf1f5;
  border-radius: 9px;
  background: #f8fafc;
  padding: 9px 10px;
}
.project-timeline-grid small,
.jobwork-timeline-summary-grid small {
  display: block;
  margin-bottom: 4px;
  font-size: 9.8px;
  line-height: 1.25;
  color: #8190a5;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.project-timeline-grid strong,
.jobwork-timeline-summary-grid strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: #1d2939;
}
.project-timeline-grid span { display: block; margin-top: 3px; font-size: 9.8px; color: #7b8799; }
.jobwork-timeline-summary {
  padding: 1px 0;
}
.jobwork-timeline-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 950px) {
  .project-timeline-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .jobwork-timeline-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .project-timeline-grid,
  .jobwork-timeline-summary-grid { grid-template-columns: 1fr; }
}

/* V79 — permanent delete controls restricted to the designated owner login */
.data-delete-link {
  border: 0;
  background: none;
  padding: 4px 6px;
  color: #b42318;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.data-delete-link:hover { text-decoration: underline; }
.data-delete-btn {
  border: 1px solid #efcaca;
  background: #fff7f7;
  color: #b42318;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.data-delete-btn:hover { background: #ffeded; }
.command-btn.danger {
  border-color: #efcaca;
  background: #fff7f7;
  color: #b42318;
}
.command-btn.danger:hover { background: #ffeded; }

/* V80 — Common Alarms: JobWork targets, Project deadlines, Payment reminders */
.alarm-common-shell{display:flex;flex-direction:column;gap:14px}
.alarm-common-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.alarm-common-card{appearance:none;width:100%;border:1px solid #e4e9f0;border-radius:12px;background:#fff;padding:14px 15px;text-align:left;display:flex;align-items:flex-start;gap:11px;cursor:pointer;box-shadow:none;transition:.15s ease}
.alarm-common-card:hover{border-color:#cad6e5;box-shadow:0 3px 10px rgba(15,23,42,.045);transform:translateY(-1px)}
.alarm-common-card.active{border-color:#b8d8f4;background:#f4faff;box-shadow:inset 3px 0 0 #72b6ee}
.alarm-common-icon{width:36px;height:36px;border-radius:9px;display:grid;place-items:center;flex:0 0 auto}
.alarm-common-icon .ui-icon{width:18px;height:18px}
.alarm-icon-jobwork{background:#eef5ff;color:#3f7fc0}
.alarm-icon-project{background:#f3efff;color:#7059b1}
.alarm-icon-payment{background:#eaf8ef;color:#2d8454}
.alarm-common-card small{display:block;font-size:11.5px;line-height:1.3;font-weight:700;color:#53647b}
.alarm-common-card strong{display:block;margin-top:5px;font-size:23px;line-height:1.1;color:#152033;font-weight:760}
.alarm-common-card span:not(.alarm-common-icon){display:block;margin-top:5px;font-size:10.8px;line-height:1.35;color:#7a8799}
.alarm-detail-card{border:1px solid #e4e9f0;border-radius:12px;background:#fff;padding:14px 15px}
.alarm-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.alarm-detail-head h3{margin:0;font-size:14px;line-height:1.3;font-weight:750;color:#1f2937}
.alarm-detail-head p{margin:3px 0 0;font-size:10.8px;line-height:1.45;color:#7b8799}
.alarm-detail-count{font-size:10.5px;font-weight:650;color:#60728f;background:#f4f7fa;border:1px solid #e7ecf2;border-radius:999px;padding:5px 8px}
.alarm-table{font-size:11.5px}
.alarm-table thead{background:#f8fafc}
.alarm-table th{padding:8px 10px;font-size:10.5px;line-height:1.3;color:#67758b;font-weight:700;white-space:nowrap;text-align:left}
.alarm-table td{padding:9px 10px;line-height:1.4;color:#3d4b60;vertical-align:top}
.alarm-table tr+tr td{border-top:1px solid #f0f3f6}
.alarm-table tr.clickable:hover td{background:#fbfdff}
@media(max-width:980px){.alarm-common-grid{grid-template-columns:1fr}.alarm-common-card{min-height:86px}}

/* V81 — configurable alarm conditions */
.alarm-common-grid-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.alarm-icon-custom{background:#f1edff;color:#7555c7}
.alarm-rule-manager{border:1px solid #e4e9f0;border-radius:12px;background:#fff;padding:14px 15px}
.alarm-rule-add{height:34px;padding:0 12px;border:1px solid #cbdcf0;border-radius:8px;background:#f3f9ff;color:#28679f;font-size:11px;font-weight:700;cursor:pointer}
.alarm-rule-add:hover{background:#eaf5ff}
.alarm-rule-help{margin-bottom:10px;padding:8px 10px;border:1px solid #e6edf5;border-radius:8px;background:#f8fbff;color:#64748b;font-size:10.5px;line-height:1.45}
.alarm-rule-table{font-size:11.5px}
.alarm-rule-table th{font-size:10.5px;white-space:nowrap}
.alarm-rule-mini{height:29px;padding:0 8px;border:1px solid #dbe3ec;border-radius:7px;background:#fff;color:#475569;font-size:10.5px;font-weight:650;white-space:nowrap;cursor:pointer}
.alarm-rule-mini:hover{background:#f8fafc}
.alarm-rule-mini.danger{color:#b42318;border-color:#efd0d0;background:#fffafa}
.alarm-rule-enabled{display:inline-flex;padding:3px 7px;border-radius:999px;background:#ecf8f0;color:#26734a;font-size:10px;font-weight:700}
.alarm-rule-disabled{display:inline-flex;padding:3px 7px;border-radius:999px;background:#f3f4f6;color:#6b7280;font-size:10px;font-weight:700}
.alarm-action-customer{display:inline-flex;padding:3px 7px;border-radius:999px;background:#eef8f2;color:#23734a;font-size:10px;font-weight:700}
.alarm-whatsapp-btn{height:30px;padding:0 9px;border:1px solid #bfe2ca;border-radius:7px;background:#f2fbf5;color:#26734a;font-size:10.5px;font-weight:700;white-space:nowrap;cursor:pointer}
.alarm-whatsapp-btn:hover{background:#e8f7ed}
.alarm-provider-note{padding:10px 12px;border:1px solid #e4e9f0;border-radius:10px;background:#fafbfc;color:#6b7280;font-size:10.8px;line-height:1.5}
.alarm-rule-form{display:flex;flex-direction:column;gap:12px}
.alarm-rule-form .erp-field small{display:block;margin-top:4px;color:#94a3b8;font-size:10px;line-height:1.35}
.alarm-rule-check{display:flex;align-items:center;gap:7px;color:#475569;font-size:11.5px;font-weight:650}
@media(max-width:1180px){.alarm-common-grid-four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.alarm-common-grid-four{grid-template-columns:1fr}.alarm-rule-form .grid{grid-template-columns:1fr!important}}

/* ---------- Leads split workspace (v82) ---------- */
.leads-workspace {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.35fr);
  gap: 1.1rem;
  align-items: start;
}
.lead-list-panel,
.lead-form-card,
.lead-activity-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .9rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / .04);
}
.lead-list-panel { min-width: 0; overflow: hidden; }
.lead-side-column { display: flex; flex-direction: column; gap: 1rem; min-width: 0; position: sticky; top: 1rem; }
.lead-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid #edf1f5;
}
.lead-list-toolbar h3,
.lead-card-head h3 { margin: 0; color: #0f172a; font-size: 1rem; font-weight: 700; }
.lead-list-toolbar p,
.lead-card-head p { margin: .18rem 0 0; color: #94a3b8; font-size: .72rem; line-height: 1.35; }
.lead-list-controls { display: flex; align-items: center; gap: .55rem; }
.lead-search-box { position: relative; }
.lead-search-box input {
  width: 220px;
  height: 2.35rem;
  padding: .48rem .7rem .48rem 2.05rem;
  border: 1px solid #dce4ed;
  border-radius: .6rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: .78rem;
  outline: none;
}
.lead-search-box input:focus,
.lead-list-controls select:focus,
.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgb(147 197 253 / .18); }
.lead-search-icon { position: absolute; left: .68rem; top: 50%; transform: translateY(-50%); width: .9rem; height: .9rem; color: #94a3b8; }
.lead-list-controls select {
  height: 2.35rem;
  max-width: 150px;
  border: 1px solid #dce4ed;
  border-radius: .6rem;
  padding: 0 .65rem;
  background: #fff;
  color: #475569;
  font-size: .76rem;
  outline: none;
}
.lead-table-wrap { width: 100%; overflow-x: auto; }
.lead-table { width: 100%; min-width: 760px; font-size: .78rem; }
.lead-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .72rem .72rem;
  background: #f8fafc;
  border-bottom: 1px solid #edf1f5;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .035em;
  font-size: .66rem;
  text-align: left;
  white-space: nowrap;
}
.lead-table td {
  padding: .72rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: middle;
  white-space: nowrap;
}
.lead-data-row { cursor: pointer; transition: background .15s ease; }
.lead-data-row:hover { background: #f8fbff; }
.lead-customer-cell { display: flex; align-items: center; gap: .58rem; min-width: 165px; }
.lead-customer-cell strong { display: block; color: #172033; font-size: .8rem; font-weight: 650; }
.lead-customer-cell small { display: block; margin-top: .08rem; color: #94a3b8; font-size: .67rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.lead-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #eaf3ff;
  color: #2563b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: .67rem;
  font-weight: 700;
}
.lead-empty-row td,
.lead-activity-empty { padding: 1.25rem !important; color: #94a3b8 !important; text-align: center; }
.lead-list-footer {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1rem;
  color: #64748b;
  font-size: .74rem;
  border-top: 1px solid #edf1f5;
}
.lead-inline-new { border: 0; background: none; color: #2f6fd6; font-weight: 600; padding: .25rem; }
.lead-new-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 0;
  border-radius: .65rem;
  background: #3B6FE8;
  color: #fff;
  padding: .55rem .85rem;
  font-size: .8rem;
  font-weight: 650;
  box-shadow: 0 3px 8px rgb(59 111 232 / .18);
}
.lead-new-btn:hover { background: #5B8DEF; }
.lead-btn-icon { width: 1rem; height: 1rem; }
.lead-form-card { padding: 1rem; }
.lead-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.lead-card-head.compact { padding: 1rem 1rem 0; margin-bottom: .5rem; }
.lead-close-btn {
  border: 0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: .5rem;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.2rem;
  line-height: 1;
}
.lead-close-btn:hover { background: #e2e8f0; color: #0f172a; }
.lead-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.lead-field { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.lead-field-full { grid-column: 1 / -1; }
.lead-field > span { color: #334155; font-size: .7rem; font-weight: 600; }
.lead-field > span b { color: #e11d48; }
.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
  border: 1px solid #dce4ed;
  border-radius: .55rem;
  background: #fff;
  color: #0f172a;
  padding: .58rem .68rem;
  font-size: .78rem;
  outline: none;
}
.lead-field textarea { resize: vertical; min-height: 70px; }
.lead-form-actions { display: flex; gap: .55rem; margin-top: .1rem; }
.lead-save-btn,
.lead-cancel-btn { border-radius: .58rem; padding: .55rem .85rem; font-size: .78rem; font-weight: 650; }
.lead-save-btn { border: 1px solid #3B6FE8; background: #3B6FE8; color: #fff; }
.lead-save-btn:hover { background: #5B8DEF; border-color: #5B8DEF; }
.lead-cancel-btn { border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; }
.lead-cancel-btn:hover { background: #eef2f7; }
.lead-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.lead-stat-card {
  min-height: 74px;
  border: 1px solid transparent;
  border-radius: .78rem;
  padding: .72rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.lead-stat-card:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgb(15 23 42 / .06); }
.lead-stat-card.tone-blue { background: #eff6ff; border-color: #dbeafe; color: #2563eb; }
.lead-stat-card.tone-green { background: #ecfdf5; border-color: #d1fae5; color: #059669; }
.lead-stat-card.tone-amber { background: #fff7ed; border-color: #ffedd5; color: #ea580c; }
.lead-stat-card.tone-purple { background: #faf5ff; border-color: #f3e8ff; color: #7c3aed; }
.lead-stat-icon { width: 1.9rem; height: 1.9rem; border-radius: .55rem; background: rgb(255 255 255 / .7); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.lead-stat-svg { width: 1.05rem; height: 1.05rem; }
.lead-stat-copy { display: flex; flex-direction: column; min-width: 0; }
.lead-stat-copy strong { color: #172033; font-size: 1.05rem; line-height: 1.1; }
.lead-stat-copy small { margin-top: .14rem; color: #64748b; font-size: .63rem; line-height: 1.15; }
.lead-activity-card { overflow: hidden; }
.lead-activity-list { display: flex; flex-direction: column; }
.lead-activity-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: .66rem 1rem;
  border: 0;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
}
.lead-activity-item:hover { background: #f8fafc; }
.lead-activity-dot { width: .5rem; height: .5rem; border-radius: 999px; }
.lead-activity-dot.tone-blue { background: #3b82f6; }
.lead-activity-dot.tone-green { background: #10b981; }
.lead-activity-dot.tone-amber { background: #f59e0b; }
.lead-activity-dot.tone-purple { background: #8b5cf6; }
.lead-activity-copy { min-width: 0; }
.lead-activity-copy strong { display: block; color: #334155; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-activity-copy small { display: block; margin-top: .08rem; color: #94a3b8; font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-activity-item time { color: #94a3b8; font-size: .63rem; white-space: nowrap; }

@media (max-width: 1180px) {
  .leads-workspace { grid-template-columns: 390px minmax(0, 1fr); }
  .lead-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-list-toolbar { align-items: flex-start; flex-direction: column; }
  .lead-list-controls { width: 100%; }
  .lead-search-box { flex: 1; }
  .lead-search-box input { width: 100%; }
}
@media (max-width: 900px) {
  .leads-workspace { grid-template-columns: 1fr; }
  .lead-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lead-list-controls { flex-direction: column; align-items: stretch; }
  .lead-list-controls select { width: 100%; max-width: none; }
  .lead-form-grid { grid-template-columns: 1fr; }
  .lead-field-full { grid-column: auto; }
  .lead-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-activity-item { grid-template-columns: auto minmax(0, 1fr); }
  .lead-activity-item time { grid-column: 2; }
}


/* ---------- Lead workflow progressive stepper + sequential dates (v88) ---------- */
.lead-schedule-title{display:flex;flex-direction:column;gap:.12rem;padding:.3rem 0 .05rem;border-top:1px solid #edf1f5;margin-top:.1rem}
.lead-schedule-title strong{font-size:.75rem;color:#172033}.lead-schedule-title small{font-size:.65rem;color:#94a3b8}
.lead-workflow-card{background:#fff;border:1px solid #e2e8f0;border-radius:1rem;box-shadow:0 1px 2px rgb(15 23 42 / .04);padding:1rem 1.1rem}
.lead-workflow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.lead-workflow-head h3{margin:0;color:#0f172a;font-weight:700}.lead-workflow-head p{margin:.2rem 0 0;color:#94a3b8;font-size:.72rem}
.lead-workflow-track{display:flex;align-items:flex-start;overflow-x:auto;padding:.2rem .1rem .5rem;min-width:0}
.lead-workflow-step{position:relative;flex:1 0 145px;min-width:145px;padding:0 .4rem;display:flex;flex-direction:column;align-items:center;text-align:center;background:transparent;border:0}
.lead-workflow-step::before,.lead-workflow-step::after{content:'';position:absolute;top:.92rem;height:3px;background:#dbe3ec;z-index:0}
.lead-workflow-step::before{left:0;right:50%}.lead-workflow-step::after{left:50%;right:0}
.lead-workflow-step:first-child::before,.lead-workflow-step:last-child::after{display:none}
.lead-workflow-step.done::before,.lead-workflow-step.done::after,.lead-workflow-step.active::before{background:#22c55e}
.lead-step-marker{position:relative;z-index:1;width:1.85rem;height:1.85rem;border-radius:999px;background:#e2e8f0;color:#64748b;border:3px solid #fff;box-shadow:0 0 0 1px #cbd5e1;display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:800;flex:0 0 auto}
.lead-step-body{position:relative;z-index:1;min-width:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:.18rem;margin-top:.48rem}.lead-step-body strong{font-size:.69rem;color:#334155;line-height:1.25;max-width:135px}.lead-step-body small{font-size:.6rem;line-height:1.3;max-width:140px}
.lead-workflow-step.done .lead-step-marker{background:#22c55e;color:#fff;box-shadow:0 0 0 1px #22c55e}.lead-workflow-step.done .lead-step-body strong{color:#166534}
.lead-workflow-step.active .lead-step-marker{background:#3b82f6;color:#fff;box-shadow:0 0 0 4px #dbeafe}.lead-workflow-step.active .lead-step-body strong{color:#1d4ed8}
.lead-workflow-step.overdue .lead-step-marker{background:#e11d48;color:#fff;box-shadow:0 0 0 4px #ffe4e6}.lead-workflow-step.overdue .lead-step-body strong{color:#be123c}.lead-workflow-step.soon:not(.done) .lead-step-marker{background:#f59e0b;color:#fff;box-shadow:0 0 0 4px #fef3c7}
.lead-stage-complete{margin-top:.2rem;border:0;border-radius:.4rem;background:#2563eb;color:#fff;padding:.3rem .45rem;font-size:.6rem;font-weight:650}.lead-stage-complete:hover{background:#1d4ed8}.lead-stage-complete.is-disabled,.lead-stage-complete:disabled{background:#cbd5e1;color:#64748b;cursor:not-allowed}.lead-stage-hint{color:#7c3aed!important}
.lead-date-complete{color:#15803d!important}.lead-date-overdue{color:#be123c!important;font-weight:650}.lead-date-soon{color:#b45309!important;font-weight:650}.lead-date-planned{color:#64748b!important}.lead-date-missing{color:#e11d48!important}.lead-date-locked{color:#94a3b8!important}
.lead-schedule-edit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;margin-top:.15rem}.lead-schedule-edit{border:1px solid #e2e8f0;border-radius:.65rem;padding:.55rem;background:#f8fafc;display:flex;flex-direction:column;gap:.3rem}.lead-schedule-edit>span{font-size:.67rem;font-weight:650;color:#334155}.lead-schedule-edit input{width:100%;border:1px solid #dce4ed;border-radius:.45rem;padding:.48rem;background:#fff;font-size:.72rem}.lead-schedule-edit small{font-size:.59rem}.lead-schedule-edit.lead-date-overdue{border-color:#fecdd3;background:#fff1f2}.lead-schedule-edit.lead-date-soon{border-color:#fde68a;background:#fffbeb}.lead-schedule-edit.lead-date-complete{border-color:#bbf7d0;background:#f0fdf4}.lead-schedule-edit.is-locked{background:#f8fafc;border-style:dashed;opacity:.72}.lead-schedule-edit.is-locked input,.lead-schedule-edit.lead-date-complete input{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}.lead-sequential-note{margin:.1rem 0 .65rem;padding:.65rem .75rem;border:1px solid #dbeafe;border-radius:.65rem;background:#eff6ff;display:flex;flex-direction:column;gap:.15rem}.lead-sequential-note strong{font-size:.72rem;color:#1e3a8a}.lead-sequential-note small{font-size:.65rem;color:#64748b;line-height:1.4}
.alarm-common-grid-five{grid-template-columns:repeat(5,minmax(0,1fr))}.alarm-icon-lead{background:#eff6ff;color:#2563eb}
@media(max-width:1380px){.lead-workflow-step{flex-basis:135px;min-width:135px}.lead-schedule-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.alarm-common-grid-five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:980px){.lead-side-column{position:static}.lead-workflow-track{padding-bottom:.7rem}.lead-workflow-step{flex-basis:125px;min-width:125px}.lead-schedule-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.alarm-common-grid-five{grid-template-columns:1fr}}
@media(max-width:640px){.lead-workflow-step{flex-basis:118px;min-width:118px}.lead-schedule-edit-grid{grid-template-columns:1fr}}


/* ---------- Lead Site Measurement uploads -> JobWork sync (v87) ---------- */
.lead-measurement-upload-card{margin-top:.75rem;border:1px solid #bae6fd;border-radius:.75rem;background:#f0f9ff;padding:.75rem}
.lead-measurement-upload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.6rem}.lead-measurement-upload-head>div{display:flex;flex-direction:column;gap:.15rem}.lead-measurement-upload-head strong{font-size:.76rem;color:#0c4a6e}.lead-measurement-upload-head small{font-size:.64rem;color:#64748b;line-height:1.4}
.lead-measurement-upload-btn{border:1px solid #7dd3fc;background:#fff;color:#0369a1;border-radius:.5rem;padding:.45rem .65rem;font-size:.67rem;font-weight:650;white-space:nowrap}.lead-measurement-upload-btn:hover{background:#e0f2fe}
.lead-measurement-dropzone{border:1px dashed #7dd3fc;border-radius:.65rem;background:#fff;padding:.8rem;text-align:center;color:#475569;font-size:.69rem;cursor:pointer;transition:.15s ease}.lead-measurement-dropzone:hover,.lead-measurement-dropzone-active{background:#e0f2fe;border-color:#38bdf8}.lead-measurement-dropzone strong{color:#0369a1}.lead-measurement-dropzone small{display:block;margin-top:.2rem;color:#94a3b8;font-size:.6rem}
.lead-measurement-files{display:flex;flex-direction:column;gap:.35rem;margin-top:.55rem}.lead-measurement-file-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.5rem;padding:.48rem .55rem;border:1px solid #e2e8f0;border-radius:.55rem;background:#fff}.lead-measurement-file-icon{font-size:.85rem}.lead-measurement-file-info{min-width:0;display:flex;flex-direction:column}.lead-measurement-file-info a{font-size:.68rem;color:#0369a1;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lead-measurement-file-info small{font-size:.58rem;color:#94a3b8}.lead-measurement-empty{padding:.45rem;color:#94a3b8;font-size:.64rem;text-align:center}.lead-measurement-locked{margin-top:.7rem;border:1px dashed #cbd5e1;border-radius:.65rem;padding:.65rem;background:#f8fafc;color:#94a3b8;font-size:.65rem}
@media(max-width:640px){.lead-measurement-upload-head{flex-direction:column}.lead-measurement-upload-btn{width:100%}}

/* ---------- Lead design/reference uploads (v89) ---------- */
.lead-supporting-upload-head{display:flex;flex-direction:column;gap:.12rem;margin:.9rem 0 .5rem}.lead-supporting-upload-head strong{font-size:.76rem;color:#334155}.lead-supporting-upload-head small{font-size:.64rem;color:#94a3b8;line-height:1.4}
.lead-supporting-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
.lead-upload-tone-purple{border-color:#ddd6fe;background:#faf5ff}.lead-upload-tone-purple .lead-measurement-upload-head strong{color:#6d28d9}.lead-upload-tone-purple .lead-measurement-upload-btn{border-color:#c4b5fd;color:#6d28d9}.lead-upload-tone-purple .lead-measurement-upload-btn:hover,.lead-upload-tone-purple .lead-measurement-dropzone:hover{background:#f3e8ff}.lead-upload-tone-purple .lead-measurement-dropzone{border-color:#c4b5fd}.lead-upload-tone-purple .lead-measurement-dropzone strong,.lead-upload-tone-purple .lead-measurement-file-info a{color:#6d28d9}
.lead-upload-tone-amber{border-color:#fed7aa;background:#fff7ed}.lead-upload-tone-amber .lead-measurement-upload-head strong{color:#c2410c}.lead-upload-tone-amber .lead-measurement-upload-btn{border-color:#fdba74;color:#c2410c}.lead-upload-tone-amber .lead-measurement-upload-btn:hover,.lead-upload-tone-amber .lead-measurement-dropzone:hover{background:#ffedd5}.lead-upload-tone-amber .lead-measurement-dropzone{border-color:#fdba74}.lead-upload-tone-amber .lead-measurement-dropzone strong,.lead-upload-tone-amber .lead-measurement-file-info a{color:#c2410c}
@media(max-width:800px){.lead-supporting-upload-grid{grid-template-columns:1fr}}

/* ---------- JobWork Pricing (v90) ---------- */
.jobwork-pricing-shell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .95rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / .04);
  overflow: hidden;
}
.jobwork-pricing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #edf1f5;
}
.jobwork-pricing-head h3 { margin: 0; color: #0f172a; font-size: 1rem; font-weight: 700; }
.jobwork-pricing-head p { margin: .2rem 0 0; color: #64748b; font-size: .75rem; max-width: 760px; }
.jobwork-pricing-source {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin: 1rem 1.1rem;
  padding: .75rem .9rem;
  border: 1px solid #dbeafe;
  border-radius: .7rem;
  background: #f8fbff;
  font-size: .75rem;
}
.jobwork-pricing-source > div:first-child { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.jobwork-pricing-source span { color: #64748b; font-size: .66rem; }
.jobwork-pricing-source strong { color: #172033; overflow-wrap: anywhere; }
.jobwork-pricing-source a { margin-left: auto; color: #2563eb; font-weight: 600; }
.jobwork-pricing-source .pricing-updated { width: 100%; color: #94a3b8; font-size: .67rem; }
.jobwork-pricing-shell > .direct-note { margin-left: 1.1rem; margin-right: 1.1rem; }
.jobwork-pricing-table-wrap { overflow-x: auto; border-top: 1px solid #edf1f5; border-bottom: 1px solid #edf1f5; }
.jobwork-pricing-table { width: 100%; min-width: 800px; border-collapse: collapse; }
.jobwork-pricing-table th {
  padding: .65rem .7rem;
  background: #f8fafc;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .65rem;
  text-align: left;
  white-space: nowrap;
}
.jobwork-pricing-table td { padding: .42rem .5rem; border-top: 1px solid #f1f5f9; }
.jobwork-pricing-table input {
  width: 100%;
  min-height: 2.1rem;
  border: 1px solid #dce4ed;
  border-radius: .48rem;
  background: #fff;
  color: #172033;
  padding: .42rem .52rem;
  font-size: .76rem;
  outline: none;
}
.jobwork-pricing-table input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgb(147 197 253 / .15); }
.jobwork-pricing-table input:disabled { border-color: transparent; background: transparent; color: #334155; opacity: 1; }
.jobwork-pricing-table th:nth-child(1) { min-width: 240px; }
.jobwork-pricing-table th:nth-child(2) { width: 120px; }
.jobwork-pricing-table th:nth-child(3) { width: 100px; }
.jobwork-pricing-table th:nth-child(4),
.jobwork-pricing-table th:nth-child(5) { width: 145px; }
.pricing-row-action { width: 42px; text-align: center; }
.pricing-row-action button { width: 1.8rem; height: 1.8rem; border: 0; border-radius: .45rem; background: #fff1f2; color: #e11d48; font-size: 1.05rem; line-height: 1; }
.jobwork-pricing-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}
.jobwork-pricing-totals { width: min(100%, 360px); display: flex; flex-direction: column; gap: .45rem; }
.jobwork-pricing-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .78rem; color: #64748b; }
.jobwork-pricing-totals strong { color: #172033; }
.jobwork-pricing-totals input { width: 58px; border: 1px solid #dce4ed; border-radius: .4rem; padding: .22rem .35rem; font-size: .72rem; margin-left: .2rem; }
.jobwork-pricing-totals .grand { margin-top: .25rem; padding-top: .55rem; border-top: 1px solid #cbd5e1; color: #0f172a; font-size: .88rem; font-weight: 700; }
.jobwork-pricing-totals .grand strong { font-size: 1rem; }
.jobwork-pricing-savebar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: .8rem 1.1rem 1rem;
  color: #64748b;
  font-size: .72rem;
}
.jobwork-pricing-history { border-top: 1px solid #edf1f5; padding: 1rem 1.1rem; }
.jobwork-pricing-history h4 { margin: 0 0 .55rem; font-size: .8rem; color: #334155; font-weight: 700; }
.jobwork-pricing-history a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .65rem; border-radius: .55rem; color: #334155; font-size: .74rem; }
.jobwork-pricing-history a:hover { background: #f8fafc; }
.jobwork-pricing-history small { color: #94a3b8; white-space: nowrap; }
@media (max-width: 760px) {
  .jobwork-pricing-head, .jobwork-pricing-footer, .jobwork-pricing-savebar { flex-direction: column; align-items: stretch; }
  .jobwork-pricing-totals { width: 100%; }
  .jobwork-pricing-source a { margin-left: 0; }
}

/* ---------- Lead -> JobWork Pricing attachment/read summary (v90 complete) ---------- */
.lead-pricing-upload-head{margin-top:1rem;padding-top:.75rem;border-top:1px solid #edf1f5}
.lead-upload-tone-green{border-color:#bbf7d0;background:#f0fdf4}.lead-upload-tone-green .lead-measurement-upload-head strong{color:#15803d}.lead-upload-tone-green .lead-measurement-upload-btn{border-color:#86efac;color:#15803d}.lead-upload-tone-green .lead-measurement-upload-btn:hover,.lead-upload-tone-green .lead-measurement-dropzone:hover{background:#dcfce7}.lead-upload-tone-green .lead-measurement-dropzone{border-color:#86efac}.lead-upload-tone-green .lead-measurement-dropzone strong,.lead-upload-tone-green .lead-measurement-file-info a{color:#15803d}
.lead-pricing-read-summary{margin-top:.55rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem;padding:.65rem;border:1px solid #d1fae5;border-radius:.65rem;background:#ecfdf5}.lead-pricing-read-summary>div{display:flex;flex-direction:column;gap:.08rem;padding:.38rem .45rem;border-radius:.48rem;background:rgb(255 255 255 / .72)}.lead-pricing-read-summary span{font-size:.58rem;color:#64748b;text-transform:uppercase;letter-spacing:.025em}.lead-pricing-read-summary strong{font-size:.78rem;color:#166534}.lead-pricing-read-summary .grand strong{font-size:.86rem}.lead-pricing-read-summary>small{grid-column:1/-1;color:#64748b;font-size:.62rem;line-height:1.35}.lead-pricing-read-warning{margin-top:.55rem;padding:.6rem .7rem;border:1px solid #fde68a;border-radius:.6rem;background:#fffbeb;color:#92400e;font-size:.65rem;line-height:1.4}
@media(max-width:800px){.lead-pricing-read-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.lead-pricing-read-summary{grid-template-columns:1fr}}
.lead-upload-viewonly{font-size:.62rem;color:#94a3b8;font-weight:600;padding:.35rem .5rem;border-radius:.4rem;background:#f8fafc;border:1px solid #e2e8f0;white-space:nowrap}.lead-measurement-dropzone.is-viewonly{cursor:default;background:#f8fafc;border-color:#e2e8f0;color:#94a3b8}.lead-measurement-dropzone.is-viewonly strong{color:#64748b}

/* ---------- JobWork Pricing full-table PDF read fix (v91) ---------- */
.jobwork-pricing-source-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.jobwork-pricing-source-actions a,
.jobwork-pricing-source-actions button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: .72rem;
  font-weight: 650;
  padding: .3rem .35rem;
  cursor: pointer;
  white-space: nowrap;
}
.jobwork-pricing-source-actions button {
  border-left: 1px solid #dbeafe;
  padding-left: .7rem;
}
.jobwork-pricing-source-actions button:hover,
.jobwork-pricing-source-actions a:hover { color: #1d4ed8; }
.jobwork-pricing-source-actions button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 640px) {
  .jobwork-pricing-source-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
}
.jobwork-pricing-history-row { display:flex; align-items:center; gap:.5rem; }
.jobwork-pricing-history-row > a { flex:1; min-width:0; }
.jobwork-pricing-history-row > button {
  border:1px solid #dbeafe;
  border-radius:.5rem;
  background:#f8fbff;
  color:#2563eb;
  padding:.42rem .6rem;
  font-size:.68rem;
  font-weight:650;
  white-space:nowrap;
}
.jobwork-pricing-history-row > button:hover { background:#eff6ff; }
.jobwork-pricing-history-row > button:disabled { opacity:.55; cursor:wait; }

/* ---------- Compact JobWork Pricing + board analytics (v93) ---------- */
.jobwork-pricing-compact .jobwork-pricing-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:0;
  align-items:start;
}
.jobwork-pricing-main{min-width:0;border-right:1px solid #edf1f5}
.jobwork-pricing-compact .jobwork-pricing-source{margin:.8rem .9rem}
.pricing-inline-note{margin:.75rem .9rem!important}
.jobwork-pricing-compact .jobwork-pricing-table{min-width:720px}
.jobwork-pricing-compact .jobwork-pricing-table th:nth-child(1){min-width:200px}
.jobwork-pricing-compact .compact-savebar{padding:.8rem .9rem;justify-content:flex-start;border-top:0}
.compact-savebar .pricing-save-copy{margin-left:auto;color:#64748b;font-size:.68rem}
.jobwork-pricing-compact .compact-history{padding:.8rem .9rem}
.jobwork-pricing-side{position:sticky;top:1rem;padding:.9rem;background:#fbfdff;min-height:100%}
.pricing-side-title{font-size:.78rem;font-weight:750;color:#334155;margin-bottom:.65rem}
.pricing-highlight{padding:.9rem;border:1px solid #bfdbfe;border-radius:.75rem;background:#eff6ff;display:flex;flex-direction:column;gap:.18rem}
.pricing-highlight span{font-size:.64rem;color:#64748b;text-transform:uppercase;letter-spacing:.025em}
.pricing-highlight strong{font-size:1.35rem;line-height:1.1;color:#1d4ed8}
.pricing-highlight small{font-size:.58rem;color:#64748b}
.pricing-side-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:.65rem 0}
.pricing-side-grid>div{padding:.65rem;border:1px solid #e2e8f0;border-radius:.65rem;background:#fff;display:flex;flex-direction:column;gap:.12rem;min-width:0}
.pricing-side-grid span{font-size:.59rem;color:#64748b;text-transform:uppercase;letter-spacing:.02em}
.pricing-side-grid strong{font-size:.84rem;color:#172033;overflow-wrap:anywhere}
.pricing-side-grid small{font-size:.54rem;color:#94a3b8;line-height:1.25}
.side-totals{width:100%;margin-top:.7rem;padding-top:.7rem;border-top:1px solid #dbe4ee}
@media(max-width:1120px){
  .jobwork-pricing-compact .jobwork-pricing-layout{grid-template-columns:1fr}
  .jobwork-pricing-main{border-right:0}
  .jobwork-pricing-side{position:static;border-top:1px solid #edf1f5}
  .pricing-side-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:760px){.pricing-side-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-savebar .pricing-save-copy{margin-left:0}}

/* ---------- PDF Cutlist auto-import (v93) ---------- */
.cutlist-import-shell{background:#fff;border:1px solid #e2e8f0;border-radius:.95rem;box-shadow:0 1px 2px rgb(15 23 42 / .04);overflow:hidden}
.cutlist-import-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;border-bottom:1px solid #edf1f5}
.cutlist-import-head h3{margin:0;color:#0f172a;font-size:1rem;font-weight:700}
.cutlist-import-head p{margin:.2rem 0 0;color:#64748b;font-size:.74rem;max-width:760px}
.cutlist-head-actions{display:flex;gap:.55rem;align-items:center}
.cutlist-source-bar{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin:.8rem 1rem 0;padding:.7rem .8rem;border:1px solid #dbeafe;border-radius:.65rem;background:#f8fbff;font-size:.72rem}
.cutlist-source-bar>div:first-child{display:flex;flex-direction:column;gap:.08rem;min-width:0}
.cutlist-source-bar span{font-size:.6rem;color:#64748b;text-transform:uppercase;letter-spacing:.025em}
.cutlist-source-bar strong{color:#172033;overflow-wrap:anywhere}
.cutlist-source-actions{margin-left:auto;display:flex;align-items:center;gap:.45rem}
.cutlist-source-actions a,.cutlist-source-actions button{border:0;background:transparent;color:#2563eb;font-size:.68rem;font-weight:650;padding:.3rem;cursor:pointer;white-space:nowrap}
.cutlist-source-actions button{border-left:1px solid #dbeafe;padding-left:.65rem}
.cutlist-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;padding:.8rem 1rem}
.cutlist-kpis>div{padding:.65rem .7rem;border:1px solid #e2e8f0;border-radius:.65rem;background:#f8fafc;display:flex;flex-direction:column;gap:.08rem}
.cutlist-kpis span{font-size:.59rem;color:#64748b;text-transform:uppercase;letter-spacing:.025em}
.cutlist-kpis strong{font-size:.9rem;color:#172033}
.cutlist-preview-note{margin:0 1rem .75rem;padding:.65rem .75rem;border:1px solid #bbf7d0;border-radius:.65rem;background:#f0fdf4;color:#166534;font-size:.7rem}
.cutlist-import-table-wrap{overflow:auto;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5}
.cutlist-import-table{width:100%;min-width:1680px;border-collapse:collapse}
.cutlist-import-table th{padding:.6rem .5rem;background:#f8fafc;color:#64748b;text-transform:uppercase;letter-spacing:.025em;font-size:.61rem;text-align:left;white-space:nowrap}
.cutlist-import-table td{padding:.36rem .4rem;border-top:1px solid #f1f5f9}
.cutlist-import-table input{width:100%;min-height:2rem;border:1px solid #dce4ed;border-radius:.45rem;padding:.38rem .45rem;font-size:.72rem;color:#172033;background:#fff;outline:none}
.cutlist-import-table input:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgb(147 197 253 / .15)}
.cutlist-import-table th:nth-child(1){width:82px}.cutlist-import-table th:nth-child(2){width:120px}.cutlist-import-table th:nth-child(3){width:210px}.cutlist-import-table th:nth-child(4),.cutlist-import-table th:nth-child(5){width:105px}.cutlist-import-table th:nth-child(6){width:130px}.cutlist-import-table th:nth-child(7){width:85px}.cutlist-import-table th:nth-child(8){width:80px}.cutlist-import-table th:nth-child(9){width:130px}.cutlist-import-table th:nth-child(10){width:140px}.cutlist-import-table th:nth-child(11){width:110px}.cutlist-import-table th:nth-child(12){width:145px}.cutlist-import-table th:nth-child(13){width:90px}
.cutlist-preview-actions{display:flex;align-items:center;gap:.7rem;padding:.8rem 1rem}
.cutlist-save-hint{margin-left:auto;color:#64748b;font-size:.66rem}
@media(max-width:760px){.cutlist-import-head{flex-direction:column}.cutlist-head-actions{width:100%;flex-wrap:wrap}.cutlist-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cutlist-preview-actions{flex-direction:column;align-items:stretch}.cutlist-save-hint{margin-left:0}.cutlist-source-actions{width:100%;margin-left:0}}

/* ---------- CNC-routed Cutlist / Production stage (v96) ---------- */
.cutlist-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.cutlist-import-table{min-width:1760px}
.cutlist-import-table input,.cutlist-import-table select{width:100%;min-height:2rem;border:1px solid #dce4ed;border-radius:.45rem;padding:.38rem .45rem;font-size:.72rem;color:#172033;background:#fff;outline:none}
.cutlist-import-table input:focus,.cutlist-import-table select:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgb(147 197 253 / .15)}
.cutlist-import-table th:nth-child(7){width:68px}
@media(max-width:760px){.cutlist-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V98 — Board Lists / Pasting */
.board-list-shell{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:18px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.board-list-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.board-list-head h3{font-size:18px;font-weight:700;color:#0f172a;margin:0}
.board-list-head p{font-size:12px;color:#64748b;margin-top:4px;max-width:760px}
.board-list-table td{vertical-align:middle}
.board-list-thumb{width:190px;height:92px;object-fit:contain;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:4px}
.board-list-thumb-missing{width:190px;height:92px;display:flex;align-items:center;justify-content:center;border:1px dashed #fca5a5;border-radius:8px;background:#fff7f7;color:#b91c1c;font-size:11px}
.pasting-scan-card{padding:16px;border:1px solid #dbe3ec;border-radius:14px;background:#f8fafc}
.pasting-board-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px;margin-top:16px}
.pasting-board-card{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden;transition:.2s ease;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.pasting-board-card.is-pasted{border-color:#86efac;background:#f7fff9}
.pasting-board-card.just-scanned{box-shadow:0 0 0 3px rgba(34,197,94,.22),0 8px 24px rgba(15,23,42,.08);transform:translateY(-1px)}
.pasting-board-image{height:155px;border-bottom:1px solid #eef2f7;display:flex;align-items:center;justify-content:center;background:#fbfdff;padding:8px}
.pasting-board-image .board-list-thumb{width:100%;height:100%;border:0;padding:0;border-radius:0}
.pasting-board-image .board-list-thumb-missing{width:100%;height:100%}
.pasting-board-body{padding:13px 14px}
@media(max-width:720px){.board-list-thumb{width:145px;height:75px}.pasting-board-grid{grid-template-columns:1fr}}

/* V100 — Board Saving + separate Design hub */
.board-saving-panel{border-top:1px solid #e2e8f0;padding-top:16px}
.board-saving-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.board-saving-head h4{margin:0;font-size:15px;font-weight:750;color:#0f172a}
.board-saving-head p{margin:4px 0 0;max-width:820px;font-size:11px;line-height:1.45;color:#64748b}
.board-saving-total{min-width:160px;padding:10px 12px;border:1px solid #bbf7d0;border-radius:12px;background:#f0fdf4;display:flex;flex-direction:column;gap:2px}
.board-saving-total span{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#15803d}
.board-saving-total strong{font-size:18px;color:#166534}
.board-saving-note{margin-top:10px;padding:9px 11px;border:1px solid #fde68a;border-radius:10px;background:#fffbeb;color:#92400e;font-size:11px}
.board-saving-subtitle{margin:15px 0 8px;font-size:11px;font-weight:750;color:#475569;text-transform:uppercase;letter-spacing:.04em}
.board-saving-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.board-saving-card{padding:13px;border:1px solid #dbeafe;border-radius:13px;background:#fbfdff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.board-saving-card.is-planned{border-color:#c4b5fd;background:#faf5ff}
.board-saving-members{display:grid;gap:6px;margin-top:10px}
.board-saving-members>div{display:grid;grid-template-columns:90px minmax(0,1fr);column-gap:8px;row-gap:1px;padding:7px 8px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}
.board-saving-members span{font-size:11px;color:#334155}
.board-saving-members strong{font-size:11px;color:#0f172a;overflow-wrap:anywhere}
.board-saving-members small{grid-column:2;font-size:10px;color:#64748b}
.board-saving-meter{height:8px;margin:10px 0 5px;border-radius:999px;background:#e2e8f0;overflow:hidden}
.board-saving-meter>div{height:100%;border-radius:999px;background:#22c55e}
.design-hub-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:14px;border:1px solid #e2e8f0;border-radius:13px;background:#fff;color:#0f172a;text-decoration:none;box-shadow:0 1px 2px rgba(15,23,42,.03);transition:.15s ease}
.design-hub-card:hover{border-color:#93c5fd;background:#f8fbff;transform:translateY(-1px)}
.design-hub-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#eff6ff;font-size:20px}
.design-hub-card strong{display:block;font-size:13px}
.design-hub-card p{margin:3px 0 0;font-size:11px;color:#64748b}
.design-hub-card>span{font-size:11px;color:#2563eb;font-weight:650}
@media(max-width:720px){.board-saving-grid{grid-template-columns:1fr}.board-saving-members>div{grid-template-columns:1fr}.board-saving-members small{grid-column:1}.board-saving-total{width:100%}}

/* V102 — cross-list board saving / manual Cut & Paste move */
.board-saving-move-note{margin-top:8px;padding:7px 9px;border:1px solid #fed7aa;border-radius:8px;background:#fff7ed;color:#9a3412;font-size:10px;font-weight:600}


.board-thumb-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.board-thumb-saved-flag{position:absolute;right:4px;bottom:4px;background:#111;color:#fff;font-size:10px;line-height:1;padding:3px 5px;border-radius:999px;font-weight:700}.board-thumb-wrap.has-saved-board .board-list-thumb{outline:2px dashed #111;outline-offset:2px}


.merged-board-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;min-width:260px;max-width:420px}.merged-board-segment{position:relative;min-height:100px;border:1px solid #cbd5e1;background:#fff;overflow:hidden}.merged-board-segment img{width:100%;height:100px;object-fit:contain;display:block}.merged-board-segment .merged-hatch{position:absolute;inset:0;border:2px dashed #111;background:repeating-linear-gradient(135deg,transparent 0 12px,rgba(0,0,0,.18) 12px 14px);pointer-events:none}.merged-board-caption{position:absolute;left:3px;right:3px;bottom:3px;background:rgba(255,255,255,.94);border:1px solid #111;padding:3px 4px;line-height:1.05}.merged-board-caption span{display:block;font:700 10px ui-monospace,SFMono-Regular,Menlo,monospace}.merged-board-caption strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.saving-plan-merged-row{background:#fafafa}

.board-saving-member-card{display:grid;grid-template-columns:88px 1fr;gap:10px;align-items:start}.board-saving-member-thumb{width:88px;height:66px;border:1px solid #d9dde3;border-radius:10px;overflow:hidden;background:#fff;display:flex;align-items:center;justify-content:center}.board-saving-member-thumb img{width:100%;height:100%;object-fit:contain}.board-saving-fit-summary{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px}

/* V112 — CutList-driven Procurement */
.proc-auto-summary{border:1px solid #dbe4ee;border-radius:16px;background:#fff;padding:16px}
.proc-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.proc-kpi{border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:3px;min-height:86px}
.proc-kpi.is-primary{background:#f0fdf4;border-color:#bbf7d0}
.proc-kpi>span{font-size:11px;color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.proc-kpi>strong{font-size:25px;line-height:1.1;color:#0f172a}.proc-kpi>strong small{font-size:12px;font-weight:700;color:#64748b}.proc-kpi>small{font-size:11px;color:#64748b}
.proc-auto-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:12px}
.proc-auto-box{border:1px solid #dbe4ee;border-radius:12px;overflow:hidden;background:#fff}
.proc-auto-title{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:#ecfeff;border-bottom:1px solid #cbd5e1}.proc-auto-title span{font-size:10px;font-weight:800;color:#475569;text-transform:uppercase}
.proc-auto-box table th{padding:7px 10px;background:#f8fafc;color:#64748b;font-size:11px;text-align:left}.proc-auto-box table td{padding:8px 10px;border-top:1px solid #eef2f7;vertical-align:middle}.proc-auto-box table td small{display:block;color:#94a3b8;font-size:10px;margin-top:2px}
.proc-raw-breakdown{padding:10px 12px;background:#f8fafc;border-top:1px solid #e2e8f0;font-size:12px}.proc-raw-breakdown>strong{display:block;margin-bottom:7px}.proc-raw-breakdown>div{display:flex;justify-content:space-between;gap:12px;padding:3px 0}.proc-total-row{margin-top:6px;padding-top:7px!important;border-top:1px solid #cbd5e1;font-size:13px}
.proc-rule-note{font-size:11px;line-height:1.45;color:#475569;background:#f8fafc;border-top:1px solid #e2e8f0;padding:10px 12px}.proc-auto-badge{font-size:9px;font-weight:800;letter-spacing:.04em;border-radius:999px;padding:2px 6px;background:#e0f2fe;color:#0369a1}
@media(max-width:900px){.proc-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.proc-auto-grid{grid-template-columns:1fr}}
.proc-surface-box{border:1px solid #dbe4ee;border-radius:12px;overflow:hidden;background:#fff}.proc-surface-table th{padding:8px 10px;background:#f8fafc;color:#64748b;font-size:11px;text-align:left}.proc-surface-table td{padding:8px 10px;border-top:1px solid #eef2f7;vertical-align:middle}.proc-surface-table td small{display:block;color:#94a3b8;font-size:10px;margin-top:2px}.proc-surface-table input{min-width:130px}.proc-total-row{display:flex;justify-content:space-between;gap:12px;padding:9px 10px;border-top:1px solid #e2e8f0;background:#f8fafc}.proc-total-row b{font-weight:800}.proc-auto-title>div span{display:block;text-transform:none!important;font-weight:400!important;letter-spacing:0!important}@media(max-width:900px){.proc-surface-table{min-width:760px}.proc-surface-box{overflow-x:auto}}


/* V118 Job Tracker home */
.job-tracker-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.job-tracker-summary-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px 16px;box-shadow:0 1px 2px rgba(15,23,42,.04)}.job-tracker-summary-card span{display:block;font-size:11px;color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.03em}.job-tracker-summary-card strong{display:block;font-size:25px;line-height:1.15;color:#0f172a;margin-top:5px}.job-tracker-summary-card small{display:block;font-size:11px;color:#94a3b8;margin-top:4px}.job-tracker-stage-summary{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:16px}.job-tracker-stage-summary>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px;text-align:center}.job-tracker-stage-summary span{display:block;font-size:11px;color:#64748b}.job-tracker-stage-summary strong{display:block;font-size:19px;color:#0f172a}.job-tracker-stage-summary small{font-size:10px;color:#94a3b8}.pasting-queue-shell{background:#fff;border:1px solid #dbe4ef;border-radius:16px;padding:16px;margin-bottom:18px}.pasting-queue-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:13px}.pasting-queue-head h3{font-weight:750;color:#0f172a}.pasting-queue-head p{font-size:12px;color:#64748b;margin-top:3px}.queue-ok,.queue-warning{font-size:11px;font-weight:800;border-radius:999px;padding:6px 10px;white-space:nowrap}.queue-ok{background:#dcfce7;color:#166534}.queue-warning{background:#fef3c7;color:#92400e}.pasting-queue-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pasting-queue-card{border:1px solid #e2e8f0;border-radius:14px;padding:14px;background:#fbfdff}.pasting-slot-label{font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.pasting-slot-project{display:flex;align-items:baseline;gap:9px;margin:5px 0 10px}.pasting-slot-project strong{font-size:16px;color:#0f172a}.pasting-slot-project span{font-size:12px;color:#64748b}.pasting-slot-stats{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font-size:11px;color:#64748b}.pasting-slot-stats b{color:#0f172a}.pasting-slot-actions{margin-top:12px}.pasting-slot-select{display:flex;gap:8px;margin-top:12px;border-top:1px solid #e2e8f0;padding-top:12px}.pasting-slot-select select{flex:1;min-width:0}.job-tracker-flow{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.job-tracker-flow span{border:1px solid #e2e8f0;border-radius:7px;padding:4px 3px;text-align:center;background:#fff;min-width:0}.job-tracker-flow span b{display:block;font-size:8px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.job-tracker-flow span small{display:block;font-size:8px;color:#94a3b8}.job-tracker-flow span.is-done{background:#f0fdf4;border-color:#bbf7d0}.job-tracker-flow span.is-current{outline:2px solid #94a3b8;outline-offset:1px}.job-tracker-progress-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.job-tracker-progress-top strong{font-size:12px;color:#0f172a}.job-tracker-progress-top span{font-size:10px;color:#64748b}.job-tracker-progress-track{height:6px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-top:5px}.job-tracker-progress-track i{display:block;height:100%;background:#64748b;border-radius:999px}.job-tracker-table td{vertical-align:middle;padding-top:9px;padding-bottom:9px}@media(max-width:1100px){.job-tracker-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.job-tracker-stage-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.pasting-queue-grid{grid-template-columns:1fr}}@media(max-width:640px){.job-tracker-summary{grid-template-columns:1fr}.job-tracker-stage-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

.edgecalc-shell{width:100%;max-width:100%;margin:0;background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;box-sizing:border-box}.edgecalc-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:20px 22px;border-bottom:1px solid #e2e8f0}.edgecalc-head>div:first-child{min-width:0;flex:1}.edgecalc-head>div:last-child{flex:0 0 auto;display:flex;gap:8px;align-items:center;white-space:nowrap}.edgecalc-head h3{font-size:18px;font-weight:800;color:#0f172a}.edgecalc-head p{margin-top:4px;max-width:1000px;font-size:12px;line-height:1.55;color:#64748b}.edgecalc-totals{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 4px}.edgecalc-totals span{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:6px 10px;font-size:12px;color:#334155}.edgecalc-shell .cutlist-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;padding:1rem 1.1rem}.edgecalc-shell .cutlist-kpis>div{min-height:66px;justify-content:center}.edgecalc-shell .lead-table-wrap{width:100%;max-width:100%;overflow-x:auto}.edgecalc-table{width:100%;min-width:980px;border-collapse:collapse;table-layout:auto}.edgecalc-table th{padding:12px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:#64748b;white-space:nowrap}.edgecalc-table td{padding:14px 16px;border-bottom:1px solid #f1f5f9;vertical-align:top}.edgecalc-table th:nth-child(1),.edgecalc-table td:nth-child(1){width:18%}.edgecalc-table th:nth-child(2),.edgecalc-table td:nth-child(2){width:19%}.edgecalc-table th:nth-child(3),.edgecalc-table td:nth-child(3){width:15%}.edgecalc-table th:nth-child(4),.edgecalc-table td:nth-child(4){width:35%}.edgecalc-table th:nth-child(5),.edgecalc-table td:nth-child(5){width:13%}.edgecalc-table td small{display:block;margin-top:3px;font-size:11px;color:#94a3b8}.edge-match-view strong{color:#0f172a}.edge-match-view span{color:#475569}.edge-match-edit{display:grid;grid-template-columns:minmax(180px,1fr) minmax(150px,.8fr);gap:8px}.edge-match-edit input{width:100%;min-width:0;box-sizing:border-box}.edge-match-edit small{grid-column:1/-1}.edge-suggestion{color:#0369a1!important}.edgecalc-note{margin:14px 22px 20px;padding:11px 13px;border:1px solid #dbeafe;background:#f8fbff;border-radius:10px;font-size:11px;color:#475569}@media(max-width:900px){.edgecalc-head{flex-direction:column}.edgecalc-head>div:last-child{width:100%;flex-wrap:wrap}.edge-match-edit{grid-template-columns:1fr}.edgecalc-shell .cutlist-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V122 EdgeBand alignment correction */
.edgecalc-head-actions{display:flex;gap:8px;align-items:center;flex:0 0 auto;white-space:nowrap}
#edgeCalcEditBtn,#edgeCalcSaveBtn,#edgeCalcCancelBtn{min-width:104px;justify-content:center}
.edgecalc-shell .lead-table-wrap{margin-left:0;margin-right:0}
@media(min-width:901px){.edgecalc-shell{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}}

.item-list-section{width:75%;max-width:1500px;margin:0;background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden}.item-list-head{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.item-list-head h3{font-size:18px;font-weight:750;color:#0f172a;margin:0 0 2px}.item-list-head p{font-size:13px;color:#64748b;max-width:820px;line-height:1.35;margin:0}.item-list-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:9px 10px}.item-list-kpi{margin:0;border:1px solid #e2e8f0;background:#f8fafc;border-radius:9px;padding:7px 10px;min-height:50px}.item-list-kpi span{display:block;font-size:11px;letter-spacing:.035em;text-transform:uppercase;color:#64748b;line-height:1.1}.item-list-kpi strong{display:block;margin-top:2px;font-size:18px;line-height:1.1;color:#0f172a}.item-list-table-wrap{padding:0 10px 10px}.item-list-table{border-collapse:separate;border-spacing:0;border:1px solid #e2e8f0;border-radius:9px;overflow:hidden;table-layout:auto}.item-list-table th{padding:8px 9px;background:#f1f5f9;color:#475569;font-size:11px;text-transform:uppercase;letter-spacing:.025em;text-align:left;border-bottom:1px solid #e2e8f0;white-space:nowrap}.item-list-table td{padding:7px 9px;border-bottom:1px solid #eef2f7;color:#0f172a;vertical-align:middle;font-size:14px;line-height:1.28}.item-list-table tr:last-child td{border-bottom:0}.assembly-id-cell{width:80px}.assembly-comment-cell{font-size:12px!important;line-height:1.3!important;color:#64748b!important;max-width:340px;white-space:normal}.item-dimension-input{width:94px;max-width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:6px 8px;background:#fff;color:#0f172a;font-size:14px}.item-dimension-input:focus{outline:2px solid #bfdbfe;border-color:#93c5fd}@media(max-width:1100px){.item-list-section{width:100%}}@media(max-width:700px){.item-list-kpis{grid-template-columns:1fr}.item-list-head{align-items:flex-start;flex-direction:column}.item-list-section{width:100%}}

/* V130: readability scale — keep the application comfortable on large desktop displays. */
.search-wrap input{font-size:.9rem}
.search-icon{font-size:.9rem}
.search-hit-title{font-size:.9rem}.search-hit-sub{font-size:.8rem}.search-hit-empty{font-size:.88rem}
.topbar-date{font-size:.82rem}
.dropdown-header{font-size:.78rem}.dropdown-item{font-size:.9rem}.dropdown-item-sub{font-size:.76rem}
.stat-card-label{font-size:.76rem}.stat-card-trend{font-size:.8rem}
.doc-card-title{font-size:.95rem}.doc-card-desc{font-size:.82rem}
.prod-part-name{font-size:.88rem}.prod-part-meta{font-size:.78rem}.prod-part-sub{font-size:.76rem}.prod-part-barcode{font-size:.7rem}


/* V131 — keep all project tabs visible + another 5% readability increase */
.project-tab-nav{display:flex;flex-wrap:wrap;align-items:center;gap:2px 4px;border-bottom:1px solid #e2e8f0;margin-bottom:24px;overflow:visible;width:100%;}
.project-tab-nav>a{flex:0 0 auto;white-space:nowrap;font-size:15.75px!important;line-height:1.35;padding-left:11px!important;padding-right:11px!important;}
@media(max-width:900px){.project-tab-nav{gap:1px 2px}.project-tab-nav>a{font-size:14.7px!important;padding-left:8px!important;padding-right:8px!important;}}

.room-sft-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:9px 10px 10px;margin:0;}
@media(max-width:560px){.room-sft-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:7px 6px}.room-sft-kpis .item-list-kpi{padding:6px}.room-sft-kpis .item-list-kpi span{font-size:9px}.room-sft-kpis .item-list-kpi strong{font-size:15px}}

/* +5% over V130. Rem-based utility text and inherited app copy both increase. */
html{font-size:16.8px;}
body{font-size:17.85px;}
.text-xs{font-size:13.65px;line-height:1.155rem;}
.text-sm{font-size:15.75px;line-height:1.4175rem;}
.text-lg{font-size:1.18125rem;}
.item-list-head h3{font-size:18.9px}.item-list-head p{font-size:13.65px}.item-list-kpi span{font-size:11.55px}.item-list-kpi strong{font-size:18.9px}.item-list-table th{font-size:11.55px}.item-list-table td{font-size:14.7px}.assembly-comment-cell{font-size:12.6px!important}.item-dimension-input{font-size:14.7px}

.settings-subtabs{display:flex;gap:6px;margin:0 0 14px;border-bottom:1px solid #e2e8f0;padding:0 2px}.settings-subtabs a{padding:9px 15px;border-bottom:2px solid transparent;color:#64748b;font-weight:600}.settings-subtabs a.active{color:#0f172a;border-bottom-color:#3b82f6}.settings-pricing-shell{max-width:1180px}.settings-pricing-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}.settings-pricing-head h3{font-size:1.08rem;font-weight:700}.settings-pricing-head p{font-size:.9rem;color:#64748b;margin-top:3px}.pricing-master-gst{display:flex;gap:12px;align-items:end;margin:0 0 12px}.pricing-master-gst label{font-size:.8rem;color:#64748b;font-weight:600}.pricing-master-gst input{display:block;width:88px;border:1px solid #cbd5e1;border-radius:8px;padding:7px 9px;margin-top:3px;background:#fff}.pricing-master-gst span{font-size:.8rem;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:999px;padding:6px 10px}.pricing-master-table{width:100%;border-collapse:collapse}.pricing-master-table th{background:#f8fafc;color:#64748b;text-align:left;font-size:.76rem;padding:9px 10px;border-bottom:1px solid #e2e8f0}.pricing-master-table td{padding:8px 10px;border-bottom:1px solid #eef2f7;font-size:.9rem}.pricing-master-table td:nth-child(1){width:150px}.pricing-master-table td:nth-child(2){min-width:330px}.pricing-master-table td:nth-child(3){width:145px}.pricing-master-table td:nth-child(4){width:105px}.pricing-master-table td:nth-child(5){width:120px}.pricing-master-table input[type=text],.pricing-master-table input:not([type]){width:100%;min-width:0;border:1px solid #cbd5e1;border-radius:7px;padding:7px 8px;background:#fff}.pricing-master-table input[type=number]{width:110px;border:1px solid #cbd5e1;border-radius:7px;padding:7px 8px;background:#fff}.pricing-master-table input[type=checkbox]{width:16px;height:16px}

/* V138 automatic EdgeBand pricing */
.pricing-edgeband-box{margin:12px 0 14px;border:1px solid #d8e2ef;border-radius:12px;background:#fff;overflow:hidden}.pricing-edgeband-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 13px;background:#f5f9ff;border-bottom:1px solid #d8e2ef}.pricing-edgeband-head>div{display:flex;flex-direction:column;gap:2px}.pricing-edgeband-head small{font-size:.78em;color:#64748b}.pricing-edgeband-table{width:100%;border-collapse:collapse;font-size:.92em}.pricing-edgeband-table th{background:#f8fafc;color:#64748b;font-size:.78em;text-transform:uppercase;letter-spacing:.03em;text-align:left;padding:8px 10px;border-bottom:1px solid #e2e8f0}.pricing-edgeband-table td{padding:9px 10px;border-bottom:1px solid #eef2f7;vertical-align:middle}.pricing-edgeband-table td small{display:block;color:#64748b;margin-top:2px}.pricing-edge-select{width:100%;min-width:220px;border:1px solid #cbd5e1;border-radius:8px;padding:7px 9px;background:#fff}.pricing-edgeband-rule{padding:8px 12px;font-size:.8em;color:#64748b;background:#fafcff}

/* ---------- JobWork Pricing compact top layout + right-side EdgeBand selector (v144) ---------- */
.jobwork-pricing-v144{overflow:visible}
.pricing-v144-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.65rem .8rem;border-bottom:1px solid #e5e7eb;background:#fff}
.pricing-v144-head h3{margin:0;font-size:.98rem;font-weight:750;color:#0f172a}
.pricing-v144-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.pricing-v144-top{display:grid;grid-template-columns:minmax(0,72%) minmax(260px,28%);align-items:start;border-bottom:1px solid #e5e7eb}
.pricing-v144-jobwork{min-width:0;border-right:1px solid #e5e7eb}
.pricing-v144-edge-panel{min-width:0;background:#fbfdff}
.pricing-v144-section-title{padding:.5rem .65rem;background:#f8fafc;border-bottom:1px solid #e5e7eb;color:#334155;font-size:.72rem;font-weight:750;text-transform:uppercase;letter-spacing:.035em}
.pricing-v144-table-wrap{border-top:0;overflow:auto;max-height:60vh}
.jobwork-pricing-table.pricing-v144-table{min-width:650px;table-layout:fixed}
.pricing-v144-table th{padding:.36rem .4rem;font-size:.6rem}
.pricing-v144-table td{padding:.2rem .3rem}
.pricing-v144-table input{min-height:1.65rem;padding:.24rem .35rem;font-size:.7rem;border-radius:.38rem}
.pricing-v144-table th:nth-child(1),.pricing-v144-table td:nth-child(1){width:30%;min-width:0}
.pricing-v144-table th:nth-child(2),.pricing-v144-table td:nth-child(2){width:11%}
.pricing-v144-table th:nth-child(3),.pricing-v144-table td:nth-child(3){width:10%}
.pricing-v144-table th:nth-child(4),.pricing-v144-table td:nth-child(4){width:14%}
.pricing-v144-table th:nth-child(5),.pricing-v144-table td:nth-child(5){width:16%}
.pricing-v144-table .pricing-row-action{width:44px}
.pricing-v144-savebar{display:flex;align-items:center;justify-content:space-between;padding:.5rem .6rem;border-top:1px solid #edf1f5}
.pricing-v144-edge-list{display:flex;flex-direction:column;gap:0}
.pricing-v144-edge-row{display:grid;grid-template-columns:minmax(110px,.9fr) minmax(145px,1.1fr);gap:.45rem;align-items:center;padding:.5rem .6rem;border-bottom:1px solid #edf1f5}
.pricing-v144-edge-label{min-width:0;display:flex;flex-direction:column;gap:.06rem}
.pricing-v144-edge-label strong{font-size:.68rem;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pricing-v144-edge-label small{font-size:.58rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pricing-edge-select.pricing-v144-edge-select{min-width:0;width:100%;padding:.34rem .42rem;font-size:.65rem;border-radius:.42rem}
.pricing-v144-edge-readonly{font-size:.66rem;color:#334155}
.pricing-v144-edge-empty{padding:.8rem;color:#94a3b8;font-size:.68rem}
.pricing-v144-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;padding:.65rem .75rem;background:#fff}
.pricing-v144-summary-cell{border:1px solid #dbe4ee;border-radius:.55rem;padding:.55rem .65rem;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-width:0}
.pricing-v144-summary-cell span{font-size:.68rem;color:#475569;font-weight:650;white-space:nowrap}
.pricing-v144-summary-cell strong{font-size:.86rem;color:#0f172a;white-space:nowrap}
.pricing-v144-summary-cell input{width:44px;margin-left:.18rem;border:1px solid #cbd5e1;border-radius:.32rem;padding:.15rem .22rem;font-size:.66rem;text-align:center;background:#fff}
.pricing-v144-summary-cell.total{background:#e8f3fb;border-color:#b8d9ef}
.pricing-v144-summary-cell.total span{font-weight:800;color:#0f172a}
.pricing-v144-summary-cell.total strong{font-size:1rem;font-weight:800;color:#0f172a}
@media(max-width:1180px){.pricing-v144-top{grid-template-columns:1fr}.pricing-v144-jobwork{border-right:0}.pricing-v144-edge-panel{border-top:1px solid #e5e7eb}.pricing-v144-edge-row{grid-template-columns:1fr 1fr}.pricing-v144-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pricing-v144-head{align-items:flex-start;flex-direction:column}.pricing-v144-edge-row{grid-template-columns:1fr}.pricing-v144-summary{grid-template-columns:1fr}}

/* ---------- JobWork Pricing readability + per-board metrics (v145) ---------- */
.jobwork-pricing-v144{font-size:1.05em}
.pricing-v144-head{padding:.72rem .88rem}
.pricing-v144-head h3{font-size:1.14rem}
.pricing-v144-section-title{font-size:.8rem;padding:.55rem .7rem}
.pricing-v144-table th{padding:.42rem .42rem;font-size:.7rem}
.pricing-v144-table td{padding:.24rem .32rem}
.pricing-v144-table input{min-height:1.8rem;padding:.28rem .38rem;font-size:.82rem}
.pricing-v144-table .pricing-row-action{width:30px;min-width:30px;max-width:30px;padding-left:.12rem;padding-right:.12rem;text-align:center}
.pricing-v144-table .pricing-row-action .proc-auto-badge{font-size:.48rem;padding:.08rem .18rem;line-height:1;border-radius:999px;letter-spacing:0}
.pricing-v144-table .pricing-row-action button{width:22px;height:22px;padding:0;line-height:20px}
.pricing-v144-edge-label strong{font-size:.76rem}
.pricing-v144-edge-label small{font-size:.66rem}
.pricing-edge-select.pricing-v144-edge-select{font-size:.73rem;padding:.38rem .44rem}
.pricing-v144-summary-cell span{font-size:.75rem}
.pricing-v144-summary-cell strong{font-size:.95rem}
.pricing-v144-summary-cell.total strong{font-size:1.08rem}
.pricing-v145-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.5rem;padding:.62rem .75rem .78rem;background:#fbfdff;border-top:1px solid #edf1f5}
.pricing-v145-metric{display:flex;flex-direction:column;gap:.18rem;padding:.5rem .58rem;border:1px solid #dbe4ee;border-radius:.5rem;background:#fff;min-width:0}
.pricing-v145-metric span{font-size:.66rem;color:#64748b;font-weight:650;white-space:nowrap}
.pricing-v145-metric strong{font-size:.9rem;color:#0f172a;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pricing-v145-metric.total{background:#eef7fd;border-color:#bfdcf0}
@media(max-width:1200px){.pricing-v145-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.pricing-v145-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ---------- V147 Job Tracker / Production layout cleanup ---------- */
.job-tracker-production-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px;padding:1px 0 3px}
.job-tracker-production-head h3{margin:0;font-size:1.02rem;font-weight:800;color:#0f172a;line-height:1.2}
.job-tracker-production-head p{margin:3px 0 0;font-size:.75rem;color:#64748b;line-height:1.35}
.job-tracker-production-head>span{font-size:.7rem;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:5px 9px;white-space:nowrap}
.pasting-priority-shell{margin-top:14px;padding:13px 14px}
.compact-priority-card{padding:11px 12px}.compact-priority-card .pasting-slot-project{margin:4px 0 6px}.compact-priority-card .pasting-slot-stats{margin-top:5px}.compact-priority-card .pasting-slot-select{margin-top:9px;padding-top:9px}
.job-tracker-table th{white-space:nowrap;vertical-align:middle}.job-tracker-table td{white-space:nowrap}.job-tracker-table td:nth-child(5){white-space:normal}

.project-production-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px}
.project-production-title{display:flex;align-items:center;gap:10px;min-width:0}.project-production-title h3{margin:0;font-size:1rem;line-height:1.2}.project-production-title p{margin:2px 0 0;line-height:1.3}
.project-overview-compact-grid>div{min-width:0}
.project-details-compact{padding:0}.project-details-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.project-customer-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px;margin-bottom:7px;border:1px solid #e5eaf0;border-radius:8px;background:#f8fafc;font-size:.76rem;color:#64748b}.project-customer-line a{font-size:.82rem}.project-customer-line span:not(:first-child)::before{content:'·';margin-right:8px;color:#cbd5e1}
.project-detail-compact-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 8px;font-size:.78rem}.project-detail-compact-form>div{min-width:0}.project-detail-compact-form label{display:block;font-size:.66rem!important;line-height:1.15;margin-bottom:2px}.project-detail-compact-form input,.project-detail-compact-form select{min-height:31px;padding:.32rem .45rem!important;font-size:.76rem}.project-detail-compact-form .timeline-preview{padding:5px 7px;font-size:.67rem;align-self:end;min-height:31px;display:flex;align-items:center}.project-detail-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:1px}.project-detail-actions button{font-size:.72rem!important;padding:.35rem .6rem!important}
.jobwork-timeline-summary.compact{padding:0}.jobwork-timeline-summary.compact .jobwork-timeline-summary-grid>div{padding:7px 8px}
@media(max-width:1100px){.project-detail-compact-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.project-detail-compact-form{grid-template-columns:1fr}.project-detail-actions{grid-column:1}}

.cutlist-import-head{align-items:center;padding:.78rem 1rem}.cutlist-import-head>div:first-child{min-width:0;flex:1}.cutlist-import-head h3{font-size:1.03rem}.cutlist-import-head p{max-width:900px;font-size:.72rem;line-height:1.35;margin-top:.18rem}.cutlist-head-actions{align-items:center;justify-content:flex-end;flex-shrink:0}.cutlist-kpis{padding:.6rem .75rem;gap:.45rem}.cutlist-kpis>div{min-height:58px;justify-content:center;padding:.5rem .6rem}.cutlist-current-table-wrap{padding:0 .7rem .7rem}.cutlist-current-table{table-layout:auto}.cutlist-current-table th{white-space:nowrap;padding:.52rem .55rem;vertical-align:middle}.cutlist-current-table td{padding:.5rem .55rem;vertical-align:middle}.cutlist-current-table td:first-child{min-width:150px}.cutlist-current-table svg{vertical-align:middle}.cutlist-import-table th,.cutlist-import-table td{vertical-align:middle}

.prod-scan-reject-grid{display:grid;grid-template-columns:minmax(0,78%) minmax(250px,22%);gap:12px;align-items:stretch}.prod-scan-reject-grid>div>div{height:100%;box-sizing:border-box}.prod-scan-form{display:grid;grid-template-columns:minmax(330px,1fr) 190px 230px auto auto;gap:9px;align-items:end}.prod-barcode-field{min-width:0}.prod-barcode-group{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:stretch}.prod-barcode-group input{padding:.72rem .9rem!important;min-height:46px}.prod-scanner-btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:106px;padding:0 11px;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#334155;font-size:.75rem;font-weight:700}.prod-scanner-btn .ui-icon{width:17px;height:17px}.prod-stage-field select{width:190px;min-height:43px}.prod-operator-field select{width:230px;min-height:43px}.prod-override-field{display:flex;align-items:center;gap:5px;font-size:.69rem;color:#64748b;white-space:nowrap;padding-bottom:11px}.prod-record-btn{min-height:43px;white-space:nowrap}.prod-reject-card .section-heading{margin-bottom:7px}.prod-reject-form{display:grid;grid-template-columns:1fr;gap:7px}.prod-reject-form input,.prod-reject-form select{width:100%;min-width:0;box-sizing:border-box}.prod-reject-form button{justify-content:center}.prod-reject-card p{display:none}
@media(max-width:1300px){.prod-scan-reject-grid{grid-template-columns:1fr}.prod-scan-form{grid-template-columns:minmax(260px,1fr) 180px 210px auto}.prod-record-btn{grid-column:auto}.prod-reject-form{grid-template-columns:1fr 1fr auto auto;align-items:end}}
@media(max-width:900px){.prod-scan-form{grid-template-columns:1fr 1fr}.prod-barcode-field{grid-column:1/-1}.prod-stage-field select,.prod-operator-field select{width:100%}.prod-override-field{padding-bottom:0}.prod-record-btn{width:100%}.prod-reject-form{grid-template-columns:1fr 1fr}.prod-reject-form button{width:100%}}
@media(max-width:600px){.prod-scan-form,.prod-reject-form{grid-template-columns:1fr}.prod-barcode-group{grid-template-columns:1fr}.prod-scanner-btn{min-height:40px}.prod-override-field{padding-bottom:0}}

/* V153: explicit Board Saving deduction control + JobWork/SFT pricing metric */
.saving-deduction-check{display:inline-flex;align-items:flex-start;gap:.42rem;padding:.42rem .55rem;border:1px solid #cbd5e1;border-radius:.5rem;background:#fff;font-size:.69rem;font-weight:700;line-height:1.25;color:#334155;cursor:pointer;max-width:220px}
.saving-deduction-check input{width:15px;height:15px;margin:.05rem 0 0;accent-color:#0f766e;flex:0 0 auto}
.saving-deduction-check:has(input:checked){background:#ecfdf5;border-color:#86efac;color:#166534}
.pricing-v153-sft{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.7rem .75rem .8rem;padding:.68rem .85rem;border:1px solid #b9d9ef;border-radius:.6rem;background:#f0f8fd}
.pricing-v153-sft>div{display:flex;align-items:baseline;gap:.75rem;min-width:0}
.pricing-v153-sft span{font-size:.76rem;font-weight:700;color:#475569}
.pricing-v153-sft strong{font-size:1.05rem;color:#0f4c75;white-space:nowrap}
.pricing-v153-sft small{font-size:.68rem;color:#64748b;text-align:right}
@media(max-width:760px){.pricing-v153-sft{align-items:flex-start;flex-direction:column}.pricing-v153-sft>div{align-items:flex-start;flex-direction:column;gap:.2rem}.pricing-v153-sft small{text-align:left}}

/* V154 JobWork scope exclusions + Saved Boards report */
.pricing-row-actions-v154{display:flex;align-items:center;justify-content:flex-end;gap:6px}.pricing-row-actions-v154 button{width:24px;height:24px;border:1px solid #f1b8b8;border-radius:7px;background:#fff;color:#b42318;font-size:18px;line-height:20px;cursor:pointer}.pricing-row-actions-v154 button:hover{background:#fff1f1}.saved-board-report-project{border:1px solid #e2e8f0;border-radius:12px;margin:10px 0;overflow:hidden;background:#fff}.saved-board-report-project>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 14px;background:#f8fafc;cursor:pointer;font-size:12px;color:#475569}.saved-board-report-project>summary strong{font-size:13px;color:#0f172a}.saved-board-report-project table{margin:0}.saved-board-report-project td,.saved-board-report-project th{padding-left:12px;padding-right:12px}

/* V156 — MMS corporate identity (20% smaller application logo) */
/* V1055: the Mana Interiors logo sits centred in the sidebar */
.mms-sidebar-brand{display:flex;flex-direction:column;align-items:center;gap:2px;padding:0 0 8px}
.mms-sidebar-brand img{display:block;width:var(--brand-sidebar-logo-width,147px);max-width:100%;height:auto;object-fit:contain;object-position:center}
.mms-sidebar-product{font-size:9px;line-height:1;letter-spacing:.22em;font-weight:800;color:#6b778b;margin-left:3px;margin-top:1px}
.mms-login-brand{display:block!important;margin-bottom:4px}
.mms-login-brand img{display:block;width:var(--brand-login-logo-width,216px);max-width:100%;height:auto;margin:0 auto;object-fit:contain}
.login-card{max-width:24rem}
.login-sub{text-align:center;color:#6f7b8c!important;letter-spacing:.02em}
@media(max-width:900px){.mms-sidebar-brand img{width:min(var(--brand-sidebar-logo-width,147px),126px)}.mms-sidebar-product{font-size:8px}}

/* V157 — configurable company branding */
.branding-settings-grid{display:grid;grid-template-columns:minmax(230px,.9fr) minmax(320px,1.4fr);gap:18px;align-items:start}
.branding-preview-box{border:1px solid #d9e1ea;border-radius:12px;background:#fbfdff;min-height:150px;padding:18px;display:flex;align-items:center;justify-content:center}
.branding-preview-box img{max-width:100%;max-height:130px;object-fit:contain}
.brand-size-row{display:grid;grid-template-columns:1fr 90px;gap:10px;align-items:center;margin-top:10px}
.brand-size-row input[type=range]{width:100%;accent-color:#33415b}
.brand-size-row input[type=number]{width:90px}
@media(max-width:900px){.branding-settings-grid{grid-template-columns:1fr}}

/* V166 — clear operator-first Packing Station */
.packing-workspace-tabs{display:flex;gap:6px;padding:5px;background:#f1f5f9;border:1px solid #dbe4ef;border-radius:12px;width:max-content;max-width:100%}
.packing-workspace-tab{display:flex;align-items:center;gap:7px;padding:8px 18px;border:1px solid transparent;border-radius:8px;background:transparent;color:#64748b;font-size:13px;font-weight:750;transition:.15s ease}
.packing-workspace-tab .ui-icon{width:15px;height:15px}.packing-workspace-tab:hover{background:#fff;color:#243147}.packing-workspace-tab.is-active{background:#fff;color:#243147;border-color:#cbd5e1;box-shadow:0 1px 3px rgba(15,23,42,.08)}
.packing-info-icon,.packing-empty-icon{width:40px;height:40px;border-radius:10px;background:#eaf3fb;color:#243147;display:grid;place-items:center;flex:none}.packing-info-icon .ui-icon,.packing-empty-icon .ui-icon{width:20px;height:20px}
.packing-empty-state{display:flex;align-items:center;gap:14px;min-height:110px;color:#475569}.packing-empty-state h3{font-size:15px;font-weight:800;color:#243147;margin-bottom:4px}.packing-empty-state p{font-size:12px;max-width:720px}
.packing-focus-head{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(145px,.8fr) 1fr auto;gap:10px;align-items:stretch;border-bottom:1px solid #cbd5e1;padding-bottom:12px;margin-bottom:14px}
.packing-id-box{background:#eaf3fb;border:1px solid #94a3b8;border-radius:10px;padding:10px 12px;text-align:center}.packing-id-box.accent{background:#243147;border-color:#243147;color:#fff}.packing-id-box span{display:block;font-size:9px;font-weight:850;letter-spacing:.08em}.packing-id-box strong{display:block;font-size:24px;line-height:1.05;margin-top:4px}
.packing-focus-meta{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:4px 2px}.packing-focus-meta b{font-size:13px;color:#243147}.packing-focus-meta small{font-size:11px;color:#64748b}.packing-category-mini{display:inline-block;width:max-content;font-size:9px;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:#52637b;background:#f1f5f9;border-radius:999px;padding:2px 7px}
.packing-panel-list{border:1px solid #dbe4ef;border-radius:12px;overflow:hidden}.packing-panel-line{display:flex;align-items:center;gap:11px;padding:11px 12px;background:#fff;border-bottom:1px solid #e5eaf0}.packing-panel-line:last-child{border-bottom:0}.packing-panel-line.is-scanned{background:#fff7ed;box-shadow:inset 3px 0 #f59e0b}.packing-panel-no{width:28px;height:28px;border-radius:8px;background:#eef4fa;color:#243147;display:grid;place-items:center;font-size:12px;font-weight:900;flex:none}.packing-panel-name{font-size:14px;font-weight:800;color:#172033}.packing-panel-group{font-size:9px;font-weight:800;border-radius:999px;padding:2px 7px}.packing-panel-group.is-finished{background:#e0f2fe;color:#075985}.packing-panel-group.is-unfinished{background:#f1f5f9;color:#475569}.packing-scanned-chip{font-size:9px;font-weight:900;color:#9a3412;background:#ffedd5;border-radius:999px;padding:2px 7px}
@media(max-width:900px){.packing-focus-head{grid-template-columns:1fr 1fr}.packing-focus-meta{grid-column:1/-1}.packing-workspace-tabs{width:100%}.packing-workspace-tab{flex:1;justify-content:center}}

/* V167 — compact packing header + live packing PDF */
.packing-top-row{display:grid;grid-template-columns:minmax(0,1.28fr) minmax(390px,.72fr);gap:14px;align-items:stretch}
.packing-top-card{padding:13px 15px!important;height:100%}
.packing-scan-compact{display:flex;align-items:center;gap:12px;min-height:86px}
.packing-scan-compact h3,.packing-summary-compact-head h3{margin:0;color:#172033;font-size:14px;font-weight:800}
.packing-scan-compact p,.packing-summary-compact-head p{margin:2px 0 0;line-height:1.3}
.packing-summary-compact-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.packing-summary-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;text-align:center}
.packing-summary-kpis>div{background:#f6f9fc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 6px;min-width:0}
.packing-summary-kpis>div:first-child{background:#eef6ff;border-color:#dbeafe}.packing-summary-kpis>div.pending{background:#fff8e8;border-color:#fde7b0}
.packing-summary-kpis span{display:block;color:#64748b;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.packing-summary-kpis strong{display:block;margin-top:2px;color:#172033;font-size:18px;line-height:1;font-weight:850}
.packing-pdf-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid #cbd5e1;background:#fff;color:#243147;border-radius:7px;padding:6px 8px;font-size:10px;font-weight:800;white-space:nowrap}
.packing-pdf-btn:hover{background:#f8fafc;border-color:#94a3b8}.packing-pdf-btn .ui-icon{width:13px;height:13px}
@media(max-width:1080px){.packing-top-row{grid-template-columns:1fr}.packing-scan-compact{min-height:auto}.packing-summary-compact-head{margin-bottom:7px}}
@media(max-width:580px){.packing-scan-compact{align-items:flex-start}.packing-summary-kpis{grid-template-columns:1fr 1fr 1fr}.packing-summary-kpis span{font-size:8px}.packing-summary-kpis strong{font-size:16px}.packing-pdf-btn span{display:none}}

/* V172 packing workstation — fixed 3-column operator layout */
.packing-workstation-shell{border:1px solid #dbe4ef;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.packing-workstation-grid{display:grid;grid-template-columns:180px minmax(520px,1fr) 300px;min-height:430px}
.packing-ws-packet,.packing-ws-scan,.packing-ws-other{padding:18px 16px;min-width:0}
.packing-ws-packet{background:#f8fafc;border-right:1px solid #cbd5e1}
.packing-ws-scan{display:flex;flex-direction:column;border-right:1px solid #cbd5e1}
.packing-ws-other{background:#f8fafc}
.packing-ws-title{font-size:12px;font-weight:900;letter-spacing:.05em;color:#64748b}
.packing-ws-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.packing-ws-packno{font-size:28px;font-weight:900;color:#172033;margin-top:22px}
.packing-ws-assembly{font-size:16px;font-weight:900;color:#172033;margin-top:12px}.packing-ws-category{font-size:14px;font-weight:800;color:#475569;margin-top:5px}
.packing-ws-count{font-size:24px;font-weight:900;color:#b45309;margin-top:34px}.packing-ws-count.is-complete{color:#15803d}.packing-ws-weight{font-size:15px;color:#64748b;margin-top:4px}.packing-ws-pending{font-size:11px;font-weight:900;color:#be123c;margin-top:12px}
.packing-ws-verify{font-size:10px;font-weight:900;color:#b45309}.packing-ws-verify.is-complete{color:#15803d}
.packing-ws-panel-list{border:0;border-radius:0;overflow:visible}.packing-ws-panel-list .packing-panel-line{padding:9px 8px;border:0;border-bottom:1px solid #eef2f7;background:transparent}.packing-ws-panel-list .packing-panel-line:last-child{border-bottom:0}.packing-ws-panel-list .packing-panel-line.is-scanned{background:#f0fdf4;box-shadow:inset 3px 0 #22c55e}.packing-ws-panel-list .packing-panel-name{font-size:13px}.packing-ws-panel-list .packing-panel-no{width:25px;height:25px}
.packing-ws-create{margin-top:auto;padding-top:22px;text-align:center}.packing-ws-create-btn{border:1px solid #cbd5e1;border-radius:9px;padding:10px 24px;font-size:13px;font-weight:900;background:#e2e8f0;color:#94a3b8;cursor:not-allowed}.packing-ws-create-btn.is-enabled{background:#16a34a;border-color:#15803d;color:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.12)}.packing-ws-created{font-size:13px;font-weight:800;color:#1d4ed8}.packing-ws-hint{font-size:10px;color:#64748b;margin-top:7px}
.packing-ws-donot{font-size:10px;font-weight:900;color:#dc2626;margin-top:5px;margin-bottom:16px}.packing-ws-other-list{display:grid;gap:14px}.packing-ws-other-item{padding-bottom:13px;border-bottom:1px solid #e2e8f0}.packing-ws-other-item:last-child{border-bottom:0}.packing-ws-other-name{font-size:13px;font-weight:800;color:#172033}.packing-ws-other-code{font-size:11px;color:#64748b;margin-top:3px}.packing-ws-destination{font-size:11px;font-weight:800;color:#2563eb;margin-top:6px}.packing-ws-empty{font-size:12px;color:#94a3b8}
.packing-ws-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid #e2e8f0;background:#fff}.packing-ws-nav{display:flex;gap:8px}
@media(max-width:1050px){.packing-workstation-grid{grid-template-columns:150px minmax(430px,1fr) 240px}.packing-ws-packet,.packing-ws-scan,.packing-ws-other{padding:14px 12px}}
@media(max-width:820px){.packing-workstation-shell{overflow-x:auto}.packing-workstation-grid{grid-template-columns:150px 500px 250px;min-width:900px}.packing-ws-footer{min-width:900px}}

/* V173 — packing groups / ready groups */
.packing-ready-groups{border:1px solid #dbe4ef;border-radius:12px;background:#fff;padding:12px 14px;margin-top:8px}
.packing-ready-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px}.packing-ready-sub{font-size:10px;color:#94a3b8;margin-top:2px}.packing-ready-count{font-size:11px;font-weight:900;color:#15803d;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:999px;padding:4px 9px}
.packing-ready-list{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.packing-ready-item{display:grid;grid-template-columns:auto auto auto auto;gap:10px;align-items:center;white-space:nowrap;border:1px solid #dbe4ef;border-radius:9px;background:#f8fafc;padding:8px 10px;font-size:11px;color:#475569}.packing-ready-item b{font-size:12px;color:#172033}.packing-ready-item.is-current{border-color:#38bdf8;background:#f0f9ff}.packing-ready-empty{font-size:12px;color:#94a3b8;padding:5px 0}

/* V174 — compact ready packet list in right workstation column */
.packing-ready-side{height:100%;display:flex;flex-direction:column;min-height:0}
.packing-ready-side-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:10px;border-bottom:1px solid #e2e8f0}
.packing-ready-side-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-content:start;overflow-y:auto;padding-top:10px;max-height:370px}
.packing-ready-number{width:100%;border:1px solid #dbe4ef;border-radius:8px;background:#fff;padding:8px 5px;font-size:12px;font-weight:800;color:#172033;text-align:center;cursor:pointer}
.packing-ready-number:hover{background:#f0f9ff;border-color:#7dd3fc}
.packing-ready-number.is-current{background:#e0f2fe;border-color:#38bdf8;color:#075985}
@media(max-width:1050px){.packing-ready-side-list{grid-template-columns:1fr}}

/* V181: Offcut table fixed grid/alignment */
.offcut-table{table-layout:fixed;width:100%;min-width:1080px}
.offcut-table th,.offcut-table td{box-sizing:border-box;padding:11px 12px;vertical-align:middle;text-align:left}
.offcut-table .offcut-col-source{width:8%}
.offcut-table .offcut-col-barcode{width:13%}
.offcut-table .offcut-col-code{width:14%}
.offcut-table .offcut-col-material{width:14%}
.offcut-table .offcut-col-size{width:12%}
.offcut-table .offcut-col-thickness{width:8%}
.offcut-table .offcut-col-qty{width:5%}
.offcut-table .offcut-col-status{width:8%}
.offcut-table .offcut-col-actions{width:8%}
.offcut-table .offcut-center{text-align:center}
.offcut-table .offcut-actions{display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.offcut-edit-btn,.offcut-delete-btn{border:1px solid #cbd5e1;border-radius:5px;background:#fff;padding:5px 9px;font-size:12px;line-height:1.1}
.offcut-edit-btn{color:#0369a1}.offcut-delete-btn{color:#be123c}
.offcut-edit-btn:hover,.offcut-delete-btn:hover{background:#f8fafc}


/* V192 — stable project tab switching / reduced layout shift */
.topbar-left{min-height:50px}
.topbar-subtitle{line-height:20px}
.project-tab-loading{min-height:24px}
/* V192 performance: avoid a full-page GPU blur repaint on every tab DOM update. */
.topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#fff!important}


/* v195: project overview split layout + larger typography */
.project-overview-split-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:16px;align-items:start}
.project-details-half,.project-metrics-side{height:100%}
.project-details-head h3{font-size:1.18rem;line-height:1.25}
.project-customer-line{font-size:.92rem;padding:10px 12px;gap:10px;margin-bottom:12px}
.project-customer-line a{font-size:1rem}
.project-detail-compact-form-large{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;font-size:.95rem}
.project-detail-compact-form-large label{font-size:.82rem!important;font-weight:600;color:#64748b;margin-bottom:4px}
.project-detail-compact-form-large input,.project-detail-compact-form-large select{min-height:40px;padding:.5rem .7rem!important;font-size:.96rem}
.project-detail-compact-form-large .timeline-preview{padding:9px 12px;font-size:.9rem;min-height:40px;border-radius:8px}
.project-detail-span-2{grid-column:1/-1}
.project-field-help{font-size:.78rem;color:#94a3b8;margin-top:5px;line-height:1.35}
.project-field-help-success{color:#047857}
.project-detail-actions{margin-top:6px}
.project-detail-actions button{font-size:.88rem!important;padding:.55rem .85rem!important}
.jobwork-delete-btn{font-size:.84rem;padding:10px 12px}
.project-overview-metrics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.project-metrics-side .metric-tile{padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fbfdff;min-height:96px}
.project-metrics-side .metric-tile-icon{width:44px;height:44px;font-size:1.15rem}
.project-metrics-side .metric-tile-label{font-size:.84rem;letter-spacing:.01em}
.project-metrics-side .metric-tile-value{font-size:1.32rem;line-height:1.2}
.project-metrics-side .metric-tile-sub{font-size:.8rem;line-height:1.35;margin-top:4px}
@media(max-width:1200px){.project-overview-split-grid{grid-template-columns:1fr}.project-overview-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.project-detail-compact-form-large{grid-template-columns:1fr}.project-detail-span-2{grid-column:1}.project-overview-metrics-grid{grid-template-columns:1fr}}


/* v196: Panel Label Mapping */
.panel-label-layout{display:grid;gap:14px}
.panel-label-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}
.panel-label-head h3{font-size:1.08rem;margin:0;color:#0f172a}
.panel-label-head p{font-size:.85rem;color:#64748b;margin:.25rem 0 0;line-height:1.45}
.panel-label-summary{display:grid;grid-template-columns:auto auto auto auto;align-items:center;gap:5px 8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 12px;white-space:nowrap}
.panel-label-summary strong{font-size:1rem;color:#0f172a}.panel-label-summary span{font-size:.73rem;color:#64748b;margin-right:5px}
.panel-label-actions,.panel-label-reader-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.panel-label-actions>div{font-size:.86rem;color:#475569;line-height:1.45;flex:1;min-width:260px}
.panel-label-note{margin-top:10px;padding:9px 11px;border-radius:9px;background:#f8fafc;border:1px solid #e5e7eb;color:#64748b;font-size:.79rem;line-height:1.45}
.panel-label-manual-form{display:flex;align-items:center;gap:8px;flex:1;min-width:330px}
.panel-label-manual-form input{height:39px;border:1px solid #cbd5e1;border-radius:8px;padding:0 11px;font-size:.9rem;flex:1;min-width:220px}
.panel-label-map-table th,.panel-label-map-table td,.panel-label-lookup-table th,.panel-label-lookup-table td{padding:9px 10px;white-space:nowrap}
.panel-label-map-table td:nth-child(3),.panel-label-lookup-table td:nth-child(4){font-variant-numeric:tabular-nums}
.panel-label-barcode{display:inline-block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:800;color:#0f172a;background:#f1f5f9;border:1px solid #dbe2ea;border-radius:6px;padding:3px 7px}
.panel-label-status{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:.73rem;font-weight:700}.panel-label-status.mapped{background:#dcfce7;color:#166534}.panel-label-status.unresolved{background:#fff1f2;color:#be123c}
.panel-label-empty{padding:22px;text-align:center;color:#94a3b8;border:1px dashed #cbd5e1;border-radius:10px;background:#fafafa}
@media(max-width:760px){.panel-label-head{flex-direction:column}.panel-label-summary{width:100%}.panel-label-manual-form{min-width:100%;flex-wrap:wrap}.panel-label-manual-form input{width:100%}}


/* v197 panel label confirmation + 100x75 generation */
.panel-label-confirm-hint{font-size:.84rem;color:#475569;line-height:1.45;flex:1;min-width:260px}
.panel-label-confirm-table th,.panel-label-confirm-table td{padding:9px 10px;white-space:nowrap}
.panel-label-confirm-table td:nth-child(2),.panel-label-confirm-table td:nth-child(3){text-align:center;font-variant-numeric:tabular-nums}


/* v198 panel label selection + EMF folder confirmation */
.panel-label-select-col{width:38px;text-align:center!important}
.panel-label-select-col input{width:16px;height:16px;accent-color:#0284c7;cursor:pointer}
.panel-label-reader-row .direct-btn{white-space:nowrap}

/* V219 production header label print */
.topbar-print-label{height:40px;display:inline-flex;align-items:center;gap:7px;padding:0 14px;border:1px solid #d9e1ec;border-radius:10px;background:#fff;color:#1e293b;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.04);cursor:pointer}
.topbar-print-label:hover{background:#f8fafc;border-color:#cbd5e1}
.topbar-print-label .topbar-print-icon{font-size:15px;line-height:1}
.topbar-print-label.hidden{display:none!important}

/* V220 production thin-panel edge check */
.topbar-edge-count{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#fff1f2;color:#be123c;border:1px solid #fecdd3;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;line-height:1}
.topbar-edge-count.hidden{display:none!important}

/* V222 — Assemblies customer review: doors, finish materials, finished sides and room grouping */
.assembly-review-section{width:75%;max-width:none;margin-left:auto;margin-right:auto}
.assembly-review-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.assembly-print-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid #0f766e;background:#ecfdf5;color:#0f766e;border-radius:8px;padding:7px 11px;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}
.assembly-print-btn:hover{background:#d1fae5}
.assembly-print-btn svg{width:15px;height:15px}
.assembly-review-table{min-width:1690px}
.assembly-review-table th:nth-child(1){min-width:86px}.assembly-review-table th:nth-child(2){min-width:130px}.assembly-review-table th:nth-child(6){min-width:105px}.assembly-review-table th:nth-child(7){min-width:245px}.assembly-review-table th:nth-child(8){min-width:240px}.assembly-review-table th:nth-child(9){min-width:250px}.assembly-review-table th:nth-child(10){min-width:65px}.assembly-review-table th:nth-child(11){min-width:150px}

.assembly-review-table th:last-child{background:#f1f5f9;color:#166534;text-align:center}
.assembly-room-divider td{padding:7px 10px!important;border-top:2px solid #dbe4ef!important;border-bottom:1px solid #dbe4ef!important;font-size:12px!important;letter-spacing:.01em}
.assembly-room-divider td span{display:inline-block;margin-right:8px;font-size:9px;font-weight:800;letter-spacing:.08em;color:#64748b}
.assembly-room-divider td strong{font-size:13px;color:#172033}.assembly-room-divider td em{margin-left:10px;font-size:10px;font-style:normal;color:#64748b}
.assembly-room-row td{transition:background .12s ease}.assembly-room-row:hover td{filter:brightness(.985)}
.assembly-room-row.room-tone-0 td,.assembly-room-divider.room-tone-0 td{background:#f5faff}.assembly-room-row.room-tone-1 td,.assembly-room-divider.room-tone-1 td{background:#f5fbf7}.assembly-room-row.room-tone-2 td,.assembly-room-divider.room-tone-2 td{background:#fffaf0}.assembly-room-row.room-tone-3 td,.assembly-room-divider.room-tone-3 td{background:#faf7ff}.assembly-room-row.room-tone-4 td,.assembly-room-divider.room-tone-4 td{background:#fff7f9}.assembly-room-row.room-tone-5 td,.assembly-room-divider.room-tone-5 td{background:#f3fbfa}
.assembly-review-status-cell{min-width:150px!important;text-align:center!important;vertical-align:middle!important;background:#f8fafc!important}.assembly-review-status-cell.reviewed{background:#ecfdf5!important;box-shadow:inset 0 0 0 1px #bbf7d0}.assembly-review-check{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#475569;font-size:11px;font-weight:850;line-height:1.1;cursor:pointer;white-space:nowrap;min-width:112px}.assembly-review-check input{width:21px;height:21px;margin:0;accent-color:#16a34a;cursor:pointer;flex:0 0 auto}.assembly-review-check.checked{background:#f0fdf4;border-color:#86efac;color:#166534}.assembly-review-check:has(input:disabled){opacity:.72;cursor:not-allowed}.assembly-review-check:has(input:disabled) input{cursor:not-allowed}.assembly-reviewed-by{display:block;margin-top:5px;font-size:8.5px;color:#15803d;font-weight:750;white-space:normal;text-align:center}.assembly-reviewed-symbol{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;margin-right:6px;border-radius:50%;background:#dcfce7;color:#15803d;font-size:11px;font-weight:900;vertical-align:middle}.assembly-room-row.designer-reviewed .assembly-id-cell{box-shadow:inset 3px 0 0 #86efac}
.assembly-room-cell{font-weight:650;color:#475569}.assembly-door-cell{min-width:105px}.assembly-door-count{font-weight:800;color:#172033}.assembly-door-names{margin-top:2px;font-size:10.5px;color:#64748b;line-height:1.3;white-space:normal}.assembly-door-material-cell{white-space:normal}.door-material-spec{display:block;border-left:3px solid #94a3b8;padding:3px 0 3px 7px;margin:2px 0;line-height:1.25}.door-material-spec strong{display:block;font-size:12px;color:#172033}.door-material-spec span{display:block;margin-top:2px;font-size:10.5px;color:#526176}.door-material-spec.needs-review{border-left-color:#f59e0b;background:#fffbeb;border-radius:0 5px 5px 0;padding-right:5px}.assembly-finished-cell{min-width:240px;white-space:normal}.finished-side-chip{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;border-radius:8px;padding:5px 8px;margin:2px 4px 2px 0;font-size:10.5px;font-weight:750;border:1px solid transparent;white-space:nowrap;vertical-align:top}.finished-side-chip b{font-size:11px;line-height:1.15}.finished-side-chip small{font-size:9.5px;font-weight:700;line-height:1.15}.finished-side-chip.left{background:#dcfce7;color:#166534;border-color:#86efac}.finished-side-chip.right{background:#ffedd5;color:#9a3412;border-color:#fdba74}.assembly-full-panel-cell{min-width:250px;white-space:normal}.full-panel-chip{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;border-radius:8px;padding:5px 8px;margin:2px 4px 2px 0;font-size:10.5px;font-weight:750;border:1px solid transparent;white-space:nowrap;vertical-align:top}.full-panel-chip b{font-size:11px;line-height:1.15}.full-panel-chip small{font-size:9.5px;font-weight:700;line-height:1.15}.full-panel-chip.top{background:#dbeafe;color:#1e40af;border-color:#93c5fd}.full-panel-chip.bottom{background:#ede9fe;color:#5b21b6;border-color:#c4b5fd}
@media(max-width:1200px){.assembly-review-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.assembly-review-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.assembly-review-section{width:100%}}
@media(max-width:560px){.assembly-review-kpis{grid-template-columns:1fr}.assembly-print-btn{width:100%;justify-content:center}}


/* V224 — panel label mapped summary + collapsed entry list */
.panel-label-summary{grid-template-columns:auto auto;gap:8px;padding:7px;background:#fff;border-color:#dbeafe}
.panel-label-mapped-highlight,.panel-label-unresolved-highlight{display:flex;align-items:center;gap:8px;border-radius:10px;padding:8px 12px;border:1px solid transparent}
.panel-label-mapped-highlight{background:#e0f2fe;border-color:#7dd3fc;color:#075985;box-shadow:0 1px 2px rgba(14,165,233,.08)}
.panel-label-mapped-highlight strong{font-size:1.42rem;line-height:1;color:#0369a1}.panel-label-mapped-highlight span{font-size:.82rem;font-weight:900;letter-spacing:.045em;color:#075985;margin:0}
.panel-label-unresolved-highlight{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.panel-label-unresolved-highlight strong{font-size:1.08rem;line-height:1;color:#c2410c}.panel-label-unresolved-highlight span{font-size:.72rem;font-weight:800;letter-spacing:.035em;color:#9a3412;margin:0}
.panel-label-current-head{align-items:center}.panel-label-show-all-btn{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;background:#f8fafc;border-color:#cbd5e1;font-weight:800;color:#334155}
#panelLabelMappingTable[hidden]{display:none!important}


/* V227 Assemblies layout customizer */
.assembly-layout-btn,.assembly-layout-reset-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;padding:7px 11px;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}
.assembly-layout-btn{border:1px solid #6366f1;background:#eef2ff;color:#4338ca}.assembly-layout-btn:hover{background:#e0e7ff}
.assembly-layout-reset-btn{border:1px solid #cbd5e1;background:#fff;color:#475569}.assembly-layout-reset-btn:hover{background:#f8fafc}
.assembly-layout-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(320px,1.2fr);gap:12px;align-items:center;padding:9px 12px;border-bottom:1px solid #e2e8f0;background:#fbfdff}
.assembly-layout-width-control,.assembly-layout-align-control{display:flex;align-items:center;gap:8px}.assembly-layout-toolbar label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b;white-space:nowrap}.assembly-layout-width-control input{width:min(240px,22vw);accent-color:#4f46e5}.assembly-layout-width-control output{font-size:12px;font-weight:800;color:#312e81;min-width:42px}.assembly-layout-align-control button{border:1px solid #cbd5e1;background:white;color:#475569;border-radius:6px;padding:5px 8px;font-size:10.5px;font-weight:750;cursor:pointer}.assembly-layout-align-control button.active{background:#312e81;border-color:#312e81;color:white}.assembly-layout-help{font-size:10.5px;line-height:1.35;color:#64748b}.assembly-layout-help b{color:#334155}
.assembly-layout-editing .assembly-review-table th{vertical-align:top}.assembly-col-control{display:flex;align-items:center;gap:3px;margin-top:5px}.assembly-col-control button,.assembly-row-control button{width:22px;height:20px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #cbd5e1;background:white;color:#334155;border-radius:5px;font-size:12px;font-weight:850;cursor:pointer;line-height:1}.assembly-col-control button:hover,.assembly-row-control button:hover{background:#eef2ff;border-color:#a5b4fc}.assembly-col-control b{min-width:28px;text-align:center;font-size:9px;color:#64748b;font-weight:800}.assembly-row-control{display:flex;align-items:center;gap:3px;margin-top:5px;white-space:nowrap}.assembly-row-control span{min-width:34px;text-align:center;font-size:9px;color:#64748b;font-weight:800}.assembly-row-control button:last-child{font-size:9px}
@media(max-width:1200px){.assembly-layout-toolbar{grid-template-columns:1fr 1fr}.assembly-layout-help{grid-column:1/-1}.assembly-review-section{width:100%!important}}
@media(max-width:700px){.assembly-layout-toolbar{grid-template-columns:1fr}.assembly-layout-help{grid-column:auto}.assembly-layout-width-control{flex-wrap:wrap}.assembly-layout-width-control input{width:100%}}

/* V232 — Assemblies customer SFT quotation */
.assembly-quote-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid #2563eb;background:#eff6ff;color:#1d4ed8;border-radius:8px;padding:7px 11px;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}.assembly-quote-btn:hover{background:#dbeafe}.assembly-quote-btn svg{width:15px;height:15px}
.assembly-quote-modal{display:flex;flex-direction:column;gap:12px}.assembly-quote-intro{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;padding:9px 11px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px}.assembly-quote-intro b{font-size:13px;color:#172033}.assembly-quote-intro span{font-size:10.5px;color:#64748b;text-align:right}
.assembly-quote-rate-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.assembly-quote-rate-grid label{display:block;border:1px solid #dbe4ef;background:#fff;border-radius:9px;padding:8px}.assembly-quote-rate-grid label>span{display:block;min-height:28px;font-size:9.5px;font-weight:800;color:#526176;line-height:1.3}.assembly-quote-rate-grid label>div{display:flex;align-items:center;margin-top:5px;border-top:1px solid #eef2f7;padding-top:5px}.assembly-quote-rate-grid b{font-size:12px;color:#334155}.assembly-quote-rate-grid input{width:100%;border:0;outline:0;padding:2px 4px;font-size:15px;font-weight:850;color:#172033;background:transparent}
.assembly-quote-rule-note{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:8px;padding:7px 9px;font-size:10.5px}.assembly-quote-data-warning{border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:8px;padding:7px 9px;font-size:10.5px;margin-top:8px}.assembly-quote-warning{display:block;color:#b45309;font-size:8.5px;margin-top:2px}
.assembly-quote-summary{margin-top:9px;overflow:auto}.assembly-quote-summary table,.assembly-quote-detail-table{width:100%;border-collapse:collapse}.assembly-quote-summary th,.assembly-quote-summary td,.assembly-quote-detail-table th,.assembly-quote-detail-table td{border:1px solid #d7e0ea;padding:6px 7px;font-size:10.5px;vertical-align:top}.assembly-quote-summary th,.assembly-quote-detail-table th{background:#f1f5f9;color:#475569;font-size:9px;text-transform:uppercase;letter-spacing:.03em}.assembly-quote-summary tfoot th{background:#dbeafe;color:#1e3a8a;border-top:2px solid #2563eb;font-size:10.5px}.assembly-quote-summary .r,.assembly-quote-detail-table .r{text-align:right}
.assembly-quote-details{margin-top:10px;border:1px solid #dbe4ef;border-radius:9px;overflow:hidden;background:#fff}.assembly-quote-details>summary{cursor:pointer;padding:9px 11px;background:#f8fafc;color:#334155;font-size:11px;font-weight:850;list-style-position:inside}.assembly-quote-room-detail{padding:10px}.assembly-quote-room-detail+ .assembly-quote-room-detail{border-top:1px solid #e2e8f0}.assembly-quote-room-detail h4{display:flex;justify-content:space-between;gap:10px;margin:0 0 6px;font-size:12px;color:#172033}.assembly-quote-room-detail h4 span{font-size:9px;font-weight:700;color:#64748b}.assembly-quote-row-warning td{background:#fffaf0}.assembly-quote-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:2px}.assembly-quote-reset,.assembly-quote-print{display:inline-flex;align-items:center;gap:7px;border-radius:8px;padding:8px 12px;font-size:11px;font-weight:800;cursor:pointer}.assembly-quote-reset{border:1px solid #cbd5e1;background:#fff;color:#475569}.assembly-quote-print{border:1px solid #172033;background:#172033;color:#fff}.assembly-quote-print svg{width:15px;height:15px}
@media(max-width:1050px){.assembly-quote-rate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.assembly-quote-rate-grid{grid-template-columns:1fr}.assembly-quote-intro{flex-direction:column}.assembly-quote-intro span{text-align:left}.assembly-quote-actions{flex-direction:column}.assembly-quote-reset,.assembly-quote-print{justify-content:center;width:100%}.assembly-quote-btn{width:100%;justify-content:center}}


/* V234 — Assembly Quote reference image library */
.assembly-ref-library{border:1px solid #dbe4ef;background:#fbfdff;border-radius:10px;padding:10px}.assembly-ref-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.assembly-ref-library-head h4{margin:0;color:#172033;font-size:13px}.assembly-ref-library-head p{margin:3px 0 0;color:#64748b;font-size:10px;line-height:1.45}.assembly-ref-add{border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:7px 11px;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}.assembly-ref-add:hover{background:#1d4ed8}.assembly-ref-match-status{margin-top:8px;padding:6px 8px;border:1px solid #dbeafe;background:#eff6ff;color:#1e40af;border-radius:7px;font-size:10px}.assembly-ref-cards{display:flex;gap:8px;overflow-x:auto;padding-top:8px}.assembly-ref-card{flex:0 0 225px;display:grid;grid-template-columns:62px 1fr auto;gap:8px;align-items:center;border:1px solid #e2e8f0;background:#fff;border-radius:9px;padding:7px}.assembly-ref-card img{width:62px;height:48px;object-fit:contain;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px}.assembly-ref-card-copy{min-width:0}.assembly-ref-card-copy strong{display:block;font-size:10.5px;color:#172033;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.assembly-ref-card-copy small{display:block;margin-top:2px;font-size:8.5px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.assembly-ref-card button{border:1px solid #cbd5e1;background:#fff;color:#475569;border-radius:6px;padding:5px 7px;font-size:9px;font-weight:800;cursor:pointer}.assembly-ref-empty{width:100%;padding:12px;text-align:center;color:#64748b;font-size:10.5px;border:1px dashed #cbd5e1;border-radius:8px;background:#fff}.assembly-ref-editor{display:flex;flex-direction:column;gap:12px}.assembly-ref-editor-preview{height:180px;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;background:#f8fafc;border-radius:10px;color:#94a3b8;font-size:12px;overflow:hidden}.assembly-ref-editor-preview img{max-width:100%;max-height:100%;object-fit:contain}.assembly-ref-editor label>span{display:block;margin-bottom:5px;font-size:11px;font-weight:800;color:#334155}.assembly-ref-editor input[type=text],.assembly-ref-editor input[name=name]{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:9px 10px;font-size:12px}.assembly-ref-editor input[type=file]{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:8px;background:#fff;font-size:11px}.assembly-ref-editor label small{display:block;margin-top:4px;color:#64748b;font-size:9.5px}.assembly-ref-editor-actions{display:flex;justify-content:flex-end;gap:8px}.assembly-quote-ref-cell{width:82px;text-align:center}.assembly-quote-ref-cell img{width:70px;height:54px;object-fit:contain;border:1px solid #dbe4ef;background:#fff;border-radius:6px}.assembly-quote-no-ref{display:inline-block;color:#94a3b8;font-size:8.5px;white-space:nowrap}
@media(max-width:640px){.assembly-ref-library-head{flex-direction:column}.assembly-ref-add{width:100%}.assembly-ref-card{flex-basis:210px}.assembly-quote-ref-cell img{width:56px;height:44px}}

/* V235 — Settings > Reference Images master library + multi-image import */
.assembly-ref-settings-shell{display:flex;flex-direction:column;gap:14px}.assembly-ref-settings-head,.assembly-ref-saved-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.assembly-ref-settings-head h3,.assembly-ref-saved-head h3{margin:0;color:#172033;font-size:15px}.assembly-ref-settings-head p,.assembly-ref-saved-head p{margin:4px 0 0;color:#64748b;font-size:11px;line-height:1.5}.assembly-ref-bulk-box{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:10px;padding:12px}.assembly-ref-bulk-copy{display:flex;flex-direction:column;gap:3px}.assembly-ref-bulk-copy b{color:#1e3a8a;font-size:12px}.assembly-ref-bulk-copy span{color:#64748b;font-size:10.5px;line-height:1.45}.assembly-ref-browse-btn{display:inline-flex;align-items:center;justify-content:center;min-width:128px;padding:8px 12px;border-radius:8px;background:#172033;color:#fff;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}.assembly-ref-browse-btn input{display:none}.assembly-ref-settings-note{margin-top:10px;padding:8px 10px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:8px;color:#64748b;font-size:10px}.assembly-ref-settings-note code{color:#334155;background:#e2e8f0;padding:1px 4px;border-radius:4px}.assembly-ref-settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:10px;margin-top:10px}.assembly-ref-settings-card{display:grid;grid-template-columns:78px minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:8px}.assembly-ref-settings-card>img{width:78px;height:62px;object-fit:contain;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px}.assembly-ref-settings-card button{border:1px solid #cbd5e1;background:#fff;color:#475569;border-radius:7px;padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer}.assembly-ref-import-stage{margin-top:10px;border:1px solid #dbe4ef;border-radius:10px;background:#fff;overflow:hidden}.assembly-ref-import-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.assembly-ref-import-head>div:first-child{display:flex;flex-direction:column;gap:2px}.assembly-ref-import-head b{font-size:11px;color:#172033}.assembly-ref-import-head span{font-size:9.5px;color:#64748b}.assembly-ref-import-head>div:last-child{display:flex;gap:7px}.assembly-ref-import-list{max-height:430px;overflow:auto}.assembly-ref-import-row{display:grid;grid-template-columns:70px minmax(220px,1fr) 170px 30px;gap:10px;align-items:center;padding:9px 11px;border-bottom:1px solid #eef2f7}.assembly-ref-import-row:last-child{border-bottom:0}.assembly-ref-import-row>img{width:70px;height:55px;object-fit:contain;border:1px solid #e2e8f0;background:#f8fafc;border-radius:6px}.assembly-ref-import-row label{display:block;color:#64748b;font-size:9px;font-weight:800;margin-bottom:3px}.assembly-ref-import-row input{width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:7px 8px;font-size:11px;color:#172033}.assembly-ref-import-row small{font-size:9px;line-height:1.4;color:#94a3b8;overflow-wrap:anywhere}.assembly-ref-import-row small em{display:block;margin-top:3px;color:#b91c1c;font-style:normal;font-weight:750}.assembly-ref-import-row>button{width:28px;height:28px;border:1px solid #fecaca;background:#fff;color:#b91c1c;border-radius:7px;font-size:16px;line-height:1;cursor:pointer}@media(max-width:760px){.assembly-ref-settings-head,.assembly-ref-saved-head,.assembly-ref-bulk-box,.assembly-ref-import-head{flex-direction:column;align-items:stretch}.assembly-ref-add,.assembly-ref-browse-btn{width:100%}.assembly-ref-import-row{grid-template-columns:58px 1fr 30px}.assembly-ref-import-row>img{width:58px;height:48px}.assembly-ref-import-row>small{grid-column:2/3}.assembly-ref-settings-grid{grid-template-columns:1fr}}


/* V237 — Assemblies reference-image layout + square/no-frame images */
.assembly-name-cell{font-weight:700;color:#172033;line-height:1.35}
.assembly-reference-cell{text-align:center;vertical-align:middle;padding-top:6px!important;padding-bottom:6px!important}
.assembly-reference-image{display:block;width:132px;height:92px;object-fit:contain;margin:0 auto;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important}
.assembly-quote-ref-cell{width:112px;text-align:center;vertical-align:middle}
.assembly-quote-ref-cell img{display:block;width:100px;height:76px;object-fit:contain;margin:0 auto;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important}
.assembly-ref-card img,.assembly-ref-settings-card>img,.assembly-ref-import-row>img,.assembly-ref-editor-preview img{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important}
@media(max-width:640px){.assembly-reference-image{width:108px;height:76px}.assembly-quote-ref-cell img{width:82px;height:62px}}

/* V238 — Design → 3D Render Studio */
.design-render-panel{margin-bottom:16px}
.design-render-wrap{height:calc(100vh - 150px);min-height:520px;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}
.design-render-frame{width:100%;height:100%;border:0;display:block}
/* V312 · DXF layer material assignment */
.room-layer-row{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:7px 6px;border-bottom:1px solid var(--line,#343b46)}
.room-layer-row:last-child{border-bottom:0}
.room-layer-main{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:7px;align-items:center;margin:0!important}
.room-layer-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-layer-material{display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;align-items:center;padding-left:25px}
.room-layer-material select{width:100%;min-width:0;font-size:11px;padding:4px 24px 4px 6px}
.room-layer-swatch{width:16px;height:16px;border-radius:4px;border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}

/* V374 Settings → Models / Lights library browser (Coohom-style) */
.libx{display:grid;grid-template-columns:200px minmax(0,1fr);border:1px solid #dfe5ec;border-radius:12px;background:#fff;overflow:hidden;min-height:560px}
.libx-tree{border-right:1px solid #e6ebf1;padding:8px 0;background:#fbfcfd;font-size:.86rem}
.libx-sec{padding:10px 14px 4px;font-size:.68rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#8a94a3}
.libx-tree button{display:flex;align-items:center;width:100%;gap:6px;padding:7px 14px;border:0;background:none;text-align:left;color:#26313d;cursor:pointer;font:inherit}
.libx-tree button:hover{background:#eef4fb}
.libx-tree button.on{background:#e3f0fd;color:#1769aa;font-weight:700;box-shadow:inset 3px 0 0 #2088ef}
.libx-tree button small{margin-left:auto;color:#94a0ae;font-weight:400;font-size:.74rem}
.libx-subs button{padding-left:28px;font-size:.8rem;color:#5b6675}
.libx-main{display:flex;flex-direction:column;min-width:0;padding:12px}
.libx-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}
.libx-search{flex:1 1 260px;display:flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid #d7dde6;border-radius:9px;background:#fff}
.libx-search svg{width:16px;height:16px;color:#8a94a3;flex:none}
.libx-search input{flex:1;border:0;outline:0;font:inherit;min-width:0;background:transparent}
.libx-bar select{padding:7px 9px;border:1px solid #d7dde6;border-radius:9px;background:#fff;font:inherit;font-size:.85rem}
.libx-count{margin-left:auto;font-size:.8rem;color:#8a94a3;font-variant-numeric:tabular-nums}
.libx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:10px;align-content:start;flex:1}
.libx-tile{position:relative;display:flex;flex-direction:column;padding:0;border:1px solid #e3e8ee;border-radius:10px;background:#fff;cursor:pointer;overflow:hidden;text-align:left;font:inherit;transition:border-color .12s,box-shadow .12s}
.libx-tile:hover,.libx-tile:focus-visible{border-color:#2088ef;box-shadow:0 4px 14px rgba(23,105,170,.12);outline:none}
.libx-img{display:grid;place-items:center;aspect-ratio:1/1;background:#F4F4F2}
.libx-img img{width:100%;height:100%;object-fit:contain}
.libx-img.missing::after,.libx-detail-img.missing::after{content:"3D";font-weight:800;color:#b5bfcb;font-size:1.2rem}
.libx-cap{display:block;padding:7px 9px 9px;line-height:1.25}
.libx-cap b{display:block;font-size:.84rem;font-weight:650;color:#1f2a36;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.libx-cap small{display:block;margin-top:2px;font-size:.72rem;color:#7b8695;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.libx-badge{position:absolute;top:7px;left:7px;padding:2px 7px;border-radius:999px;background:rgba(23,33,45,.78);color:#fff;font-size:.66rem}
.libx-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:14px;font-size:.84rem;color:#5b6675;font-variant-numeric:tabular-nums}
.libx-pager button{width:32px;height:30px;border:1px solid #d7dde6;border-radius:8px;background:#fff;cursor:pointer;font-size:1rem}
.libx-pager button:disabled{opacity:.4;cursor:default}
.libx-empty{grid-column:1/-1;padding:40px 12px;text-align:center;color:#7b8695}
.libx-prep{display:flex;align-items:center;gap:14px;margin-top:12px;padding:10px 12px;border:1px solid #bfddf8;border-radius:10px;background:#f1f8ff;font-size:.85rem}
.libx-prep>div{flex:1;min-width:0}.libx-prog{height:5px;margin-top:6px;border-radius:999px;background:#d8e9f9;overflow:hidden}.libx-prog span{display:block;height:100%;width:0;background:#2088ef;transition:width .2s}
.libx-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.libx-detail-img{aspect-ratio:1/1;border-radius:12px;background:#F4F4F2;display:grid;place-items:center;overflow:hidden}
.libx-detail-img img{width:100%;height:100%;object-fit:contain}
.libx-dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0 0 14px;font-size:.88rem}
.libx-dl dt{color:#7b8695}.libx-dl dd{margin:0;color:#1f2a36}
.libx-price{display:flex;align-items:flex-end;gap:10px}.libx-price .erp-field{flex:1}
.libx-note{margin-top:10px;font-size:.78rem;color:#7b8695}
@media (max-width:760px){.libx{grid-template-columns:1fr}.libx-tree{display:flex;flex-wrap:wrap;gap:4px;border-right:0;border-bottom:1px solid #e6ebf1;padding:8px}.libx-sec{width:100%;padding:4px 6px}.libx-tree button{width:auto;border-radius:999px;padding:5px 10px}.libx-subs{display:contents}.libx-detail{grid-template-columns:1fr}.libx-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}

/* V375 Lead ID · quote revisions */
.lead-code-chip{display:inline-block;margin-top:2px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.72rem;font-weight:600;color:#1769aa;letter-spacing:.02em}
.lead-case-card{display:grid;grid-template-columns:minmax(180px,auto) minmax(0,1fr) auto;gap:18px;align-items:center;margin-bottom:16px;padding:14px 18px;border:1px solid #cfe3f6;border-radius:14px;background:linear-gradient(90deg,#f2f8ff,#fff 60%)}
.lead-case-id small,.lead-case-quote small,.iq-rev-lead small{display:block;font-size:.66rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#7b8695}
.lead-case-id strong{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:1.35rem;color:#12324f;letter-spacing:.02em}
.lead-case-id span,.lead-case-quote span{display:block;font-size:.76rem;color:#6b7684;margin-top:2px}
.lead-case-quote a strong,.lead-case-quote>strong{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:1rem;color:#1769aa}
.lead-case-revs{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.lead-case-actions{display:flex;gap:8px;flex-wrap:wrap}
.iq-rev-badge{display:inline-block;margin-left:4px;padding:1px 7px;border-radius:999px;font-size:.66rem;font-weight:600;background:#eef1f4;color:#6b7684;vertical-align:1px}
.iq-rev-badge.current{background:#e3f6ec;color:#15803d}
.iq-rev-bar{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-bottom:12px;padding:10px 14px;border:1px solid #dfe5ec;border-radius:12px;background:#fbfcfd}
.iq-rev-lead strong{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:1.05rem;color:#12324f;margin-right:8px}
.iq-rev-lead a{font-size:.78rem;color:#1769aa;text-decoration:underline}
.iq-rev-chips{display:flex;flex-wrap:wrap;gap:6px}
.iq-rev-chip{display:inline-flex;flex-direction:column;align-items:center;min-width:52px;padding:4px 9px;border:1px solid #d7dde6;border-radius:9px;background:#fff;font-weight:700;font-size:.82rem;color:#26313d;line-height:1.15}
.iq-rev-chip small{font-size:.62rem;font-weight:500;color:#7b8695}
.iq-rev-chip.current{border-color:#86d0a3}
.iq-rev-chip.on{border-color:#2088ef;box-shadow:0 0 0 2px rgba(32,136,239,.18)}
.iq-rev-lock{flex:1 1 280px;font-size:.8rem;color:#8a5a00;background:#fff7e6;border:1px solid #f4dca6;border-radius:9px;padding:6px 10px}
@media (max-width:860px){.lead-case-card{grid-template-columns:1fr}}
/* V387 material sphere previews + built-in countertop / glass prices */
.rm-sphere{position:relative;width:58px;height:58px;flex:none;display:flex;align-items:center;justify-content:center}
.rm-sphere img{position:absolute;inset:0;width:58px;height:58px;object-fit:cover;border-radius:10px;z-index:1;background:#f4f4f2;border:1px solid #e2e8f0}
.rm-bi-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.rm-bi{display:flex;gap:9px;align-items:center;border:1px solid #e2e8f0;border-radius:10px;padding:8px;background:#fff}
/* V726 Material Library: type tree with folders, toolbar, multi-select table, copy / paste */
.mlx{font-size:13px;color:#0f172a}
.mlx-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #eef2f7}
.mlx-title{flex:1 1 320px;min-width:0}
.mlx-title h3{font-size:1.08rem;font-weight:700;letter-spacing:-.01em;margin:0;color:#0f172a}
.mlx-title p{font-size:.76rem;color:#64748b;line-height:1.5;margin:3px 0 0;max-width:780px}
.mlx-hacts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.mlx-search{position:relative;display:block;margin:0}
.mlx-search:before{content:'\2315';position:absolute;left:10px;top:50%;transform:translateY(-55%);color:#94a3b8;font-size:15px;pointer-events:none}
.mlx-search input{width:240px;height:36px;border:1px solid #dbe3ec;border-radius:10px;padding:0 10px 0 30px;font-size:13px;background:#f8fafc;color:#0f172a}
.mlx-search input:focus{outline:none;border-color:#5b8def;background:#fff;box-shadow:0 0 0 3px rgba(91,141,239,.15)}
#mlSaveBtn.is-dirty{box-shadow:0 0 0 3px rgba(245,158,11,.3)}
.mlx-ro{font-size:.74rem;color:#64748b;background:#f1f5f9;border-radius:999px;padding:5px 11px}
.mlx-wrap{display:grid;grid-template-columns:244px minmax(0,1fr);gap:16px;align-items:start}
.mlx-tree{border:1px solid #eef2f7;border-radius:12px;background:#fbfcfd;padding:6px;max-height:72vh;overflow:auto}
.mlx-tree a{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;border:1px solid transparent;cursor:pointer;color:#334155;user-select:none;line-height:1.3}
.mlx-tree a:hover{background:#eef2f7}
.mlx-tree a.on{background:#e0ebff;color:#1e40af;font-weight:600}
.mlx-tree a.empty{color:#a3afbf}
.mlx-car{width:10px;flex:none;color:#94a3b8;font-size:9px}
.mlx-tn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mlx-n{flex:none;min-width:22px;padding:0 7px;border-radius:999px;background:#eef2f7;color:#64748b;font-size:11px;line-height:18px;text-align:center;font-weight:600}
.mlx-tree a.on .mlx-n{background:#fff;color:#1e40af}
.mlx-tree a.empty .mlx-n{background:transparent;color:#cbd5e1}
.mlx-sub{margin:2px 0 6px 13px;padding-left:7px;border-left:1px solid #e2e8f0}
.mlx-sub a{font-size:12.5px;padding:5px 7px}
.mlx-ic{flex:none;width:16px;text-align:center;font-size:12px}
.mlx-none{color:#94a3b8}
.mlx-fa{display:none;gap:1px;flex:none}
.mlx-sub a:hover .mlx-fa{display:inline-flex}
.mlx-sub a:hover .mlx-fa+.mlx-n,.mlx-sub a:hover .mlx-n:has(+.mlx-fa){display:none}
.mlx-fa button{width:21px;height:21px;border:0;border-radius:5px;background:transparent;color:#64748b;font-size:12px;line-height:1;cursor:pointer}
.mlx-fa button:hover{background:#fff;color:#0f172a;box-shadow:0 0 0 1px #e2e8f0}
.mlx-fa button[data-mlfdel]:hover{color:#be123c}
.mlx-addf{display:block;width:100%;margin-top:4px;padding:5px 8px;border:1px dashed #cbd5e1;border-radius:8px;background:transparent;text-align:left;font-size:12px;color:#64748b;cursor:pointer}
.mlx-addf:hover{border-color:#5b8def;color:#1d4ed8;background:#fff}
.mlx-dragging .mlx-sub a[data-mldrop]{border-style:dashed;border-color:#93c5fd}
.mlx-tree a.drop{background:#dcfce7;border-color:#22c55e;border-style:solid;color:#166534}
.mlx-ghost{position:fixed;top:-200px;left:0;padding:5px 11px;border-radius:8px;background:#1e40af;color:#fff;font:600 12px ui-sans-serif,system-ui,"Segoe UI",sans-serif;white-space:nowrap}
.mlx-main{min-width:0;display:flex;flex-direction:column;gap:10px}
.mlx-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.mlx-crumb{flex:1 1 220px;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;font-size:14px}
.mlx-sep{color:#94a3b8}
.mlx-cnt{margin-left:4px;font-size:12px;color:#64748b}
.mlx-cnt b{color:#1d4ed8;font-weight:600}
.mlx-acts{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mlx-btn{height:30px;display:inline-flex;align-items:center;gap:5px;padding:0 10px;border:1px solid #dbe3ec;border-radius:8px;background:#fff;color:#334155;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.mlx-btn:hover:not(:disabled){background:#f1f5f9;border-color:#cbd5e1}
.mlx-btn:disabled{opacity:.45;cursor:default}
.mlx-btn.danger{color:#be123c}
.mlx-btn.danger:hover:not(:disabled){background:#fff1f2;border-color:#fecdd3}
select.mlx-btn{padding-right:4px}
.mlx-badge{min-width:18px;padding:0 5px;border-radius:999px;background:#1e40af;color:#fff;font-size:10.5px;line-height:16px;text-align:center}
.mlx-div{width:1px;height:20px;margin:0 2px;background:#e2e8f0}
.mlx-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8}
.mlx-chip{padding:2px 10px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:#475569;font-size:12px;font-weight:500;text-transform:none;letter-spacing:0;cursor:pointer}
.mlx-chip:hover{border-color:#cbd5e1;background:#f8fafc}
.mlx-chip.on{background:#1e40af;border-color:#1e40af;color:#fff}
.mlx-scroll{max-height:64vh;overflow:auto;border:1px solid #eef2f7;border-radius:12px}
.mlx-tbl{width:100%;border-collapse:separate;border-spacing:0;font-size:12.5px}
.mlx-tbl th{position:sticky;top:0;z-index:1;padding:8px 6px;background:#f8fafc;border-bottom:1px solid #e2e8f0;text-align:left;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#64748b;white-space:nowrap}
.mlx-tbl td{padding:4px 6px;border-bottom:1px solid #f1f5f9;background:#fff;vertical-align:middle}
.mlx-tbl tbody tr:last-child td{border-bottom:0}
.mlx-tbl tbody tr:hover td{background:#f8fafc}
.mlx-tbl tr.is-new td:first-child{box-shadow:inset 3px 0 0 #22c55e}
.mlx-tbl tr.is-on td{background:#eff6ff}
.mlx-tbl tr.is-on:hover td{background:#e6f0ff}
.mlx-tbl tr.is-on td:first-child{box-shadow:inset 3px 0 0 #3b82f6}
.mlx-tbl tr.is-off .mlx-in{color:#94a3b8}
.mlx-ck{width:30px;text-align:center}
.mlx-tbl td.mlx-grip{width:22px;padding:0 0 0 4px;color:#cbd5e1;cursor:grab;text-align:center;font-size:12px;letter-spacing:-3px;user-select:none}
.mlx-tbl td.mlx-grip:hover{color:#475569}
.mlx-in{height:28px;padding:0 7px;border:1px solid #e5eaf0;border-radius:6px;background:#fff;color:#0f172a;font-size:12.5px}
.mlx-in:hover:not(:disabled){border-color:#cbd5e1}
.mlx-in:focus{outline:none;border-color:#5b8def;box-shadow:0 0 0 3px rgba(91,141,239,.15)}
.mlx-in:disabled{border-color:transparent;background:transparent;color:#334155}
.mlx-acts-td{white-space:nowrap;text-align:right}
.mlx-mini{margin-left:4px;padding:3px 9px;border:1px solid #dbe3ec;border-radius:6px;background:#fff;color:#334155;font-size:12px;font-weight:500;cursor:pointer}
.mlx-mini:hover{background:#f1f5f9}
.mlx-mini.danger{border-color:transparent;background:transparent;color:#be123c}
.mlx-mini.danger:hover{background:#fff1f2}
.mlx-empty{padding:32px 12px!important;text-align:center;color:#94a3b8}
.mlx-tip{font-size:11.5px;color:#94a3b8;line-height:1.6}
.mlx-tip kbd{padding:0 4px;border:1px solid #e2e8f0;border-bottom-width:2px;border-radius:4px;background:#fff;color:#64748b;font:inherit;font-size:10.5px}
@media (max-width:900px){.mlx-wrap{grid-template-columns:minmax(0,1fr)}.mlx-tree{max-height:260px}.mlx-search input{width:100%}}
/* V727 Material Sales link, guide values, no text selection on Shift-click */
.mlx-tbl td{user-select:none}
.mlx-tbl .mlx-grip,.mlx-tbl .mlx-s1,.mlx-tbl .mlx-s2{position:sticky;z-index:1}
.mlx-tbl th.mlx-grip,.mlx-tbl th.mlx-s1,.mlx-tbl th.mlx-s2{z-index:3}
.mlx-tbl .mlx-grip{left:0;box-sizing:border-box;width:22px;min-width:22px;max-width:22px}
.mlx-tbl .mlx-s1{left:22px;box-sizing:border-box;width:30px;min-width:30px;max-width:30px}
.mlx-tbl.ro .mlx-s1{left:0}
.mlx-tbl .mlx-s2{left:52px;box-shadow:inset -1px 0 0 #e2e8f0}
.mlx-tbl.ro .mlx-s2{left:30px}
.mlx-tbl .mlx-in{user-select:text}
.mlx-in::placeholder{color:#a3afbf}
.mlx-sale{display:inline-block;padding:2px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:11px;font-weight:600;white-space:nowrap;cursor:default}
.mlx-sale.off{background:#f1f5f9;color:#64748b}
.mlx-sale.none{background:transparent;color:#94a3b8;font-weight:500;padding:2px 0}
/* V731 Items: photo, description and list details */
.inv-thumb{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;object-fit:contain;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:zoom-in}
.inv-thumb-none{color:#cbd5e1;cursor:default;font-size:12px}
.inv-desc{max-width:340px;margin-top:3px;font-size:11.5px;color:#334155;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.inv-meta{margin-top:2px;font-size:11px;color:#64748b}
/* V732 Sales: item picker with photos, photo + description on the line, photo on the invoice view */
#invPick{position:fixed;z-index:10050;max-height:330px;overflow:auto;padding:4px;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 14px 34px rgba(15,23,42,.18)}
.inv-pick-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:8px;cursor:pointer}
.inv-pick-row.on,.inv-pick-row:hover{background:#eff6ff}
.inv-pick-row img,.inv-pick-noimg{flex:none;width:46px;height:46px;object-fit:contain;border:1px solid #e2e8f0;border-radius:8px;background:#fff}
.inv-pick-noimg{display:flex;align-items:center;justify-content:center;color:#cbd5e1;font-size:12px}
.inv-pick-main{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.inv-pick-main b{font-size:13px;color:#0f172a}
.inv-pick-main span{font-size:12px;color:#334155;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inv-pick-main small,.inv-pick-r small{font-size:11px;color:#64748b}
.inv-pick-r{flex:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.3;font-size:12px;color:#334155}
.inv-pick-r b{font-size:12px;color:#0f172a}
.txn-item-wrap{display:flex;align-items:center;gap:6px}
.txn-item-photo{display:none;flex:none;width:38px;height:38px;border:1px solid #e2e8f0;border-radius:7px;background:#fff;overflow:hidden}
.txn-item-photo.has{display:block}
.txn-item-photo img{width:100%;height:100%;object-fit:contain}
.txn-item-desc{font-size:11.5px;color:#64748b;line-height:1.35;margin-top:2px}
.txn-item-desc:empty{display:none}
.inv-doc-item{display:flex;align-items:center;gap:8px}
.inv-doc-photo{flex:none;width:40px;height:40px;object-fit:contain;border:1px solid #e2e8f0;border-radius:6px;background:#fff}
/* V734 Quotes: status tabs, search, convert dialog */
.quote-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.quote-tabs{display:flex;flex-wrap:wrap;gap:6px}
.quote-tabs button{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:4px 12px;font-size:12.5px;color:#475569;cursor:pointer}
.quote-tabs button span{margin-left:4px;font-size:11px;color:#94a3b8}
.quote-tabs button.on{background:#0f172a;border-color:#0f172a;color:#fff}
.quote-tabs button.on span{color:#cbd5e1}
#quoteSearch{width:260px;max-width:100%;height:34px;border:1px solid #dbe3ec;border-radius:9px;padding:0 10px;font-size:13px}
.quote-conv-opt{display:flex;gap:10px;align-items:flex-start;padding:10px;border:1px solid #e2e8f0;border-radius:10px;cursor:pointer}
.quote-conv-opt input{margin-top:3px}
.quote-conv-opt span{display:flex;flex-direction:column;gap:2px}
.quote-conv-opt small{color:#64748b;font-size:12px}
/* V730 Link to Material Sales */
button.mlx-sale{border:0;max-width:190px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;cursor:pointer}
button.mlx-sale:hover:not(:disabled){background:#bbf7d0}
button.mlx-sale:disabled{cursor:default}
.mlx-dlg{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.35);padding:16px}
.mlx-dlg-box{width:min(620px,100%);max-height:86vh;display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 20px 50px rgba(0,0,0,.3);font-size:13px;color:#0f172a}
.mlx-dlg-h{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #eef2f7}
.mlx-dlg-h b{font-size:15px}
.mlx-dlg-h span{flex:1;min-width:0;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mlx-dlg-b{display:flex;flex-direction:column;gap:10px;padding:12px 16px 14px;min-height:0}
.mlx-dlg-b .mlx-search input{width:100%}
.mlx-dlg-cur{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:8px;background:#f0fdf4;color:#166534}
.mlx-dlg-list{display:flex;flex-direction:column;gap:4px;overflow:auto;min-height:120px;max-height:52vh;border:1px solid #eef2f7;border-radius:10px;padding:6px}
.mlx-dlg-list button{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;text-align:left;padding:7px 10px;border:1px solid transparent;border-radius:8px;background:#fff;cursor:pointer}
.mlx-dlg-list button:hover{background:#f1f5f9;border-color:#e2e8f0}
.mlx-dlg-list button.on{background:#eff6ff;border-color:#93c5fd}
.mlx-dlg-list button>span:last-child{flex-basis:100%;font-size:11.5px;color:#64748b}

/* ==============================================================
   V822 · UI consistency: one field-label size, 36px form controls,
   labelled inline page forms, Cancel-then-primary footers on the
   right, and a ✕ close button on the light dialogs (.mlx-dlg-h).
   Typography scale itself is unchanged.
   ============================================================== */
/* V822 · every .erp-field label uses the standard 12px (invoice header was 10px, older layers 11px) */
.erp-field label,
.modal-body .erp-field label,
.invoice-edit-header .erp-field label,
.sale-payment-form .erp-field label,
.direct-expense-form .erp-field label { font-size: 12px; }

/* V822 · standard form inputs / selects are 36px high (modal 44px, payment 46px, expense 42px, sale payment 35px) */
.modal-body .erp-field input,
.modal-body .erp-field select,
.b2c-payment-form .erp-field input,
.b2c-payment-form .erp-field select { min-height: 36px; }
.sale-payment-form input,
.sale-payment-form select { height: 36px; }
@media (min-width: 581px) {
  .direct-expense-form .erp-field input,
  .direct-expense-form .erp-field select { height: 36px !important; min-height: 36px !important; }
  .direct-expense-form .erp-field input { line-height: 34px !important; }
}

/* V822 · inline page forms (New customer / project / vendor / employee): label above each field, 36px controls */
.erp-form .erp-field input:not([type=checkbox]):not([type=radio]):not([type=file]),
.erp-form .erp-field select,
.erp-form .erp-field textarea { width: 100%; border: 1px solid #d7dee8; border-radius: 8px; background: #fff; color: #1f2937; font-size: 14px; }
.erp-form .erp-field input:not([type=checkbox]):not([type=radio]):not([type=file]),
.erp-form .erp-field select { height: 36px; padding: 0 10px; }
.erp-form .erp-field textarea { padding: 8px 10px; resize: vertical; }

/* V822 · form footers: Cancel then the primary button, right-aligned (same as the modals) */
.erp-form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.item-form-actions,
.lead-form-actions { justify-content: flex-end; }

/* V822 · light dialogs close with the same round ✕ as .modal-head */
.mlx-dlg-x { margin-left: auto; flex: 0 0 auto; border: none; background: transparent; font-size: 1.05rem; line-height: 1; color: #94a3b8; cursor: pointer; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.mlx-dlg-x:hover { color: #0f172a; background: #f1f5f9; }

/* V822 · on-screen invoice preview heading uses the app font (print documents carry their own fonts) */
.invoice-paper-head b,
.invoice-paper-head h2 { font-family: inherit; }

/* Sign-in card spacing: the app has no general .mt-4 rule, so the first label and the buttons sat against the fields above them */
.login-card .mt-4 { margin-top: 1rem; }
.login-card .login-sub { margin-bottom: .25rem; }
