:root {
  color-scheme: light;
  --ink: #17231e;
  --muted: #68746f;
  --line: #dfe5e1;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --green: #196b4a;
  --green-dark: #0f4c34;
  --green-soft: #e4f2eb;
  --amber: #a75f0a;
  --amber-soft: #fff1d9;
  --red: #a33b32;
  --red-soft: #f9e7e5;
  --shadow: 0 8px 30px rgba(29, 54, 43, .06);
  --sidebar-expanded: 248px;
  --sidebar-collapsed: 76px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; }
.icon-sprite { height: 0; left: -9999px; overflow: hidden; position: absolute; width: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-expanded); background: #10251d; color: #fff; padding: 28px 11px; display: flex; flex-direction: column; overflow-x: visible; z-index: 12; transition: width .38s cubic-bezier(.22, 1, .36, 1), box-shadow .38s ease; }
.brand { display: flex; align-items: center; gap: 0; padding: 0 0 30px; font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand > span { flex: 0 0 38px; width: 38px; height: 38px; margin: 0 8px; border-radius: 11px; display: grid; place-items: center; background: #d7f16a; color: #183321; font-weight: 850; }
.brand small, .device small { display: block; color: #99aaa3; font-size: 12px; font-weight: 500; margin-top: 2px; }
.brand-button { background: transparent; border: 0; color: inherit; cursor: pointer; font-family: inherit; text-align: left; width: 100%; }
.brand-button:hover > span { background: #e6fa91; transform: rotate(-2deg) scale(1.04); }
.brand-button > span { flex: 0 0 auto; font-size: 13px; transition: background .15s ease, transform .15s ease; }
.brand-button:focus-visible { border-radius: 12px; outline: 2px solid #d7f16a; outline-offset: 3px; }
.current-user { border-top: 1px solid rgba(255,255,255,.12); margin-top: auto; padding: 18px 8px 12px; }
.current-user strong, .current-user small { display: block; }
.current-user small { color: #99aaa3; margin: 3px 0 8px; }
.current-user button { color: #d7f16a; padding: 0; }
.sidebar nav { display: grid; gap: 5px; min-height: 0; -ms-overflow-style: none; overflow-x: hidden; overflow-y: auto; padding-right: 3px; scrollbar-width: none; }
.sidebar nav::-webkit-scrollbar { display: none; height: 0; width: 0; }
.nav-item { align-items: center; border: 0; color: #b9c6c1; background: transparent; border-radius: 9px; display: grid; gap: 0; grid-template-columns: 54px minmax(0, 1fr) auto; min-height: 42px; padding: 9px 0; position: relative; text-align: left; font-size: 14px; white-space: nowrap; }
.nav-item svg { fill: none; height: 21px; justify-self: center; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 21px; }
.brand-copy, .nav-label, .device > div { opacity: 1; transition: opacity .18s ease .14s; visibility: visible; }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.08); }
.device { margin-top: auto; display: grid; gap: 0; grid-template-columns: 54px minmax(0, 1fr); align-items: center; padding: 13px 0; background: rgba(255,255,255,.06); border-radius: 11px; font-size: 14px; }
.device i { justify-self: center; width: 9px; height: 9px; background: #8ed879; border-radius: 50%; box-shadow: 0 0 0 4px rgba(142,216,121,.12); }
main { margin-left: var(--sidebar-expanded); max-width: none; padding: 38px 42px 70px; transition: margin-left .38s cubic-bezier(.22, 1, .36, 1), width .38s cubic-bezier(.22, 1, .36, 1); width: calc(100% - var(--sidebar-expanded)); }
.sidebar-toggle { align-items: center; background: #fff; border: 2px solid #d7f16a; border-radius: 50%; box-shadow: 0 5px 16px rgba(7,22,16,.25); color: #173c2d; display: flex; height: 38px; justify-content: center; padding: 0; position: absolute; right: -19px; top: 27px; transition: background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease; width: 38px; z-index: 2; }
.sidebar-toggle svg { fill: currentColor; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; transform: rotate(-28deg); width: 21px; }
.sidebar-toggle:hover { background: #f4ffd0; box-shadow: 0 7px 20px rgba(7,22,16,.32); transform: translateY(-1px); }
.sidebar-toggle.is-pinned { background: #d7f16a; color: #173c2d; }
.sidebar-toggle:not(.is-pinned) { background: #fff; color: #52635b; }
body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
body.sidebar-collapsed main { margin-left: var(--sidebar-collapsed); width: calc(100% - var(--sidebar-collapsed)); }
body.sidebar-collapsed .sidebar:not(:hover) .brand-copy,
body.sidebar-collapsed .sidebar:not(:hover) .nav-label,
body.sidebar-collapsed .sidebar:not(:hover) .device > div,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .brand-copy,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .nav-label,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .device > div { opacity: 0; transition-delay: 0s; visibility: hidden; }
body.sidebar-collapsed .sidebar:not(:hover) .current-user,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .current-user { display: none; }
body.sidebar-collapsed .sidebar:not(:hover) .brand,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .brand { padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .sidebar:not(:hover) .nav-item,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .nav-item { gap: 0; grid-template-columns: 54px minmax(0, 1fr) auto; padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .sidebar:not(:hover) .device,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .device { grid-template-columns: 54px minmax(0, 1fr); padding-left: 0; padding-right: 0; }
body.sidebar-collapsed:not(.sidebar-collapse-lock) .sidebar:hover { box-shadow: 12px 0 30px rgba(7,22,16,.22); width: var(--sidebar-expanded); }
body.sidebar-collapsed:not(.sidebar-collapse-lock) .sidebar:hover ~ main { margin-left: var(--sidebar-expanded); width: calc(100% - var(--sidebar-expanded)); }
header, .panel-head, .header-actions, .dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-actions[hidden] { display: none !important; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(28px, 3vw, 39px); font-weight: 720; }
h2 { font-size: 22px; }
.eyebrow { color: var(--green); font-size: 12px; letter-spacing: .11em; font-weight: 800; margin: 0 0 6px; }
.date-control { color: var(--muted); font-size: 13px; display: grid; gap: 5px; }
input, select, textarea { min-height: 42px; border: 1px solid #cfd8d3; background: #fff; color: var(--ink); border-radius: 8px; padding: 9px 11px; outline: none; font: inherit; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #66736d 50%), linear-gradient(135deg, #66736d 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(25,107,74,.12); }
.primary, .secondary { min-height: 43px; border-radius: 8px; padding: 10px 16px; border: 1px solid transparent; font-weight: 700; font-size: 14px; }
.primary { color: white; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.view[hidden] { display: none !important; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 20px; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 10px; font-size: 27px; letter-spacing: -.04em; }
.metric small { color: var(--muted); font-size: 12px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.overview-dashboard { display: grid; gap: 16px; padding-top: 18px; }
.overview-toolbar { display: flex; justify-content: flex-end; }
.overview-toolbar label { color: var(--muted); display: grid; flex: 0 0 260px; font-size: 12px; font-weight: 700; gap: 6px; }
.overview-kpis { display: grid; gap: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-kpi { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: inherit; display: grid; gap: 11px; grid-template-columns: auto 1fr auto; min-height: 112px; padding: 16px; text-align: left; }
.overview-kpi:hover { border-color: #b7c8bf; box-shadow: 0 10px 24px rgba(29,54,43,.1); transform: translateY(-1px); }
.overview-kpi-icon { background: var(--green-soft); border-radius: 11px; display: grid; height: 42px; place-items: center; width: 42px; }
.overview-kpi svg, .overview-modules svg { fill: none; height: 23px; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 23px; }
.overview-kpi > span:nth-child(2) { min-width: 0; }
.overview-kpi small, .overview-kpi em { color: var(--muted); display: block; font-size: 11px; font-style: normal; }
.overview-kpi strong { display: block; font-size: 24px; letter-spacing: -.04em; margin: 4px 0; overflow-wrap: anywhere; }
.overview-kpi > b { color: var(--green); font-size: 20px; }
.overview-layout { align-items: start; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 320px; }
.overview-primary, .overview-side { display: grid; gap: 14px; min-width: 0; }
.overview-chart-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-lower-grid { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
.overview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; padding: 17px; }
.overview-card-head { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
.overview-card-head h3, .terminal-card h3 { font-size: 17px; margin: 0; }
.overview-link { background: transparent; border: 0; color: var(--green); font-size: 11px; font-weight: 750; padding: 5px 0; white-space: nowrap; }
.overview-card-note { color: var(--muted); font-size: 10px; }
.overview-chart-card { overflow: hidden; }
.overview-bars { align-items: end; display: grid; gap: 5px; grid-auto-columns: minmax(30px, 1fr); grid-auto-flow: column; height: 225px; margin-top: 14px; min-width: 500px; padding-top: 22px; position: relative; }
.overview-chart-card:has(.overview-bars) { overflow-x: auto; }
.overview-bar-column { align-items: center; display: grid; grid-template-rows: 18px minmax(0, 1fr) 20px; height: 100%; justify-items: center; min-width: 0; }
.overview-bar-column > span { color: var(--muted); font-size: 8px; white-space: nowrap; }
.overview-bar-column > i { align-self: end; background: linear-gradient(180deg, #7ea66f, #47783f); border-radius: 5px 5px 2px 2px; min-height: 2px; width: min(100%, 28px); }
.output-bars .overview-bar-column > i { background: linear-gradient(180deg, #c59c5e, #936828); }
.overview-bar-column > small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.overview-attendance { align-items: center; display: grid; gap: 24px; grid-template-columns: 150px 1fr; margin-top: 17px; }
.overview-donut { background: conic-gradient(var(--green) 0 var(--progress), #e3e9e5 var(--progress) 360deg); border-radius: 50%; display: grid; height: 145px; place-items: center; position: relative; width: 145px; }
.overview-donut::after { background: #fff; border-radius: 50%; content: ''; inset: 17px; position: absolute; }
.overview-donut > div { display: grid; gap: 2px; place-items: center; position: relative; z-index: 1; }
.overview-donut strong { font-size: 25px; }
.overview-donut span { color: var(--muted); font-size: 11px; }
.overview-legend { display: grid; gap: 9px; }
.overview-legend p { align-items: center; display: grid; gap: 7px; grid-template-columns: auto 1fr auto; margin: 0; }
.overview-legend i { background: #d6ddd9; border-radius: 50%; height: 9px; width: 9px; }
.overview-legend i.present { background: var(--green); }
.overview-legend i.planned { background: #c59c5e; }
.overview-legend i.missed { background: var(--red); }
.overview-legend span { color: var(--muted); font-size: 11px; }
.overview-activity-list, .overview-side-list { display: grid; margin: 10px -17px -17px; }
.overview-activity { align-items: center; background: transparent; border: 0; border-top: 1px solid #edf0ee; color: inherit; display: grid; gap: 9px; grid-template-columns: auto 1fr auto; padding: 10px 17px; text-align: left; }
.overview-activity:hover, .overview-side-item:hover { background: #f7faf8; }
.overview-activity > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.overview-activity small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-activity .badge { font-size: 9px; padding: 5px 7px; }
.overview-modules-card { padding-bottom: 12px; }
.overview-modules { display: grid; gap: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 13px; }
.overview-modules button { align-items: center; background: #fafcfb; border: 1px solid var(--line); border-radius: 9px; color: inherit; display: grid; gap: 8px; grid-template-columns: auto 1fr auto; min-height: 52px; padding: 9px 10px; text-align: left; }
.overview-modules button:hover { background: var(--green-soft); border-color: #b7d1c3; }
.overview-modules svg { height: 20px; width: 20px; }
.overview-modules span { font-size: 11px; font-weight: 700; }
.overview-modules b { color: var(--green); }
.overview-count { background: var(--amber-soft); border-radius: 99px; color: var(--amber); font-size: 12px; font-weight: 800; min-width: 27px; padding: 6px 8px; text-align: center; }
.overview-side-item { align-items: center; background: transparent; border: 0; border-top: 1px solid #edf0ee; color: inherit; display: grid; gap: 9px; grid-template-columns: 30px 1fr auto; padding: 12px 17px; text-align: left; }
.overview-side-item > span { background: var(--green-soft); border-radius: 50%; color: var(--green); display: grid; font-weight: 850; height: 28px; place-items: center; width: 28px; }
.overview-side-item.warning > span { background: var(--amber-soft); color: var(--amber); }
.overview-side-item.danger > span { background: var(--red-soft); color: var(--red); }
.overview-side-item > div { display: grid; gap: 3px; min-width: 0; }
.overview-side-item strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-side-item small { color: var(--muted); font-size: 9px; }
.overview-side-item > b { color: var(--muted); }
.overview-empty { color: var(--muted); font-size: 11px; padding: 23px 17px; text-align: center; }
.overview-empty.success { color: var(--green); }
.terminal-card > div { align-items: center; display: flex; gap: 10px; }
.terminal-dot { background: #5da868; border-radius: 50%; box-shadow: 0 0 0 5px rgba(93,168,104,.14); height: 10px; width: 10px; }
.terminal-dot.offline { background: var(--red); box-shadow: 0 0 0 5px rgba(163,59,50,.12); }
.terminal-card > p { display: grid; gap: 4px; margin: 13px 0 0; }
.terminal-card > p strong { font-size: 12px; }
.terminal-card > p span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.module-hub { background: #fff; border: 1px solid #e4e8e6; border-radius: 16px; box-shadow: var(--shadow); display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px; }
.module-card { align-items: center; background: #fff; border: 1px solid #dfe4e2; border-radius: 11px; color: #202724; display: flex; flex-direction: column; font-weight: 650; gap: 7px; justify-content: center; min-height: 92px; padding: 12px 8px 10px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.module-card:hover { border-color: #aebbb5; box-shadow: 0 7px 18px rgba(27, 53, 42, .08); transform: translateY(-1px); }
.module-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.module-card svg { fill: none; height: 25px; stroke: #646d69; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 25px; }
.module-card span { font-size: 13px; line-height: 1.15; }
.module-preview { min-height: 430px; padding: 20px; }
.back-main { background: transparent; border: 0; color: var(--green); font-weight: 700; padding: 5px; }
.module-preview-content { align-items: center; display: flex; flex-direction: column; margin: 65px auto; max-width: 620px; text-align: center; }
.module-preview-content h2 { font-size: 30px; margin-bottom: 8px; }
.module-preview-icon { background: var(--green-soft); border-radius: 18px; display: grid; height: 64px; margin-bottom: 18px; place-items: center; width: 64px; }
.module-preview-icon svg { fill: none; height: 32px; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; width: 32px; }
.module-status { background: #f7f9f8; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); margin-top: 22px; padding: 13px 16px; }
.production-view, .production-unit-view { min-height: 430px; padding: 20px; }
.production-view .panel-head { padding-left: 4px; padding-right: 4px; }
.production-unit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 8px 4px 4px; }
.production-unit-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); display: flex; gap: 15px; min-height: 126px; padding: 19px; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.production-unit-card:hover { border-color: #aebbb5; box-shadow: 0 9px 25px rgba(27, 53, 42, .09); transform: translateY(-1px); }
.production-unit-card-icon, .production-unit-mark { background: var(--green-soft); border-radius: 13px; display: grid; flex: 0 0 auto; height: 52px; place-items: center; width: 52px; }
.production-unit-card-icon svg, .production-unit-mark svg { fill: none; height: 28px; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 28px; }
.production-unit-card-copy { display: grid; flex: 1; gap: 5px; }
.production-unit-card-copy strong { font-size: 17px; }
.production-unit-card-copy small { color: var(--muted); line-height: 1.4; }
.production-unit-card-copy em { color: var(--green-dark); font-size: 11px; font-style: normal; font-weight: 750; margin-top: 4px; }
.unit-arrow { color: var(--green); font-size: 24px; }
.production-unit-head { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 18px; padding: 25px 6px 20px; }
.production-unit-mark { height: 60px; width: 60px; }
.production-unit-mark svg { height: 32px; width: 32px; }
.unit-system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px 4px 4px; }
.unit-system-grid[hidden], .production-products[hidden], .product-detail[hidden] { display: none !important; }
.unit-system-grid article { background: #fbfcfb; border: 1px solid var(--line); border-radius: 12px; min-height: 145px; padding: 19px; }
.unit-system-grid article > span { color: var(--green); display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.unit-system-grid h3 { margin: 9px 0 7px; }
.unit-system-grid p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.unit-system-grid strong { color: var(--green-dark); display: block; font-size: 24px; margin-top: 14px; }
.production-tabs { margin: 18px -20px 0; }
.production-tabs button span { background: var(--green-soft); border-radius: 99px; color: var(--green-dark); font-size: 11px; margin-left: 5px; padding: 3px 7px; }
.production-products { padding: 20px 4px 4px; }
.products-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 18px; }
.products-heading h3 { margin: 3px 0 0; }
.product-add-button { align-items: center; background: var(--green); border: 0; border-radius: 50%; box-shadow: 0 7px 18px rgba(25,107,74,.22); color: #fff; display: flex; font-size: 29px; font-weight: 400; height: 48px; justify-content: center; line-height: 1; width: 48px; }
.product-add-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.product-add-button[hidden] { display: none; }
.products-table { min-width: 600px; }
.table-sort { align-items: center; background: transparent; border: 0; color: inherit; cursor: pointer; display: inline-flex; font: inherit; gap: 6px; letter-spacing: inherit; min-height: 28px; padding: 0; text-transform: inherit; }
.table-sort:hover, .table-sort.active { color: var(--green-dark); }
.table-sort span { display: inline-block; font-size: 15px; min-width: 12px; }
.products-catalog-view { min-height: 430px; padding-top: 20px; }
.products-catalog-view > .back-main { margin-left: 20px; }
.products-catalog-head { align-items: flex-end; }
.catalog-controls { align-items: flex-end; display: flex; gap: 12px; }
.catalog-controls label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; min-width: 260px; }
.catalog-table { min-width: 760px; }
.production-group-badge { background: var(--green-soft); border-radius: 99px; color: var(--green-dark); display: inline-flex; font-size: 12px; font-weight: 750; padding: 7px 10px; }
.product-article { color: var(--green-dark); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.product-row { cursor: pointer; }
.product-row:hover td { background: #f5faf7; }
.product-detail { padding: 18px 4px 4px; }
.product-detail > .back-main { margin-bottom: 10px; }
.product-detail-heading { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 18px; }
.product-detail-heading h3 { font-size: 24px; margin: 3px 0 0; }
.product-details-form { background: #fbfcfb; border: 1px solid var(--line); border-radius: 13px; padding: 20px; }
.product-properties { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-properties label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.product-name-field { grid-column: span 3; }
.product-components { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.product-documents { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.product-document-form { align-items: end; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; grid-template-columns: minmax(280px, 1fr) auto; margin: 16px 0 18px; padding: 16px; }
.product-document-form label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.product-document-form .hint { grid-column: 1 / -1; margin: 0; }
.product-documents-table { min-width: 900px; }
.component-quantity { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.product-price-card { background: #f6faf8; border: 1px solid #cfe2d8; border-radius: 13px; display: grid; gap: 18px; grid-template-columns: minmax(220px, .8fr) minmax(340px, 1.2fr); margin-top: 18px; padding: 20px; }
.price-current span, .price-current small { color: var(--muted); display: block; font-size: 12px; }
.price-current strong { display: block; font-size: 27px; margin: 8px 0 5px; }
.price-editor-form { align-items: end; display: grid; gap: 12px; grid-template-columns: 1fr 1fr auto; }
.price-editor-form label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.price-history { border-top: 1px solid #dce9e2; grid-column: 1 / -1; padding-top: 15px; }
.price-history-row { align-items: center; display: flex; gap: 16px; justify-content: space-between; padding: 8px 0; }
.price-history-row + .price-history-row { border-top: 1px solid #e4ece8; }
.price-history-row span { color: var(--muted); }
.price-snapshot-note { background: #fff; border-radius: 8px; color: var(--green-dark); font-size: 12px; grid-column: 1 / -1; line-height: 1.5; margin: 0; padding: 11px 13px; }
.section-tabs { background: #f6f8f7; border-bottom: 1px solid var(--line); display: flex; gap: 5px; padding: 10px 18px; }
.section-tabs button { background: transparent; border: 0; border-radius: 8px; color: var(--muted); font-weight: 700; padding: 9px 14px; }
.section-tabs button:hover { color: var(--green); }
.section-tabs button.active { background: #fff; box-shadow: 0 1px 4px rgba(21,45,35,.08); color: var(--green-dark); }
.overview-panel { margin-top: 0; }
.compact-list { border-top: 1px solid var(--line); }
.compact-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 24px; border-bottom: 1px solid #edf0ee; }
.compact-row:last-child { border-bottom: 0; }
.compact-row button.link-button { text-align: left; }
.compact-row-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.link-button { border: 0; background: transparent; color: var(--ink); padding: 0; font-weight: 750; }
.link-button:hover { color: var(--green); text-decoration: underline; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-top: 18px; overflow: hidden; }
.panel-head { padding: 22px 24px 18px; }
.period-label { color: var(--muted); background: var(--canvas); border-radius: 7px; padding: 8px 10px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { color: #7b8681; background: #f8faf9; font-size: 12px; text-transform: uppercase; letter-spacing: .045em; text-align: left; padding: 11px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 16px 24px; border-bottom: 1px solid #edf0ee; font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.employee-row { cursor: pointer; }
.employee-row:hover td { background: #f5faf7; }
.person { display: flex; align-items: center; gap: 11px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 12px; }
.person small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.employee-number-cell { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.employee-group-row td { background: #eaf2ed; border-top: 2px solid #c7d9ce; color: var(--green-dark); padding: 10px 16px; }
.employee-group-row td strong { font-size: 13px; }
.employee-group-row td span { color: var(--muted); font-size: 12px; margin-left: 10px; }
.money { font-weight: 800; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; border: 0; border-radius: 99px; padding: 7px 10px; font-weight: 750; font-size: 12px; }
.badge.open, .badge.unpaid { background: var(--amber-soft); color: var(--amber); }
.badge.paid, .badge.closed { background: var(--green-soft); color: var(--green-dark); }
.badge.review { background: var(--red-soft); color: var(--red); }
.empty { color: var(--muted); text-align: center; padding: 34px; }
dialog { width: min(480px, calc(100% - 32px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 30px 80px rgba(12,32,23,.24); }
dialog::backdrop { background: rgba(11, 29, 21, .53); backdrop-filter: blur(2px); }
dialog form { padding: 25px; display: grid; gap: 16px; }
dialog label { display: grid; gap: 7px; color: #44514b; font-size: 13px; font-weight: 700; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 27px; }
.hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.dialog-actions { justify-content: flex-end; }
.history-head { align-items: end; }
.filters, .details-period { display: flex; align-items: end; gap: 10px; }
.filters label, .details-period label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.history-summary { display: flex; gap: 18px; padding: 0 24px 18px; color: var(--muted); font-size: 13px; }
.history-summary strong { color: var(--ink); font-size: 16px; margin-left: 4px; }
.payment-cell { min-width: 155px; }
.payment-cell small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.danger-link { border: 0; background: transparent; color: #b42318; cursor: pointer; font: inherit; font-weight: 700; padding: 6px 8px; }
.danger-link:hover { color: #7a271a; text-decoration: underline; }
.danger-button { border: 1px solid #f04438; border-radius: 10px; background: #fff; color: #b42318; cursor: pointer; font: inherit; font-weight: 800; padding: 10px 14px; white-space: nowrap; }
.danger-button:hover { background: #fff1f0; }
.employee-delete-zone { align-items: center; background: #fff8f7; border: 1px solid #fecdca; border-radius: 12px; display: flex; gap: 18px; justify-content: space-between; margin-top: 22px; padding: 16px; }
.employee-delete-zone p { margin: 5px 0 0; }
.employee-card-tabs { margin: 18px -25px 0; }
.section-tabs button.danger-tab { color: var(--red); }
.section-tabs button.danger-tab.active { color: #b42318; }
.employee-purge-zone { background: #fff8f7; border: 1px solid #fda29b; border-radius: 12px; margin-top: 22px; padding: 22px; }
.employee-purge-zone[hidden] { display: none !important; }
.employee-purge-zone h3 { color: #b42318; font-size: 22px; margin: 4px 0 12px; }
.employee-purge-zone > p { line-height: 1.55; }
.employee-documents-tab { margin-top: 18px; }
.employee-documents-tab[hidden] { display: none !important; }
.employee-documents-head h3 { margin: 4px 0 6px; }
.employee-document-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 12px; margin: 16px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.employee-document-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.employee-document-form .hint { grid-column: 1 / -1; margin: 0; }
.employee-documents-table table { min-width: 720px; }
.employee-document-name { display: flex; align-items: center; gap: 9px; }
.employee-document-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 7px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 800; }
.employee-document-actions { display: flex; gap: 10px; align-items: center; }
.purge-confirm-form { display: grid; gap: 14px; margin-top: 20px; max-width: 580px; }
.purge-confirm-form label { color: var(--muted); display: grid; font-size: 13px; gap: 7px; }
.purge-confirm-form .destructive-check { align-items: center; display: flex; }
.destructive-check input { min-height: auto; }
.purge-confirm-form button { justify-self: start; }
.purge-confirm-form button:disabled { cursor: not-allowed; opacity: .45; }
.archive-block { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.archive-heading { align-items: end; display: flex; gap: 20px; justify-content: space-between; padding: 0 18px 12px; }
.archive-heading h3 { margin: 3px 0 0; }
.admin-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 18px 18px; }
.admin-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.admin-card h3 { margin: 3px 0 14px; }
.admin-form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.admin-form label { display: grid; gap: 6px; }
.admin-wide { grid-column: 1 / -1; }
.admin-form button { align-self: end; }
.password-form { margin-top: 18px; }
.owner-lock-card { background: var(--green-soft); border-color: #b8d8c8; }
[data-owner-only][hidden] { display: none !important; }
.audit-card { margin: 0 18px 18px; }
.audit-card-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.audit-card-head h3 { margin-bottom: 14px; }
.destructive-check { align-items: flex-start; background: #fff8f7; border: 1px solid #fecdca; border-radius: 12px; color: #7a271a; display: flex !important; font-weight: 700; gap: 10px; padding: 14px; }
.destructive-check input { flex: 0 0 auto; margin: 2px 0 0; min-height: 0; width: auto; }
.danger-button:disabled { cursor: not-allowed; opacity: .48; }
.auth-dialog { max-width: 480px; width: calc(100% - 28px); }
.auth-dialog form { display: grid; gap: 16px; }
.auth-dialog::backdrop { background: rgba(10, 25, 19, .72); backdrop-filter: blur(4px); }
.schedule-head { align-items: flex-end; gap: 24px; }
.schedule-form { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(120px, .7fr)) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin: 0 24px 18px; padding: 18px; border-radius: 10px; background: var(--green-soft); }
.schedule-form label { margin: 0; }
.schedule-hint { grid-column: 1 / -1; margin: 0; }
.table-note { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.badge.planned { background: #eef4ff; color: #3538cd; }
.badge.worked { background: #ecfdf3; color: #027a48; }
.badge.in_progress { background: #fffaeb; color: #b54708; }
.badge.missed { background: #fef3f2; color: #b42318; }
.badge.worked_unplanned { background: #f4f3ff; color: #5925dc; }
.badge.off { background: #f2f4f7; color: #667085; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 24px 16px; color: var(--muted); font-size: 12px; }
.schedule-legend span { display: inline-flex; align-items: center; gap: 6px; }
.schedule-legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend-day { background: #fdb022; } .legend-night { background: #3538cd; } .legend-worked { background: #12b76a; } .legend-missed { background: #f04438; }
.schedule-table-frame { margin: 0 24px 24px; border: 1px solid #cfd6d2; border-radius: 8px; background: #fff; max-height: 68vh; }
.monthly-schedule-table { min-width: 1180px; border-collapse: separate; border-spacing: 0; background: #fff; }
.monthly-schedule-table th, .monthly-schedule-table td { border-right: 1px solid #dfe4e1; border-bottom: 1px solid #dfe4e1; padding: 10px 12px; vertical-align: middle; }
.monthly-schedule-table th:last-child, .monthly-schedule-table td:last-child { border-right: 0; }
.monthly-schedule-table tbody tr:last-child td { border-bottom: 0; }
.monthly-schedule-table thead th { position: sticky; top: 0; z-index: 2; background: #edf2ef; color: #34453d; font-size: 11px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.monthly-schedule-table th:nth-child(1) { width: 135px; }
.monthly-schedule-table th:nth-child(2) { width: 130px; }
.monthly-schedule-table th:nth-child(3) { width: 220px; }
.monthly-schedule-table th:nth-child(4) { width: 250px; }
.monthly-schedule-table th:nth-child(5) { width: 125px; }
.monthly-schedule-table th:nth-child(6) { width: 150px; }
.monthly-schedule-table th:nth-child(7) { width: 200px; }
.schedule-day-row td { height: 62px; background: #fff; }
.schedule-day-row:hover td { background: #f7faf8; }
.schedule-day-row.weekend td { background: #f5f7f9; }
.schedule-day-row.weekend:hover td { background: #eef2f4; }
.schedule-date-cell strong { white-space: nowrap; }
.schedule-weekday-cell { color: var(--muted); }
.schedule-plan-cell, .schedule-fact-cell { line-height: 1.35; }
.schedule-worked-cell { white-space: nowrap; text-align: center; }
.schedule-status-cell { white-space: nowrap; }
.shift-kind { display: inline-flex; margin-right: 9px; border-radius: 99px; padding: 5px 9px; color: white; font-size: 11px; font-weight: 800; }
.shift-kind.day { background: #b54708; } .shift-kind.night { background: #3538cd; }
.schedule-actions { display: flex; align-items: center; gap: 7px; min-width: 190px; }
.secondary.compact { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.muted { color: var(--muted); }
.schedule-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.schedule-dialog-actions { flex-wrap: wrap; }
@media (max-width: 1100px) { .schedule-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }
.details-dialog { width: min(1000px, calc(100% - 32px)); }
.details-shell { padding: 25px; }
.details-meta { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.rate-editor { display: flex; align-items: end; gap: 10px; margin: 18px 0; padding: 14px; background: var(--canvas); border-radius: 9px; }
.rate-editor label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.rate-editor .employee-name-field { flex: 1 1 320px; }
.personal-card { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.personal-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.personal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.personal-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.personal-wide { grid-column: 1 / -1; }
.personal-fields textarea { resize: vertical; }
.rate-history-panel { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.rate-history-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.rate-history-list { display: grid; gap: 8px; margin-top: 10px; }
.rate-history-list[hidden] { display: none; }
.rate-history-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 11px; background: var(--canvas); border-radius: 7px; }
.rate-history-row > div { display: flex; align-items: center; gap: 12px; }
.rate-history-row span { color: var(--muted); }
.details-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.details-total { padding: 14px; border-radius: 9px; background: var(--canvas); }
.details-total span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.details-total strong { font-size: 19px; }
.details-period { margin-bottom: 18px; }
.details-dialog table { min-width: 720px; }
.payment-note { margin: 0 24px 20px; padding: 13px 15px; border-radius: 8px; background: var(--green-soft); color: var(--green-dark); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(20px); opacity: 0; pointer-events: none; color: #fff; background: #17231e; border-radius: 8px; padding: 12px 16px; box-shadow: var(--shadow); transition: .2s ease; z-index: 4; font-size: 14px; }
.toast.show { transform: none; opacity: 1; }
.work-time-table { min-width: 1480px; }
.actual-time-cell strong { display: block; }
.actual-time-cell small { color: var(--muted); display: block; font-size: 10px; margin-top: 3px; }
.actual-time-cell.manual { background: #fff8e7; box-shadow: inset 3px 0 #f79009; }
.deviation { border-radius: 99px; display: inline-block; font-weight: 800; min-width: 58px; padding: 5px 8px; text-align: center; }
.deviation.neutral { background: #f2f4f7; color: #667085; }
.deviation.negative { background: #fef3f2; color: #b42318; }
.deviation.positive { background: #ecfdf3; color: #027a48; }
.shift-comment { max-width: 230px; min-width: 160px; white-space: normal; }
.shift-actions { align-items: center; display: flex; gap: 5px; min-width: 145px; }
.actual-time-dialog { width: min(780px, calc(100% - 28px)); }
.actual-time-dialog form { display: grid; gap: 18px; }
.actual-time-dialog::backdrop { background: rgba(10, 25, 19, .72); backdrop-filter: blur(4px); }
.actual-time-comparison { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.actual-time-comparison > div { background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.actual-time-comparison span, .actual-time-comparison small { color: var(--muted); display: block; font-size: 12px; }
.actual-time-comparison > div > strong { display: block; font-size: 28px; margin: 9px 0 5px; }
.actual-time-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 9px; }
.actual-time-inputs label, .actual-comment { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.actual-comment textarea { resize: vertical; }
.adjustment-history { border-top: 1px solid var(--line); padding-top: 15px; }
.adjustment-history-row { align-items: start; border-bottom: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; padding: 10px 0; }
.adjustment-history-row div span { color: var(--muted); display: block; font-size: 12px; margin-top: 3px; }
.adjustment-history-row small { color: var(--muted); text-align: right; }
.piecework-tabs { margin-bottom: 18px; }
#pieceworkOperationsPanel[hidden], #pieceworkSitesPanel[hidden], .initial-rate-field[hidden] { display: none !important; }
.piecework-filters { align-items: end; background: var(--canvas); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto auto; padding: 15px 24px; }
.piecework-filters label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 5px; }
.piecework-filters .filter-check { align-items: center; display: flex; min-height: 42px; white-space: nowrap; }
.piecework-filters .filter-check input { min-height: auto; width: auto; }
.piecework-table { min-width: 1450px; }
.piecework-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; min-width: 260px; }
.archived-row td { background: #f8f8f8; color: var(--muted); }
.wide-dialog { width: min(900px, calc(100% - 28px)); }
.piecework-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.piecework-form-grid label, #manufacturingSiteForm > label, #pieceworkRateForm > label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.piecework-wide { grid-column: 1 / -1; }
.operation-batch-selector { background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.operation-selector-head { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(300px, 1fr) auto; }
.operation-selector-head label { margin: 0; }
.operation-selector-head select { min-height: 190px; }
.operation-batch-selector .hint { margin: 9px 0 0; }
.operation-batch-rows { display: grid; gap: 14px; }
.operation-batch-row { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.operation-batch-head { align-items: center; background: var(--green-soft); display: flex; justify-content: space-between; padding: 11px 14px; }
.operation-batch-head span { color: var(--muted); display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.operation-batch-head strong { display: block; margin-top: 2px; }
.operation-parameter-grid { display: grid; gap: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px; }
.operation-parameter-grid label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 5px; }
.operation-row-wide { grid-column: span 3; }
.output-filters { align-items: end; background: var(--canvas); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(145px, 1fr)) auto; padding: 15px 24px; }
.output-filters label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 5px; }
.output-table { min-width: 1480px; }
.output-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.output-form-grid label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.output-wide { grid-column: 1 / -1; }
.output-calculation { background: var(--green-soft); border: 1px solid #c9ddd2; border-radius: 9px; padding: 13px 15px; }
.output-calculation span { color: var(--muted); display: block; font-size: 12px; margin-bottom: 5px; }
.output-calculation strong { color: var(--green-dark); font-size: 21px; }
.badge.output-draft { background: #f2f4f7; color: #475467; }
.badge.output-pending { background: #fffaeb; color: #b54708; }
.badge.output-confirmed { background: #ecfdf3; color: #027a48; }
.badge.output-rejected { background: #fef3f2; color: #b42318; }
.badge.output-correction_requested { background: #eef4ff; color: #3538cd; }
.erp-empty-page { min-height: 55vh; }
.products-v2-page { min-height: 520px; }
.products-v2-heading { margin-bottom: 22px; }
.products-v2-direction-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.products-v2-direction-card, .products-v2-control-card { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); display: flex; gap: 16px; min-height: 132px; padding: 21px; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; width: 100%; }
.products-v2-direction-card:hover, .products-v2-control-card:hover, .products-v2-section-row:hover, .products-v2-product-row:hover { border-color: #aebbb5; box-shadow: 0 9px 25px rgba(27, 53, 42, .08); transform: translateY(-1px); }
.products-v2-direction-card > span:nth-child(2), .products-v2-control-card > span:nth-child(2) { display: grid; flex: 1; gap: 5px; }
.products-v2-direction-card strong, .products-v2-control-card strong { font-size: 17px; }
.products-v2-direction-card small, .products-v2-control-card small { color: var(--muted); }
.products-v2-direction-card b, .products-v2-control-card b, .products-v2-section-row b, .products-v2-product-row > b { color: var(--green); font-size: 23px; font-weight: 500; }
.products-v2-icon, .products-v2-small-icon { align-items: center; background: var(--green-soft); border-radius: 13px; display: flex; flex: 0 0 auto; height: 54px; justify-content: center; width: 54px; }
.products-v2-icon svg, .products-v2-small-icon svg { fill: none; height: 29px; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 29px; }
.products-v2-small-icon { border-radius: 10px; height: 42px; width: 42px; }
.products-v2-small-icon svg { height: 22px; width: 22px; }
.products-v2-breadcrumbs { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 24px; overflow: visible; padding: 0; }
.products-v2-breadcrumbs button { background: transparent; border: 0; color: var(--green); font-size: 13px; padding: 2px 0; }
.products-v2-breadcrumbs button[aria-current="page"] { color: var(--muted); cursor: default; }
.products-v2-breadcrumbs span { color: #98a39e; }
.products-v2-direction-head, .products-v2-product-head, .products-v2-product-context { align-items: center; display: flex; gap: 16px; }
.products-v2-control-grid { max-width: 680px; padding-top: 24px; }
.products-v2-catalog-head { align-items: end; display: flex; gap: 20px; justify-content: space-between; }
.products-v2-catalog-actions { align-items: end; display: flex; gap: 10px; }
.products-v2-archive-filter { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: 7px; min-height: 42px; white-space: nowrap; }
.products-v2-archive-filter input { min-height: auto; }
.products-v2-search { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; min-width: min(360px, 100%); }
.products-v2-count { color: var(--muted); font-size: 13px; margin: 18px 0 10px; }
.products-v2-list, .products-v2-section-list { display: grid; gap: 9px; }
.products-v2-product-row, .products-v2-section-row { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; color: var(--ink); display: flex; gap: 14px; min-height: 76px; padding: 12px 15px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; width: 100%; }
.products-v2-product-row { cursor: pointer; }
.products-v2-product-row.archived { background: #f3f5f4; opacity: .82; }
.products-v2-row-actions { align-items: center; display: flex; gap: 8px; }
.products-v2-row-actions > small { color: var(--muted); font-size: 11px; font-weight: 700; }
.products-v2-product-row:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.products-v2-product-copy { display: grid; flex: 1; gap: 4px; }
.products-v2-product-copy small, .products-v2-product-context small { color: var(--muted); display: block; font-size: 13px; margin-top: 3px; }
.products-v2-status { color: var(--muted); display: grid; font-size: 11px; font-weight: 700; gap: 3px; min-width: 165px; }
.products-v2-status select { min-height: 38px; padding-bottom: 7px; padding-top: 7px; }
.products-v2-not-found { background: var(--surface); border: 1px dashed #c9d2cd; border-radius: 11px; color: var(--muted); padding: 34px 18px; text-align: center; }
.products-v2-product-head { border-bottom: 1px solid var(--line); margin-bottom: 18px; padding-bottom: 22px; }
.products-v2-section-row { cursor: pointer; text-align: left; }
.products-v2-section-row strong { flex: 1; }
.products-v2-product-context { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 24px; padding: 13px 15px; }
.products-v2-product-context + h2 { margin-top: 0; }
.erp-product-price-panel { margin-top: 20px; max-width: 820px; }
.erp-product-info-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 20px; max-width: 820px; padding: 18px; }
.erp-product-info-panel h3 { margin: 0 0 15px; }
.erp-product-info-form { display: grid; gap: 15px; }
.erp-product-info-form > label, .erp-product-info-form fieldset label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.erp-product-info-form fieldset { border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 14px; }
.erp-product-info-form legend { color: var(--green-dark); font-size: 13px; font-weight: 750; padding: 0 6px; }
.erp-product-info-form > button { justify-self: start; }
.erp-product-current-price { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 5px; margin-bottom: 16px; padding: 18px; }
.erp-product-current-price span, .erp-product-current-price small { color: var(--muted); }
.erp-product-current-price strong { font-size: 25px; }
#productComponentDialog { width: min(620px, calc(100% - 32px)); }
.bom-summary-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 9px; }
.bom-summary-grid article { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 3px 10px; grid-template-columns: auto auto 1fr; padding: 8px 11px; }
.bom-summary-grid span, .bom-summary-grid small { color: var(--muted); }
.bom-summary-grid span { font-size: 12px; font-weight: 700; }
.bom-summary-grid strong { color: var(--green-dark); font-size: 21px; line-height: 1; }
.bom-summary-grid small { font-size: 11px; }
.bom-tabs { border-bottom: 1px solid var(--line); margin: 9px 0 0; }
.bom-tabs button { background: transparent; border: 0; border-bottom: 2px solid var(--green); border-radius: 0; color: var(--green-dark); font-size: 13px; font-weight: 750; padding: 6px 10px; }
.bom-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 9px 9px; padding: 8px; }
.bom-toolbar { align-items: end; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 7px; }
.bom-search { color: var(--muted); display: grid; flex: 1; font-size: 11px; font-weight: 700; gap: 3px; max-width: 340px; }
.bom-search input { min-height: 32px; padding: 5px 8px; }
.bom-toolbar-actions { align-items: center; display: flex; gap: 6px; }
.bom-toolbar-actions > span { color: var(--muted); font-size: 11px; margin-right: 3px; white-space: nowrap; }
.bom-toolbar .primary.compact { font-size: 12px; min-height: 34px; padding: 6px 10px; }
.bom-table-window { background: #fff; border: 1px solid var(--line); border-radius: 7px; height: 400px; overflow: auto; overscroll-behavior: contain; }
.bom-table { min-width: 620px; width: 100%; }
.bom-table th { font-size: 11px; padding: 5px 9px; }
.bom-table thead th { position: sticky; top: 0; z-index: 2; }
.bom-table th:nth-child(1) { width: 66%; }
.bom-table th:nth-child(2) { width: 20%; }
.bom-table th:nth-child(3) { text-align: center; width: 14%; }
.bom-table td { font-size: 13px; padding: 5px 9px; vertical-align: middle; }
.bom-table td:nth-child(2) span { color: var(--muted); display: inline; font-size: 11px; margin-left: 3px; }
.bom-table td:nth-child(3) { text-align: center; }
.bom-assembly-row { background: #f5f9f7; }
.bom-position-cell { align-items: flex-start; display: flex; gap: 5px; padding-left: calc(var(--bom-depth) * 18px); }
.bom-position-cell > div { display: grid; gap: 0; line-height: 1.12; }
.bom-position-cell strong { color: var(--green-dark); font-size: 12px; }
.bom-position-cell span { font-size: 13px; font-weight: 650; }
.bom-position-cell small { color: var(--muted); font-size: 10.5px; }
.bom-tree-toggle, .bom-type-icon, .bom-edit-button { align-items: center; display: inline-flex; flex: 0 0 auto; height: 20px; justify-content: center; width: 20px; }
.bom-tree-toggle, .bom-edit-button { background: transparent; border: 1px solid #ccd8d2; color: var(--green); padding: 0; }
.bom-tree-toggle { font-size: 17px; line-height: 1; transform: rotate(0deg); transition: transform .15s ease; }
.bom-tree-toggle.expanded { transform: rotate(90deg); }
.bom-type-icon { color: #809088; font-size: 12px; }
.bom-edit-button { font-size: 14px; }
.bom-edit-button:hover, .bom-tree-toggle:hover { background: var(--green-soft); border-color: #aabdb3; }
.bom-table-window .empty { height: 340px; text-align: center; vertical-align: middle; }
.technology-selector-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 14px; max-width: 820px; padding: 15px; }
.technology-selector-panel label { color: var(--muted); display: grid; font-size: 12px; font-weight: 750; gap: 6px; max-width: 520px; }
.technology-selector-panel .hint { margin: 8px 0 0; }
.technology-global-panel, .technology-sites-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; padding: 14px; }
.technology-global-panel > div:first-child .hint { margin: 5px 0 0; }
.technology-details-head { align-items: start; display: flex; gap: 14px; justify-content: space-between; }
.technology-details-head h3 { margin: 0 0 3px; }
.technology-details-head .hint { margin: 0; }
.technology-sites-compact { align-items: center; display: grid; gap: 10px; grid-template-columns: auto minmax(260px, 520px) auto; max-width: 940px; padding: 9px 10px; }
.technology-sites-compact h3 { font-size: 14px; margin: 0; white-space: nowrap; }
.technology-sites-control { align-items: center; display: grid; gap: 7px; grid-template-columns: minmax(190px, 1fr) auto; }
.technology-sites-control select { min-height: 34px; padding: 5px 8px; }
.technology-site-actions { align-items: center; display: flex; gap: 7px; white-space: nowrap; }
.technology-site-add { justify-self: end; white-space: nowrap; }
.technology-master-detail { align-items: start; display: grid; gap: 12px; grid-template-columns: minmax(290px, .72fr) minmax(0, 1.7fr); }
.technology-details-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.technology-details-window { display: grid; gap: 6px; height: 400px; margin-top: 10px; overflow: auto; overscroll-behavior: contain; padding-right: 3px; }
.technology-detail-row { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--text); display: flex; gap: 10px; justify-content: space-between; min-height: 58px; padding: 8px 9px; text-align: left; width: 100%; }
.technology-detail-row:hover, .technology-detail-row.active { background: var(--green-soft); border-color: #abc2b5; }
.technology-detail-row > span { display: grid; gap: 2px; min-width: 0; }
.technology-detail-row > span:first-child { flex: 1; }
.technology-detail-row > span:last-child { flex: 0 0 auto; text-align: right; }
.technology-detail-row strong, .technology-detail-row b { overflow-wrap: anywhere; }
.technology-detail-row small { color: var(--muted); font-size: 10.5px; }
.technology-detail-row b { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.technology-detail-row > span:last-child strong { color: var(--green-dark); font-size: 14px; }
.technology-grand-total { background: var(--green-soft); border: 1px solid #bdd1c6; border-radius: 9px; display: grid; gap: 3px; margin-top: 10px; padding: 10px 11px; }
.technology-grand-total span { color: var(--muted); font-size: 11px; }
.technology-grand-total strong { color: var(--green-dark); font-size: 20px; }
.technology-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 11px; padding: 42px 18px; }
.technology-operations-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.technology-operations-head { align-items: start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 10px; }
.technology-operations-head h3 { margin: 0 0 3px; }
.technology-operations-head .hint { margin: 0; }
.technology-table-window { background: #fff; border: 1px solid var(--line); border-radius: 8px; height: 400px; overflow: auto; overscroll-behavior: contain; }
.technology-table { min-width: 880px; width: 100%; }
.technology-table thead th { position: sticky; top: 0; z-index: 2; }
.technology-table th, .technology-table td { font-size: 13px; padding: 8px 9px; vertical-align: middle; }
.technology-table th:first-child, .technology-table td:first-child { text-align: center; width: 44px; }
.technology-table th:nth-child(2) { width: 30%; }
.technology-table th:nth-child(3), .technology-table th:nth-child(4), .technology-table th:nth-child(5) { width: 15%; }
.technology-table td small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.technology-table .empty { height: 330px; text-align: center; vertical-align: middle; }
.technology-completion { align-items: center; display: flex; gap: 14px; justify-content: flex-end; margin-top: 10px; }
.technology-total { background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 1px; margin-right: auto; min-width: 300px; padding: 9px 12px; }
.technology-total.ready { background: var(--green-soft); border-color: #bdd1c6; }
.technology-total span, .technology-total small { color: var(--muted); font-size: 11px; }
.technology-total strong { color: var(--green-dark); font-size: 19px; }
.technology-settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.technology-setting-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
.technology-setting-current { display: grid; gap: 3px; }
.technology-setting-current span, .technology-setting-current small { color: var(--muted); }
.technology-setting-current span { font-size: 12px; font-weight: 750; }
.technology-setting-current strong { color: var(--green-dark); font-size: 23px; }
.technology-setting-form { align-items: end; display: grid; gap: 8px; grid-template-columns: minmax(120px, .8fr) minmax(145px, .8fr) minmax(150px, 1.2fr) auto; margin-top: 12px; }
.technology-setting-form label { color: var(--muted); display: grid; font-size: 11px; font-weight: 700; gap: 4px; }
.technology-setting-form input { min-height: 36px; padding: 6px 8px; }
.technology-setting-card .rate-history-panel { margin-top: 12px; }
.technology-setting-card .rate-history-head { align-items: center; display: flex; justify-content: space-between; }
.technology-operation-name-control { align-items: end; display: grid; gap: 10px; grid-template-columns: minmax(260px, 1fr) auto; }
.technology-operation-name-control label { margin: 0; }
@media (max-width: 1000px) { .output-filters { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }
@media (max-width: 920px) {
  .admin-grid { grid-template-columns: 1fr; }
  .module-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { position: static; width: auto; height: auto; padding: 16px 18px; }
  .brand { padding: 0 0 14px; }
  nav { display: flex; gap: 6px; margin: 0 -4px; overflow-x: auto; padding: 0 4px 7px; }
  .nav-item { flex: 0 0 auto; white-space: nowrap; }
  .device { display: none; }
  main { margin: 0; padding: 25px 18px 50px; }
  header { align-items: flex-start; }
  .header-actions { align-items: stretch; flex-direction: column; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .history-head, .filters { align-items: stretch; flex-direction: column; }
  .production-unit-grid, .unit-system-grid { grid-template-columns: 1fr; }
  .product-properties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-name-field { grid-column: span 1; }
  .product-price-card { grid-template-columns: 1fr; }
  .price-editor-form { grid-template-columns: 1fr 1fr; }
  .products-catalog-head { align-items: stretch; }
  .products-v2-catalog-head { align-items: stretch; flex-direction: column; }
  .products-v2-catalog-actions { align-items: stretch; flex-direction: column; }
  .technology-master-detail { grid-template-columns: 1fr; }
  .technology-details-window { height: 300px; }
}
@media (max-width: 570px) {
  .module-hub { grid-template-columns: 1fr; }
  .module-card { min-height: 78px; }
  header { display: grid; }
  .header-actions { display: grid; grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .details-totals { grid-template-columns: 1fr; }
  .technology-settings-grid { grid-template-columns: 1fr; }
  .technology-sites-compact, .technology-sites-control { grid-template-columns: 1fr; }
  .technology-site-add { justify-self: stretch; }
  .technology-setting-form { grid-template-columns: 1fr; }
  .details-period { align-items: stretch; flex-direction: column; }
  .personal-fields { grid-template-columns: 1fr; }
  .personal-wide { grid-column: auto; }
  .personal-card-head { align-items: stretch; flex-direction: column; }
  .product-properties, .component-quantity { grid-template-columns: 1fr; }
  .price-editor-form { grid-template-columns: 1fr; }
  .catalog-controls { align-items: stretch; flex-direction: column; width: 100%; }
  .catalog-controls label { min-width: 0; }
  .product-document-form { grid-template-columns: 1fr; }
  .product-document-form .hint { grid-column: auto; }
  .output-filters, .output-form-grid { grid-template-columns: 1fr; }
  .output-wide { grid-column: auto; }
  .operation-selector-head, .operation-parameter-grid { grid-template-columns: 1fr; }
  .products-v2-direction-grid { grid-template-columns: 1fr; }
  .products-v2-direction-card, .products-v2-control-card { min-height: 106px; padding: 16px; }
  .products-v2-product-row { align-items: flex-start; flex-wrap: wrap; }
  .erp-product-info-form fieldset { grid-template-columns: 1fr; }
  .bom-summary-grid { grid-template-columns: 1fr; }
  .bom-toolbar { align-items: stretch; flex-direction: column; }
  .bom-search { max-width: none; }
  .bom-toolbar-actions { flex-wrap: wrap; }
  .technology-operations-head, .technology-completion { align-items: stretch; flex-direction: column; }
  .technology-total { min-width: 0; width: 100%; }
  .technology-settings-grid { grid-template-columns: 1fr; }
  .technology-setting-form { grid-template-columns: 1fr; }
  .technology-operation-name-control { align-items: stretch; grid-template-columns: 1fr; }
  .products-v2-product-copy { min-width: calc(100% - 82px); }
  .products-v2-status { margin-left: 56px; min-width: calc(100% - 86px); }
  .operation-row-wide { grid-column: auto; }
}

/* Compact phone and tablet layout. Desktop tables keep their original form. */
@media (max-width: 920px) {
  body { font-size: 15px; overflow-x: hidden; }
  .sidebar { padding: 12px 14px; }
  .brand { padding-bottom: 10px; }
  .brand small { display: none; }
  nav { gap: 5px; }
  .nav-item { min-height: 40px; padding: 9px 11px; }
  main { max-width: 100%; overflow: hidden; padding: 18px 12px 36px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  header, .schedule-head, .archive-heading, .products-heading,
  .product-detail-heading, .production-unit-head, .technology-details-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .panel { border-radius: 10px; margin-top: 12px; }
  .panel-head { padding: 16px 14px 13px; }
  .metric { padding: 15px; }
  .metric strong { font-size: 23px; }
  .module-hub { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
  .module-card { min-height: 82px; }
  .module-card span { font-size: 12px; }
  .production-view, .production-unit-view, .module-preview { padding: 14px; }
  .production-tabs { margin-left: -14px; margin-right: -14px; }
  .section-tabs { gap: 4px; overflow-x: auto; padding: 8px 12px; scrollbar-width: thin; }
  .section-tabs button { flex: 0 0 auto; padding: 8px 11px; white-space: nowrap; }
  .products-v2-breadcrumbs { margin: 10px 0 16px; }
  .products-v2-product-head, .products-v2-product-context,
  .products-v2-direction-head { align-items: flex-start; }
  .products-v2-product-row { gap: 10px; padding: 11px; }
  .products-v2-small-icon { height: 38px; width: 38px; }
  .products-v2-product-copy { min-width: calc(100% - 54px); }
  .products-v2-status { margin-left: 0; min-width: 100%; width: 100%; }
  .products-v2-row-actions { flex-wrap: wrap; width: 100%; }

  .schedule-form, .admin-form, .piecework-filters, .rate-editor,
  .employee-document-form, .actual-time-comparison, .actual-time-inputs {
    display: grid;
    grid-template-columns: 1fr;
  }
  .schedule-form, .piecework-filters { margin: 0 12px 14px; padding: 14px; }
  .schedule-form button, .piecework-filters button, .filters button,
  .details-period button, .rate-editor button { width: 100%; }
  .filters, .details-period, .rate-editor { align-items: stretch; flex-direction: column; }
  .history-summary, .schedule-legend { gap: 9px 14px; padding: 0 14px 14px; }
  .history-summary { flex-wrap: wrap; }
  .schedule-table-frame { border: 0; margin: 0 12px 16px; max-height: none; }
  .payment-note { margin: 0 14px 16px; }
  .admin-grid { padding: 0 12px 12px; }
  .admin-card { padding: 14px; }
  .audit-card { margin: 0 12px 12px; }
  .audit-card-head { align-items: stretch; flex-direction: column; }
  .audit-card-head .danger-button { width: 100%; }
  .employee-delete-zone, .personal-card-head, .rate-history-row,
  .adjustment-history-row { align-items: stretch; flex-direction: column; }
  .employee-delete-zone button { width: 100%; }
  .details-shell { padding: 16px; }
  .details-dialog { width: calc(100% - 14px); }
  dialog { max-height: calc(100dvh - 14px); overflow-y: auto; width: calc(100% - 14px); }
  dialog form { padding: 16px; }
  .dialog-head { gap: 10px; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .toast { bottom: 12px; left: 12px; right: 12px; text-align: center; }

  .table-wrap, .bom-table-window, .technology-table-window {
    height: auto;
    max-width: 100%;
    overflow: visible;
  }
  .table-wrap table, table, .products-table, .catalog-table,
  .product-documents-table, .monthly-schedule-table, .work-time-table,
  .piecework-table, .output-table, .bom-table, .technology-table,
  .details-dialog table, .employee-documents-table table {
    border-collapse: separate;
    display: block;
    min-width: 0;
    width: 100%;
  }
  table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  table tbody { display: grid; gap: 10px; width: 100%; }
  table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(29, 54, 43, .045);
    display: block;
    overflow: hidden;
    width: 100%;
  }
  table tbody td {
    align-items: start;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf0ee;
    display: grid;
    font-size: 13px;
    gap: 10px;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    min-height: 38px;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 9px 11px;
    text-align: left;
    white-space: normal;
    width: 100%;
  }
  table tbody td:last-child { border-bottom: 0; }
  table tbody td::before {
    color: #76827c;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.35;
    text-transform: uppercase;
  }
  table tbody td[data-label=""]::before { display: none; }
  table tbody td[data-label=""] { display: block; }
  table tbody tr:hover td, .product-row:hover td,
  .schedule-day-row:hover td, .schedule-day-row.weekend td,
  .schedule-day-row.weekend:hover td, .archived-row td { background: transparent; }
  .employee-group-row { background: #eaf2ed; }
  .employee-group-row td { display: block; padding: 11px; }
  .employee-group-row td::before { display: none; }
  .empty { display: block !important; padding: 24px 14px !important; text-align: center !important; }
  .empty::before { display: none; }
  .person, .employee-document-name { min-width: 0; }
  .payment-cell, .schedule-actions, .piecework-actions, .shift-actions,
  .shift-comment { max-width: none; min-width: 0; }
  .schedule-actions, .piecework-actions, .shift-actions,
  .employee-document-actions { flex-wrap: wrap; }
  .schedule-worked-cell, .schedule-status-cell,
  .technology-table th:first-child, .technology-table td:first-child,
  .bom-table td:nth-child(3) { text-align: left; }
  .bom-position-cell { padding-left: calc(11px + var(--bom-depth) * 10px); }
  .technology-details-window { height: 260px; }
  .technology-completion { align-items: stretch; flex-direction: column; }
}

@media (max-width: 390px) {
  .module-hub { grid-template-columns: 1fr; }
  table tbody td { grid-template-columns: minmax(84px, 35%) minmax(0, 1fr); padding: 8px 10px; }
}

/* Production output — specification 004 */
.output-page { min-height: 520px; }
.output-page-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 18px; }
.output-page-heading h2 { font-size: 28px; }
.output-metrics { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.output-metrics article { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; }
.output-metrics span { color: var(--muted); display: block; font-size: 12px; font-weight: 700; }
.output-metrics strong { color: var(--green-dark); display: block; font-size: 27px; margin-top: 7px; }
.output-workspace { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.output-tabs { background: #f6f8f7; border-bottom: 1px solid var(--line); display: flex; gap: 5px; padding: 10px 14px; }
.output-tabs button { background: transparent; border: 0; border-radius: 8px; color: var(--muted); font-weight: 750; padding: 9px 13px; }
.output-tabs button.active { background: #fff; box-shadow: 0 1px 5px rgba(21,45,35,.09); color: var(--green-dark); }
.output-tabs button span { background: var(--amber-soft); border-radius: 99px; color: var(--amber); font-size: 11px; margin-left: 5px; padding: 3px 7px; }
.output-card-filters { align-items: end; background: var(--canvas); border-bottom: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: minmax(150px, .55fr) minmax(250px, 1.4fr) minmax(170px, .65fr) auto auto; padding: 14px 16px; }
.output-card-filters label { color: var(--muted); display: grid; font-size: 11px; font-weight: 750; gap: 5px; }
.output-card-list { display: grid; gap: 10px; padding: 14px; }
.output-product-window { background: #fff; border: 1px solid #cfd8d3; border-radius: 12px; box-shadow: 0 5px 18px rgba(27,53,42,.06); overflow: hidden; }
.output-product-head { align-items: center; background: var(--green-soft); border-bottom: 1px solid #c9ddd2; display: flex; gap: 18px; justify-content: space-between; padding: 15px 17px; }
.output-product-head h3 { color: var(--green-dark); font-size: 17px; margin: 0; }
.output-product-totals { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.output-product-totals span { background: #fff; border: 1px solid #d3e2da; border-radius: 8px; color: var(--muted); font-size: 11px; padding: 7px 9px; }
.output-product-totals b { color: var(--ink); margin-left: 4px; }
.output-product-content { display: grid; gap: 10px; max-height: 510px; overflow: auto; padding: 12px; }
.output-component-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.output-component-head { align-items: center; background: #f7f9f8; border-bottom: 1px solid var(--line); display: flex; gap: 14px; justify-content: space-between; padding: 10px 12px; }
.output-component-head > div { display: grid; gap: 3px; }
.output-component-head span, .output-component-head small { color: var(--muted); font-size: 10px; font-weight: 750; }
.output-component-head strong { font-size: 14px; }
.output-operation-list { display: grid; }
.output-operation-row { align-items: center; background: #fff; border: 0; border-bottom: 1px solid #edf0ee; color: var(--ink); display: grid; gap: 13px; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(65px, .35fr)) minmax(120px, .55fr); padding: 10px 12px; text-align: left; width: 100%; }
.output-operation-row:last-child { border-bottom: 0; }
.output-operation-row:hover { background: #f8fbf9; }
.output-operation-row:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.output-operation-row > span:not(.badge) { display: grid; gap: 2px; }
.output-operation-row small { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .03em; }
.output-operation-row strong { font-size: 13px; }
.output-operation-row em { color: var(--muted); font-size: 11px; font-style: normal; }
.output-operation-row .badge { justify-self: end; text-align: center; }
.output-entry-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); display: block; padding: 0; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; width: 100%; }
.output-entry-card:hover { border-color: #aebbb5; box-shadow: 0 7px 20px rgba(27,53,42,.08); transform: translateY(-1px); }
.output-entry-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.output-card-head { align-items: center; border-bottom: 1px solid #edf0ee; display: flex; gap: 16px; justify-content: space-between; padding: 12px 14px; }
.output-card-head > span { display: grid; gap: 4px; }
.output-card-head > span:last-child { justify-items: end; }
.output-card-head small, .output-card-body small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.output-card-body { display: grid; gap: 14px; grid-template-columns: 1.1fr 1.2fr 1fr repeat(3, minmax(70px, .38fr)); padding: 13px 14px; }
.output-card-body > span { display: grid; gap: 4px; min-width: 0; }
.output-card-body strong { font-size: 13px; overflow-wrap: anywhere; }
.output-empty { color: var(--muted); padding: 34px 18px; text-align: center; }
.output-workspace > .module-status { margin: 14px; }
.output-details-shell { display: grid; gap: 18px; padding: 22px; }
.output-details-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.output-details-grid > div { background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 5px; padding: 12px; }
.output-details-grid span { color: var(--muted); font-size: 11px; font-weight: 700; }
.output-details-grid strong { font-size: 14px; overflow-wrap: anywhere; }
.output-details-grid .output-rejection { background: var(--red-soft); border-color: #efc4bf; grid-column: 1 / -1; }
.output-details-grid .output-rejection span, .output-details-grid .output-rejection strong { color: var(--red); }
.output-details-actions { border-top: 1px solid var(--line); padding-top: 16px; }

@media (max-width: 1050px) {
  .output-card-filters { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .output-search-field { grid-column: span 2; }
  .output-card-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .output-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .output-tabs { overflow-x: auto; scrollbar-width: thin; }
  .output-tabs button { flex: 0 0 auto; white-space: nowrap; }
  .output-card-filters { grid-template-columns: 1fr; }
  .output-search-field { grid-column: auto; }
  .output-card-filters button { width: 100%; }
  .output-card-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .output-product-head { align-items: flex-start; flex-direction: column; }
  .output-product-totals { justify-content: flex-start; }
  .output-operation-row { grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(58px, .35fr)); }
  .output-operation-row .badge { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 520px) {
  .output-page-heading h2 { font-size: 24px; }
  .output-metrics { gap: 8px; }
  .output-metrics article { padding: 13px; }
  .output-metrics strong { font-size: 22px; }
  .output-card-head { align-items: flex-start; }
  .output-card-head > span:last-child { justify-items: start; }
  .output-card-body { grid-template-columns: 1fr; }
  .output-card-list { padding: 10px; }
  .output-product-head { padding: 13px; }
  .output-product-content { max-height: 460px; padding: 8px; }
  .output-component-head { align-items: flex-start; flex-direction: column; }
  .output-operation-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .output-operation-main { grid-column: 1 / -1; }
  .output-operation-row .badge { grid-column: 1 / -1; }
  .output-details-shell { padding: 16px; }
  .output-details-grid { grid-template-columns: 1fr; }
  .output-details-grid .output-rejection { grid-column: auto; }
}

/* Payroll — specification 005 */
.payroll-page-head { align-items: end; }
.payroll-month-control { color: var(--muted); display: grid; flex: 0 0 190px; font-size: 12px; font-weight: 700; gap: 5px; }
.payroll-summary { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 14px; }
.payroll-summary article { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 17px 18px; }
.payroll-summary span { color: var(--muted); display: block; font-size: 12px; font-weight: 700; }
.payroll-summary strong { color: var(--green-dark); display: block; font-size: 25px; margin-top: 7px; }
.payroll-filters { align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 12px; grid-template-columns: minmax(220px, 1.4fr) minmax(210px, .8fr) auto; margin-bottom: 14px; padding: 14px; }
.payroll-filters label { color: var(--muted); display: grid; font-size: 12px; font-weight: 700; gap: 5px; }
.payroll-employee-cards { display: grid; gap: 10px; }
.payroll-employee-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); display: grid; gap: 15px; grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .85fr) repeat(4, minmax(110px, .6fr)) minmax(150px, .85fr); padding: 14px 16px; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; width: 100%; }
.payroll-employee-card:hover { border-color: #aebbb5; box-shadow: 0 7px 20px rgba(27,53,42,.08); transform: translateY(-1px); }
.payroll-card-person { align-items: center; display: flex; gap: 10px; min-width: 0; }
.payroll-card-person > span:last-child, .payroll-employee-card > span { display: grid; gap: 3px; min-width: 0; }
.payroll-employee-card small { color: var(--muted); font-size: 11px; }
.payroll-employee-card strong { font-size: 14px; overflow-wrap: anywhere; }
.payroll-card-system { background: var(--green-soft); border-radius: 99px; color: var(--green-dark); display: block !important; font-size: 11px; font-weight: 750; padding: 6px 9px; text-align: center; }
.payroll-card-total { justify-items: end; }
.payroll-card-total > strong { color: var(--green-dark); font-size: 17px; }
.payroll-card-total em { font-style: normal; }
.badge.partial { background: var(--amber-soft); color: var(--amber); }
.payroll-details-dialog { max-width: 980px; padding: 0; width: min(980px, calc(100% - 28px)); }
.payroll-details-dialog > .dialog-head { border-bottom: 1px solid var(--line); padding: 20px 22px; }
.payroll-details-dialog > .dialog-actions { border-top: 1px solid var(--line); padding: 14px 22px; }
.payroll-detail-section { border-bottom: 1px solid var(--line); padding: 18px 22px; }
.payroll-detail-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.payroll-detail-head h3 { margin: 0; }
.payroll-detail-head > strong { color: var(--green-dark); font-size: 20px; }
.payroll-settings-form { align-items: end; background: var(--canvas); border-radius: 10px; display: grid; gap: 10px; grid-template-columns: 1.1fr .7fr .75fr auto; margin-top: 14px; padding: 12px; }
.payroll-details-dialog .payroll-settings-form { padding: 12px; }
.payroll-settings-form label { color: var(--muted); display: grid; font-size: 11px; font-weight: 700; gap: 4px; }
.payroll-history { margin-top: 11px; }
.payroll-history summary { color: var(--green); cursor: pointer; font-size: 12px; font-weight: 750; }
.payroll-history > div { display: grid; gap: 5px; margin-top: 8px; }
.payroll-history p { display: flex; gap: 14px; margin: 0; }
.payroll-history p span { color: var(--muted); }
.payroll-time-summary { display: flex; gap: 20px; margin: 12px 0 8px; }
.payroll-time-summary span { color: var(--muted); font-size: 12px; }
.payroll-time-summary b { color: var(--ink); margin-left: 5px; }
.payroll-scroll-list { border: 1px solid var(--line); border-radius: 9px; max-height: 250px; overflow: auto; }
.payroll-scroll-list article { align-items: center; border-bottom: 1px solid #edf0ee; display: flex; gap: 16px; justify-content: space-between; padding: 10px 12px; }
.payroll-scroll-list article:last-child { border-bottom: 0; }
.payroll-scroll-list article > div { display: grid; gap: 3px; }
.payroll-scroll-list article > div:last-child { justify-items: end; }
.payroll-scroll-list small { color: var(--muted); font-size: 11px; }
.payroll-scroll-list b { font-size: 14px; }
.secondary.compact { min-height: 30px; padding: 5px 9px; }
.payroll-warning { background: var(--amber-soft); border-radius: 8px; color: var(--amber); font-size: 12px; font-weight: 700; margin: 11px 0; padding: 9px 11px; }
.payroll-calculation { display: grid; gap: 8px; }
.payroll-calculation > div { align-items: center; display: flex; justify-content: space-between; }
.payroll-calculation span { color: var(--muted); }
.payroll-grand-total { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 12px; }
.payroll-grand-total span, .payroll-grand-total strong { color: var(--green-dark); font-size: 19px; font-weight: 800; }
.payroll-payment-row { margin-top: 7px; }

@media (max-width: 1180px) {
  .payroll-employee-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payroll-card-person { grid-column: span 2; }
}
@media (max-width: 920px) {
  .payroll-page-head { align-items: stretch; flex-direction: column; }
  .payroll-month-control { flex-basis: auto; }
  .payroll-summary { grid-template-columns: 1fr; }
  .payroll-filters, .payroll-settings-form { grid-template-columns: 1fr; }
  .payroll-filters button, .payroll-settings-form button { width: 100%; }
  .payroll-employee-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-card-person, .payroll-card-total { grid-column: 1 / -1; }
  .payroll-card-total { align-items: center; grid-template-columns: 1fr auto auto !important; justify-items: start; }
}
@media (max-width: 520px) {
  .payroll-summary strong { font-size: 22px; }
  .payroll-employee-card { gap: 11px; grid-template-columns: 1fr; padding: 13px; }
  .payroll-employee-card > span, .payroll-card-person, .payroll-card-total { grid-column: auto; }
  .payroll-card-total { align-items: start; grid-template-columns: 1fr !important; justify-items: start; }
  .payroll-detail-section { padding: 16px; }
  .payroll-detail-head, .payroll-scroll-list article, .payroll-calculation > div, .payroll-history p { align-items: stretch; flex-direction: column; }
  .payroll-scroll-list article > div:last-child { justify-items: start; }
  .payroll-time-summary { flex-direction: column; gap: 5px; }
  .payroll-payment-row button { width: 100%; }
}

/* User module access */
.access-settings-page { min-height: 520px; }
.access-settings-head { margin-bottom: 18px; }
.access-settings-users { display: grid; gap: 9px; }
.access-user-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 2px 8px rgba(27, 52, 40, .05); overflow: hidden; }
.access-user-disclosure, .access-permission-group { margin: 0; }
.access-user-summary, .access-permission-summary { align-items: center; cursor: pointer; display: flex; gap: 11px; list-style: none; user-select: none; }
.access-user-summary::-webkit-details-marker, .access-permission-summary::-webkit-details-marker { display: none; }
.access-user-summary::before, .access-permission-summary::before { color: #64736c; content: '›'; flex: 0 0 auto; font-size: 21px; line-height: 1; transform: rotate(0); transition: transform .16s ease; }
.access-user-disclosure[open] > .access-user-summary::before, .access-permission-group[open] > .access-permission-summary::before { transform: rotate(90deg); }
.access-user-summary { min-height: 58px; padding: 9px 13px; }
.access-user-summary:hover, .access-user-disclosure[open] > .access-user-summary { background: #f7faf8; }
.access-user-avatar { align-items: center; background: var(--green-soft); border: 1px solid #b9d8c8; border-radius: 50%; color: var(--green); display: flex; flex: 0 0 34px; font-size: 13px; font-weight: 800; height: 34px; justify-content: center; }
.access-disclosure-label { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.access-disclosure-label strong { font-size: 13px; }
.access-disclosure-label small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-count, .access-permission-count { background: #eef3f0; border-radius: 999px; color: #596961; flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 5px 8px; }
.access-user-body { border-top: 1px solid var(--line); padding: 10px; }
.access-module-grid { display: grid; gap: 9px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.access-module-check { align-items: center; background: #f8faf9; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; display: flex; gap: 9px; min-height: 58px; padding: 9px 10px; }
.access-module-check:has(input:checked) { background: var(--green-soft); border-color: #afd2c0; }
.access-module-check input { accent-color: var(--green); flex: 0 0 auto; min-height: 0; width: 17px; height: 17px; }
.access-module-check span { display: grid; gap: 2px; }
.access-module-check strong { font-size: 12px; }
.access-module-check small { color: var(--muted); font-size: 9px; line-height: 1.25; }
.access-permission-groups { display: grid; gap: 6px; }
.access-permission-group { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.access-permission-group.has-selected { border-color: #bed6ca; }
.access-permission-summary { background: #f5f7f6; min-height: 43px; padding: 6px 10px; }
.access-permission-summary:hover, .access-permission-group[open] > .access-permission-summary { background: #eef4f1; }
.access-permission-content { border-top: 1px solid var(--line); }
.access-permission-toolbar { align-items: center; background: #fbfcfb; color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; padding: 6px 9px 2px; }
.access-action-grid { display: grid; gap: 5px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 9px 9px; }
.access-action-check { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; display: flex; gap: 7px; min-height: 42px; padding: 6px 7px; }
.access-action-check:has(input:checked) { background: var(--green-soft); border-color: #afd2c0; }
.access-action-check.locked { cursor: not-allowed; opacity: .58; }
.access-action-check input { accent-color: var(--green); flex: 0 0 auto; height: 16px; min-height: 0; width: 16px; }
.access-action-check span { display: grid; gap: 2px; min-width: 0; }
.access-action-check strong { font-size: 10px; line-height: 1.25; }
.access-action-check small { color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-footer { align-items: center; background: #f8faf9; border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 12px; justify-content: space-between; margin-top: 9px; padding: 8px 10px; }
.access-user-footer span { color: var(--muted); font-size: 10px; }

@media (max-width: 1100px) {
  .access-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .access-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .access-settings-head { align-items: stretch; flex-direction: column; }
  .access-settings-head button { width: 100%; }
  .access-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-user-count { max-width: 120px; text-align: center; }
  .access-user-footer { align-items: stretch; flex-direction: column; }
  .access-user-footer button { width: 100%; }
}
@media (max-width: 430px) {
  .access-module-grid { grid-template-columns: 1fr; }
  .access-action-grid { grid-template-columns: 1fr; }
}

/* Tasks and personal notifications */
.global-header-tools { margin-left: auto; }
.notification-bell { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; height: 42px; justify-content: center; padding: 0; position: relative; width: 42px; }
.notification-bell:hover { background: var(--green-soft); border-color: #b7d4c5; }
.notification-bell svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 21px; }
.notification-bell span, .nav-count { align-items: center; background: var(--red); border-radius: 999px; color: #fff; display: inline-flex; font-size: 9px; font-weight: 800; justify-content: center; min-height: 17px; min-width: 17px; padding: 1px 5px; }
.notification-bell span { position: absolute; right: -5px; top: -5px; }
.nav-item .nav-count { background: #d7f16a; border-radius: 99px; color: #173c2d; font-size: 9px; font-weight: 850; line-height: 1; margin-left: 4px; min-width: 20px; padding: 5px 6px; text-align: center; }
body.sidebar-collapsed .sidebar:not(:hover) .nav-item .nav-count,
body.sidebar-collapsed.sidebar-collapse-lock .sidebar .nav-item .nav-count { position: absolute; right: 3px; top: 3px; }
.tasks-page { min-height: 560px; }
.tasks-head { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 15px; }
.tasks-main-tabs, .task-type-tabs, .notification-tabs { background: #e9eeeb; border-radius: 9px; display: inline-flex; gap: 3px; padding: 3px; }
.tasks-main-tabs button, .task-type-tabs button, .notification-tabs button { background: transparent; border: 0; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 700; min-height: 34px; padding: 7px 14px; }
.tasks-main-tabs button.active, .task-type-tabs button.active, .notification-tabs button.active { background: #fff; box-shadow: 0 1px 4px rgba(29,54,43,.12); color: var(--green-dark); }
.tasks-toolbar { align-items: end; display: flex; gap: 14px; justify-content: space-between; margin: 11px 0 13px; }
.tasks-buckets { display: flex; gap: 6px; }
.tasks-buckets button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; padding: 8px 10px; }
.tasks-buckets button.active { background: var(--green-soft); border-color: #a9cdbb; color: var(--green-dark); }
.tasks-buckets span { background: rgba(25,107,74,.1); border-radius: 999px; margin-left: 4px; padding: 2px 6px; }
#taskFilters { align-items: end; display: flex; gap: 8px; }
#taskFilters label { font-size: 10px; }
.tasks-search input { min-width: 250px; }
.tasks-completed { align-items: center; display: flex; gap: 6px; min-height: 39px; white-space: nowrap; }
.tasks-completed input { accent-color: var(--green); min-height: 0; width: auto; }
.task-cards { display: grid; gap: 12px; }
.task-card { align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid #6f8f80; border-radius: 12px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(170px, auto); padding: 17px 19px; text-align: left; width: 100%; }
.task-card.familiarization { border-left-color: #7484ba; }
.task-card.overdue { background: #fffafa; border-color: #e4bab6; border-left-color: var(--red); }
.task-card:hover { box-shadow: 0 4px 16px rgba(29,54,43,.07); transform: translateY(-1px); }
.task-card-main { display: grid; gap: 8px; min-width: 0; }
.task-card-top, .task-card-meta, .task-card-side { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.task-card-title { color: var(--ink); font-size: 17px; font-weight: 780; line-height: 1.3; overflow-wrap: anywhere; }
.task-card-description { color: #52615a; display: -webkit-box; font-size: 13px; line-height: 1.45; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-number { color: var(--green-dark); font-size: 11px; font-weight: 850; letter-spacing: .03em; }
.task-card-meta { align-items: stretch; color: var(--muted); font-size: 12px; gap: 11px 20px; margin-top: 2px; }
.task-card-meta > span { display: grid; gap: 2px; }
.task-card-meta b { color: #7a8781; font-size: 9px; letter-spacing: .045em; text-transform: uppercase; }
.task-card-side { align-content: center; align-items: flex-end; flex-direction: column; justify-content: center; max-width: 260px; }
.task-kind, .task-role, .task-status { border-radius: 999px; font-size: 10px; font-weight: 780; padding: 5px 9px; }
.task-kind.execution { background: var(--green-soft); color: var(--green-dark); }
.task-kind.familiarization { background: #e9ebf7; color: #45558f; }
.task-status { background: #eef2ef; color: #52635b; }
.task-role { background: var(--amber-soft); color: #82501a; }
.task-overdue { align-self: center; color: var(--red); font-size: 11px; font-weight: 800; }
.task-progress { background: #e7ece9; border-radius: 999px; height: 7px; overflow: hidden; width: 150px; }
.task-progress i { background: var(--green); display: block; height: 100%; }
.task-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 13px; }
.task-form-wide { grid-column: 1 / -1; }
.task-form-fields { display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.task-recipient-field { border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.task-recipient-head, .task-recipient-head > div { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.task-recipient-head > div { align-items: flex-start; flex-direction: column; gap: 2px; }
.task-recipient-head small { color: var(--muted); }
.task-recipient-list { display: grid; gap: 5px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 9px 0; max-height: 220px; overflow: auto; }
.task-recipient-list label { align-items: center; background: #f7f9f8; border: 1px solid var(--line); border-radius: 7px; display: flex; flex-direction: row; gap: 7px; padding: 7px; }
.task-recipient-list input { accent-color: var(--green); min-height: 0; width: auto; }
.task-details-dialog { max-height: calc(100dvh - 40px); width: min(1120px, calc(100% - 32px)); }
.task-details-shell { max-height: calc(100dvh - 40px); min-width: 0; overflow-y: auto; padding: 26px; }
.task-details-shell > .dialog-head { align-items: flex-start; border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 18px; }
.task-details-shell > .dialog-head h2 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.task-details-grid { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.task-details-grid > div { background: #f7f9f8; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; min-width: 0; padding: 14px; }
.task-details-grid > div.wide { grid-column: 1 / -1; }
.task-details-grid span, .task-section-title { color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .045em; text-transform: uppercase; }
.task-details-grid strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.task-section { margin-top: 22px; }
.task-recipient-statuses, .task-history { display: grid; gap: 8px; margin-top: 9px; }
.task-recipient-row, .task-history-row { align-items: center; background: #f8faf9; border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 14px; justify-content: space-between; padding: 11px 13px; }
.task-history-row > div { display: grid; gap: 4px; min-width: 0; }
.task-history-row small { color: #52615a; display: block; font-size: 11px; line-height: 1.45; }
.task-recipient-row span, .task-history-row > span { color: var(--muted); flex: 0 0 auto; font-size: 11px; }
.task-attachment-list { display: grid; gap: 8px; margin: 9px 0; }
.task-attachment-row { align-items: center; background: #f8faf9; border: 1px solid var(--line); border-radius: 9px; color: inherit; display: flex; gap: 12px; justify-content: space-between; padding: 11px 13px; text-decoration: none; }
.task-attachment-row:hover { background: var(--green-soft); border-color: #b1d0c0; }
.task-attachment-row > span { display: flex; gap: 7px; min-width: 0; }
.task-attachment-row strong { overflow-wrap: anywhere; }
.task-attachment-row small { color: var(--muted); font-size: 11px; }
.task-attachment-form { align-items: center; display: flex; gap: 10px; margin-top: 10px; }
.task-attachment-form input { min-width: 0; }
.task-details-actions { background: #fff; border-top: 1px solid var(--line); bottom: -26px; margin: 22px -26px -26px; padding: 16px 26px; position: sticky; z-index: 2; }
.task-action-dialog { max-width: 560px; width: calc(100% - 24px); }
.notification-dialog { margin: 70px 28px auto auto; max-height: calc(100vh - 100px); max-width: 440px; width: calc(100% - 32px); }
.notification-shell { min-width: 0; }
.notification-controls { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 10px; }
.notification-actions { align-items: center; display: flex; gap: 8px; }
.notification-list { display: grid; gap: 6px; max-height: 62vh; overflow-y: auto; }
.notification-item { background: #f8faf9; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; padding: 9px; text-align: left; width: 100%; }
.notification-item.unread { background: var(--green-soft); border-color: #b1d0c0; }
.notification-item strong { font-size: 12px; }
.notification-item span, .notification-item small { color: var(--muted); font-size: 9px; }
.task-toast-stack { bottom: 20px; display: grid; gap: 7px; max-width: 350px; position: fixed; right: 20px; z-index: 20; }
.task-notification-toast { background: #173c2d; border: 0; border-radius: 10px; box-shadow: 0 10px 35px rgba(0,0,0,.2); color: #fff; display: grid; gap: 3px; padding: 11px 13px; text-align: left; }
.task-notification-toast small { color: #bcd0c7; }

@media (max-width: 900px) {
  .tasks-toolbar { align-items: stretch; flex-direction: column; }
  #taskFilters { align-items: stretch; flex-wrap: wrap; }
  .tasks-search { flex: 1 1 100%; }
  .tasks-search input { min-width: 0; width: 100%; }
  .task-form-fields, .task-details-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .global-header-tools { position: absolute; right: 12px; top: 16px; }
  .tasks-head { align-items: stretch; flex-direction: column; }
  .tasks-head > button { width: 100%; }
  .tasks-main-tabs { display: flex; width: 100%; }
  .tasks-main-tabs button { flex: 1 1 0; }
  .tasks-buckets { display: grid; grid-template-columns: repeat(3,1fr); width: 100%; }
  .tasks-buckets { grid-template-columns: repeat(3,1fr); }
  .tasks-buckets button { padding: 7px 4px; }
  .task-card { align-items: stretch; grid-template-columns: 1fr; }
  .task-card-side { align-items: flex-start; justify-content: flex-start; max-width: none; }
  .task-form-fields, .task-details-grid, .task-recipient-list { grid-template-columns: 1fr; }
  .task-details-grid > div.wide { grid-column: auto; }
  .task-attachment-row, .task-attachment-form, .task-history-row, .task-recipient-row { align-items: stretch; flex-direction: column; }
  .task-history-row > span, .task-recipient-row span { flex: 0 0 auto; }
  .notification-dialog { margin: auto; max-height: calc(100vh - 24px); width: calc(100% - 20px); }
  .notification-controls { align-items: stretch; flex-direction: column; }
  .notification-actions { justify-content: space-between; }
  .task-toast-stack { bottom: 10px; left: 10px; max-width: none; right: 10px; }
}

@media (max-width: 1180px) {
  .overview-layout { grid-template-columns: 1fr; }
  .overview-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-side .overview-card { min-width: 0; }
}
@media (max-width: 900px) {
  .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-chart-grid, .overview-lower-grid { grid-template-columns: 1fr; }
  .overview-side { grid-template-columns: 1fr; }
  .overview-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .overview-dashboard { padding-top: 8px; }
  .overview-toolbar { justify-content: stretch; }
  .overview-toolbar label { flex: 1 1 auto; }
  .overview-kpis { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-kpi { align-content: start; gap: 7px; grid-template-columns: 34px 1fr; min-height: 108px; padding: 11px; }
  .overview-kpi-icon { height: 34px; width: 34px; }
  .overview-kpi > b { display: none; }
  .overview-kpi strong { font-size: 18px; }
  .overview-kpi em { font-size: 9px; }
  .overview-card { padding: 13px; }
  .overview-activity-list, .overview-side-list { margin: 9px -13px -13px; }
  .overview-attendance { gap: 14px; grid-template-columns: 112px 1fr; }
  .overview-donut { height: 108px; width: 108px; }
  .overview-donut::after { inset: 13px; }
  .overview-donut strong { font-size: 20px; }
  .overview-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-card-note, .overview-link { white-space: normal; }
}

@media (max-width: 920px) {
  .sidebar,
  body.sidebar-collapsed .sidebar,
  body.sidebar-collapsed .sidebar:hover { box-shadow: none; padding: 12px 14px; position: static; width: auto; }
  main, body.sidebar-collapsed main,
  body.sidebar-collapsed:not(.sidebar-collapse-lock) .sidebar:hover ~ main { margin-left: 0; width: 100%; }
  .sidebar-toggle { display: none; }
  body.sidebar-collapsed .sidebar .brand-copy,
  body.sidebar-collapsed .sidebar .nav-label,
  body.sidebar-collapsed .sidebar .current-user,
  body.sidebar-collapsed .sidebar .device > div,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .brand-copy,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .nav-label,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .current-user,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .device > div { display: block; }
  .sidebar nav { display: flex; gap: 5px; margin: 0 -4px; overflow-x: auto; overflow-y: hidden; padding: 0 4px 7px; }
  .nav-item,
  body.sidebar-collapsed .sidebar:not(:hover) .nav-item,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .nav-item { display: flex; flex: 0 0 auto; gap: 7px; justify-items: initial; min-height: 40px; padding: 9px 11px; }
  body.sidebar-collapsed .sidebar:not(:hover) .brand,
  body.sidebar-collapsed.sidebar-collapse-lock .sidebar .brand { justify-content: flex-start; }
  body.sidebar-collapsed .sidebar .nav-item .nav-count { position: static; }
}

