/* Shared tokens and the guest landing stylesheet are loaded before this file. */
@font-face {
  font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/family/golos-text.ttf') format('truetype');
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  font: 15px/1.55 'Golos Text',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
#app { flex: 1; min-height: 0; overflow: auto; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-size: var(--fs-4); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2, h3 { font-weight: 600; }
h2 { font-size: var(--fs-3); margin: 0 0 10px; }
h3 { font-size: var(--fs-2); margin: 0 0 8px; }
small, .hint, .eyebrow { font-size: var(--fs-1); color: var(--faint); }
.eyebrow { font-size: 11px; letter-spacing: .04em; font-weight: 600; margin: 0 0 4px; }
.skip { position: fixed; left: -200vw; }
.skip:focus { top: 4px; left: 4px; z-index: 100; background: var(--panel); padding: 8px; }
main.loading { margin: 8vh 5vw; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Guest view: use the original landing-v2 rules, with a logistics preview in the screen slot. */
.ln .ln-btn { border: 0; font-family: inherit; }
.ln-login { border: 0; padding: 6px 0; background: transparent; font: inherit; }
.ln .ln-hero { min-height: 480px; height: clamp(480px,75vh,720px); }
.ln .ln-hero-in { pointer-events: none; }
.ln .ln-hero-text { pointer-events: auto; }
.ln .ln-hero-shot { inset-block: auto; width: min(640px,47vw); }
.ln .ln-screen.sample { color: var(--ink); background: var(--bg); height: auto; border-radius: 16px; font-size: 15px; }
.sample-head { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ln .sample-head img { width: 30px; height: 30px; }
.sample-head span { margin-left: auto; color: var(--muted); font-size: var(--fs-1); }
.sample-main { padding: 20px; }
.sample-main .metrics { margin: 14px 0; grid-template-columns: repeat(3,minmax(0,1fr)); }
.sample-main .metric { padding: 8px 12px; }
.sample-main h2 { font-size: var(--fs-4); }
.sample-main .panel { margin: 0; }
.ln .ln-steps { padding-left: 0; }
.ln :focus-visible { outline-color: var(--gold); }

/* Cabinet: two-row light header, like TopBar and .sect in the reference. */
.shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding-inline: clamp(16px,3.5vw,64px); }
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.topline, .tools, .brand, .sect, .actions, .toolbar, .between { display: flex; align-items: center; }
.topline { gap: 16px; padding: 10px 0 4px; }
.brand { gap: 8px; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.company { color: var(--muted); font-size: var(--fs-1); }
.tools { margin-left: auto; gap: 8px; flex-wrap: wrap; }
.tools label { display: inline-flex; align-items: center; gap: 6px; }
.tools select { height: 34px; font-size: var(--fs-1); }
.sect { gap: 4px; padding: 6px 2px; overflow-x: auto; scrollbar-width: thin; }
.navitem { display: inline-flex; gap: 7px; align-items: center; text-decoration: none; white-space: nowrap; flex: none; border-radius: 9px; padding: 6px 10px; font-size: 14px; color: var(--muted); }
.navitem:hover { color: var(--ink); background: var(--hover); }
.navitem.active { background: var(--accent-soft); color: var(--accent-text); }
.body { overflow: auto; scroll-padding-block: 8px; padding-block: 24px 80px; }
.between { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.heading { align-items: end; margin-bottom: 14px; }
.heading p { margin: 6px 0 0; color: var(--muted); }
.actions, .toolbar { gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); text-decoration: none;
  transition: background-color var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast);
}
.btn:hover:not(:disabled) { border-color: var(--accent); box-shadow: var(--shadow-1); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb,var(--accent) 88%,var(--ink)); }
.btn.negative, .late { color: var(--overdue-ink); }
.btn.compact, .btn.icon-btn { min-height: 34px; padding: 0 10px; font-size: var(--fs-1); }
.btn.icon-btn { width: 34px; padding: 0; }

/* Lists, state chips and operational numbers use the same surfaces and status inks. */
.metrics, .cols, .cards, .board, .stack { display: grid; gap: 14px; }
.metrics, .panel, .boardcol, dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-1); }
.metrics { grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 0; padding: 8px; margin: 14px 0; }
.metrics:empty { display: none; }
.panel + .metrics:empty + .cols { margin-top: 14px; }
.metric { display: grid; align-content: start; padding: 12px 18px; color: var(--ink); border-right: 1px solid var(--line); text-decoration: none; }
.metric:last-child { border-right: 0; }
.metric small { color: var(--muted); }
.metric strong { font-size: var(--fs-4); font-weight: 500; overflow-wrap: anywhere; }
a.metric:hover { background: var(--soft); border-radius: 8px; }
.metric.tint strong { color: var(--accent-text); }
.metric.risk strong { color: var(--overdue-ink); }
.cols { grid-template-columns: minmax(0,1.4fr) minmax(250px,1fr); align-items: start; }
.cards { grid-template-columns: repeat(auto-fit,minmax(min(250px,100%),1fr)); }
.stack { grid-template-columns: minmax(0,1fr); gap: 16px; }
.panel, .boardcol { min-width: 0; padding: 18px 22px; }
.panel > .between:first-child h2 { margin: 0; }
.trackrow, .item { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 0; }
.trackrow:last-child, .item:last-child { border-bottom: 0; }
.trackrow, .route, .ticket { color: var(--ink); text-decoration: none; }
.trackrow:hover strong, .route:hover { color: var(--accent-text); text-decoration: underline; }
.trackrow > div, .item > div { min-width: 0; overflow-wrap: anywhere; }
.trackrow small, .item small, td small, .ticket strong, .ticket small, .history small { display: block; }
.trackrow strong, .route, .ticket strong { font-weight: 500; }
.logoLink, .back { color: var(--accent-text); text-decoration: none; font-size: var(--fs-1); font-weight: 500; }
.logoLink:hover, .back:hover { text-decoration: underline; }
.back { display: inline-block; margin-bottom: 8px; }
.bar-group { margin: 12px 0; }
.bar-group a { text-decoration: none; color: var(--ink); }
.barline { margin-top: 4px; }
.barline progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: var(--soft); color: var(--accent); accent-color: var(--accent); }
.barline progress::-moz-progress-bar { background: var(--accent); }
.barline progress::-webkit-progress-bar { background: var(--soft); }
.barline progress::-webkit-progress-value { background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.loading { color: var(--warn-ink); background: var(--warn-soft); }
.pill.transit { color: var(--info); background: var(--info-soft); }
.pill.review { color: var(--accent-text); background: var(--accent-soft); }
.pill.closed { color: var(--done-ink); background: color-mix(in srgb,var(--done) 13%,var(--panel)); }
.empty { color: var(--muted); padding: 8px 0; }
.toolbar { margin-bottom: 14px; }
.toolbar input { flex: 1 1 200px; }
.tablewrap, .board { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { color: var(--faint); font-size: var(--fs-1); font-weight: 500; padding-block: 8px; white-space: nowrap; }
tbody tr:last-child td { border: 0; }
tbody tr:hover { background: color-mix(in srgb,var(--hover) 55%,transparent); }
.mono { white-space: nowrap; font-size: var(--fs-1); text-decoration: none; }
.board { grid-template-columns: repeat(5,minmax(178px,1fr)); padding: 2px 0 10px; }
.boardcol { padding: 12px; background: var(--soft); box-shadow: none; }
.boardcol h2 { font-size: var(--fs-2); }
.ticket { display: block; padding: 12px; border: 1px solid var(--line2); background: var(--panel); border-radius: 11px; margin-top: 8px; }
.ticket:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0; }
.steps li { flex: 1; min-width: 100px; border-top: 4px solid var(--line2); padding-top: 6px; color: var(--muted); font-size: var(--fs-1); }
.steps .past { border-color: var(--done); }
.steps .now { border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 0; }
.facts dt { font-size: var(--fs-1); color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.history { margin: 0; padding-left: 20px; }
.history li { padding: 0 0 10px 4px; overflow-wrap: anywhere; }
.history li::marker { color: var(--faint); font-size: var(--fs-1); }
.word { overflow-wrap: anywhere; }

/* Forms and dialogs */
input, select, textarea { min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--panel); color: var(--ink); }
input, select { height: 42px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field { display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-1); }
.field input, .field select { width: 100%; font-size: var(--fs-2); }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full { grid-column: 1/-1; }
.inlineform { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.inlineform input, .inlineform textarea { flex: 1 1 130px; }
.error:not(:empty) { margin: 10px 0; padding: 11px 16px; background: color-mix(in srgb,var(--overdue) 10%,var(--panel)); border-radius: 12px; color: var(--overdue-ink); }
dialog { width: min(590px,94vw); max-height: 88vh; overflow-y: auto; padding: 22px; color: var(--ink); box-shadow: var(--shadow-3); }
dialog h2 { margin: 0; }
dialog form { margin-top: 16px; }
dialog::backdrop { background: rgba(30,34,39,.42); }
/* The live status has its own row, so its text never covers a form control. */
#toast { flex: none; background: var(--panel); border-top: 1px solid var(--line2); color: var(--ink); text-align: center; padding: 6px 16px max(6px,env(safe-area-inset-bottom)); }

@media (max-width:1080px) {
  .ln .ln-hero { min-height: 0; height: auto; }
  .ln .ln-hero-shot { width: min(660px,calc(100% - 32px)); margin-bottom: 24px; }
}
@media (max-width:850px) {
  .cols { grid-template-columns: minmax(0,1fr); }
  .tools .compact span { display: none; }
  .tools .compact { width: 34px; padding-inline: 0; }
}
@media (max-width:700px) {
  .wrap { padding-inline: 16px; }
  .company { display: none; }
  .tools, .topline { gap: 6px; }
  .tools label, .tools select { font-size: 12px; }
  .brand { gap: 4px; }
  .brand img { width: 30px; height: 30px; }
  .body { padding-top: 18px; }
  .panel { padding: 14px 16px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { padding: 8px; }
  .metric:nth-child(even) { border: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sample-main .metric { border-top: 0; }
  .formgrid { grid-template-columns: minmax(0,1fr); }
  .tablewrap { max-width: 100%; }
  .ln .ln-hero-shot { width: calc(100% - 32px); margin-inline: 16px; }
}
@media (max-width:400px) {
  .topline { flex-wrap: wrap; }
  .tools label { font-size: 0; gap: 0; }
  .sample-head span { font-size: 11px; }
  .sample-main { padding: 12px; }
}
@media (prefers-reduced-motion:reduce) { .btn { transition: none; } }
