@font-face {
  font-family: Inter;
  src: url("/inter-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/inter-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  font-family: Inter, Arial, sans-serif;
  color: #1d2b3e;
  background: #f4f6fa;
  font-size: 16px;
  --blue: #2855dc;
  --border: #e4e9f1;
  --muted: #64748b;
  --soft: #f3f6fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button {
  color: inherit;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #85a4ff;
  outline-offset: 3px;
}
button:hover {
  filter: brightness(0.97);
}
[hidden] {
  display: none !important;
}
.app {
  max-width: 1040px;
  margin: auto;
  padding: 0 36px;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  text-decoration: none;
  color: #1d2b3e;
  font-weight: 600;
  letter-spacing: -0.6px;
  font-size: 20px;
}
.brand > span:first-child {
  color: var(--blue);
}
.brand-note {
  display: inline-block;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  border-left: 1px solid #cbd5e1;
  margin-left: 20px;
  padding-left: 20px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.connection i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #218764;
}
.workspace {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.heading {
  padding: 28px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.heading-actions {
  display: flex;
  gap: 8px;
}
.orders-page {
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}
.orders-page .app {
  padding-top: 24px;
}
.back-to-top {
  position: absolute;
  right: 16px;
  bottom: calc(100% + 8px);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    visibility 0s 240ms;
}
.back-to-top[data-visible="true"] {
  opacity: 0.78;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.back-to-top.is-transitioning {
  will-change: opacity, transform;
}
.back-to-top:hover {
  background: transparent;
  filter: none;
}
.back-to-top-disc {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d9e2f2;
  border-radius: 50%;
  background: #fffffff0;
  box-shadow: 0 2px 8px #17315c12;
}
.back-to-top svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
    transform: none;
  }
}
.orders-create-bar {
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 72px);
  max-width: 968px;
  background: white;
  border-top: 1px solid var(--border);
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
.new-order-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  width: 100%;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  background: var(--blue);
  color: white;
}
.new-order-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin: 0 0 8px;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0;
  font-weight: 600;
}
h1 span {
  display: inline-block;
  vertical-align: middle;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0;
  font-weight: 400;
  background: var(--soft);
  border-radius: 8px;
  padding: 5px 9px;
  margin-left: 7px;
}
.icon-button {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--soft);
  border-radius: 14px;
}
.toolbar {
  display: flex;
  gap: 10px;
  padding: 0 28px;
}
.search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  height: 48px;
  color: var(--muted);
}
.search:focus-within {
  border-color: var(--blue);
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  min-width: 0;
  width: 100%;
  height: 100%;
  color: #1d2b3e;
  font-size: 16px;
}
.search input::placeholder {
  color: var(--muted);
}
.filter-button {
  position: relative;
}
.filter-button span {
  position: absolute;
  right: -3px;
  top: -4px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid white;
}
.tabs {
  display: flex;
  gap: 7px;
  padding: 14px 28px 12px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 0 14px;
  min-height: 44px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.tabs button[aria-pressed="true"] {
  background: #edf2ff;
  color: var(--blue);
}
.tabs span {
  font-size: 11px;
  font-weight: 400;
  margin-left: 3px;
}
.active-filters {
  padding: 0 28px 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid #dbe4ff;
  background: #f5f7ff;
  border-radius: 10px;
  padding: 8px 12px;
  color: #244fbd;
  min-height: 44px;
  font-size: 13px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  padding: 13px 28px;
  background: #fafbfd;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.7px;
}
.order {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  align-content: center;
  gap: 1px 16px;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  padding: 7px 28px;
  min-height: 70px;
}
.order:hover {
  background: #f8faff;
}
.order-left {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.order-client {
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.order-description {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.car,
.order-specs {
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 18px;
}
.order-description.has-specs .car {
  flex: 0 1 auto;
  max-width: 45%;
}
.order-specs {
  flex: 1;
  min-width: 0;
  color: var(--muted);
}
.order-meta {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 1px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-right {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  text-align: right;
  max-width: 140px;
}
.amount {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 21px;
  font-variant-numeric: tabular-nums;
}
.amount.missing {
  font-size: 12px;
  color: var(--muted);
}
.stage {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #66758a;
}
.stage.production {
  color: #ad6410;
}
.stage::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}
.stage.shipping {
  color: #2855c9;
}
.stage.done {
  color: #21815d;
}
.notice {
  margin: 12px 20px;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  background: #fff6df;
  color: #7d5209;
}
.notice.error {
  background: #fff1f0;
  color: #a02b22;
}
.empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.empty strong {
  display: block;
  font-size: 18px;
  color: #1d2b3e;
  font-weight: 600;
  margin-bottom: 5px;
}
.list-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footnote {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 22px;
}
.load-more {
  display: block;
  margin: 20px auto;
}
.secondary {
  border: 1px solid #b8c6da;
  background: white;
  border-radius: 12px;
  min-height: 52px;
  padding: 0 16px;
}
.secondary[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--blue);
  background: #edf2ff;
}
.primary {
  border: 0;
  background: var(--blue);
  color: white;
  font-weight: 600;
  border-radius: 13px;
  min-height: 52px;
  width: 100%;
  padding: 12px 16px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--blue);
  padding: 8px 0;
  min-height: 44px;
  font-size: 14px;
}
.close {
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}
.dialog-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dialog-header h2 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0;
  flex: 1;
}
.dialog-header .close {
  width: 44px;
  height: 44px;
}
.dialog-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.dialog-body {
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}
.dialog-body h3 {
  font-size: 18px;
  margin: 0 0 16px;
  font-weight: 600;
}
.year-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.year-row > * {
  min-width: 0;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.month-grid button {
  min-height: 48px;
  border: 1px solid #d4deed;
  border-radius: 11px;
  background: #f8fafc;
  font-size: 16px;
  padding: 6px 0;
}
.month-grid button[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  font-weight: 600;
}
.date-range {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 26px;
  min-height: 20px;
}
.field {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-top: 24px;
}
.field select {
  display: block;
  margin-top: 10px;
  width: 100%;
  font-weight: 400;
}
.field select,
select {
  min-height: 52px;
  border: 1px solid #b8c6da;
  background: white;
  color: inherit;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  max-width: 100%;
}
.filter-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 20px 0 0;
}
.dialog-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  background: white;
}
.error {
  color: #b02c24;
  font-size: 14px;
  line-height: 1.5;
}
.dialog-footer .error {
  margin: 0 0 10px;
}
dialog {
  width: 440px;
  max-width: calc(100vw - 32px);
  height: min(820px, calc(100dvh - 48px));
  max-height: none;
  border: 1px solid var(--border);
  padding: 0;
  border-radius: 20px;
  background: white;
  color: inherit;
  box-shadow: 0 24px 80px #13234830;
}
dialog::backdrop {
  background: #14243d66;
  backdrop-filter: blur(3px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.detail-car {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
}
.detail-note {
  padding: 12px;
  background: #f3f6fa;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
dl {
  margin: 24px 0 0;
}
dl > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dd a {
  color: var(--blue);
}
@media (max-width: 600px) {
  .orders-create-bar {
    width: 100%;
  }
  .orders-page .app {
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .orders-page .heading {
    padding: 6px 18px 10px;
  }
  .orders-page .tabs {
    padding: 6px 18px 4px;
  }
  :root {
    background: white;
  }
  .app {
    padding: 0;
  }
  .topbar {
    height: 48px;
    padding: 0 18px;
  }
  .brand {
    font-size: 15px;
  }
  .brand-note {
    display: none;
  }
  .connection {
    font-size: 11px;
  }
  .workspace {
    border: 0;
    border-radius: 0;
  }
  .heading {
    padding: 10px 18px 14px;
  }
  .heading .icon-button {
    width: 44px;
    height: 44px;
  }
  .eyebrow {
    display: none;
  }
  h1 {
    font-size: 28px;
  }
  .toolbar {
    padding: 0 18px;
  }
  .tabs {
    padding: 10px 18px 8px;
  }
  .active-filters {
    padding: 0 18px 8px;
  }
  .list-heading {
    padding: 10px 18px;
  }
  .order {
    min-height: 68px;
    padding: 6px 18px;
    gap: 1px 12px;
  }
  .amount {
    line-height: 19px;
  }
  .order-meta,
  .stage {
    margin-top: 1px;
    line-height: 16px;
  }
  .stage {
    font-size: 11px;
  }
  .order-right {
    max-width: 125px;
  }
  .list-footer {
    padding: 16px 18px;
    flex-wrap: wrap;
  }
  .footnote {
    display: none;
  }
  dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .dialog-header {
    padding: 16px 18px;
    padding-top: calc(16px + env(safe-area-inset-top));
    gap: 12px;
  }
  .dialog-header h2 {
    font-size: 24px;
  }
  .dialog-body {
    padding: 22px 18px;
  }
  .dialog-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #refresh[aria-busy="true"] svg {
    animation: orders-sync-spin 900ms linear infinite;
  }
  button {
    transition:
      background-color 0.15s,
      color 0.15s;
  }
  dialog[open] {
    animation: appear 0.18s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@keyframes orders-sync-spin {
  to {
    transform: rotate(360deg);
  }
}
.connection.stale i {
  background: #b77a13;
}
@media (max-width: 600px) {
  .stage {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root) {
    animation: page-out 120ms ease-out both;
  }
  ::view-transition-new(root) {
    animation: page-in 220ms ease-out both;
  }
}
@keyframes page-out {
  to {
    opacity: 0;
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
