:root {
  color-scheme: light;
  --canvas: #f7f8fa;
  --paper: #fff;
  --ink: #152337;
  --muted: #536477;
  --line: #dce2e9;
  --blue: #1b60c6;
  --blue-hover: #164e9f;
  --wash: #eaf2ff;
  --green: #186346;
  --green-wash: #e7f4eb;
  --danger: #a53230;
  --radius: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  font: 15px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input,select {
  font: inherit;
}

a {
  color: var(--blue);
}

button,a,input {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .55;
}

:focus-visible {
  outline: 3px solid #4784e0;
  outline-offset: 3px;
}

button,.button {
  transition: background .12s,color .12s;
}

.skip,.sr {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  z-index: 9;
  clip-path: none;
  width: auto;
  height: auto;
  background: white;
  padding: 12px;
}

.loading {
  padding: 40px;
}

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 84px minmax(0,1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 20px 7px 14px;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -.05em;
}

.mark {
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
}

.mark svg {
  width: 25px;
  height: 25px;
}

.rail .mark {
  margin-bottom: 30px;
}

.rail-bottom {
  margin-top: auto;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  width: 68px;
  min-height: 57px;
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
}

.nav-link:hover,.tab:hover {
  background: #f2f5f9;
}

.nav-link.current {
  background: var(--wash);
  color: var(--blue);
}

.ico {
  height: 20px;
  width: 20px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  flex: none;
}

.topbar {
  height: 66px;
  padding: 0 clamp(20px,4vw,58px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.crumb,.inline,.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crumb {
  color: var(--muted);
  font-size: 14px;
}

.crumb strong {
  color: var(--ink);
}

.sep {
  color: #9ba8b7;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e7eefb;
  color: #244b85;
  font-size: 12px;
  font-weight: 700;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.profile small {
  display: block;
  color: var(--muted);
  line-height: 1.25;
}

.content {
  max-width: 1220px;
  margin: auto;
  padding: clamp(25px,4.4vw,62px) clamp(18px,4vw,60px) 70px;
}

.pagehead,.panel-head,.row-end {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.pagehead {
  margin-bottom: 22px;
}

.pagehead p,.empty p,.panel p,.card p,.intro,.muted {
  color: var(--muted);
}

h1,h2,h3,p {
  margin: 0;
}

h1 {
  font-weight: 680;
  font-size: clamp(29px,3.2vw,42px);
  line-height: 1.13;
  letter-spacing: -.049em;
}

h2 {
  font-size: 19px;
  letter-spacing: -.025em;
  font-weight: 670;
}

h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.pagehead p {
  margin-top: 8px;
  font-size: 15px;
}

.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tab {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 3px 12px;
  text-decoration: none;
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  background: var(--paper);
  border: 1px solid #c9d2dd;
  color: var(--ink);
  font-weight: 620;
  padding: 8px 15px;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover {
  background: #f1f4f8;
}

.btn.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.btn.primary:hover {
  background: var(--blue-hover);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn .ico {
  width: 17px;
  height: 17px;
}

.btn.small {
  min-height: 35px;
  font-size: 13px;
  padding: 5px 11px;
}

.panel,.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel+.panel,.card+.panel,.stack>*+* {
  margin-top: 18px;
}

.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head small,.count,.caption {
  color: var(--muted);
  font-size: 13px;
}

.card {
  padding: 22px;
}

.station-current {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.station-current h2 {
  font-size: 17px;
}

.station-current p {
  font-size: 13px;
  margin-top: 3px;
}

.station-current .badge {
  margin-left: auto;
}

.iconbox {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--wash);
  color: var(--blue);
}

.empty {
  text-align: center;
  padding: 48px 20px 54px;
}

.empty .iconbox {
  margin-bottom: 12px;
}

.empty p {
  font-size: 14px;
  max-width: 43ch;
  margin: 5px auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  background: #eef1f5;
  color: #4b596a;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.badge.good {
  background: var(--green-wash);
  color: var(--green);
}

.badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: currentColor;
}

.table-scroll {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}

th {
  background: #fafbfd;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

td,th {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: none;
}

.panel .table-scroll:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.actions {
  flex-wrap: wrap;
}

.table-action {
  text-align: right;
}

.form-panel {
  max-width: 570px;
}

.form-body {
  padding: 23px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

.field input {
  border: 1px solid #b8c4d2;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 7px;
  color: var(--ink);
  width: 100%;
  background: var(--paper);
}

.field small {
  font-weight: 400;
  color: var(--muted);
}

.feedback {
  color: var(--danger);
  margin-bottom: 16px;
  font-weight: 530;
}

.feedback:empty {
  display: none;
}

.notice {
  color: var(--green);
  margin-bottom: 14px;
}

.login {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 72px 1fr;
}

.login header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px,5vw,68px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.login-card {
  align-self: start;
  width: min(410px,calc(100% - 36px));
  margin: clamp(35px,11vh,130px) auto;
  padding: 28px;
}

.login-card h1 {
  font-size: 30px;
  margin: 8px 0;
}

.login-card p {
  margin-bottom: 23px;
}

.login-card .btn {
  width: 100%;
}

.login-card .demo {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 17px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr));
  gap: 16px;
}

.guide-grid .card p {
  margin: 6px 0 15px;
}

.sample-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.swatch b {
  display: block;
  width: 54px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.swatch .ink {
  background: var(--ink);
}

.swatch .action {
  background: var(--blue);
}

.swatch .paper {
  background: var(--paper);
}

.swatch .success {
  background: var(--green);
}

.guide-main {
  max-width: 1000px;
}

.guide-main .panel {
  margin: 16px 0;
}

.guide-main li {
  margin: .4em 0;
}

code {
  font-size: .89em;
  background: #eff2f6;
  padding: 1px 4px;
  border-radius: 3px;
}

time {
  white-space: nowrap;
}

@media(max-width:680px) {
  .shell {
    display: block;
    min-height: 100dvh;
  }
  .rail {
    position: fixed;
    z-index: 4;
    top: auto;
    bottom: 0;
    height: 62px;
    width: 100%;
    padding: 3px 12px;
    flex-direction: row;
    justify-content: space-around;
    border: 0;
    border-top: 1px solid var(--line);
  }
  .rail .mark {
    display: none;
  }
  .rail-bottom {
    margin: 0;
  }
  .nav-link {
    min-height: 49px;
  }
  .topbar {
    height: 56px;
    padding: 0 16px;
  }
  .content {
    padding: 25px 16px 88px;
  }
  .profile .who {
    display: none;
  }
  .pagehead {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .tabs {
    gap: 17px;
  }
  .panel-head,.card,.form-body {
    padding: 16px;
  }
  td,th {
    padding: 10px 12px;
  }
  .station-current {
    gap: 10px;
  }
  .station-current .badge {
    white-space: normal;
  }
  .empty {
    padding: 30px 14px;
  }
  .crumb {
    gap: 5px;
  }
  .profile {
    gap: 3px;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none!important;
  }
}

.editor { max-width: 660px; }
.field-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr)); gap:0 16px; }
.field select { border:1px solid #b8c4d2; padding:10px 12px; min-height:44px; border-radius:7px; background:var(--paper); color:var(--ink); width:100%; }
.check-field { display:flex; gap:8px; align-items:center; padding:5px 0; margin-bottom:8px; }
.check-field input { width:18px; height:18px; }
.optional { border-top:1px solid var(--line); padding:12px 0; }
.optional summary { font-weight:600; color:var(--blue); cursor:pointer; }
.optional > div { padding-top:16px; }
.editor .actions { margin-top:16px; }
.search-line { display:flex; gap:12px; align-items:flex-end; max-width:680px; }
.search-line .field { margin:0; flex:1; }
.menu-rows { display:grid; }
.menu-row { display:flex; align-items:center; gap:16px; padding:15px 22px; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line); }
.menu-row:last-child { border-bottom:0; }
.menu-row:hover { background:var(--wash); }
.menu-row small { display:block; color:var(--muted); font-size:13px; font-weight:400; }
.row-price { margin-left:auto; text-align:right; white-space:nowrap; font-weight:620; }
.menu-actions,.filters { display:flex; flex-wrap:wrap; gap:8px; }
.menu-actions { margin-bottom:20px; }
.filters,.facts,.quote-actions { padding:16px 22px; }
.facts { margin:0; }
.facts div { display:flex; align-items:baseline; justify-content:space-between; gap:18px; padding:5px 0; }
.facts dt { color:var(--muted); }
.facts dd { text-align:right; margin:0; overflow-wrap:anywhere; }
.filters .selected { background:var(--wash); border-color:var(--blue); color:var(--blue); }
.pricing-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.95fr); gap:20px; align-items:start; }
.pricing-layout .panel { margin-top:0; }
.quote-line { padding:14px 22px 0; }
.quote-line .facts { padding:8px 0; }
.quote>.facts { border-top:1px solid var(--line); }
.quote>.facts div:first-child { font-weight:700; font-size:18px; }
@media(max-width:780px){ .pricing-layout { grid-template-columns:minmax(0,1fr); } .menu-row { padding:12px; gap:8px; } }

[hidden] { display:none !important; }
.field textarea { min-height:76px; padding:10px 12px; border:1px solid #b8c4d2; border-radius:7px; font:inherit; }

.work-set { margin:14px 0; padding:14px; border:1px solid var(--line); border-radius:var(--radius); min-width:0; }
.work-set legend { font-weight:650; padding:0 5px; }
.panel>.work-set { margin:14px 18px; }
.stage-items { border:0; margin:0 0 16px; padding:0; min-width:0; }
.stage-items legend { margin-bottom:8px; font-weight:650; }
.stage-choice { display:flex; align-items:center; gap:12px; min-height:48px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; margin-bottom:6px; cursor:pointer; overflow-wrap:anywhere; }
.stage-choice input { margin:0; inline-size:18px; block-size:18px; flex:none; accent-color:var(--blue); }
.stage-choice small { display:block; color:var(--muted); }
.stage-choice:has(:checked) { border-color:var(--blue); background:var(--wash); }
.stage-choice:has(:focus-visible) { outline:2px solid var(--blue); outline-offset:2px; }
.stage-choice:has(:disabled) { cursor:default; color:var(--muted); }
.stage-state { margin-left:auto; text-align:right; font-size:13px; }
form[data-work-form="stage"] { max-width:680px; }
form[data-work-form="stage"] .optional { margin-bottom:14px; }
#tag-match:empty { display:none; }
.workflow-actions { margin:16px 0; }
.panel-actions { padding:12px 20px 20px; }
.flow-tabs { overflow-x:auto; }
td small { display:block; color:var(--muted); }
.unit-label { padding:18px; margin:12px; border:1px dashed var(--line); }
.unit-label h2 { font-family:monospace; letter-spacing:.08em; }
@media(max-width:680px){.rail { overflow-x:auto; }.rail .nav-link{min-width:48px;width:auto;flex:1;} .topbar{padding-inline:10px;} .flow-tabs{gap:10px;} }
@media print{
  body,#app,.shell,.shell>div,.content { display:block; padding:0; margin:0; background:white; max-width:none; min-height:0; }
  .rail,.topbar,.pagehead,.actions,.notice,.feedback,.skip,.sr { display:none!important; }
  .print-document { border:0; }.unit-label { break-inside:avoid; break-after:page; margin:0; border:0; }.unit-label:last-child{break-after:auto;}
}

.pickup-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:6px 16px; padding:12px 0; border-bottom:1px solid var(--line); }
.pickup-row details { grid-column:1/-1; }
.pickup-row summary { cursor:pointer; }

.auth-actions{display:grid;gap:.75rem;margin:1rem 0}.auth-actions a{text-align:center}.login-card hr{border:0;border-top:1px solid #dbe2e8;margin:1.5rem 0}
