: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 0 100%, #501c23 0, transparent 60%), #161618; color: #fff; padding: 54px 9%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; border-bottom: 5px solid var(--accent); }
.intro .eyebrow { color: #ff9da6; }
.intro h1 { font-size: clamp(32px,3.6vw,56px); line-height: 1.16; letter-spacing: -2px; }
.intro p:not(.eyebrow) { color: #d0cdd0; max-width: 370px; line-height: 1.8; }
.intro small { color: #bcbabc; }
.form-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
form { width: 100%; max-width: 390px; }
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; }
.workspace-badge { font-size: 11px; white-space: nowrap; border: 1px solid #dfdfe2; background: #fff; padding: 9px 12px; border-radius: 20px; display: flex; align-items: center; gap: 7px; color: #57575d; }
.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; }
  .workspace-badge { display: none; }
  .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; } }

/* 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; }
@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; }
@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}
.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}
@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:12mm}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:12pt;break-after:avoid}#supply-print p{font-size:9pt;margin:5px 0}#supply-print .eyebrow{color:#000}#supply-print .supply-report-table{overflow:visible;margin:10px 0}#supply-print table{table-layout:fixed;font-size:8pt}#supply-print th,#supply-print td{border-color:#aaa;padding:6px;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-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--border)}.permission-row[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; }
.workshops-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.workshop-card { background:#fff; border:1px solid #d9ddda; border-top:4px solid #70807a; border-radius:11px; padding:19px; box-shadow:0 8px 24px #1320180a; }
.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 9px; font-size:14px; }
.workshop-label { color:#8e252a; font-size:9px; font-weight:750; letter-spacing:.7px; }
.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:18px; 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}.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; } }
