:root {
  --ink: #17202b;
  --muted: #687383;
  --line: #dce3ea;
  --line-soft: #e9eef3;
  --soft: #e7faf4;
  --mint: #10c9a7;
  --teal: #087f70;
  --pink: #f45ab5;
  --pink-dark: #e13f9f;
  --card: #ffffff;
  --bg: #f7fbfa;
  --shadow: 0 16px 38px rgba(23, 32, 43, 0.06);
  --prototype-surface: rgba(255, 255, 255, 0.94);
  --prototype-mint-line: #c9f2eb;
  --prototype-pink-soft: #fff3fa;
}

/* Royalty management: summary first, details on demand. */
.royalty-section-tabs {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.royalty-accrual-view > .top-filter-bar {
  position: sticky;
  top: 94px;
  z-index: 12;
}

.royalty-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin: 18px 0;
  align-items: start;
}

.royalty-summary-grid .table-scroll table {
  min-width: 640px;
}

.royalty-detail-card {
  margin-top: 18px;
}

.royalty-detail-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.76);
}

.royalty-detail-card > summary::-webkit-details-marker {
  display: none;
}

.royalty-detail-card > summary h3,
.royalty-rules-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.royalty-detail-toggle {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 900;
}

.royalty-detail-body {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.royalty-detail-toolbar {
  justify-content: flex-start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.82);
}

.royalty-detail-toolbar .input {
  flex: 1 1 280px;
  max-width: 420px;
}

.royalty-detail-toolbar select {
  flex: 0 1 180px;
  max-width: 210px;
}

.royalty-detail-table .table-scroll table {
  min-width: 1040px;
}

.royalty-detail-table th,
.royalty-detail-table td {
  white-space: nowrap;
}

.royalty-detail-table th:nth-child(2),
.royalty-detail-table td:nth-child(2) {
  white-space: normal;
  min-width: 220px;
}

.royalty-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.royalty-pagination > div {
  display: flex;
  gap: 8px;
}

.royalty-rules-view {
  display: grid;
  gap: 18px;
}

.royalty-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--prototype-surface);
  box-shadow: var(--shadow);
}

.royalty-rule-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.badge.neutral {
  color: #536171;
  background: #edf1f5;
}

.royalty-rule-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.royalty-rule-modal .modal-head,
.royalty-rule-modal .modal-foot {
  flex: 0 0 auto;
}

.royalty-rule-modal .modal-section {
  min-height: 0;
  padding-top: 18px;
  overflow-y: auto;
}

.royalty-rule-warning {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #f2d7a7;
  border-radius: 8px;
  color: #694911;
  background: #fff9ec;
}

.royalty-rule-warning span {
  line-height: 1.55;
}

.royalty-dealer-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-form .royalty-dealer-fieldset.wide {
  grid-column: 1 / -1;
}

.royalty-dealer-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
}

.royalty-dealer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.royalty-dealer-tools .input {
  flex: 1 1 220px;
  max-width: 360px;
}

.royalty-rule-modal .compact-check-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.royalty-rule-modal .inline-check {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.quote-form .royalty-history-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #f2d7a7;
  border-radius: 8px;
  color: #694911;
  background: #fff9ec;
}

.royalty-history-confirm input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.quote-form .royalty-history-confirm span {
  color: inherit;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .royalty-summary-grid {
    grid-template-columns: 1fr;
  }

  .royalty-rule-modal .compact-check-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    height: auto;
    max-height: none;
  }

  .royalty-section-tabs,
  .royalty-rule-stats {
    grid-template-columns: 1fr;
  }

  .royalty-accrual-view > .top-filter-bar {
    position: static;
  }

  .royalty-detail-card > summary,
  .royalty-rules-head,
  .royalty-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .royalty-detail-body {
    padding: 14px;
  }

  .royalty-detail-toolbar .input,
  .royalty-detail-toolbar select,
  .royalty-dealer-tools .input {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .royalty-pagination > div button {
    flex: 1 1 0;
  }

  .royalty-rule-modal .modal-head,
  .royalty-rule-modal .modal-foot {
    padding: 16px;
  }

  .royalty-rule-modal .modal-section {
    padding: 14px 16px;
  }

  .royalty-rule-modal .quote-form select,
  .royalty-rule-modal .quote-form input,
  .royalty-rule-modal .quote-form textarea {
    width: 100%;
    min-width: 0;
  }

  .royalty-rule-modal .compact-check-list {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(16, 201, 167, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(244, 90, 181, 0.13), transparent 32%),
    var(--bg);
  overflow: hidden;
}

body.login-mode {
  min-width: 0;
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

body.login-mode .sidebar,
body.login-mode .app {
  display: none;
}

body.app-mode .login-screen {
  display: none;
}

.login-screen {
  --login-peek-width: clamp(132px, 10.8vw, 150px);
  --login-peek-space: calc(var(--login-peek-width) * 0.47);
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 500px);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(32px, 4vw, 48px) clamp(28px, 5vw, 72px);
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -190px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: rgba(16, 201, 167, 0.13);
}

.login-brand {
  position: absolute;
  top: 48px;
  left: 72px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.login-brand > div {
  display: flex;
  align-items: center;
}

.login-brand > img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 16px 36px rgba(8, 127, 112, 0.16);
}

.login-brand p,
.login-muted,
.login-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.login-brand p {
  white-space: nowrap;
}

.login-wordmark {
  display: block;
  width: 136px;
  margin-top: 0;
  background: transparent;
}

.login-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(38px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.login-copy p {
  margin: 28px 0 0;
  color: #0c8d7d;
  font-size: clamp(18px, 1.7vw, 20px);
  font-weight: 900;
}

.login-card-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(500px, calc(100vw - 56px));
  margin-left: auto;
  padding-top: var(--login-peek-space);
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: 100%;
  overflow: visible;
  padding: 44px 38px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(23, 32, 43, 0.12);
}

.login-peek {
  position: absolute;
  top: 0;
  left: 65%;
  z-index: 0;
  width: var(--login-peek-width);
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(8, 127, 112, 0.18));
}

.login-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 950;
}

.login-card h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: 0;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.login-remember {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  cursor: pointer;
}

.login-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.login-remember span {
  font-size: 14px;
}

.login-submit {
  min-height: 54px;
  margin-top: 4px;
  font-size: 18px;
}

.login-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  line-height: 1.6;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  height: 100vh;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(231, 250, 244, 0.72), rgba(255, 255, 255, 0.92) 28%),
    rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(220, 227, 234, 0.78);
  box-shadow: 14px 0 36px rgba(8, 127, 112, 0.04);
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  padding: 6px 6px 0;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 14px 34px rgba(8, 127, 112, 0.16);
}

.brand > div {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand p,
.topbar p,
.section-subtitle,
.muted {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.brand p {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand h1,
.topbar h2 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

.brand-wordmark {
  width: 138px !important;
  height: auto !important;
  display: block;
  margin-top: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

.role-switcher {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid rgba(201, 242, 235, 0.9);
  border-radius: 8px;
  background: rgba(238, 246, 244, 0.88);
}

.role-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 900;
  box-shadow: none;
}

.role-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--teal));
  box-shadow: 0 8px 22px rgba(8, 127, 112, 0.2);
}

nav {
  display: grid;
  gap: 6px;
}

nav button,
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(23, 32, 43, 0.035);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

button:hover {
  border-color: #c9d5df;
  box-shadow: 0 12px 24px rgba(23, 32, 43, 0.06);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  box-shadow: none;
  font-weight: 900;
  text-align: left;
}

.link-button:hover {
  color: var(--pink);
  box-shadow: none;
}

.icon-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
}

nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding-left: 16px;
  text-align: left;
  border: 0;
  color: #526070;
  background: transparent;
  box-shadow: none;
}

nav button.active,
nav button:hover {
  color: var(--teal);
  background: var(--prototype-surface);
  box-shadow: 0 12px 26px rgba(8, 127, 112, 0.08);
}

nav button.active::before {
  content: "";
  position: absolute;
  left: 8px;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--pink);
}

nav button span {
  width: 22px;
  color: var(--pink);
  text-align: center;
}

.nav-section-label {
  min-height: 30px;
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.68);
  color: #8a95a3;
  font-size: 12px;
  font-weight: 900;
}

.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  box-shadow: 0 12px 26px rgba(244, 90, 181, 0.2);
}

.primary:hover {
  border-color: transparent;
  box-shadow: 0 16px 32px rgba(244, 90, 181, 0.28);
}

.danger-button {
  border-color: rgba(244, 90, 181, 0.36);
  color: var(--pink-dark);
  background: var(--prototype-pink-soft);
  box-shadow: none;
}

.danger-button:hover {
  border-color: rgba(244, 90, 181, 0.58);
  box-shadow: 0 12px 24px rgba(244, 90, 181, 0.12);
}

.ghost {
  color: var(--teal);
  background: var(--soft);
  border-color: #c9f2eb;
  box-shadow: none;
}

.top-notifications {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink);
  font-size: 12px;
  line-height: 1;
}

a.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
  background: var(--soft);
}

.app {
  margin-left: 268px;
  min-height: 0;
  height: 100vh;
  overflow: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 94px;
  height: auto;
  padding: 18px 30px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 227, 234, 0.78);
  backdrop-filter: blur(12px);
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.1;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.content {
  padding: 26px 30px 46px;
  background:
    linear-gradient(120deg, rgba(16, 201, 167, 0.11), transparent 32%),
    linear-gradient(315deg, rgba(244, 90, 181, 0.12), transparent 34%);
}

.page-loader {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 148px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid rgba(201, 242, 235, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(231, 250, 244, 0.74), rgba(255, 243, 250, 0.72)),
    var(--prototype-surface);
  box-shadow: var(--shadow);
}

.page-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 38%;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: loader-sheen 1.15s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.loader-logo {
  position: relative;
  flex: 0 0 auto;
  width: 88px;
  height: 76px;
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(16, 201, 167, 0.14));
}

.loader-monster-stack {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  width: 70px;
  height: 48px;
  overflow: hidden;
  transform: translateX(-50%) translateY(24px) scale(0.98);
  transform-origin: center bottom;
  animation: loader-monster-rise 2.35s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.loader-monster-open,
.loader-monster-closed {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: auto;
  transform: translateX(-50%);
}

.loader-monster-closed {
  z-index: 2;
  opacity: 0;
  animation: loader-blink 2.35s ease-in-out infinite;
}

.loader-box {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 88px;
  height: auto;
  transform: translateX(-50%);
}

.page-loader strong,
.page-loader span {
  position: relative;
  z-index: 1;
  display: block;
}

.page-loader strong {
  font-size: 18px;
  color: var(--ink);
}

.page-loader span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.content.view-enter > * {
  animation: view-enter 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes loader-monster-rise {
  0%,
  100% {
    transform: translateX(-50%) translateY(24px) scale(0.98);
  }
  28%,
  68% {
    transform: translateX(-50%) translateY(-9px) scale(1);
  }
}

@keyframes loader-blink {
  0%,
  38%,
  58%,
  100% {
    opacity: 0;
  }
  46%,
  52% {
    opacity: 1;
  }
}

@keyframes loader-sheen {
  to {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader::after,
  .loader-monster-stack,
  .loader-monster-closed,
  .content.view-enter > * {
    animation: none;
  }

  .loader-monster-stack {
    transform: translateX(-50%) translateY(-4px);
  }
}

.grid {
  display: grid;
  gap: 18px;
}

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

.stats-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.operating-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.two {
  grid-template-columns: 1.25fr 0.75fr;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--prototype-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.card-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.type-setting-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.type-setting-card-head > div {
  min-width: 0;
}

.type-setting-card-head .primary {
  flex: 0 0 auto;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 760px;
}

.js-orders-table .table-scroll table,
.js-receivables-table .table-scroll table,
.js-ledger-table .table-scroll table {
  min-width: 980px;
}

.receivable-table .table-scroll table {
  min-width: 960px;
}

.receivable-status-tabs {
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.receivable-order-cell {
  display: grid;
  gap: 6px;
}

.receivable-order-cell .link-button {
  width: fit-content;
  padding: 0;
}

.receivable-date-cell {
  min-width: 174px;
  line-height: 1.75;
  white-space: normal;
}

.receivable-date-label {
  display: inline-block;
  width: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.receivable-date-cell .badge,
.receivable-date-cell .muted {
  white-space: nowrap;
}

.receivable-table th:last-child,
.receivable-action-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -10px 0 18px rgba(22, 34, 49, 0.06);
}

.receivable-table th:last-child {
  z-index: 3;
  background: #f8fcfb;
}

.receivable-table tbody tr:hover .receivable-action-cell {
  background: #f5fcf9;
}

.receivable-list-footer,
.receivable-list-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receivable-list-footer {
  justify-content: space-between;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.receivable-list-footer select {
  min-height: 38px;
}

.receivable-note-modal {
  width: min(760px, 100%);
}

.receivable-note-detail {
  padding: 24px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.receivable-statement-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 24px 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--soft);
}

.receivable-statement-equation span {
  color: var(--muted);
  font-weight: 800;
}

.receivable-statement-equation strong {
  color: var(--teal-dark);
}

.receivable-statement-equation b {
  color: var(--ink);
  font-size: 18px;
}

.receivable-adjustment-note {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.order-compensation-section .order-settlement-equation {
  margin: 0 0 18px;
}

.order-compensation-section .modal-section-title > div {
  display: grid;
  gap: 4px;
}

.order-compensation-section .js-request-order-compensation {
  flex: 0 0 auto;
}

.compact-disclosure {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.6;
}

.compact-disclosure summary {
  width: fit-content;
  color: var(--teal-dark);
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.compact-disclosure[open] summary {
  margin-bottom: 8px;
}

.compact-disclosure div {
  max-height: 180px;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dealer-statement-actions {
  flex-wrap: wrap;
  min-width: 108px;
}

.js-dealer-statement-table th:last-child,
.js-dealer-statement-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -10px 0 18px rgba(22, 34, 49, 0.06);
}

.js-dealer-statement-table th:last-child {
  z-index: 3;
  background: #f8fcfb;
}

.js-dealer-statement-table tbody tr:hover td:last-child {
  background: #f5fcf9;
}

.stat {
  min-height: 108px;
  padding: 18px 20px;
}

.stat-action {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
}

.stat-action.active {
  border-color: rgba(0, 137, 124, 0.35);
  background: linear-gradient(135deg, rgba(0, 188, 171, 0.14), rgba(255, 255, 255, 0.96));
}

.stat span {
  color: var(--muted);
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stats-five .stat strong {
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
}

.stat em {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-style: normal;
  font-weight: 800;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(201, 242, 235, 0.78);
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.82);
  box-shadow: 0 14px 34px rgba(8, 127, 112, 0.045);
}

.board-toolbar-card {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 16px;
}

.top-filter-bar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-color: rgba(201, 242, 235, 0.9);
  background:
    linear-gradient(135deg, rgba(231, 250, 244, 0.82), rgba(255, 255, 255, 0.98) 42%),
    var(--prototype-surface);
}

.top-filter-bar .compact-toolbar {
  justify-content: flex-start;
}

.top-filter-bar .section-subtitle {
  margin-top: 10px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.inline-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.inline-check:has(input:checked) {
  border-color: rgba(16, 185, 160, 0.34);
  background: rgba(231, 250, 244, 0.88);
  color: var(--teal-dark);
}

.prototype-workbench {
  border-color: rgba(201, 242, 235, 0.86);
  background:
    linear-gradient(135deg, rgba(231, 250, 244, 0.78), rgba(255, 255, 255, 0.96) 38%),
    var(--prototype-surface);
}

.workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.workbench-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.board-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.status-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.status-tabs button {
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}

.status-tabs button:disabled {
  cursor: default;
  opacity: 0.42;
}

.status-tabs button strong {
  color: inherit;
  font-size: 20px;
  line-height: 1;
}

.status-tabs button span {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.status-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--teal));
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(8, 127, 112, 0.16);
}

.printer-status-tabs {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
}

.warehouse-filter-card {
  display: grid;
  gap: 16px;
}

.warehouse-filter-card .workbench-head {
  margin-bottom: 0;
}

.warehouse-status-tabs {
  grid-template-columns: repeat(4, minmax(96px, 1fr));
}

.logistics-command-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(184, 239, 230, 0.95);
  background:
    linear-gradient(135deg, rgba(231, 250, 244, 0.96), rgba(255, 255, 255, 0.98) 42%),
    var(--card);
}

.logistics-command-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -72px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(244, 90, 181, 0.08);
  pointer-events: none;
}

.logistics-command-head {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.logistics-command-title {
  max-width: 720px;
}

.logistics-command-title span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.logistics-command-title h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
}

.logistics-command-title p {
  max-width: 64ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.logistics-command-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.logistics-count-pill {
  display: grid;
  min-width: 92px;
  padding: 11px 14px;
  border: 1px solid rgba(184, 239, 230, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.logistics-count-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.logistics-count-pill strong {
  color: var(--teal-dark);
  font-size: 24px;
  line-height: 1;
}

.logistics-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.logistics-flow div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(201, 242, 235, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.logistics-flow strong,
.logistics-flow span,
.logistics-company-cell strong,
.logistics-company-cell span {
  display: block;
}

.logistics-flow strong {
  color: var(--ink);
  font-size: 14px;
}

.logistics-flow span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.logistics-company-cell {
  display: grid;
  gap: 4px;
}

.logistics-company-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-toolbar {
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.quick-date-group {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-date-group .quick-date {
  flex: 0 0 auto;
  width: auto;
}

.compact-toolbar .input,
.compact-toolbar .select-like,
.compact-toolbar select {
  flex: 1 1 190px;
  max-width: 300px;
}

.compact-toolbar .date-range-trigger {
  flex: 1 1 250px;
  max-width: 360px;
}

.compact-toolbar button {
  flex: 0 0 auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px 0;
}

.toolbar-title {
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
}

.section-toolbar {
  justify-content: space-between;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.section-toolbar > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.raw-material-movement-toolbar {
  justify-content: flex-start;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.82);
}

.raw-material-movement-toolbar .input,
.raw-material-movement-toolbar select {
  flex: 1 1 150px;
  max-width: 220px;
}

.raw-material-movement-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.raw-material-movement-pagination > div {
  display: flex;
  gap: 8px;
}

.raw-material-movement-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 720px) {
  .raw-material-movement-toolbar .input,
  .raw-material-movement-toolbar select,
  .raw-material-movement-toolbar button {
    flex: 1 1 100%;
    max-width: none;
  }

  .raw-material-movement-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .raw-material-movement-pagination > div button {
    flex: 1 1 0;
  }
}

.rules-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rules-strip div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.78);
}

.rules-strip strong,
.rules-strip span {
  display: block;
}

.rules-strip strong {
  color: var(--teal-dark);
  font-size: 14px;
}

.rules-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.account-permission-strip label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.78);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.account-role-fields {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.72);
}

.account-role-fields label {
  display: grid;
  gap: 8px;
  font-weight: 900;
  color: var(--muted);
}

.account-role-fields .muted {
  margin-top: 10px;
  line-height: 1.6;
}

.account-self-panel {
  display: grid;
  gap: 18px;
}

.account-self-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(224, 250, 245, 0.82), #fff 72%);
}

.account-self-summary div {
  display: grid;
  gap: 6px;
}

.account-self-summary span,
.account-self-summary em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.account-self-summary strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.compact-notice {
  margin: 0;
}

.management-list-card {
  margin-top: 18px;
}

.notice {
  padding: 14px 18px;
  margin-bottom: 16px;
  border-color: #b8efe6;
  background: #effbf8;
}

.notice.error {
  border-color: #ffd1e8;
  background: #fff3fa;
}

.permission-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
}

.permission-empty > div {
  max-width: 520px;
}

.permission-empty h3 {
  margin: 16px 0 10px;
  font-size: 28px;
}

.permission-empty p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

.app-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 3000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(460px, calc(100vw - 40px));
  padding: 16px 18px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(239, 251, 248, 0.98);
  box-shadow: 0 22px 54px rgba(23, 32, 43, 0.18);
}

.app-toast.error {
  border-color: #ffc2df;
  background: rgba(255, 243, 250, 0.98);
}

.app-toast strong,
.app-toast span {
  display: block;
}

.app-toast strong {
  font-size: 16px;
}

.app-toast span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.app-toast.error strong {
  color: #c72c75;
}

.app-toast .icon-button {
  width: 36px;
  min-height: 36px;
  font-size: 22px;
  box-shadow: none;
}

.form-error {
  min-height: 20px;
  color: #d92d7a;
  font-weight: 800;
}

.form-success {
  min-height: 20px;
  color: var(--teal);
  font-weight: 800;
}

.dealer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.product-card h3 {
  margin: 14px 0 6px;
  font-size: 22px;
}

.product-card-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.product-card-info {
  min-width: 0;
}

.product-card-info h3 {
  margin-top: 10px;
}

.product-cover {
  width: 112px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(16, 201, 167, 0.18), rgba(244, 90, 181, 0.12));
  box-shadow: 0 12px 28px rgba(23, 32, 43, 0.08);
}

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

.cover-placeholder {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.cover-placeholder span,
.cover-placeholder strong {
  display: block;
}

.cover-placeholder span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.cover-placeholder strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.product-meta div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: var(--soft);
}

.product-meta span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.asset-box {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.75);
}

.asset-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.empty-asset {
  color: var(--muted);
  font-weight: 800;
}

.product-meta strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 18px;
}

.policy-box {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 201, 167, 0.09), rgba(244, 90, 181, 0.05));
}

.policy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.policy-line strong {
  color: var(--teal);
  font-size: 14px;
  line-height: 1.4;
}

.policy-line span {
  color: var(--pink);
  font-weight: 900;
  white-space: nowrap;
}

.policy-progress {
  height: 8px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8ef;
}

.policy-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--pink));
}

.quantity-row {
  display: grid;
  grid-template-columns: 72px minmax(90px, 1fr) 72px auto;
  gap: 8px;
}

.qty-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
  text-align: center;
}

.cart-panel {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.cart-backdrop {
  display: none;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-panel h3 {
  margin: 0 0 6px;
}

.cart-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.cart-item,
.cart-total,
.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 36px;
}

.cart-total strong {
  color: var(--pink);
  font-size: 22px;
}

.cart-item strong {
  display: grid;
  gap: 4px;
}

.cart-item small {
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

.full-width {
  width: 100%;
}

.dealer-order-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.dealer-order-table {
  min-width: 1680px;
  table-layout: fixed;
}

.dealer-order-table th,
.dealer-order-table td {
  padding: 13px 12px;
  white-space: nowrap;
  vertical-align: top;
}

.dealer-order-table th:nth-child(1),
.dealer-order-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 160px;
  min-width: 160px;
  background: #f8fcfb;
}

.dealer-order-table td:nth-child(1) {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 14px 0 18px rgba(23, 32, 43, 0.05);
}

.dealer-order-table th:nth-child(2),
.dealer-order-table td:nth-child(2) {
  width: 170px;
}

.dealer-order-table th:nth-child(3),
.dealer-order-table td:nth-child(3) {
  width: 150px;
}

.dealer-order-table td:nth-child(4) {
  white-space: normal;
  width: 220px;
}

.dealer-order-table th:nth-child(5),
.dealer-order-table td:nth-child(5),
.dealer-order-table th:nth-child(7),
.dealer-order-table td:nth-child(7) {
  width: 88px;
}

.dealer-order-table th:nth-child(6),
.dealer-order-table td:nth-child(6),
.dealer-order-table th:nth-child(8),
.dealer-order-table td:nth-child(8),
.dealer-order-table th:nth-child(9),
.dealer-order-table td:nth-child(9),
.dealer-order-table th:nth-child(10),
.dealer-order-table td:nth-child(10) {
  width: 76px;
}

.dealer-order-table th:nth-child(11),
.dealer-order-table td:nth-child(11) {
  width: 110px;
}

.dealer-order-table th:nth-child(12),
.dealer-order-table td:nth-child(12),
.dealer-order-table th:nth-child(13),
.dealer-order-table td:nth-child(13) {
  width: 104px;
}

.dealer-order-table th:nth-child(14),
.dealer-order-table td:nth-child(14) {
  width: 180px;
}

.dealer-order-logistics {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.warehouse-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.warehouse-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.warehouse-card-head h3 {
  margin: 8px 0 0;
  font-size: 22px;
}

.warehouse-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.warehouse-lines div {
  min-height: 68px;
  padding: 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: var(--soft);
}

.warehouse-lines span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.warehouse-lines strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 18px;
}

.warehouse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.warehouse-card-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.72);
}

.warehouse-card-hint strong {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 15px;
}

.warehouse-card-hint span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
}

.warehouse-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.warehouse-pick-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.warehouse-pick-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.warehouse-pick-card-head strong,
.warehouse-pick-card-head span {
  display: block;
}

.warehouse-pick-card-head strong {
  font-size: 15px;
  line-height: 1.35;
}

.warehouse-pick-card-head span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.warehouse-pick-card-head em {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  color: #9b6b08;
  background: #fff2c8;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.warehouse-pick-section-label,
.warehouse-pick-gift-block p {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.warehouse-pick-book-list {
  display: grid;
  gap: 8px;
}

.warehouse-pick-book-line {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(320px, 1.25fr);
  align-items: center;
  min-height: 40px;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.82);
}

.warehouse-pick-book-line strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.warehouse-pick-book-line small {
  display: block;
  margin-top: 4px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.warehouse-pack-rule {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.warehouse-pack-rule label,
.warehouse-pack-rule div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.warehouse-pack-rule span,
.warehouse-pack-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.warehouse-pack-rule .input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.warehouse-pack-rule strong,
.warehouse-pack-total strong {
  color: var(--teal);
  font-size: 15px;
  font-weight: 950;
}

.warehouse-pack-rule.compact {
  grid-template-columns: minmax(110px, 1fr) auto auto;
}

.shipping-box small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.warehouse-pick-empty,
.warehouse-pick-no-gift {
  padding: 11px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfefd;
  font-size: 13px;
  font-weight: 850;
}

.warehouse-pick-gift-block {
  margin-top: 12px;
}

.warehouse-pick-gift-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #ffd0e9;
  border-radius: 8px;
  background: rgba(255, 243, 250, 0.82);
}

.warehouse-pick-gift-line strong,
.warehouse-pick-gift-line span,
.warehouse-pick-gift-line small {
  display: block;
}

.warehouse-pick-gift-line span,
.warehouse-pick-gift-line small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.warehouse-pick-gift-line b {
  color: var(--pink-dark);
  font-size: 18px;
}

.warehouse-pick-address {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.warehouse-pick-form-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.warehouse-pick-form-row .input {
  width: 100%;
  min-height: 40px;
}

.warehouse-pick-slip-preview {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #b8efe6;
  border-radius: 8px;
  background: rgba(251, 254, 253, 0.88);
}

.warehouse-pick-slip-preview strong {
  color: var(--teal);
  font-size: 13px;
}

.warehouse-pick-slip-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.warehouse-sync-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(231, 250, 244, 0.92), rgba(255, 255, 255, 0.95));
}

.warehouse-sync-note strong {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 13px;
}

.warehouse-sync-note span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.warehouse-ship-list {
  display: grid;
  gap: 14px;
}

.warehouse-ship-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.warehouse-ship-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.warehouse-ship-head strong,
.warehouse-ship-head span {
  display: block;
}

.warehouse-ship-head strong {
  font-size: 15px;
  line-height: 1.35;
}

.warehouse-ship-head span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.warehouse-ship-head em {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.warehouse-ship-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.warehouse-ship-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.4fr) minmax(220px, 1.4fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

.warehouse-ship-form .input {
  min-width: 0;
  width: 100%;
  min-height: 40px;
}

.warehouse-shipped-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.warehouse-shipped-list-card,
.warehouse-shipped-detail-card {
  min-width: 0;
}

.warehouse-shipped-list-card .table-wrap {
  margin-top: 0;
}

.warehouse-shipped-list-card tr.selected-row td {
  background: rgba(231, 250, 244, 0.82);
}

.warehouse-shipped-list {
  display: grid;
  gap: 8px;
}

.warehouse-shipped-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1fr) minmax(160px, 0.9fr);
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.warehouse-shipped-row.selected {
  border-color: rgba(20, 185, 157, 0.34);
  background: rgba(231, 250, 244, 0.82);
}

.warehouse-shipped-row span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.warehouse-shipped-row strong,
.warehouse-shipped-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-shipped-row strong {
  font-weight: 900;
}

.warehouse-shipped-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.warehouse-shipped-kv {
  display: grid;
  grid-template-columns: minmax(90px, 0.5fr) minmax(0, 1fr);
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfefd;
}

.warehouse-shipped-kv span {
  color: var(--muted);
  font-weight: 850;
}

.warehouse-shipped-kv strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.printer-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 2px;
}

.printer-card-meta span {
  padding: 7px 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  border-radius: 8px;
  background: var(--soft);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 168px;
}

.table-actions button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.compact-row-actions {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.compact-row-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.book-catalog-table .table-scroll table {
  min-width: 1570px;
  table-layout: fixed;
}

.book-catalog-table th,
.book-catalog-table td {
  padding: 11px 12px;
  vertical-align: middle;
}

.book-sort-button {
  width: 100%;
  gap: 7px;
  justify-content: flex-start;
  border-radius: 6px;
  text-align: left;
}

.book-sort-button:hover,
.book-sort-button:focus-visible,
.book-sort-button.is-active {
  color: var(--teal-700);
}

.book-sort-indicator {
  position: relative;
  flex: 0 0 9px;
  width: 9px;
  height: 14px;
  color: #82909e;
  opacity: 0.58;
}

.book-sort-indicator::before,
.book-sort-indicator::after {
  position: absolute;
  left: 1px;
  width: 0;
  height: 0;
  border-right: 3.5px solid transparent;
  border-left: 3.5px solid transparent;
  content: "";
}

.book-sort-indicator::before {
  top: 1px;
  border-bottom: 5px solid currentColor;
}

.book-sort-indicator::after {
  bottom: 1px;
  border-top: 5px solid currentColor;
}

.book-sort-button.is-active .book-sort-indicator {
  color: var(--teal-700);
  opacity: 1;
}

.book-sort-button.is-asc .book-sort-indicator::after,
.book-sort-button.is-desc .book-sort-indicator::before {
  opacity: 0.2;
}

.book-catalog-table th:nth-child(1),
.book-catalog-table td:nth-child(1) {
  width: 175px;
}

.book-catalog-table th:nth-child(2),
.book-catalog-table td:nth-child(2) {
  width: 285px;
}

.book-catalog-table th:nth-child(3),
.book-catalog-table td:nth-child(3) {
  width: 165px;
}

.book-catalog-table th:nth-child(4),
.book-catalog-table td:nth-child(4) {
  width: 76px;
}

.book-catalog-table th:nth-child(5),
.book-catalog-table td:nth-child(5),
.book-catalog-table th:nth-child(6),
.book-catalog-table td:nth-child(6) {
  width: 82px;
}

.book-catalog-table th:nth-child(7),
.book-catalog-table td:nth-child(7) {
  width: 82px;
}

.book-catalog-table th:nth-child(8),
.book-catalog-table td:nth-child(8) {
  width: 90px;
}

.book-catalog-table th:nth-child(9),
.book-catalog-table td:nth-child(9) {
  width: 100px;
}

.book-catalog-table th:nth-last-child(2),
.book-catalog-table td:nth-last-child(2) {
  width: 80px;
}

.book-catalog-table th:nth-last-child(3),
.book-cost-cell {
  width: 90px;
}

.book-catalog-table th:last-child,
.book-catalog-table td:last-child {
  width: 250px;
}

.book-title-cell {
  min-width: 0;
  white-space: normal;
}

.book-sku-cell {
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-title-cell strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-title-cell .muted {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-table-actions {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.book-table-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.order-band.band-1 td {
  background: #f8fffc;
}

.order-start td {
  border-top: 2px solid #d7f3ec;
}

.inline-status {
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
}

.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--pink);
  text-decoration: underline;
}

.wide-empty {
  grid-column: 1 / -1;
}

.input,
.select-like {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(220, 227, 234, 0.16);
}

.toolbar .input,
.toolbar .select-like {
  min-height: 42px;
  border-color: #d8e3ec;
  font-weight: 900;
}

.input:focus,
.select-like:focus {
  border-color: var(--mint);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 201, 167, 0.12);
}

.date-input {
  width: 184px;
}

.compact-input {
  max-width: 150px;
}

.quick-date {
  min-height: 38px;
  padding: 0 12px;
  color: var(--teal);
  background: rgba(231, 250, 244, 0.92);
  border-color: #c9f2eb;
  box-shadow: none;
  font-size: 13px;
}

.quick-date:hover {
  border-color: var(--mint);
  background: #dcfaf3;
}

.date-range-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  max-width: 430px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.96);
}

.date-range-trigger span {
  color: var(--muted);
  font-weight: 900;
}

.date-range-trigger strong {
  overflow: hidden;
  max-width: 300px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-picker-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(5px);
}

.date-picker-panel {
  width: min(980px, calc(100vw - 52px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(23, 32, 43, 0.18);
}

.date-picker-head,
.date-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.date-picker-head {
  border-bottom: 1px solid var(--line-soft);
}

.date-picker-head p,
.date-picker-head h3 {
  margin: 0;
}

.date-picker-head p {
  color: #ff5b73;
  font-weight: 900;
}

.date-picker-head h3 {
  margin-top: 6px;
  font-size: 22px;
}

.date-picker-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 18px 22px 6px;
}

.date-picker-presets button {
  min-width: 76px;
  color: #596778;
  background: #fbfdff;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 48px 48px 1fr 48px 48px;
  gap: 8px;
  align-items: center;
  padding: 8px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.calendar-nav button {
  min-height: 42px;
  padding: 0;
  color: var(--muted);
  font-size: 26px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 24px 28px 28px;
}

.calendar-month h4 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 24px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  height: 34px;
  color: var(--ink);
  font-weight: 900;
}

.calendar-days button {
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: 18px;
  font-weight: 900;
}

.calendar-days button.outside {
  color: #9aa5b2;
  background: rgba(247, 249, 252, 0.72);
}

.calendar-days button.in-range {
  background: #edf4ff;
}

.calendar-days button.selected {
  color: #fff;
  background: #3f6df6;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(63, 109, 246, 0.22);
}

.date-picker-foot {
  border-top: 1px solid var(--line-soft);
}

.date-picker-foot strong {
  color: var(--muted);
}

.date-picker-foot > div {
  display: flex;
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.72);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f8fcfb;
  font-size: 13px;
  font-weight: 900;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: rgba(231, 250, 244, 0.45);
}

tbody tr.unread-row {
  background: rgba(255, 243, 250, 0.88);
}

tbody tr.unread-row:hover {
  background: rgba(255, 231, 244, 0.92);
}

.money {
  font-weight: 900;
  color: var(--teal);
}

.danger {
  color: var(--pink);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--teal);
  font-weight: 800;
}

.badge.warn {
  color: #9a6500;
  background: #fff3ce;
}

.badge.danger {
  color: var(--pink-dark);
  background: var(--prototype-pink-soft);
}

.badge.pink {
  color: var(--pink-dark);
  background: var(--prototype-pink-soft);
}

.gift-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.gift-thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.gift-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: linear-gradient(135deg, #e7faf4, #fff3fa);
  font-weight: 900;
}

.ledger-details {
  min-width: 220px;
}

.ledger-details summary {
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--teal);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

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

.ledger-detail-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.48);
}

.ledger-detail-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 92px auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ledger-detail-row span:first-child {
  color: var(--ink);
}

.ledger-filter-card {
  position: relative;
  z-index: 8;
  display: grid;
  gap: 14px;
  overflow: visible;
}

.ledger-main-toolbar {
  position: relative;
  z-index: 3;
  gap: 10px;
}

.ledger-main-toolbar .ledger-keyword-input {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 250px;
}

.ledger-main-toolbar .js-ledger-dealer {
  flex: 0 1 180px;
  min-width: 140px;
  max-width: 170px;
}

.ledger-main-toolbar .date-range-trigger {
  flex: 0 1 290px;
  min-width: 220px;
  max-width: 290px;
}

.ledger-more-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  white-space: nowrap;
}

.ledger-more-filter-button span {
  color: var(--muted);
  font-size: 11px;
}

.ledger-more-filter-button.active {
  border-color: rgba(16, 185, 160, 0.38);
  background: rgba(231, 250, 244, 0.92);
}

.ledger-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.ledger-quick-date-group {
  flex-wrap: nowrap;
}

.ledger-entry-menu,
.ledger-type-picker {
  position: relative;
}

.ledger-entry-menu {
  z-index: 20;
}

.ledger-entry-menu > summary,
.ledger-type-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.ledger-entry-menu > summary::-webkit-details-marker,
.ledger-type-picker > summary::-webkit-details-marker {
  display: none;
}

.ledger-entry-menu > summary.primary {
  min-height: 40px;
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
}

.ledger-type-picker > summary > span {
  color: var(--muted);
  font-size: 11px;
}

.ledger-entry-menu > div {
  position: absolute;
  z-index: 18;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 8px;
  width: 290px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(22, 34, 49, 0.14);
}

.ledger-entry-menu > div button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}

.ledger-entry-menu > div button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ledger-advanced-filters {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(140px, 0.75fr) minmax(210px, 0.9fr) minmax(170px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid rgba(201, 242, 235, 0.9);
}

.ledger-advanced-filters[hidden] {
  display: none;
}

.ledger-filter-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ledger-filter-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ledger-filter-field .input,
.ledger-type-picker > summary {
  width: 100%;
  min-height: 42px;
}

.ledger-direction-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.ledger-direction-segment button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.ledger-direction-segment button.active {
  color: var(--teal-dark);
  background: var(--soft);
}

.ledger-type-options {
  position: absolute;
  z-index: 16;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 4px;
  width: max(100%, 250px);
  max-height: 290px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(22, 34, 49, 0.14);
}

.ledger-type-options label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.ledger-type-options label:hover {
  background: var(--soft);
}

.ledger-type-options input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.ledger-reset-advanced {
  min-height: 42px;
  white-space: nowrap;
}

.ledger-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: -2px 0 18px;
  padding: 2px;
}

.js-ledger-stats .stat strong {
  font-size: clamp(23px, 2vw, 32px);
  white-space: nowrap;
}

.ledger-filter-result {
  display: grid;
  gap: 2px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

.ledger-filter-result strong {
  color: var(--ink);
  font-size: 14px;
}

.ledger-filter-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ledger-filter-chips {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ledger-filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-color: #c9f2eb;
  color: var(--teal-dark);
  background: rgba(231, 250, 244, 0.82);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.ledger-filter-chip.fixed {
  cursor: default;
}

.ledger-filter-chip span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.ledger-clear-filters {
  min-height: 32px;
  padding: 0 8px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.ledger-shell {
  display: grid;
  gap: 14px;
}

.ledger-shell-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  padding: 6px 2px 0;
}

.ledger-shell-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.ledger-shell-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.ledger-shell-actions {
  display: flex;
  gap: 8px;
}

.ledger-shell-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.88);
}

.ledger-board {
  display: grid;
  gap: 14px;
}

.ledger-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--prototype-surface);
}

.ledger-book-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--prototype-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ledger-book-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(520px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(231, 250, 244, 0.72), rgba(255, 255, 255, 0.86));
  border-bottom: 1px solid var(--line);
}

.ledger-book-head h3 {
  margin: 0;
  font-size: 20px;
}

.ledger-book-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.ledger-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.ledger-summary-strip span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.ledger-summary-strip em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.ledger-summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.1;
}

.ledger-book-toggle {
  justify-self: end;
  min-width: 96px;
}

.ledger-book-card.collapsed .ledger-book-head {
  border-bottom: 0;
}

.ledger-entry-list {
  display: grid;
}

.ledger-entry {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.ledger-entry:last-child {
  border-bottom: 0;
}

.ledger-entry.income {
  background: rgba(231, 250, 244, 0.42);
}

.ledger-entry-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  background: #f1f6f5;
  font-weight: 900;
}

.ledger-entry-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ledger-entry-title strong {
  font-size: 16px;
}

.ledger-entry-title > span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.ledger-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ledger-entry-meta span {
  padding: 5px 8px;
  border-radius: 7px;
  color: #596779;
  background: #f4f7f9;
  font-size: 12px;
  font-weight: 850;
}

.ledger-entry-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.ledger-entry-amount {
  text-align: right;
}

.ledger-entry-amount span {
  color: var(--muted);
  font-weight: 900;
}

.ledger-entry-amount strong {
  display: block;
  margin-top: 4px;
  color: var(--pink);
  font-size: 22px;
  line-height: 1.1;
}

.ledger-entry.income .ledger-entry-amount strong {
  color: var(--teal);
}

.ledger-entry-amount em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.chart {
  display: flex;
  align-items: end;
  gap: 18px;
  height: 260px;
  padding: 24px 22px 18px;
}

.bar {
  flex: 1;
  min-width: 28px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--pink), var(--mint));
}

.trend-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 0;
}

.trend-overview div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 252, 251, 0.86);
}

.trend-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-overview strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 260px;
  padding: 28px 16px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to top, rgba(220, 227, 234, 0.52) 1px, transparent 1px) 0 46px / 100% 58px,
    rgba(255, 255, 255, 0.35);
}

.trend-point {
  flex: 1 0 64px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  min-width: 64px;
  height: 242px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.trend-value {
  align-self: start;
  display: grid;
  gap: 3px;
  min-height: 42px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.trend-value strong,
.trend-value span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-value span {
  color: var(--muted);
  font-size: 12px;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-legend i {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: #b5c0cd;
}

.trend-legend i.current {
  background: var(--teal);
}

.trend-control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 16px 8px;
  padding: 12px;
  border: 1px solid rgba(201, 242, 235, 0.9);
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.62);
}

.trend-control-copy {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.trend-control-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trend-control-copy strong {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 950;
}

.trend-control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.trend-granularity-btn {
  min-height: 36px;
  padding: 0 14px;
  border-color: #c9f2eb;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  font-size: 13px;
  box-shadow: none;
}

.trend-granularity-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), var(--teal));
  color: #fff;
  box-shadow: 0 12px 24px rgba(16, 185, 160, 0.2);
}

.trend-yoy-check {
  min-height: 36px;
  background: rgba(255, 255, 255, 0.92);
}

.trend-yoy-check.disabled {
  opacity: 0.54;
}

.trend-bar-stack {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.trend-bar {
  position: relative;
  z-index: 2;
  width: 48%;
  min-height: 22px;
  margin: 0 auto;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #17d4bc, #087f70);
  box-shadow: 0 16px 30px rgba(8, 127, 112, 0.16);
}

.trend-compare-bar {
  position: absolute;
  right: 12%;
  bottom: 0;
  z-index: 1;
  width: 48%;
  min-height: 18px;
  border-radius: 8px 8px 0 0;
  background: #c6cfd8;
}

.trend-label {
  padding-top: 8px;
}

.mini-table {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.trend-detail-table .table-scroll {
  max-height: 320px;
}

.table-sort-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: var(--teal);
  outline: none;
}

.table-sort-button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mini-table th,
.mini-table td {
  padding: 10px 12px;
  font-size: 13px;
}

.explain-list {
  display: grid;
  gap: 12px;
  padding: 4px 2px 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

.explain-list p {
  margin: 0;
}

.explain-list strong {
  color: var(--teal);
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 1px solid rgba(201, 242, 235, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(231, 250, 244, 0.92), rgba(255, 243, 250, 0.58)),
    rgba(255, 255, 255, 0.76);
}

.section-divider h3,
.section-divider p {
  margin: 0;
}

.section-divider h3 {
  font-size: 18px;
}

.section-divider p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.section-divider.compact {
  margin: 16px 0;
  padding: 14px 16px;
}

.section-divider.compact h3 {
  font-size: 16px;
}

.analysis-note-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.analysis-note-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.analysis-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analysis-note-grid span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 252, 251, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.analysis-note-grid strong {
  color: var(--teal);
}

.analysis-breakdown-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.analysis-breakdown-card-head > div {
  min-width: 0;
}

.analysis-breakdown-card-head .input {
  flex: 0 1 320px;
  width: min(320px, 42vw);
  max-width: 360px;
}

.inline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}

.inline-filter label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.comparison-list {
  display: grid;
  gap: 16px;
  padding: 4px 2px 14px;
}

.metric-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 2px 14px;
}

.metric-comparison {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 252, 251, 0.86);
}

.metric-comparison-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.metric-comparison-title strong {
  color: var(--ink);
  font-size: 16px;
}

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

.metric-bar-row {
  display: grid;
  grid-template-columns: minmax(72px, 88px) minmax(90px, 1fr) max-content;
  gap: 12px;
  align-items: center;
  min-height: 34px;
}

.metric-dealer {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--mint));
}

.metric-bar-row strong {
  color: var(--teal);
  overflow: hidden;
  min-width: 58px;
  text-align: right;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(96px, 130px) minmax(240px, 1fr);
  gap: 18px;
  align-items: center;
}

.comparison-row > strong {
  font-size: 16px;
}

.comparison-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.comparison-main {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.comparison-main span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--pink));
}

.comparison-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.share-meter {
  width: 100%;
  min-width: 120px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.share-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--mint));
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(22, 34, 49, 0.34);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(22, 34, 49, 0.22);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.modal-foot {
  border-top: 1px solid var(--line);
  background: #fbfefd;
}

.inline-foot {
  margin-top: 12px;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.settings-preview {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(224, 250, 245, 0.75), #fff 58%, rgba(255, 238, 247, 0.76));
}

.settings-form-grid {
  padding-top: 2px;
}

.settings-preview-logo {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(224, 250, 245, 0.86);
  color: var(--teal-dark);
  font-weight: 1000;
}

.settings-preview small,
.settings-preview p,
.settings-preview em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.settings-preview span {
  color: var(--text);
  font-size: 28px;
  font-weight: 1000;
}

.settings-preview strong {
  color: var(--teal);
  font-size: 20px;
}

.settings-preview b {
  color: var(--teal-dark);
}

.settings-workbench {
  align-items: start;
}

.js-settings-stats .stat strong {
  font-size: 22px;
  line-height: 1.25;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px;
}

.recovery-overview {
  margin-top: 18px;
}

.recovery-disclosure,
.methodology-disclosure,
.financial-disclosure {
  overflow: hidden;
  border: 1px solid rgba(201, 242, 235, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(8, 127, 112, 0.05);
}

.recovery-disclosure > summary,
.methodology-disclosure > summary,
.financial-disclosure > summary {
  display: grid;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
  background:
    linear-gradient(90deg, rgba(231, 250, 244, 0.78), rgba(255, 243, 250, 0.42)),
    rgba(255, 255, 255, 0.9);
}

.recovery-disclosure > summary {
  grid-template-columns: minmax(280px, 1fr) minmax(190px, auto) minmax(88px, auto) auto;
}

.recovery-disclosure summary::-webkit-details-marker,
.methodology-disclosure summary::-webkit-details-marker,
.financial-disclosure summary::-webkit-details-marker {
  display: none;
}

.recovery-disclosure > summary:focus-visible,
.methodology-disclosure > summary:focus-visible,
.financial-disclosure > summary:focus-visible {
  outline: 3px solid rgba(16, 185, 160, 0.2);
  outline-offset: -3px;
}

.recovery-disclosure h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.recovery-disclosure summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recovery-eyebrow,
.financial-eyebrow,
.book-cost-kicker {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.recovery-summary-result,
.recovery-summary-rate,
.financial-summary-result,
.financial-summary-rate {
  display: grid;
  gap: 3px;
}

.recovery-summary-result span,
.recovery-summary-rate span,
.financial-summary-result span,
.financial-summary-rate span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recovery-summary-result strong,
.financial-summary-result strong {
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

.recovery-summary-rate strong,
.financial-summary-rate strong {
  font-size: 18px;
  white-space: nowrap;
}

.disclosure-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.disclosure-label::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

details[open] > summary .disclosure-label::after {
  transform: translateY(2px) rotate(225deg);
}

.recovery-disclosure-body,
.financial-disclosure-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.recovery-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.recovery-detail-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.82);
}

.recovery-detail-grid span,
.recovery-detail-grid em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.recovery-detail-grid strong {
  display: block;
  margin: 5px 0;
  font-size: 19px;
}

.recovery-equation {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.54);
}

.recovery-equation strong {
  color: var(--teal-dark);
}

.recovery-equation span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recovery-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.project-recovery-section {
  margin-top: 12px;
}

.project-recovery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
}

.methodology-disclosure {
  margin-top: 18px;
}

.methodology-disclosure > summary {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-block: 13px;
}

.methodology-disclosure summary > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.methodology-disclosure summary strong {
  font-size: 15px;
}

.methodology-disclosure summary span:not(.disclosure-label) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.methodology-disclosure .analysis-note-grid {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.book-cost-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px;
}

.book-cost-summary-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.88);
}

.book-cost-summary-panel.cost-focus {
  border-color: rgba(0, 137, 124, 0.22);
  background: rgba(231, 250, 244, 0.84);
}

.book-cost-summary-panel.profit-focus {
  border-color: rgba(244, 90, 181, 0.16);
  background: rgba(255, 246, 251, 0.84);
}

.book-cost-summary-panel > strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.book-cost-summary-panel > strong small {
  color: var(--muted);
  font-size: 14px;
}

.book-cost-summary-panel > em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.book-cost-summary-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.book-cost-summary-panel dl:has(> div:only-child) {
  grid-template-columns: 1fr;
}

.book-cost-summary-panel dl div {
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.book-cost-summary-panel dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.book-cost-summary-panel dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.modal-financial-disclosure {
  margin: 0 24px 12px;
}

.modal-financial-disclosure > summary {
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  padding: 14px 16px;
}

.modal-financial-disclosure summary > div:first-child {
  display: grid;
  gap: 3px;
}

.modal-financial-disclosure summary > div:first-child > strong {
  font-size: 16px;
}

.modal-financial-disclosure summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.profit-equation {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(247, 253, 251, 0.9);
}

.profit-equation strong {
  color: var(--teal-dark);
  font-size: 17px;
}

.profit-equation span {
  color: var(--muted);
  font-weight: 800;
}

.book-profit-calculation .table-scroll table {
  min-width: 820px;
}

.book-profit-calculation td:nth-child(3) {
  font-weight: 900;
  white-space: nowrap;
}

.profit-income {
  color: var(--teal);
}

.profit-cost {
  color: #b26a16;
}

.book-profit-total-row td {
  border-top: 2px solid var(--line);
  background: rgba(247, 253, 251, 0.82);
}

.detail-box {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.detail-box.wide {
  grid-column: span 2;
}

.detail-box.wide strong {
  font-size: 18px;
  line-height: 1.5;
}

.detail-box span {
  color: var(--muted);
  font-weight: 800;
}

.detail-box strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.detail-box.locked {
  background: #f8fafc;
}

.detail-box.locked strong {
  color: var(--muted);
}

.book-workbench-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.book-workbench-actions button {
  min-height: 106px;
  padding: 18px;
  text-align: left;
  white-space: normal;
}

.book-workbench-actions strong,
.book-workbench-actions span {
  display: block;
}

.book-workbench-actions strong {
  font-size: 18px;
  line-height: 1.35;
}

.book-workbench-actions span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.book-workbench-actions .primary span {
  color: rgba(255, 255, 255, 0.86);
}

.warehouse-modal .modal-head {
  background:
    linear-gradient(90deg, rgba(16, 201, 167, 0.1), transparent 58%),
    #fff;
}

.dealer-modal .modal-head {
  background:
    linear-gradient(90deg, rgba(244, 90, 181, 0.08), transparent 56%),
    #fff;
}

.printer-modal .modal-head {
  background:
    linear-gradient(90deg, rgba(16, 201, 167, 0.1), rgba(244, 90, 181, 0.06) 66%, transparent),
    #fff;
}

.printer-card {
  background:
    linear-gradient(180deg, rgba(16, 201, 167, 0.04), transparent 42%),
    rgba(255, 255, 255, 0.94);
}

.warehouse-step-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(231, 250, 244, 0.92), rgba(255, 255, 255, 0.92));
}

.warehouse-step-panel span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.warehouse-step-panel strong {
  color: var(--teal);
  font-size: 20px;
}

.warehouse-step-panel p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
  text-align: right;
}

.warehouse-step-panel.is-danger {
  border-color: #ffd2e9;
  background: linear-gradient(90deg, rgba(255, 241, 248, 0.92), rgba(255, 255, 255, 0.92));
}

.warehouse-step-panel.is-danger strong {
  color: var(--pink);
}

.shipping-info-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}

.shipping-info-grid.dealer-shipping {
  grid-template-columns: 2fr 1fr 1fr;
}

.shipping-box {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.shipping-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.shipping-box strong {
  font-size: 16px;
}

.shipping-box.editable {
  background: linear-gradient(180deg, rgba(231, 250, 244, 0.72), #fff);
}

.shipping-box .input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
}

.packing-slip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px dashed #b8efe6;
  border-radius: 8px;
  background: rgba(231, 250, 244, 0.64);
}

.packing-slip div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(201, 242, 235, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.packing-slip div.wide {
  grid-column: span 2;
}

.packing-slip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.packing-slip strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exception-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.exception-editor textarea {
  min-height: 86px;
  resize: vertical;
}

.file-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-download-link {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.quote-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: var(--soft);
}

.action-drawer-card {
  padding: 0;
  overflow: hidden;
}

.action-drawer-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}

.action-drawer-card > summary::-webkit-details-marker {
  display: none;
}

.action-drawer-card > summary h3 {
  margin: 0;
  font-size: 18px;
}

.action-drawer-card > summary .section-subtitle {
  margin: 6px 0 0;
}

.drawer-toggle-text {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 900;
  text-align: center;
}

.action-drawer-card[open] .drawer-toggle-text {
  background: var(--soft);
}

.action-drawer-card[open] .drawer-toggle-text::before {
  content: "收起";
}

.action-drawer-card[open] .drawer-toggle-text {
  font-size: 0;
}

.action-drawer-card[open] .drawer-toggle-text::before {
  font-size: 14px;
}

.action-drawer-body {
  padding: 0 24px 24px;
}

.quote-form label {
  display: grid;
  gap: 8px;
}

.quote-form label.wide {
  grid-column: 1 / -1;
}

.quote-form label span {
  color: var(--muted);
  font-weight: 900;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.inbound-diff-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: #f6fffc;
}

.inbound-diff-card span {
  color: var(--muted);
  font-weight: 900;
}

.inbound-diff-card strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.inbound-diff-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.quote-form textarea.input {
  min-height: 98px;
  resize: vertical;
  line-height: 1.6;
}

.material-form {
  background:
    linear-gradient(135deg, rgba(16, 201, 167, 0.1), transparent 48%),
    var(--soft);
}

.material-action-stack {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.material-action-panel {
  display: grid;
  gap: 12px;
}

.internal-order-lines {
  display: grid;
  gap: 10px;
}

.internal-order-line {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) minmax(130px, 0.36fr) minmax(130px, 0.36fr);
  gap: 10px;
  align-items: center;
}

.internal-order-line strong,
.internal-order-line span {
  color: var(--muted);
  font-weight: 900;
}

.internal-order-line-head {
  padding: 0 2px;
}

.internal-order-line-head span {
  font-size: 13px;
}

.internal-order-preview {
  border: 1px solid rgba(16, 201, 167, 0.22);
  border-radius: 8px;
  background: rgba(16, 201, 167, 0.08);
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
  padding: 12px 14px;
}

.internal-order-preview strong {
  color: var(--teal-700);
}

.internal-order-preview span {
  color: var(--pink-700);
}

.sales-order-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 18px;
}

.sales-order-empty {
  grid-column: 1 / -1;
}

.sales-order-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 7px 18px rgba(23, 32, 43, 0.07);
}

.sales-order-card.has-warning {
  border-color: #f5b8d8;
}

.sales-order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.sales-order-no {
  padding: 0;
  font-size: 13px;
  font-weight: 1000;
}

.sales-order-card h3 {
  margin: 6px 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.sales-order-card p,
.sales-order-foot > span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.sales-order-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  margin-top: auto;
  padding: 12px 16px 12px 18px;
  border-top: 1px solid var(--line);
  background: #f7fafb;
}

.sales-order-foot > span strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.sales-order-badges,
.sales-order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sales-order-warning {
  margin: 14px 18px 0;
  padding: 10px 12px;
  border: 1px solid #ffd1e8;
  border-radius: 8px;
  background: #fff3fa;
  color: #c52b79;
  font-size: 13px;
  font-weight: 900;
}

.sales-order-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 18px 18px;
}

.sales-order-metrics div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.82);
}

.sales-order-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sales-order-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sales-order-actions button {
  min-height: 38px;
  padding: 8px 13px;
  box-shadow: 0 2px 5px rgba(23, 32, 43, 0.06);
}

@media (max-width: 1180px) {
  .sales-order-board {
    grid-template-columns: 1fr;
  }
}

.approval-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.approval-empty {
  grid-column: 1 / -1;
}

.approval-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(16, 201, 167, 0.06), transparent 42%),
    rgba(255, 255, 255, 0.96);
}

.approval-card.warn {
  border-color: #ffe2a8;
  background:
    linear-gradient(135deg, rgba(255, 243, 206, 0.72), transparent 48%),
    rgba(255, 255, 255, 0.96);
}

.approval-card.danger,
.approval-card.pink {
  border-color: #ffd1e8;
  background:
    linear-gradient(135deg, rgba(244, 90, 181, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.96);
}

.approval-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.approval-card-head > div {
  min-width: 0;
}

.approval-card-head h3 {
  margin: 8px 0 4px;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.approval-card-head h3 .link-button {
  padding: 0;
  font-size: inherit;
}

.approval-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.approval-card-head > strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--teal-dark);
  font-size: 13px;
  white-space: nowrap;
}

.approval-summary-card {
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.approval-summary-card:hover,
.approval-summary-card:focus-visible,
.approval-summary-card.active {
  border-color: #9be8dc;
  background:
    linear-gradient(135deg, rgba(16, 201, 167, 0.12), rgba(255, 255, 255, 0.98) 58%),
    #fff;
}

.approval-summary-card:focus-visible {
  outline: 3px solid rgba(16, 201, 167, 0.24);
  outline-offset: 2px;
}

.approval-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.approval-meta div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c9f2eb;
  border-radius: 8px;
  background: rgba(240, 253, 249, 0.82);
}

.approval-meta span,
.approval-impact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.approval-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.approval-impact {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
}

.approval-impact strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.55;
}

.approval-impact em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.approval-review-note {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.approval-review-note strong {
  color: var(--teal);
  font-size: 14px;
}

.approval-review-note span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.approval-actions button {
  min-height: 34px;
  padding: 8px 10px;
  white-space: nowrap;
}

.compact-title {
  padding: 0;
}

.compact-title h4 {
  margin: 0 0 4px;
}

.spec-editor {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.spec-row {
  display: grid;
  grid-template-columns: 92px 76px 100px 150px 126px 150px 100px minmax(180px, 1fr) 76px;
  gap: 8px;
  min-width: 1094px;
  align-items: center;
}

.spec-row.spec-head {
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.spec-row .input {
  min-width: 0;
  padding: 10px 11px;
}

.quote-line-editor {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.js-quote-lines {
  display: grid;
  gap: 8px;
}

.quote-line {
  display: grid;
  grid-template-columns: 140px minmax(220px, 1.25fr) 105px 105px 120px minmax(200px, 1fr) 42px;
  gap: 8px;
  align-items: center;
  min-width: 980px;
}

.quote-line-head {
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quote-line .input {
  min-width: 0;
  padding: 10px 11px;
}

.printer-stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
}

.printer-stage-actions div {
  display: grid;
  gap: 4px;
}

.printer-stage-actions strong {
  font-size: 15px;
}

.printer-stage-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.change-editor {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.change-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(92px, 0.7fr));
  align-items: center;
  gap: 10px;
  min-width: 820px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.change-row.change-head {
  background: #f6fbfa;
  color: var(--muted);
  font-weight: 900;
}

.change-row strong {
  display: grid;
  gap: 4px;
}

.change-row small {
  color: var(--muted);
  font-size: 12px;
}

.change-row .input {
  min-width: 0;
  padding: 10px 11px;
}

.flow-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #b8efe6;
  border-radius: 8px;
  background: #effbf8;
}

.flow-note strong {
  color: var(--teal);
  white-space: nowrap;
}

.flow-note span {
  color: var(--muted);
  font-weight: 800;
}

.settlement-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.settlement-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.settlement-step > span:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef3f5;
  font-weight: 950;
}

.settlement-step-copy {
  min-width: 0;
}

.settlement-step strong {
  display: block;
  line-height: 1.15;
}

.settlement-step em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.settlement-step.done,
.settlement-step.current {
  border-color: #b8efe6;
  background: #effbf8;
}

.settlement-step.done > span:first-child,
.settlement-step.current > span:first-child {
  color: #fff;
  background: var(--teal);
}

.settlement-step.current {
  box-shadow: 0 14px 30px rgba(8, 127, 112, 0.1);
}

.timeline {
  display: grid;
  gap: 12px;
  padding: 4px 0 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.timeline-item > span {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(16, 201, 167, 0.14);
}

.timeline-item strong {
  display: block;
  margin-bottom: 3px;
}

.modal-section {
  padding: 0 24px 18px;
}

.modal-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 12px;
}

.modal-section-title h4 {
  margin: 0;
  font-size: 18px;
}

.modal-section-title p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.quick-rule-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

@media (max-width: 1100px) {
  body {
    min-width: 0;
  }

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

  .modal-financial-disclosure > summary {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .modal-financial-disclosure > summary .disclosure-label {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .recovery-detail-grid,
  .book-cost-overview,
  .project-recovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-toolbar {
    justify-content: flex-start;
  }

  .quick-date-group {
    flex: 1 1 100%;
  }

  .trend-control-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .trend-control-actions {
    justify-content: flex-start;
  }

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

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

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

  .warehouse-pick-book-line,
  .warehouse-pick-form-row {
    grid-template-columns: 1fr;
  }

  .warehouse-shipped-row {
    grid-template-columns: 1fr;
  }

  .login-screen {
    --login-peek-width: clamp(132px, 24vw, 150px);
    grid-template-columns: 1fr;
    align-items: start;
    padding: 112px 28px 36px;
  }

  .login-brand {
    left: 28px;
  }

  .login-copy {
    margin-top: 110px;
  }

  .login-copy h1 {
    font-size: clamp(34px, 8vw, 44px);
  }

  .login-card-shell {
    margin-left: 0;
  }

  .login-peek {
    left: 65%;
  }

  .stats,
	  .stats-five,
	  .two,
	  .approval-board,
	  .book-workbench-actions,
	  .detail-grid,
	  .warehouse-grid,
	  .warehouse-pick-grid,
	  .warehouse-shipped-layout,
	  .shipping-info-grid,
	  .quote-form {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-book-head {
    grid-template-columns: 1fr;
  }

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

  .ledger-reset-advanced {
    justify-self: start;
  }

  .ledger-book-toggle {
    justify-self: start;
  }

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

  .warehouse-ship-form button {
    justify-self: start;
  }

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

  .dealer-layout {
    grid-template-columns: 1fr;
  }

  .cart-backdrop {
    display: none;
  }

  .cart-panel {
    position: sticky;
    top: 84px;
    width: auto;
    max-height: none;
    overflow: auto;
  }

  .sidebar {
    width: 244px;
  }

  .app {
    margin-left: 244px;
  }
}

@media (max-width: 1280px) {
  .approval-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sales-order-board {
    gap: 14px;
    padding: 12px;
  }

  .sales-order-card-head,
  .sales-order-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-order-badges,
  .sales-order-actions {
    justify-content: flex-start;
  }

  .sales-order-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px;
  }

  .sales-order-warning {
    margin: 14px 14px 0;
  }

  .sales-order-actions button {
    flex: 1 1 auto;
  }

  .analysis-breakdown-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-breakdown-card-head .input {
    width: 100%;
    max-width: none;
  }

  .type-setting-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .type-setting-card-head .primary {
    width: 100%;
  }

  .profit-equation {
    align-items: flex-start;
    flex-direction: column;
  }

  .recovery-disclosure > summary,
  .modal-financial-disclosure > summary,
  .methodology-disclosure > summary {
    grid-template-columns: 1fr;
  }

  .recovery-disclosure > summary .disclosure-label,
  .modal-financial-disclosure > summary .disclosure-label,
  .methodology-disclosure > summary .disclosure-label {
    grid-column: auto;
    justify-self: start;
  }

  .recovery-detail-grid,
  .book-cost-overview,
  .project-recovery-grid,
  .analysis-note-grid {
    grid-template-columns: 1fr;
  }

  .recovery-equation,
  .methodology-disclosure summary > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-cost-overview {
    padding: 14px 16px;
  }

  .modal-financial-disclosure {
    margin-right: 16px;
    margin-left: 16px;
  }

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

  .settlement-flow {
    grid-template-columns: 1fr;
  }

  .packing-slip,
  .packing-slip div.wide {
    grid-template-columns: 1fr;
    grid-column: 1;
  }

  .internal-order-line,
  .internal-order-line-head {
    grid-template-columns: 1fr;
  }

  .internal-order-line-head {
    display: none;
  }

  .sidebar {
    position: static;
    width: auto;
  }

  .app {
    margin-left: 0;
  }

  .topbar,
  .content {
    padding: 20px;
  }

  .trend-control-strip {
    margin-right: 12px;
    margin-left: 12px;
  }

  .trend-granularity-btn,
  .trend-yoy-check {
    flex: 1 1 calc(33.333% - 8px);
    justify-content: center;
  }

  .app-toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
  }

  .stats,
  .stats-five,
	  .two,
	  .approval-board,
	  .approval-meta,
	  .book-workbench-actions,
	  .detail-grid,
	  .warehouse-grid,
	  .warehouse-pick-grid,
	  .warehouse-pick-form-row,
	  .warehouse-ship-form,
	  .warehouse-shipped-layout,
	  .shipping-info-grid,
	  .quote-form {
    grid-template-columns: 1fr;
  }

  .warehouse-sync-note,
  .warehouse-ship-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .warehouse-shipped-kv strong {
    text-align: left;
  }

  .warehouse-step-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .warehouse-step-panel p {
    max-width: none;
    text-align: left;
  }

  .detail-box.wide {
    grid-column: 1;
  }

  .product-grid,
  .product-meta,
  .quantity-row {
    grid-template-columns: 1fr;
  }

  .modal-mask {
    padding: 14px;
  }

  .modal-section-title,
  .modal-foot,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-toolbar .input,
  .compact-toolbar .select-like,
  .compact-toolbar select,
  .compact-toolbar .date-range-trigger,
  .quick-date-group,
  .compact-toolbar button {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }

  .ledger-main-toolbar .ledger-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  .ledger-main-toolbar .ledger-toolbar-actions > *,
  .ledger-entry-menu > summary {
    width: 100%;
  }

  .ledger-entry-menu > div {
    right: auto;
    left: 0;
    width: min(320px, calc(100vw - 72px));
  }

  .ledger-advanced-filters {
    grid-template-columns: 1fr;
  }

  .ledger-filter-result {
    width: 100%;
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ledger-filter-chips {
    flex-basis: 100%;
  }

  .ledger-shell-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-date-group .quick-date {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    width: auto;
  }

  .date-picker-head,
  .date-picker-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .date-picker-foot > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
}
