:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #fdfbf7;
  --ink: #202522;
  --muted: #647067;
  --faint: #8d988f;
  --line: #dfe5dc;
  --line-strong: #cbd6cc;
  --accent: #d87545;
  --accent-soft: #fff0e7;
  --sage: #4f7d57;
  --blue: #526f91;
  --gold: #b98932;
  --rose: #bd5964;
  --shadow: 0 18px 42px rgba(44, 58, 48, 0.08);
  --radius: 8px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

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

.brand-row.compact {
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #d87545 0%, #b95f5f 100%);
  font-size: 20px;
  font-weight: 600;
}

.brand-row h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

.brand-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

input,
select,
textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  outline: 0;
}

textarea {
  min-height: 88px;
  padding: 11px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 117, 69, 0.14);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  white-space: nowrap;
}

.button.primary {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.button.subtle {
  color: var(--accent);
  background: var(--accent-soft);
}

.button.danger {
  border-color: transparent;
  color: #fff;
  background: var(--rose);
}

.button.full {
  width: 100%;
}

.form-message {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
}

.topbar .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

.topbar .brand-row h1 {
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 60px;
}

.admin-layout {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 60px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
}

.side-nav-title {
  padding: 8px 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.menu-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.menu-button:hover,
.menu-button.active {
  background: var(--accent-soft);
}

.menu-button.active {
  color: var(--accent);
}

.menu-button span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.menu-button strong {
  font-size: 13px;
  font-weight: 600;
}

.menu-button small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-button em {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.admin-main {
  min-width: 0;
}

.admin-main > :first-child {
  margin-top: 0;
}

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

.metric-card,
.publish-panel,
.workbench,
.overview-card,
.loading-panel,
.activity-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

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

.metric-card strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.workbench,
.publish-panel,
.overview-card,
.loading-panel,
.activity-panel {
  margin-top: 16px;
  overflow: hidden;
}

.loading-panel {
  min-height: 560px;
}

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

.loading-line,
.loading-row span {
  border-radius: 999px;
  background: linear-gradient(90deg, #edf1ea 0%, #f8f9f5 50%, #edf1ea 100%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.4s ease-in-out infinite;
}

.loading-line {
  width: 42%;
  height: 16px;
}

.loading-line.wide {
  width: 68%;
}

.loading-table {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.loading-row {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 180px;
  gap: 18px;
  align-items: center;
  padding: 0 16px;
}

.loading-row:last-child {
  border-bottom: 0;
}

.loading-row span {
  height: 14px;
}

@keyframes loading-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.overview-grid .activity-panel {
  margin-top: 16px;
}

.compact-list {
  display: grid;
}

.compact-product {
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.compact-product strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

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

.empty.compact {
  min-height: 160px;
}

.publish-page {
  min-width: 0;
}

.publish-workspace {
  min-width: 0;
}

.publish-form {
  display: grid;
  gap: 18px;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.045);
  padding: 18px 20px 0;
}

.publish-page .field {
  gap: 7px;
}

.publish-page .field > span,
.field-label-row span,
.offer-block > span {
  color: #111827;
  font-size: 12px;
  font-weight: 600;
}

.publish-page em {
  color: #ff4d24;
  font-style: normal;
}

.publish-page small {
  color: #8b95a1;
  font-size: 12px;
  font-weight: 400;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.publish-page input,
.publish-page select,
.publish-page textarea {
  border-color: #d9e1ea;
  border-radius: 6px;
  color: #111827;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
}

.publish-page input,
.publish-page select {
  min-height: 36px;
}

.publish-page textarea {
  min-height: 70px;
}

.publish-page input::placeholder,
.publish-page textarea::placeholder {
  color: #9aa5b1;
}

.publish-basic-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 16px;
}

.span-3 {
  grid-column: span 3;
}

.span-6 {
  grid-column: span 6;
}

.span-9 {
  grid-column: span 9;
}

.span-12 {
  grid-column: span 12;
}

.choice-row,
.tag-row,
.inline-radio-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.platform-choice {
  display: flex;
  gap: 10px;
}

.platform-chip span {
  min-width: 92px;
}

.radio-chip,
.check-chip {
  position: relative;
}

.radio-chip input,
.check-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.radio-chip span,
.check-chip span,
.tag-add-button {
  min-height: 36px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #111827;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.check-chip span,
.tag-add-button {
  min-height: 32px;
  padding: 0 13px;
  font-size: 12px;
}

.radio-chip input:checked + span,
.check-chip input:checked + span {
  border-color: #ff6b35;
  color: #ff4d24;
  background: #fff5f0;
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.08);
}

.extraction-status {
  border: 1px solid #e6edf5;
  border-radius: 6px;
  padding: 9px 12px;
  color: #6b7280;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
}

.extraction-status[data-state="success"] {
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
  background: #f0fdf4;
}

.extraction-status[data-state="error"] {
  border-color: rgba(225, 29, 72, 0.28);
  color: #be123c;
  background: #fff1f2;
}

.price-layout {
  border-top: 1px solid #eef2f6;
  padding-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

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

.money-input {
  min-height: 36px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  background: #fff;
}

.money-input b {
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.money-input input {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding-left: 4px;
  box-shadow: none;
}

.money-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 117, 69, 0.14);
}

.offer-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.offer-add-button {
  min-height: 32px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}

.offer-editor {
  flex: 1 1 520px;
  min-width: min(520px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
}

.schedule-input[hidden] {
  display: none;
}

.offer-chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.offer-chip {
  min-height: 30px;
  border: 1px solid rgba(255, 107, 53, 0.32);
  border-radius: 6px;
  padding: 0 10px;
  color: #ff4d24;
  background: #fff5f0;
  font-size: 12px;
}

.price-preview {
  border: 1px solid #f1dfd2;
  border-radius: 6px;
  background: linear-gradient(180deg, #fffaf6 0%, #fffdfb 100%);
  padding: 14px 16px 12px;
}

.price-preview h4 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.price-preview div {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #111827;
  font-size: 13px;
}

.price-preview strong {
  font-weight: 500;
}

.price-preview .discount {
  color: #ff4d24;
}

.price-preview-final {
  margin-top: 8px;
  border-top: 1px solid #eadfd7;
  padding-top: 14px;
}

.price-preview-final strong {
  color: #ff4d24;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.detail-grid {
  border-top: 1px solid #eef2f6;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.detail-grid textarea {
  min-height: 76px;
}

.settings-grid {
  border-top: 1px solid #eef2f6;
  padding-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px 260px;
  gap: 20px;
  align-items: start;
}

.tag-row {
  gap: 8px;
}

.tag-add-button {
  color: #7a8594;
  background: #fff;
}

.inline-radio-row {
  min-height: 32px;
  gap: 24px;
}

.inline-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #111827;
  font-size: 13px;
  white-space: nowrap;
}

.inline-radio-row input {
  width: 14px;
  min-height: 14px;
  accent-color: #ff6b35;
}

.schedule-input {
  margin-top: 8px;
}

.publish-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -20px;
  border-top: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.publish-actions .button {
  min-width: 132px;
}

.publish-actions .button.primary {
  background: #ff5a2f;
}

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

.review-summary {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.review-workbench .section-head h2 {
  font-size: 14px;
}

.review-workbench .section-head span {
  font-size: 11px;
}

.review-workbench .review-summary {
  min-height: 44px;
  gap: 10px;
  padding: 8px 16px;
}

.review-workbench .review-summary .status {
  min-height: 26px;
  padding: 0 9px;
}

.review-workbench .review-summary .muted {
  font-size: 12px;
  line-height: 1.45;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 12px;
}

.segmented button.active {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 340px) auto;
  gap: 8px;
}

.search-form input {
  min-height: 38px;
  font-size: 14px;
  line-height: 1.35;
}

.search-form input::placeholder {
  font-size: 14px;
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #fbfcfa;
  font-weight: 600;
}

tbody tr:hover {
  background: #fffdf9;
}

.product-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 290px;
}

.product-cell strong {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.product-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-visual {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--a, #d87545), var(--b, #526f91));
  overflow: hidden;
  font-size: 21px;
}

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

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

.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status.done {
  color: #fff;
  background: var(--sage);
}

.status.pending {
  color: #76510d;
  background: #ffe9b7;
}

.status.locked {
  color: #fff;
  background: var(--rose);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.icon-button.success {
  color: #fff;
  border-color: transparent;
  background: var(--sage);
}

.icon-button.warning {
  color: #fff;
  border-color: transparent;
  background: var(--gold);
}

.icon-button.danger {
  color: #fff;
  border-color: transparent;
  background: var(--rose);
}

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

.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

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

.activity-list {
  display: grid;
}

.activity-item {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
}

.activity-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-type {
  min-height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.activity-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

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

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(440px, calc(100% - 48px));
  border-radius: var(--radius);
  padding: 13px 16px;
  color: #fff;
  background: rgba(32, 37, 34, 0.94);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dialog-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(32, 37, 34, 0.46);
  backdrop-filter: blur(3px);
}

.confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  border: 1px solid rgba(223, 229, 220, 0.92);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(32, 37, 34, 0.22);
  padding: 22px;
}

.confirm-dialog.danger {
  border-top: 4px solid var(--rose);
}

.edit-dialog {
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-top: 4px solid var(--accent);
  padding: 20px;
}

.dialog-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 600;
}

.dialog-kicker.edit {
  color: var(--accent);
}

.dialog-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 18px;
  line-height: 1;
}

.confirm-dialog h2 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.dialog-product {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
}

.dialog-product strong,
.dialog-product span {
  min-width: 0;
}

.dialog-product > div:nth-child(2) {
  min-width: 0;
}

.dialog-product strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.dialog-product div > span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

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

.dialog-actions .button {
  min-width: 96px;
}

.edit-summary {
  margin-top: 14px;
}

.edit-product-form {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

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

.edit-dialog .field {
  gap: 6px;
}

.edit-dialog .field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.edit-dialog input,
.edit-dialog select,
.edit-dialog textarea {
  min-height: 38px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.edit-dialog em {
  color: var(--accent);
  font-style: normal;
}

.edit-dialog textarea {
  min-height: 76px;
}

.edit-dialog .money-input {
  min-height: 38px;
}

.edit-dialog .money-input b {
  font-size: 14px;
}

.edit-dialog .money-input input {
  min-height: 36px;
}

.edit-dialog .check-chip span {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.edit-price-grid {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

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

  .side-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .side-nav-title {
    display: none;
  }

  .menu-button {
    min-width: 160px;
  }

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

  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .search-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .publish-workspace,
  .price-layout,
  .detail-grid,
  .settings-grid,
  .publish-basic-grid,
  .edit-form-grid {
    grid-template-columns: 1fr;
  }

  .publish-basic-grid > .field,
  .edit-form-grid > * {
    grid-column: 1 / -1;
  }

  .price-preview {
    width: min(460px, 100%);
  }

}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    width: min(100% - 24px, var(--max));
  }

  .admin-layout {
    width: min(100% - 24px, var(--max));
  }

  .metrics-grid,
  .code-row,
  .search-form,
  .price-input-grid,
  .platform-choice,
  .offer-editor {
    grid-template-columns: 1fr;
  }

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

  .platform-chip span {
    width: 100%;
  }

  .publish-actions {
    flex-direction: column-reverse;
  }

  .publish-actions .button {
    width: 100%;
  }

  .dialog-layer {
    padding: 16px;
  }

  .confirm-dialog {
    padding: 18px;
  }

  .dialog-product {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dialog-product .status {
    justify-self: start;
    grid-column: 2;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }
}
