@font-face {
  font-family: "CuteHand";
  src:
    url("/static/cute-hand.woff2?v=20260708-1") format("woff2"),
    url("/static/1636380288837490.ttf?v=20260708-1") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --bg: #fff3f8;
  --ink: #2f252c;
  --muted: #8a7480;
  --line: rgba(166, 95, 125, 0.20);
  --panel: var(--glass-fill);
  --glass-fill: rgba(255, 255, 255, 0.025);
  --glass-title-fill: rgba(255, 255, 255, 0.01);
  --glass-control-fill: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.18);
  --glass-shine: rgba(255, 255, 255, 0.22);
  --glass-blur: 18px;
  --accent: #ef8db7;
  --accent-rgb: 239, 141, 183;
  --accent-strong: #d86699;
  --accent-2: #e85b72;
  --soft: rgba(239, 141, 183, 0.14);
  --shadow: 0 12px 34px rgba(172, 88, 123, 0.12);
  --cute-font: "CuteHand", "AaNLJXRT Non-Commercial Use", "AaNLJXRTNon-CommercialUse", "AaNLJXRT", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", Arial, sans-serif;
}

html,
body,
button,
input,
select,
textarea,
option,
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--cute-font) !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 211, 230, 0.05), rgba(255, 255, 255, 0) 260px),
    radial-gradient(circle at 80% 0%, rgba(255, 237, 246, 0.05), rgba(255, 255, 255, 0) 360px),
    var(--bg);
  color: var(--ink);
  font-family: var(--cute-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background: #fff3f8;
  opacity: 1;
}

body::after {
  left: 50%;
  top: 50%;
  width: min(500px, 64vw);
  aspect-ratio: 846 / 933;
  transform: translate(-50%, -47%);
  background: url("/static/pink-cutout.png?v=20260707-1") center center / contain no-repeat;
  opacity: 0.82;
}

body.logistics-theme {
  --bg: #eef5df;
  --ink: #263326;
  --muted: rgba(56, 73, 57, 0.68);
  --line: rgba(111, 145, 81, 0.20);
  --panel: var(--glass-fill);
  --accent: #82ac58;
  --accent-rgb: 130, 172, 88;
  --accent-strong: #679747;
  --soft: rgba(130, 172, 88, 0.16);
  --shadow: 0 16px 42px rgba(80, 110, 62, 0.14);
  background:
    radial-gradient(circle at 15% 4%, var(--glass-line), rgba(255, 255, 255, 0) 230px),
    radial-gradient(circle at 85% 4%, rgba(218, 237, 183, 0.58), rgba(255, 255, 255, 0) 330px),
    var(--bg);
}

body.logistics-theme::before,
body.logistics-theme::after {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--cute-font) !important;
}

::placeholder {
  font-family: var(--cute-font) !important;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 16px;
  border-right: 1px solid rgba(166, 95, 125, 0.18);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.workspace {
  min-width: 0;
  padding: 28px clamp(20px, 4vw, 48px) 42px;
}

.workspace-head {
  width: min(760px, 100%);
  margin: 0 auto 18px;
  color: #9f6e82;
}

.workspace-head span {
  display: block;
  font-size: 15px;
  color: #a87a8f;
}

.workspace-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 8px 34px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #f4a4c5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: #d86699;
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 800;
  color: #8e5a70;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  margin: 14px 8px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: var(--glass-fill);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  font-size: 13px;
}

.tabs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tab,
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--glass-line) inset;
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

.tab {
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  background: transparent;
  color: #4b3b43;
  box-shadow: none;
  text-align: left;
}

.tab.active {
  background: linear-gradient(180deg, rgba(247, 181, 209, 0.92), rgba(239, 141, 183, 0.84));
  color: #7b3d58;
  box-shadow: 0 14px 30px rgba(216, 102, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.nav-icon {
  width: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.doc-tabs {
  width: min(520px, 100%);
  margin: 0 auto 24px;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 30px rgba(172, 88, 123, 0.10);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

body.document-theme .doc-tabs {
  display: grid;
}

.doc-tabs .tab {
  min-height: 52px;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  color: #5b4c53;
  text-align: center;
}

.doc-tabs .tab.active {
  background: rgba(255, 255, 255, 0.72);
  color: #8e5a70;
  box-shadow: 0 10px 24px rgba(172, 88, 123, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.ghost {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--ink);
}

button:active {
  transform: scale(0.985);
  opacity: 0.88;
}

.panel {
  display: none;
  background: var(--glass-fill);
  border: 1px solid var(--glass-line);
  border-radius: 28px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 var(--glass-shine),
    inset 0 -18px 50px rgba(255, 255, 255, 0.10);
  padding: 28px;
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

.workspace > .panel,
.workspace > .quote-dock,
.workspace > .status,
.workspace > .result-list {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.panel.active {
  display: block;
}

.quote-dock {
  margin-bottom: 12px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 var(--glass-shine);
  padding: 14px;
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

.document-panel {
  position: relative;
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.52);
}

.document-panel::before {
  content: "▧  Generate Document Details";
  display: block;
  margin: 0 0 22px;
  color: #9a647b;
  font-size: 17px;
  font-weight: 800;
}

.document-panel .stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.document-panel .file-input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.document-panel .file-input span {
  padding: 0;
  margin-bottom: 8px;
  color: #67525c;
  font-size: 15px;
}

.document-panel input[type="text"],
.document-panel select,
.document-panel textarea {
  min-height: 48px;
  border-color: rgba(166, 95, 125, 0.24);
  background: rgba(255, 255, 255, 0.22);
}

.document-panel textarea {
  min-height: 152px;
}

#delegationForm .file-input:nth-of-type(5),
#noticeForm .file-input:nth-of-type(2),
#warehouseEntryForm .file-input:nth-of-type(3) {
  grid-column: 1 / -1;
}

#delegationForm .file-input:nth-of-type(2) textarea {
  min-height: 48px;
}

.document-panel .actions {
  grid-column: 1 / -1;
  grid-template-columns: 0.55fr 1fr;
  gap: 16px;
  margin-top: -2px;
}

.document-panel .actions .ghost {
  border: 2px solid #f4a4c5;
  background: rgba(255, 255, 255, 0.18);
  color: #8e4c68;
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(166, 95, 125, 0.18);
    padding: max(18px, env(safe-area-inset-top)) 14px 12px;
  }

  .topbar {
    padding-bottom: 14px;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 18px 14px max(28px, env(safe-area-inset-bottom));
  }

  .document-panel .stack {
    grid-template-columns: 1fr;
  }

  .document-panel .actions {
    grid-template-columns: 1fr;
  }
}

.quote-dock[hidden] {
  display: none;
}

.toolbar,
.stack {
  display: grid;
  gap: 10px;
}

.toolbar {
  grid-template-columns: 1fr 120px;
}

.file-input {
  display: grid;
  gap: 8px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(180deg, var(--glass-title-fill) 0 38px, var(--glass-fill) 38px 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.01));
  color: var(--muted);
  box-shadow:
    inset 0 1px 0 var(--glass-shine),
    inset 0 -18px 38px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

.file-input span {
  color: var(--ink);
  font-weight: 700;
  padding: 1px 2px 7px;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 14px;
}

.upload-zone {
  position: relative;
  min-height: 124px;
  border-style: dashed;
  align-content: start;
  cursor: pointer;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone .upload-hint {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--glass-line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: var(--glass-control-fill);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  line-height: 1.45;
}

.upload-zone.dragover .upload-hint,
.upload-zone:focus-within .upload-hint {
  border-color: rgba(var(--accent-rgb), 0.46);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--ink);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--glass-control-fill);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
}

.search-wrap {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.file-list {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--glass-control-fill);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
}

textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status {
  margin: 14px 0;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: var(--glass-fill);
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--accent-strong);
  line-height: 1.5;
}

.status.error {
  border-color: rgba(255, 59, 48, 0.20);
  background: rgba(255, 59, 48, 0.10);
  color: #b42318;
}

.status.warn {
  border-color: rgba(255, 149, 0, 0.25);
  background: rgba(255, 149, 0, 0.12);
  color: #8a4b00;
}

.result-list {
  display: grid;
  gap: 10px;
}

.card {
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  padding: 12px;
  background: var(--glass-fill);
  box-shadow:
    0 10px 26px rgba(172, 88, 123, 0.09),
    inset 0 1px 0 var(--glass-shine);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 750;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.meta strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 1px 0 var(--glass-line) inset;
}

.vin-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  display: grid;
  gap: 6px;
}

.vin-list li {
  overflow-wrap: anywhere;
}

.card.ok {
  border-color: rgba(52, 199, 89, 0.35);
}

.card.warn {
  border-color: rgba(255, 149, 0, 0.45);
}

.card.missing {
  border-color: rgba(255, 59, 48, 0.35);
}

.stock-toggle {
  width: 100%;
  min-height: 40px;
  background: rgba(118, 118, 128, 0.14);
  color: var(--ink);
  text-align: left;
  padding: 0 12px;
}

.stock-toggle.ok {
  background: rgba(52, 199, 89, 0.16);
}

.stock-toggle.missing {
  background: rgba(255, 59, 48, 0.12);
}

.stock-detail {
  margin-top: 10px;
}

.ledger-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.ledger-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass-fill);
}

.ledger-summary {
  position: sticky;
  left: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ledger-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--glass-fill);
}

.ledger-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 14px;
}

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.ledger-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--glass-fill);
  color: var(--muted);
  font-weight: 750;
}

.ledger-table td.editable {
  cursor: text;
}

.ledger-table td.editable:hover,
.ledger-table td[contenteditable="true"] {
  background: rgba(var(--accent-rgb), 0.12);
  outline: 2px solid rgba(var(--accent-rgb), 0.24);
  outline-offset: -2px;
}

.nameplate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.nameplate-chip {
  min-height: 74px;
  display: grid;
  gap: 3px;
  align-content: center;
  text-align: left;
  padding: 10px 12px;
  background: rgba(255, 149, 0, 0.14);
  color: var(--ink);
  border: 1px solid rgba(255, 149, 0, 0.30);
}

.nameplate-chip.arranged {
  background: rgba(52, 199, 89, 0.16);
  border-color: rgba(52, 199, 89, 0.36);
}

.nameplate-chip strong {
  font-size: 18px;
}

.nameplate-chip span,
.nameplate-chip em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.image-mount-form {
  margin-top: 14px;
}

.fold-panel {
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  padding: 0;
  background: var(--glass-fill);
  overflow: hidden;
}

.fold-panel summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 750;
  list-style: none;
}

.fold-panel summary::-webkit-details-marker {
  display: none;
}

.fold-panel summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.fold-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.fold-panel[open] summary::after {
  content: "收起";
}

.fold-panel form {
  padding: 12px;
}

#logistics-query {
  width: min(860px, 100%);
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.logistics-theme .workspace-head {
  text-align: center;
}

body.logistics-theme .workspace-head h2 {
  font-size: 18px;
}

body.logistics-theme .workspace-head span {
  color: #624653;
}

#logistics-query .file-input,
#logistics-query .fold-panel,
.logistics-workbook-card {
  border-color: var(--glass-line);
  background:
    linear-gradient(180deg, var(--glass-title-fill) 0 38px, var(--glass-fill) 38px 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 var(--glass-shine),
    0 12px 30px rgba(68, 91, 55, 0.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

#logisticsWorkbookForm {
  margin: 0 0 14px;
}

#logisticsWorkbookForm.logistics-workbook-card {
  width: min(820px, 100%);
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr 132px;
  padding: 18px 22px;
  border-radius: 18px;
}

#logisticsWorkbookStatus {
  width: min(820px, 100%);
  margin-left: auto;
  margin-right: auto;
}

#logisticsQueryForm {
  width: min(820px, 100%);
  margin: 18px auto 24px;
  padding: 28px 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 24px 54px rgba(216, 102, 153, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

#logisticsQueryForm .file-input {
  min-height: 136px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#logisticsQueryForm .file-input span {
  display: none;
}

#logisticsQueryForm textarea {
  min-height: 132px;
  border-radius: 14px;
  border-color: rgba(244, 164, 197, 0.48);
  background: rgba(255, 255, 255, 0.25);
}

#logisticsQueryForm .actions {
  grid-template-columns: 1fr 120px;
  justify-content: end;
}

#logisticsQueryForm button[type="submit"] {
  justify-self: end;
  width: 190px;
  background: linear-gradient(180deg, #f4a4c5, #ee7aaa);
}

#logisticsQueryForm .ghost {
  width: 92px;
}

#logisticsStatus {
  width: min(820px, 100%);
  margin: 0 auto 24px;
}

#logisticsResults {
  width: min(820px, 100%);
  margin: 0 auto;
}

#logistics-query .image-mount-form {
  width: min(300px, 100%);
  margin: 22px 0 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.30);
  box-shadow: 0 14px 34px rgba(216, 102, 153, 0.10);
}

#logistics-query button {
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(151, 190, 108, 0.88), rgba(105, 151, 70, 0.82));
  color: #fff;
  box-shadow:
    inset 0 1px 0 var(--glass-shine),
    0 12px 26px rgba(73, 109, 53, 0.16);
}

#logistics-query button.ghost {
  background: var(--glass-fill);
  color: rgba(38, 51, 38, 0.84);
}

#logistics-query textarea,
#logistics-query input[type="date"],
#logistics-query input[type="file"] {
  color: rgba(31, 43, 32, 0.88);
}

#logistics-query textarea,
#logistics-query input[type="date"] {
  border-color: var(--glass-line);
  background: var(--glass-control-fill);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.logistics-soft-status {
  border-color: var(--glass-line);
  background: var(--glass-fill);
  color: rgba(28, 89, 53, 0.86);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.drop-zone {
  border-style: dashed;
}

.drop-zone.dragover {
  border-color: rgba(var(--accent-rgb), 0.62);
  background: rgba(var(--accent-rgb), 0.10);
}

.status-badges,
.timeline,
.image-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.status-badge,
.timeline span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--glass-fill);
  color: var(--muted);
  font-size: 13px;
}

.status-badge.primary {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-strong);
}

.status-badge.image {
  border-color: rgba(52, 199, 89, 0.32);
  background: rgba(52, 199, 89, 0.14);
  color: #167c34;
}

.image-strip a {
  display: block;
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--glass-fill);
}

.image-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logistics-order {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  background:
    radial-gradient(circle at 8% 6%, var(--glass-line), rgba(255, 255, 255, 0) 190px),
    radial-gradient(circle at 85% 12%, var(--glass-line), rgba(255, 255, 255, 0) 220px),
    linear-gradient(135deg, rgba(229, 241, 205, 0.88), rgba(203, 224, 178, 0.72));
  box-shadow:
    0 22px 54px rgba(68, 91, 55, 0.18),
    inset 0 1px 0 var(--glass-shine),
    inset 0 -22px 60px rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

.logistics-order::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, var(--glass-line), transparent 28%),
    linear-gradient(290deg, var(--glass-line), transparent 32%);
}

.glass-title {
  position: relative;
  z-index: 1;
  width: max-content;
  margin: 0 auto 20px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 10px 22px;
  background: var(--glass-fill);
  color: rgba(33, 48, 36, 0.82);
  font-weight: 800;
  box-shadow:
    0 10px 28px rgba(65, 85, 52, 0.15),
    inset 0 1px 0 var(--glass-shine);
}

.order-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 12px 24px 12px 12px;
  background: var(--glass-fill);
  color: rgba(58, 76, 60, 0.72);
  font-size: 14px;
  box-shadow:
    inset 0 1px 0 var(--glass-shine),
    inset 0 -16px 42px rgba(255, 255, 255, 0.10),
    0 16px 34px rgba(77, 94, 63, 0.12);
}

.order-main strong {
  display: block;
  margin-top: 8px;
  color: rgba(29, 43, 32, 0.92);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.52;
  font-size: 19px;
  font-weight: 850;
}

.order-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  padding: 8px;
  background: var(--glass-fill);
  box-shadow:
    0 10px 28px rgba(53, 81, 44, 0.16),
    inset 0 1px 0 var(--glass-shine);
}

.order-avatar img,
.order-avatar span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: var(--glass-fill);
  color: rgba(55, 77, 57, 0.82);
  font-weight: 850;
}

.order-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.order-meta span {
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--glass-fill);
  color: rgba(42, 63, 45, 0.88);
  font-size: 15px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.order-meta .final-status {
  background: rgba(122, 165, 81, 0.10);
  border-color: var(--glass-line);
  color: #fff;
  text-shadow: 0 1px 8px rgba(30, 55, 25, 0.22);
}

.track-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin-top: 26px;
  padding: 0 0 0 2px;
}

.track-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  min-height: 88px;
}

.track-step::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 31px;
  bottom: -31px;
  width: 2px;
  background: var(--glass-fill);
  box-shadow: 0 0 16px rgba(92, 128, 66, 0.15);
}

.track-step:last-child::before {
  background: linear-gradient(var(--glass-fill) 0 28px, rgba(255, 255, 255, 0) 28px);
}

.track-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  margin: 2px 0 0 4px;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 20%, #fff, var(--glass-line) 34%, rgba(214, 235, 188, 0.74));
  box-shadow:
    0 8px 18px rgba(71, 99, 48, 0.16),
    inset 0 1px 0 var(--glass-shine);
}

.track-dot::after {
  content: none;
  position: absolute;
  inset: 16px 13px;
  border-left: 5px solid rgba(82, 121, 65, 0.84);
  border-bottom: 5px solid rgba(82, 121, 65, 0.84);
  transform: rotate(-45deg);
}

.track-step.pending .track-dot,
.track-step.todo .track-dot {
  background: radial-gradient(circle at 32% 20%, #fff, var(--glass-line) 24%, rgba(142, 142, 147, 0.66));
  box-shadow: none;
}

.track-step.pending .track-dot::after,
.track-step.todo .track-dot::after {
  content: none;
  inset: 17px;
  border: 0;
  border-radius: 3px;
  background: var(--glass-fill);
  transform: none;
}

.track-step.active .track-dot::after {
  content: none;
  inset: 15px 12px;
  border: 0;
  background:
    linear-gradient(#fff, #fff) 0 15px / 28px 5px no-repeat,
    linear-gradient(#fff, #fff) 18px 7px / 9px 13px no-repeat,
    radial-gradient(circle, #fff 56%, transparent 58%) 2px 20px / 9px 9px no-repeat,
    radial-gradient(circle, #fff 56%, transparent 58%) 20px 20px / 9px 9px no-repeat;
  transform: none;
}

.track-body {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  padding: 12px 16px;
  background: var(--glass-fill);
  box-shadow:
    0 12px 30px rgba(68, 91, 55, 0.12),
    inset 0 1px 0 var(--glass-shine),
    inset 0 -12px 28px rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(var(--glass-blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%);
}

.track-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.track-title strong {
  color: rgba(47, 72, 49, 0.90);
  font-size: 20px;
  line-height: 1.1;
}

.track-title span {
  border: 1px solid var(--glass-line);
  border-radius: 6px;
  padding: 3px 9px;
  background: var(--glass-fill);
  color: rgba(47, 72, 49, 0.78);
  font-size: 14px;
}

.track-body p {
  display: block;
  margin: 7px 0 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: rgba(36, 52, 38, 0.88);
  font-size: 15px;
  line-height: 1.45;
  box-shadow: none;
}

.track-image {
  display: block;
  width: min(260px, 100%);
  aspect-ratio: 4 / 3;
  margin-top: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass-fill);
  box-shadow:
    0 12px 26px rgba(56, 78, 46, 0.12),
    inset 0 1px 0 var(--glass-shine);
}

.track-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-body time {
  display: block;
  margin-top: 6px;
  color: rgba(64, 82, 66, 0.70);
  font-size: 14px;
  font-weight: 700;
}

.logistics-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.logistics-info-card,
.logistics-track-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 54px rgba(216, 102, 153, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.logistics-info-card {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.info-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.info-head strong {
  display: block;
  color: #9a647b;
  font-size: 17px;
}

.info-head span,
.vin-box span,
.info-metrics span {
  display: block;
  color: #8b7a83;
  font-size: 13px;
}

.vin-box {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.18);
}

.vin-box strong {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #332930;
  line-height: 1.45;
  font-size: 15px;
}

.info-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-metrics div,
.info-pill {
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(246, 205, 225, 0.42);
}

.info-metrics strong {
  display: block;
  margin-top: 4px;
  color: #6d3350;
  font-size: 16px;
}

.info-pill {
  color: #6d3350;
  line-height: 1.45;
}

.logistics-track-card {
  padding: 24px 26px;
}

.track-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.track-card-head span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(246, 205, 225, 0.54);
  color: #9a647b;
  font-weight: 800;
}

.track-card-head strong {
  color: #9a647b;
}

.track-card-head em {
  margin-left: auto;
  color: #9a647b;
  font-style: normal;
  font-weight: 800;
}

.logistics-track-card .track-list {
  margin-top: 0;
  padding-left: 4px;
}

.logistics-track-card .track-step {
  grid-template-columns: 28px 1fr;
  min-height: 118px;
}

.logistics-track-card .track-step::before {
  left: 10px;
  top: 22px;
  bottom: -22px;
  width: 3px;
  background: linear-gradient(#b66786, #f3a8c8);
  box-shadow: none;
}

.logistics-track-card .track-dot {
  width: 14px;
  height: 14px;
  margin: 5px 0 0 4px;
  border: 3px solid #b66786;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 3px rgba(246, 205, 225, 0.65);
}

.logistics-track-card .track-step:not(.latest) .track-dot {
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border: 0;
  background: #f3a8c8;
  box-shadow: none;
}

.logistics-track-card .track-body {
  width: 100%;
  margin: 0 0 24px;
  border: 0;
  border-radius: 0;
  padding: 0 0 0 8px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.logistics-track-card .track-step.latest .track-body {
  border: 2px solid #b66786;
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.28);
}

.logistics-track-card .track-title {
  min-height: 0;
  align-items: flex-start;
}

.logistics-track-card .track-title strong {
  color: #9a4f70;
  font-size: 17px;
}

.logistics-track-card .track-title span {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: #9a4f70;
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
}

.logistics-track-card .track-body p {
  color: #5d4d55;
  font-size: 14px;
}

.logistics-track-card .track-body time {
  margin: 0 0 7px;
  color: #9d8c95;
  font-size: 14px;
  order: -1;
}

.logistics-track-card .track-image {
  width: min(180px, 100%);
}

.track-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.24);
  color: #8b7a83;
  font-size: 13px;
}

.track-footer button {
  min-height: 34px;
  padding: 0 8px;
  color: #9a4f70;
}

@media (max-width: 960px) {
  .logistics-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .toolbar,
  .meta,
  .ledger-filters {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }
}
