:root {
  --primary: oklch(.55 .18 264);
  --primary-dark: oklch(.45 .18 264);
  --accent: oklch(.94 .03 264);
  --ink: oklch(.2 .02 270);
  --muted: oklch(.5 .05 270);
  --line: oklch(.88 .03 270);
  --paper: #fff;
  --bg: oklch(.985 .002 270);
  font: 13px/1.45 Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.skip, .sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 10; clip-path: none; padding: 6px 12px; width: auto; height: auto; background: white; }
.top { min-height: 76px; display: flex; align-items: center; gap: 38px; padding: 0 38px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { color: var(--primary); font-size: 27px; font-weight: 800; letter-spacing: -1px; white-space: nowrap; }
.brand span { font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.nav { display: flex; gap: 24px; align-self: stretch; }
.nav a { display: grid; align-content: center; padding: 0 4px; color: var(--muted); border-bottom: 3px solid transparent; }
.nav a[aria-current] { color: var(--primary-dark); border-color: var(--primary); }
.list-tabs { display: flex; flex-wrap: wrap; gap: 4px 14px; border-bottom: 1px solid var(--line); margin-top: 12px; }
.list-tabs a { padding: 8px 10px; color: var(--muted); border-bottom: 2px solid transparent; }
.list-tabs a[aria-current] { color: var(--primary-dark); border-color: var(--primary); }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.workspace { margin: 0 auto; padding: 32px 38px 48px; max-width: 1680px; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.65px; margin: 0; }
h2 { font-size: 17px; line-height: 1.3; margin: 0; }
.muted { color: var(--muted); }
.heading, .toolbar, .row-actions, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.heading { justify-content: space-between; margin-bottom: 16px; }
.breadcrumb { margin: 0 0 5px; }
.heading.section { margin: 23px 0 9px; }
.toolbar { align-items: flex-end; margin: 16px 0 10px; }
.toolbar.compact { margin: 0; }
.toolbar.actions { gap: 15px; }
label:not(.check) { display: grid; gap: 4px; color: var(--muted); }
.check { display: inline-flex; gap: 5px; align-items: center; min-height: 26px; white-space: nowrap; }
input, select, textarea, button, .button {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 5px; min-height: 26px; padding: 3px 7px;
}
input[type="checkbox"] { min-height: 0; accent-color: var(--primary); }
input[type="search"] { min-width: 200px; }
textarea { resize: vertical; }
button, .button { cursor: pointer; white-space: nowrap; font-weight: 500; }
button:hover, .button:hover { background: var(--accent); text-decoration: none; }
.primary { background: var(--primary); border-color: var(--primary); color: white; }
.primary:hover { background: var(--primary-dark); }
.quiet { color: var(--muted); border-color: transparent; }
.table-scroll { overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left; font-size: 12px; }
thead th { background: oklch(.97 .01 270); color: var(--muted); font-weight: 600; white-space: nowrap; }
td, th { border-bottom: 1px solid oklch(.94 .012 270); min-height: 31px; height: 31px; padding: 2px 8px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: oklch(.975 .012 264); }
.item { font-weight: 600; }
.new-products .project-column { width: 24%; }
.new-products .position-column { width: 1%; }
.new-products td:nth-child(3) { overflow-wrap: anywhere; }
.sub { display: block; font-size: 11px; }
.empty { padding: 20px 12px; color: var(--muted); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.login { max-width: 410px; margin: 40px auto; padding: 24px; }
.stack { display: grid; gap: 10px; }
.stack button { justify-self: start; }
.login input { min-height: 38px; }
.notice { border-radius: 6px; padding: 7px 10px; border: 1px solid var(--line); }
.notice.error { background: #fff0ed; color: #8e322c; }
.notice.warning { background: #fff2da; color: #795312; }
.readiness { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.readiness > div { display: grid; gap: 3px; justify-items: start; }
.status { display: inline-block; padding: 2px 7px; border-radius: 4px; white-space: nowrap; background: #f0f2f6; color: #484e5b; font-weight: 500; }
.status.ready { background: #e8f5ec; color: #256041; }
.status.manual { background: var(--accent); color: var(--primary-dark); }
.status.waiting { background: #fff2da; color: #795312; }
.details { margin-top: 10px; }
.details summary { cursor: pointer; font-weight: 600; }
.details form { margin-top: 8px; }
.materials :is(input, select) { font-size: 12px; }
.material-search { position: relative; }
.material-search input { min-width: 218px; width: 100%; }
.material-suggestions { position: absolute; z-index: 5; top: 100%; left: 0; min-width: 100%; width: min(360px, calc(100vw - 28px)); max-height: 250px; overflow: auto; margin: 3px 0 0; padding: 3px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px #24365c22; }
.material-suggestions li { padding: 7px 9px; cursor: pointer; overflow-wrap: anywhere; }
.material-suggestions li:hover, .material-suggestions li[aria-selected="true"] { background: var(--accent); }
.material-suggestions small { display: block; color: var(--muted); }
.materials select { min-width: 130px; }
.materials .name { width: clamp(230px, 23vw, 420px); }
.materials .article { width: 125px; }
.number { width: 88px; }
.unit { width: 70px; }
.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-actions { flex-wrap: nowrap; gap: 5px; }
.history { padding-left: 18px; }
.pagination { margin-top: 12px; color: var(--muted); }
.wrap { min-width: 180px; }
.demand-items summary { cursor: pointer; padding-block: 5px; }
.demand-items ul { margin: 2px 0 8px; padding-left: 18px; max-width: 580px; }
.demand-items li { margin-top: 4px; overflow-wrap: anywhere; }
.demand-items li span { margin-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .top { min-height: 64px; padding: 6px 14px; gap: 12px; flex-wrap: wrap; }
  .nav { flex-wrap: wrap; gap: 4px 12px; }
  .account span { max-width: 18ch; overflow-wrap: anywhere; }
  .workspace { padding: 20px 14px 32px; }
  h1 { font-size: 23px; }
  .toolbar, .header { gap: 10px; }
  .nav a, button, .button, input:not([type="checkbox"]), select { min-height: 44px; font-size: 14px; }
  .list-tabs a { min-height: 44px; display: grid; align-content: center; }
  .readiness { gap: 9px 14px; }
  .row-actions button { padding: 3px 7px; }
}
