:root {
  --ink: #142436;
  --muted: #62758a;
  --paper: #f2f5f6;
  --surface: #ffffff;
  --nav: #10283b;
  --nav-2: #173d57;
  --teal: #13a895;
  --cyan: #52d9e1;
  --amber: #eaa72d;
  --red: #d95757;
  --green: #278b67;
  --violet: #6d54a2;
  --line: #d5dfe5;
  --shadow: 0 12px 34px rgba(16, 40, 59, .12);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "IBM Plex Sans", sans-serif; color: var(--ink); background: var(--paper); }
body::before { content: ""; position: fixed; inset: 0 0 auto 258px; height: 3px; z-index: 20; background: linear-gradient(90deg,var(--cyan),var(--teal) 55%,var(--amber)); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
::selection { background: var(--cyan); color: var(--nav); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: var(--nav); color: white; }
.brand { display: flex; gap: 13px; align-items: center; padding: 4px 8px 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand strong { display: block; letter-spacing: .08em; }
.brand small { display: block; margin-top: 2px; color: #aac0ce; }
.brand-mark { width: 38px; height: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; transform: skew(-7deg); }
.brand-mark span { background: var(--cyan); border-radius: 2px; }
.brand-mark span:nth-child(2) { background: var(--teal); transform: translateY(6px); }
.brand-mark span:nth-child(3) { background: var(--amber); transform: translateY(12px); }
.nav-list { display: grid; gap: 7px; margin-top: 24px; }
.nav-button { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 10px; padding: 13px 14px; color: #d9e8ef; background: transparent; text-align: left; font-weight: 600; }
.nav-button:hover { background: rgba(255,255,255,.08); }
.nav-button.active { background: var(--surface); color: var(--nav); }
.nav-button .count { min-width: 27px; padding: 2px 7px; border-radius: 999px; background: rgba(82,217,225,.16); color: var(--cyan); text-align: center; font: 600 12px "IBM Plex Mono", monospace; }
.nav-button.active .count { background: #dff7f6; color: #08796d; }
.sidebar-foot { margin-top: auto; padding: 18px 8px 2px; border-top: 1px solid rgba(255,255,255,.12); color: #aac0ce; font-size: 13px; }
.sync-dot { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sync-dot span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(39,139,103,.18); }
.text-button { border: 0; background: none; color: #d9e8ef; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.workspace { min-width: 0; }
.topbar { height: 82px; display: flex; align-items: center; gap: 24px; padding: 0 34px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.context { display: flex; flex-direction: column; min-width: 0; }
.context strong { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.profile-switcher { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.profile-switcher label { color: var(--muted); font-size: 13px; }
select, input, textarea { border: 1px solid #bdcbd4; border-radius: 9px; background: var(--surface); color: var(--ink); padding: 10px 12px; }
.menu-button { display: none; border: 1px solid var(--line); background: white; color: var(--ink); padding: 9px 12px; border-radius: 9px; }
main { padding: 34px; max-width: 1500px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; animation: reveal .32s cubic-bezier(.16,1,.3,1); }
@keyframes reveal { from { opacity: .2; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { font-size: 38px; line-height: 1.05; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.page-heading p { max-width: 600px; margin: 10px 0 0; color: var(--muted); font-size: 17px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { border: 0; border-radius: 9px; padding: 11px 16px; font-weight: 700; background: var(--nav); color: white; box-shadow: 0 6px 18px rgba(16,40,59,.16); }
.button:hover { background: var(--nav-2); }
.button.secondary { color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: none; }
.button.alert { background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.command-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 46px; min-height: 350px; margin: -34px -34px 0; padding: 54px 56px 52px; overflow: hidden; color: white; background: var(--nav); }
.command-hero::after { content: ""; position: absolute; z-index: -1; width: 430px; height: 430px; right: -120px; top: -190px; border: 1px solid rgba(82,217,225,.24); border-radius: 50%; box-shadow: 0 0 0 54px rgba(82,217,225,.045),0 0 0 108px rgba(82,217,225,.025); }
.command-copy { align-self: center; max-width: 800px; }
.command-status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; color: #cbe0ea; font-size: 12px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.command-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(82,217,225,.14); }
.command-hero h1 { max-width: 820px; margin: 0; color: white; font-size: 52px; line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.command-hero p { max-width: 720px; margin: 22px 0 28px; color: #c8dbe5; font-size: 18px; line-height: 1.5; }
.light-action { color: var(--nav); background: white; box-shadow: 0 8px 24px rgba(4,18,29,.22); }
.light-action:hover { color: var(--nav); background: #eaf8f8; }
.ghost-action { color: white; background: transparent; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.ghost-action:hover { background: rgba(255,255,255,.09); }
.ai-manifesto { align-self: center; display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: #17374d; box-shadow: 0 18px 42px rgba(3,18,29,.26); }
.ai-orbit { width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid rgba(82,217,225,.45); border-radius: 50%; box-shadow: inset 0 0 0 9px rgba(82,217,225,.07); }
.ai-orbit span { color: var(--cyan); font: 700 18px "IBM Plex Mono",monospace; }
.ai-manifesto strong { display: block; font-size: 22px; line-height: 1.15; }
.ai-manifesto p { margin: 10px 0 0; color: #bcd0dc; font-size: 14px; line-height: 1.45; }
.flow-map { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0 -34px 30px; padding: 0 42px; color: var(--ink); background: white; border-bottom: 1px solid var(--line); box-shadow: 0 10px 25px rgba(16,40,59,.06); }
.flow-map > div { position: relative; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-content: center; min-height: 104px; padding: 18px 24px; border-right: 1px solid var(--line); }
.flow-map > div:last-child { border-right: 0; }
.flow-map > div:not(:last-child)::after { content: ""; position: absolute; right: -6px; top: 50%; z-index: 1; width: 12px; height: 12px; background: var(--teal); clip-path: polygon(0 0, 100% 50%, 0 100%, 24% 50%); transform: translateY(-50%); }
.flow-map span { grid-row: 1 / 3; align-self: center; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--nav); font: 600 13px "IBM Plex Mono",monospace; }
.flow-map strong,.flow-map small { display: block; }
.flow-map small { margin-top: 4px; color: var(--muted); line-height: 1.3; }
.section-label { display: block; margin-bottom: 5px; color: #08796d; font-size: 11px; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.notice { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; padding: 16px 18px; background: #fff5dd; border: 1px solid #ecd39e; border-radius: 11px; }
.notice strong { color: #8b5c00; }
.notice button { margin-left: auto; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-block: 1px solid var(--line); margin-bottom: 28px; }
.metric { padding: 22px 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.metric strong { display: block; margin-top: 8px; font: 600 30px "IBM Plex Mono", monospace; }
.metric small { display: block; margin-top: 3px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,.75fr); gap: 24px; }
.panel { min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 13px 16px; background: #e9eff2; color: #52667a; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid #e5ecef; vertical-align: middle; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f4f8f9; }
.mono { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.red { color: #a42c2c; background: #ffe5e3; }
.status.amber { color: #885a00; background: #fff1cf; }
.status.green { color: #176e50; background: #dcf5e9; }
.status.blue { color: #145f88; background: #def1fb; }
.priority-button { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 7px 9px; font-size: 12px; font-weight: 700; }
.priority-button:hover { border-color: var(--teal); color: #08796d; }
.row-actions { display: flex; gap: 6px; }
.timeline { list-style: none; margin: 0; padding: 10px 22px 22px; }
.timeline li { position: relative; padding: 16px 0 16px 28px; border-bottom: 1px solid #e4ebee; }
.timeline li:last-child { border-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 24px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.timeline time { display: block; color: var(--muted); font: 500 12px "IBM Plex Mono", monospace; margin-top: 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.filters input { flex: 1; min-width: 220px; }
.workflow-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.workflow-strip button { min-width: 0; padding: 15px 16px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
.stock-subnav { display: flex; gap: 4px; width: max-content; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #edf3f5; }
.stock-subnav button { padding: 9px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.stock-subnav button.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(16,40,59,.12); }
.magasin-mobile-select { display: none; margin-bottom: 18px; }
.magasin-mobile-select label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.magasin-mobile-select select { width: 100%; }
.history-toolbar { display: flex; align-items: end; gap: 14px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.history-toolbar label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.history-toolbar select { min-width: 180px; }
.history-toolbar > div { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.history-toolbar > div span { color: var(--muted); }
.history-toolbar .in, .movement-qty.positive { color: #176e50; }
.history-toolbar .out, .movement-qty.negative { color: var(--red); }
.movement-qty { font: 700 14px "IBM Plex Mono", monospace; }
.empty.compact { min-height: 120px; }
.empty.compact strong, .empty.compact span { display: block; }
@media (max-width: 620px) { .history-toolbar { align-items: stretch; flex-direction: column; } .history-toolbar > div { margin-left: 0; justify-content: space-between; } }
.app-dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 14px; background: transparent; box-shadow: var(--shadow); }
[hidden] { display: none !important; }
.app-dialog::backdrop { background: rgba(8,25,38,.68); backdrop-filter: blur(3px); }
.dialog-card { margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-head h2 { margin: 4px 0 0; font-size: 22px; }
.eyebrow { color: #08796d; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.dialog-close { min-width: 38px; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 24px; line-height: 1; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice-card { min-height: 126px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfc; color: var(--ink); text-align: left; }
.choice-card strong, .choice-card span { display: block; }
.choice-card strong { font-size: 17px; }
.choice-card span { margin-top: 7px; color: var(--muted); }
.choice-card.primary-choice { border-color: #08796d; background: #e8f5f2; }
.entry-summary { display: grid; gap: 4px; margin-bottom: 18px; padding: 14px 16px; border-left: 4px solid #08796d; background: #f1f7f6; }
.entry-summary:empty { display: none; }
.entry-summary span, .entry-summary small { color: var(--muted); }
.dialog-card > .field { margin-top: 16px; }
.dialog-actions { margin: 22px -22px -22px; }
.scanner-frame { position: relative; overflow: hidden; aspect-ratio: 4/3; border-radius: 12px; background: #07131c; }
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame::after { content: ''; position: absolute; inset: 19%; border: 2px solid white; border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.32); }
.scan-line { position: absolute; z-index: 2; left: 21%; right: 21%; top: 50%; height: 2px; background: #39d5c1; box-shadow: 0 0 8px #39d5c1; }
.scanner-status { color: var(--muted); }
.scan-fallback { display: grid; gap: 7px; padding-top: 16px; border-top: 1px solid var(--line); }
.scan-fallback > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
@media (max-width: 520px) { .choice-grid { grid-template-columns: 1fr; } .choice-card { min-height: 98px; } .dialog-card { padding: 18px; } .dialog-actions { margin: 20px -18px -18px; } }
.workflow-strip strong, .workflow-strip span { display: block; }
.workflow-strip span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.low-row td { background: #fffaf0; }
.stock-number.low { color: var(--red); font-weight: 700; }
.part-link { display: grid; gap: 3px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.part-link span { color: #08796d; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.part-detail { display: grid; grid-template-columns: minmax(0,1.45fr) 340px; gap: 24px; align-items: start; }
.part-kpis { display: grid; grid-template-columns: repeat(2,1fr); border-bottom: 1px solid var(--line); }
.part-kpis > div { padding: 20px 22px; border-right: 1px solid var(--line); }
.part-kpis > div:nth-child(even) { border-right: 0; }
.part-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.part-kpis span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.part-kpis strong { display: block; margin: 7px 0 2px; font-size: 22px; }
.part-kpis small { color: var(--muted); }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.spec-grid > div { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.spec-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.spec-grid dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.spec-grid dd { margin: 5px 0 0; font-weight: 700; }
.supplier-block, .stock-gauge { padding: 20px 22px; }
.supplier-block { border-bottom: 1px solid var(--line); }
.supplier-block strong, .supplier-block span { display: block; }
.supplier-block span { margin-top: 4px; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.supplier-block p { color: var(--muted); }
.stock-gauge > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stock-gauge small { display: block; margin-top: 9px; color: var(--muted); }
.part-side { overflow: visible; }
.barcode-label { margin: 20px; padding: 18px; display: grid; gap: 7px; justify-items: center; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: white; }
.barcode-label strong { font-size: 18px; }
.barcode-label > span, .barcode-label small { color: var(--muted); }
.barcode-label svg { max-width: 100%; height: auto; }
.label-print { width: calc(100% - 40px); margin: 0 20px 20px; }
.movement-panel { margin-top: 24px; }
.article-form, .compact-form { overflow: visible; }
.supplier-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 22px; }
.supplier-entry-grid fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.supplier-entry-grid legend { padding: 0 6px; font-weight: 700; }
.supplier-entry-grid label { display: grid; gap: 6px; margin-top: 11px; color: var(--muted); font-size: 13px; font-weight: 600; }
.supplier-entry-grid input { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.order-groups { display: grid; gap: 20px; }
.cart-qty { width: 76px; padding: 8px; }
.cart-total { position: sticky; bottom: 14px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 20px; padding: 18px 22px; color: white; background: var(--nav); border-radius: 14px; box-shadow: var(--shadow); }
.cart-total span, .cart-total small { display: block; color: #c7dbe6; }
.cart-total strong { display: block; margin: 4px 0; font: 600 26px "IBM Plex Mono", monospace; }
.cart-total .button { background: white; color: var(--nav); box-shadow: none; }
.purchase-order { overflow: visible; }
.po-head { display: grid; grid-template-columns: 1fr 1.4fr .7fr; gap: 24px; padding: 22px; border-bottom: 1px solid var(--line); }
.po-head span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.po-head strong, .po-head small { display: block; }
.purchase-order tfoot td { background: #f5f8f9; text-align: right; }
.po-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 22px; color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 13px; font-weight: 600; }
textarea { min-height: 110px; resize: vertical; }
.document-list { display: grid; gap: 10px; padding: 18px; }
.document { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.document button { border: 0; background: none; color: #08796d; font-weight: 700; }
.ai-box { margin: 18px; padding: 18px; color: white; background: var(--nav); border-radius: 12px; }
.ai-box h3 { margin: 0 0 8px; color: var(--cyan); }
.ai-box p { margin: 0 0 14px; color: #d9e8ef; }
.quick-entry { display: grid; gap: 9px; margin: 0 18px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.quick-entry label { font-weight: 700; }
.bt-create-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.back-button { border: 0; padding: 8px 0; background: transparent; color: #08796d; font-weight: 700; }
.draft-state { color: var(--muted); font-size: 13px; }
.bt-create { display: grid; grid-template-columns: minmax(0,1.5fr) 350px; gap: 24px; align-items: start; }
.bt-form-main { overflow: visible; }
.bt-form-side { display: grid; gap: 16px; position: sticky; top: 106px; }
.form-section { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; }
.form-section h2 { margin: 0; font-size: 20px; }
.form-section p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.step-mark { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--nav); color: white; font: 600 13px "IBM Plex Mono", monospace; }
.field-hint { color: var(--muted); }
.upload-zone { width: 100%; padding: 22px; border: 1px dashed #8fa5b4; border-radius: 10px; background: #f8fbfc; color: var(--ink); text-align: center; }
.upload-zone strong, .upload-zone span { display: block; }
.upload-zone span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.side-grid { grid-template-columns: 1fr; }
.human-check { padding: 16px 18px; border: 1px solid #ecd39e; border-radius: 11px; background: #fff5dd; }
.human-check strong { color: #8b5c00; }
.human-check p { margin: 5px 0 0; color: #694c16; font-size: 13px; }
.submit-stack { display: grid; gap: 9px; }
.work-summary { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); }
.work-summary > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.work-summary > div:last-child { border-right: 0; }
.work-summary span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.part-line { display: grid; grid-template-columns: minmax(0,1fr) 90px auto auto; gap: 10px; padding: 18px 22px 12px; }
.request-context { display: grid; grid-template-columns: 1.6fr 1fr 1fr; border-bottom: 1px solid var(--line); background: #f8fbfc; }
.request-context > div { padding: 15px 18px; border-right: 1px solid var(--line); }
.request-context > div:last-child { border-right: 0; }
.request-context span, .request-context strong { display: block; }
.request-context span { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.voice-field { position: relative; }
.voice-field textarea { padding-right: 86px; }
.voice-button { position: absolute; top: 28px; right: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #08796d; font-weight: 700; }
.used-parts { display: grid; gap: 8px; padding: 0 22px 22px; }
.used-parts > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfc; }
.used-parts span strong, .used-parts span small { display: block; }
.used-parts span small { margin-top: 3px; color: var(--muted); }
.used-parts button { border: 0; background: transparent; color: var(--red); font-weight: 700; }
.used-parts > p { margin: 4px 0 0; color: var(--muted); }
.inline-select { min-width: 118px; padding: 7px 9px; }
.status.clickable { border: 0; cursor: pointer; }
.compact-timeline { max-height: 240px; overflow: auto; }
.bt-tabs { margin-top: -6px; }
.report-preview { padding: 20px 22px; }
.report-preview p { margin: 8px 0 16px; color: var(--muted); line-height: 1.55; }
.report-bars { padding: 24px; display: grid; gap: 18px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; align-items: center; gap: 14px; }
.bar-track { height: 18px; background: #e5ecef; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; width: var(--value); background: var(--teal); border-radius: inherit; transform-origin: left; animation: grow .7s cubic-bezier(.16,1,.3,1); }
@keyframes grow { from { transform: scaleX(0); } }
.architecture { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.architecture-image { width: 100%; display: block; border-radius: 14px; box-shadow: var(--shadow); background: var(--nav); }
.tree-overview { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 24px; border-block: 1px solid var(--line); background: rgba(255,255,255,.48); }
.tree-overview > div { padding: 17px 22px; border-right: 1px solid var(--line); }
.tree-overview > div:last-child { border-right: 0; }
.tree-overview span,.tree-overview strong { display: block; }
.tree-overview span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.tree-overview strong { margin-top: 5px; font: 600 24px "IBM Plex Mono",monospace; }
.tree-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 24px; align-items: start; }
.tree-panel { overflow: visible; }
.equipment-tree { padding: 8px 22px 24px; }
.tree-branch,.tree-leaf { position: relative; }
.tree-branch summary { list-style: none; cursor: pointer; }
.tree-branch summary::-webkit-details-marker { display: none; }
.tree-node-main { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 52px; padding: 8px 10px; border-bottom: 1px solid #e5ecef; }
.tree-node-main:hover { background: #f4f8f9; }
.tree-node-main strong,.tree-node-main small { display: block; }
.tree-node-main small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.tree-node-main p { margin: 4px 0 0; color: #52667a; font-size: 12px; }
.tree-node-main img { width: 62px; height: 44px; object-fit: cover; border-radius: 5px; }
.tree-marker { width: 10px; height: 10px; border: 1px solid #8fa5b4; border-radius: 2px; background: white; }
.tree-branch > summary .tree-marker::after { content: ""; display: block; width: 4px; height: 4px; margin: 2px; background: var(--teal); }
.tree-branch[open] > summary > .tree-node-main > .tree-marker { background: var(--nav); border-color: var(--nav); }
.tree-children { margin-left: 18px; padding-left: 18px; border-left: 1px solid #cad7de; }
.tree-count { position: absolute; right: 84px; top: 17px; padding: 3px 7px; border-radius: 999px; color: var(--muted); background: #edf3f5; font: 600 11px "IBM Plex Mono",monospace; }
.tree-node-main:not(:has(img)) + .tree-count { right: 12px; }
.tree-help { position: sticky; top: 106px; display: grid; gap: 16px; }
.tree-help .ai-box { margin: 0; }
.tree-help .ai-box strong { color: var(--cyan); font: 600 13px "IBM Plex Mono",monospace; }
.tree-legend { display: grid; gap: 13px; padding: 18px 22px 22px; }
.tree-legend span { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.tree-legend i { width: 14px; height: 14px; border-radius: 3px; background: var(--teal); }
.tree-legend .legend-doc { background: var(--violet); }
.tree-legend .legend-note { background: var(--amber); }
.role-map { display: grid; gap: 10px; }
.role-line { padding: 14px 16px; border-radius: 10px; background: white; border: 1px solid var(--line); }
.role-line strong { display: block; margin-bottom: 3px; }
.role-line small { color: var(--muted); }
.empty { padding: 60px 24px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 380px; padding: 14px 18px; border-radius: 10px; background: var(--nav); color: white; box-shadow: var(--shadow); transform: translateY(130%); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.toast.show { transform: translateY(0); }

@media (max-width: 1050px) {
  body::before { left: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; width: min(310px,88vw); transform: translateX(-105%); transition: transform .3s cubic-bezier(.16,1,.3,1); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: inline-flex; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-2, .detail-layout, .architecture, .bt-create, .part-detail, .tree-layout { grid-template-columns: minmax(0,1fr); }
  .command-hero { grid-template-columns: 1fr; gap: 28px; }
  .ai-manifesto { max-width: 650px; }
  .flow-map { grid-template-columns: 1fr 1fr; }
  .flow-map > div:nth-child(2) { border-right: 0; }
  .flow-map > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .supplier-entry-grid { grid-template-columns: 1fr; }
  .bt-form-side { position: static; }
  .tree-help { position: static; }
}
@media (max-width: 680px) {
  .topbar { height: auto; min-height: 74px; padding: 12px 16px; gap: 10px; }
  .site-label, .profile-switcher label { display: none; }
  .context strong { font-size: 17px; }
  .context { flex: 0 1 auto; }
  .context strong { max-width: 118px; }
  .profile-switcher { min-width: 0; }
  .profile-switcher select { width: 122px; max-width: 34vw; padding: 9px; }
  main { padding: 22px 14px 40px; }
  .page-heading h1 { font-size: 30px; }
  .command-hero { min-height: 0; margin: -22px -14px 0; padding: 34px 20px 30px; }
  .command-hero h1 { font-size: 38px; }
  .command-hero p { font-size: 16px; }
  .command-hero .actions { display: grid; }
  .command-hero .button { width: 100%; }
  .ai-manifesto { grid-template-columns: 52px 1fr; padding: 18px; }
  .ai-orbit { width: 50px; height: 50px; }
  .ai-manifesto strong { font-size: 18px; }
  .flow-map { grid-template-columns: 1fr; margin: 0 -14px 24px; padding: 0 14px; }
  .flow-map > div { min-height: 84px; padding: 14px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-map > div:nth-child(2) { border-right: 0; }
  .flow-map > div:not(:last-child)::after { right: auto; left: 25px; top: auto; bottom: -6px; transform: rotate(90deg); }
  .page-heading { display: block; }
  .page-heading .actions { margin-top: 16px; }
  .notice { display: grid; align-items: start; }
  .notice button { width: 100%; margin-left: 0; }
  .workflow-strip { grid-template-columns: 1fr; }
  .magasin-tabs { display: none; }
  .magasin-mobile-select { display: block; }
  .stock-subnav.compact { width: 100%; }
  .stock-subnav.compact button { flex: 1; min-width: 0; }
  .filters > * { width: 100%; min-width: 0 !important; }
  .panel-head { align-items: flex-start; flex-wrap: wrap; }
  .table-wrap { max-width: calc(100vw - 28px); }
  .bt-create-head { align-items: flex-start; }
  .draft-state { text-align: right; }
  .form-section { padding: 18px 16px 0; }
  .bt-create .form-grid { padding: 18px 16px; }
  .work-summary { grid-template-columns: 1fr; }
  .work-summary > div { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .request-context { grid-template-columns: 1fr; }
  .request-context > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .part-line { grid-template-columns: 1fr; padding: 16px; }
  .part-line > * { width: 100%; }
  .used-parts { padding: 0 16px 18px; }
  .used-parts > div { grid-template-columns: 1fr auto; }
  .used-parts button { grid-column: 1 / -1; text-align: left; }
  .row-actions { flex-direction: column; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-grid > div:nth-child(odd) { border-right: 0; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .tree-overview { grid-template-columns: 1fr 1fr; }
  .tree-overview > div:nth-child(2) { border-right: 0; }
  .tree-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .equipment-tree { padding: 6px 12px 18px; }
  .tree-children { margin-left: 7px; padding-left: 10px; }
  .tree-node-main { grid-template-columns: 14px minmax(0,1fr) auto; gap: 8px; padding-inline: 5px; }
  .tree-node-main img { width: 48px; height: 38px; }
  .tree-count { display: none; }
  .metric { padding: 16px; }
  .metric strong { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .bar-row { grid-template-columns: 110px 1fr; }
  .bar-row .mono { grid-column: 2; }
  .po-head { grid-template-columns: 1fr; gap: 14px; }
  .cart-total { align-items: stretch; flex-direction: column; }
  .cart-total .button { width: 100%; }
}
@media print {
  body { background: white; }
  body.print-label-mode .app-shell, body.print-label-mode .toast { display: none !important; }
  body.print-label-mode #printableLabel { position: fixed; inset: 0; width: 90mm; height: 55mm; margin: 0; border: 1px solid #000; border-radius: 0; display: grid; align-content: center; color: #000; }
  body.print-label-mode #printableLabel small, body.print-label-mode #printableLabel > span { color: #000; }
  .sidebar, .topbar, .page-heading, .back-button, .po-foot, .toast { display: none !important; }
  .app-shell { display: block; }
  main { max-width: none; padding: 0; }
  .purchase-order { box-shadow: none; border: 1px solid #999; break-after: page; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
