:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #202023;
  background: #f5f5f5;
  font-synthesis: none;
  --accent: #c92030;
  --accent-soft: #fff0f1;
  --ink: #18181b;
  --muted: #646468;
  --border: #e3e3e5;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; border-radius: 9px; background: var(--accent); color: #fff; padding: 13px 20px; font-weight: 600; }
button:hover { filter: brightness(.95); }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
svg { display: block; width: 22px; height: 22px; flex: none; }
[data-icon] { display: inline-flex; flex: none; }
.muted, .hint { color: var(--muted); line-height: 1.65; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; color: var(--accent); }
.brand { font-size: 23px; font-weight: 750; letter-spacing: 1px; white-space: nowrap; }
.brand span { font-size: 10px; background: var(--accent); color: #fff; border-radius: 5px; padding: 4px 7px; margin-left: 6px; vertical-align: middle; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); }

/* Sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.intro { background: radial-gradient(ellipse at 8% 100%, #f7b56c55 0, transparent 45%), radial-gradient(circle at 88% 12%, #fff5 0, transparent 22%), linear-gradient(155deg, #421a21 0%, #812a38 58%, #dc3650 100%); color: #fff; padding: 54px 9%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; border-bottom: 0; }
.intro .eyebrow { color: #ffd6dc; }
.intro h1 { font-size: clamp(32px,3.6vw,56px); line-height: 1.16; letter-spacing: -2px; }
.intro p:not(.eyebrow) { color: #fff2f3; max-width: 390px; line-height: 1.8; }
.intro small { color: #ffe4e8; }
.form-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff9fa; }
form { width: 100%; max-width: 390px; }
#auth-form { padding: 32px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px #74243424; }
#auth-form .eyebrow { margin-top: 0; }
#auth-form button { margin-top: 24px; }
form h2 { font-size: 28px; letter-spacing: -.7px; }
label { display: block; margin: 22px 0 8px; font-size: 14px; font-weight: 600; }
input { width: 100%; padding: 14px; border: 1px solid #bfbfc4; border-radius: 8px; background: #fff; color: var(--ink); accent-color: var(--accent); }
input::placeholder { color: #727277; }
input:focus { outline: 3px solid #f8d7db; border-color: var(--accent); }
form button { width: 100%; margin-top: 4px; }
.hint { font-size: 12px; }
#error { color: #b31c2c; min-height: 20px; font-size: 14px; }
.loading { text-align: center; padding: 40px; }

/* Navigation */
.workspace { min-height: 100vh; }

/* Page frame */
.content { padding: 0 36px; min-width: 0; max-width: 1400px; margin: 0 auto; }
.topbar { height: 83px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 16px; font-size: 13px; }
.breadcrumb { color: #66666c; display: flex; align-items: center; min-width: 0; }
.company-logo { display: inline-flex; flex: none; border-radius: 3px; }
.company-logo .company-wordmark { display: block; width: 132px; height: auto; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { padding: 0 13px; color: #86868d; }
.breadcrumb strong { color: #36363c; font-weight: 500; }
.account { display: flex; align-items: center; gap: 11px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #f0c6cb; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.secondary { background: #fff; border: 1px solid #d5d5d9; color: #424248; font-size: 12px; padding: 8px 13px; margin-left: 7px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 36px 0 30px; }
.page-heading .eyebrow { margin: 0 0 11px; }
.page-heading h1 { font-size: clamp(24px,2.25vw,36px); letter-spacing: -1.1px; line-height: 1.2; margin: 0; font-weight: 700; }
.title-dot { color: var(--accent); }
.page-heading .muted { font-size: 14px; margin: 12px 0 0; }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; margin-top: 24px; }
.back-link svg { width: 17px; height: 17px; }
.back-link:not([hidden]) + .page-heading { margin-top: 22px; }

/* Kanban */
.board-section { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px; box-shadow: 0 3px 14px #00000003; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.board-caption { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.board-icon { color: var(--accent); }
.board-caption h2 { font-size: 16px; letter-spacing: -.2px; margin: 0; }
.count { font-size: 11px; padding: 3px 7px; border-radius: 5px; background: #f0f0f2; color: #616168; }
.search { display: flex; align-items: center; gap: 8px; background: #fafafa; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; margin: 0; width: 220px; }
.search svg { width: 17px; height: 17px; color: #6c6c73; }
.search input { font-size: 12px; border: 0; background: transparent; padding: 10px 0; border-radius: 4px; min-width: 0; }
.search:focus-within { outline: 2px solid var(--accent); }
.search input:focus { outline: none; }
.kanban { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: stretch; }
.kanban-column { background: #f5f5f6; border: 1px solid #ececee; border-radius: 10px; padding: 15px; min-width: 0; }
.column-heading { display: flex; align-items: center; gap: 7px; padding: 2px; }
.column-heading h3 { font-size: 13px; margin: 0; font-weight: 650; }
.column-dot { height: 7px; width: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.team .column-dot { background: #29292e; }
.management .column-dot { background: #77777e; }
.column-count { margin-left: auto; font-size: 11px; color: #5b5b62; background: #e8e8eb; min-width: 19px; text-align: center; border-radius: 4px; padding: 2px 4px; }
.column-subtitle { font-size: 12px; color: #68686f; margin: 8px 2px 18px; line-height: 1.5; }
.module-card { display: block; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid #e0e0e4; border-radius: 11px; padding: 18px 16px 0; margin-bottom: 13px; box-shadow: 0 2px 3px #00000004; transition: transform .15s, box-shadow .15s, border-color .15s; font-weight: 400; }
.module-card:last-child { margin-bottom: 0; }
.module-card:hover { filter: none; transform: translateY(-3px); border-color: #d98a92; box-shadow: 0 8px 22px #40101810; }
.card-top { display: flex; align-items: center; gap: 11px; }
.module-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#fff6f6,#fce6e9); color: var(--accent); border: 1px solid #f2ced3; flex: none; box-shadow: inset 0 1px 0 #fff; }
.module-icon svg { width: 29px; height: 29px; }
.card-label { font-size: 9px; font-weight: 700; letter-spacing: .6px; color: #68686e; overflow-wrap: anywhere; }
.card-arrow { color: #727279; margin-left: auto; }
.card-arrow svg { width: 16px; height: 16px; }
.card-title { display: block; font-size: 21px; font-weight: 650; letter-spacing: -.4px; margin: 16px 0 8px; }
.card-description { display: block; color: #626269; font-size: 13px; line-height: 1.7; min-height: 44px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; border-top: 1px solid #ededf0; margin-top: 18px; padding: 13px 0; font-size: 11px; }
.planned { display: flex; gap: 5px; align-items: center; color: #696970; }
.planned > span { width: 5px; height: 5px; background: #87878f; border-radius: 50%; }
.card-link { color: #b21c2a; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.card-link svg { width: 15px; height: 15px; }
.column-empty { font-size: 13px; color: #696970; text-align: center; padding: 30px 0; }
.empty-search { font-size: 13px; color: #5c5c63; text-align: center; padding: 20px; }
.warehouse-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
.warehouse-board .kanban-column { min-height: 345px; }
.warehouse-board .module-card { padding: 24px 24px 0; }
.warehouse-board .module-icon { width: 62px; height: 62px; border-radius: 16px; }
.warehouse-board .module-icon svg { width: 38px; height: 38px; }
.warehouse-board .card-title { font-size: 25px; margin-top: 23px; }
.warehouse-board .card-description { font-size: 14px; }

/* Supporting content and dialogs */
.page-footer { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; letter-spacing: .3px; color: #727279; padding: 25px 1px; }
.page-footer > span:first-child { font-weight: 700; }
dialog { width: min(500px,calc(100% - 32px)); border: 1px solid #dedee3; border-top: 4px solid var(--accent); border-radius: 16px; padding: 28px; color: var(--ink); box-shadow: 0 25px 100px #0003; }
dialog::backdrop { background: #10101499; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.icon-button { font-size: 25px; line-height: 1; background: #f1f1f3; color: #5b5b64; padding: 3px 9px; }
.dialog-heading .eyebrow { margin: 0; }
dialog h2 { font-size: 28px; margin: 20px 0 10px; }
dialog .muted { font-size: 14px; }
dialog h3 { font-size: 13px; margin-top: 26px; }
dialog ul { padding-left: 20px; font-size: 13px; line-height: 2; color: #56565e; }
dialog li::marker { color: var(--accent); }
.dialog-note { font-size: 12px; line-height: 1.7; background: #f5f5f6; padding: 13px; border-radius: 8px; color: #62626a; }
dialog > button { margin-top: 10px; font-size: 13px; }

@media(min-width:1600px) {
  .content { padding: 0 56px; }
  .kanban-column { padding: 18px; }
  .module-card { padding: 20px 20px 0; }
  .card-label { font-size: 10px; }
  .card-title { font-size: 22px; }
  .card-bottom { font-size: 12px; }
  .column-heading h3 { font-size: 15px; }
}
@media(max-width:1150px) {
  .content { padding: 0 22px; }
  .kanban { gap: 10px; }
  .kanban-column { padding: 10px; }
  .module-card { padding: 15px 12px 0; }
  .card-label { font-size: 9px; letter-spacing: .3px; }
  .column-heading h3 { font-size: 12px; }
}
@media(max-width:1000px) {
  .board-section { padding: 15px; }
  .kanban { grid-template-columns: 1fr; }
  .kanban-column { padding: 15px; }
  .module-card { padding: 18px 18px 0; }
  .card-label { font-size: 10px; }
  .card-description { font-size: 14px; min-height: 0; }
  .card-bottom { font-size: 12px; }
  .column-heading h3 { font-size: 15px; }
  .search { width: 170px; }
  .warehouse-board .kanban-column { min-height: 0; }
}
@media(max-width:600px) {
  .auth { grid-template-columns: 1fr; }
  .intro { min-height: auto; padding: 25px; }
  .intro > div:nth-child(2), .intro small { display: none; }
  .form-panel { padding: 24px; }
  .workspace { display: block; }
  .content { padding: 0 16px; }
  .topbar { height: 66px; }
  .breadcrumb { font-size: 11px; }
  .company-logo .company-wordmark { width: 100px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 66px; padding: 14px 0; gap: 12px; }
  .breadcrumb span { padding: 0 5px; }
  .account { gap: 7px; font-size: 12px; }
  #user { max-width: 85px; overflow: hidden; text-overflow: ellipsis; }
  .avatar { display: none; }
  .secondary { margin-left: 0; padding: 7px 9px; }
  .page-heading { margin: 27px 0 23px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading .muted { font-size: 13px; }
  .board-toolbar { align-items: stretch; flex-direction: column; gap: 15px; margin-bottom: 16px; }
  .search { width: 100%; }
  .search input { font-size: 13px; }
  .board-caption h2 { font-size: 16px; }
  .page-footer { font-size: 9px; }
  .warehouse-board .module-card { padding: 18px 18px 0; }
  dialog { padding: 22px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Dashboards */
#dashboards-view{display:grid;gap:16px}.dashboard-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.dashboard-choice{display:block;min-height:190px;padding:24px;border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:13px;background:#fff;color:var(--ink);text-decoration:none;box-shadow:0 3px 14px #00000005}.dashboard-choice:hover{border-color:#d98a92;transform:translateY(-2px)}.dashboard-choice small{font-size:10px;color:var(--accent);font-weight:700;letter-spacing:1px}.dashboard-choice h2{margin:14px 0 8px;font-size:23px}.dashboard-choice p{min-height:42px;margin:0;color:var(--muted);font-size:13px;line-height:1.55}.dashboard-choice span{display:block;margin-top:18px;color:var(--accent);font-size:13px;font-weight:700}.dashboard-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.dashboard-kpi{min-height:124px;padding:17px;border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:11px;background:#fff}.dashboard-kpi-risk{border-left-color:#d89415}.dashboard-kpi span{display:block;font-size:11px;color:var(--muted)}.dashboard-kpi strong{display:block;margin:13px 0 4px;font-size:23px;letter-spacing:-.5px}.dashboard-kpi small{font-size:11px;color:var(--muted)}.dashboard-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.dashboard-panel{padding:20px;border:1px solid var(--border);border-radius:13px;background:#fff}.dashboard-panel h2{margin:0;font-size:18px}.dashboard-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.dashboard-open{color:var(--accent);font-size:12px;font-weight:650;text-decoration:none;white-space:nowrap}.dashboard-alert{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid var(--border)}.dashboard-alert strong,.dashboard-alert small{display:block}.dashboard-alert strong{font-size:13px}.dashboard-alert small,.dashboard-progress-row small{margin-top:4px;color:var(--muted);font-size:11px}.dashboard-progress-row{padding:14px 0;border-top:1px solid var(--border)}.dashboard-progress-head{display:flex;justify-content:space-between;gap:12px;font-size:12px}.dashboard-progress-head span{color:var(--muted);white-space:nowrap}.dashboard-progress-bar{height:7px;overflow:hidden;margin-top:9px;border-radius:99px;background:#e8eaec}.dashboard-progress-bar span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.dashboard-ok{padding:20px 0 8px;color:#287547;font-size:13px}@media(max-width:1000px){.dashboard-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-layout{grid-template-columns:1fr}}@media(max-width:600px){.dashboard-choice-grid,.dashboard-kpis{grid-template-columns:1fr}.dashboard-kpi{min-height:0}.dashboard-alert{align-items:flex-start;flex-direction:column;gap:7px}}
.sales-order-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:11px;background:#fff}.sales-order-table{width:100%;min-width:1050px;border-collapse:collapse;font-size:12px}.sales-order-table th{padding:12px 10px;background:#f7f7f8;border-bottom:1px solid var(--border);color:#44444b;text-align:left;font-size:10px;white-space:nowrap}.sales-order-table td{padding:11px 10px;border-bottom:1px solid var(--border);vertical-align:middle;white-space:nowrap}.sales-order-table tbody tr:last-child td{border-bottom:0}.sales-order-table tbody tr:hover{background:#fff6f7}.sales-order-table td:nth-child(5),.sales-order-table td:nth-child(6),.sales-order-table td:nth-child(7),.sales-order-table td:nth-child(8){text-align:right}.sales-order-table-progress{display:flex;align-items:center;gap:7px;width:96px;height:7px;border-radius:9px;background:#e4e6e8}.sales-order-table-progress span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.sales-order-table-progress b{margin-left:4px;transform:translateX(3px);font-size:11px;white-space:nowrap}
.report-print{background:#d91f3a!important;border:1px solid #171719!important;color:#fff!important}.report-print:hover{background:#bd1830!important;border-color:#000!important;filter:none!important}.report-print:focus-visible{outline:3px solid #171719!important;outline-offset:2px!important}

/* Home module navigation */
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.module-grid .module-card { margin: 0; padding: 24px 24px 0; }
.module-grid.enterprise-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.enterprise-modules .module-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 5px; padding: 16px; }
.enterprise-modules .card-top { display: contents; }
.enterprise-modules .module-icon { grid-column: 1; grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 11px; }
.enterprise-modules .module-icon svg { width: 25px; height: 25px; }
.enterprise-modules .card-title { grid-column: 2; grid-row: 1; margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.enterprise-modules .card-description { grid-column: 2; grid-row: 2; min-height: 0; font-size: 12px; line-height: 1.5; }
.enterprise-modules .card-arrow { grid-column: 3; grid-row: 1; margin: 0; }
.enterprise-modules .card-label, .enterprise-modules .card-bottom { display: none; }
.enterprise-modules .module-card:hover { transform: translateY(-1px); }
.enterprise-modules .module-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-module-sortable .module-card { cursor: grab; user-select: none; }
.home-module-sortable .module-card:active { cursor: grabbing; }
.home-module-sortable .module-card.is-dragging { opacity: .45; border-style: dashed; transform: scale(.98); }
.home-module-sortable .module-card.is-drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
@media (max-width: 1100px) {
  .module-grid.enterprise-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .module-grid.enterprise-modules { grid-template-columns: 1fr; gap: 9px; }
  .module-grid.enterprise-modules .module-card { padding: 14px; }
}
@media(max-width:600px) {
  .module-grid { grid-template-columns: 1fr; gap: 14px; }
  .module-grid .module-card { padding: 20px 20px 0; }
}
/* Wire rod receiving */
.receiving-board { grid-template-columns: minmax(0, 420px); }
.catalog-heading { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin: 30px 0 26px; }
.catalog-heading .eyebrow { margin: 0 0 8px; font-size: 10px; }
.catalog-heading h1 { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.8px; margin: 0; }
.catalog-heading .muted { margin: 7px 0 0; font-size: 12px; }
.catalog-search { display: flex; width: 450px; max-width: 100%; flex-shrink: 1; }
.catalog-search input { min-width: 0; border-radius: 9px 0 0 9px; font-size: 13px; }
.catalog-search button { width: auto; margin: 0; border-radius: 0 9px 9px 0; font-size: 12px; padding: 0 24px; }
.catalog-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 18px; align-items: start; }
.catalog-categories { background: #fff; padding: 8px; border: 1px solid var(--border); border-radius: 11px; }
.catalog-categories button { display: flex; justify-content: space-between; width: 100%; padding: 12px 10px; background: transparent; color: var(--muted); font-size: 11px; text-align: left; border-radius: 6px; }
.catalog-categories button.active { background: var(--accent); color: #fff; }
.catalog-main { min-width: 0; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 15px; }
.catalog-filters select { font: inherit; font-size: 11px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 12px 10px; max-width: 100%; }
.catalog-filters select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#catalog-count { margin-left: auto; font-size: 11px; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 205px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 6px 18px #00000004; transition: border-color .15s, transform .15s; }
.product-card:hover { filter: none; border-color: var(--accent); transform: translateY(-2px); }
.product-symbol { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 750; margin-bottom: 17px; }
.product-code { display: block; font-size: 9px; letter-spacing: .6px; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.product-name { font-size: 13px; font-weight: 700; margin-top: 7px; line-height: 1.4; }
.product-category { font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 7px; }
.product-select { margin-top: auto; padding-top: 30px; font-size: 11px; color: var(--muted); }
.product-card:hover .product-select { color: var(--accent); }
.product-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 14px; margin: 24px 0; }
.product-details dt { color: var(--muted); }
.product-details dd { margin: 0; font-weight: 600; }
@media(max-width:1150px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .catalog-layout { grid-template-columns: 170px minmax(0, 1fr); } }
@media(max-width:850px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .catalog-heading { align-items: flex-start; flex-direction: column; gap: 18px; } .catalog-search { width: 100%; max-width: none; } }
@media(max-width:600px) { .catalog-layout { grid-template-columns: 1fr; } .catalog-categories { display: flex; } .catalog-categories button { gap: 12px; } .product-card { padding: 15px; } .product-grid { gap: 10px; } .breadcrumb { flex-wrap: wrap; row-gap: 6px; } #breadcrumb-current { font-size: 11px; } }
@media(max-width:360px) { .product-grid { grid-template-columns: 1fr; } }
/* Receiving form */
.receiving-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; gap: 20px; margin: 26px 0; }
.selected-product, .receiving-form { border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 24px; box-shadow: 0 8px 25px #00000004; }
.selected-product .eyebrow { font-size: 10px; margin: 0 0 20px; color: var(--muted); }
.selected-product h2 { font-size: 17px; margin: 10px 0 0; }
.selected-product .muted { font-size: 11px; margin: 3px 0 26px; }
.selected-product a { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--accent); }
.receiving-form { width: 100%; max-width: none; }
.tag-panel { background: var(--ink); color: #fff; border-radius: 11px; padding: 22px 20px; display: flex; justify-content: space-between; align-items: center; gap: 22px; min-height: 122px; }
.tag-panel .eyebrow { color: #ff9da6; font-size: 10px; margin: 0 0 8px; }
.tag-panel h2 { font-size: 19px; margin: 0; letter-spacing: -.3px; }
.tag-panel p:not(.eyebrow) { font-size: 11px; color: #d0cdd0; line-height: 1.5; max-width: 480px; margin: 6px 0 0; }
.tag-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.tag-actions button { width: auto; margin: 0; font-size: 12px; white-space: nowrap; }
.tag-actions label { width: 175px; font-size: 10px; font-weight: 400; margin: 0; }
.tag-actions input { font-size: 10px; background: transparent; border: 0; color: #fff; padding: 7px 0 0; border-radius: 0; }
.receiving-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 24px 0 20px; }
.receiving-heading .eyebrow { font-size: 10px; color: var(--muted); margin: 0 0 8px; }
.receiving-heading h2 { font-size: 22px; margin: 0; }
.receiving-heading small { font-size: 10px; color: var(--muted); }
.receiving-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.receiving-fields label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.receiving-fields input, .receiving-fields textarea, .receiving-fields select { margin-top: 7px; font: inherit; font-size: 13px; padding: 13px; width: 100%; border: 1px solid #d5d5d9; border-radius: 8px; color: var(--ink); background: #fff; }
.receiving-fields textarea { resize: vertical; min-height: 65px; }
.receiving-fields textarea:focus { outline: 3px solid #f8d7db; border-color: var(--accent); }
.receiving-notes { grid-column: 1 / -1; }
#save-coil { padding: 16px; }
#receiving-status, #camera-status { font-size: 12px; line-height: 1.6; }
#receiving-status:empty, #camera-status:empty { display: none; }
#save-coil { margin-top: 22px; }
#tag-preview { margin-top: 16px; }
#tag-preview video, #tag-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #f5f5f5; border-radius: 8px; }
#tag-preview button { width: auto; margin: 10px 0 0; }
@media(max-width:1200px) { .receiving-layout { grid-template-columns: 240px minmax(0, 1fr); } .tag-panel { flex-direction: column; align-items: flex-start; } }
@media(max-width:800px) { .receiving-layout { grid-template-columns: 1fr; } .selected-product .muted { margin-bottom: 14px; } }
@media(max-width:500px) { .receiving-form, .selected-product { padding: 18px; } .receiving-fields { grid-template-columns: 1fr; } .tag-actions { flex-wrap: wrap; } .receiving-heading { align-items: flex-start; flex-direction: column; } }
/* Wire rod stock */
.stock-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.stock-toolbar p, #stock-status { font-size: 13px; line-height: 1.6; }
.stock-toolbar button { flex: none; }
.stock-summary { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin: 20px 0 28px; }
.stock-summary > div, .stock-grade { border: 1px solid var(--border); border-radius: 12px; padding: 22px; background: #fff; }
.stock-summary > div:first-child { background: var(--ink); color: #fff; border-top: 3px solid var(--accent); }
.stock-summary span { display: block; font-size: 13px; }
.stock-summary strong { display: block; font-size: clamp(24px, 3vw, 36px); margin-top: 12px; font-variant-numeric: tabular-nums; }
.stock-summary small { display: block; margin-top: 6px; color: #d0cdd0; }
.stock-heading { font-size: 18px; margin: 0 0 16px; }
.stock-grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.stock-grade span { font-size: 12px; color: var(--muted); }
.stock-grade strong { display: block; margin-top: 9px; font-size: 21px; color: var(--accent); }
.stock-table-panel { padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.stock-table-scroll { overflow-x: auto; }
.stock-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
.stock-table th { background: #f5f5f6; color: var(--muted); font-weight: 600; }
.stock-table th, .stock-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stock-table th:nth-child(n+3), .stock-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.stock-table td:last-child { font-weight: 700; }
.stock-table details { min-width: 260px; }
.stock-table summary { cursor: pointer; font-weight: 700; }
.stock-coil-list { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: normal; }
.stock-coil-list p { margin: 5px 0; }
@media(max-width:700px) { .stock-summary { grid-template-columns: 1fr 1fr; } .stock-summary > div:first-child { grid-column: 1 / -1; } .stock-grades { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stock-table-panel { padding: 15px; } }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
#tag-preview .photo-actions button { width: auto; margin: 0; }
#capture-tag { padding: 12px 20px; }
#manufacturer-hint { display: block; margin-top: 6px; font-size: 11px; line-height: 1.5; }
#coil-manufacturer[readonly] { background: #f5f5f6; cursor: default; }
/* Employees */
.employee-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:24px 0; }
.employee-toolbar h2 { margin:0; font-size:23px; letter-spacing:-.6px; }
.employee-toolbar p { font-size:12px; margin:7px 0 0; }
.employee-search { display:flex; gap:10px; align-items:center; }
.employee-search input { width:280px; font-size:12px; }
.employee-search select { padding:13px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--ink); }
.employee-search button { white-space:nowrap; font-size:12px; }
.employee-group { border:1px solid var(--border); border-radius:12px; background:#fff; overflow:hidden; margin-bottom:16px; }
.employee-group-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; background:var(--ink); color:#fff; padding:16px 20px; border-left:4px solid var(--accent); }
.employee-group-heading h3 { margin:0; font-size:15px; }
.employee-group-heading span { font-size:11px; color:#ccc; }
.employee-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.employee-card { display:flex; align-items:center; gap:10px; padding:17px 14px; text-decoration:none; color:var(--ink); border-right:1px solid var(--border); border-bottom:1px solid var(--border); min-width:0; }
.employee-card:hover { background:var(--accent-soft); }
.employee-card strong { display:block; font-size:12px; overflow-wrap:anywhere; }
.employee-card small { display:block; font-size:10px; color:var(--muted); line-height:1.5; margin-top:5px; }
.employee-avatar { width:40px; height:40px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-weight:700; display:grid; place-items:center; flex:none; overflow:hidden; }
.employee-avatar img { width:100%; height:100%; object-fit:cover; }
.employee-pay-badge { font-size:9px; color:var(--accent); background:var(--accent-soft); padding:4px 6px; border-radius:10px; margin-left:auto; }
.employee-empty { color:var(--muted); padding:16px 20px; font-size:12px; grid-column:1/-1; }
.employee-editor-layout { display:grid; grid-template-columns:250px minmax(0,1fr); gap:20px; margin-top:26px; align-items:start; }
.employee-editor-layout.detail { grid-template-columns:1fr; }
.employee-panel { background:#fff; padding:24px; border:1px solid var(--border); border-radius:13px; width:100%; max-width:none; }
.employee-panel h3 { font-size:17px; margin:0 0 20px; }
.employee-panel label { margin:0; font-size:12px; color:var(--muted); font-weight:400; }
.employee-panel input,.employee-panel select,.employee-panel textarea { width:100%; margin:7px 0 0; padding:11px; border:1px solid #d5d5d9; border-radius:7px; background:#fff; color:var(--ink); font:inherit; font-size:13px; }
.employee-panel textarea { min-height:70px; resize:vertical; }
.employee-panel button { margin-top:16px; width:auto; font-size:12px; }
.employee-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 16px; }
.employee-wide { grid-column:1/-1; }
.employee-panel p[role=status],#employee-load-status { font-size:12px; line-height:1.6; }
.employee-profile { display:flex; align-items:center; justify-content:space-between; margin:22px 0; gap:20px; }
.employee-profile h2 { font-size:30px; margin:0; }
.employee-profile .muted { font-size:13px; }
.employee-profile .employee-avatar { width:90px; height:90px; border-radius:16px; font-size:30px; background:var(--accent); color:#fff; }
.employee-actions { display:flex; gap:12px; flex-wrap:wrap; }
.employee-actions .secondary { margin-left:0; }
.danger { color:var(--accent); border-color:#e0a4aa; }
#employee-photo-status { display:block; font-size:11px; margin-top:6px; }
@media(max-width:1100px){.employee-cards{grid-template-columns:repeat(3,minmax(0,1fr));}.employee-toolbar{align-items:flex-start;flex-direction:column;}.employee-fields{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:750px){.employee-editor-layout{grid-template-columns:1fr;}.employee-cards{grid-template-columns:repeat(2,minmax(0,1fr));}.employee-search{flex-wrap:wrap;width:100%;}.employee-search input{width:100%;}.employee-pay-badge{display:none;}}
@media(max-width:480px){.employee-fields,.employee-cards{grid-template-columns:1fr;}.employee-panel{padding:18px;}.employee-profile h2{font-size:24px;}}
/* Operational administration uses the ERP palette. */
.admin-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;margin-top:24px;align-items:start}
.admin-sections{display:grid;gap:20px}.admin-panel{background:white;border:1px solid var(--border);border-radius:14px;overflow:hidden}
.admin-panel>h2{margin:0;padding:17px 22px;background:var(--ink);color:white;font-size:17px}
.admin-model-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:15px 22px;border-bottom:1px solid var(--border)}
.admin-model-row:last-child{border:0}.admin-model-row>a{font-weight:600}.admin-model-row a,.admin-event a{color:var(--ink);text-decoration:none}.admin-model-row a:hover,.admin-event a:hover{color:var(--accent);text-decoration:underline}
.admin-row-actions{display:flex;gap:25px;flex-shrink:0}.admin-row-actions a{color:var(--accent);font-size:13px;font-weight:600}
.admin-event{padding:16px 20px;border-bottom:1px solid var(--border)}.admin-event p{margin:8px 0 4px;font-size:13px}.admin-event small,.admin-model-row small{color:var(--muted)}
.admin-entry{padding:30px;max-width:650px}.admin-entry>h2{background:none;color:var(--ink);padding:0;font-size:26px}.admin-primary{display:inline-block;background:var(--accent);color:white;text-decoration:none;padding:12px 18px;border-radius:8px;font-weight:600}.admin-entry .admin-primary{margin-top:18px}
.location-picker{display:grid;gap:2px;min-width:122px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.location-picker select{min-height:31px;padding:4px 26px 4px 8px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--ink);font:600 12px inherit;text-transform:none;letter-spacing:0;cursor:pointer}
.admin-list-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.admin-form{padding:26px;margin-top:20px}.admin-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px}.admin-fields label{display:flex;flex-direction:column;gap:8px}.admin-fields input[type=checkbox]{width:20px;height:20px}.admin-fields select[multiple]{min-height:110px}.admin-fields textarea{min-height:100px}.admin-cancel{margin-left:20px;color:var(--muted)}.admin-records{margin-top:20px}.admin-empty{padding:15px 22px}.admin-error{color:var(--accent)}
#admin-view>input[type=search]{max-width:540px}#admin-view [hidden]{display:none!important}
@media(max-width:900px){.admin-layout{grid-template-columns:1fr}.admin-recent{order:2}}@media(max-width:600px){.admin-fields{grid-template-columns:1fr}.admin-model-row{align-items:flex-start;flex-direction:column;gap:10px;padding:15px}.admin-row-actions{width:100%;justify-content:space-between}.admin-list-heading{align-items:flex-start;flex-direction:column}.admin-form{padding:18px}}
#admin-view .admin-form{width:100%;max-width:960px;margin:20px 0;display:block}
.admin-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-fields label{margin:0}.admin-fields input,.admin-fields select,.admin-fields textarea{width:100%;min-width:0;margin:0;padding:12px;border:1px solid var(--border);border-radius:8px;font:inherit}.admin-form>button{width:auto;min-width:150px}.admin-recent>p{padding:0 20px}.admin-fields input[type=checkbox]{padding:0}
.admin-fields .admin-field-wide{grid-column:1/-1}
@media(max-width:600px){.admin-fields{grid-template-columns:minmax(0,1fr)}}
/* Supplies dashboard */
.supply-hero{display:flex;justify-content:space-between;align-items:center;gap:32px;background:var(--ink);color:#fff;border-radius:16px;padding:32px 36px;overflow:hidden}.supply-hero .eyebrow{color:#ff7783;margin:0 0 12px}.supply-hero h2{font-size:29px;letter-spacing:-.8px;margin:0 0 10px}.supply-hero p:not(.eyebrow){color:#bcbcc3;font-size:14px;max-width:540px;margin:0;line-height:1.6}.supply-hero-actions{margin-top:23px}.supply-primary{background:var(--accent);color:#fff;border:0;border-radius:8px;padding:13px 20px;font-weight:600}.supply-readonly{font-size:12px;color:#ddd}.supply-symbol{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#f5f5f6;color:#717179;flex-shrink:0}.supply-symbol svg{width:28px;height:28px}.supply-hero-art{display:flex;align-items:center;flex-direction:column;gap:17px;padding:0 20px}.supply-hero-art .supply-symbol{width:120px;height:120px;border:1px solid #ffffff17;background:#ffffff05;transform:rotate(-8deg);color:#e33b4a;border-radius:26px;box-shadow:20px -15px 0 #ffffff03}.supply-hero-art svg{width:78px;height:78px}.supply-hero-art>span:last-child{font-size:8px;letter-spacing:2px;color:#8a8a91;white-space:nowrap}
.supply-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0 30px}.supply-stat{display:flex;flex-direction:column;padding:22px 24px;background:#fff;border:1px solid var(--border);border-radius:12px}.supply-stat>span{font-size:12px;color:var(--muted)}.supply-stat strong{font-size:32px;font-weight:650;line-height:1.1;margin:12px 0}.supply-stat small{color:#85858c;font-size:11px}.supply-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:26px;align-items:start}.supply-sidebar{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}.supply-section-head{padding:20px 18px 10px}.supply-section-head h3,.supply-toolbar h3{font-size:16px;margin:0}.supply-filters{padding:0 8px 12px;display:grid;gap:5px}.supply-filter{display:flex;justify-content:space-between;align-items:center;gap:10px;background:transparent;color:var(--muted);border:0;border-radius:7px;padding:12px 10px;text-align:left;font-size:12px;font-weight:500}.supply-filter[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);font-weight:650}.supply-count{font-size:11px}.supply-tools{border-top:1px solid var(--border);padding:20px 18px;display:grid;gap:13px}.supply-tools .eyebrow{font-size:8px;color:#888;margin:0}.supply-tools a{font-size:12px;color:var(--ink);text-decoration:none}.supply-tools a:hover{color:var(--accent)}.supply-note{padding:18px;background:#fafafa;border-top:1px solid var(--border)}.supply-note strong{font-size:12px}.supply-note p{font-size:11px;color:var(--muted);line-height:1.65;margin:8px 0 0}.supply-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 18px}.supply-toolbar p{font-size:12px;margin:6px 0 0}.supply-toolbar input{width:min(100%,340px);margin:0;padding:12px 16px;font-size:13px}.supply-list{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:#fff}.supply-empty{padding:52px 24px;text-align:center;display:flex;align-items:center;flex-direction:column}.supply-empty>.supply-symbol{height:60px;width:60px;background:var(--accent-soft);color:var(--accent);margin-bottom:20px}.supply-empty h3{font-size:19px;margin:0 0 10px}.supply-empty p{font-size:13px;line-height:1.7;color:var(--muted);max-width:390px;margin:0 0 22px}.supply-empty button{font-size:12px}.supply-row{width:100%;display:flex;align-items:center;gap:16px;text-align:left;background:#fff;color:var(--ink);padding:20px;border:0;border-bottom:1px solid var(--border);border-radius:0;font-weight:400}.supply-row:last-child{border-bottom:0}.supply-row:hover{background:#fdf7f8}.supply-row-title{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.supply-row-title small{color:var(--muted);font-size:10px;letter-spacing:.5px;overflow-wrap:anywhere}.supply-row-title strong{font-size:14px;overflow-wrap:anywhere}.supply-row-category{font-size:11px;color:var(--muted)}.supply-unit{display:flex;flex-direction:column;gap:7px;min-width:90px}.supply-unit small{font-size:10px;color:#999}.supply-unit span{font-size:13px}.supply-row-arrow{color:var(--accent);font-size:20px}.supply-dialog{width:min(640px,calc(100vw - 32px));max-width:640px;max-height:90vh;overflow:auto;padding:28px}.supply-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.supply-dialog-head h2{font-size:22px;margin:0;overflow-wrap:anywhere}.supply-close{background:#f5f5f5;color:var(--ink);font-size:24px;padding:2px 10px;flex-shrink:0}.supply-form{max-width:none;width:100%}.supply-form-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.supply-form-fields label{margin:0;display:flex;flex-direction:column;gap:8px;font-size:12px}.supply-form-fields label:first-child,.supply-form-fields label:last-child{grid-column:1/-1}.supply-form-fields input,.supply-form-fields select,.supply-form-fields textarea{width:100%;min-width:0;margin:0;padding:12px;font:inherit;border:1px solid var(--border);border-radius:7px;background:white}.supply-form-fields textarea{min-height:85px}.supply-form [role=status]{font-size:12px;color:var(--accent)}.supply-details{display:grid;grid-template-columns:1fr 2fr;gap:20px;margin:28px 0}.supply-details dt{font-size:12px;color:var(--muted)}.supply-details dd{margin:0;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.supply-success{font-size:13px;padding:12px 16px;background:var(--accent-soft);border-left:3px solid var(--accent);border-radius:4px}
@media(max-width:900px){.supply-layout{grid-template-columns:190px minmax(0,1fr);gap:16px}.supply-hero-art{display:none}.supply-toolbar{align-items:stretch;flex-direction:column;gap:12px}.supply-toolbar input{width:100%}.supply-unit{min-width:65px}.supply-row{gap:12px;padding:16px}}
@media(max-width:600px){.supply-hero{padding:24px}.supply-hero h2{font-size:24px}.supply-stats{gap:8px;margin:16px 0 22px}.supply-stat{padding:14px 10px}.supply-stat strong{font-size:26px}.supply-stat>span{font-size:10px;line-height:1.5}.supply-stat small{display:none}.supply-layout{grid-template-columns:minmax(0,1fr)}.supply-filters{display:flex;flex-wrap:wrap}.supply-tools{display:flex;flex-wrap:wrap;gap:16px;padding:14px}.supply-tools .eyebrow{display:none}.supply-note{padding:12px 18px}.supply-note strong{display:none}.supply-note p{margin:0}.supply-row>.supply-symbol{display:none}.supply-row-title strong{font-size:13px}.supply-empty{padding:32px 18px}.supply-dialog{padding:20px}.supply-form-fields{grid-template-columns:minmax(0,1fr)}.supply-hero-actions button{width:100%}.supply-row-arrow{font-size:16px}.supply-unit{min-width:54px}}
.supply-text-button{background:transparent;color:var(--accent);padding:3px 0;text-align:left;font-size:12px;font-weight:500;width:auto;margin:0}.supply-text-button:hover{background:var(--accent-soft);filter:none}.supply-directory-row{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--border);padding:15px 0;font-size:14px}.supply-directory-row+button{margin-top:20px}.supply-unit-presets{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.supply-unit-presets button{width:auto;font-size:12px;padding:8px 12px}.supply-form>.secondary{margin-top:10px}.supply-form label>.supply-text-button{width:auto;align-self:start;margin:0}
.supply-hero-actions,.supply-stock-actions{display:flex;flex-wrap:wrap;gap:10px}.supply-stock-actions{margin:18px 0}.supply-stock-actions button{font-size:12px}.supply-hero-actions .secondary{background:#fff;color:var(--ink);font-size:12px}.supply-hero{gap:20px}.supply-history{margin:30px 0;background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px}.supply-history>h3{margin-top:0}.supply-history-row{padding:16px 0;border-top:1px solid var(--border)}.supply-history-row>div{display:flex;justify-content:space-between;gap:12px;font-size:13px}.supply-history-row p{margin:7px 0;font-size:12px;color:var(--muted)}.supply-history-row small{font-size:11px;color:var(--muted)}.supply-form select,.supply-form textarea{width:100%;padding:12px;border:1px solid var(--border);border-radius:8px;font:inherit;background:#fff}.supply-balance{background:var(--accent-soft);padding:12px;border-radius:8px;font-size:13px}.supply-balance:empty{display:none}.supply-unit{min-width:110px}.supply-form label{font-size:13px}.supply-history-row strong{overflow-wrap:anywhere}
@media(max-width:600px){.supply-history{padding:16px}.supply-history-row>div{flex-direction:column}.supply-hero-actions button{width:auto;flex:1 1 130px}.supply-unit{min-width:95px}.supply-hero-art{display:none}}
.supply-action{color:#fff;border:0;border-radius:8px;padding:14px 24px;font-weight:650}.supply-action-receive{background:#23834f}.supply-action-issue{background:var(--accent)}.supply-catalog-actions{display:flex;align-items:center;gap:12px;flex:1;justify-content:flex-end;min-width:0}.supply-add-position{background:#fff;color:var(--ink);border:1px solid var(--border);font-size:12px;padding:12px 16px;white-space:nowrap}.supply-catalog-actions input{min-width:130px;max-width:290px}.supply-toolbar{flex-wrap:wrap}.supply-hero-actions .supply-action{min-width:180px;font-size:14px}
@media(max-width:900px){.supply-catalog-actions{width:100%}.supply-catalog-actions input{max-width:none;flex:1}}@media(max-width:600px){.supply-catalog-actions{flex-direction:column;align-items:stretch}.supply-catalog-actions input{width:100%}.supply-hero-actions .supply-action{min-width:0;flex:1 1 140px}}
.supply-history>button{float:right}.supply-report-dialog{width:min(1100px,calc(100vw - 32px));max-width:1100px}.supply-report-filters{max-width:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.supply-report-filters label{margin:0;display:flex;flex-direction:column;gap:8px}.supply-report-filters select{min-width:0;padding:12px;border:1px solid var(--border);border-radius:8px;font:inherit;background:white}.supply-report-actions{display:flex;gap:10px;align-items:end}.supply-report-actions button{font-size:12px;width:auto;flex:1}.supply-report-output h2{font-size:23px}.supply-report-output p{font-size:12px}.supply-report-table{overflow:auto;margin:12px 0 25px}.supply-report-table table{width:100%;border-collapse:collapse;font-size:12px}.supply-report-table th,.supply-report-table td{padding:9px;border:1px solid var(--border);text-align:left;vertical-align:top;overflow-wrap:anywhere}.supply-report-table th{background:#f5f5f5}.supply-report-footer{color:var(--muted);margin-top:22px}#supply-print{display:none}
@media(max-width:650px){.supply-report-filters{grid-template-columns:minmax(0,1fr)}.supply-history>button{float:none;margin-bottom:12px}}
@media print{@page{size:A4 landscape;margin:10mm}body{background:white!important;color:#000!important}body:has(#supply-print)>*:not(#supply-print){display:none!important}#supply-print{display:block!important;color:#000}#supply-print .supply-report-output{display:block;font-family:Arial,sans-serif}#supply-print h2{font-size:18pt}#supply-print h3{font-size:14pt;break-after:avoid}#supply-print p{font-size:10.5pt;margin:6px 0}#supply-print .eyebrow{color:#000}#supply-print .supply-report-table{overflow:visible;margin:10px 0}#supply-print table{table-layout:fixed;font-size:10pt}#supply-print th,#supply-print td{border-color:#777;padding:7px;white-space:normal;overflow-wrap:anywhere}#supply-print thead{display:table-header-group}#supply-print tr{break-inside:avoid}#supply-print .supply-report-footer{margin-top:15px;color:#333}}
@media print{html:has(#supply-print){background:#fff!important}}
.supply-equipment-context{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 18px}.supply-equipment-context:empty{display:none}.supply-equipment-context p{font-size:12px;margin:0;flex-basis:100%}.supply-equipment-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;padding:16px;background:#f7f7f8}.supply-equipment-card{display:flex;align-items:flex-start;flex-direction:column;gap:16px;min-height:195px;padding:20px;border:1px solid var(--border);border-top:3px solid var(--accent);background:#fff;color:var(--ink);text-align:left;border-radius:10px}.supply-equipment-card strong{font-size:16px;overflow-wrap:anywhere}.supply-equipment-card>span:not(.supply-symbol){font-size:12px;color:var(--muted)}.supply-equipment-card small{margin-top:auto;color:var(--accent);font-size:11px}.supply-board-empty{padding:25px;font-size:13px;color:var(--muted)}
@media(max-width:1050px){.supply-equipment-board{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.supply-equipment-board{grid-template-columns:minmax(0,1fr)}.supply-equipment-card{min-height:165px}}

.permission-matrix{grid-column:1/-1;border:1px solid var(--border);border-radius:10px;padding:20px}.permission-section{margin:20px 0 0;padding:0}.permission-section h3{margin:0;padding:0 0 9px;font-size:14px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.permission-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--border)}.permission-row[hidden],.permission-section[hidden]{display:none}.permission-row select{max-width:240px}@media(max-width:600px){.permission-row{align-items:stretch;flex-direction:column}.permission-row select{max-width:none}}

.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.settings-card{display:flex;flex-direction:column;gap:14px;padding:24px}.settings-card p{line-height:1.6}.settings-card a{margin-top:auto;align-self:flex-start}.permission-advanced{margin-top:20px}.permission-advanced summary{cursor:pointer;font-weight:600;padding:14px 0}.group-check{display:flex!important;align-items:center;gap:12px;padding:10px 0}.group-check input{width:auto!important}@media(max-width:650px){.settings-grid{grid-template-columns:1fr}}

.warehouse-board{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:850px){.warehouse-board{grid-template-columns:1fr}}

.supply-equipment-field{grid-column:1/-1;min-width:0}.supply-form label.supply-equipment-choice{display:flex;flex-direction:row;align-items:center;gap:10px;margin:0;padding:10px 0;cursor:pointer}.supply-form .supply-equipment-choice input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin:0;padding:0;accent-color:var(--accent)}.supply-equipment-choice span{min-width:0;overflow-wrap:anywhere}

/* Compact catalog cards; section navigation and equipment keep their own layout. */
.module-grid.finished-product-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:12px;align-items:start}
.module-grid.finished-product-grid-building{grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr))}
.supply-equipment-card.finished-product-card{min-height:0;min-width:0;padding:14px;gap:6px;border-top-width:2px;border-radius:8px}
.finished-product-card h3{margin:0 0 2px;font-size:15px;line-height:1.35;overflow-wrap:anywhere}
.finished-product-card p{margin:0;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.finished-product-card strong{font-size:14px;line-height:1.4}
.finished-product-card .supply-text-button{margin-top:4px;padding:5px 0;line-height:1.4}
.finished-product-card button.secondary{width:auto;margin:4px 0 0;padding:7px 10px;font-size:12px}

/* Customer orders, live finished stock, and production. */
.sales-tabs{display:flex;flex-wrap:wrap;gap:10px 24px;margin:0 0 22px;padding:12px 0;border-bottom:1px solid var(--border)}
.sales-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:14px 0}.sales-toolbar h2{margin:0 auto 0 0;font-size:22px}.sales-toolbar button{width:auto;font-size:13px;padding:9px 14px}.sales-toolbar>a{font-size:14px}.sales-toolbar label{flex:1;min-width:180px}
.sales-meta{display:grid;grid-template-columns:2fr 1fr 2fr;gap:16px;margin:20px 0}.sales-editor label,.sales-dialog label,.sales-toolbar label,#admin-view>.sales-tabs~label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}
.sales-editor input,.sales-editor select,.sales-dialog input,.sales-toolbar input,.sales-toolbar select,#admin-view>.sales-tabs~label input{width:100%;min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit;margin:0}
.sales-compose{display:grid;grid-template-columns:minmax(250px,.8fr) minmax(0,1.6fr);gap:16px;align-items:start}.sales-panel{min-width:0;padding:16px;background:#fff;border:1px solid var(--border);border-radius:10px}.sales-panel h3{font-size:15px;margin:0 0 12px}.sales-panel>p{font-size:12px}.sales-panel>select{margin:10px 0}.sales-picker{max-height:530px;overflow:auto}.sales-picker-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border);padding:11px 0}.sales-picker-row>div{min-width:0;flex:1}.sales-picker-row strong{font-size:13px;display:block}.sales-picker-row small,.sales-table small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.sales-picker-row button{font-size:12px;padding:7px 9px;white-space:nowrap}
.sales-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--border);border-radius:8px;background:#fff;margin:14px 0}.sales-table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}.sales-table th{background:#f5f5f6;color:var(--muted);font-size:11px;font-weight:600;line-height:1.4}.sales-table th,.sales-table td{padding:11px 10px;border-bottom:1px solid var(--border);vertical-align:middle}.sales-table tbody tr:last-child td{border-bottom:0}.sales-table td:first-child{min-width:145px}.sales-table input{min-width:85px;width:100%;max-width:115px}.sales-table button{font-size:12px;padding:6px 9px}.sales-total{font-weight:650;font-size:15px}.sales-shortage,.sales-error{color:#ad2432}.sales-error:empty{display:none}.sales-badge{display:inline-block;background:#fff2dc;color:#785009;padding:5px 9px;border-radius:6px;font-size:12px}.sales-badge.good{background:#e5f5e9;color:#256638}.sales-note{padding:12px 16px;background:#fff;border-left:3px solid var(--accent);font-size:13px;line-height:1.6}.sales-dialog{width:min(640px,calc(100vw - 32px));max-width:640px;max-height:90vh;overflow:auto;padding:24px}.sales-dialog form{max-width:none}.sales-dialog label{margin:16px 0}.sales-actions{display:flex;flex-wrap:wrap;gap:6px}
@media(max-width:1100px){.sales-compose{grid-template-columns:1fr}.sales-picker{max-height:260px}}
@media(max-width:650px){.sales-meta{grid-template-columns:1fr}.sales-toolbar{align-items:stretch}.sales-toolbar h2{font-size:19px;flex-basis:100%}.sales-panel{padding:12px}.sales-tabs{gap:8px 16px}.sales-table th,.sales-table td{padding:8px}.sales-dialog{padding:16px}}
/* Keep the order editor independent of the narrow sign-in form. */
form.sales-editor{max-width:none}.sales-editor label{margin:0}.sales-editor button{width:auto;margin:0}.sales-editor>button[type=submit]{margin:8px 10px 0 0}.sales-editor .sales-picker-row button{flex:none}.sales-dialog .sales-toolbar button{width:auto}.sales-meta{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr)}
@media(max-width:650px){.sales-meta{grid-template-columns:minmax(0,1fr)}.sales-editor>button[type=submit]{width:100%;margin-right:0}}

/* Compact heading on the enterprise home page. */
.home-view .page-heading { margin: 20px 0; gap: 16px; }
.home-view .page-heading .eyebrow { margin-bottom: 7px; }
.home-view .page-heading .muted { margin-top: 8px; }

/* Production is grouped by workshop so an operator sees only the current queue. */
.production-department { background:#fff; border:1px solid var(--border); border-radius:12px; padding:16px; margin-top:16px; }
.production-department-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.production-department-head h3 { margin:0; font-size:16px; }
.production-department-head span { font-size:11px; color:var(--muted); background:#f2f2f4; border-radius:5px; padding:4px 7px; }
.operator-panel{margin:0 -52px 26px;padding:20px 52px 24px;background:#232826;border-bottom:2px solid #c9ad7a;color:#fff}.operator-panel h2{margin:7px 0 4px;font-size:28px}.operator-eyebrow{margin:0;color:#d8b780;font-size:10px;font-weight:800;letter-spacing:1.5px}.operator-note{margin:0;color:#d9dfdb;font-size:14px}
.sales-dialog label > select { display:block; width:100%; margin-top:7px; }

/* Operator-inspired production workshop board. */
.workshops-banner { background:#222625; color:#fff; border-bottom:2px solid #d9b37a; padding:25px 28px; border-radius:12px 12px 0 0; }
.workshops-banner h2 { margin:5px 0 0; font-size:28px; letter-spacing:-.7px; }
.workshops-eyebrow { margin:0; font-size:10px; font-weight:700; letter-spacing:1.7px; color:#d9b37a; }
.workshops-lead { padding:26px 0 18px; }
.workshops-lead h2 { margin:7px 0; font-size:24px; letter-spacing:-.5px; }
.workshops-lead .muted { margin:0; }
.workshop-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:10px; align-items:end; margin:0 0 22px; padding:16px; background:#fff; border:1px solid #d9ddda; border-radius:11px; }
.workshop-filter { display:flex; flex-direction:column; gap:6px; color:#64706a; font-size:10px; font-weight:750; }
.workshop-filter select { min-width:0; height:42px; padding:0 12px; background:#fff; border:1px solid #cfd5d1; border-radius:7px; color:#17201d; font:inherit; font-size:14px; }
.workshop-filter-apply { height:42px; padding:0 20px; border:0; border-radius:7px; background:#8e252a; color:#fff; font:inherit; font-size:13px; font-weight:750; cursor:pointer; }
.workshops-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.workshop-card { display:flex; flex-direction:column; min-height:260px; background:#fff; border:1px solid #d9ddda; border-top:4px solid #70807a; border-radius:11px; padding:18px; box-shadow:0 8px 24px #1320180a; }
.workshop-card-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.workshop-status { color:#67746d; font-size:10px; }
.workshop-card h3 { margin:8px 0 7px; font-size:18px; letter-spacing:-.25px; }
.workshop-card .muted { margin:0; min-height:20px; font-size:12px; }
.workshop-card strong { display:block; margin:18px 0 4px; font-size:16px; }
.workshop-label { color:#8e252a; font-size:9px; font-weight:750; letter-spacing:.7px; }
.workshop-meta,.workshop-remaining { margin:3px 0; color:#6c7671; font-size:11px; line-height:1.35; }
.workshop-remaining { margin-bottom:9px; }
.workshop-progress { height:6px; overflow:hidden; border-radius:4px; background:#e6e9e7; }
.workshop-progress span { display:block; height:100%; background:#5d8b6f; }
.workshop-open { display:block; margin-top:auto; padding-top:17px; color:#8e252a; font-size:12px; font-weight:700; text-decoration:none; }
.workshop-open:hover { text-decoration:underline; }
@media(max-width:700px){.workshops-banner{margin:0 -1px;padding:20px}.workshops-banner h2{font-size:24px}.workshop-filters{grid-template-columns:1fr}.workshop-filter-apply{width:100%}.workshops-grid{grid-template-columns:1fr}.workshops-lead{padding:22px 0 15px}}

/* Compact internal pages and navigation. */
#dashboard .page-heading { margin:20px 0; gap:16px; }
#dashboard .page-heading .eyebrow { margin-bottom:7px; }
#dashboard .page-heading .muted { margin-top:8px; }
#dashboard > .back-link { margin-top:16px; }
.board-section { padding:16px; }
.board-toolbar { margin-bottom:16px; }
#admin-view .module-grid, .settings-grid { gap:12px; }
#admin-view .supply-equipment-board { padding:0; background:transparent; gap:12px; }
#admin-view .supply-equipment-card { min-height:0; min-width:0; padding:16px; gap:8px; text-decoration:none; }
#admin-view .supply-equipment-card h2, #admin-view .supply-equipment-card h3 { margin:0; font-size:17px; line-height:1.35; overflow-wrap:anywhere; }
#admin-view .supply-equipment-card p { margin:0; font-size:12px; line-height:1.5; }
#admin-view .section-navigation-card { display:grid; grid-template-columns:42px minmax(0,1fr); column-gap:12px; row-gap:5px; border:1px solid var(--border); border-radius:11px; padding:16px; }
.section-navigation-card > .module-icon { grid-column:1; grid-row:1 / 4; width:42px; height:42px; border-radius:11px; }
.section-navigation-card > .module-icon svg { width:25px; height:25px; }
.section-navigation-card > :not(.module-icon) { grid-column:2; }
#admin-view .section-navigation-card > h2 { background:none; color:var(--ink); padding:0; margin:0; font-size:17px; }
#admin-view .section-navigation-card > p { margin:0; font-size:12px; line-height:1.5; }
#admin-view .section-navigation-card > span:not(.module-icon) { display:none; }
#admin-view .section-navigation-card .admin-primary { margin:5px 0 0; padding:8px 10px; width:fit-content; font-size:12px; }
a.section-navigation-card:hover { border-color:#d98a92; background:#fffafb; }
.supply-hero { padding:20px 24px; gap:20px; }
.supply-hero h2 { font-size:23px; }
.supply-hero-art .supply-symbol { width:64px; height:64px; border-radius:16px; }
.supply-hero-art svg { width:42px; height:42px; }
.supply-stats { gap:12px; margin:16px 0 20px; }
.supply-stat { padding:16px; }
.supply-stat strong { font-size:26px; margin:8px 0; }
@media(max-width:600px) { #admin-view .section-navigation-card { padding:14px; } .board-section { padding:12px; } }
/* Compact wire rod catalogue, scoped to product selection. */
.catalog-heading { margin:20px 0 16px; gap:16px; }
.catalog-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
.catalog-categories { display:flex; gap:6px; padding:5px; width:fit-content; max-width:100%; }
.catalog-categories button { width:auto; gap:16px; padding:9px 12px; }
.catalog-filters { margin-bottom:12px; }
.product-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:10px; }
.product-card { display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:auto auto; column-gap:10px; row-gap:5px; align-content:center; min-height:78px; padding:13px; border-radius:10px; box-shadow:none; }
.product-card .product-symbol { grid-column:1; grid-row:1 / 3; align-self:center; width:34px; height:34px; margin:0; font-size:16px; }
.product-card .product-name { grid-column:2; grid-row:1; margin:0; font-size:14px; overflow-wrap:anywhere; }
.product-card .product-code { grid-column:2; grid-row:2; font-size:10px; letter-spacing:.2px; color:var(--muted); }
.product-card .product-category, .product-card .product-select { display:none; }
.product-card:hover { transform:translateY(-1px); }
@media(max-width:600px) { .catalog-heading { gap:12px; } .catalog-search input { padding:11px; } .catalog-search button { padding:0 16px; } .product-grid { grid-template-columns:1fr; gap:8px; } }

.operator-filters{display:flex;gap:12px;align-items:end;background:#fff;border:1px solid #d9ddda;border-radius:10px;padding:14px 16px}.operator-filters label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700}.operator-filters select{min-width:280px;padding:9px;border:1px solid #cfd5d1;border-radius:6px;font:inherit}
.drawing-back{display:inline-block;margin:18px 0 4px}.drawing-header{padding:8px 0 20px}.drawing-header h2,.drawing-board h2{margin:6px 0;font-size:25px;letter-spacing:-.5px}.drawing-eyebrow{margin:0;color:#69766f;font-size:10px;font-weight:800;letter-spacing:1.4px}.drawing-board>label{display:flex;flex-direction:column;gap:6px;padding:16px;background:#fff;border:1px solid #d9ddda;border-radius:10px;font-size:11px;font-weight:700}.drawing-board>label input{height:44px;padding:0 13px;border:1px solid #cfd5d1;border-radius:7px;font:inherit;font-size:15px}.coil-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;margin-top:18px}.coil-card{display:flex;flex-direction:column;min-height:245px;padding:20px;background:#fff;border:1px solid #d9ddda;border-radius:11px}.coil-card small{color:#68736d}.coil-card strong{margin:14px 0;padding:15px;background:#f2ece6;color:#202923;font-size:25px;text-align:center;border-radius:8px}.coil-card dl{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px;margin:0}.coil-card dt{color:#6b7670;font-size:10px}.coil-card dd{margin:0;font-weight:700;font-size:13px;overflow-wrap:anywhere}.drawing-primary{margin-top:auto;background:#8e252a!important;color:#fff!important;border-color:#8e252a!important}.drawing-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;margin-top:18px}.drawing-line,.drawing-output{padding:20px;background:#fff;border:1px solid #d9ddda;border-radius:11px}.drawing-line strong{display:block;margin-top:18px;font-size:16px}.drawing-output{border-top:4px solid #8e252a}.drawing-output h3{margin:7px 0;font-size:20px}.drawing-output label{display:flex;flex-direction:column;gap:6px;margin:20px 0 8px;font-size:12px;font-weight:700}.drawing-output input{height:50px;padding:0 13px;border:2px solid #303a35;border-radius:8px;font:inherit;font-size:22px}.drawing-output button{width:100%;margin-top:12px}@media(max-width:700px){.drawing-layout{grid-template-columns:1fr}.coil-grid{grid-template-columns:1fr}}
.drawing-source-summary{padding:16px;margin:14px 0;background:#fff;border:1px solid #d9ddda;border-radius:10px}.drawing-source-summary p{margin:5px 0}.drawing-source-summary strong{display:block;margin-top:12px}.drawing-batch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin:12px 0 20px}.drawing-batch-card{padding:16px;background:#fff;border:1px solid #d9ddda;border-top:4px solid #70807a;border-radius:10px}.drawing-batch-card h3{margin:7px 0}.drawing-batch-card>strong{font-size:20px}.drawing-batch-card ul{padding-left:18px;font-size:12px;line-height:1.6}.wire-batch-label{margin:18px 0;padding:22px;text-align:center;background:#fff4f5;border:2px solid var(--accent);border-radius:12px}.wire-batch-label p{margin:0}.wire-batch-label strong{display:block;margin:10px 0 8px;color:var(--accent-dark);font-size:28px;letter-spacing:.4px}.wire-batch-label .muted{font-size:13px}
.drawing-workspace{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:28px;align-items:start;margin-top:12px}.drawing-main>h2,.drawing-side>h2{margin:6px 0 14px;font-size:23px}.drawing-line{padding:18px 20px;border-left:4px solid #6d9b7b;background:#fff;border-radius:8px}.drawing-line small,.drawing-job-card small,.drawing-stats small{font-size:10px;color:#68736d;letter-spacing:.5px}.drawing-line h3{margin:8px 0;font-size:16px}.drawing-line p{margin:0;font-size:12px}.drawing-line strong{margin:14px 0 0;font-size:14px}.drawing-next-coil{margin-top:14px;background:#eae7e1;border-radius:8px;padding:0 14px}.drawing-next-coil summary{padding:13px 0;cursor:pointer;font-size:12px;font-weight:700}.drawing-next-coil>div{padding:0 0 14px}.drawing-next-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-top:10px}.drawing-next-card{display:grid;gap:5px;padding:12px;background:#fff;border:1px solid #d9ddda;border-radius:7px}.drawing-next-card strong{font-size:12px}.drawing-next-card span{font-weight:800;font-size:17px}.drawing-next-card small{color:var(--muted);font-size:10px}.drawing-next-card button{margin-top:4px}.drawing-side{position:sticky;top:18px;padding:18px;background:#fff;border:1px solid #cfd5d1;border-radius:12px;box-shadow:0 9px 28px #1d29201a}.drawing-job-card{padding:14px;border-left:4px solid var(--accent);border-radius:7px;background:#fff7f7}.drawing-job-card h3{margin:7px 0;font-size:17px}.drawing-job-card p{margin:0;font-size:12px}.drawing-stats{position:relative;margin:14px 0;padding:14px;background:#f4f5f4;border-radius:8px}.drawing-stats strong{display:block;margin-top:5px;font-size:18px}.drawing-stats>span{position:absolute;right:14px;top:25px;color:#8e252a;font-weight:800;font-size:19px}.drawing-progress{height:6px;margin-top:12px;background:#dce1de;border-radius:4px;overflow:hidden}.drawing-progress span{display:block;height:100%;background:#699b79}.drawing-side .drawing-output{padding:0;border:0}.drawing-side .drawing-output label{margin:14px 0 6px}.drawing-side .drawing-output p{font-size:11px;line-height:1.5}.drawing-side>.drawing-primary{width:100%;margin-top:10px;padding:13px}.drawing-header{padding:8px 0 14px;border-bottom:1px solid #d9ddda}.drawing-header h2{font-size:28px}.drawing-header .muted{margin:0}@media(max-width:800px){.drawing-workspace{grid-template-columns:1fr}.drawing-side{position:static}.drawing-next-grid{grid-template-columns:1fr}}
.schedule-header{display:flex;justify-content:space-between;gap:18px;align-items:start;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--border)}.schedule-header h2{margin:6px 0;font-size:26px;letter-spacing:-.5px}.schedule-header p{margin:0}.schedule-header input{min-width:160px}.schedule-summary{width:100%;background:#fff;border:1px solid var(--border);border-radius:11px;border-spacing:0;overflow:hidden}.schedule-summary th,.schedule-summary td{padding:13px 14px;text-align:left;border-bottom:1px solid #e7e8e9;font-size:13px}.schedule-summary th{background:#f6f6f7;color:#68716f;font-size:11px}.schedule-summary tr:last-child td{border-bottom:0}.schedule-dialog{width:min(900px,calc(100vw - 28px));max-height:calc(100vh - 40px);border:0;border-radius:12px;padding:24px;box-shadow:0 24px 70px #10101044}.schedule-dialog::backdrop{background:#15151566}.schedule-dialog h2{margin:0 0 7px}.schedule-dialog>button{margin-top:12px}.schedule-days{width:100%;margin:18px 0 12px;border-spacing:0}.schedule-days th,.schedule-days td{padding:8px;border-bottom:1px solid #e4e6e5;text-align:left;font-size:12px}.schedule-days input,.schedule-days select{width:100%;min-width:72px;padding:7px}.schedule-primary{background:#8e252a!important;border-color:#8e252a!important;color:#fff!important}@media(max-width:700px){.schedule-header{display:block}.schedule-header input{margin-top:12px}.schedule-summary{display:block;overflow-x:auto}.schedule-dialog{padding:16px}.schedule-days{min-width:620px;display:table}.schedule-dialog form{overflow-x:auto}}
.payroll-header{display:flex;justify-content:space-between;gap:18px;align-items:start;padding-bottom:18px;border-bottom:1px solid var(--border)}.payroll-header h2{margin:6px 0;font-size:26px;letter-spacing:-.5px}.payroll-header p{margin:0}.payroll-header input{min-width:160px}.payroll-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0}.payroll-actions strong{font-size:18px}.payroll-note{margin:0 0 14px;padding:12px 14px;border-left:3px solid var(--accent);background:#fff;border-radius:0 8px 8px 0;font-size:12px}.payroll-table{width:100%;background:#fff;border:1px solid var(--border);border-radius:11px;border-spacing:0;overflow:hidden}.payroll-table th,.payroll-table td{padding:13px 14px;text-align:left;border-bottom:1px solid #e7e8e9;font-size:13px}.payroll-table th{background:#f6f6f7;color:#68716f;font-size:11px}.payroll-table tr:last-child td{border-bottom:0}.payroll-dialog{width:min(480px,calc(100vw - 28px));border:0;border-radius:12px;padding:24px;box-shadow:0 24px 70px #10101044}.payroll-dialog::backdrop{background:#15151566}.payroll-dialog h2{margin:0 0 7px}.payroll-dialog form{display:grid;gap:12px;margin-top:18px}.payroll-dialog label{display:grid;gap:6px;font-size:12px;font-weight:700}.payroll-dialog input,.payroll-dialog textarea{padding:10px;border:1px solid var(--border);border-radius:7px;font:inherit}.payroll-dialog textarea{min-height:80px;resize:vertical}.payroll-dialog>button{margin-top:12px}.payroll-primary{background:#8e252a!important;border-color:#8e252a!important;color:#fff!important}@media(max-width:700px){.payroll-header,.payroll-actions{display:block}.payroll-header input,.payroll-actions button{margin-top:12px}.payroll-table{display:block;overflow-x:auto}.payroll-table tr{white-space:nowrap}.payroll-dialog{padding:16px}}
.raw-heading{display:flex;justify-content:space-between;align-items:start;gap:18px;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--border)}.raw-heading h2{margin:6px 0;font-size:26px}.raw-heading p{margin:0}.raw-table{width:100%;border-spacing:0;background:#fff;border:1px solid var(--border);border-radius:11px;overflow:hidden}.raw-table th,.raw-table td{padding:12px 14px;border-bottom:1px solid #e7e8e9;text-align:left;font-size:13px}.raw-table th{background:#f6f6f7;color:#68716f;font-size:11px}.raw-table tr:last-child td{border-bottom:0}.raw-table td:last-child{display:flex;gap:7px}.raw-moves{display:grid;gap:8px;margin-top:10px}.raw-moves article{padding:12px 14px;border:1px solid var(--border);border-radius:9px;background:#fff}.raw-moves p,.raw-moves small{display:block;margin:5px 0 0;font-size:12px}.raw-moves small{color:var(--muted)}.raw-dialog{width:min(480px,calc(100vw - 28px));border:0;border-radius:12px;padding:24px;box-shadow:0 24px 70px #10101044}.raw-dialog::backdrop{background:#15151566}.raw-dialog h2{margin:0}.raw-dialog form{display:grid;gap:12px;margin-top:18px}.raw-dialog label{display:grid;gap:6px;font-size:12px;font-weight:700}.raw-dialog input,.raw-dialog select,.raw-dialog textarea{padding:10px;border:1px solid var(--border);border-radius:7px;font:inherit}.raw-dialog textarea{min-height:72px;resize:vertical}.raw-dialog>button{margin-top:12px}.raw-primary{background:#8e252a!important;border-color:#8e252a!important;color:#fff!important}@media(max-width:700px){.raw-heading{display:block}.raw-heading button{margin-top:12px}.raw-table{display:block;overflow-x:auto}.raw-table tr{white-space:nowrap}.raw-dialog{padding:16px}}


/* Unified ERP visual system: monochrome foundation with red operational accents */
:root { --accent:#d31f35; --accent-dark:#ae172a; --accent-soft:#fff1f3; --ink:#171719; --muted:#69696f; --border:#dedee2; background:#f7f7f8; }
body { background:#f7f7f8; color:var(--ink); }
button { border-radius:8px; background:var(--accent); box-shadow:none; transition:background .15s ease,transform .15s ease,border-color .15s ease; }
button:hover { filter:none; transform:translateY(-1px); }
.secondary { background:#fff; color:var(--ink); border-color:#cfcfd4; }
.secondary:hover { background:#f3f3f4; border-color:#9999a1; }
input, select, textarea { border-color:#cfcfd4; box-shadow:none; }
input:focus, select:focus, textarea:focus { border-color:var(--accent); outline:3px solid #f8dce0; }
.module-card, .supply-equipment-card, .product-card { border-radius:14px; box-shadow:0 1px 2px #00000008; }
.module-card:hover, .supply-equipment-card:hover, .product-card:hover { border-color:var(--accent); box-shadow:0 12px 30px #0000000d; }
.module-icon { background:#fff; color:var(--accent); border-color:#f0cbd1; box-shadow:none; }
.enterprise-modules .module-icon { background:var(--accent-soft); }
.card-arrow, .card-link { color:var(--accent); }
.board-section, .kanban-column { box-shadow:none; }
.kanban-column { background:#f1f1f2; border-color:#e3e3e6; }
.column-dot, .team .column-dot, .management .column-dot, .planned > span { background:var(--accent); }
.sales-badge { background:#f3f3f4; color:var(--ink); border:1px solid #dedee2; }
.sales-badge.good { background:var(--accent-soft); color:var(--accent-dark); border-color:#f0cbd1; }
.sales-table th, .raw-table th, .schedule-summary th, .payroll-table th { background:#f3f3f4; color:#4d4d53; }

/* Sales orders: active workspace rather than an empty register. */
#admin-view .sales-orders-heading{margin:4px 0 14px;padding:18px 20px;background:#19191b;border-left:4px solid var(--accent);border-radius:10px;color:#fff}.sales-orders-heading h2{color:#fff;font-size:23px}.sales-orders-heading .secondary{background:transparent;color:#fff;border-color:#68686d}.sales-order-create{margin-left:auto;padding:9px 13px;border-radius:8px;background:var(--accent);color:#fff!important;text-decoration:none;font-size:13px;font-weight:700}.sales-order-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px}.sales-order-metric{display:grid;gap:5px;padding:15px 16px;background:#fff;border:1px solid var(--border);border-radius:11px}.sales-order-metric span,.sales-order-metric small{font-size:11px;color:var(--muted)}.sales-order-metric strong{font-size:26px;line-height:1.05}.sales-order-controls{display:flex;align-items:end;gap:10px;margin:0 0 14px;padding:14px;background:#fff;border:1px solid var(--border);border-radius:10px}.sales-order-controls label{display:flex;flex:1;flex-direction:column;gap:6px;font-size:11px;font-weight:700}.sales-order-controls select{width:190px;min-height:40px;padding:9px 10px;border:1px solid var(--border);border-radius:7px;background:#fff;font:inherit}.sales-order-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.sales-order-card{display:flex;flex-direction:column;min-height:190px;padding:17px;background:#fff;border:1px solid var(--border);border-top:3px solid #74747a;border-radius:11px;box-shadow:0 1px 2px #00000008}.sales-order-card:hover{border-color:var(--accent);box-shadow:0 12px 30px #0000000d}.sales-order-card-top,.sales-order-footer{display:flex;justify-content:space-between;align-items:center;gap:10px}.sales-order-number{color:var(--accent);font-size:12px;font-weight:700;text-decoration:none}.sales-order-number:hover,.sales-order-footer a:hover{text-decoration:underline}.sales-order-card h3{margin:15px 0 12px;font-size:18px;overflow-wrap:anywhere}.sales-order-meta{display:flex;flex-wrap:wrap;gap:7px}.sales-order-meta span{padding:5px 7px;background:#f4f4f5;border-radius:6px;color:var(--muted);font-size:11px}.sales-order-progress{margin-top:auto;padding:11px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:4px}.sales-order-progress span{color:var(--muted);font-size:10px}.sales-order-progress strong{font-size:13px}.sales-order-footer{padding-top:12px}.sales-order-footer strong{font-size:14px}.sales-order-footer a{color:var(--accent);font-size:12px;font-weight:700;text-decoration:none}@media(max-width:700px){.sales-orders-heading{padding:15px}.sales-orders-heading h2{flex-basis:100%}.sales-order-create{margin-left:0}.sales-order-overview{grid-template-columns:1fr}.sales-order-controls{display:grid;grid-template-columns:1fr}.sales-order-controls select{width:100%}.sales-order-grid{grid-template-columns:1fr}}
.operator-panel, .workshops-banner { background:#19191b; border-color:var(--accent); }
.operator-eyebrow, .workshops-eyebrow { color:#ff9aa7; }
.operator-note { color:#d5d5d9; }
.workshop-filters, .operator-filters, .drawing-board>label, .drawing-line, .drawing-output, .drawing-source-summary, .drawing-batch-card, .coil-card { border-color:var(--border); }
.workshop-filter select, .operator-filters select, .drawing-board>label input { border-color:#cfcfd4; color:var(--ink); }
.workshop-filter-apply, .drawing-primary, .schedule-primary, .payroll-primary, .raw-primary { background:var(--accent)!important; border-color:var(--accent)!important; }
.workshop-card { border-color:var(--border); border-top-color:var(--accent); box-shadow:0 2px 4px #00000008; }
.workshop-label, .workshop-open { color:var(--accent-dark); }
.drawing-eyebrow, .coil-card small, .coil-card dt, .drawing-line small, .drawing-job-card small, .drawing-stats small { color:var(--muted); }
.coil-card strong { background:#f3f3f4; color:var(--ink); }
.drawing-line { border-left-color:var(--accent); }
.drawing-next-coil, .drawing-stats { background:#f3f3f4; }
.drawing-side { border-color:var(--border); box-shadow:0 10px 28px #0000000a; }
.drawing-stats>span { color:var(--accent-dark); }
.drawing-progress { background:#dedee2; }
.drawing-progress span { background:var(--accent); }
.product-symbol { background:var(--accent-soft); color:var(--accent); font-size:0; }
.product-symbol svg { width:21px; height:21px; }
.supply-row-arrow { color:var(--accent)!important; font-size:0!important; }
.supply-row-arrow::after { content:'→'; font-size:18px; }


/* Directories, nomenclature and settings use the same card language as operational modules */
#admin-view > h2 { margin:0 0 18px; font-size:27px; letter-spacing:-.7px; color:var(--ink); }
#admin-view > .back-link + h2 { margin-top:14px; }
#admin-view > input[type=search], #admin-view > select { min-height:42px; margin:0 10px 16px 0; padding:10px 12px; border:1px solid #cfcfd4; border-radius:8px; background:#fff; }
#admin-view .supply-equipment-board { grid-template-columns:repeat(auto-fit,minmax(255px,1fr)); }
#admin-view .section-navigation-card { min-height:138px; grid-template-columns:46px minmax(0,1fr); column-gap:14px; row-gap:6px; padding:18px; background:#fff; border-radius:14px; box-shadow:0 1px 2px #00000008; transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease; }
#admin-view .section-navigation-card:hover { background:#fff; border-color:var(--accent); box-shadow:0 12px 30px #0000000d; transform:translateY(-2px); }
#admin-view .section-navigation-card > .module-icon { width:46px; height:46px; border-radius:13px; background:var(--accent-soft); color:var(--accent); border-color:#f0cbd1; }
#admin-view .section-navigation-card > h2, #admin-view .section-navigation-card > h3 { font-size:18px; font-weight:700; letter-spacing:-.25px; }
#admin-view .section-navigation-card > p { color:var(--muted); }
#admin-view .section-navigation-card > span:not(.module-icon) { display:block; color:var(--accent); font-size:12px; font-weight:700; margin-top:3px; }
#admin-view .settings-grid { grid-template-columns:repeat(auto-fit,minmax(255px,1fr)); gap:12px; }
#admin-view .settings-card { min-height:180px; padding:18px; border:1px solid var(--border); border-radius:14px; background:#fff; box-shadow:0 1px 2px #00000008; }
#admin-view .settings-card > .module-icon { width:46px; height:46px; background:var(--accent-soft); color:var(--accent); border:1px solid #f0cbd1; border-radius:13px; }
#admin-view .settings-card > h2 { background:transparent; color:var(--ink); padding:0; font-size:18px; line-height:1.3; }
#admin-view .settings-card .admin-primary { margin-top:auto; border-radius:8px; }
#admin-view .admin-panel { border-color:var(--border); border-radius:14px; box-shadow:0 1px 2px #00000008; }
#admin-view .admin-panel > h2 { padding:15px 18px; background:#19191b; border-left:4px solid var(--accent); font-size:16px; }
#admin-view .admin-model-row { padding:16px 18px; }
#admin-view .admin-form { border-top:4px solid var(--accent); padding:22px; }
#admin-view .admin-fields input, #admin-view .admin-fields select, #admin-view .admin-fields textarea { border-color:#cfcfd4; border-radius:8px; }
#admin-view .finished-product-card { border-radius:12px; border-top-color:var(--accent); }
#admin-view .finished-product-card:hover { border-color:var(--accent); }

/* Landing pages retain the compact cards used on the home screen. */
#admin-view .admin-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
#admin-view .admin-module-grid .section-navigation-card { position:relative; display:grid; grid-template-columns:46px minmax(0,1fr) 18px; grid-template-rows:auto auto; align-items:center; min-height:0; padding:16px; column-gap:14px; row-gap:3px; border:1px solid var(--border); border-radius:12px; }
#admin-view .admin-module-grid .section-navigation-card > .module-icon { grid-column:1; grid-row:1 / 3; }
#admin-view .admin-module-grid .section-navigation-card > h2,
#admin-view .admin-module-grid .section-navigation-card > h3 { grid-column:2; grid-row:1; margin:0; font-size:18px; line-height:1.25; }
#admin-view .admin-module-grid .section-navigation-card > p { grid-column:2; grid-row:2; margin:0; font-size:13px; line-height:1.35; }
#admin-view .admin-module-grid .section-navigation-card > span:not(.module-icon),
#admin-view .admin-module-grid .settings-card .admin-primary { display:none; }
#admin-view .admin-module-grid .section-navigation-card::after { content:'↗'; grid-column:3; grid-row:1 / 3; color:var(--accent); font-size:20px; font-weight:400; }
#admin-view .admin-module-grid .settings-card { min-height:0; }
#admin-view .admin-panel.settings-card > h2,
#admin-view .settings-card.section-navigation-card > h2 { background:transparent; color:var(--ink); border:0; padding:0; margin:0; font-size:18px; }
#admin-view .admin-module-grid .section-navigation-card:hover,
#admin-view .admin-module-grid .section-navigation-card:focus-visible { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 12px 30px #9f102522; }
#admin-view .admin-module-grid .section-navigation-card:hover > h2,
#admin-view .admin-module-grid .section-navigation-card:hover > h3,
#admin-view .admin-module-grid .section-navigation-card:focus-visible > h2,
#admin-view .admin-module-grid .section-navigation-card:focus-visible > h3 { color:#fff; }
#admin-view .admin-module-grid .section-navigation-card:hover > p,
#admin-view .admin-module-grid .section-navigation-card:focus-visible > p { color:#fff0f2; }
#admin-view .admin-module-grid .section-navigation-card:hover > .module-icon,
#admin-view .admin-module-grid .section-navigation-card:focus-visible > .module-icon { background:#fff; color:var(--accent); border-color:#fff; }
#admin-view .admin-module-grid .section-navigation-card:hover::after,
#admin-view .admin-module-grid .section-navigation-card:focus-visible::after { color:#fff; }
@media(max-width:1050px){#admin-view .admin-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){#admin-view .admin-module-grid{grid-template-columns:1fr;}}

/* Reversible assistant pilot on the home page. */
.ai-assistant{position:fixed;right:24px;bottom:24px;z-index:20}.assistant-launch{display:flex;align-items:center;gap:9px;padding:12px 16px;border-radius:999px;box-shadow:0 10px 24px #17171920}.assistant-launch svg{width:19px;height:19px}.assistant-panel{display:none;width:min(360px,calc(100vw - 32px));margin:0 0 12px;padding:18px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 18px 48px #17171924}.ai-assistant.is-open .assistant-panel{display:block}.assistant-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.assistant-heading .eyebrow{margin:0 0 5px;color:var(--accent)}.assistant-heading h2{margin:0;font-size:20px}.assistant-heading .icon-button{width:32px;height:32px;padding:0;background:#fff;color:var(--ink);border:1px solid var(--border)}.assistant-panel>.muted{margin:10px 0 14px;font-size:13px;line-height:1.45}.assistant-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0 0 14px}.assistant-overview-heading{grid-column:1/-1;margin:0 0 1px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.7px}.assistant-overview-card{display:grid;gap:3px;min-width:0;padding:10px;border:1px solid var(--border);border-radius:9px;background:#fafafa;color:var(--ink);text-decoration:none}.assistant-overview-card:hover{border-color:var(--accent);background:var(--accent-soft)}.assistant-overview-card span,.assistant-overview-card small{font-size:10px;color:var(--muted);line-height:1.35}.assistant-overview-card strong{font-size:18px;line-height:1.15}.assistant-overview-empty{grid-column:1/-1;margin:0;padding:10px 12px;background:#f7f7f8;border-radius:8px;color:var(--muted);font-size:12px}.assistant-overview>.muted{grid-column:1/-1;margin:0;font-size:12px}.assistant-prompts{display:flex;flex-wrap:wrap;gap:7px}.assistant-prompts button{padding:7px 10px;background:#fff;color:var(--ink);border:1px solid var(--border);font-size:12px}.assistant-prompts button:hover{background:var(--accent-soft);border-color:#efc5cb;color:var(--accent);transform:none}.assistant-form{margin:16px 0 10px}.assistant-form label{display:block;margin-bottom:6px;font-size:12px;font-weight:700}.assistant-form>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.assistant-form input{width:100%;min-width:0;box-sizing:border-box;padding:10px 11px;border:1px solid #cfcfd4;border-radius:8px;font:inherit;font-size:13px}.assistant-form button{width:auto;margin:0;padding:10px 13px;font-size:12px}.assistant-answer{min-height:0;margin:0;padding:11px 12px;background:#f7f7f8;border-radius:8px;color:var(--muted);font-size:12px;line-height:1.5}.assistant-result-link{display:inline-block;margin-top:7px;color:var(--accent);font-weight:700;text-decoration:none}.assistant-result-link:hover{text-decoration:underline}@media(max-width:600px){.ai-assistant{right:16px;bottom:16px}.assistant-launch span:last-child{display:none}.assistant-launch{width:52px;height:52px;justify-content:center;padding:0}.assistant-panel{width:min(360px,calc(100vw - 32px));}.assistant-form>div{grid-template-columns:1fr}.assistant-form button{width:100%;margin:0}.assistant-overview{grid-template-columns:1fr 1fr}}

.sales-order-controls input{box-sizing:border-box;width:100%;min-height:40px;padding:9px 10px;border:1px solid var(--border);border-radius:7px;background:#fff;font:inherit}

/* Shipment workspace mirrors the order workspace while keeping the actual shipment visible. */
.shipment-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.shipment-metric{display:grid;gap:5px;padding:15px 16px;background:#fff;border:1px solid var(--border);border-radius:11px}.shipment-metric span,.shipment-metric small{font-size:11px;color:var(--muted)}.shipment-metric strong{font-size:26px;line-height:1.05}.shipment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px}.shipment-card{display:flex;flex-direction:column;min-height:255px;padding:18px;background:#fff;border:1px solid var(--border);border-top:3px solid var(--accent);border-radius:11px;box-shadow:0 1px 2px #00000008}.shipment-card:hover{box-shadow:0 12px 30px #0000000d}.shipment-card-top,.shipment-card-footer{display:flex;justify-content:space-between;gap:10px;align-items:center}.shipment-card h3{margin:15px 0 12px;font-size:18px;overflow-wrap:anywhere}.shipment-lines{padding:11px 12px;background:#f7f7f8;border-radius:8px}.shipment-lines span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}.shipment-lines p{margin:6px 0 0;font-size:12px;line-height:1.4}.shipment-history{margin:12px 0;color:var(--muted);font-size:11px;line-height:1.5}.shipment-card-footer{margin-top:auto;padding-top:12px;border-top:1px solid var(--border)}.shipment-card-footer>a{color:var(--accent);font-size:12px;font-weight:700;text-decoration:none}.shipment-card-footer>a:hover{text-decoration:underline}.shipment-card-footer button{width:auto;margin:0;padding:9px 11px;font-size:12px}@media(max-width:700px){.shipment-overview{grid-template-columns:1fr}.shipment-grid{grid-template-columns:1fr}.shipment-card{min-height:0}}

/* Dense desktop layout for the order board. */
@media(min-width:1180px){.sales-order-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.sales-order-card{min-height:166px;padding:14px;}.sales-order-card h3{margin:10px 0 9px;font-size:16px;}.sales-order-meta{gap:5px;}.sales-order-meta span{padding:4px 6px;font-size:10px;}.sales-order-progress{padding:8px 0;}.sales-order-footer{padding-top:9px;}.sales-order-overview{gap:10px;margin-bottom:12px;}.sales-order-metric{padding:12px 14px;}.sales-order-metric strong{font-size:23px;}.sales-order-controls{padding:11px 12px;margin-bottom:12px;}}

/* Order details and shipment form use the same visual hierarchy as their boards. */
.sales-order-detail-heading{margin-bottom:12px!important}.sales-order-detail-summary{display:grid;grid-template-columns:minmax(240px,2fr) minmax(140px,1fr) minmax(110px,.6fr);gap:10px;margin:0 0 14px}.sales-order-detail-summary article{display:grid;gap:5px;padding:14px 16px;background:#fff;border:1px solid var(--border);border-radius:10px}.sales-order-detail-summary span{font-size:10px;color:var(--muted);letter-spacing:.6px}.sales-order-detail-summary strong{font-size:15px;overflow-wrap:anywhere}.sales-order-detail-client{border-left:3px solid var(--accent)!important}.sales-order-note{margin:0 0 14px;padding:11px 13px;background:#f7f7f8;border-radius:8px;color:var(--muted);font-size:12px;line-height:1.5}.sales-detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.sales-detail-actions button{width:auto;margin:0;padding:10px 13px;font-size:12px}.sales-detail-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 8px}.sales-detail-section-heading h3{margin:0;font-size:18px}.sales-detail-section-heading span{color:var(--muted);font-size:11px}.sales-detail-table{margin-top:0}.sales-detail-total{display:inline-block;margin:0;padding:10px 13px;background:#f7f7f8;border-radius:8px;font-size:14px;font-weight:700}.shipment-dialog{width:min(560px,calc(100vw - 32px));border:0;border-radius:14px;padding:22px;box-shadow:0 24px 70px #17171935}.shipment-dialog form{max-width:none}.shipment-dialog .sales-toolbar{margin:0 0 10px;padding-bottom:12px;border-bottom:1px solid var(--border)}.shipment-dialog-client{margin:0 0 8px;font-size:14px;font-weight:700}.shipment-dialog .sales-note{margin:0 0 14px}.shipment-form-lines{display:grid;gap:8px}.shipment-form-line{display:grid!important;grid-template-columns:minmax(0,1fr) 130px;align-items:end;gap:4px 12px;margin:0!important;padding:11px 12px;background:#f7f7f8;border:1px solid var(--border);border-radius:8px;font-size:12px!important}.shipment-form-line input{grid-column:2;grid-row:1 / span 2;width:100%!important;margin:0!important}.shipment-form-line small{grid-column:1;color:var(--muted);font-size:10px}.shipment-dialog form>button[type=submit]{margin-top:14px!important;padding:12px 15px}.shipment-dialog::backdrop{background:#17171955}@media(max-width:700px){.sales-order-detail-summary{grid-template-columns:1fr}.sales-detail-section-heading{display:block}.sales-detail-section-heading span{display:block;margin-top:4px}.shipment-dialog{padding:16px}.shipment-form-line{grid-template-columns:1fr}.shipment-form-line input{grid-column:1;grid-row:auto}.shipment-form-line small{grid-column:1}}

.fuel-hero-balance{display:block;padding:20px 24px;background:var(--accent);color:#fff;border-radius:12px;font-size:28px;align-self:center}#fuel-view table{width:100%;margin-top:10px;border-collapse:collapse;background:#fff;border:1px solid var(--border);border-radius:10px;overflow:hidden}#fuel-view th,#fuel-view td{padding:11px 12px;border-bottom:1px solid var(--border);text-align:left;font-size:12px}#fuel-view th{color:var(--muted);font-size:10px;letter-spacing:.5px}

.fuel-form{display:grid;gap:14px;margin-top:16px}.fuel-form .fuel-field{display:grid;gap:7px;color:var(--ink);font-size:13px;font-weight:700}.fuel-form input,.fuel-form select{box-sizing:border-box;width:100%;min-height:48px;padding:11px 13px;border:1px solid var(--border);border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:16px;line-height:1.25}.fuel-form .fuel-date-input{font-size:15px;letter-spacing:0}.fuel-form .fuel-date-input::-webkit-calendar-picker-indicator{width:16px;height:16px;margin:0;opacity:.68;cursor:pointer}.fuel-form .fuel-select{cursor:pointer}.fuel-form button{min-height:48px;margin-top:4px}@media(max-width:600px){.fuel-form{gap:13px}.fuel-form .fuel-field{font-size:13px}.fuel-form input,.fuel-form select{min-height:52px;padding:12px 13px;font-size:16px}.fuel-form .fuel-date-input{font-size:15px}}
#fuel-view{max-width:1120px}.fuel-header{display:flex;align-items:end;justify-content:space-between;gap:24px;padding:24px 0 18px;border-bottom:1px solid var(--border)}.fuel-header h2{margin:4px 0;font-size:34px}.fuel-header p{margin:0;color:var(--muted)}.fuel-balance{min-width:180px;padding:16px 18px;border-radius:12px;background:var(--ink);color:#fff}.fuel-balance span{display:block;font-size:12px;opacity:.76}.fuel-balance strong{display:block;margin-top:4px;font-size:27px;line-height:1}.fuel-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.fuel-actions button{min-height:44px}.fuel-management{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid var(--border);border-radius:12px;background:#fff}.fuel-management h3,.fuel-list-heading h3{margin:0;font-size:18px}.fuel-management p{margin:4px 0 0;color:var(--muted);font-size:13px}.fuel-list-heading{display:flex;align-items:center;justify-content:space-between;margin:24px 0 10px}.fuel-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--border);border-radius:12px;background:#fff;overflow:hidden}.fuel-table th,.fuel-table td{padding:12px 14px;border-bottom:1px solid var(--border);text-align:left;font-size:13px}.fuel-table th{font-size:11px;color:var(--muted);letter-spacing:.02em}.fuel-table tr:last-child td{border-bottom:0}.fuel-actor{margin:0;padding:11px 12px;border-radius:8px;background:#f5f5f5;color:var(--muted);font-size:13px}.fuel-directories{display:grid;gap:18px;margin-top:16px}.fuel-directory{padding:14px;border:1px solid var(--border);border-radius:10px}.fuel-directory h3{margin:0 0 10px}.fuel-directory-list{display:grid;gap:7px;margin-bottom:12px}.fuel-directory-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid var(--border)}.fuel-directory-row:last-child{border-bottom:0}.fuel-directory-row strong{font-size:14px}.fuel-directory-row div{display:flex;gap:6px}.fuel-directory-row button{padding:7px 9px;font-size:12px}@media(max-width:600px){#fuel-view{margin:0 -2px}.fuel-header{align-items:stretch;flex-direction:column;gap:13px;padding:14px 0}.fuel-header h2{font-size:27px}.fuel-balance{display:flex;align-items:baseline;justify-content:space-between;min-width:0;padding:15px 16px}.fuel-balance span{font-size:13px}.fuel-balance strong{margin:0;font-size:25px}.fuel-actions{display:grid;grid-template-columns:1fr 1fr;margin:14px 0;gap:8px}.fuel-actions button:last-child{grid-column:1/-1}.fuel-actions button{min-height:48px;padding:10px 8px;font-size:14px}.fuel-management{align-items:stretch;flex-direction:column;padding:15px}.fuel-management button{min-height:45px}.fuel-list-heading{margin:20px 0 9px}.fuel-table{display:block;overflow-x:auto;white-space:nowrap}.fuel-table th,.fuel-table td{padding:10px;font-size:12px}.fuel-directory-row{align-items:flex-start;flex-direction:column}.fuel-directory-row div{width:100%}.fuel-directory-row button{flex:1}.fuel-dialog{width:calc(100vw - 24px);max-width:480px;padding:16px;border-radius:13px}}
.fuel-primary-actions{margin-bottom:10px}.fuel-tools{display:flex;gap:8px;flex-wrap:wrap;padding:4px 0 18px;border-bottom:1px solid var(--border)}.fuel-tools button{min-height:38px;padding:8px 12px;font-size:13px}@media(max-width:600px){.fuel-primary-actions{margin-bottom:12px}.fuel-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-bottom:16px}.fuel-tools button{min-height:44px;padding:9px 8px;font-size:13px}}
.sales-order-history{margin-top:22px;padding:18px;border:1px solid var(--border);border-radius:12px;background:#fff}.sales-order-history h3{margin:0 0 12px}.sales-history-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--border)}.sales-history-row:last-child{border-bottom:0}.sales-history-row strong{font-size:14px}.sales-history-row span{color:var(--muted);font-size:13px;text-align:right}.sales-report-filters{display:flex;align-items:end;gap:12px;margin:18px 0;padding:16px;border:1px solid var(--border);border-radius:12px;background:#fff}.sales-report-filters label{display:grid;gap:6px;font-size:13px;font-weight:700}.sales-report-filters input{min-height:42px;padding:8px 10px;border:1px solid var(--border);border-radius:8px;font:inherit}.sales-report-output h3{margin:22px 0 8px}@media(max-width:600px){.sales-order-history{padding:14px}.sales-history-row{align-items:flex-start;flex-direction:column;gap:3px}.sales-history-row span{text-align:left}.sales-report-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px}.sales-report-filters button{grid-column:1/-1;min-height:46px}}
.sales-completion-bar{height:6px;margin-top:8px;border-radius:999px;background:#e7e7e7;overflow:hidden}.sales-completion-bar span{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.supply-stat-button{width:100%;color:var(--ink);text-align:left;cursor:pointer}.supply-stat-button[aria-pressed=true]{border-color:var(--accent);background:var(--accent);color:#fff}.supply-stat-button[aria-pressed=true]>span,.supply-stat-button[aria-pressed=true]>small{color:#fff}
.pay-rate-filters{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0;padding:14px;border:1px solid var(--border);border-radius:12px;background:#fff}.pay-rate-filters select{min-width:190px;flex:1;padding:10px;border:1px solid var(--border);border-radius:8px;background:#fff;font:inherit;font-size:13px}.pay-rate-summary{margin:0 0 10px;color:var(--muted);font-size:13px}.pay-rate-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;background:#fff}.pay-rate-table{width:100%;min-width:1000px;border-collapse:collapse}.pay-rate-table th,.pay-rate-table td{padding:12px 13px;border-bottom:1px solid var(--border);text-align:left;font-size:13px}.pay-rate-table th{background:#f6f6f7;color:var(--muted);font-size:11px;white-space:nowrap}.pay-rate-table tr:last-child td{border-bottom:0}.pay-rate-table button{margin:0;padding:8px 11px}.pay-rate-status{font-weight:700;font-size:12px!important}.pay-rate-missing{color:#bb1d31}.pay-rate-configured{color:#25714a}.pay-rate-conflict{color:#a86700}.pay-rate-dialog{width:min(500px,calc(100vw - 28px));border:0;border-radius:12px;padding:24px;box-shadow:0 24px 70px #10101044}.pay-rate-dialog h2{margin:0}.pay-rate-dialog form{display:grid;gap:13px;margin-top:16px}.pay-rate-dialog label{display:grid;gap:6px;font-size:12px;font-weight:700}.pay-rate-dialog input,.pay-rate-dialog select,.pay-rate-dialog textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid var(--border);border-radius:8px;font:inherit}.pay-rate-dialog textarea{min-height:80px;resize:vertical}@media(max-width:700px){.pay-rate-filters{display:grid;grid-template-columns:1fr}.pay-rate-filters select{min-width:0}.pay-rate-dialog{padding:16px}}
.pay-rate-editor-rows{display:grid;gap:14px}.pay-rate-editor-row{display:grid!important;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:#fafafa}.pay-rate-editor-row label{display:grid!important;gap:6px!important}.pay-rate-editor-row input[type=number]{display:block!important;min-height:44px!important;background:#fff!important;color:var(--ink)!important;opacity:1!important}

/* Каталог товарів (прототип): розкладка та дрібні елементи; таблиці, кнопки й кольори — наявні стилі ERP. */
#product-catalog-view{max-width:1720px}
.pc-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:6px}
.pc-header h2{margin:4px 0;font-size:34px}.pc-header p{margin:0}
.pc-total,.pc-demo{padding:8px 12px;border-radius:999px;background:var(--ink);color:#fff;font-size:12px}
.pc-banner{flex:1;margin:0;padding:11px 14px;background:#fff;border-left:3px solid var(--accent);border-radius:6px;color:var(--muted);font-size:13px}
.pc-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:16px 0}
.pc-toolbar label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}
.pc-toolbar input,.pc-toolbar select{min-width:200px;padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit}
.pc-toolbar input[type=search]{min-width:300px}
.pc-toolbar .secondary{margin:0}
.pc-layout{display:grid;grid-template-columns:230px minmax(0,1.5fr) minmax(380px,1fr);gap:16px;align-items:start}
/* Список позицій у центральній колонці: щільніші клітинки, щоб «Локації» й «Стан» не обрізались; бейджі переносяться. */
.pc-items th,.pc-items td{padding:10px 8px}.pc-items td:first-child{min-width:0}.pc-items .pc-badge{white-space:normal}
.pc-panel{min-width:0;padding:16px;background:#fff;border:1px solid var(--border);border-radius:10px}
.pc-panel h3{margin:0 0 12px;font-size:16px}.pc-panel h4{margin:18px 0 8px;font-size:14px}
.pc-tree ul{margin:0;padding:0 0 0 14px;list-style:none}.pc-tree>ul{padding-left:0}
.pc-node{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px 10px;border-radius:7px;background:transparent;color:var(--ink);font-size:13px;font-weight:650;text-align:left}
.pc-node:hover{background:#f3f3f4;filter:none}
.pc-node.is-active{background:var(--accent-soft);color:var(--accent)}
.pc-node.is-planned{color:var(--muted);font-weight:500}.pc-node.is-planned.is-active{color:var(--accent)}
.pc-count{min-width:22px;padding:2px 7px;border-radius:999px;background:#f0f0f2;color:var(--muted);font-size:11px;text-align:center}
.pc-crumbs{margin:0 0 10px;color:var(--muted);font-size:13px}
.pc-note{margin:10px 0;padding:11px 13px;background:#f7f7f8;border-radius:8px;color:var(--muted);font-size:13px;line-height:1.5}
.pc-overview{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.pc-chip{padding:6px 11px;border:1px dashed #cfcfd4;border-radius:999px;color:var(--muted);font-size:12px}
.pc-chip.is-ready{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:650}
.pc-list-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:20px}
.pc-row{cursor:pointer}.pc-row:hover{background:#fafafa}.pc-row.is-selected{background:var(--accent-soft)}
.pc-link{padding:0;border-radius:4px;background:transparent;color:var(--ink);font-weight:650;font-size:13px;text-align:left}.pc-link:hover{color:var(--accent);filter:none}
.pc-badge{display:inline-block;padding:4px 9px;border-radius:6px;background:#fff2dc;color:#785009;font-size:12px;white-space:nowrap}
.pc-badge.good{background:#e5f5e9;color:#256638}.pc-badge.info{background:#e4eefc;color:#1d4f91}.pc-badge.off{background:#efeff1;color:#5d5d63}
.pc-card-name{margin:0 0 10px;font-weight:650;line-height:1.4}
.pc-facts{display:grid;grid-template-columns:minmax(120px,.9fr) minmax(0,1.1fr);gap:0;margin:0;border:1px solid var(--border);border-radius:8px}
.pc-facts dt,.pc-facts dd{margin:0;padding:9px 11px;border-bottom:1px solid var(--border);font-size:13px}
.pc-facts dt{color:var(--muted);background:#f9f9fa}.pc-facts dt:nth-last-child(2),.pc-facts dd:last-child{border-bottom:0}
.pc-small{margin:8px 0 0;font-size:12px}
.pc-coil-summary{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
@media(max-width:1400px){.pc-layout{grid-template-columns:240px minmax(0,1fr)}.pc-card{grid-column:1/-1}}
@media(max-width:760px){.pc-layout{grid-template-columns:1fr}.pc-toolbar input[type=search],.pc-toolbar input,.pc-toolbar select{min-width:0;width:100%}.pc-toolbar label{flex:1 1 100%}}
.pc-card-title{margin:2px 0 14px!important;font-size:22px!important;line-height:1.3}
.pc-chips{display:flex;flex-wrap:wrap;gap:6px}
.pc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 0}
.pc-stats-compact{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin:0 0 12px}
.pc-stat{padding:11px 13px;border:1px solid var(--border);border-radius:8px;background:#fff}
.pc-stat span{display:block;color:var(--muted);font-size:12px}
.pc-stat strong{display:block;margin-top:4px;font-size:20px}
.pc-stat.good{background:#f1faf3;border-color:#cfe9d6}.pc-stat.good strong{color:#256638}
.pc-stat.warn{background:#fff8ec;border-color:#f1deb8}.pc-stat.warn strong{color:#785009}
.pc-stat.info{background:#f0f6fe;border-color:#cddff6}.pc-stat.info strong{color:#1d4f91}
.pc-block{margin-top:22px;padding-top:4px;border-top:1px solid var(--border)}
.pc-block h4{margin-top:14px}
.pc-panel h5{margin:16px 0 8px;font-size:13px}
.pc-location-table th:not(:first-child),.pc-location-table td:not(:first-child){text-align:center}
.pc-location-table{min-width:0;width:100%;table-layout:fixed}.pc-location-table th,.pc-location-table td{padding:8px 6px;font-size:12px;white-space:normal;overflow-wrap:anywhere}.pc-location-table th:first-child,.pc-location-table td:first-child{width:25%;text-align:left}
.pc-location-table input{width:17px;height:17px;margin:0;accent-color:var(--accent)}
.pc-reference{margin:14px 0;border:1px solid var(--border);border-radius:8px;background:#fafafa}
.pc-reference>summary{padding:10px 14px;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer}
.pc-reference[open]>summary{border-bottom:1px solid var(--border);color:var(--ink)}
.pc-reference>*:not(summary){margin-left:14px;margin-right:14px}
.pc-reference .pc-note{background:#fff}
.pc-reference .pc-spec h4{margin-top:14px}
@media(max-width:760px){.pc-stats{grid-template-columns:1fr}}
.pc-stats-compact .pc-stat{padding:8px 12px}.pc-stats-compact .pc-stat strong{font-size:16px}

.pc-center{display:grid;gap:16px;min-width:0}
.pc-sku .pc-list-heading{margin-top:0;align-items:center;flex-wrap:wrap}
.pc-sku h3{margin:0}
.pc-sku-role{min-width:0;max-width:100%;padding:7px 9px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit;font-size:12px}
.pc-sku-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.pc-sku-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}
.pc-sku-form select,.pc-sku-form input{width:100%;padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit;font-weight:400}
.pc-sku-diameter{display:flex;align-items:center;gap:8px}
.pc-unit{color:var(--muted);font-size:13px;font-weight:600}
.pc-normalized{min-height:18px;margin:6px 0 0;font-size:13px;font-weight:650;color:var(--ink)}
.pc-sku-result{margin-top:10px;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:#fafafa;font-size:13px;line-height:1.5}
.pc-sku-result p{margin:6px 0 0}
.pc-sku-result.is-ok{background:#f1faf3;border-color:#cfe9d6}
.pc-sku-result.is-new{background:#fff8ec;border-color:#f1deb8}
.pc-sku-result.is-warn{background:#f7f7f8;border-color:#dcdce0}
.pc-sku-result.is-bad{background:#fdf1f1;border-color:#f0c9c9}
.pc-sku-name{font-weight:650}
.pc-sku-notice{padding:8px 10px;border-radius:6px;background:#e5f5e9;color:#256638}
.pc-sku-notice.is-bad,.pc-save-status.is-bad{background:#fdf1f1;color:#ad2432}
.pc-save-status{min-height:18px}.pc-empty{padding:8px 0}
.pc-sku-actions{margin-top:10px}
.pc-sku-primary:disabled{opacity:.45;cursor:not-allowed;filter:none}

/* Каталог товарів v2: динамічні форми родин, життєвий цикл, довідники */
.pc-family-row{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-top:12px}
.pc-family-row label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;min-width:260px}
.pc-family-row select{padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit;font-weight:400}
.pc-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.pc-label-text.is-required::after{content:' *';color:#ad2432}
.pc-field-error{min-height:0;margin:0;color:#ad2432;font-size:12px}.pc-field-error:empty{display:none}
.pc-input{display:flex;align-items:center;gap:8px}.pc-input input{flex:1}
.pc-color{display:grid;gap:6px}
.pc-suggestions p{margin:6px 0 0}
.pc-suggest{margin:0 2px 0 0;padding:3px 9px;border:1px solid var(--border);border-radius:999px;background:#fff;color:var(--ink);font-size:12px}
.pc-suggest:hover{border-color:var(--accent);color:var(--accent);filter:none}
.pc-suggest.is-active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:650}
.pc-tree ul.pc-models{padding-left:12px}.pc-model-node{font-weight:500;padding:6px 10px}
.pc-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
.pc-actions select,.pc-actions input{padding:7px 9px;border:1px solid var(--border);border-radius:6px;background:#fff;font:inherit}
.pc-card-status:empty{display:none}.pc-card-status.is-bad,.pc-admin-status.is-bad{color:#ad2432}
button.danger{color:#ad2432;border-color:#e3b4b9}
.pc-admin-panel[hidden]{display:none}
.pc-admin .pc-sku-form{margin-bottom:10px}.pc-quick-groups{margin:4px 0 10px}.pc-quick.is-active{background:#1f6f43;color:#fff;border-color:#1f6f43}

/* B2B-замовлення v2: список і компактна картка менеджера (public/b2b-orders.js). */
#b2b-orders-view{padding:4px 0 40px}
.bo-muted{color:var(--muted);font-size:13px;margin:8px 0}
.bo-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.bo-location{display:inline-block;background:#eef3ff;color:#23407a;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600}
.bo-search{flex:1;min-width:200px;max-width:360px;padding:9px 12px}
.bo-new{margin-left:auto}
.bo-list .bo-row{cursor:pointer}.bo-list .bo-row:hover,.bo-list .bo-row:focus-visible{background:#f7f7f8;outline:none}
.bo-list .bo-client{font-weight:700}.bo-list .bo-no{color:#5c5c63;white-space:nowrap}
.bo-tabs{display:flex;flex-wrap:wrap;gap:6px}.bo-tab{display:inline-flex;align-items:center;gap:4px;padding:6px 10px}.bo-tab-count{display:inline-block;min-width:20px;padding:0 6px;border-radius:10px;background:#ececf0;color:#3b3b42;font-size:12px;font-weight:700;text-align:center}.bo-tab.is-active .bo-tab-count{background:#fff;color:#1f6f43}
.bo-card{display:flex;flex-direction:column;gap:10px;max-width:1180px}
.bo-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.bo-top h2{margin:0;font-size:20px}
.bo-status{display:inline-block;background:#fff2dc;color:#785009;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600}
.bo-good{border-left-color:#256638;color:#256638}
.bo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px;background:#fff;border:1px solid var(--border);border-radius:10px;padding:14px}
.bo-field{display:flex;flex-direction:column;gap:4px;min-width:0}.bo-wide{grid-column:span 2}.bo-full{grid-column:1/-1}
.bo-label{font-size:11px;font-weight:600;color:var(--muted)}
.bo-field input,.bo-field select,.bo-field textarea,.bo-step select{padding:8px 10px;border:1px solid #bfbfc4;border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:14px;width:100%}
.bo-field textarea{resize:vertical;min-height:44px}
.bo-error{color:#ad2432;font-size:12px;margin:2px 0}
.bo-customer{position:relative}.bo-badge{position:absolute;right:8px;top:8px;background:#e5f5e9;color:#256638;border-radius:5px;padding:2px 7px;font-size:11px}
.bo-suggest{position:absolute;z-index:5;left:0;right:0;top:100%;background:#fff;border:1px solid #bfbfc4;border-radius:8px;box-shadow:0 8px 20px rgba(0,0,0,.12);max-height:240px;overflow:auto}
.bo-suggest-item{display:block;width:100%;text-align:left;background:#fff;color:var(--ink);border-radius:0;padding:9px 12px;font-weight:500;font-size:13px}.bo-suggest-item:hover{background:#f3f4f7}
.bo-picker{background:#fff;border:1px solid var(--border);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.bo-groups{display:flex;flex-wrap:wrap;gap:6px}
.bo-chip{background:#fff;color:var(--ink);border:1px solid #bfbfc4;padding:7px 12px;font-size:13px;font-weight:600}.bo-chip.is-active{background:#1f6f43;color:#fff;border-color:#1f6f43}
.bo-steps{display:flex;flex-wrap:wrap;gap:10px}.bo-step{display:flex;flex-direction:column;gap:3px;min-width:150px;flex:1 1 150px;max-width:260px}.bo-variant{max-width:520px;flex:2 1 260px}
.bo-add{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bo-chosen{flex:1 1 280px;font-size:13px;color:var(--muted)}.bo-chosen.is-ready{color:var(--ink);font-weight:600}
.bo-qty{width:110px;max-width:130px;padding:8px 10px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:14px}
.bo-unit{min-width:48px;font-size:13px;color:var(--muted)}
.bo-add-button,.secondary-button{background:#fff;color:var(--ink);border:1px solid #bfbfc4;padding:8px 14px;font-size:13px}
.bo-add-button:disabled,.bo-save:disabled{opacity:.5;cursor:not-allowed}
.bo-card h3{margin:8px 0 0;font-size:15px}
.bo-lines-table td.bo-name{min-width:260px}.bo-lines-table .bo-qty{min-width:90px}
.bo-deficit{color:#ad2432;font-weight:700}.bo-unknown{color:var(--muted)}
.bo-remove{background:#fff;color:#ad2432;border:1px solid #e3b4b9;padding:5px 9px;font-size:12px}
.bo-actions{display:flex;gap:10px;align-items:center;margin-top:6px}.bo-save,.primary-button.bo-new{padding:10px 20px;font-size:14px}
@media(max-width:900px){.bo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Stock v2: залишки готової продукції (локація, фільтри, введення, залишок біля варіантів у замовленні) */
.bo-stock{font-size:13px;font-weight:600;color:#256638}.bo-stock.bo-unknown{color:var(--muted);font-weight:400}
.bo-pack{flex-basis:100%;font-size:12px;color:var(--muted);margin:0}
.sv-page .sv-bar{margin-bottom:10px}
.sv-select{padding:9px 10px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:13px;background:#fff;max-width:240px}
.sv-check{display:inline-flex;flex-direction:row;align-items:center;gap:6px;font-size:13px;font-weight:400;white-space:nowrap;cursor:pointer}.sv-check input{width:auto;margin:0}
.sv-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:10px 0}
.sv-card{display:flex;flex-direction:column;gap:4px;text-align:left;background:#fff;color:var(--ink);border:1px solid var(--border);border-radius:10px;padding:12px 14px;cursor:pointer}
.sv-card:hover{border-color:#1f6f43}.sv-card strong{font-size:14px}
.sv-table td.sv-qty{text-align:right;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.sv-table td.sv-qty.bo-unknown{font-weight:400}
.sv-row-button{padding:5px 10px;font-size:12px}
.sv-panel{background:#fafafb;border:1px solid var(--border);border-radius:10px;padding:12px 14px;margin:10px 0;display:flex;flex-direction:column;gap:10px}
.sv-panel-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sv-panel-head h3{margin:0;flex:1}
.sv-panel .bo-qty{width:160px;max-width:180px}
.sv-reason{flex:1 1 220px;min-width:200px;padding:8px 10px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:14px}
.sv-current{font-size:14px;font-weight:600;margin:0}.sv-detail h4{margin:8px 0 4px;font-size:13px}
.sv-history td{font-size:12px}

/* Demand v2: потреба, вільно й дефіцит у замовленнях і залишках */
.sv-table td.sv-qty.bo-muted{font-weight:400}
.sv-table tr.sv-hot td{background:#fff5f5}
.sv-check-deficit span{color:#ad2432;font-weight:600}
.sv-deficit-alert{border-color:#e0a4aa;color:#ad2432;margin:6px 0}
.sv-card-deficit{color:#ad2432;font-weight:600;font-size:13px}
.bo-status-filter{padding:9px 10px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:13px;background:#fff}
.bo-row.bo-cancelled td{color:var(--muted);text-decoration:line-through}
.bo-row.bo-cancelled td:nth-child(5){text-decoration:none}
.bo-forecast{display:flex;flex-wrap:wrap;gap:8px 18px;flex-basis:100%;background:#f6f7f9;border:1px solid var(--border);border-radius:8px;padding:8px 12px}
.bo-forecast[hidden]{display:none}
.bo-forecast-item{display:flex;flex-direction:column;gap:2px;font-size:13px}
.bo-forecast-item b{font-variant-numeric:tabular-nums}
.bo-lines-table td:nth-child(n+4):nth-child(-n+6){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.bo-cancel{border-color:#e0a4aa;color:#ad2432}

/* Batch-підбір замовлення (UX v3): шапка, дві зони (підбір + sticky-кошик), таблиці зі списком SKU */
.ob-card{max-width:1400px}
.ob-header{display:grid;grid-template-columns:repeat(12,1fr);gap:8px 12px;margin:6px 0 10px;padding:10px 12px}
.ob-header .bo-field{margin:0;min-width:0}
.ob-f-customer{grid-column:span 4}.ob-f-city{grid-column:span 3}.ob-f-date{grid-column:span 2}.ob-f-method{grid-column:span 3}.ob-f-comment{grid-column:span 12}
.ob-header textarea{min-height:36px;resize:vertical}
.ob-workspace{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.ob-workspace.is-readonly{grid-template-columns:minmax(0,720px)}
.ob-main{min-width:0}
.ob-picker{padding:10px 12px}
.ob-cats .bo-chip{display:inline-flex;align-items:center;gap:6px}
.ob-badge{display:inline-block;min-width:18px;padding:0 6px;border-radius:9px;background:#1f6f43;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.bo-chip.is-active .ob-badge{background:#fff;color:#1f6f43}
.ob-control{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0}
.ob-control-label{min-width:96px;margin:0}
.ob-options{display:flex;flex-wrap:wrap;gap:6px}
.ob-opt{background:#fff;color:var(--ink);border:1px solid #bfbfc4;border-radius:8px;padding:6px 12px;font-size:13px;cursor:pointer}
.ob-opt:hover{border-color:#1f6f43}.ob-opt.is-active{background:#1f6f43;border-color:#1f6f43;color:#fff}
.ob-hint{margin:12px 0 4px}
.ob-flash{margin:0 0 8px}
.ob-wrap{margin-top:10px;max-height:62vh;overflow:auto}
.ob-table th{position:sticky;top:0;background:#f4f5f7;z-index:1;white-space:nowrap}
.ob-table td{padding:5px 10px;vertical-align:middle}
.ob-table th{padding:8px 10px}
.ob-table td.ob-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.ob-table th:nth-last-child(-n+3){text-align:right}
.ob-table td.ob-qty-cell{width:150px;white-space:nowrap}
.ob-qty{width:100px;padding:6px 8px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:14px;text-align:right}
.ob-qty:focus{border-color:#1f6f43;outline:2px solid #cfe6d8}
.ob-qty.is-invalid{border-color:#ad2432;background:#fff5f5}
.ob-forecast{display:block;font-size:12px;margin-top:2px;white-space:normal}
.ob-forecast[hidden]{display:none}
.ob-incart{display:block;font-size:12px;color:#256638;font-weight:600}
.ob-addbar{position:sticky;bottom:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border-top:1px solid var(--border);padding:10px 0;margin-top:2px}
.ob-add{padding:9px 18px;font-size:14px}
.ob-add:disabled{opacity:.5;cursor:not-allowed}
.ob-msg{font-size:13px}
.ob-cart{position:sticky;top:12px;display:flex;flex-direction:column;max-height:calc(100vh - 24px);background:#fff;border:1px solid var(--border);border-radius:10px;padding:12px 14px}
.ob-cart-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px}.ob-cart-head h3{margin:0}
.ob-cart-count{font-size:13px;color:var(--muted)}
.ob-cart-list{overflow:auto;flex:1 1 auto;min-height:60px}
.ob-cart-empty{margin:6px 0}
.ob-line{padding:8px 0;border-bottom:1px solid #eee}.ob-line:last-child{border-bottom:0}
.ob-line-name{font-size:13px;font-weight:600;margin-bottom:4px}
.ob-line-qty{display:flex;align-items:center;gap:6px}
.ob-qty-line{width:96px}
.ob-unit{font-size:13px;color:var(--muted)}
.ob-remove{margin-left:auto;background:#fff;color:#ad2432;border:1px solid #e0a4aa;border-radius:8px;width:30px;height:30px;min-width:30px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:18px;line-height:1;cursor:pointer}
.ob-line-info{font-size:12px;margin-top:3px}
.ob-cart-foot{display:flex;flex-direction:column;gap:8px;padding-top:10px;border-top:1px solid var(--border);margin-top:6px}
.ob-save{width:100%}
.ob-cart-actions{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:1000px){
 .ob-workspace,.ob-workspace.is-readonly{grid-template-columns:minmax(0,1fr)}
 .ob-cart{position:static;max-height:none}
 .ob-f-customer,.ob-f-city,.ob-f-date,.ob-f-method{grid-column:span 12}
 .ob-wrap{max-height:none}
}

/* Order entry v5: дерево ліворуч, номенклатура зверху на всю ширину, поточне замовлення знизу (щільний ERP-вигляд) */
.content.ot-wide{max-width:none;padding:0 8px 6px}
.content.ot-wide .page-heading,.content.ot-wide .back-link,.content.ot-wide .page-footer{display:none!important}
.content.ot-wide .topbar{height:48px}
.ot-card{display:flex;flex-direction:column;gap:4px;max-width:none;height:calc(100vh - 106px);min-height:520px}
.ot-top{gap:8px;min-height:24px;flex-wrap:wrap;align-items:center;margin:0}
.ot-top h2{font-size:15px;font-weight:650;margin:0}
.ot-banner{margin:0;padding:3px 8px;font-size:12px;flex:1 1 220px;min-width:0;border-radius:3px}
.ot-header{display:grid;grid-template-columns:2.2fr 1.4fr .95fr 1.15fr 1.7fr;gap:2px 8px;background:#fff;border:1px solid var(--border);padding:3px 8px 4px;border-radius:3px}
.ot-header .bo-field{margin:0;min-width:0}
.ot-header .bo-label{font-size:10px;letter-spacing:.02em;margin:0}
.ot-header .bo-field input,.ot-header .bo-field select{padding:3px 6px;font-size:12.5px;border-radius:3px;height:26px}
.ot-header .bo-error{margin:0}
.ot-workspace{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:224px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:6px}
.ot-workspace.is-readonly{grid-template-columns:minmax(0,1fr)}
.ot-tree,.ot-main,.ot-cart{background:#fff;border:1px solid var(--border);min-height:0;display:flex;flex-direction:column;overflow:hidden}
.ot-right{min-width:0;min-height:0;display:flex;flex-direction:column}
.ot-main{flex:1 1 auto;min-width:0;min-height:90px}
.ot-tree-head{padding:5px 8px;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border);flex:none}
.ot-tree-list{overflow:auto;flex:1 1 auto;padding:2px 0}
.ot-row{display:flex;align-items:center;gap:1px;min-height:22px;padding-right:6px}
.ot-row:hover{background:#f3f4f6}
.ot-row.is-selected{background:#e8f3ec}
.ot-row.is-selected .ot-label{font-weight:700;color:#1a5c38}
.ot-row.is-top .ot-label{font-weight:650}
.ot-chev,.ot-label,.ot-child,.ot-remove,.ot-search-clear,.ot-toast-undo,.ot-toast-close,.ot-search-all,.ot-cart-toggle{background:transparent;color:inherit;border:0;border-radius:0;padding:0;font-weight:500;box-shadow:none;filter:none;transform:none}
.ot-chev,.ot-label,.ot-child,.ot-remove,.ot-search-clear,.ot-toast-undo,.ot-toast-close,.ot-search-all,.ot-cart-toggle{cursor:pointer}
.ot-chev:hover,.ot-label:hover,.ot-child:hover,.ot-remove:hover,.ot-search-clear:hover,.ot-toast-undo:hover,.ot-toast-close:hover,.ot-search-all:hover,.ot-cart-toggle:hover{filter:none;background:transparent;transform:none}
.ot-chev{width:16px;min-width:16px;height:20px;font-size:10px;color:#6b6b70;text-align:center}
.ot-chev-empty{visibility:hidden}
.ot-label{flex:1 1 auto;min-width:0;text-align:left;font-size:12.5px;line-height:1.2;padding:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.ot-badge{min-width:15px;padding:0 4px;border-radius:8px;background:#1f6f43;color:#fff;font-size:10px;font-weight:700;line-height:15px;text-align:center;flex:none}
.ot-count{margin-left:auto;font-size:10px;color:#8a8a90;flex:none;padding-left:4px}
.ot-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 8px;border-bottom:1px solid var(--border);flex:none}
.ot-crumb{flex:1 1 160px;min-width:0;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ot-crumb-sep,.ot-crumb-sub{color:var(--muted)}
.ot-dblhint{font-size:11px;color:var(--muted);white-space:nowrap}
.ot-searchbox{position:relative;flex:0 1 260px;min-width:160px}
.ot-search-input{width:100%;padding:3px 24px 3px 7px;border:1px solid #bfbfc4;border-radius:3px;font-size:12.5px;height:24px}
.ot-search-input:focus{outline:2px solid #cfe6d8;border-color:#1f6f43}
.ot-search-clear{position:absolute;right:2px;top:0;bottom:0;width:20px;color:#6b6b70;font-size:15px}
.ot-all{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:400;white-space:nowrap;margin:0;cursor:pointer}
.ot-all input{width:auto;margin:0}
.ot-filters{display:flex;flex-direction:column;gap:3px;padding:4px 8px;border-bottom:1px solid var(--border);background:#fafafa;flex:none}
.ot-filter{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:400;flex-wrap:wrap}
.ot-filter-label{color:var(--muted);white-space:nowrap;min-width:84px;font-size:11.5px}
.ot-filter select{padding:2px 6px;font-size:12px;border:1px solid #bfbfc4;border-radius:3px;background:#fff;max-width:180px}
.ot-chips{display:flex;flex-wrap:wrap;gap:4px}
.ot-chip{background:#fff;color:var(--ink);border:1px solid #c8c8cc;border-radius:3px;padding:2px 9px;font-size:12px;font-weight:500;display:inline-flex;align-items:center;gap:5px;line-height:1.35;box-shadow:none}
.ot-chip:hover{border-color:#1f6f43;background:#f3f8f4;filter:none;transform:none}
.ot-chip.is-active{background:#1f6f43;border-color:#1f6f43;color:#fff}
.ot-swatch{width:10px;height:10px;border-radius:50%;border:1px solid #0003;background:#ccc;flex:none;display:inline-block;font-style:normal}
.ot-chip.is-active .ot-swatch{border-color:#fff8}
.ot-swatch[data-ral="6005"]{background:#2e7d32}
.ot-swatch[data-ral="7016"]{background:#5b6770}
.ot-swatch[data-ral="8017"]{background:#6d4c41}
.ot-swatch[data-ral="9005"]{background:#1a1a1a}
.ot-swatch[data-ral="zinc"]{background:linear-gradient(135deg,#e3e7ea,#aab3ba)}
.ot-tablewrap{flex:1 1 auto;min-height:0;overflow:auto}
.ot-hint,.ot-wait{margin:16px 12px;font-size:13px;color:var(--muted)}
.ot-wait{font-size:15px}
.ot-children{display:flex;flex-direction:column}
.ot-child{display:flex;align-items:center;gap:8px;padding:5px 10px;text-align:left;border-bottom:1px solid #f0f0f2;font-size:12.5px;color:var(--ink)}
.ot-child:hover{background:#f3f4f6}
.ot-child-label{flex:1}
.ot-table,.ot-ctable{width:100%;border-collapse:collapse;font-size:12.5px}
.ot-table th,.ot-ctable th{position:sticky;top:0;background:#f4f5f7;z-index:1;text-align:left;font-weight:650;font-size:11.5px;padding:3px 8px;border-bottom:1px solid #d6d8dd;white-space:nowrap}
.ot-table td,.ot-ctable td{padding:1px 8px;border-bottom:1px solid #eceef0;vertical-align:middle;height:22px}
.ot-table td.ot-num,.ot-table th.ot-num-head{width:140px;text-align:right;white-space:nowrap}
.ot-table tbody tr{cursor:pointer;user-select:none}
.ot-table tbody tr:hover{background:#eaf2ed;box-shadow:inset 3px 0 0 #8fbf9f}
.ot-table tbody tr.is-active{background:#dcebe1}
.ot-table tbody tr.is-ordered{background:#f3f8f4}
.ot-table tbody tr.is-ordered.is-active{background:#d3e8d9}
.ot-table tbody tr.is-draft td:first-child{box-shadow:inset 3px 0 0 #d9a21b}
.ot-table tbody tr.is-deficit td:first-child{box-shadow:inset 3px 0 0 #ad2432}
.ot-first{min-width:90px}
.ot-first span{display:block}
.ot-sub{font-size:11px;color:var(--muted);font-weight:400}
.ot-num,.ot-num-head{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.ot-qty{width:76px;padding:1px 6px;border:1px solid #bfbfc4;border-radius:3px;font:inherit;font-size:12.5px;text-align:right;height:20px}
.ot-qty:focus{border-color:#1f6f43;outline:2px solid #cfe6d8}
.ot-qty.is-invalid{border-color:#ad2432;background:#fff5f5}
.ot-toast{display:flex;align-items:center;gap:8px;flex:none;padding:4px 10px;background:#1f2430;color:#fff;font-size:12px}
.ot-toast[hidden]{display:none!important}
.ot-toast-undo{color:#9ee0b5;font-weight:650;font-size:12px}
.ot-toast-close{color:#ccc;width:20px;font-size:16px;margin-left:auto}
.ot-divider{flex:none;height:8px;cursor:row-resize;position:relative;touch-action:none}
.ot-divider::after{content:"";position:absolute;left:50%;top:3px;width:46px;height:2px;margin-left:-23px;background:#c4c6cc;border-radius:2px}
.ot-divider:hover::after,.ot-divider:focus-visible{background:transparent}
.ot-divider:hover::after,.ot-divider:focus-visible::after{background:#1f6f43}
.ot-divider[hidden]{display:none}
.ot-divider:focus-visible{outline:none}
.ot-cart{flex:none;max-height:72%}
.ot-workspace.is-readonly .ot-cart{flex:1 1 auto;max-height:none}
.ot-cart-bar{display:flex;align-items:center;gap:8px;padding:3px 8px;min-height:32px;background:#f4f5f7;border-bottom:1px solid #d6d8dd;flex:none}
.ot-cart.is-collapsed .ot-cart-bar{border-bottom:0}
.ot-cart.is-collapsed .ot-cart-body{display:none}
.ot-cart-toggle{width:20px;height:20px;font-size:13px;color:#4b4b50;text-align:center}
.ot-cart-title{font-size:13px}
.ot-cart-count{font-size:12.5px;color:var(--muted)}
.ot-cart-meta{display:inline-flex;gap:8px;font-size:11.5px}
.ot-dirty{color:#785009}
.ot-cart-note{font-size:12px}
.ot-cart-actions{margin-left:auto;display:flex;gap:6px;align-items:center}
.ot-cart-actions .secondary-button,.ot-cart-actions .primary-button{padding:4px 10px;font-size:12px;border-radius:3px;width:auto;line-height:1.3;transform:none}
.ot-cart-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.ot-cart-body>.bo-error{margin:2px 8px}
.ot-cart-list{overflow:auto;flex:1 1 auto;min-height:0}
.ot-cart-empty{margin:8px 10px;font-size:12px}
.ot-ctable{table-layout:fixed}
.ot-ctable .ot-c-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ot-ctable th.ot-c-color,.ot-ctable td.ot-c-color{width:168px;white-space:nowrap}
.ot-ctable th.ot-c-qty,.ot-ctable td.ot-c-qty{width:96px}
.ot-ctable th.ot-c-unit,.ot-ctable td.ot-c-unit{width:48px;color:var(--muted)}
.ot-ctable th.ot-num,.ot-ctable td.ot-num{width:88px}
.ot-ctable th.ot-c-qty,.ot-ctable td.ot-c-qty{width:96px}
.ot-ctable th.ot-c-del,.ot-ctable td.ot-c-del{width:30px;padding:0 2px;text-align:center}
.ot-ctable .ot-c-color .ot-swatch{margin-right:6px;vertical-align:middle}
.ot-muted{color:#9a9aa0}
.ot-line{transition:background .4s ease}
.ot-line.is-changed{background:#dff1e5}
.ot-line.is-draft{background:#fffbea}
.ot-line.is-invalid{background:#fff1f1}
.ot-line.is-invalid td:first-child,.ot-line.has-deficit td:first-child{box-shadow:inset 3px 0 0 #ad2432}
.ot-remove{color:#ad2432;width:20px;height:20px;min-width:20px;font-size:15px;line-height:1;border:1px solid transparent;border-radius:3px}
.ot-remove:hover{border-color:#e0a4aa;background:#fff5f5}
@media (max-width:1100px){
 .ot-card{height:auto}
 .ot-workspace,.ot-workspace.is-readonly{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
 .ot-tree{max-height:200px}
 .ot-right{min-height:70vh}
 .ot-header{grid-template-columns:1fr 1fr}
 .ot-f-customer,.ot-f-city,.ot-f-date,.ot-f-method,.ot-f-comment{grid-column:span 1}
}

/* Order entry v3: ціна й сума в рядку, валюта, підсумок, групи кнопок, акуратніший вигляд таблиць */
.ot-header{grid-template-columns:2.2fr 1.4fr .95fr 1.15fr .62fr 1.7fr}
.ot-f-currency select{padding-left:4px;padding-right:2px}
.ot-ctable th.ot-c-price,.ot-ctable td.ot-c-price{width:92px}
.ot-ctable th.ot-c-sum,.ot-ctable td.ot-c-sum{width:104px;font-weight:600}
.ot-ctable td.ot-c-sum.ot-muted{font-weight:400}
.ot-price{width:78px;padding:1px 6px;border:1px solid #bfbfc4;border-radius:3px;font:inherit;font-size:12.5px;text-align:right;height:20px;background:#fff}
.ot-price:focus{border-color:#1f6f43;outline:2px solid #cfe6d8}
.ot-price.is-invalid{border-color:#ad2432;background:#fff5f5}
.ot-price::placeholder{color:#b4b4ba}
.ot-cart-total{font-size:12.5px;color:#1a5c38;font-variant-numeric:tabular-nums;white-space:nowrap}
.ot-cart-total[hidden]{display:none}
.ot-cart-bar{flex-wrap:wrap}
.ot-cart-actions{gap:14px;flex-wrap:wrap;justify-content:flex-end}
.ot-act{display:flex;align-items:center;gap:6px}
.ot-act-print{padding-left:14px;border-left:1px solid #d6d8dd}
.ot-act-danger{margin-left:18px;padding-left:18px;border-left:2px solid #e8c3c7}
.ot-cart-actions .bo-cancel{background:#fff;color:#ad2432;border:1px solid #d9959b}
.ot-cart-actions .bo-cancel:hover{background:#fff1f2;border-color:#ad2432}
/* Щільніші рядки, чистий hover і виразний активний рядок */
.ot-table td,.ot-ctable td{padding:0 8px;height:21px}
.ot-ctable td.ot-num,.ot-table td.ot-num{padding-right:10px}
.ot-ctable th.ot-num,.ot-table th.ot-num-head{padding-right:10px}
.ot-table tbody tr:hover{background:#f1f5f2;box-shadow:none}
.ot-table tbody tr.is-active,.ot-table tbody tr.is-active:hover{background:#d9ebe0;box-shadow:inset 3px 0 0 #1f6f43}
.ot-table tbody tr.is-ordered.is-active{background:#cfe6d7}
.ot-ctable tbody tr:hover{background:#f6f8f7}
.ot-ctable td,.ot-table td{border-bottom-color:#eef0f2}
.ot-ctable input.ot-qty{width:80px}
@media (max-width:1100px){.ot-header{grid-template-columns:1fr 1fr}.ot-act-danger{margin-left:0}}

/* Друк: службовий блок, у звичайному вигляді сторінки прихований; при друку лишається тільки він (A4, повторюваний заголовок таблиці). */
#print-root{display:none}
.ps-sheet{font-family:Arial,Helvetica,sans-serif;color:#000}
@media print{
 @page order-sheet{size:A4 portrait;margin:12mm 12mm 14mm}
 html:has(body.is-printing),body.is-printing{background:#fff!important;color:#000!important}
 body.is-printing>*:not(#print-root){display:none!important}
 body.is-printing #print-root{display:block;page:order-sheet}
 .ps-sheet{font-size:10pt;line-height:1.22}
 .ps-title{font-size:14pt;margin:0 0 2mm}
 .ps-subtitle{margin:0 0 2mm;font-size:9pt;color:#333;font-style:italic}
 .ps-header{margin:0 0 3mm;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:.6mm 8mm}
 .ps-hrow{display:flex;gap:2mm;break-inside:avoid}
 .ps-hrow dt{flex:none;min-width:34mm;color:#333;font-weight:700;margin:0}
 .ps-hrow dd{margin:0;overflow-wrap:anywhere}
 .ps-internal .ps-hrow dt{min-width:46mm}
 .ps-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:9.5pt}
 .ps-table th,.ps-table td{border:.3mm solid #444;padding:.8mm 1.6mm;vertical-align:top;overflow-wrap:anywhere}
 .ps-table th{background:#e9e9e9!important;font-weight:700;text-align:left}
 .ps-table th.ps-right,.ps-table td.ps-right{text-align:right;font-variant-numeric:tabular-nums}
 .ps-table thead{display:table-header-group}
 .ps-table tr{break-inside:avoid;page-break-inside:avoid}
 .ps-commercial .ps-table th:nth-child(1){width:44%}
 .ps-packing .ps-table th:nth-child(1){width:34%}
 .ps-packing .ps-table th:nth-child(2){width:15%}
 .ps-packing .ps-table th:nth-child(3){width:12%}
 .ps-packing .ps-table th:nth-child(4){width:7%}
 .ps-packing .ps-table th.ps-fill{width:32%}
 .ps-packing .ps-table td{height:8mm}
 .ps-total{margin:3mm 0 0;text-align:right;font-size:11pt;font-weight:700}
 .ps-signs{margin-top:6mm;display:grid;grid-template-columns:1fr 1fr;gap:4mm 10mm;break-inside:avoid}
 .ps-sign{display:flex;align-items:flex-end;gap:2mm;margin:0}
 .ps-sign span{flex:none;font-weight:700}
 .ps-sign i{flex:1;border-bottom:.3mm solid #000;height:5mm}
 .ps-sign-note{grid-column:1/-1}
}

/* ===== M011: Default Price List, тимчасова номенклатура, список / картки замовлень, планова вага ===== */
/* Список / картки */
.bo-dates{display:inline-flex;align-items:center;gap:4px;font-size:12.5px}
.bo-dates input[type=date]{padding:7px 8px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:13px;background:#fff}
.bo-dates-label{color:#5a5a62;margin-right:2px}
.bo-dates-clear{border:0;background:transparent;font-size:16px;line-height:1;color:#6a6a72;cursor:pointer;padding:2px 6px;border-radius:6px}
.bo-dates-clear:hover{background:#ececef}
.bo-viewswitch{display:inline-flex;border:1px solid #bfbfc4;border-radius:8px;overflow:hidden;margin-left:auto}
.bo-viewbtn{border:0;background:#fff;font:inherit;font-size:13px;padding:8px 12px;cursor:pointer;color:#33333a}
.bo-viewbtn+.bo-viewbtn{border-left:1px solid #bfbfc4}
.bo-viewbtn:hover{background:#f3f3f5}
.bo-viewbtn.is-active{background:#1f6f43;color:#fff}
.bo-list .bo-num,.bo-list th.bo-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.bo-sum{display:inline-flex;align-items:baseline;gap:4px}
.bo-sum-cur{color:#5a5a62}
.bo-sum-partial{font-size:10.5px;padding:0 5px;border-radius:8px;background:#fff3d6;color:#7a5200;border:1px solid #efd18a}
.bo-weight-incomplete{color:#7a5200}
.bo-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;margin-top:6px}
.bo-ocard{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border:1px solid var(--border,#d9d9de);border-radius:10px;background:#fff;cursor:pointer;font-size:12.5px;line-height:1.3}
.bo-ocard:hover,.bo-ocard:focus-visible{border-color:#1f6f43;outline:none;box-shadow:0 0 0 2px #cfe6d8}
.bo-ocard.bo-cancelled{opacity:.6}
.bo-ocard-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bo-ocard-no{font-size:13.5px}
.bo-ocard-status{font-size:11px;padding:1px 7px;border-radius:8px;background:#e8f2ec;color:#1f6f43}
.bo-ocard-client{font-weight:600;overflow-wrap:anywhere}
.bo-ocard-place{color:#5a5a62}
.bo-ocard-facts{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#33333a}
.bo-ocard-money{font-weight:700;font-size:14px}
.bo-ocard-created{color:#8a8a92;font-size:11px}
/* Тимчасова номенклатура у замовленні */
.ot-add-tmp{margin-left:auto;padding:3px 10px;font-size:12.5px;white-space:nowrap}
.ot-tmp-badge{display:inline-block;margin-left:6px;padding:0 6px;border-radius:8px;background:#fff3d6;color:#7a5200;border:1px solid #efd18a;font-size:10.5px;font-weight:600;white-space:nowrap;vertical-align:middle}
.ot-line.is-tmp{background:#fffdf5}
.ot-tmp-unlinked{color:#7a5200;font-size:11.5px;text-align:center}
.ot-price.is-auto{background:#f1f8f4;border-color:#a9d1b9}
.ot-weight{font-size:11.5px}
.ot-modal-back{position:fixed;inset:0;background:rgba(20,20,26,.45);display:flex;align-items:center;justify-content:center;z-index:1000}
.ot-modal{background:#fff;border-radius:12px;padding:16px 18px;width:min(460px,92vw);max-height:90vh;overflow:auto;display:flex;flex-direction:column;gap:8px;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.ot-modal h3{margin:0;font-size:16px}
.ot-modal-note{margin:0;font-size:12px}
.ot-modal-field{display:flex;flex-direction:column;gap:2px;font-size:13px}
.ot-modal-field input,.ot-modal-field select,.ot-modal-field textarea{padding:7px 9px;border:1px solid #bfbfc4;border-radius:7px;font:inherit;font-size:13px;background:#fff}
.ot-modal-field input:focus,.ot-modal-field select:focus,.ot-modal-field textarea:focus{border-color:#1f6f43;outline:2px solid #cfe6d8}
.ot-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.pc-tmp-link{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
/* Поточні ціни */
.pl-page,.ti-page{display:flex;flex-direction:column;gap:8px;padding:4px 0}
.pl-label{font-size:12.5px;color:#5a5a62}
.pl-currency,.pl-filter,.ti-status{padding:8px 10px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:13px;background:#fff}
.pl-table .bo-num{text-align:right;white-space:nowrap}
.pl-code{white-space:nowrap;color:#5a5a62;font-size:12px}
.pl-input{width:110px;height:26px}
.pl-cur{color:#5a5a62;font-size:12px}
.pl-updated{font-size:12px;color:#5a5a62}
.pl-actions{white-space:nowrap}
.pl-actions .secondary-button{padding:3px 9px;font-size:12px;margin-right:4px}
.pl-note-inline{font-size:12px;margin-left:4px}
.pl-ok{color:#1f6f43}.pl-bad{color:#ad2432}
.pl-row.pl-missing .pl-name{color:#5a5a62}
/* На підтвердження */
.ti-table td,.ti-table th{vertical-align:top}
.ti-code{white-space:nowrap;font-weight:700}
.ti-name-btn{border:0;background:transparent;font:inherit;color:#1f4f8f;cursor:pointer;padding:0;text-align:left;text-decoration:underline dotted}
.ti-comment{display:block;color:#7a7a82;font-size:11.5px}
.ti-badge{display:inline-block;padding:1px 8px;border-radius:8px;font-size:11.5px;white-space:nowrap}
.ti-badge-pending{background:#fff3d6;color:#7a5200}
.ti-badge-kept{background:#ececef;color:#44444c}
.ti-badge-linked{background:#e8f2ec;color:#1f6f43}
.ti-name{min-width:200px}
.ti-actions{min-width:150px}
.ti-actions button{display:block;width:100%;margin:0 0 4px 0}
.ti-actions button{padding:3px 9px;font-size:12px}
.ti-bad{color:#ad2432}
.ti-skus{display:flex;flex-direction:column;max-height:46vh;overflow:auto;gap:2px}
.ti-sku{display:flex;align-items:center;gap:8px;padding:4px 2px;border-bottom:1px solid #eee}
.ti-sku-code{flex:none;width:92px;color:#5a5a62;font-size:12px}
.ti-sku-name{flex:1}
.ti-sku button{padding:3px 10px;font-size:12px;flex:none}
.ti-modal{width:min(640px,94vw)}
.ti-facts{display:grid;grid-template-columns:130px 1fr;gap:2px 10px;margin:0;font-size:13px}
.ti-facts dt{color:#5a5a62}.ti-facts dd{margin:0}
.ti-order{display:flex;gap:12px;font-size:13px;padding:2px 0}
/* Значок меню «На підтвердження (N)» */
.card-badge{display:inline-block;margin-left:8px;vertical-align:middle;padding:1px 8px;border-radius:10px;background:#c9342b;color:#fff;font-size:11px;font-weight:700;white-space:nowrap}

/* Pilot Core v1: щоденна перевірка, контрагенти, найближчі відвантаження, пілот-головна (компактно, без декору) */
.pilot-strip{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.pilot-link{display:flex;flex-direction:column;gap:1px;min-width:150px;padding:8px 12px;border:1px solid #d9d9de;border-radius:8px;background:#fff;color:#1f1f23;text-decoration:none;font-weight:600;font-size:14px}
.pilot-link:hover,.pilot-link:focus-visible{border-color:#c92030}
.pilot-count{font-weight:400;font-size:12px;color:#5a5a62;min-height:14px}
.pilot-count.pilot-warn{color:#b3261e;font-weight:600}
.sc-table .sc-input{width:110px;text-align:right}
.sc-diff{white-space:nowrap}
.sc-plus{color:#1b7a3a;font-weight:600}
.sc-recheck td{background:#fff6d6}
.sc-note-inline{display:block;font-size:12px}
.sc-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:6px 0}
.sc-head .sv-reason{flex:1;min-width:220px}
.sc-recent{margin-top:18px}
.cp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px 12px;margin:8px 0}
.cp-field{display:flex;flex-direction:column;gap:2px;font-size:13px}
.cp-wide{grid-column:1/-1}
.cp-field[hidden]{display:none}
.cp-label{color:#5a5a62;font-size:12px}
.cp-field input,.cp-field select,.cp-field textarea{padding:6px 8px;border:1px solid #c8c8ce;border-radius:6px;font:inherit}
.cp-err{font-size:12px;min-height:0}
.cp-contacts-head{display:flex;gap:10px;align-items:center;margin-top:10px}
.cp-contacts-head h4{margin:0}
.cp-contact{display:grid;grid-template-columns:1.2fr 1fr 1fr 1.2fr 1fr 0.8fr 1.2fr auto auto auto;gap:6px;align-items:center;margin:4px 0}
.cp-contact input[type=text],.cp-contact select{padding:5px 7px;border:1px solid #c8c8ce;border-radius:6px;font:inherit;min-width:0}
.cp-contact .cp-err{grid-column:1/-1}
.cp-primary{display:flex;gap:4px;align-items:center;font-size:12px;white-space:nowrap}
.cp-remove{padding:3px 9px}
.cp-warn{margin:8px 0}
.cp-dup,.cp-similar{padding:8px 10px;border-radius:8px;margin:6px 0;font-size:13px}
.cp-dup{background:#fdecea;border:1px solid #e5a29d}
.cp-similar{background:#fff6d6;border:1px solid #e3cf80}
.cp-cand{margin:3px 0}
.cp-link{background:none;border:0;padding:0;color:#c92030;text-decoration:underline;font-weight:600;cursor:pointer}
.cp-actions{display:flex;gap:10px;align-items:center;margin-top:12px}
.cp-archived td{color:#8a8a92}
.cp-legal{font-size:12px}
.sh-bar{flex-wrap:wrap}
.sh-chip{padding:6px 12px;font-size:13px}
.sh-chip-active{background:#c92030;color:#fff}
.sh-chip-late{border-color:#b3261e;color:#b3261e;font-weight:700}
.sh-chip-active.sh-chip-late{color:#fff}
.sh-late td{background:#fff3f2}
.sh-sub{font-size:12px}
/* ---- Матриці потреби (Pilot Demand Matrices v1): компактна таблиця, липкі ліві колонки й шапка ---- */
.dm-page{display:flex;flex-direction:column;gap:6px;padding-top:6px}
.dm-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.dm-title{margin:0;font-size:18px}
.dm-back{font-size:13px;color:var(--muted);text-decoration:none}.dm-back:hover{text-decoration:underline}
.dm-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:4px}
.dm-tab-label{font-size:12px;color:var(--muted);margin:0 2px 0 8px;text-transform:uppercase;letter-spacing:.04em}
.dm-tab{padding:5px 12px}
.dm-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.dm-filters .sh-chip{padding:4px 10px;font-size:12px}
.dm-search{flex:0 1 220px;min-width:150px;padding:5px 10px;font-size:13px}
.dm-area{display:flex;flex-direction:column;gap:6px;min-width:0}
.dm-summary{display:flex;flex-wrap:wrap;gap:2px 18px;font-size:12px;color:#34343c}
.dm-summary b{font-variant-numeric:tabular-nums}
.dm-bad,.dm-bad b{color:#ad2432}
.dm-unknown{color:#8a6a1a}
.dm-hint{color:var(--muted);font-style:italic}
.dm-banner{flex:none;padding:6px 12px;font-size:12px;background:#fff8e6;border-left-color:#d9a21b;color:#6b5210}
.dm-link{color:#ad2432;font-weight:600}
.dm-empty{padding:16px 4px}
.dm-scroll{overflow:auto;border:1px solid #d6d6dc;border-radius:6px;background:#fff;position:relative}
.dm-table{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px;line-height:1.25}
.dm-table th,.dm-table td{box-sizing:border-box;padding:0 6px;height:24px;border-bottom:1px solid #ececf0;border-right:1px solid #f1f1f4;background:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-table thead th{position:sticky;top:0;z-index:3;background:#f3f3f5;height:auto;border-bottom:1px solid #c9c9d0;font-weight:600;color:#34343c;text-align:left;vertical-align:bottom;padding-top:4px;padding-bottom:4px}
.dm-table .dm-fixed{position:sticky;z-index:2}
.dm-table thead .dm-fixed{z-index:5}
.dm-table .dm-fixed-last{border-right:1px solid #b9b9c2;box-shadow:2px 0 3px -1px rgba(0,0,0,.14)}
.dm-table .dm-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.dm-table thead .dm-num{text-align:right}
.dm-table tbody tr:hover td{background:#f7f7fa}
.dm-table tbody tr:hover td.dm-cell{background:#e9eef7}
.dm-table td.dm-cell{background:#f3f6fb;color:#1c3b66;font-weight:600}
.dm-table td.dm-muted,.dm-muted{color:#9a9aa3}
.dm-table td.dm-unknown{color:#8a6a1a;font-style:italic}
.dm-table td.dm-demand{font-weight:600}
.dm-table td.dm-bal{font-weight:700}
.dm-bal-deficit{color:#ad2432}
.dm-bal-surplus{color:#1e7a3c}
.dm-bal-zero{color:#6a6a74}
.dm-bal-unknown,.dm-bal-nopack{color:#9a9aa3;font-weight:400}
.dm-table td.dm-perbox{font-size:11px;white-space:nowrap}
.dm-row-deficit td.dm-fixed:first-child{box-shadow:inset 3px 0 0 #ad2432}
.dm-sku{all:unset;cursor:pointer;color:#16213a;font-weight:600;font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}
/* Глобальне button:hover (темно-червоний фон) має більшу специфічність, ніж all:unset — у матриці наведення на SKU лише підкреслює текст, колір і фон не змінюються */
.dm-table .dm-sku:hover,.dm-table .dm-sku:active,.dm-table .dm-sku:focus-visible{background:transparent;color:#16213a;box-shadow:none;transform:none;filter:none;text-decoration:underline}
.dm-table .dm-sku:focus-visible{outline:2px solid #9aa7c4;outline-offset:1px;border-radius:3px}
.dm-kind{margin-left:6px;font-size:10px;color:#7a5a12;background:#fbf0d2;border-radius:3px;padding:0 4px;vertical-align:middle}
.dm-oh-cell{padding:3px 4px!important}
.dm-oh{display:flex;flex-direction:column;gap:0;text-decoration:none;color:inherit;min-width:0}
.dm-oh:hover .dm-oh-name{text-decoration:underline}
.dm-oh-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-oh-no{font-size:10.5px;font-weight:400;color:#6a6a74;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-oh-date{font-size:11px;font-weight:600;color:#34343c}
.dm-oh-date.dm-late{color:#ad2432}
.dm-oh-date.dm-late::after{content:" · простр.";font-weight:400;font-size:10px}
/* Demand Matrices v2: заголовки блоків усередині вкладки (colspan лівих колонок, липкі зліва) і рядки підблоків */
.dm-table .dm-block-cell{background:#e8ebf2;color:#16213a;font-weight:700;font-size:12px;height:26px;border-top:1px solid #c9ceda}
.dm-table .dm-sub-row .dm-block-cell{background:#f4f5f9;color:#4a4a55;font-weight:600;height:22px;border-top:0}
.dm-table .dm-block-fill{background:#e8ebf2;border-top:1px solid #c9ceda}
.dm-table .dm-sub-row .dm-block-fill{background:#f4f5f9;border-top:0}
.dm-table tbody tr.dm-block-row:hover td{background:#e8ebf2}
.dm-table tbody tr.dm-sub-row:hover td{background:#f4f5f9}
.dm-block-title{margin-right:10px}
.dm-block-detail{font-weight:400;color:#6a6a74;font-size:11px}
.dm-table td.dm-unit{text-align:center;font-size:11px}

/* Pilot Shipment & UX v1: відвантаження, картки замовлень «клієнт першим», Найближчі відвантаження «Список | Картки», набори прав */
.bo-period-filter{min-width:130px}
.bo-goods{max-width:260px;color:#33333a;font-size:12.5px;overflow-wrap:anywhere}
.bo-ship{margin-right:2px}
.bo-ocard-client-main{font-size:15px;font-weight:700;color:#14301f;overflow-wrap:anywhere;line-height:1.25}
.bo-ocard-sub{color:#5a5a62;font-size:12px}
.bo-ocard-groups{display:flex;flex-direction:column;gap:1px;margin:3px 0;font-size:12.5px;color:#26262c}
.bo-ocard-group{display:block}
.bo-ocard-more{color:#1f6f43;font-weight:600;font-size:12px}
.bo-ocard-status.is-done{background:#dfeaf7;color:#1c4f8c}
.bo-ocard-status.is-cancelled{background:#f4e0e2;color:#ad2432}

/* Найближчі відвантаження: перемикач і картки */
.sh-viewswitch{margin-left:auto}
.sh-goods{max-width:240px;font-size:12.5px;overflow-wrap:anywhere}
.sh-holder{margin-top:6px}
.sh-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.sh-card{display:flex;flex-direction:column;gap:4px;padding:11px 13px;border:1px solid var(--border,#d9d9de);border-radius:10px;background:#fff;cursor:pointer;font-size:12.5px;line-height:1.3}
.sh-card:hover,.sh-card:focus-visible{border-color:#1f6f43;outline:none;box-shadow:0 0 0 2px #cfe6d8}
.sh-card.is-late{border-left:4px solid #b3261e}
.sh-card.has-deficit{border-top:3px solid #e0a4aa}
.sh-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.sh-card-client{font-size:15px;font-weight:700;color:#14301f;overflow-wrap:anywhere;line-height:1.25}
.sh-card-date{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:#33333a}
.sh-card-sub{color:#5a5a62;font-size:12px}
.sh-card-groups{display:flex;flex-direction:column;gap:1px;margin:2px 0;color:#26262c}
.sh-card-group{display:block}
.sh-card-more{color:#1f6f43;font-weight:600;font-size:12px}
.sh-card-facts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sh-card-weight{font-weight:600}
.sh-card-partial{font-size:11px;padding:0 6px;border-radius:8px;background:#fff3d6;color:#7a5200;border:1px solid #efd18a}
.sh-card-deficit{font-size:12px}
.sh-card-deficit.is-deficit{color:#ad2432;font-weight:700}
.sh-card-deficit.is-ok{color:#256638}

/* Розділ «Відвантаження» */
.sd-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border,#d9d9de);margin-bottom:8px}
.sd-tab{padding:8px 14px;font-size:13.5px;color:#33333a;text-decoration:none;border-bottom:3px solid transparent;margin-bottom:-1px}
.sd-tab:hover{background:#f3f3f5}
.sd-tab.is-active{border-bottom-color:#1f6f43;color:#14301f;font-weight:700}
.sd-note{margin:0 0 6px}
.sd-filter{padding:7px 8px;border:1px solid #bfbfc4;border-radius:8px;font:inherit;font-size:13px;background:#fff;max-width:170px}
.sd-filters{align-items:center}
.sd-totals{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:4px 0 8px}
.sd-total-count{font-weight:600;color:#33333a;margin:2px 0}
.sd-total{display:inline-flex;gap:8px;align-items:baseline;padding:4px 10px;border:1px solid var(--border,#d9d9de);border-radius:8px;background:#fafafb}
.sd-amount{display:inline-flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.sd-none{color:var(--muted,#6a6a72);font-weight:400;font-size:12px}
.sd-table{width:100%}
.sd-table .bo-num,.sd-table th.bo-num{text-align:right;font-variant-numeric:tabular-nums}
.sd-goods{max-width:260px;font-size:12.5px;overflow-wrap:anywhere}
.sd-status{font-size:11px;padding:1px 8px;border-radius:8px;white-space:nowrap}
.sd-status-posted{background:#e8f2ec;color:#1f6f43}
.sd-status-cancelled{background:#f4e0e2;color:#ad2432}
.sd-status-completed{background:#dfeaf7;color:#1c4f8c}
.sd-docs{display:flex;gap:6px;flex-wrap:wrap}
.sd-doc-link{font-size:12px;white-space:nowrap}
.sd-sumline{display:flex;gap:6px;justify-content:flex-end;align-items:baseline}
.sd-cur{color:#5a5a62}
.sd-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sd-top h2{margin:0}
.sd-header{grid-template-columns:2fr 1.2fr 1fr 1.3fr 1fr}
.sd-header .sd-f-comment,.sd-header .sd-f-external{grid-column:span 2}
.sd-header input,.sd-header select{padding:6px 8px;border:1px solid #bfbfc4;border-radius:6px;font:inherit;font-size:13px;background:#fff;min-width:0}
.sd-header input[readonly]{background:#f3f3f5;color:#33333a}
.sd-lines th,.sd-lines td{vertical-align:middle}
.sd-line.is-locked td{color:#8a8a92}
.sd-line.is-invalid td{background:#fff5f5}
.sd-left{font-weight:700}
.sd-input-cell{white-space:nowrap}
.sd-qty{width:110px;padding:6px 8px;border:1px solid #bfbfc4;border-radius:6px;font:inherit;font-size:13px;text-align:right}
.sd-line.is-invalid .sd-qty{border-color:#b3261e}
.sd-unit{margin:0 6px 0 4px;color:#5a5a62}
.sd-all{padding:2px 8px;font-size:12px}
.sd-line-error{display:block;white-space:normal;text-align:right;max-width:280px;margin-left:auto}
.sd-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:6px}
.sd-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px 18px;margin:6px 0}
.sd-fact dt{font-size:11px;font-weight:600;color:var(--muted,#6a6a72)}
.sd-fact dd{margin:0;font-size:13.5px;overflow-wrap:anywhere}
.sd-doc-total{margin:6px 0;font-size:14px}
.sd-events h3{margin:8px 0 2px;font-size:14px}
.sd-event{margin:1px 0;font-size:12.5px}
.sd-cancel{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid #e0a4aa;border-radius:8px;background:#fff8f8;max-width:560px}
.sd-cancel textarea{font:inherit;font-size:13px;padding:6px 8px;border:1px solid #bfbfc4;border-radius:6px}
.sd-order-panel{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:4px 8px;border:1px solid var(--border,#d9d9de);border-radius:6px;background:#fafafb;font-size:12.5px}
.sd-order-chip{padding:1px 8px;border-radius:8px;background:#e8f2ec;color:#1f6f43;text-decoration:none;white-space:nowrap}
.sd-order-chip:hover{background:#d4e8dc}
.sd-order-chip.is-cancelled{background:#f4e0e2;color:#ad2432;text-decoration:line-through}
.sd-banner{margin:0}
@media (max-width:1100px){.sd-header{grid-template-columns:1fr 1fr}.sd-header .sd-f-comment,.sd-header .sd-f-external{grid-column:auto}}

/* Набори прав (Адміністратор / Менеджер / Склад) у картці доступу користувача */
.permission-presets{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0}

/* Часткове завершення замовлень (M014): бейджі бізнес-статусу, три цифри Замовлено / Відвантажено / Залишилось, діалог завершення, архів. */
.bo-st{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;background:#fff2dc;color:#785009;white-space:nowrap}
.bo-st-in_progress{background:#fff2dc;color:#785009}
.bo-st-partially_shipped{background:#e3effd;color:#1c4f8c}
.bo-st-completed{background:#e0f0e6;color:#1f6f43}
.bo-st-completed_partial{background:#efe4f6;color:#6b2f86}
.bo-st-cancelled{background:#f4e0e2;color:#ad2432}
.bo-status.bo-st{padding:5px 10px;border-radius:6px;font-size:12px}
.bo-ocard-status.bo-st-partially_shipped{background:#e3effd;color:#1c4f8c}
.bo-ocard-status.bo-st-completed_partial{background:#efe4f6;color:#6b2f86}
.bo-ocard-status.bo-st-completed{background:#e0f0e6;color:#1f6f43}
.bo-ocard-remaining{font-size:12px;font-weight:600;color:#1c4f8c}
.bo-closure{margin:0 0 10px;padding:9px 12px;border-left:4px solid #6b2f86;background:#f8f1fc;border-radius:6px;font-size:13px}
.bo-closure-list{margin:6px 0 0 18px;padding:0}
.bo-complete{width:min(520px,94vw)}
.bo-figs{display:grid;gap:6px;margin:4px 0 2px}
.bo-fig{display:flex;justify-content:space-between;gap:12px;padding:8px 12px;background:#f6f6f8;border-radius:8px;font-size:14px}
.bo-fig-title{color:var(--muted,#6b6b72)}
.bo-fig.is-unfulfilled{background:#f8f1fc}
.bo-warn{padding:8px 12px;border-radius:8px;background:#fff0e0;border:1px solid #f0c48a;color:#7a4a05;font-size:13px;font-weight:600}
.bo-complete-sub{font-size:13px;margin-top:4px}
.bo-complete-list{margin:2px 0 0 18px;padding:0;font-size:13px;max-height:180px;overflow:auto}
.bo-complete-tmp{margin:0;font-size:13px;color:#7a4a05;font-weight:600}
.bo-complete-note{margin:0;font-size:13px}
.bo-complete-error{font-size:13px}
.bo-complete-open{border-color:#6b2f86;color:#6b2f86}
.sh-remaining{color:#1c4f8c;font-weight:600}
.sh-card-remaining{font-size:12px;font-weight:600;color:#1c4f8c}
.sd-status-completed_partial{background:#efe4f6;color:#6b2f86}
.sd-unfulfilled{color:#6b2f86;font-weight:600}

/* Виконання по позиціях у картці замовлення: Товар | Замовлено | Відвантажено | Залишилось. Стримано: жовтий залишок, приглушені й зелені виконані рядки. */
/* Підтвердження відвантаження без достатнього залишку */
.sd-stock-list{margin:6px 0 4px;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px;max-height:300px;overflow:auto}
.sd-stock-item{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:8px;background:#fff7e8;border:1px solid #f0d9a8}
.sd-stock-line{font-size:13px}
.sd-negative{color:#ad2432;font-weight:700}
.sd-stock-flag{margin:6px 0}

/* Дріт звичайний: рядки замовлень із готовністю (Матриці потреби). Світло-червоний = не готово, жовтий = частково, зелений = повністю. */
.dm-wire{width:100%;min-width:1180px}
.dm-wire td{padding:4px 8px;vertical-align:middle}
.dm-w-select{max-width:150px}
.dm-w-client{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-w-remaining{font-weight:700}
.dm-w-row-none,.dm-w-row-none>td{background:#fdf0f0}
.dm-w-row-partial,.dm-w-row-partial>td{background:#fff6dc}
.dm-w-row-full,.dm-w-row-full>td{background:#eef9f1}
.dm-w-ready{min-width:230px}
.dm-w-ready-view{display:flex;align-items:center;gap:8px}
.dm-w-ready-text{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.dm-w-bar{display:inline-block;width:70px;height:8px;border-radius:4px;background:#e4e7ec;overflow:hidden;flex:none}
.dm-w-bar-fill{display:block;height:100%;background:#9aa3af}
.dm-w-state-partial .dm-w-bar-fill{background:#e0a21a}
.dm-w-state-full .dm-w-bar-fill{background:#3a9d5d}
.dm-w-state-none .dm-w-bar-fill{background:#d98a8a}
.dm-w-percent{font-size:12px;color:var(--muted)}
.dm-w-edit{margin-top:3px;padding:1px 8px;font-size:12px}
.dm-w-form{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.dm-w-input{width:90px;min-width:0;padding:3px 6px}
.dm-w-form button{width:auto;min-width:0;min-height:0;padding:3px 10px;font-size:12px}
.dm-w-form-label{font-size:12px;color:var(--muted)}
.dm-w-badge{display:inline-block;padding:1px 8px;border-radius:10px;font-size:12px;font-weight:600}
.dm-w-badge-none{background:#f9dcdc;color:#8a2230}
.dm-w-badge-partial{background:#fdeabc;color:#7a4a05}
.dm-w-badge-full{background:#d5efdc;color:#256638}

.sd-box .sd-box-line{display:block}.sd-box .sd-box-title{font-weight:600}
.sd-warn{color:#8a5a00}.sd-over{color:#8a5a00;font-weight:600}.sd-over-list .sd-stock-item{border-left:3px solid #d99a00}
.ob-boxes{display:block;font-size:12px;color:#5c5c63}
.pl-picker{margin:0 0 18px}.pl-picker-title{margin:12px 0 8px;font-size:15px}.pl-chosen{margin-top:8px}.pl-picker .bo-add{align-items:flex-start;flex-direction:column;gap:6px}
.dm-w-over{display:block;font-size:12px;color:#8a5a00;font-weight:600}

/* Order screen layout v2: один компактний заголовок, виконання по позиціях у «Поточному замовленні», щільні рядки, компактні дії */
.ot-card{min-width:0;max-width:100%;gap:3px}
.ot-top{gap:6px 10px;min-height:28px}
.ot-top .ot-client{font-size:17px;font-weight:700;line-height:1.2;max-width:min(38vw,420px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ot-top .ot-order-no{font-size:12px;color:var(--muted);background:#f1f2f4;border-radius:4px;padding:1px 7px;white-space:nowrap}
.ot-top .bo-status,.ot-top .bo-location{padding:2px 8px;font-size:11.5px}
.ot-summary{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-size:12.5px;margin-left:6px;padding-left:12px;border-left:1px solid #d6d8dd}
.ot-sum-title{color:var(--muted)}
.ot-sum-value{font-variant-numeric:tabular-nums}
.ot-sum-sep{color:#b4b4ba}
.ot-sum-item.is-remaining .ot-sum-value{background:#fff3d6;color:#7a4a05;border-radius:3px;padding:0 6px}
.ot-sum-item.is-unfulfilled .ot-sum-value{background:#f3f4f6;color:#555;border-radius:3px;padding:0 6px}
.ot-card .bo-closure{margin:0;padding:3px 10px;font-size:12px;border-radius:4px;display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline}
.ot-card .bo-closure-list{display:flex;flex-wrap:wrap;gap:0 14px;margin:0;padding:0 0 0 16px}
.ot-card .sd-order-panel{flex-wrap:wrap;gap:2px 8px;padding:2px 8px;font-size:12px;min-height:0;line-height:1.5}
.ot-card .sd-order-chip{overflow:hidden;text-overflow:ellipsis;max-width:100%;padding:0 8px}
.sd-order-more{display:flex;flex-wrap:wrap;gap:3px 6px;flex-basis:100%}
.sd-order-more[hidden],.sd-order-panel[hidden]{display:none}
.sd-order-toggle{background:transparent;border:0;box-shadow:none;color:#1f6f43;padding:0 2px;font-size:12px;font-weight:600;cursor:pointer;width:auto;transform:none;filter:none}
.sd-order-toggle:hover{background:transparent;text-decoration:underline;filter:none;transform:none}
.ot-header{padding:2px 8px 3px;gap:1px 8px}
.ot-header .bo-field input,.ot-header .bo-field select{height:24px}
.ot-subrow{display:flex;align-items:center;gap:4px 12px;min-width:0}
.ot-subrow:empty{display:none}
.ot-subrow .sd-order-panel{flex:1 1 auto;min-width:0}
.ot-subrow .ot-prog-note{margin-left:auto;font-size:11px;white-space:nowrap;padding-right:4px}
.ot-ctable th.ot-c-unit,.ot-ctable td.ot-c-unit{width:60px}
/* Поточне замовлення: щільні рядки в один рядок, кільцеві «30 · 6 ящ.» в одній клітинці */
.ot-ctable td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ot-ctable td.ot-c-qty{width:150px;overflow:visible}
.ot-ctable th.ot-c-qty{width:150px}
.ot-ctable .ob-boxes{display:inline;margin-left:5px;font-size:11.5px;white-space:nowrap}
.ot-ctable th.ot-c-shipped,.ot-ctable td.ot-c-shipped{width:88px}
.ot-ctable th.ot-c-left,.ot-ctable td.ot-c-left{width:96px}
.ot-ctable td.ot-c-left.is-remaining{background:#fff3d6;color:#7a4a05;font-weight:700}
.ot-ctable td.ot-c-left.is-closed{background:#f3f4f6;color:#555;font-weight:600}
.ot-ctable td.ot-c-left.is-done{color:#256638;font-weight:600;text-align:right}
.ot-ctable .ot-over{font-size:11px;color:#8a5a00;font-weight:600}
.ot-ctable tr.ot-line.is-fulfilled{background:#f3faf4}
.ot-ctable tr.ot-line.is-fulfilled td{color:#6b7280}
.ot-ctable tr.ot-line.is-fulfilled td.ot-c-left{color:#256638}
.ot-ctable tr.ot-line.is-fulfilled input.ot-qty,.ot-ctable tr.ot-line.is-fulfilled input.ot-price{color:#6b7280}
.ot-ctable td.ot-muted{color:#9a9aa2}
/* Дії: одна щільна панель без великих проміжків; небезпечна дія окремо */
.ot-cart-bar{gap:4px 8px;padding:2px 8px}
.ot-cart-meta{gap:4px 10px;flex-wrap:wrap}
.ot-cart-meta .ot-prog-note{font-size:11px}
.ot-cart-actions{gap:6px;margin-left:auto}
.ot-act{gap:5px}
.ot-act-print{padding-left:8px}
.ot-act-danger{margin-left:2px;padding-left:8px}
.ot-cart-actions .secondary-button,.ot-cart-actions .primary-button{padding:3px 9px;font-size:12px;white-space:nowrap}
@media (max-width:1500px){
 .ot-ctable th.ot-c-color,.ot-ctable td.ot-c-color{width:118px}
 .ot-ctable th.ot-num,.ot-ctable td.ot-num{width:82px}
 .ot-ctable th.ot-c-qty,.ot-ctable td.ot-c-qty{width:138px}
 .ot-ctable th.ot-c-shipped,.ot-ctable td.ot-c-shipped{width:94px}
 .ot-ctable th.ot-c-left,.ot-ctable td.ot-c-left{width:86px}
 .ot-ctable th.ot-c-price,.ot-ctable td.ot-c-price{width:76px}
 .ot-ctable th.ot-c-sum,.ot-ctable td.ot-c-sum{width:90px}
 .ot-ctable th.ot-c-unit,.ot-ctable td.ot-c-unit{width:60px}
 .ot-ctable input.ot-qty{width:64px}
 .ot-price{width:62px}
}
/* «Поточне замовлення» — головна робоча зона: типово ~60% висоти правої частини, каталог зверху отримує решту; розділювач змінює висоту (inline flex-basis) */
.ot-cart{flex:0 0 60%;max-height:72%}
.ot-cart.is-collapsed{flex:0 0 auto}
.ot-subrow{display:flex;align-items:center;gap:4px 12px;min-width:0}
.ot-subrow .sd-order-panel{flex:1 1 auto;min-width:0}
.ot-subrow .ot-prog-note{margin-left:auto;font-size:11px;white-space:nowrap;padding-right:8px}
.ot-ctable th.ot-c-unit,.ot-ctable td.ot-c-unit{width:60px}

/* Склад → Прихід товару (M020) */
.gr-page .gr-head{display:flex;align-items:center;gap:12px;margin:4px 0 8px}
.gr-page .gr-head h3{margin:0}
.gr-status{display:inline-block;padding:2px 8px;border-radius:10px;font-size:12px;font-weight:600;background:#eceff3;color:#3a4350}
.gr-status.gr-posted{background:#e1f3e6;color:#1d6b35}
.gr-status.gr-cancelled{background:#f6dfe1;color:#a02632}
.gr-status.gr-draft{background:#fff1d6;color:#8a5a00}
.gr-table .gr-row{cursor:pointer}
.gr-table .gr-row:hover{background:#f4f7fb}
.gr-table .gr-number{font-weight:600;white-space:nowrap}
.gr-table .gr-units{white-space:nowrap}
.gr-grid .gr-wide{grid-column:1/-1}
.gr-info{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:6px 16px;margin:8px 0 12px}
.gr-pair{display:flex;flex-direction:column;font-size:13px}
.gr-qty{white-space:nowrap;font-variant-numeric:tabular-nums;text-align:right}
.gr-qty-input,.gr-qty-edit{width:110px;padding:6px 8px;border:1px solid #c8c8ce;border-radius:6px;font:inherit}
.gr-qty-edit{text-align:right}
.gr-note-input{min-width:220px;padding:6px 8px;border:1px solid #c8c8ce;border-radius:6px;font:inherit}
.gr-unit{font-weight:600;margin:0 8px 0 4px}
.gr-warn{color:#8a5a00;font-size:12px;margin-top:2px}
.gr-line-error{color:#a02632;font-size:12px;margin-top:2px}
.gr-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.gr-cancel-panel{border:1px solid #e3b4b9;border-radius:8px;padding:10px 12px;background:#fff8f8;display:flex;flex-direction:column;gap:8px;max-width:640px}
.gr-negative{border-left:3px solid #d9a21b;padding-left:10px}
.gr-events{margin:4px 0 8px;padding-left:18px;font-size:13px}.gr-cancel-panel[hidden],.gr-negative[hidden]{display:none}

/* Прихід товару: швидкий підбір (дерево + список SKU + поточний прихід), той самий вигляд, що в Order Entry */
.gr-edit .gr-header{grid-template-columns:.9fr 1.2fr 1.7fr 2.4fr}
.gr-edit .gr-top-note{font-size:11.5px}
.gr-workspace .ot-cart{flex:0 0 42%;max-height:none}
.ot-unit-col{width:56px;white-space:nowrap;font-weight:600;color:#1a5c38}
.ot-unit-head{width:56px;text-align:left}
.ot-table td .ot-note{color:#8a5a00}
.gr-cart-sum{font-size:12px;white-space:nowrap}
.gr-ctable th.gr-c-qty,.gr-ctable td.gr-c-qty{width:150px}
.gr-ctable th.ot-c-unit,.gr-ctable td.ot-c-unit{width:60px}
.gr-ctable th.ot-c-del,.gr-ctable td.ot-c-del{width:34px;text-align:center}
.gr-ctable input.gr-qty-edit{width:120px;height:20px;padding:1px 6px;font-size:12.5px;text-align:right;border:1px solid #c8c8ce;border-radius:3px;font-variant-numeric:tabular-nums}
.gr-ctable input.gr-qty-edit:focus{outline:2px solid #cfe6d8;border-color:#1f6f43}
.gr-ctable input.gr-qty-edit.is-invalid{border-color:#ad2432;background:#fff1f2}
.gr-ctable tr.ot-line.is-draft td.ot-c-name{box-shadow:inset 3px 0 0 #d9a21b}
.gr-ctable tr.ot-line.is-changed{background:#eef7f1}
.gr-ctable .gr-note-toggle{background:transparent;border:0;box-shadow:none;color:#6b6b70;font-size:11px;padding:0 0 0 8px;cursor:pointer;font-weight:400;transform:none}
.gr-ctable .gr-note-input{display:block;width:100%;max-width:320px;min-width:0;margin-top:2px;padding:1px 6px;font-size:12px;border-radius:3px}
.gr-ctable .gr-note-input[hidden]{display:none}

/* Місце доставки замовлення (M021): другий компактний рядок шапки Order Entry; для самовивозу рядок згорнутий (hidden) і висота шапки не росте */
.ot-header.ot-header-geo{grid-template-columns:2.4fr 1fr 1.2fr .7fr 2fr}
.ot-dest{grid-column:1/-1;display:grid;grid-template-columns:1.3fr 1.1fr 2.6fr;gap:2px 8px}
.ot-dest[hidden]{display:none}
.ot-dest .bo-field{margin:0;min-width:0}
@media (max-width:1100px){.ot-header.ot-header-geo{grid-template-columns:1fr 1fr}.ot-dest{grid-template-columns:1fr 1fr}}

/* Internal Orders v1 (M022) — «Внутрішні замовлення»: екран повторно використовує Order Entry (bo-*, ot-*), тут лише відмінності. */
.io-header .bo-field input:disabled,.io-header .bo-field select:disabled{background:var(--surface-app);color:var(--text-secondary)}
.io-header .io-f-no input{font-weight:700;letter-spacing:.2px}
.io-route{white-space:nowrap}
.io-list td.bo-no{white-space:nowrap}
/* Друк внутрішнього замовлення (A4 portrait): № | SKU | Товар | Од. | Замовлено | Фактично завантажено (порожня колонка 26% ≈ 48 мм для запису ручкою). Бренд: графітовий заголовок і картонна лінія; цін і сум немає. */
@media print{
 .ps-internal{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .ps-internal .ps-title{font-size:16pt;color:var(--brand-graphite,#3F4443);padding-bottom:1.6mm;margin-bottom:3.5mm;border-bottom:.8mm solid var(--brand-cardboard,#C3AD8B);letter-spacing:.2pt}
 .ps-internal .ps-header{grid-template-columns:1fr;gap:.8mm}
 .ps-internal .ps-hrow dt{min-width:46mm}
 .ps-internal .ps-table{margin-top:2mm}
 .ps-internal .ps-table th:nth-child(1){width:6%}
 .ps-internal .ps-table th:nth-child(2){width:14%}
 .ps-internal .ps-table th:nth-child(3){width:32%}
 .ps-internal .ps-table th:nth-child(4){width:7%}
 .ps-internal .ps-table th:nth-child(5){width:15%}
 .ps-internal .ps-table th:nth-child(6){width:26%}
 .ps-internal .ps-table td{height:10mm}
 .ps-internal .ps-table th.ps-fill,.ps-internal .ps-table td.ps-fill{text-align:left}
 .ps-internal .ps-table th{border-color:var(--brand-graphite,#3F4443);background:var(--surface-table-head,#E3E8EB)!important}
 .ps-internal .ps-table td{border-color:var(--brand-graphite,#3F4443)}
}
/* Матриці потреби: джерела потреби (клієнти / внутрішні замовлення на Тернопіль і Заліщики). Лише відмінності; колонки джерел не закріплені. */
.dm-table .dm-sh{font-size:11px;font-weight:600;text-align:right}
.dm-table .dm-src{font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.dm-table .dm-src-internal{color:var(--brand-graphite)}
.dm-table thead .dm-sh-internal{box-shadow:inset 0 -3px 0 var(--brand-cardboard)}
.dm-table thead .dm-oh-internal{box-shadow:inset 0 -3px 0 var(--brand-cardboard)}
.dm-oh-internal .dm-oh-name{color:var(--brand-graphite)}
.dm-table .dm-w-internal{font-weight:600;box-shadow:inset 3px 0 0 var(--brand-cardboard)}
.dm-src-sum{white-space:nowrap}
.dm-src-sum .dm-src-internal{color:var(--brand-graphite)}
/* Internal Transfers v1, етап 2Б (M023): журнал, форма, документ і друк внутрішніх переміщень. Журнал, форма й документ використовують ті самі sd-* класи, що й відвантаження клієнтам. */
.sd-status-draft { background: var(--status-progress-bg); color: var(--status-progress-text); }
/* Brand Skin v1.2: сторінка без великої білої підкладки; білі картки лише для форми, замовлень-таблиць і документа. */
.it-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; }
.it-head-card { padding: 10px 16px 12px; }
.it-top { margin: 0 0 8px; gap: 6px 10px; }
.it-top h2 { font-size: 18px; line-height: 1.2; }
.it-head { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(170px, 1.1fr) 150px minmax(200px, 2.4fr); gap: 8px 12px; }
.it-head .bo-field { margin: 0; min-width: 0; }
.it-head .bo-label { font-size: 11px; margin: 0 0 2px; }
.it-head input, .it-head select { width: 100%; box-sizing: border-box; height: 32px; padding: 5px 8px; border: 1px solid #bfbfc4; border-radius: 8px; font: inherit; font-size: 13px; background: #fff; min-width: 0; }
.it-head input[readonly] { background: #f3f3f5; color: #33333a; }
.it-hint { margin: 8px 0 0; font-size: 12px; }
.it-foot-card { display: flex; flex-direction: column; gap: 8px; }
.it-foot-card .sd-actions { margin: 0; }
.it-foot-card .it-hint { margin: 0; }
.it-table-card { padding: 0; overflow: auto; }
.it-order { margin: 0 0 12px; }
@media (max-width: 900px) { .it-head { grid-template-columns: 1fr 1fr; } }
.it-order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 6px; }
.it-order-no { font-weight: 700; }
.it-order-comment { overflow-wrap: anywhere; }
.it-order-all { margin-left: auto; }
.it-filter { max-width: 340px; height: 34px; box-sizing: border-box; padding: 6px 10px; font-size: 13px; border-radius: 8px; margin: 0 0 12px; }
.it-summary { margin: 0; font-weight: 600; }
.it-lines tr.it-done .sd-name, .it-lines tr.it-done .sd-left { color: var(--text-muted, #6a6a72); }
.it-lines tr[hidden], .it-order[hidden] { display: none; }
.it-doc-lines .sd-name { overflow-wrap: anywhere; }
@media print {
 .ps-transfer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
 .ps-transfer .ps-title { font-size: 16pt; color: var(--brand-graphite, #3F4443); padding-bottom: 1.6mm; margin-bottom: 3.5mm; border-bottom: .8mm solid var(--brand-cardboard, #C3AD8B); letter-spacing: .2pt; }
 .ps-transfer .ps-header { grid-template-columns: 1fr; gap: .8mm; }
 .ps-transfer .ps-hrow dt { min-width: 46mm; }
 .ps-transfer .ps-table { margin-top: 2mm; }
 .ps-transfer .ps-table th:nth-child(1) { width: 6%; }
 .ps-transfer .ps-table th:nth-child(2) { width: 21%; }
 .ps-transfer .ps-table th:nth-child(3) { width: 13%; }
 .ps-transfer .ps-table th:nth-child(4) { width: 38%; }
 .ps-transfer .ps-table th:nth-child(5) { width: 8%; }
 .ps-transfer .ps-table th:nth-child(6) { width: 14%; }
 .ps-transfer .ps-table th { border-color: var(--brand-graphite, #3F4443); background: var(--surface-table-head, #E3E8EB) !important; }
 .ps-transfer .ps-table td { border-color: var(--brand-graphite, #3F4443); }
 .ps-stamp { margin: 0 0 3mm; padding: 1.5mm 4mm; display: inline-block; border: .9mm solid #ad2432; color: #ad2432; font-size: 16pt; font-weight: 700; letter-spacing: 1pt; transform: rotate(-3deg); }
 .ps-cancelled .ps-table td { color: #555; }
}


/* ==========================================================================
   YANTOS Brand Skin v1.2 — лише шар презентації (кольори, шрифти, поверхні, стани).
   Не змінює структуру сторінок, навігацію, бізнес-логіку й API.
   Семантика важливіша за декор: червоний = дефіцит / помилка / небезпечна дія,
   зелений = успіх / позитив, нейтральний = невідомо. Бургунді-колір бренду
   дає активні стани, головні дії й акценти; небезпечні дії мають окремий яскравий червоний.
   Усі кольори й розміри нижче беруться з токенів у :root.
   ========================================================================== */
:root {
  /* Палітра бренду */
  --brand-graphite: #3F4443;
  --brand-cardboard: #C3AD8B;
  --brand-blue-gray: #5B6770;
  --brand-cherry: #7C2629;
  --brand-off-white: #F4F4F4;
  --brand-light-metal: #C9CDCF;
  --brand-pale-brown: #CBC4BC;

  /* Поверхні */
  --surface-app: #F4F4F4;
  --surface-card: #FFFFFF;
  --surface-subtle: #FAFAFA;
  --surface-muted: #E6EAEC;
  --surface-hover: #E9EDEF;
  --surface-selected: #D3DCE1;
  --surface-warm: #F1EBE0;
  --surface-header: var(--brand-graphite);
  --surface-table-head: #E3E8EB;

  /* Текст */
  --text-primary: #3F4443;
  --text-secondary: #5B6770;
  --text-muted: #566066;
  --text-on-dark: #F4F4F4;
  --text-on-dark-muted: #C9CDCF;

  /* Межі й фокус */
  --border-default: #B3BABE;
  --border-subtle: #D3D8DA;
  --border-strong: #858F95;
  --focus-ring: #5B6770;
  --focus-halo: #C2CDD3;

  /* Дії */
  --action-primary: #3F4443;
  --action-primary-hover: #565D5C;
  --action-selected: #5B6770;
  --action-selected-hover: #4D5861;
  --action-destructive: #7C2629;
  --action-destructive-hover: #651E21;
  --action-disabled-bg: #C9CDCF;
  --action-disabled-text: #50575A;

  /* Семантика (важливіша за бренд) */
  --semantic-danger: #AD2432;
  --semantic-danger-bg: #F4E0E2;
  --semantic-danger-soft: #FFF5F5;
  --semantic-success: #1F6F43;
  --semantic-success-bg: #E3F0E8;
  --semantic-warning: #7A5200;
  --semantic-warning-bg: #FFF3D6;
  --semantic-neutral: #636B6F;

  /* Статуси (бейджі) */
  --status-progress-bg: #F4E6C3;
  --status-progress-text: #5E4513;
  --status-partial-bg: #D9E1E6;
  --status-partial-text: #2F3F4A;
  --status-done-bg: #D4EADD;
  --status-done-text: #17623A;
  --status-closed-partial-bg: #E3DCD3;
  --status-closed-partial-text: #4E433A;
  --status-cancelled-bg: #F1D5D8;
  --status-cancelled-text: #7C1F27;
  --status-draft-bg: #DEE3E5;
  --status-draft-text: #3F4443;

  /* Бургунді-акценти (v1.2): теплі підкладки, м'якші межі контейнерів, окремий червоний для небезпечних дій */
  --cherry-soft: #F8F0EF;
  --cherry-tint: #F1E3E3;
  --cherry-tint-strong: #E7CDCF;
  --cherry-border: #DDBEC1;
  --surface-warm-hover: #F8F2F1;
  --surface-table-head-warm: #F1E7E6;
  --border-container: #DAD5D3;
  --action-active: #7C2629;
  --action-active-hover: #651E21;
  --action-danger: #AD2432;
  --action-danger-border: #D9959C;
  --action-danger-soft: #FCEEEF;

  /* Радіуси, тіні, шрифт */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 2px rgba(63, 68, 67, .08);
  --shadow-popover: 0 8px 24px rgba(63, 68, 67, .18);
  --font-ui: Montserrat, 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  /* Перенаправлення старих змінних на токени бренду */
  --accent: var(--brand-blue-gray);
  --accent-dark: var(--action-selected-hover);
  --accent-soft: #E6EAEC;
  --ink: var(--text-primary);
  --muted: var(--text-muted);
  --border: var(--border-default);
  font-family: var(--font-ui);
  color: var(--text-primary);
  background: var(--surface-app);
}
body { background: var(--surface-app); color: var(--text-primary); font-family: var(--font-ui); }
select, textarea { font-family: inherit; }

/* Базові елементи */
button { background: var(--action-primary); color: #fff; border-radius: var(--radius-md); }
button:hover { transform: none; }
.primary-button:hover, .assistant-launch:hover { background: var(--action-primary-hover); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.secondary { background: #fff; color: var(--text-primary); border: 1px solid var(--border-strong); }
.secondary:hover { background: var(--surface-hover); border-color: var(--brand-blue-gray); }
.danger, button.danger, .secondary.danger { color: var(--brand-cherry); border-color: var(--brand-cherry); background: #fff; }
.danger:hover, button.danger:hover, .secondary.danger:hover { background: #F6EDED; border-color: var(--action-destructive-hover); color: var(--action-destructive-hover); }
.primary-button:disabled, .bo-save:disabled, .bo-add-button:disabled, button:disabled:not(.secondary):not([class*="bo-"]):not([class*="ot-"]):not([class*="sh-"]):not([class*="dm-"]) { background: var(--action-disabled-bg); color: var(--action-disabled-text); opacity: 1; }
.secondary:disabled { background: var(--surface-muted); color: var(--action-disabled-text); border-color: var(--border-subtle); opacity: 1; }
input, select, textarea { border-color: var(--border-default); color: var(--text-primary); }
input:focus, select:focus, textarea:focus { border-color: var(--focus-ring); outline: 2px solid var(--focus-halo); }
input::placeholder, textarea::placeholder { color: #8A9296; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-muted); color: var(--action-disabled-text); }
.eyebrow { color: var(--text-secondary); }
.title-dot { color: var(--brand-cardboard); }
.back-link { color: var(--text-secondary); }
.back-link:hover { color: var(--text-primary); }
.muted, .hint { color: var(--text-muted); }

/* Шапка: графіт, офіційне світле накреслення логотипу, та сама висота */
.topbar { background: var(--surface-header); color: var(--text-on-dark); border-bottom: 0; box-shadow: 0 0 0 100vmax var(--surface-header); clip-path: inset(0 -100vmax); }
.breadcrumb { color: var(--text-on-dark-muted); }
.breadcrumb span { color: #8E979B; }
.breadcrumb strong { color: #fff; font-weight: 600; }
.breadcrumb a:hover { color: #fff; }
.company-logo:focus-visible { outline-color: var(--brand-cardboard); }
.topbar .account { color: var(--text-on-dark); }
.topbar .avatar { background: var(--brand-blue-gray); color: #fff; border-color: #8E979B; }
.topbar .location-picker { color: var(--text-on-dark-muted); }
.topbar .location-picker select { border-color: #8E979B; background: #fff; color: var(--text-primary); }
.topbar .secondary { background: transparent; color: #fff; border: 1px solid #8E979B; }
.topbar .secondary:hover { background: rgba(244, 244, 244, .14); border-color: #fff; }
.topbar a:focus-visible, .topbar button:focus-visible, .topbar select:focus-visible { outline-color: var(--brand-cardboard); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: 150px; height: auto; }
.brand span { background: var(--brand-cardboard); color: var(--brand-graphite); margin-left: 0; }

/* Вхід */
.intro { background: var(--brand-graphite); }
.intro .eyebrow { color: var(--brand-cardboard); }
.intro p:not(.eyebrow) { color: #E6E8E9; }
.intro small { color: var(--brand-light-metal); }
.form-panel { background: var(--surface-app); }
#auth-form { border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

/* Картки й панелі: спокійна глибина, помірні радіуси */
.module-card, .supply-equipment-card, .product-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.module-card:hover, .supply-equipment-card:hover, .product-card:hover { border-color: var(--brand-blue-gray); box-shadow: var(--shadow-card); }
.product-card:hover, #admin-view .section-navigation-card:hover { transform: none; }
.module-icon, .enterprise-modules .module-icon, #admin-view .section-navigation-card > .module-icon, #admin-view .settings-card > .module-icon { background: var(--surface-muted); color: var(--brand-graphite); border-color: var(--border-default); }
.product-symbol { background: var(--surface-muted); color: var(--brand-graphite); }
.avatar { border-color: var(--border-default); }
.kanban-column { background: var(--surface-muted); border-color: var(--border-default); }
.sales-badge.good { background: var(--semantic-success-bg); color: var(--semantic-success); border-color: #CFE6D8; }
dialog { border: 1px solid var(--border-default); border-top: 3px solid var(--brand-graphite); border-radius: 10px; box-shadow: var(--shadow-popover); }
dialog li::marker { color: var(--brand-blue-gray); }
#admin-view .admin-form, #admin-view .finished-product-card, .workshop-card { border-top-color: var(--brand-blue-gray); }
.sales-orders-heading, .operator-panel, .workshops-banner, #admin-view .admin-panel > h2 { background: var(--brand-graphite) !important; border-color: var(--brand-cardboard) !important; }
.employee-group-heading { border-left-color: var(--brand-cardboard); }
.stock-summary > div:first-child { border-top-color: var(--brand-cardboard); }
.workshop-filter-apply, .drawing-primary, .schedule-primary, .payroll-primary, .raw-primary { background: var(--action-primary) !important; border-color: var(--action-primary) !important; }
.workshop-label, .workshop-open, .drawing-stats>span { color: var(--brand-blue-gray); }
.drawing-output { border-top-color: var(--brand-blue-gray); }

/* Таблиці: світлі, акуратні, липкі заголовки видно */
.sales-table th, .raw-table th, .schedule-summary th, .payroll-table th, .stock-table th, .sales-order-table th, .supply-report-table th, .pay-rate-table th { background: var(--surface-table-head); color: var(--text-primary); }
.sales-order-table tbody tr:hover { background: var(--surface-hover); }
.ob-table th, .ot-table th, .ot-ctable th { background: var(--surface-table-head); color: var(--text-primary); border-bottom-color: var(--border-default); }
.ot-table tbody tr:hover { background: var(--surface-hover); box-shadow: none; }
.ot-ctable tbody tr:hover { background: var(--surface-hover); }
.ot-table tbody tr.is-active, .ot-table tbody tr.is-active:hover { background: var(--surface-selected); box-shadow: inset 3px 0 0 var(--brand-blue-gray); }
.pc-row:hover { background: var(--surface-hover); }
.pc-row.is-selected { background: var(--surface-selected); }
.pc-node.is-active, .pc-node.is-planned.is-active { background: var(--surface-selected); color: var(--text-primary); }
.pc-chip.is-ready, .pc-suggest.is-active { border-color: var(--brand-blue-gray); background: var(--surface-selected); color: var(--text-primary); }
.pc-suggest:hover { border-color: var(--brand-blue-gray); color: var(--text-primary); }
.pc-link:hover, .cp-link { color: var(--brand-blue-gray); }
.pc-quick.is-active { background: var(--action-selected); border-color: var(--action-selected); color: #fff; }
.pc-banner { border-left-color: var(--brand-cardboard); }
.ps-table th { background: var(--surface-table-head) !important; }
.sv-table tr.sv-hot td { background: var(--semantic-danger-soft); }

/* Вибір / перемикачі / вкладки: Blue Gray замість зеленого */
.catalog-categories button.active, .supply-stat-button[aria-pressed=true], .sh-chip-active, .bo-chip.is-active, .bo-viewbtn.is-active, .ob-opt.is-active, .ot-chip.is-active { background: var(--action-selected); border-color: var(--action-selected); color: #fff; }
.supply-filter[aria-pressed=true] { background: var(--surface-selected); color: var(--text-primary); }
.bo-tab.is-active .bo-tab-count, .bo-chip.is-active .ob-badge { background: #fff; color: var(--action-selected); }
.bo-tab-count { background: var(--surface-muted); color: var(--text-primary); }
.sh-chip-active.sh-chip-late { color: #fff; }
.bo-chip, .ob-opt, .ot-chip { border-color: var(--border-strong); }
.bo-chip:hover, .ob-opt:hover, .ot-chip:hover { border-color: var(--brand-blue-gray); background: var(--surface-hover); }
.bo-viewbtn { color: var(--text-primary); }
.bo-viewbtn:hover { background: var(--surface-hover); }
.bo-viewbtn+.bo-viewbtn { border-left-color: var(--border-strong); }
.bo-field input, .bo-field select, .bo-field textarea, .bo-step select, .bo-status-filter { border-color: var(--border-default); }
.ot-badge { background: var(--action-selected); }
.ot-search-input:focus, .ot-qty:focus, .ot-price:focus, .gr-ctable input.gr-qty-edit:focus, .ot-modal-field input:focus, .ot-modal-field select:focus, .ot-modal-field textarea:focus { border-color: var(--focus-ring); outline: 2px solid var(--focus-halo); }
.ot-divider:hover::after, .ot-divider:focus-visible::after { background: var(--brand-blue-gray); }
.ot-row.is-selected .ot-label { color: var(--text-primary); }
.ot-label { color: var(--text-primary); }
.ot-child:hover { background: var(--surface-hover); }
.bo-ocard:hover, .bo-ocard:focus-visible, .sh-card:hover, .sh-card:focus-visible { border-color: var(--brand-blue-gray); box-shadow: 0 0 0 2px var(--focus-halo); }
.bo-ocard-more, .sh-card-more { color: var(--brand-blue-gray); }
.sv-card:hover { border-color: var(--brand-blue-gray); }
.sd-tab.is-active { border-bottom-color: var(--brand-blue-gray); color: var(--text-primary); }
.pilot-link:hover, .pilot-link:focus-visible { border-color: var(--brand-blue-gray); }

/* Єдина система статусів: семантика першою, бренд другим */
.bo-status, .bo-st-in_progress { background: var(--status-progress-bg); color: var(--status-progress-text); }
.bo-st-partially_shipped, .bo-ocard-status.bo-st-partially_shipped { background: var(--status-partial-bg); color: var(--status-partial-text); }
.bo-st-completed, .bo-ocard-status.bo-st-completed, .bo-ocard-status, .sd-status-posted { background: var(--status-done-bg); color: var(--status-done-text); }
.bo-st-completed_partial, .bo-ocard-status.bo-st-completed_partial, .sd-status-completed_partial { background: var(--status-closed-partial-bg); color: var(--status-closed-partial-text); }
.bo-st-cancelled, .bo-ocard-status.is-cancelled, .sd-status-cancelled, .sd-order-chip.is-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }
.bo-ocard-status.is-done, .sd-status-completed { background: var(--status-partial-bg); color: var(--status-partial-text); }
.gr-status { background: var(--status-draft-bg); color: var(--status-draft-text); }
.gr-status.gr-draft { background: var(--status-draft-bg); color: var(--status-draft-text); }
.gr-status.gr-posted { background: var(--status-done-bg); color: var(--status-done-text); }
.gr-status.gr-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }
.pc-badge { background: var(--status-progress-bg); color: var(--status-progress-text); }
.pc-badge.good { background: var(--status-done-bg); color: var(--status-done-text); }
.pc-badge.info { background: var(--status-partial-bg); color: var(--status-partial-text); }
.pc-badge.off { background: var(--surface-muted); color: var(--text-muted); }

/* Матриці потреби: семантика й липкі колонки збережені, нейтральна основа */
.dm-table th, .dm-table td { border-bottom-color: #E3E6E7; border-right-color: #EDEFF0; }
.dm-table thead th { background: var(--surface-table-head); color: var(--text-primary); border-bottom-color: var(--border-strong); }
.dm-table tbody tr:hover td { background: var(--surface-hover); }
.dm-table tbody tr:hover td.dm-cell { background: #DDE4E8; }
.dm-table td.dm-cell { background: #EEF1F3; color: #33414A; }
.dm-table .dm-fixed-last { border-right-color: var(--border-strong); }
.dm-table .dm-block-cell, .dm-table .dm-block-fill { background: #EDE6DA; color: var(--text-primary); border-top-color: var(--brand-pale-brown); }
.dm-table .dm-sub-row .dm-block-cell, .dm-table .dm-sub-row .dm-block-fill { background: #F6F2EB; color: var(--text-secondary); }
.dm-table tbody tr.dm-block-row:hover td { background: #EDE6DA; }
.dm-table tbody tr.dm-sub-row:hover td { background: #F6F2EB; }
.dm-sku, .dm-table .dm-sku:hover { color: var(--text-primary); background: transparent; }
.dm-table .dm-sku:focus-visible { outline-color: var(--focus-ring); }
.dm-kind { background: var(--status-progress-bg); color: var(--status-progress-text); }
.dm-table td.dm-unknown { color: var(--semantic-neutral); }
.dm-table td.dm-muted, .dm-muted { color: #8A9296; }

/* Заповнення на темних поверхнях */
.supply-hero .eyebrow { color: var(--brand-cardboard); }
.fuel-hero-balance { background: var(--brand-graphite); }
.supply-action-issue { background: var(--action-primary); }
.sales-completion-bar span, .drawing-progress span { background: var(--brand-blue-gray); }
.column-dot, .team .column-dot, .management .column-dot, .planned > span, .status-dot, .drawing-line { background: var(--brand-blue-gray); }
.drawing-line { border-left-color: var(--brand-blue-gray); background: #fff; }

/* Дрібні позначки */
.bo-location { background: var(--surface-muted); color: var(--status-partial-text); }
.card-badge { background: var(--brand-cherry); color: #fff; }
.ti-badge-pending { background: var(--status-progress-bg); color: var(--status-progress-text); }
.ti-badge-kept { background: var(--status-draft-bg); color: var(--status-draft-text); }
/* Дерево номенклатури, вибрані рядки, посилання: Blue Gray замість зеленого / синього */
.ot-row:hover { background: var(--surface-hover); }
.ot-row.is-selected { background: var(--surface-selected); }
.ot-table tbody tr.is-ordered { background: #EDF1F3; }
.ob-badge { background: var(--action-selected); }
.ob-opt:hover, .ob-qty:focus { border-color: var(--brand-blue-gray); }
.ob-qty:focus { outline: 2px solid var(--focus-halo); }
.ot-cart-total, .ot-unit-col { color: var(--text-primary); }
.bo-ocard-client-main, .sh-card-client { color: var(--text-primary); }
.bo-ocard-remaining, .sh-remaining, .sh-card-remaining, .pc-stat.info strong { color: var(--status-partial-text); }
.sd-order-chip, .sd-order-toggle { color: var(--brand-blue-gray); }
.sd-order-chip { background: var(--surface-muted); }
/* Наведення на вибраний елемент не світлішає й не ховає текст */
.bo-chip.is-active:hover, .ob-opt.is-active:hover, .ot-chip.is-active:hover, .bo-viewbtn.is-active:hover, .sh-chip-active:hover, .pc-quick.is-active:hover, .catalog-categories button.active:hover, .supply-stat-button[aria-pressed=true]:hover { background: var(--action-selected-hover); border-color: var(--action-selected-hover); color: #fff; }

/* ==========================================================================
   v1.1 — чистіший контраст: білі робочі поверхні, виразніші межі, заголовки й активні стани.
   Лише кольори, насиченість шрифту й межі (без зміни розмірів, відступів, висот і розмітки).
   ========================================================================== */
/* Заголовки, підписи, числові підсумки */
h1, h2, .page-heading h1, .dm-title { color: var(--brand-graphite); }
.title-dot { color: var(--brand-cherry); }
.eyebrow { color: var(--brand-blue-gray); font-weight: 800; }
label, .bo-label { color: var(--text-primary); }
.dm-summary b, .dm-stats b, .sales-summary b, .sv-card strong, .supply-stat strong, .shipment-metric strong, .stock-grade strong { color: var(--brand-graphite); font-weight: 800; }

/* Шапка / навігація: активний розділ виділено Blue Gray */
.breadcrumb strong { background: var(--brand-blue-gray); color: #fff; box-shadow: 0 0 0 4px var(--brand-blue-gray); border-radius: 2px; }
.breadcrumb span { color: #A4ACB0; }
.topbar .secondary { border-color: #A4ACB0; }
.topbar .location-picker { color: #E6E8E9; font-weight: 800; }
.topbar .avatar { background: var(--brand-blue-gray); border-color: #C9CDCF; }
.back-link { color: var(--brand-blue-gray); }
.back-link:hover { color: var(--brand-graphite); }

/* Робочі поверхні білі, фон сторінки лишається #F4F4F4 */
.sales-table-wrap, .sales-order-table-wrap, .dm-scroll, .ot-header, .ot-main, .ot-cart, .ot-tree, .ot-cart-panel, .ot-products, .gr-ctable, .bo-card, .pc-banner, .module-card, .sv-card, .bo-ocard, .sh-card { background: #fff; }
.kanban-column { background: #fff; }
.sales-table td, .sv-table td, .ot-table td, .ot-ctable td, .gr-ctable td, .dm-table td { background-color: #fff; }

/* Межі й роздільники виразніші; розміри не змінюються */
input, select, textarea, .bo-field input, .bo-field select, .bo-field textarea, .bo-step select, .bo-status-filter, .location-picker select { border-color: var(--border-strong); }
.secondary { border-color: var(--border-strong); }
.bo-chip, .ob-opt, .ot-chip, .sh-chip, .bo-viewbtn+.bo-viewbtn { border-color: var(--border-strong); }
.bo-chip, .ob-opt, .ot-chip, .secondary, .bo-viewbtn { color: var(--brand-graphite); }
.sales-table-wrap, .sales-order-table-wrap, .dm-scroll, .ot-header, .module-card, .sv-card, .bo-ocard, .sh-card { border-color: var(--border-default); }
.sales-table th, .sales-table td, .sv-table th, .sv-table td { border-bottom-color: var(--border-subtle); }
.ot-table td, .ot-ctable td, .gr-ctable td { border-bottom-color: var(--border-subtle); }
.ot-child { border-bottom-color: var(--border-subtle); }
.ot-header { border-color: var(--border-strong); }

/* Заголовки таблиць: сильніший фон, графітовий жирний текст, темна нижня межа */
.sales-table th, .sv-table th, .stock-table th, .sales-order-table th, .ob-table th, .ot-table th, .ot-ctable th, .gr-ctable th { background: var(--surface-table-head); color: var(--brand-graphite); border-bottom-color: var(--brand-graphite); }
.sales-table thead, .sv-table thead { border-bottom: 0; }
.sales-table td strong, .sv-table td strong { color: var(--brand-graphite); }
.sales-table tbody tr:hover td, .sv-table tbody tr:hover td { background-color: var(--surface-hover); }
.ot-table tbody tr:hover, .ot-ctable tbody tr:hover, .ot-row:hover { background: var(--surface-hover); }

/* Вибрані стани та активні вкладки: Blue Gray сильніший */
.bo-chip.is-active, .ob-opt.is-active, .ot-chip.is-active, .bo-viewbtn.is-active, .sh-chip-active, .pc-quick.is-active, .catalog-categories button.active, .supply-stat-button[aria-pressed=true] { background: var(--action-selected); border-color: var(--brand-graphite); color: #fff; }
.bo-chip.is-active:hover, .ob-opt.is-active:hover, .ot-chip.is-active:hover, .bo-viewbtn.is-active:hover, .sh-chip-active:hover, .pc-quick.is-active:hover, .catalog-categories button.active:hover, .supply-stat-button[aria-pressed=true]:hover { background: var(--action-selected-hover); border-color: var(--brand-graphite); color: #fff; }
.bo-chip:not(.is-active):hover, .ob-opt:not(.is-active):hover, .ot-chip:not(.is-active):hover, .sh-chip:not(.sh-chip-active):hover { border-color: var(--brand-blue-gray); background: var(--surface-selected); }
.bo-tab.is-active .bo-tab-count, .bo-chip.is-active .ob-badge { background: #fff; color: var(--brand-graphite); }
.bo-tab-count { background: var(--surface-muted); color: var(--brand-graphite); }
.ot-row.is-selected { background: var(--surface-selected); box-shadow: inset 3px 0 0 var(--brand-blue-gray); }
.ot-row.is-selected .ot-label { color: var(--brand-graphite); }
.ot-table tbody tr.is-active, .ot-table tbody tr.is-active:hover { background: var(--surface-selected); box-shadow: inset 3px 0 0 var(--brand-graphite); }
.ot-table tbody tr.is-ordered { background: #E6EDF1; }
.ot-row.is-top .ot-label { color: var(--brand-graphite); }
.sd-tab.is-active { border-bottom-color: var(--brand-blue-gray); color: var(--brand-graphite); }

/* Дії: основні кнопки Graphite, структура без змін */
.primary-button, .bo-save { background: var(--action-primary); color: #fff; }
.ot-cart-actions .primary-button { background: var(--action-primary); }

/* Статуси — виразніші, тонка межа замість заливки кольором */
.bo-st-in_progress, .bo-status { box-shadow: inset 0 0 0 1px #DDC68A; }
.bo-st-partially_shipped, .bo-ocard-status.bo-st-partially_shipped { box-shadow: inset 0 0 0 1px #A9B8C2; }
.bo-st-completed, .bo-ocard-status.bo-st-completed, .sd-status-posted, .gr-status.gr-posted { box-shadow: inset 0 0 0 1px #9FCDB1; }
.bo-st-completed_partial, .bo-ocard-status.bo-st-completed_partial, .sd-status-completed_partial { box-shadow: inset 0 0 0 1px #C4B9AC; }
.bo-st-cancelled, .bo-ocard-status.is-cancelled, .sd-status-cancelled, .gr-status.gr-cancelled { box-shadow: inset 0 0 0 1px #DDA4AB; }
.gr-status, .gr-status.gr-draft { box-shadow: inset 0 0 0 1px #B3BABE; }
.bo-location { background: var(--surface-selected); color: var(--brand-graphite); }

/* Матриці потреби: білі комірки, чіткі межі, групи Blue Gray з тонким Cardboard-акцентом */
.dm-table th, .dm-table td { border-bottom-color: var(--border-subtle); border-right-color: var(--border-subtle); }
.dm-table thead th { background: var(--surface-table-head); color: var(--brand-graphite); border-bottom-color: var(--brand-graphite); }
.dm-table td.dm-cell { background: #DCE5EA; color: var(--brand-graphite); font-weight: 700; }
.dm-table tbody tr:hover td { background: var(--surface-hover); }
.dm-table tbody tr:hover td.dm-cell { background: #C9D6DD; }
.dm-table .dm-block-cell, .dm-table .dm-block-fill { background: var(--surface-selected); color: var(--brand-graphite); border-top: 1px solid var(--brand-cardboard); font-weight: 800; }
.dm-table .dm-sub-row .dm-block-cell, .dm-table .dm-sub-row .dm-block-fill { background: var(--surface-muted); color: var(--brand-graphite); border-top: 0; font-weight: 700; }
.dm-table tbody tr.dm-block-row:hover td { background: var(--surface-selected); }
.dm-table tbody tr.dm-sub-row:hover td { background: var(--surface-muted); }
.dm-table .dm-fixed-last { border-right-color: var(--brand-graphite); }
.dm-table td.dm-muted, .dm-muted { color: #7A858B; }
.dm-sku { color: var(--brand-graphite); }
.dm-kind { background: var(--status-progress-bg); color: var(--status-progress-text); }
.dm-filters label, .dm-filters .muted { color: var(--text-primary); }

/* ==========================================================================
   v1.2 — тепліше й м'якше: бургунді-акценти, більші радіуси, м'якші межі контейнерів.
   Лише кольори, радіуси й межі-кольори; розміри, відступи й розкладка не змінюються.
   Небезпечні дії й дефіцит лишаються яскраво-червоними (окремо від бренду).
   ========================================================================== */
/* Заголовки та акценти */
.eyebrow, .dm-title { color: var(--brand-cherry); }
.title-dot { color: var(--brand-cherry); }
.back-link { color: var(--brand-cherry); }
.back-link:hover { color: var(--action-active-hover); }
.module-icon, .enterprise-modules .module-icon, #admin-view .section-navigation-card > .module-icon, #admin-view .settings-card > .module-icon, .product-symbol { background: var(--cherry-soft); color: var(--brand-cherry); border-color: var(--cherry-border); }
.card-arrow, .card-link, .board-icon, .supply-row-arrow { color: var(--brand-cherry); }
.column-dot, .team .column-dot, .management .column-dot, .planned > span, .status-dot { background: var(--brand-cherry); }
.pc-banner { background: var(--cherry-soft); border-left-color: var(--brand-cherry); }
.pilot-link:hover, .pilot-link:focus-visible, .module-card:hover, .supply-equipment-card:hover, .product-card:hover { border-color: var(--brand-cherry); }
.shipment-metric { box-shadow: inset 0 3px 0 var(--brand-cherry); }

/* Шапка: вишнева лінія знизу на всю ширину, активний розділ вишневий */
.topbar { position: relative; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-cherry); box-shadow: 0 0 0 100vmax var(--brand-cherry); clip-path: inset(0 -100vmax); }
.breadcrumb strong { background: var(--brand-cherry); box-shadow: 0 0 0 4px var(--brand-cherry); }
.topbar .avatar { background: var(--brand-cherry); }
.assistant-launch { background: var(--brand-cherry); }
.assistant-launch:hover { background: var(--action-active-hover); }

/* Основні дії та активні стани: бургунді */
.primary-button, .bo-save, .ot-cart-actions .primary-button, .workshop-filter-apply, .drawing-primary, .schedule-primary, .payroll-primary, .raw-primary { background: var(--action-active) !important; border-color: var(--action-active) !important; color: #fff; }
.primary-button:hover, .bo-save:hover, .ot-cart-actions .primary-button:hover { background: var(--action-active-hover) !important; border-color: var(--action-active-hover) !important; }
.primary-button:disabled, .bo-save:disabled, .bo-add-button:disabled { background: var(--action-disabled-bg) !important; border-color: var(--action-disabled-bg) !important; color: var(--action-disabled-text); }
.bo-chip.is-active, .ob-opt.is-active, .ot-chip.is-active, .bo-viewbtn.is-active, .sh-chip-active, .pc-quick.is-active, .catalog-categories button.active, .supply-stat-button[aria-pressed=true] { background: var(--action-active); border-color: var(--action-active); color: #fff; }
.bo-chip.is-active:hover, .ob-opt.is-active:hover, .ot-chip.is-active:hover, .bo-viewbtn.is-active:hover, .sh-chip-active:hover, .pc-quick.is-active:hover, .catalog-categories button.active:hover, .supply-stat-button[aria-pressed=true]:hover { background: var(--action-active-hover); border-color: var(--action-active-hover); color: #fff; }
.bo-chip:not(.is-active):hover, .ob-opt:not(.is-active):hover, .ot-chip:not(.is-active):hover, .sh-chip:not(.sh-chip-active):hover { border-color: var(--brand-cherry); background: var(--cherry-soft); }
.secondary:hover { border-color: var(--brand-cherry); background: var(--cherry-soft); }
.topbar .secondary:hover { background: rgba(244, 244, 244, .14); border-color: #fff; }
.bo-tab.is-active .bo-tab-count, .bo-chip.is-active .ob-badge { color: var(--brand-cherry); }
.ob-badge, .ot-badge { background: var(--brand-cherry); }
.sd-tab.is-active { border-bottom-color: var(--brand-cherry); }
.sh-chip-late { border-color: var(--action-danger); color: var(--action-danger); }
.sh-chip-active.sh-chip-late { background: var(--action-danger); border-color: var(--action-danger); color: #fff; }
.bo-location { background: var(--cherry-tint); color: var(--brand-cherry); }
.pc-node.is-active, .pc-node.is-planned.is-active, .pc-row.is-selected, .pc-chip.is-ready, .pc-suggest.is-active { background: var(--cherry-tint); color: var(--text-primary); }
.pc-chip.is-ready, .pc-suggest.is-active, .pc-suggest:hover { border-color: var(--brand-cherry); }
.pc-link:hover, .cp-link, .sd-order-chip, .sd-order-toggle, .bo-ocard-more, .sh-card-more { color: var(--brand-cherry); }

/* Вибрані рядки й наведення: теплі підкладки */
.ot-row.is-selected, .ot-table tbody tr.is-active, .ot-table tbody tr.is-active:hover { background: var(--cherry-tint); box-shadow: inset 3px 0 0 var(--brand-cherry); }
.ot-table tbody tr.is-ordered { background: var(--cherry-soft); }
.ot-row:hover, .ot-table tbody tr:hover, .ot-ctable tbody tr:hover, .sales-table tbody tr:hover td, .sv-table tbody tr:hover td, .sales-order-table tbody tr:hover, .pc-row:hover { background-color: var(--surface-warm-hover); }
.ot-row:hover, .ot-table tbody tr:hover, .ot-ctable tbody tr:hover { background: var(--surface-warm-hover); }
.ot-child:hover { background: var(--surface-warm-hover); }
.bo-ocard:hover, .bo-ocard:focus-visible, .sh-card:hover, .sh-card:focus-visible, .sv-card:hover { border-color: var(--brand-cherry); box-shadow: 0 0 0 2px var(--cherry-tint); }

/* Шапки таблиць: тепла підкладка й вишнева нижня межа */
.sales-table th, .sv-table th, .stock-table th, .sales-order-table th, .ob-table th, .ot-table th, .ot-ctable th, .gr-ctable th, .dm-table thead th { background: var(--surface-table-head-warm); color: var(--brand-graphite); border-bottom-color: var(--brand-cherry); }
.dm-table .dm-block-cell, .dm-table .dm-block-fill { background: var(--cherry-tint); color: var(--brand-cherry); border-top-color: var(--cherry-border); }
.dm-table .dm-sub-row .dm-block-cell, .dm-table .dm-sub-row .dm-block-fill { background: var(--cherry-soft); color: var(--text-primary); }
.dm-table tbody tr.dm-block-row:hover td { background: var(--cherry-tint); }
.dm-table tbody tr.dm-sub-row:hover td { background: var(--cherry-soft); }
.dm-table tbody tr:hover td { background: var(--surface-warm-hover); }
.dm-table .dm-fixed-last { border-right-color: var(--border-strong); }

/* Небезпечні дії: яскраво-червоні, відмінні від бренду */
.danger, button.danger, .secondary.danger, .bo-cancel, .ob-remove, .ot-remove, .sd-cancel, .ot-cart-actions .bo-cancel { color: var(--action-danger); border-color: var(--action-danger-border); background: #fff; }
.danger:hover, button.danger:hover, .secondary.danger:hover, .bo-cancel:hover, .ob-remove:hover, .ot-remove:hover, .sd-cancel:hover, .ot-cart-actions .bo-cancel:hover { background: var(--action-danger-soft); border-color: var(--action-danger); color: var(--action-danger); }

/* М'якші межі контейнерів */
.sales-table-wrap, .sales-order-table-wrap, .dm-scroll, .ot-header, .ot-tree, .ot-main, .ot-cart, .module-card, .sv-card, .bo-ocard, .sh-card, .shipment-metric, .supply-stat, .pc-banner, .pc-stat, .pc-facts, .sd-order-panel, .kanban-column, .product-card, .supply-equipment-card, #auth-form { border-color: var(--border-container); }

/* М'якша геометрія: лише border-radius */
button, .secondary, .primary-button, .bo-chip, .ob-opt, .sh-chip, .bo-dates-clear, .catalog-categories button, .sv-deficit-alert { border-radius: var(--radius-md); }
input, select, textarea, .bo-field input, .bo-field select, .bo-field textarea, .bo-step select, .bo-status-filter, .location-picker select, .pc-toolbar input, .pc-toolbar select, .cp-field input, .cp-field select, .cp-field textarea, .cp-contact input[type=text], .cp-contact select, .catalog-search input, .catalog-filters select, .sd-header input, .sd-header select, .bo-dates input[type=date], .bo-qty, .ob-qty, .sv-select, .sv-reason, .ot-modal-field input, .ot-modal-field select, .ot-modal-field textarea, .pc-sku-form input, .pc-sku-form select, .gr-qty-input, .gr-note-input { border-radius: var(--radius-md); }
.ot-header, .ot-header .bo-field input, .ot-header .bo-field select, .ot-search-input, .ot-filter select, .ot-chip, .ot-qty, .ot-price, .ot-cart-actions .secondary-button, .ot-cart-actions .primary-button, .ot-remove, .ot-banner, .gr-ctable input.gr-qty-edit, .gr-ctable .gr-note-input, .dm-kind, .bo-location, .bo-status, .bo-st, .pc-badge { border-radius: var(--radius-sm); }
.bo-viewswitch { border-radius: var(--radius-md); }
.ot-header, .ot-tree, .ot-main, .ot-cart { border-radius: var(--radius-md); }
.sales-table-wrap, .sales-order-table-wrap, .dm-scroll, .module-card, .supply-equipment-card, .product-card, .sv-card, .bo-ocard, .sh-card, .shipment-metric, .supply-stat, .pc-banner, .pc-stat, .pc-facts, .sd-order-panel, .gr-cancel-panel, .kanban-column, .board-section, dialog, #auth-form { border-radius: var(--radius-lg); }

/* v1.2.1 — «Найближчі відвантаження»: без великої білої підкладки навколо всієї робочої зони, як у списку Замовлень.
   Банер, чипи, підсумок лежать на фоні сторінки #F4F4F4; таблиця лишається окремою білою закругленою карткою. */
.sh-page { background: transparent; }

/* v1.2.2 — головні списки без великої білої підкладки навколо всієї сторінки
   (Контрагенти, Відвантаження — журнал і відвантажені замовлення, Прихід товару, Залишки, Щоденна перевірка).
   Форма нового відвантаження (.sd-form) і документ відвантаження (.sd-doc) лишаються з білою підкладкою:
   це форми з внутрішніми панелями. Банери, панелі фільтрів (.sv-panel), таблиці й картки мають власний фон. */
.sv-page:not(.sd-form):not(.sd-doc) { background: transparent; }
