:root {
  --bg: #edf6ff;
  --surface: #ffffff;
  --surface-soft: #f4f9ff;
  --ink: #102033;
  --muted: #66819f;
  --line: #d7e7f8;
  --brand: #0757d6;
  --blue: #0969ff;
  --green: #12a878;
  --amber: #e98500;
  --red: #e54855;
  --violet: #6d5dfc;
  --shadow: 0 18px 48px rgba(22, 97, 185, 0.14);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 22% 0%, rgba(9, 105, 255, 0.13), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(18, 168, 120, 0.08), transparent 24%),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(237, 246, 255, 0.92), rgba(218, 237, 255, 0.88)),
    var(--bg);
}

.login-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(177, 210, 245, 0.92);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(22, 97, 185, 0.18);
  padding: 30px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-brand-row h1 {
  font-size: 26px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #344d6c;
  font-weight: 800;
}

.login-form input {
  height: 46px;
  border: 1px solid #bfd6f2;
  border-radius: 8px;
  padding: 0 14px;
  background: #f8fbff;
  color: var(--ink);
  outline: none;
}

.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(9, 105, 255, 0.12);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.login-submit {
  height: 46px;
  justify-content: center;
}

.login-help {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #5a7694;
  font-size: 12px;
  font-weight: 800;
}

.sidebar {
  background: #fbfcfe;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0047c7, #02a8ff);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 17px;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-group {
  margin: 8px 0 18px;
}

.nav-title {
  padding: 8px 10px;
  color: #9aa5b1;
  font-size: 13px;
  font-weight: 700;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344055;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 700;
  margin-bottom: 3px;
}

.nav button.active {
  background: linear-gradient(135deg, #0757d6, #083b9e);
  color: #fff;
  box-shadow: 0 10px 26px rgba(8, 13, 24, 0.18);
}

.nav .badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  height: 72px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  margin-bottom: 22px;
  box-shadow: 0 8px 26px rgba(9, 105, 255, 0.08);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

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

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

.filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters input,
.filters select {
  min-width: 150px;
}

.icon-btn,
.avatar-btn,
.logout-btn,
.dark-btn,
.outline-btn,
.plain-btn {
  border-radius: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.icon-btn {
  width: 42px;
  position: relative;
}

.icon-btn b {
  position: absolute;
  top: -6px;
  right: -4px;
  background: #d85a1f;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.avatar-btn {
  padding: 0 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #14213d, #d86b2a);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.avatar-tone-1 {
  background: linear-gradient(135deg, #14213d, #d86b2a);
}

.avatar-tone-2 {
  background: linear-gradient(135deg, #0757d6, #58c7ff);
}

.avatar-tone-3 {
  background: linear-gradient(135deg, #067a5a, #45d6a4);
}

.avatar-tone-4 {
  background: linear-gradient(135deg, #be5a00, #ffbc4f);
}

.avatar-tone-5 {
  background: linear-gradient(135deg, #b91c5c, #ff7aa8);
}

.avatar-tone-6 {
  background: linear-gradient(135deg, #111827, #64748b);
}

.dark-btn {
  background: linear-gradient(135deg, #0757d6, #083b9e);
  color: #fff;
  border-color: #0757d6;
  padding: 0 18px;
}

.outline-btn,
.plain-btn {
  padding: 0 14px;
}

.danger-outline {
  color: #b42318;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(255, 241, 242, 0.72);
}

.danger-outline:hover {
  background: rgba(255, 228, 230, 0.9);
  border-color: rgba(225, 29, 72, 0.72);
}

.plain-btn {
  color: #53627a;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.dark-overview {
  background:
    radial-gradient(circle at 92% 24%, rgba(0, 221, 255, 0.2), transparent 18%),
    radial-gradient(circle at 24% 8%, rgba(9, 105, 255, 0.24), transparent 24%),
    linear-gradient(135deg, #06162d, #082b63 55%, #06142a);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  color: #e8f2ff;
  box-shadow: 0 24px 60px rgba(5, 12, 24, 0.2);
}

.dark-head,
.dark-panel-head,
.dark-actions,
.dark-tabs,
.chart-legend {
  display: flex;
  align-items: center;
}

.dark-head {
  min-height: 52px;
  justify-content: space-between;
  border: 1px solid rgba(140, 170, 210, 0.2);
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(6, 14, 31, 0.6);
}

.dark-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #ff4d57;
  box-shadow: 0 0 14px rgba(255, 77, 87, 0.8);
}

.dark-actions {
  gap: 8px;
  color: #91a8c8;
  font-size: 12px;
}

.outline-dark-btn {
  border: 1px solid rgba(81, 158, 245, 0.6);
  background: rgba(22, 65, 120, 0.7);
  color: #d8ecff;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 14px;
  font-weight: 800;
}

.dark-tabs {
  gap: 12px;
  padding: 16px 2px;
  color: #a7c7ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  overflow-x: auto;
}

.dark-tabs span {
  white-space: nowrap;
}

.dark-tabs span::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: #9c7dff;
  margin-left: 12px;
  vertical-align: middle;
}

.dark-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(280px, 0.75fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dark-panel {
  border: 1px solid rgba(139, 170, 210, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 25, 49, 0.96), rgba(9, 20, 41, 0.96));
  padding: 14px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dark-panel.wide {
  grid-column: span 1;
}

.dark-panel-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dark-panel h2 {
  font-size: 14px;
  margin: 0;
  color: #e8f2ff;
}

.dark-panel-head span {
  color: #7fd7ff;
  font-size: 12px;
}

.trend-chart {
  min-height: 292px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 100% 54px, 46px 100%;
}

.trend-bars {
  position: absolute;
  inset: 40px 12px 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 5px;
}

.trend-bars span {
  width: 12px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #39caff, #1471b8);
  opacity: 0.86;
  position: relative;
}

.trend-bars b {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  color: #6f839f;
  font-size: 10px;
  white-space: nowrap;
}

.trend-lines {
  position: absolute;
  inset: 30px 10px 24px;
  width: calc(100% - 20px);
  height: calc(100% - 54px);
  filter: drop-shadow(0 0 8px rgba(80, 255, 160, 0.28));
}

.trend-lines polyline {
  fill: none;
  stroke: #2ee577;
  stroke-width: 4;
}

.trend-lines .red {
  stroke: #ff5564;
}

.trend-lines .violet {
  stroke: #a66cff;
}

.trend-lines .cyan {
  stroke: #45e3ff;
  stroke-dasharray: 7 7;
}

.chart-legend {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  gap: 10px;
  flex-wrap: wrap;
  color: #a9b9d0;
  font-size: 11px;
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #47e987;
  margin-right: 5px;
}

.chart-legend span:nth-child(2)::before { background: #ff5965; }
.chart-legend span:nth-child(3)::before { background: #37c8ff; }
.chart-legend span:nth-child(4)::before { background: #ffd95a; }
.chart-legend span:nth-child(5)::before { background: #a86dff; }
.chart-legend span:nth-child(6)::before { background: #45e3ff; }
.chart-legend span:nth-child(7)::before { background: #ff892f; }

.donut-wrap {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 0.9fr);
  align-items: center;
  gap: 14px;
  min-height: 250px;
}

.donut,
.mini-donut {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#24344e 0 100%);
  position: relative;
  margin: 0 auto;
  box-shadow: 0 0 34px rgba(51, 192, 255, 0.18);
}

.donut::after,
.mini-donut::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: #08162c;
  box-shadow: inset 0 0 20px rgba(45, 120, 210, 0.45);
}

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

.donut-list span {
  color: #aebdd2;
  font-size: 12px;
}

.donut-list i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 7px;
}

.after-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.after-card,
.dark-kpi {
  border: 1px solid rgba(148, 169, 204, 0.18);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(38, 51, 76, 0.92), rgba(26, 38, 64, 0.86));
  padding: 13px;
  min-height: 86px;
}

.after-card span,
.dark-kpi span {
  color: #8ea6c4;
  font-size: 12px;
}

.after-card strong,
.dark-kpi strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.after-card small,
.dark-kpi small {
  display: block;
  color: #91a3bc;
  margin-top: 8px;
}

.dark-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dark-kpi {
  min-height: 94px;
  background:
    radial-gradient(circle at 96% 0%, rgba(61, 187, 165, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(21, 37, 68, 0.96), rgba(12, 29, 59, 0.96));
}

.mini-donut-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 18px;
}

.mini-donut {
  width: 130px;
  background: conic-gradient(#24344e 0 100%);
}

.mini-donut.out {
  background: conic-gradient(#24344e 0 100%);
}

.reason-tags {
  color: #9eb1cc;
  line-height: 1.8;
  font-size: 13px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-height: 92px;
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: #314055;
  font-weight: 800;
}

.clickable-metrics .metric {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.clickable-metrics .metric:hover,
.clickable-metrics .metric.active {
  border-color: rgba(9, 105, 255, 0.5);
  box-shadow: 0 12px 28px rgba(9, 105, 255, 0.14);
  transform: translateY(-1px);
}

.content-grid,
.split-layout,
.inventory-layout {
  display: grid;
  gap: 14px;
}


.product-search-panel {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 42px 18px 34px;
}

.product-search-box {
  width: min(920px, 100%);
  display: grid;
  gap: 16px;
  text-align: center;
}

.product-search-title h2 {
  margin: 2px 0 8px;
  font-size: 34px;
  line-height: 1.15;
}

.product-search-title span {
  color: var(--muted);
  font-weight: 700;
}

.global-product-search {
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: center;
  border: 1px solid rgba(145, 184, 228, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(9, 105, 255, 0.12);
  padding: 0 18px;
}

.global-product-search span {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.global-product-search input {
  width: 100%;
  height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.global-product-search input::placeholder {
  color: #8aa4c1;
}

.product-search-clear {
  width: 34px;
  height: 34px;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.product-search-clear:hover,
.product-search-clear:focus-visible {
  background: #dbeafe;
  border-color: #60a5fa;
  outline: none;
}

.product-search-clear[hidden] {
  display: none;
}

.product-search-filter-row,
.product-search-stats,
.product-search-results-head,
.product-search-card-head,
.product-search-meta,
.product-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-search-filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  justify-content: center;
  width: min(920px, 100%);
  margin: 0 auto;
}

.product-search-filter-row select {
  min-width: 0;
  width: 100%;
  height: 40px;
  border: 1px solid #bfd6f2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.product-search-stats {
  justify-content: center;
}

.product-search-stats span {
  border: 1px solid rgba(177, 210, 245, 0.92);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  color: #426384;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
}

.product-search-results-panel {
  margin-top: 8px;
}

.product-search-results-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.product-search-results-head > span {
  color: var(--muted);
  font-weight: 800;
}

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

.product-search-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(189, 215, 242, 0.9);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.9));
  padding: 12px;
}

.product-search-thumb {
  width: 64px;
  height: 52px;
  border: 1px solid #c8def6;
  border-radius: 8px;
  background: #f6fbff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-search-thumb.lens {
  background: linear-gradient(135deg, #eef7ff, #dbeafe);
}

.product-search-thumb strong {
  color: var(--blue);
  font-size: 13px;
}

.product-search-thumb .image-placeholder,
.product-search-thumb .image-thumb {
  width: 64px;
  height: 52px;
}

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

.product-search-info h3 {
  margin: 6px 0 5px;
  color: var(--ink);
  font-size: 17px;
}

.product-search-info p {
  margin: 0;
  color: #526b88;
  font-weight: 700;
}

.product-search-highlights {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 8px;
  max-width: 620px;
}

.product-search-highlights span {
  min-height: 58px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
}

.product-search-highlights small {
  color: #526b88;
  font-size: 12px;
  font-weight: 900;
}

.product-search-highlights b {
  color: var(--blue);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
}

.product-search-highlights .stock.good {
  border-color: #86efac;
  background: linear-gradient(135deg, #dcfce7, #f8fffb);
}

.product-search-highlights .stock.good b {
  color: #059669;
}

.product-search-highlights .stock.warn {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.product-search-highlights .stock.warn b {
  color: #ea580c;
}

.product-search-highlights .stock.bad {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.product-search-highlights .stock.bad b {
  color: #dc2626;
}

.product-search-highlights .cost b {
  color: #475569;
}

.product-search-meta {
  margin-top: 7px;
  color: #5e7896;
  font-size: 12px;
  font-weight: 800;
}

.product-search-meta b {
  color: var(--ink);
}

.product-search-empty {
  text-align: center;
  padding: 28px;
}
.content-grid {
  grid-template-columns: minmax(560px, 1.2fr) minmax(420px, 0.8fr);
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
  box-shadow: 0 10px 28px rgba(9, 105, 255, 0.06);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.week-row,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 6px;
}

.week-row span {
  text-align: center;
  background: #eef2f6;
  border-radius: 6px;
  padding: 9px 0;
  color: #53627a;
  font-weight: 800;
  font-size: 13px;
}

.calendar {
  margin-top: 6px;
}

.day-cell {
  background: #f8fafc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  min-height: 116px;
  padding: 10px;
  overflow: hidden;
}

.day-cell.muted {
  color: #a1aab7;
}

.day-cell strong {
  display: block;
  font-size: 19px;
  margin-bottom: 12px;
}

.day-cell .tags {
  display: flex;
  gap: 4px;
  min-height: 18px;
  flex-wrap: wrap;
}

.tag {
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 11px;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 800;
}

.tag.hot {
  color: #b45309;
  background: #ffedd5;
}

.day-cell p {
  margin: 7px 0 0;
  color: #53627a;
  font-size: 13px;
  line-height: 1.4;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.table-wrap {
  overflow-x: auto;
}

.batch-bar,
.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-bar {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(150, 190, 235, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.batch-bar span {
  color: #21334b;
  font-weight: 900;
}

.batch-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #21334b;
  font-weight: 900;
}

.batch-check input {
  min-height: auto;
}

.batch-bar small {
  color: var(--muted);
  font-weight: 700;
}

.order-flow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.order-flow-board article {
  border: 1px solid rgba(150, 190, 235, 0.58);
  border-radius: 14px;
  padding: 13px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(223, 239, 255, 0.48));
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.order-flow-board article:hover,
.order-flow-board article.active {
  border-color: rgba(0, 113, 227, 0.62);
  box-shadow: 0 14px 34px rgba(30, 96, 180, 0.16);
  transform: translateY(-1px);
}

.order-flow-board strong {
  display: block;
  margin-bottom: 6px;
  color: #0f2744;
}

.order-flow-board span {
  color: #647895;
  font-size: 12px;
  line-height: 1.55;
}

.privacy-note {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 14px;
  background: rgba(219, 234, 254, 0.56);
  color: #1d4ed8;
  font-weight: 800;
}

.merge-alerts {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.merge-alerts article {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 14px;
  background: rgba(255, 247, 237, 0.72);
}

.merge-alerts span,
.note-stack span {
  color: #647895;
  font-size: 12px;
}

.order-card-list {
  display: grid;
  gap: 12px;
}

.order-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 288px;
  grid-template-areas:
    "check main actions";
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(150, 190, 235, 0.56);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 36px rgba(28, 88, 160, 0.08);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.order-card-check {
  grid-area: check;
  padding-top: 5px;
}

.order-card-check input {
  min-height: auto;
}

.order-card-main {
  grid-area: main;
  display: grid;
  grid-template-columns: 280px minmax(150px, 0.55fr) minmax(240px, 1fr) minmax(170px, 0.7fr) minmax(150px, 0.58fr);
  gap: 12px;
  min-width: 0;
}

.order-product-cell,
.customer-cell,
.note-stack {
  min-width: 0;
}

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

.order-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.order-product-head .mini-btn {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  margin-right: 0;
  font-size: 12px;
  border-radius: 999px;
}

.order-product-cell strong {
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

.order-product-cell small {
  color: #647895;
  font-weight: 700;
  line-height: 1.45;
}

.order-product-list {
  display: grid;
  gap: 6px;
}

.order-product-list.empty {
  color: #647895;
  font-weight: 800;
}

.order-product-list-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 42px 40px 76px;
  gap: 6px;
  align-items: start;
  font-size: 12px;
  line-height: 1.45;
}

.order-product-list-row strong {
  font-size: 13px;
}

.order-product-list-row span {
  color: #536f92;
  font-weight: 800;
}

.field-label {
  color: #6b7f9a;
  font-size: 12px;
  font-weight: 900;
}

.order-status-grid {
  grid-area: status;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.order-card-actions {
  grid-area: actions;
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.order-express-picker {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-express-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-express-picker select {
  min-height: 34px;
  width: 100%;
}

.note-stack {
  display: grid;
  gap: 5px;
}

.note-stack strong {
  color: #0f2744;
  font-size: 12px;
}

.privacy-note span {
  color: #557090;
  font-size: 13px;
  line-height: 1.55;
}

.subsection-head {
  margin: 20px 0 12px;
}

.subsection-head h3 {
  margin: 3px 0 0;
}

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

.empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 30px 12px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 118px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  font-weight: 700;
}

.dark-empty {
  min-height: 292px;
  border-color: rgba(120, 170, 230, 0.2);
  background: rgba(10, 25, 50, 0.28);
  color: #8ea6c4;
}

.empty-inline {
  color: #8ea6c4;
  font-weight: 700;
}

th {
  color: #526071;
  background: #f6f8fb;
  font-size: 13px;
}

.num-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 99px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.status-pill {
  padding: 4px 10px;
  font-size: 12px;
}

.status-pill.good {
  background: #dcfce7;
  color: #166534;
}

.status-pill.warn {
  background: #ffedd5;
  color: #c2410c;
}

.status-pill.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.violet {
  background: #ede9fe;
  color: #6d28d9;
}

.status-pill.info {
  background: #e0f2fe;
  color: #0369a1;
}

.status-pill.bad {
  background: #fee2e2;
  color: #b91c1c;
}

.view-btn {
  border: 0;
  border-radius: 99px;
  color: #fff;
  background: #0c1322;
  padding: 7px 14px;
  font-weight: 900;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7aa7ef;
  box-shadow: 0 0 0 3px rgba(31, 103, 214, 0.12);
}

textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: #344055;
}

.form-grid label:nth-child(2) {
  grid-column: 1 / -1;
}

.form-actions {
  grid-column: 1 / -1;
}

.sync-flow {
  display: grid;
  gap: 10px;
}

.sync-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.sync-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e9f2ff;
  color: var(--blue);
  font-weight: 900;
}

.sync-item.complete .sync-icon {
  background: #dcfce7;
  color: var(--green);
}

.api-box {
  margin-top: 14px;
  border-radius: 8px;
  background: #101827;
  color: #fff;
  padding: 16px;
}

.api-box p {
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 0;
}

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

.deploy-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.deploy-actions input {
  min-width: 0;
}

.store-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.store-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.54);
}

.store-card p,
.store-card small {
  margin: 5px 0 0;
  color: #cbd5e1;
}

.small-empty {
  min-height: 72px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
  color: #dbeafe;
}

.sync-console {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(9, 105, 255, 0.08), rgba(255, 255, 255, 0.82));
}

.sync-console label {
  display: grid;
  gap: 6px;
  color: #344055;
  font-weight: 800;
}

.sync-console label span {
  font-size: 12px;
  color: var(--muted);
}

.sync-console p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.product-sync-hint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(160, 197, 238, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.product-sync-hint p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.product-sync-panel {
  padding: 20px 22px 22px;
}

.product-head {
  margin-bottom: 16px;
}

.product-sync-copy {
  max-width: 760px;
}

.product-lead {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.product-sync-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.product-sync-controls {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) 140px 140px 150px 150px minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.product-sync-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.product-sync-toolbar input,
.product-sync-toolbar select {
  min-width: 0;
}

.product-sync-toolbar button {
  white-space: nowrap;
}

.online-products-table .table-wrap {
  overflow-x: auto;
  border-radius: 14px;
}

.online-products-table table {
  min-width: 1060px;
}

.online-products-table th,
.online-products-table td {
  vertical-align: top;
}

.online-products-table th:last-child,
.online-products-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: rgba(242, 248, 255, 0.94);
  box-shadow: -12px 0 24px rgba(41, 92, 138, 0.08);
}

.product-title-cell {
  min-width: 360px;
  white-space: normal;
}

.product-title-media,
.erp-bind-stack {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.erp-bind-stack {
  align-items: center;
  min-width: 240px;
  white-space: normal;
  font-weight: 800;
  color: #1f2d42;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.product-title-row strong,
.product-title-row .muted-text {
  display: block;
  white-space: normal;
  line-height: 1.45;
}

.online-color-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(65, 126, 199, 0.22);
  border-radius: 999px;
  background: rgba(225, 239, 255, 0.72);
  color: #205a99;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: normal;
}

.product-code-stack {
  display: grid;
  gap: 5px;
  min-width: 230px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  white-space: normal;
}

.product-code-stack b {
  display: inline-block;
  color: var(--blue);
  font-weight: 900;
  word-break: break-all;
}

.product-actions {
  min-width: 150px;
}

.image-hover {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.image-thumb {
  width: 54px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(160, 197, 238, 0.62);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 20px rgba(34, 83, 128, 0.12);
}

.image-preview-float {
  display: none;
  position: fixed;
  width: min(340px, 70vw);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(245, 250, 255, 0.86);
  box-shadow: 0 22px 60px rgba(20, 46, 82, 0.28);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
}

.image-preview-float img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.image-preview-float.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.image-placeholder {
  display: inline-flex;
  width: 54px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(95, 132, 170, 0.55);
  border-radius: 12px;
  color: #6b7f99;
  background: rgba(255, 255, 255, 0.36);
  font-size: 12px;
  font-weight: 900;
}

.brand-row {
  cursor: pointer;
}

.brand-row.active td:first-child {
  box-shadow: inset 4px 0 0 #0a84ff;
}

.brand-name-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.brand-row.active .brand-name-button {
  color: #0757d6;
}

.brand-detail-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(160, 197, 238, 0.45);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

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

.brand-detail-head h2 {
  margin: 2px 0 6px;
}

.brand-detail-head span {
  color: #4b6f97;
  font-weight: 700;
}

.detail-filters {
  justify-content: flex-start;
  margin: 10px 0 16px;
}

.primary-mini {
  flex: 0 0 auto;
  background: rgba(10, 132, 255, 0.96);
  border-color: rgba(10, 132, 255, 0.96);
  color: #fff;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.2);
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .product-sync-toolbar {
    grid-template-columns: 1fr;
  }

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

  .product-sync-actions {
    justify-content: flex-start;
  }
}

.deploy-result {
  min-height: 74px;
  max-height: 180px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  white-space: pre-wrap;
}

.cards,
.supplier-grid,
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-card,
.supplier-card,
.case-card,
.ledger-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
}

.frame-art {
  width: 70px;
  height: 56px;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 28% 52%, transparent 0 24%, #111827 25% 31%, transparent 32%),
    radial-gradient(ellipse at 72% 52%, transparent 0 24%, #111827 25% 31%, transparent 32%),
    linear-gradient(90deg, transparent 0 42%, #111827 43% 57%, transparent 58%),
    linear-gradient(135deg, #dbeafe, #fff7ed);
  border: 1px solid #e4e9ef;
}

.package-art {
  width: 70px;
  height: 56px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 18%, #b7c6d8 19% 25%, transparent 26% 74%, #b7c6d8 75% 81%, transparent 82%),
    linear-gradient(180deg, #f5f7fb 0 22%, #d9e3ee 23% 100%);
  border: 1px solid #d9e3ee;
}

.product-card h3,
.supplier-card h3,
.case-card h3 {
  margin-bottom: 5px;
}

.product-card p,
.supplier-card p,
.case-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.stock-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
}

.stock-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.stock-bar.low span {
  background: var(--red);
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
}

.lens-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 78px;
  background: #f8fafc;
}

.lens-cell.low {
  border-color: #fed7aa;
  background: #fff7ed;
}

.lens-cell strong {
  display: block;
  margin-bottom: 7px;
}

.lens-cell span {
  color: var(--muted);
  font-size: 13px;
}

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

.kanban-col {
  background: #f6f8fb;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 12px;
  min-height: 360px;
}

.kanban-col h3 {
  font-size: 14px;
  color: #42526a;
}

.case-card {
  margin-bottom: 10px;
}

.bar-chart {
  min-height: 330px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 30px;
}

.bar {
  min-height: 60px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #1f67d6, #23a36b);
  position: relative;
}

.bar span {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  color: #53627a;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

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

.strategy {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.strategy strong {
  color: #0c1322;
}

.strategy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.summary-grid.compact {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.ledger-panel {
  margin-top: 14px;
}

.ledger-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: #cfdced;
  background: #fbfdff;
}

.ledger-card h3 {
  margin-bottom: 6px;
}

.ledger-card strong {
  display: block;
  margin-bottom: 8px;
}

.ledger-card p {
  margin: 0;
  color: #8aa0bd;
  font-size: 13px;
}

.month-ledger {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.month-ledger button {
  border: 1px solid #cfdaea;
  background: #f8fbff;
  border-radius: 8px;
  text-align: left;
  padding: 12px;
  min-height: 68px;
}

.month-ledger button.active {
  border: 2px solid #101827;
  background: #fff;
}

.month-ledger strong,
.month-ledger span {
  display: block;
}

.month-ledger span {
  color: #718096;
  margin-top: 4px;
  line-height: 1.35;
}

.ops-form {
  display: grid;
  gap: 10px;
}

.ops-form label {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #53627a;
  font-weight: 800;
}

.ops-form .two-col {
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
  z-index: 20;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: min(900px, 96vw);
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 34px;
  height: 34px;
  border-radius: 99px;
  border: 2px solid #fff;
  background: #7b8794;
  color: #fff;
  font-size: 24px;
  line-height: 0;
}

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

.modal-head h2 {
  color: #b23a00;
}

.modal-head span {
  color: #c45a16;
  font-size: 13px;
  font-weight: 800;
}

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

.reminder-card {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fffdf7, #fff8ed);
}

.reminder-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.reminder-card h3 {
  font-size: 17px;
}

.reminder-card p {
  color: #61708a;
  line-height: 1.55;
  margin-bottom: 10px;
}

.reminder-card small {
  color: #8aa0bd;
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.read-state {
  background: #ffedd5;
  color: #ea580c;
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.reminder-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.reminder-card footer span {
  color: #c45a16;
  font-weight: 900;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #0c1322;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
  pointer-events: none;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.metric-sub {
  margin: 8px 0 0;
  color: #8aa0bd;
  font-size: 12px;
}

#orderRelationSummary .summary-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 330px;
}

.order-card-actions .row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: none;
  width: 100%;
}

.order-card-actions .mini-btn {
  width: 100%;
  min-height: 34px;
  margin-right: 0;
  padding: 0 8px;
  border-radius: 10px;
  text-align: center;
  white-space: nowrap;
}

.workflow-btn {
  position: relative;
}

.workflow-btn.is-disabled {
  color: #8a9ab0;
  background: rgba(229, 237, 247, 0.72);
  border-color: rgba(179, 199, 224, 0.72);
  cursor: not-allowed;
  opacity: 0.78;
}

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

.order-identity {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.order-identity strong {
  color: var(--ink);
  font-size: 13px;
  word-break: break-all;
}

.order-identity span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #647895;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  flex-wrap: wrap;
}

.order-time-line {
  color: #49617e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.order-summary-panel {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(164, 198, 238, 0.62);
  border-radius: 12px;
  background: rgba(232, 243, 255, 0.68);
}

.order-summary-panel .image-placeholder,
.order-summary-panel .image-thumb {
  width: 82px;
  height: 60px;
  border-radius: 10px;
}

.order-summary-panel .image-thumb {
  object-fit: cover;
}

.order-summary-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.order-summary-tags .status-pill {
  justify-content: center;
  width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.platform-ico {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 7px;
  background: #1677ff;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.22);
}

.customer-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.customer-cell strong {
  color: var(--ink);
  font-size: 13px;
}

.customer-cell small {
  color: #647895;
  font-weight: 800;
  word-break: break-all;
}

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

.customer-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.customer-profile-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(125, 172, 225, 0.48);
  border-radius: 8px;
  background: rgba(232, 243, 255, 0.58);
  cursor: pointer;
}

.customer-profile-card:hover {
  border-color: rgba(9, 105, 255, 0.55);
  box-shadow: 0 12px 24px rgba(9, 105, 255, 0.08);
}

.customer-profile-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.customer-profile-card p {
  margin: 3px 0 0;
  color: #607da3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.customer-profile {
  display: grid;
  gap: 16px;
}

.customer-profile h3 {
  margin: 4px 0 -4px;
  color: #0f2a4d;
  font-size: 15px;
}

.customer-profile-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.customer-profile-head > div {
  padding: 12px;
  border: 1px solid rgba(125, 172, 225, 0.42);
  border-radius: 8px;
  background: rgba(232, 243, 255, 0.62);
}

.customer-profile-head span {
  color: #607da3;
  font-size: 12px;
  font-weight: 900;
}

.customer-profile-head strong {
  display: block;
  margin-top: 6px;
  color: #0f2a4d;
  font-size: 16px;
}

.customer-profile-head p {
  margin: 5px 0 0;
  color: #607da3;
  font-size: 12px;
  font-weight: 800;
}

.prescription-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 8px;
  color: #075985;
  background: rgba(224, 242, 254, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.link-btn {
  padding: 0;
  min-height: auto;
  color: #075ab5;
  border: 0;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  color: #b45309;
  background: rgba(255, 237, 213, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.privacy-view-btn {
  justify-self: start;
  min-height: 28px;
  margin-right: 0;
  color: #1e4e86;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(120, 170, 225, 0.56);
}

.compact-actions {
  min-width: 190px;
}

.relation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 242, 255, 0.76));
}

.relation-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.relation-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
}

.relation-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.danger-text { color: #ef4444; }
.success-text { color: #10b981; }

.blue-btn,
.orange-btn,
.red-btn,
.mini-btn,
.icon-mini,
.red-mini {
  border: 0;
  border-radius: 8px;
  min-height: 30px;
  padding: 0 10px;
  color: #fff;
  font-weight: 800;
  margin-right: 5px;
}

.blue-btn { background: #1478d4; }
.orange-btn { background: #ef9500; }
.red-btn,
.red-mini { background: #ef4444; }
.mini-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
}

.mini-btn.danger {
  color: #b42318;
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(255, 255, 255, 0.68);
}

.frame-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.frame-stock-actions .blue-btn,
.frame-stock-actions .orange-btn,
.frame-stock-actions .mini-btn {
  margin-right: 0;
}

.mini-btn:disabled,
.outline-btn:disabled,
.dark-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.danger-btn {
  border: 0;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 12px;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.18);
}

.danger-btn:hover { filter: brightness(0.96); }

.compact-actions {
  flex-wrap: wrap;
  gap: 6px;
}
.icon-mini {
  width: 28px;
  padding: 0;
  border-radius: 99px;
  background: #0c1322;
}

.tab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-row button {
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  color: #344055;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 800;
}

.tab-row button.active {
  background: #0c1322;
  color: #fff;
  border-color: #0c1322;
}

.tab-row b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.22);
  margin-left: 8px;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.package-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.package-card .package-art {
  width: 96px;
  height: 78px;
}

.package-card strong {
  display: block;
  color: #0969ff;
  font-size: 24px;
  margin-bottom: 6px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  margin-right: 5px;
}

.dot.green { background: #10b981; }

.step-pills b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #14b8a6;
  color: #fff;
  font-size: 11px;
  margin-right: 3px;
}

.soft-head {
  background: #e8f0f4;
  margin: -18px -18px 14px;
  padding: 18px;
  border-radius: 8px 8px 0 0;
}

.soft-head h2 { margin-bottom: 8px; }
.soft-head p {
  margin: 0;
  color: #526071;
}

.table-note {
  margin: 12px 0 0;
  color: #526071;
  text-align: center;
}

.config-panel table input,
.config-panel table textarea {
  width: min(560px, 100%);
}

.profile-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 20px auto 10px;
  border: 4px solid #e6edf5;
  background:
    radial-gradient(circle at 52% 36%, #f5c16c 0 18%, transparent 19%),
    linear-gradient(135deg, #1e293b, #b86e3b);
}

.profile-card > h2:nth-of-type(2) {
  text-align: center;
  margin-bottom: 18px;
}

.switch {
  display: inline-block;
  width: 34px;
  height: 18px;
  border-radius: 99px;
  background: #cbd5e1;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.switch.on { background: #14b8a6; }
.switch.on::after { left: 19px; }

.thumb {
  width: 58px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #1f67d6;
}

.report-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  line-height: 1.9;
  background: #fff;
  margin-bottom: 12px;
}

.boss-list,
.report-list {
  display: grid;
  gap: 10px;
}

.boss-list article {
  border: 1px solid var(--line);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  padding: 14px;
}

.boss-list article:nth-child(2) {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.ask-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.report-list article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.entity-modal {
  width: min(620px, 94vw);
}

.modal-form {
  display: grid;
  gap: 12px;
}

.modal-form label {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #344055;
  font-weight: 800;
}

.privacy-card {
  display: grid;
  gap: 14px;
}

.privacy-order-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.privacy-order-head div,
.privacy-grid label {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.62);
}

.privacy-order-head span,
.privacy-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.privacy-order-head strong,
.privacy-grid strong {
  color: var(--ink);
  line-height: 1.55;
  word-break: break-word;
}

.privacy-status {
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(219, 234, 254, 0.72);
  color: #1d4ed8;
  font-weight: 800;
}

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

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

.privacy-footnote {
  color: #64748b;
  line-height: 1.7;
  font-size: 13px;
}

.template-note {
  grid-column: 1 / -1;
  border: 1px dashed rgba(10, 132, 255, 0.42);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.42);
  color: #36536f;
}

.template-note strong,
.template-note span {
  display: block;
}

.template-note span {
  margin-top: 6px;
  color: #0b67c2;
  font-weight: 800;
  word-break: break-all;
}

.order-product-editor {
  gap: 14px;
}

.order-product-rows {
  display: grid;
  gap: 0;
  max-height: none;
  overflow: visible;
  border: 1px solid rgba(102, 153, 204, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.36);
}

.order-product-edit-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(102, 153, 204, 0.24);
  background: rgba(221, 236, 255, 0.48);
}

.order-product-edit-row:last-child {
  border-bottom: 0;
}

.order-product-add-row {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 76px;
  background: rgba(255, 255, 255, 0.52);
}

.order-product-row-index {
  display: grid;
  place-items: center;
  min-height: 38px;
  color: #526d8d;
  font-size: 13px;
  font-weight: 900;
}

.order-product-edit-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.inline-product-search {
  padding-bottom: 4px;
}

.order-product-actions {
  display: grid;
  gap: 8px;
  align-self: center;
}

.order-product-remove-btn,
.order-product-change-btn {
  justify-self: stretch;
  width: 100%;
  margin-right: 0;
}

.order-product-list-head {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1fr) 80px 64px 190px 64px;
  gap: 10px;
  align-items: center;
  padding: 0 10px 8px;
  color: #607da3;
  font-size: 12px;
  font-weight: 900;
}

.order-product-searchbar {
  display: grid;
  align-items: center;
  min-width: 0;
}

.product-search-control {
  position: relative;
  display: grid;
  gap: 8px;
}

.product-search-control label,
.order-product-fields label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.product-search-control input,
.order-product-fields input,
.order-product-fields select {
  min-width: 0;
}

.product-search-control input {
  min-height: 48px;
}

.product-search-results {
  display: none;
  position: absolute;
  z-index: 30;
  top: 52px;
  left: 102px;
  right: 0;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(102, 153, 204, 0.35);
  border-radius: 14px;
  background: rgba(239, 247, 255, 0.94);
  box-shadow: 0 18px 44px rgba(14, 57, 112, 0.22);
  backdrop-filter: blur(18px) saturate(1.35);
}

.product-search-results.active {
  display: grid;
  gap: 6px;
}

.product-search-result {
  border: 1px solid rgba(136, 177, 225, 0.45);
  border-radius: 12px;
  min-height: 58px;
  padding: 12px 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  color: #10223f;
  cursor: pointer;
}

.product-search-result:hover,
.product-search-result:focus {
  border-color: rgba(0, 107, 255, 0.62);
  background: rgba(232, 243, 255, 0.95);
  outline: none;
}

.product-search-result strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.35;
}

.product-search-result span {
  display: block;
  margin-top: 3px;
  color: #5f789c;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.product-search-result .stock-choice-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-top: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.stock-choice-tag.in-stock {
  color: #087a45;
  background: #d9fbe8;
}

.stock-choice-tag.out-stock {
  color: #c2410c;
  background: #ffedd5;
}

.product-search-empty {
  padding: 10px;
  color: #607da3;
  font-size: 13px;
}

.binding-frame-search {
  position: relative;
  display: grid;
  min-width: 0;
}

.binding-frame-search input[type="text"],
.binding-frame-search > input:not([type]) {
  min-width: 0;
  min-height: 42px;
}

.binding-frame-results {
  display: none;
  position: absolute;
  z-index: 16;
  top: 48px;
  left: 0;
  right: 0;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(102, 153, 204, 0.35);
  border-radius: 14px;
  background: rgba(239, 247, 255, 0.97);
  box-shadow: 0 18px 44px rgba(14, 57, 112, 0.22);
}

.binding-frame-results.active {
  display: grid;
  gap: 6px;
}

.binding-frame-result {
  border: 1px solid rgba(136, 177, 225, 0.45);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.8);
  color: #10223f;
  cursor: pointer;
}

.binding-frame-result:hover,
.binding-frame-result:focus {
  border-color: rgba(0, 107, 255, 0.62);
  background: rgba(232, 243, 255, 0.95);
  outline: none;
}

.binding-frame-result strong,
.binding-frame-result span {
  display: block;
  line-height: 1.4;
}

.binding-frame-result span {
  margin-top: 3px;
  color: #607da3;
  font-size: 12px;
  font-weight: 800;
}

.order-product-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 80px 64px 190px;
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.order-product-line > div,
.order-product-amount-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
}

.order-product-line-main {
  min-height: 38px;
}

.order-product-line span,
.order-product-line small {
  color: #607da3;
  font-size: 12px;
  font-weight: 800;
}

.order-product-line strong {
  min-width: 0;
  color: #0f2a4d;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-product-line small {
  overflow-wrap: anywhere;
}

.order-product-budget {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(102, 153, 204, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  color: #506b8c;
  font-size: 13px;
  font-weight: 800;
}

.order-product-budget span {
  display: inline-flex;
  gap: 5px;
}

.order-product-budget strong {
  color: #0f2a4d;
}

.order-editor-remarks {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  padding: 10px 12px;
  border: 1px solid rgba(102, 153, 204, 0.32);
  border-radius: 12px;
  background: rgba(232, 243, 255, 0.68);
}

.order-editor-remarks div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-editor-remarks span {
  color: #607da3;
  font-size: 12px;
  font-weight: 900;
}

.order-editor-remarks strong {
  color: #0f2a4d;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.order-editor-remarks .primary strong {
  color: #063f87;
}

.order-product-amount-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
}

.order-product-amount-field input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(136, 177, 225, 0.55);
  background: rgba(255, 255, 255, 0.82);
  color: #0f2a4d;
  font-weight: 900;
  padding: 0 8px;
}

.order-product-amount-field input:focus {
  border-color: rgba(0, 107, 255, 0.45);
  background: rgba(255, 255, 255, 0.88);
  outline: none;
  padding: 0 8px;
}

.order-product-fields,
.order-product-fields label {
  display: none;
}

.order-product-hidden-fields {
  display: none;
}

.import-form textarea {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Apple-style frosted glass skin */
body {
  background:
    linear-gradient(135deg, rgba(242, 248, 255, 0.96), rgba(219, 236, 255, 0.86) 42%, rgba(245, 250, 255, 0.94)),
    linear-gradient(180deg, #f8fbff, #e9f4ff);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), transparent 34%, rgba(0, 101, 255, 0.08) 72%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), transparent 45%, rgba(14, 165, 233, 0.1));
  backdrop-filter: blur(1px);
  z-index: -1;
}

.sidebar,
.topbar,
.panel,
.metric,
.modal,
.ledger-card,
.package-card,
.day-cell,
.month-ledger button,
.report-box,
.report-list article,
.boss-list article,
.strategy,
.soft-head {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 22px 70px rgba(15, 76, 140, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
}

.sidebar {
  background: rgba(248, 252, 255, 0.62);
  border-right-color: rgba(255, 255, 255, 0.72);
}

.topbar,
.panel,
.metric,
.modal {
  border-radius: 18px;
}

.panel,
.modal {
  padding: 20px;
}

.metric,
.day-cell,
.package-card,
.ledger-card,
.report-list article,
.boss-list article,
.strategy {
  border-radius: 14px;
}

.brand-mark,
.dark-btn,
.nav button.active {
  background: linear-gradient(135deg, #0a84ff, #0066cc);
  box-shadow: 0 12px 30px rgba(0, 102, 204, 0.28);
}

.nav button {
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(255, 255, 255, 0.72);
}

.nav button.active:hover {
  background: linear-gradient(135deg, #0a84ff, #0066cc);
}

.icon-btn,
.avatar-btn,
.outline-btn,
.plain-btn,
.tab-row button,
.mini-btn,
select,
input,
textarea {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(160, 197, 238, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

select,
input,
textarea {
  border-radius: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 132, 255, 0.9);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.dark-overview {
  background:
    linear-gradient(145deg, rgba(6, 30, 68, 0.9), rgba(8, 61, 126, 0.76)),
    rgba(6, 20, 45, 0.78);
  border: 1px solid rgba(188, 218, 255, 0.22);
  box-shadow:
    0 28px 80px rgba(4, 38, 89, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
}

.dark-head,
.dark-panel,
.after-card,
.dark-kpi {
  background: rgba(6, 24, 52, 0.5);
  border-color: rgba(180, 218, 255, 0.18);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

th {
  background: rgba(246, 250, 255, 0.72);
}

td,
th {
  border-bottom-color: rgba(190, 214, 240, 0.5);
}

.modal-backdrop {
  background: rgba(83, 101, 124, 0.45);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.modal {
  width: min(900px, 92vw);
  max-height: min(86vh, 760px);
  overflow: auto;
}

.entity-modal {
  width: min(720px, 92vw);
}

.entity-modal:has(.order-product-editor) {
  width: min(920px, 94vw);
  overflow: visible;
  max-height: none;
}

.modal-close {
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(160, 197, 238, 0.48);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  color: #48627f;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  box-shadow:
    0 8px 24px rgba(20, 70, 120, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.78);
  color: #0a66cc;
}

.modal-head {
  padding-right: 48px;
}

.modal-head h2 {
  color: #0b4f9c;
}

.modal-head span {
  color: #3f7fbd;
}

.view-btn,
.tab-row button.active,
.icon-mini {
  background: rgba(16, 32, 51, 0.88);
}

.blue-btn {
  background: #0a84ff;
}

.orange-btn {
  background: #ff9f0a;
}

.red-btn,
.red-mini {
  background: #ff453a;
}

.empty-state {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(160, 197, 238, 0.42);
}

.toast {
  background: rgba(15, 32, 54, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(12, 36, 72, 0.2);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

.top-actions {
  align-items: center;
}

.icon-btn,
.avatar-btn,
.logout-btn {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(226, 241, 255, 0.66));
  border-color: rgba(151, 190, 232, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(31, 94, 170, 0.12);
}

.icon-btn span {
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.icon-btn b {
  top: -8px;
  right: -8px;
  border: 2px solid rgba(255, 255, 255, 0.92);
}

.avatar-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  min-height: 38px;
  padding: 0 14px;
  color: #35506f;
  font-weight: 900;
}

.account-avatar-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #35506f;
}

.stock-count-input {
  width: 92px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-weight: 800;
}

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

.account-login-note p {
  margin-top: 6px;
  color: #5b728d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.account-login-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-login-chip,
.password-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.58);
  color: #1751a2;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.account-table-panel .table-wrap {
  overflow-x: auto;
}

.account-table-panel table {
  min-width: 1120px;
}

.account-table-panel th:nth-child(10),
.account-table-panel td:nth-child(10) {
  max-width: 300px;
  width: 300px;
}

.account-table-panel th:last-child,
.account-table-panel td:last-child {
  min-width: 190px;
}

.permission-summary-cell {
  white-space: normal;
}

.permission-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.52);
  color: #1e4f8f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.permission-summary-chip em {
  flex: 0 0 auto;
  color: #0b6ee8;
  font-style: normal;
}

.role-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.role-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(160, 197, 238, 0.45);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 12px 28px rgba(28, 88, 160, 0.08);
}

.role-card-head {
  display: grid;
  gap: 5px;
}

.role-card-head strong {
  color: #0f2744;
  font-size: 15px;
}

.role-card-head span,
.role-card p,
.role-card-foot span {
  color: #607894;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.role-card p {
  min-height: 38px;
  margin: 0;
  color: #213a57;
  font-size: 13px;
  font-weight: 800;
}

.role-card-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(160, 197, 238, 0.35);
}

.role-template-form {
  gap: 16px;
}

.role-choice-block {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #344055;
  font-weight: 800;
}

.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.check-option {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(136, 177, 225, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: #243b57;
  font-size: 13px;
}

.check-option input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.publisher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(135deg, #0f243f, #145b72);
  color: #f8fbff;
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 18px 42px rgba(10, 35, 58, 0.18);
}

.publisher-hero .eyebrow {
  color: #a8d8e8;
}

.publisher-hero h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.publisher-hero p {
  max-width: 760px;
  color: #d4e8ef;
  line-height: 1.7;
  margin-bottom: 0;
}

.publisher-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.publisher-stats article {
  border: 1px solid rgba(216, 239, 247, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
}

.publisher-stats strong {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

.publisher-stats span {
  color: #c1dce7;
  font-size: 13px;
  font-weight: 800;
}

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

.publisher-form {
  display: grid;
  gap: 14px;
}

.publisher-form label,
.publisher-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.publisher-form input,
.publisher-form textarea,
.publisher-form select,
.publisher-card input,
.publisher-card textarea,
.publisher-card select {
  width: 100%;
}

.publisher-form select[multiple] {
  min-height: 116px;
  padding: 8px;
}

.video-drop {
  border: 1px dashed #9fc1e8;
  border-radius: 8px;
  background: #f6fbff;
  padding: 16px;
}

.video-drop input {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.video-drop strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.video-drop small {
  color: var(--muted);
  font-weight: 700;
}

.publisher-task-list {
  display: grid;
  gap: 14px;
}

.publisher-account-list {
  display: grid;
  gap: 12px;
}

.publisher-account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.publisher-account-card strong,
.publisher-account-card small {
  display: block;
}

.publisher-account-card strong {
  margin: 8px 0 4px;
}

.publisher-account-card small {
  color: var(--muted);
  font-weight: 700;
}

.publisher-account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.publisher-analysis {
  display: grid;
  gap: 14px;
}

.analysis-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.analysis-summary strong {
  line-height: 1.6;
}

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

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #eaf4ff;
  color: #175aa8;
  font-size: 12px;
  font-weight: 900;
}

.analysis-list {
  margin: 0;
  padding-left: 18px;
  color: #344055;
  line-height: 1.8;
  font-weight: 700;
}

.publisher-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.publisher-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.publisher-card-head strong,
.publisher-card-head small {
  display: block;
}

.publisher-card-head strong {
  margin: 8px 0 4px;
}

.publisher-card-head small {
  color: var(--muted);
  font-weight: 700;
}

.platform-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  background: #e9f6f8;
  color: #0c6672;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.publisher-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 26px;
  background: #f8fbff;
  color: var(--muted);
}

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

@media (max-width: 1220px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid,
  .split-layout,
  .inventory-layout,
  .sync-console,
  .order-flow-board,
  .order-card,
  .order-card-main,
  .dark-grid,
  .reason-grid,
  .publisher-hero,
  .publisher-layout {
    grid-template-columns: 1fr;
  }

  .order-card {
    grid-template-areas:
      "check"
      "main"
      "actions";
  }

  .order-status-grid,
  .order-card-actions,
  .row-actions {
    justify-content: flex-start;
  }

  .order-card-actions .row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .product-search-panel {
    min-height: 220px;
    padding: 24px 0;
  }

  .product-search-title h2 {
    font-size: 28px;
  }

  .global-product-search {
    grid-template-columns: 32px minmax(0, 1fr) 38px;
    min-height: 54px;
    padding: 0 12px;
  }

  .global-product-search input {
    height: 52px;
    font-size: 15px;
  }

  .product-search-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-search-card {
    grid-template-columns: 1fr;
  }

  .product-search-highlights {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .product-search-actions {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .panel-head,
  .modal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid,
  .cards,
  .supplier-grid,
  .ledger-grid,
  .package-grid,
  .reminder-grid,
  .form-grid,
  .kanban {
    grid-template-columns: 1fr;
  }

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

  .ops-form label,
  .ops-form .two-col,
  .modal-form label,
  .order-product-edit-row,
  .order-product-searchbar,
  .order-product-line,
  .order-product-list-head,
  .order-editor-remarks,
  .customer-profile-head,
  .role-choice-block,
  .order-product-fields,
  .product-search-control label,
  .order-product-fields label,
  .profile-layout,
  .package-card,
  .ask-box,
  .report-list article {
    grid-template-columns: 1fr;
  }

  .order-product-row-index {
    place-items: start;
    min-height: 0;
  }

  .product-search-results {
    position: static;
    max-height: 220px;
  }

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

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

  .dark-overview {
    border-radius: 12px;
    padding: 12px;
  }

  .dark-head,
  .dark-panel-head,
  .donut-wrap,
  .mini-donut-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .after-metrics,
  .dark-kpis {
    grid-template-columns: 1fr;
  }

  .account-login-note {
    grid-template-columns: 1fr;
  }

  .account-login-grid {
    justify-content: flex-start;
  }

  .publisher-stats {
    grid-template-columns: 1fr;
  }

.publisher-card-head {
  flex-direction: column;
}
}

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

.shipping-settings-grid label,
.print-order-card label {
  display: grid;
  gap: 6px;
}

.shipping-settings-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shipping-settings-grid .wide-field {
  grid-column: span 2;
}

.print-workbench {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(360px, 520px) minmax(520px, 1fr);
}

.template-builder-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(360px, 460px) minmax(560px, 1fr);
}

.template-settings-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.template-settings-card label {
  display: grid;
  gap: 6px;
}

.template-settings-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-settings-card textarea {
  min-height: 140px;
  resize: vertical;
}

.template-toggle-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex !important;
  gap: 8px !important;
  padding: 10px 12px;
}

.template-toggle-row input {
  height: auto;
  width: auto;
}

.delivery-note-preview-panel {
  min-width: 0;
}

.delivery-template-preview {
  min-height: 820px;
}

.print-workflow-note {
  align-items: center;
  background: #eaf4ff;
  border: 1px dashed #9cc7ff;
  border-radius: 8px;
  color: #315a86;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.5;
  margin: 12px 0;
  padding: 12px 14px;
}

.print-compliance-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #8a4b11;
  display: grid;
  gap: 4px;
  line-height: 1.55;
  margin: 10px 0 12px;
  padding: 12px 14px;
}

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

.compact-batch {
  margin: 0;
}

.print-order-card {
  align-items: center;
  background: #edf6ff;
  border: 1px solid #c7dcf5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(220px, 1fr) minmax(150px, 0.45fr) minmax(120px, 0.35fr) minmax(90px, 0.25fr) auto;
  padding: 12px;
}

.print-order-card strong,
.print-order-card span,
.print-order-card small {
  display: block;
}

.print-order-card span {
  color: #183a61;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.print-order-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.template-designer {
  background: #ffffff;
  border: 1px solid #c7dcf5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.visual-template-designer {
  align-content: start;
}

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

.template-control-grid label {
  display: grid;
  gap: 6px;
}

.template-control-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-field-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0;
}

.template-field-pill {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #c7dcf5;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
}

.template-field-pill span {
  color: #183a61;
  font-size: 12px;
  font-weight: 800;
}

.template-editor-hint {
  background: #f4f8fd;
  border: 1px solid #d8e7f8;
  border-radius: 6px;
  color: #5b7190;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  padding: 9px 10px;
}

.template-preview-panel {
  background: #dbe7f5;
  border: 1px solid #c7dcf5;
  border-radius: 8px;
  min-height: 560px;
  padding: 0;
  overflow: hidden;
}

.template-canvas-head {
  align-items: center;
  background: #f8fbff;
  border-bottom: 1px solid #c7dcf5;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.template-canvas-head strong {
  color: #10233f;
  display: block;
  font-size: 14px;
  margin-top: 3px;
}

.template-canvas-head span {
  color: #5b7190;
  font-size: 12px;
  font-weight: 800;
}

.template-paper-preview {
  align-items: flex-start;
  background-color: #eaf2fb;
  background-image:
    linear-gradient(rgba(92, 128, 172, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 128, 172, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  justify-content: center;
  min-height: 500px;
  overflow: auto;
  padding: 26px;
}

.template-paper-preview .print-sheet {
  background: #fff;
  border: 1px solid #bfd4ef;
  box-shadow: 0 24px 60px rgba(39, 72, 112, 0.22);
  color: #10233f;
  margin: 0;
  padding: 22px;
  position: relative;
}

.template-paper-preview .express-sheet {
  min-height: 420px;
  width: 320px;
}

.template-paper-preview .express-waybill-sheet {
  background: #fff;
  box-shadow: 0 24px 60px rgba(39, 72, 112, 0.22);
  box-sizing: border-box;
  color: #111;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  height: 360px;
  margin: 0;
  overflow: hidden;
  padding: 24px 28px 18px;
  transform-origin: top center;
  width: 540px;
}

.express-waybill-sheet .waybill-top {
  align-items: center;
  border-bottom: 1px solid #111;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1.1fr 1fr;
  padding-bottom: 16px;
}

.express-waybill-sheet .waybill-brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.express-waybill-sheet .waybill-brand strong {
  align-items: center;
  border: 2px solid #111;
  border-radius: 50%;
  display: inline-flex;
  font-size: 13px;
  height: 46px;
  justify-content: center;
  letter-spacing: -0.05em;
  width: 46px;
}

.express-waybill-sheet .waybill-brand span,
.express-waybill-sheet .waybill-route span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.express-waybill-sheet .waybill-service,
.express-waybill-sheet .waybill-route {
  text-align: center;
}

.express-waybill-sheet .waybill-service strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.12em;
}

.express-waybill-sheet .waybill-service span,
.express-waybill-sheet .waybill-note span {
  font-size: 10px;
  letter-spacing: 0.05em;
}

.express-waybill-sheet .waybill-route b {
  background: #181818;
  color: #fff;
  display: inline-block;
  font-size: 18px;
  letter-spacing: 0.12em;
  margin-bottom: 3px;
  padding: 6px 16px;
}

.express-waybill-sheet .waybill-address-grid {
  border: 1px solid #111;
  border-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 78px;
}

.express-waybill-sheet .waybill-address-card {
  display: grid;
  grid-template-columns: 42px 1fr;
}

.express-waybill-sheet .waybill-address-card b {
  align-items: center;
  background: #171717;
  color: #fff;
  display: flex;
  font-size: 13px;
  justify-content: center;
  letter-spacing: 0.12em;
}

.express-waybill-sheet .waybill-address-card div {
  border-right: 1px solid #111;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  padding: 8px 16px;
}

.express-waybill-sheet .waybill-address-card.receiver div {
  border-right: 0;
}

.express-waybill-sheet .waybill-address-card strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.express-waybill-sheet .waybill-address-card em {
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  margin-left: 8px;
}

.express-waybill-sheet .waybill-address-card span {
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.express-waybill-sheet .waybill-main-grid {
  border: 1px solid #111;
  border-top: 0;
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  grid-template-rows: 48px 48px;
}

.express-waybill-sheet .waybill-barcode {
  align-items: center;
  border-right: 1px solid #111;
  display: flex;
  flex-direction: column;
  grid-row: 1 / span 2;
  justify-content: center;
  padding: 8px 22px;
}

.express-waybill-sheet .waybill-barcode-svg {
  display: block;
  height: 45px;
  width: 100%;
}

.express-waybill-sheet .waybill-barcode strong {
  font-size: 12px;
  letter-spacing: 0.2em;
}

.express-waybill-sheet .waybill-fee,
.express-waybill-sheet .waybill-sign {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
}

.express-waybill-sheet .waybill-fee {
  border-bottom: 1px solid #111;
}

.express-waybill-sheet .waybill-fee span,
.express-waybill-sheet .waybill-sign span,
.express-waybill-sheet .waybill-number span {
  font-size: 12px;
}

.express-waybill-sheet .waybill-fee strong {
  font-size: 17px;
  font-weight: 500;
}

.express-waybill-sheet .waybill-sign b {
  font-size: 13px;
  font-weight: 400;
}

.express-waybill-sheet .waybill-bottom-grid {
  border: 1px solid #111;
  border-top: 0;
  display: grid;
  grid-template-columns: 1.25fr 0.45fr 0.28fr 0.34fr;
  min-height: 78px;
}

.express-waybill-sheet .waybill-number,
.express-waybill-sheet .waybill-package,
.express-waybill-sheet .waybill-piece,
.express-waybill-sheet .waybill-qr {
  border-right: 1px solid #111;
  box-sizing: border-box;
  padding: 10px;
}

.express-waybill-sheet .waybill-number strong {
  display: block;
  font-size: 25px;
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin-top: 5px;
  white-space: nowrap;
}

.express-waybill-sheet .waybill-number small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
}

.express-waybill-sheet .waybill-package {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 4px;
  justify-content: center;
}

.express-waybill-sheet .waybill-piece {
  align-items: center;
  display: flex;
  font-size: 30px;
  font-weight: 800;
  justify-content: center;
}

.express-waybill-sheet .waybill-qr {
  align-items: center;
  border-right: 0;
  display: flex;
  justify-content: center;
}

.express-waybill-sheet .waybill-qr img {
  height: 54px;
  width: 54px;
}

.express-waybill-sheet .waybill-qr-fallback {
  border: 1px solid #111;
  font-size: 9px;
  padding: 8px;
}

.express-waybill-sheet .waybill-note {
  display: flex;
  justify-content: space-between;
  padding: 8px 8px 0;
}

.template-paper-preview .delivery-sheet {
  min-height: 360px;
  width: 520px;
}

.template-paper-preview .delivery-note-sheet {
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(39, 72, 112, 0.22);
  box-sizing: border-box;
  color: #2b2925;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.04em;
  min-height: 720px;
  overflow: hidden;
  padding: 34px;
  width: 520px;
}

.delivery-note-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.delivery-note-header h1 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1;
  margin: 0 0 10px;
}

.delivery-note-header p {
  font-size: 13px;
  letter-spacing: 0.28em;
  margin: 0 0 6px;
}

.delivery-note-header span {
  color: #4d4a45;
  display: block;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.delivery-note-title {
  text-align: right;
}

.delivery-note-title strong {
  display: block;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.12em;
  margin: 6px 0;
}

.delivery-note-title span {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.delivery-note-title i,
.delivery-note-thanks i {
  background: #2b2925;
  display: inline-block;
  height: 1px;
  margin-top: 14px;
  width: 28px;
}

.delivery-note-line {
  border-top: 1px solid #2b2925;
  margin: 20px 0;
}

.delivery-note-info {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  margin-bottom: 20px;
}

.delivery-note-info > div {
  border-left: 1px solid #d3cec5;
  padding-left: 16px;
}

.delivery-note-info > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.delivery-note-info span,
.delivery-note-section small {
  color: #4d4a45;
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.delivery-note-info strong {
  color: #2b2925;
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  margin: 6px 0 14px;
}

.delivery-note-section {
  border-top: 1px solid #2b2925;
  min-width: 0;
  padding-top: 14px;
}

.delivery-note-section h2 {
  color: #2b2925;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
}

.delivery-note-section h2 small {
  display: inline;
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-left: 6px;
  text-transform: uppercase;
}

.delivery-note-products,
.delivery-note-params,
.delivery-note-packing table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.delivery-note-products th:nth-child(1),
.delivery-note-products td:nth-child(1) {
  width: 16%;
}

.delivery-note-products th,
.delivery-note-products td {
  box-sizing: border-box;
  max-width: 0;
  overflow: hidden;
}

.delivery-note-products th:nth-child(2),
.delivery-note-products td:nth-child(2) {
  width: 44%;
}

.delivery-note-products th:nth-child(3),
.delivery-note-products td:nth-child(3) {
  width: 10%;
}

.delivery-note-products th:nth-child(4),
.delivery-note-products td:nth-child(4) {
  width: 30%;
}

.delivery-note-products th {
  background: #24231f;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  padding: 8px 10px;
}

.delivery-note-products td {
  border-bottom: 1px solid #d7d1c8;
  color: #2b2925;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  text-align: center;
  word-break: break-word;
}

.delivery-note-products td:nth-child(2),
.delivery-note-products th:nth-child(2) {
  text-align: left;
}

.delivery-note-columns {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.82fr);
  margin-top: 20px;
}

.delivery-note-columns.single-column {
  grid-template-columns: 1fr;
}

.delivery-note-params th,
.delivery-note-params td,
.delivery-note-packing table td {
  border-bottom: 1px solid #d7d1c8;
  color: #2b2925;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 7px 0;
  text-align: left;
  word-break: break-word;
}

.delivery-note-params th {
  color: #3b3833;
  width: 34%;
}

.delivery-note-packing table td:last-child {
  text-align: right;
}

.checkmark {
  align-items: center;
  border: 1px solid #2b2925;
  border-radius: 50%;
  display: inline-flex;
  height: 13px;
  justify-content: center;
  margin-right: 8px;
  width: 13px;
}

.delivery-note-thanks {
  margin-top: 24px;
  text-align: center;
}

.delivery-note-thanks strong {
  color: #2b2925;
  display: block;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.delivery-note-thanks span {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

.delivery-note-thanks b {
  display: block;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.25em;
  margin-top: 16px;
}

.delivery-note-thanks small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-top: 5px;
}

.delivery-note-footer {
  align-items: flex-end;
  border-top: 1px solid #2b2925;
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 14px;
}

.delivery-note-footer strong {
  color: #2b2925;
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.delivery-note-footer span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.28em;
  margin-top: 5px;
}

.delivery-note-footer div:last-child {
  text-align: right;
}

.template-paper-preview .print-layout {
  min-height: 100%;
  position: relative;
}

.template-paper-preview .template-block {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #9cc7ff;
  border-radius: 4px;
  box-sizing: border-box;
  color: #10233f;
  cursor: move;
  overflow: hidden;
  padding: 3px 4px;
  position: absolute;
  user-select: none;
  white-space: pre-wrap;
  z-index: 1;
}

.template-paper-preview .template-block::before {
  color: #315a86;
  content: attr(data-preview-label);
  display: block;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
}

.template-paper-preview .template-block::after {
  color: #10233f;
  content: attr(data-preview-text);
  display: block;
  font-weight: 800;
  line-height: 1.35;
}

.template-paper-preview .template-block:hover,
.template-paper-preview .template-block.selected {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.template-paper-preview .template-block .template-block-label {
  display: none !important;
  color: #315a86 !important;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
  opacity: 1 !important;
  visibility: visible !important;
}

.template-paper-preview .template-block .template-block-value {
  display: none !important;
  color: #10233f !important;
  font-weight: 700;
  line-height: 1.35;
  opacity: 1 !important;
  position: relative;
  visibility: visible !important;
  z-index: 2;
}

.template-resize-handle {
  background: #1677ff;
  border: 2px solid #fff;
  border-radius: 999px;
  bottom: -6px;
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.35);
  cursor: nwse-resize;
  height: 10px;
  position: absolute;
  right: -6px;
  width: 10px;
}

.template-block-editor {
  background: #f8fbff;
  border: 1px solid #c7dcf5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

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

.shipping-inline-status {
  color: var(--muted);
  display: grid;
  gap: 3px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.35;
}

.shipping-no-link {
  appearance: none;
  border: 1px solid #9fc4ef;
  background: rgba(232, 243, 255, 0.92);
  border-radius: 10px;
  color: #12335d;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 6px 10px;
  text-align: left;
  width: 100%;
}

.shipping-no-link span {
  color: #557098;
  font-size: 11px;
}

.shipping-no-link strong {
  color: #005fcf;
  font-size: 13px;
  word-break: break-all;
}

.shipping-no-link:hover {
  border-color: #0b7cff;
  box-shadow: 0 6px 16px rgba(11, 124, 255, 0.12);
}

.shipping-synced-line {
  color: #5b7191;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.shipping-inline-editor {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 84px 76px;
  margin-bottom: 8px;
}

.shipping-inline-editor input {
  min-width: 0;
  height: 32px;
  border: 1px solid #bed5f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #10233f;
  font-size: 12px;
  font-weight: 800;
  padding: 0 9px;
}

.shipping-log-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.shipping-log-summary.compact {
  margin-top: 10px;
}

.shipping-log-summary div {
  background: rgba(232, 243, 255, 0.85);
  border: 1px solid #bfd8f5;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.shipping-log-summary span {
  color: #557098;
  font-size: 12px;
  font-weight: 800;
}

.shipping-log-summary strong {
  color: #10233f;
  font-size: 14px;
  word-break: break-all;
}

.kdniao-trace-result {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #bfd8f5;
  border-radius: 10px;
  min-height: 120px;
  padding: 14px;
}

.kdniao-trace-head {
  align-items: center;
  border-bottom: 1px solid rgba(159, 196, 239, 0.55);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.kdniao-trace-head.warn strong {
  color: #c2410c;
}

.kdniao-trace-head strong {
  color: #005fcf;
  font-size: 16px;
}

.kdniao-trace-head span {
  color: #5b7191;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.kdniao-trace-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.kdniao-trace-item {
  border-left: 3px solid #9fc4ef;
  display: grid;
  gap: 4px;
  padding-left: 10px;
}

.kdniao-trace-item time {
  color: #557098;
  font-size: 12px;
  font-weight: 800;
}

.kdniao-trace-item p {
  color: #10233f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.template-tabs {
  display: flex;
  gap: 8px;
}

.template-tabs button {
  background: #fff;
  border: 1px solid #c7dcf5;
  border-radius: 8px;
  color: #315a86;
  cursor: pointer;
  font-weight: 800;
  padding: 8px 10px;
}

.template-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

#printTemplateEditor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 360px;
  resize: vertical;
}

.template-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .print-workbench,
  .shipping-settings-grid,
  .template-control-grid,
  .template-field-grid,
  .compact-template-grid,
  .print-order-card {
    grid-template-columns: 1fr;
  }

  .shipping-settings-grid .wide-field {
    grid-column: auto;
  }

  .template-paper-preview {
    justify-content: flex-start;
  }
}

.compact-shipping-settings {
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(160px, 1fr));
}

.shipping-config-board {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(360px, 1.2fr) minmax(320px, 0.8fr);
  margin: 14px 0 18px;
}

.shipping-config-section {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.shipping-config-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.shipping-config-title div {
  display: grid;
  gap: 3px;
}

.shipping-config-title strong {
  color: var(--ink);
  font-size: 15px;
}

.shipping-config-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.shipping-config-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(169, 198, 231, 0.72);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shipping-config-card.is-default {
  border-color: rgba(38, 126, 216, 0.65);
  box-shadow: 0 8px 24px rgba(41, 120, 210, 0.10);
}

.shipping-config-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.shipping-config-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shipping-config-card-head strong {
  color: #10233f;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.shipping-config-card-head span,
.shipping-config-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shipping-config-card-head b {
  background: #e7f1ff;
  border-radius: 999px;
  color: #1368bd;
  font-size: 12px;
  padding: 3px 8px;
  white-space: nowrap;
}

.shipping-config-meta {
  display: grid;
  gap: 5px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipping-config-meta .wide-meta {
  grid-column: 1 / -1;
}

.compact-actions {
  justify-content: flex-end;
  margin: 0;
}

.shipping-config-empty {
  background: rgba(234, 244, 255, 0.62);
  border: 1px dashed #9cc7ff;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.shipping-config-empty strong {
  color: #25476d;
}

.shipping-config-empty span {
  color: #557091;
  font-size: 13px;
  line-height: 1.5;
}

.shipping-config-form .toggle-row {
  grid-template-columns: 120px auto;
  justify-content: start;
}

.shipping-config-form .toggle-row input {
  height: 18px;
  width: 18px;
}

@media (max-width: 980px) {
  .compact-shipping-settings,
  .shipping-config-board,
  .shipping-config-meta {
    grid-template-columns: 1fr;
  }
}

.aftersale-board{display:flex;flex-direction:column;gap:16px}
.aftersale-toolbar{display:grid;grid-template-columns:220px 180px minmax(260px,1fr);gap:10px}
.aftersale-toolbar input,.aftersale-toolbar select{height:42px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:#fff;color:var(--ink);font:inherit}
.aftersale-source-strip{display:flex;gap:8px;overflow:auto;padding-bottom:2px}
.source-chip{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 12px;color:var(--muted);font-weight:700;white-space:nowrap;cursor:pointer}
.source-chip.active{background:var(--blue);border-color:var(--blue);color:#fff}
.source-chip b{font-size:12px;background:rgba(18,114,242,.1);border-radius:999px;padding:2px 7px;color:var(--blue)}
.source-chip.active b{background:rgba(255,255,255,.22);color:#fff}
.aftersale-sync-note{border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:8px;padding:10px 12px;font-weight:700}
.aftersale-list{display:flex;flex-direction:column;gap:8px}
.aftersale-card{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:12px;border:1px solid var(--line);border-radius:8px;background:linear-gradient(135deg,#fff,#f7fbff);padding:10px 12px}
.aftersale-title-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:3px}
.aftersale-title-line strong{font-size:16px;color:var(--ink)}
.aftersale-title-line small{color:var(--muted);font-weight:700}
.aftersale-main h3{font-size:15px;margin:2px 0;color:var(--ink);line-height:1.35}
.aftersale-main p{margin:2px 0 6px;color:var(--muted);line-height:1.35;font-size:13px}
.aftersale-product-box{border:1px solid #cfe3fb;background:rgba(255,255,255,.72);border-radius:8px;padding:8px 10px;margin:6px 0;display:grid;gap:4px}
.aftersale-product-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:start}
.aftersale-product-head span{display:inline-flex;align-items:center;border-radius:999px;background:#e0f2fe;color:#075985;font-size:11px;font-weight:900;padding:3px 7px;white-space:nowrap}
.aftersale-product-head strong{font-size:17px;line-height:1.35;color:var(--ink);word-break:break-word}
.aftersale-product-box p{margin:0;color:#526b8c;font-size:12px;font-weight:800;line-height:1.35}
.aftersale-product-box p b{display:inline-flex;margin-right:6px;color:#2563eb}
.aftersale-product-box small{color:#8aa0bb;font-weight:800;font-size:11px;word-break:break-all}
.aftersale-problem{margin:5px 0 7px;border-left:3px solid #93c5fd;padding:4px 0 4px 8px;color:#4f6685;font-size:13px;font-weight:700;line-height:1.4}
.aftersale-meta,.aftersale-scan-line{display:flex;flex-wrap:wrap;gap:5px 12px;color:var(--muted);font-size:12px;font-weight:700}
.aftersale-flow{display:flex;align-items:center;gap:8px;margin:5px 0;color:var(--muted);font-weight:700;font-size:12px}
.aftersale-order-note{margin-top:6px;border-left:3px solid var(--blue);padding-left:8px;color:var(--muted);font-size:12px;line-height:1.35}
.aftersale-logs{display:flex;flex-direction:column;gap:3px;margin-top:5px;color:var(--muted);font-size:11px}
.aftersale-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start}
.aftersale-actions button{width:100%;min-height:30px;padding:5px 8px;font-size:13px}
@media (max-width: 900px){.aftersale-toolbar{grid-template-columns:1fr}.aftersale-card{grid-template-columns:1fr}.aftersale-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
.aftersale-scan-input{display:flex;flex-direction:column;gap:3px;font-weight:800;color:var(--muted);font-size:11px;grid-column:span 2}
.aftersale-scan-input input{width:100%;height:34px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font:inherit;font-weight:800;color:var(--ink);background:#fff}
.aftersale-carrier{display:inline-flex;align-items:center;justify-content:center;min-height:28px;border-radius:999px;background:#e0f2fe;color:#075985;font-weight:900;font-size:12px;padding:4px 8px;text-align:center;grid-column:span 2}

.anchor-board {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.anchor-toolbar {
  display: grid;
  grid-template-columns: 120px minmax(150px, 1fr) 130px minmax(130px, 1fr) minmax(220px, 1.4fr);
  gap: 10px;
}

.anchor-toolbar input,
.anchor-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  height: 40px;
  min-width: 0;
  padding: 0 10px;
}

.anchor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr);
  gap: 14px;
}

.anchor-ranking,
.anchor-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.section-title {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
}

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

.anchor-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.anchor-table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

.anchor-table th,
.anchor-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

.anchor-table th {
  background: #f6f8fb;
  color: var(--muted);
  font-size: 12px;
}

.anchor-table tr.active,
.anchor-table tbody tr:hover {
  background: #eef6ff;
}

.anchor-channel {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin-left: 8px;
  padding: 5px 8px;
  vertical-align: middle;
}

.anchor-channel.live {
  background: #dcfce7;
  color: #047857;
}

.anchor-channel.library {
  background: #e0f2fe;
  color: #075985;
}

.anchor-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.anchor-order-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px;
  padding: 12px;
}

.anchor-order-row strong,
.anchor-order-row b {
  color: var(--ink);
}

.anchor-order-row span,
.anchor-order-row small,
.anchor-order-row p {
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 0;
}

.anchor-order-row aside {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 1100px) {
  .anchor-toolbar,
  .anchor-layout {
    grid-template-columns: 1fr;
  }
}
.aftersale-actions .outline-btn,.aftersale-actions .dark-btn{font-size:14px}
.aftersale-metrics .metric.active{box-shadow:0 0 0 2px rgba(18,114,242,.22) inset}

.modal-file-field{display:grid;gap:6px}
.modal-file-field input[type=file]{height:auto;min-height:42px;padding:9px 10px;background:#fff;border:1px dashed var(--line);border-radius:8px}
.modal-file-field small{font-size:12px;font-weight:700;color:var(--muted);line-height:1.4}
.modal-file-preview{display:flex;flex-wrap:wrap;gap:6px}
.modal-file-preview span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--line);border-radius:999px;background:#f7fbff;color:var(--muted);font-size:12px;font-weight:800;padding:4px 8px}
.aftersale-photos{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:6px 0}
.aftersale-photos a{display:block;width:54px;height:54px;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#f8fbff}
.aftersale-photos img{display:block;width:100%;height:100%;object-fit:cover}
.aftersale-photos span{display:grid;place-items:center;height:54px;min-width:54px;border:1px solid var(--line);border-radius:8px;background:#eef6ff;color:var(--muted);font-weight:900}

.entity-modal:has(.after-sale-create-form) {
  width: min(940px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  overflow-x: hidden;
}

.after-sale-create-form {
  gap: 14px;
}

.after-sale-create-form label {
  align-items: stretch;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
}

.after-sale-create-form label > span {
  color: #30445f;
  font-size: 13px;
}

.after-sale-create-form input,
.after-sale-create-form select,
.after-sale-create-form textarea {
  width: 100%;
  min-width: 0;
}

.after-sale-create-form textarea {
  min-height: 118px;
  resize: vertical;
}

.after-sale-form-section {
  border: 1px solid rgba(160, 197, 238, 0.46);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  display: grid;
  gap: 12px;
  padding: 14px;
  min-width: 0;
}

.after-sale-form-section-primary {
  background: linear-gradient(135deg, rgba(239, 248, 255, 0.82), rgba(255, 255, 255, 0.52));
}

.after-sale-section-head {
  display: grid;
  gap: 4px;
}

.after-sale-section-head strong {
  color: #0f3763;
  font-size: 15px;
}

.after-sale-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.after-sale-form-grid,
.after-sale-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.after-sale-full {
  grid-column: 1 / -1;
}

.after-sale-create-form .after-sale-match-hint {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
  background: rgba(219, 234, 254, 0.52);
  color: #4f6f93;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  padding: 8px 10px;
}

.after-sale-carrier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 170px) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.after-sale-carrier-row input,
.after-sale-carrier-row select {
  width: 100%;
  min-width: 0;
}

.after-sale-carrier-row button {
  height: 42px;
  white-space: nowrap;
  padding: 0 14px;
}

.after-sale-form-actions {
  border-top: 1px solid rgba(160, 197, 238, 0.34);
  justify-content: flex-start;
  margin-top: 2px;
  padding-top: 12px;
}

@media(max-width: 820px) {
  .entity-modal:has(.after-sale-create-form) {
    width: min(94vw, 720px);
  }

  .after-sale-form-grid,
  .after-sale-evidence-grid {
    grid-template-columns: 1fr;
  }

  .after-sale-carrier-row {
    grid-template-columns: 1fr;
  }

  .after-sale-carrier-row button {
    width: 100%;
  }
}

.after-action-prompt-form textarea,
.after-action-prompt-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.after-action-prompt-form textarea {
  line-height: 1.5;
  resize: vertical;
}

.after-action-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
  margin-top: -4px;
}

.after-action-options .outline-btn {
  min-height: 32px;
  padding: 6px 10px;
}

@media(max-width:760px) {
  .after-action-options {
    grid-column: 1;
  }
}


.aftersale-flow {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}
.after-step-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.after-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.after-step-chip b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
}
.after-step-chip em {
  font-style: normal;
}
.after-step-chip.done {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.after-step-chip.done b {
  background: #10b981;
  color: #fff;
}
.after-step-chip.current {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(18, 114, 242, 0.12) inset;
}
.aftersale-flow > em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef6ff;
  color: #41617f;
  font-style: normal;
  font-weight: 900;
}
.aftersale-photo-link {
  cursor: zoom-in;
  position: relative;
  overflow: visible !important;
  z-index: 1;
}
.aftersale-photo-link:hover {
  z-index: 20;
}
.aftersale-photo-link img {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  transform-origin: left top;
}
.aftersale-photo-link:hover img {
  transform: scale(2.75);
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
  background: #fff;
}
.after-photo-modal {
  display: grid;
  place-items: center;
  max-height: 72vh;
  overflow: auto;
  padding: 8px;
}
.after-photo-modal img {
  max-width: min(100%, 860px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}
.entity-modal:has(.after-photo-modal) {
  width: min(940px, calc(100vw - 32px));
}


.aftersale-card.is-complete {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  border-color: #d7e1ec;
  color: #64748b;
}

.aftersale-card.is-complete .aftersale-actions button,
.aftersale-actions.is-locked button {
  background: #f1f5f9 !important;
  border-color: #d5e1ef !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.aftersale-card.is-complete .aftersale-carrier {
  background: #e5e7eb;
  color: #64748b;
}

.aftersale-card.is-complete .aftersale-scan-input input {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.detail-maker-host {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 176px);
}

.detail-maker-head {
  align-items: flex-start;
}

.detail-maker-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.detail-maker-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-maker-frame {
  width: 100%;
  min-height: 1120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4fb;
}

@media (max-width: 1100px) {
  .detail-maker-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}
.cover-editor-page {
  padding: 0 !important;
  overflow: hidden;
}

.cover-editor-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 92px);
  min-height: 720px;
  border: 0;
  background: #f4f5f7;
}
/* 企业微信任务提醒 */
.wecom-config-panel { margin-top: 18px; }
.wecom-config-panel .panel-head p { margin: 4px 0 0; color: var(--muted, #718096); }
.wecom-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.wecom-status-grid article { display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid #dbe4f0; border-radius: 12px; background: #f8fafc; }
.wecom-status-grid span, .wecom-status-grid small { color: #718096; font-size: 12px; }
.wecom-status-grid strong { color: #25324a; font-size: 15px; overflow-wrap: anywhere; }
.wecom-status-grid strong.good { color: #16845b; }
.wecom-status-grid strong.warn { color: #b7791f; }
.wecom-test-box { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto auto; gap: 10px; align-items: end; padding: 14px; border-radius: 12px; background: #f3f6fb; }
.wecom-test-box label { display: flex; flex-direction: column; gap: 6px; color: #52627a; font-size: 12px; }
.wecom-test-box input, .wecom-test-box select { min-height: 40px; padding: 0 10px; border: 1px solid #d5dfec; border-radius: 8px; background: #fff; }
.wecom-test-box > span { grid-column: 1 / -1; color: #52627a; font-size: 13px; }
.wecom-log-list { display: grid; gap: 8px; margin-top: 14px; }
.wecom-log-list article { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid #e1e8f2; border-radius: 10px; }
.wecom-log-list article div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wecom-log-list article small { color: #718096; }
.wecom-log-list article p { margin: 0; color: #c53030; font-size: 12px; overflow-wrap: anywhere; }
.wecom-inline-card { margin-top: 14px; padding: 18px; border: 1px solid #cfdcf4; border-radius: 16px; background: linear-gradient(145deg, #f8fbff, #eef6ff); box-shadow: 0 10px 28px rgba(41, 83, 150, .07); }
.wecom-inline-card .box-head { align-items: flex-start; margin-bottom: 14px; }
.wecom-inline-card .box-head h3 { margin: 2px 0 4px; font-size: 18px; }
.wecom-inline-card .box-head p { margin: 0; color: #6f819c; font-size: 12px; line-height: 1.6; }
.wecom-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wecom-inline-grid label { display: grid; gap: 6px; color: #344864; font-size: 12px; font-weight: 700; }
.wecom-inline-grid input, .wecom-inline-grid select { width: 100%; min-width: 0; height: 42px; border: 1px solid #c9d7ed; border-radius: 10px; background: #fff; padding: 0 12px; color: #172943; outline: none; }
.wecom-inline-grid input:focus, .wecom-inline-grid select:focus { border-color: #4f6de8; box-shadow: 0 0 0 3px rgba(79, 109, 232, .12); }
.wecom-inline-actions { margin-top: 14px; flex-wrap: wrap; }
.wecom-inline-result { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #e8eefb; color: #50647e; font-size: 12px; line-height: 1.5; }
.wecom-inline-card .wecom-log-list { margin-top: 12px; max-height: 260px; overflow: auto; }
@media (max-width: 1000px) {
  .wecom-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wecom-test-box { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wecom-status-grid, .wecom-test-box, .wecom-inline-grid { grid-template-columns: 1fr; }
  .wecom-inline-actions > * { width: 100%; }
}
