:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e5e8ef;
  --text: #182033;
  --muted: #6b7280;
  --blue: #1677ff;
  --green: #16a34a;
  --orange: #d97706;
  --red: #e11d48;
  --cyan: #0891b2;
  --side: #111827;
  --soft-blue: #e8f2ff;
  --soft-red: #fff1f2;
  --soft-orange: #fef3c7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1440px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.upload-box {
  width: 100%;
  color: var(--text);
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(120deg, rgba(22, 119, 255, .08), transparent 35%),
    linear-gradient(180deg, #f8fafc, #eef3fb);
}

.login-panel {
  width: 420px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

.login-brand,
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .28);
}

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

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

.login-panel h1 {
  margin: 28px 0 18px;
  font-size: 24px;
}

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

.login-message {
  min-height: 18px;
  color: #dc2626;
  font-size: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 38px;
  padding: 0 11px;
}

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

.login-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
}

.login-links button,
.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--side), #0b1220);
  color: #fff;
  padding: 18px 14px;
}

.side-brand {
  padding: 0 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
}

.side-brand span {
  color: #9ca3af;
}

.menu-group-title {
  padding: 14px 14px 8px;
  color: #7d8798;
  font-size: 11px;
}

.menu-item,
.submenu-item {
  width: 100%;
  border: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 7px;
  color: #cbd5e1;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.menu-node {
  position: relative;
}

.menu-node.has-children > .menu-item,
.menu-node.has-children > .submenu-item {
  padding-right: 34px;
}

.menu-item span,
.submenu-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.menu-toggle.collapsed::before {
  transform: rotate(-45deg);
}

.menu-toggle:hover {
  background: rgba(255,255,255,.08);
}

.menu-node.active .menu-toggle::before {
  border-color: #fff;
}

.menu-item.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(22,119,255,.28);
}

.submenu-item {
  height: 30px;
  padding-left: 43px;
  color: #9ca3af;
  font-size: 12px;
}

.submenu-item.active {
  color: #dbeafe;
  background: rgba(22,119,255,.12);
}

.ico {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  color: currentColor;
  flex: 0 0 auto;
}

.ico.dash:before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  border-bottom-color: transparent;
}

.ico.dash:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.8px;
  background: currentColor;
  left: 9px;
  top: 10px;
  transform: rotate(-35deg);
  border-radius: 2px;
}

.ico.shop:before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 3px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 3px 3px 1px 1px;
}

.ico.shop:after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.ico.order:before,
.ico.api:before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.ico.order:after {
  content: "";
  position: absolute;
  left: 6px;
  right: 4px;
  top: 6px;
  border-top: 1.8px solid currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.ico.box:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 12px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}

.ico.box:after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  height: 10px;
  border-left: 1.8px solid currentColor;
}

.ico.truck:before {
  content: "";
  position: absolute;
  left: 1px;
  top: 6px;
  width: 10px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}

.ico.truck:after {
  content: "";
  position: absolute;
  right: 1px;
  top: 8px;
  width: 6px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: -11px 6px 0 -4px currentColor, -2px 6px 0 -4px currentColor;
}

.ico.wallet:before {
  content: "";
  position: absolute;
  inset: 4px 2px 3px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.ico.wallet:after {
  content: "";
  position: absolute;
  right: 3px;
  top: 8px;
  width: 6px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  background: #111827;
}

.ico.chart:before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 2px;
  height: 7px;
  background: currentColor;
  box-shadow: 5px -4px 0 currentColor, 10px -8px 0 currentColor;
  border-radius: 2px;
}

.ico.api:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  left: 5px;
  top: 8px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 26px;
}

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

.head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost,
.primary,
.danger {
  height: 34px;
  border-radius: 6px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.ghost:disabled,
.primary:disabled,
.danger:disabled {
  cursor: not-allowed;
  opacity: .55;
  box-shadow: none;
}

.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(22,119,255,.2);
}

.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--red);
}

.large {
  width: 100%;
  height: 40px;
}

.avatar {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #1f2937;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.content {
  padding: 22px 26px 28px;
}

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

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

.desc {
  color: var(--muted);
  font-size: 13px;
}

.filters,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

.filters {
  padding: 14px;
  display: grid;
  grid-template-columns: 1.2fr .78fr .78fr .85fr .85fr .85fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.logistics-filters {
  grid-template-columns: 1.35fr .72fr .9fr .72fr auto;
}

.user-filters {
  grid-template-columns: 1.35fr .8fr .8fr auto;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.kpi {
  padding: 16px;
  height: 110px;
}

.kpi-button {
  appearance: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.kpi-button.active {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.token {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.b { background: var(--soft-blue); color: var(--blue); }
.g { background: #dcfce7; color: var(--green); }
.o { background: var(--soft-orange); color: var(--orange); }
.r { background: #ffe4e6; color: var(--red); }
.c { background: #cffafe; color: var(--cyan); }

.num {
  font-size: 25px;
  font-weight: 760;
  margin-bottom: 8px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.bad-text { color: var(--red); }
.warn-text { color: var(--orange); }

.module-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(108px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.type-chip {
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 12px;
}

.type-chip strong {
  color: var(--blue);
  font-size: 16px;
}

.type-chip.active {
  border-color: #fecdd3;
  background: var(--soft-red);
  color: var(--red);
}

.type-chip.active strong {
  color: var(--red);
}

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

.table-card {
  overflow: hidden;
}

.user-form-card {
  padding: 16px;
  margin-bottom: 14px;
}

.user-form-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.form-note {
  color: var(--red);
  font-size: 12px;
  white-space: nowrap;
}

.users-table table {
  min-width: 980px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  white-space: nowrap;
}

.tab.active {
  background: var(--soft-red);
  color: var(--red);
  font-weight: 700;
}

.pill {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 11px;
  padding: 0 5px;
}

.toolbar {
  height: 54px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.title {
  font-size: 15px;
  font-weight: 700;
}

.muted-count,
.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

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

table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  font-size: 12px;
}

th {
  height: 38px;
  text-align: left;
  color: #64748b;
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 0 9px;
  white-space: nowrap;
}

td {
  height: 54px;
  border-bottom: 1px solid #eef1f6;
  color: #374151;
  padding: 8px 9px;
  white-space: nowrap;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #f8fbff;
}

.waybill {
  color: var(--blue);
  font-weight: 700;
}

.status {
  height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 11px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--soft-blue);
  color: var(--blue);
}

.status.bad {
  background: #ffe4e6;
  color: var(--red);
}

.status.warn {
  background: var(--soft-orange);
  color: var(--orange);
}

.status.ok {
  background: #dcfce7;
  color: var(--green);
}

.tag {
  height: 22px;
  border-radius: 5px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #475569;
}

.empty-cell {
  height: 180px;
  text-align: center;
  color: var(--muted);
}

.drawer {
  padding: 16px;
}

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

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.small-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.drawer-head strong {
  font-size: 15px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-grid div {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  padding: 9px 10px;
}

.meta-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.meta-grid strong {
  color: #1f2937;
  font-size: 12px;
}

.risk {
  padding: 12px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: var(--soft-red);
  color: #9f1239;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.ops button {
  width: 100%;
}

.drawer-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}

.section-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.reminder-line {
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.track {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: #374151;
  font-size: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 4px;
  box-shadow: 0 0 0 4px var(--soft-blue);
}

.track strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.track span {
  color: var(--muted);
}

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

.record {
  display: grid;
  grid-template-columns: 72px 48px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  font-size: 12px;
}

.record span {
  color: var(--muted);
}

.record em {
  color: #475569;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 14px;
}

.chart {
  height: 300px;
  padding: 18px;
}

.chart-box {
  height: 230px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(148, 163, 184, .18) 1px, transparent 1px) 0 0 / 100% 52px;
}

.chart-box svg {
  width: 100%;
  height: 100%;
}

.simple-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.simple-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  font-size: 13px;
}

.api-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}

.base-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
}

.base-grid > .card {
  min-width: 0;
}

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

.api-card {
  padding: 16px;
}

.platform-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.platform-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #fff;
}

.platform-card.active {
  border-color: #91caff;
  background: #f0f7ff;
}

.platform-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.platform-card div span {
  font-size: 12px;
  color: var(--muted);
}

.template-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.template-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.template-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

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

.placeholder {
  min-height: 620px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.tree-card {
  padding: 18px 20px;
}

.tree-card pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 14px;
  line-height: 1.85;
}

.api-status-cards {
  grid-template-columns: repeat(4, 1fr);
}

.api-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.api-panel {
  padding: 16px;
}

.api-panel.wide {
  grid-column: 1 / -1;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.form-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.switch-row {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fbfdff;
}

.switch-row strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

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

.ui-switch {
  display: inline-flex;
  align-items: center;
}

.ui-switch input {
  display: none;
}

.ui-switch span {
  width: 42px;
  height: 22px;
  border-radius: 11px;
  background: #d8dee9;
  position: relative;
}

.ui-switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
}

.ui-switch input:checked + span {
  background: var(--blue);
}

.ui-switch input:checked + span::after {
  left: 22px;
}

.platform-checks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.check-item {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.check-item input {
  width: 14px;
  height: 14px;
}

.test-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.test-grid {
  display: grid;
  grid-template-columns: .75fr 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.sign-tip {
  margin-top: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  font-size: 12px;
}

.empty-box {
  height: 92px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.empty-detail {
  min-height: 360px;
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-state span {
  display: block;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal-card {
  width: 520px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
}

.export-card {
  width: min(1180px, calc(100vw - 44px));
}

.modal-head,
.modal-foot {
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-head button {
  border: 0;
  background: transparent;
  font-size: 22px;
  color: var(--muted);
}

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

.modal-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.export-body {
  max-height: calc(100vh - 180px);
  overflow: hidden;
}

.export-scroll {
  max-height: calc(100vh - 216px);
  overflow: auto;
}

.export-scroll table {
  min-width: 1120px;
}

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

.import-tab {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-weight: 500;
}

.import-tab.active {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue);
}

.import-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.import-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

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

.clear-warning {
  border: 1px solid #fecdd3;
  border-radius: 7px;
  background: #fff1f2;
  color: var(--red);
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.import-result div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.import-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.import-result strong {
  display: block;
  font-size: 24px;
  color: var(--text);
}

.import-message {
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
}

.ok-text {
  color: var(--green) !important;
}

.template-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.template-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.template-head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.template-map {
  min-width: 0;
  font-size: 12px;
}

.template-map th,
.template-map td {
  height: 34px;
}

.upload-box {
  height: 120px;
  border: 1px dashed #b8c7dc;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--blue);
  background: #f3f8ff;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box strong {
  display: block;
  font-size: 15px;
}

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

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

.ai-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-bottom: 14px;
}

.compact-table table {
  min-width: 0;
}

.table-search {
  width: 220px;
  height: 32px;
}

.th-sort {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.sort-mark {
  margin-left: 5px;
  color: var(--blue);
}

.ai-advice-panel {
  padding: 16px;
  min-height: 320px;
}

.ai-priority-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  margin: 14px 0;
}

.ai-priority-card > strong {
  display: block;
  margin-bottom: 12px;
  color: #111827;
  font-size: 14px;
}

.ai-priority-row {
  padding: 10px 0;
  border-top: 1px solid #eef1f6;
}

.ai-priority-row span {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.ai-priority-row b {
  color: var(--red);
}

.ai-priority-row p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 12px;
}

.inline-message {
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
}

.logistics-message {
  margin-bottom: 14px;
}

.ai-history-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.ai-history-card summary {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

.ai-history-card summary::-webkit-details-marker {
  display: none;
}

.ai-history-card summary span {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.ai-history-card summary em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.ai-history-detail {
  border-top: 1px solid var(--line);
  padding: 14px;
  background: #fbfdff;
}

.ai-history-detail strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 13px;
}

.ai-history-detail p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.7;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}

.release-card {
  max-width: 760px;
  padding: 18px;
}

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

.release-title {
  margin-bottom: 6px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.release-desc {
  color: var(--muted);
  font-size: 13px;
}

.release-btn {
  min-width: 118px;
}

.release-flow {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.7;
}

.release-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.release-status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.release-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.release-status-grid strong {
  color: #111827;
  font-size: 13px;
}

.product-operation-head {
  margin-bottom: 12px;
}

.product-operation-shell {
  display: grid;
  grid-template-columns: minmax(400px, .82fr) minmax(620px, 1.45fr);
  gap: 12px;
  align-items: start;
}

.product-operation-config {
  display: grid;
  gap: 10px;
}

.product-step-card {
  padding: 12px;
}

.product-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.product-step-title b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}

.product-image-provider-card {
  display: grid;
  gap: 9px;
}

.product-provider-status,
.product-provider-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-provider-status {
  justify-content: space-between;
}

.product-provider-status small {
  color: var(--muted);
  font-size: 10px;
}

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

.product-provider-grid label,
.product-provider-wide {
  display: grid;
  gap: 4px;
}

.product-provider-grid span,
.product-provider-wide span {
  color: #475569;
  font-size: 11px;
}

.product-provider-grid input,
.product-provider-grid select,
.product-provider-wide input {
  height: 30px;
  font-size: 12px;
}

.product-provider-actions {
  justify-content: flex-end;
}

.product-provider-actions button {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.product-provider-contract {
  display: grid;
  gap: 3px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff;
  padding: 8px 9px;
}

.product-provider-contract strong {
  color: #1e3a8a;
  font-size: 11px;
}

.product-provider-contract span {
  color: #64748b;
  font-size: 10px;
  line-height: 1.55;
}

.product-provider-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  padding: 8px;
}

.product-provider-preview img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #fff;
}

.product-provider-preview div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-provider-preview strong {
  color: #1e3a8a;
  font-size: 12px;
}

.product-provider-preview span {
  overflow-wrap: anywhere;
  color: #475569;
  font-size: 11px;
}

.product-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.product-form-grid label,
.product-wide-input {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.product-form-grid label span,
.product-wide-input span,
.product-token-row > span {
  color: #475569;
  font-size: 11px;
}

.product-form-grid input,
.product-form-grid select,
.product-wide-input input {
  height: 32px;
  font-size: 12px;
}

.product-token-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 9px;
}

.product-token-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-empty-value {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.product-token {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 5px;
  background: #f8fafc;
  color: #475569;
  padding: 0 7px;
  font-size: 11px;
}

.product-wide-input {
  margin-top: 9px;
}

.product-upload-groups {
  display: grid;
  gap: 10px;
}

.product-upload-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fbfdff;
}

.product-upload-group.compliance {
  background: #fffdf8;
}

.product-upload-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.product-upload-head strong {
  color: #111827;
  font-size: 12px;
}

.product-upload-head span {
  color: var(--muted);
  font-size: 10px;
}

.product-upload-body {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 8px;
}

.product-upload-body.empty {
  grid-template-columns: 1fr;
}

.product-dropzone {
  min-height: 82px;
  border: 1px dashed #9fc5f8;
  border-radius: 6px;
  background: #f5f9ff;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.product-dropzone > span {
  font-size: 20px;
  line-height: 1;
}

.product-dropzone strong {
  font-size: 11px;
}

.product-dropzone small {
  color: #64748b;
  font-size: 9px;
}

.product-upload-thumb {
  min-height: 82px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

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

.product-upload-thumb > div {
  display: grid;
  gap: 2px;
  padding: 3px 5px;
}

.product-upload-thumb strong {
  overflow: hidden;
  color: #475569;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-upload-thumb span {
  display: block;
  color: #64748b;
  font-size: 9px;
}

.product-compliance-category {
  display: grid;
  gap: 3px;
  padding: 0 5px 5px;
}

.product-compliance-category span {
  color: #64748b;
  font-size: 9px;
}

.product-compliance-category select {
  width: 100%;
  height: 24px;
  border: 1px solid #dbe4f0;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  font-size: 10px;
}

.product-upload-thumb button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  line-height: 1;
}

.compliance-thumb {
  display: grid;
  place-items: center;
  background: #fff;
}

.compliance-thumb div {
  display: grid;
  gap: 5px;
  text-align: center;
}

.compliance-thumb strong {
  color: #111827;
  font-size: 11px;
}

.compliance-thumb span {
  color: var(--muted);
  font-size: 9px;
}

.product-compliance-tip,
.product-reference-tip {
  margin-top: 8px;
  color: #64748b;
  font-size: 10px;
}

.product-compliance-tip {
  color: #9a6700;
}

.product-platform-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 9px;
  overflow-x: auto;
}

.product-platform-tabs button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #475569;
  padding: 0 11px;
  font-size: 11px;
  white-space: nowrap;
}

.product-platform-tabs button.active {
  border-color: #91caff;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 700;
}

.product-platform-tabs.compact {
  margin-bottom: 8px;
}

.product-title-button {
  width: 100%;
  margin-bottom: 9px;
}

.product-copy-result {
  display: grid;
  gap: 7px;
}

.product-copy-result > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.product-copy-result span {
  color: var(--muted);
  font-size: 10px;
}

.product-copy-result strong {
  color: #1f2937;
  font-size: 11px;
}

.product-copy-result .product-token {
  margin: 2px 3px 2px 0;
}

.product-warning {
  margin-top: 8px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  padding: 7px 9px;
  font-size: 10px;
}

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

.product-rule-option {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 5px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}

.product-rule-option input {
  grid-row: 1 / 3;
}

.product-rule-option span {
  color: #334155;
  font-size: 10px;
}

.product-rule-option small {
  color: var(--muted);
  font-size: 8px;
}

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

.product-type-grid div {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  color: #475569;
  padding: 6px;
  font-size: 9px;
}

.product-type-grid span {
  color: var(--blue);
  font-size: 13px;
}

.product-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.product-action-bar > button {
  min-width: 150px;
}

.product-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-status-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 9px;
}

.product-status-line i {
  width: 7px;
  height: 7px;
  border: 1px solid #94a3b8;
  border-radius: 50%;
}

.product-status-line span.active {
  color: var(--blue);
  font-weight: 700;
}

.product-status-line span.active i {
  border-color: var(--blue);
  background: var(--blue);
}

.product-step-card .inline-message {
  margin-top: 10px;
}

.product-preview-area {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.product-task-history {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.product-task-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.product-task-history-head div {
  display: grid;
  gap: 2px;
}

.product-task-history-head strong {
  color: #111827;
  font-size: 13px;
}

.product-task-history-head span {
  color: var(--muted);
  font-size: 10px;
}

.product-task-history-head .ghost {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.product-task-history-list {
  display: grid;
  gap: 6px;
  max-height: 172px;
  overflow: auto;
}

.product-task-history-row {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  padding: 8px;
  text-align: left;
}

.product-task-history-row.active {
  border-color: #91caff;
  background: #eff6ff;
}

.product-task-history-row strong {
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-task-history-row span,
.product-task-history-row small,
.product-task-history-empty {
  color: var(--muted);
  font-size: 9px;
}

.product-task-history-empty {
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 14px;
  text-align: center;
}

.product-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.product-preview-title div {
  display: grid;
  gap: 3px;
}

.product-preview-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-preview-actions .ghost {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.product-preview-title strong {
  color: #111827;
  font-size: 15px;
}

.product-preview-title div span {
  color: var(--muted);
  font-size: 10px;
}

.product-platform-bundle {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  margin-bottom: 9px;
}

.product-bundle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.product-bundle-head strong {
  color: #111827;
  font-size: 13px;
}

.product-bundle-head span {
  color: var(--muted);
  font-size: 9px;
}

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

.product-bundle-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.product-bundle-pair .product-material-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-bundle-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 11px;
}

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

.product-material-meta {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 5px;
}

.product-material-meta strong {
  overflow: hidden;
  color: #334155;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-material-meta span,
.product-material-card > small {
  color: #94a3b8;
  font-size: 8px;
}

.product-material-image {
  height: 112px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

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

.product-material-card.transparent .product-material-image {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-size: 14px 14px;
}

.product-material-card.transparent img {
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-material-card.preview-source .product-material-image {
  background: #eef2f7;
}

.product-material-card.preview-white_bg .product-material-image {
  background: #fff;
}

.product-material-card.preview-white_bg img {
  width: calc(100% - 24px);
  height: calc(100% - 20px);
  margin: 10px 12px;
  object-fit: contain;
}

.product-material-card.preview-main_image .product-material-image {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 50%, #f8fafc 100%);
}

.product-material-card.preview-feed_card .product-material-image,
.product-material-card.preview-vertical_cover .product-material-image {
  background: linear-gradient(160deg, #0f172a 0%, #1d4ed8 54%, #f8fafc 55%);
}

.product-material-card.preview-feed_card img,
.product-material-card.preview-vertical_cover img {
  transform: scale(1.06);
}

.product-material-card.preview-detail_page .product-material-image {
  background: #fff;
}

.product-material-card.preview-detail_page img {
  height: 58%;
  object-fit: cover;
  opacity: .72;
}

.product-material-card.preview-live_room .product-material-image {
  background: linear-gradient(160deg, #111827 0%, #334155 52%, #fef3c7 100%);
}

.product-material-preview-badge,
.mock-main-corner,
.mock-cover-title,
.mock-feed-tags,
.mock-live-dots,
.mock-detail-lines {
  position: absolute;
  z-index: 1;
}

.product-material-preview-badge {
  left: 5px;
  top: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, .88);
  color: #1e3a8a;
  font-size: 8px;
  line-height: 1.2;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-main-corner {
  right: 5px;
  top: 5px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 8px;
  padding: 3px 6px;
}

.mock-feed-tags {
  left: 6px;
  right: 6px;
  top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mock-feed-tags span {
  border-radius: 999px;
  background: rgba(219, 39, 119, .9);
  color: #fff;
  font-size: 8px;
  padding: 3px 5px;
}

.mock-detail-lines {
  left: 8px;
  right: 8px;
  top: 58px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .9);
}

.mock-detail-lines span {
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
}

.mock-detail-lines span:nth-child(2) {
  width: 76%;
}

.mock-detail-lines span:nth-child(3) {
  width: 54%;
}

.mock-detail-lines em {
  overflow: hidden;
  color: #1d4ed8;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-cover-title {
  left: 8px;
  right: 8px;
  top: 28px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(15, 23, 42, .55);
}

.mock-live-dots {
  right: 6px;
  top: 8px;
  display: flex;
  gap: 3px;
}

.mock-live-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .24);
}

.transparent-note,
.material-copy {
  position: absolute;
  z-index: 2;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  padding: 4px;
  text-align: center;
  font-size: 8px;
}

.product-material-card.activity .material-copy,
.product-material-card.recommend .material-copy {
  background: rgba(190, 24, 93, .86);
}

.product-material-card.spec .material-copy,
.product-material-card.cold .material-copy {
  background: rgba(29, 78, 216, .86);
}

.product-material-card.label .material-copy {
  background: rgba(71, 85, 105, .86);
}

.product-material-card > small {
  display: block;
  margin-top: 4px;
}

.product-material-audit,
.product-compliance-review {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  margin-bottom: 9px;
}

.product-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.product-audit-head div {
  display: grid;
  gap: 2px;
}

.product-audit-head strong {
  color: #111827;
  font-size: 13px;
}

.product-audit-head span,
.product-audit-head small,
.product-audit-empty {
  color: var(--muted);
  font-size: 9px;
}

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

.product-audit-row {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #fbfdff;
  padding: 8px;
}

.product-audit-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-audit-row-head strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-audit-row-head span {
  flex: 0 0 auto;
  font-size: 9px;
}

.product-audit-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-audit-stats span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 8px;
  padding: 2px 5px;
}

.product-audit-files {
  display: grid;
  gap: 3px;
}

.product-audit-files small {
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-rule-blocks {
  display: grid;
  gap: 3px;
}

.product-rule-blocks small,
.product-rule-check {
  overflow: hidden;
  border-radius: 4px;
  background: #fff7ed;
  color: #b45309;
  font-size: 9px;
  line-height: 1.45;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-rule-check.ok-text {
  background: #ecfdf3;
  color: #11833f !important;
}

.product-generation-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.product-generation-job small {
  overflow: hidden;
  border-radius: 4px;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  line-height: 1.45;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-generation-job small.ok-text {
  background: #ecfdf3;
  color: #11833f !important;
}

.product-generation-job small.warn-text {
  background: #fff7ed;
  color: #b45309 !important;
}

.product-generation-retry {
  height: 24px;
  padding: 0 7px;
  font-size: 10px;
}

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

.product-compliance-grid div {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  padding: 7px;
}

.product-compliance-grid span {
  color: #64748b;
  font-size: 8px;
}

.product-compliance-grid strong {
  overflow: hidden;
  color: #1e3a8a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-compliance-files {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.product-compliance-file {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  background: #fbfdff;
  padding: 7px;
}

.product-compliance-file-preview {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 5px;
  background: #fff;
}

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

.product-compliance-file-preview.empty {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 9px;
}

.product-compliance-file-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.product-compliance-file-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-compliance-file-title strong {
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-compliance-file-title span,
.product-compliance-file-main small {
  color: #64748b;
  font-size: 9px;
}

.product-compliance-file-main input {
  width: 100%;
  height: 26px;
  border: 1px solid #dbe4f0;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 10px;
}

.product-compliance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-compliance-actions button {
  height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.product-compliance-actions button.active {
  border-color: #91caff;
  background: #e6f4ff;
  color: #1677ff;
}

.product-compliance-note {
  color: #b45309 !important;
}

.product-audit-empty {
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 12px;
  text-align: center;
}

.product-download-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 3px;
}

.product-download-bar button {
  flex: 1 1 132px;
  color: var(--blue);
}

@media (max-width: 1180px) {
  .ai-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-analysis-grid {
    grid-template-columns: 1fr;
  }

  .product-operation-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .modal-card {
    width: calc(100vw - 24px);
  }

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

  .ai-kpis {
    grid-template-columns: 1fr;
  }

  .page-head {
    display: grid;
    gap: 12px;
  }

  .table-search {
    width: 100%;
  }

  .release-main {
    align-items: stretch;
    display: grid;
  }

  .release-btn {
    width: 100%;
  }

  .release-status-grid {
    grid-template-columns: 1fr;
  }

  .product-form-grid,
  .product-provider-grid,
  .product-bundle-pair {
    grid-template-columns: 1fr;
  }

  .product-rule-grid,
  .product-type-grid,
  .product-material-grid,
  .product-bundle-pair .product-material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-upload-body {
    grid-template-columns: 1fr 1fr;
  }

  .product-dropzone {
    grid-column: 1 / -1;
  }

  .product-action-bar {
    align-items: stretch;
    flex-direction: column;
  }
}
