.price-page {
  --price-surface: #fff;
  --price-input: #fff;
  --price-line: #dcebe9;
  --price-text: #223735;
  --price-muted: #5e7473;
  --price-success: #167949;
  max-width: 1500px;
  margin: 0 auto;
  padding-bottom: 32px;
  color: var(--price-text);
}

html[data-theme="dark"] .price-page {
  --price-surface: #142b2e;
  --price-input: #19383a;
  --price-line: #315457;
  --price-text: #e8fffb;
  --price-muted: #a7c9c4;
  --price-success: #8ce8dd;
}

.price-channel-bar, .price-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.price-channel-bar select, .price-filters select, .price-filters input {
  border: 1px solid var(--price-line);
  border-radius: 10px;
  background: var(--price-input);
  color: var(--price-text);
  padding: 10px 12px;
}

.price-page select option { background: var(--price-input); color: var(--price-text); }
html[data-theme="dark"] .price-page select,
html[data-theme="dark"] .price-page input[type="search"] {
  border-color: var(--price-line);
  background: var(--price-input);
  color: var(--price-text);
  color-scheme: dark;
}

.price-channel-bar select { min-width: 250px; }
.price-status { color: #8b5e16; font-size: 13px; }
.price-status.on, .price-included { color: var(--price-success); }
.price-explainer { max-width: 920px; color: var(--price-muted); }

.price-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 18px;
  align-items: start;
}

.price-controls { display: grid; gap: 14px; min-width: 0; }
.price-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--price-line);
  border-radius: 20px;
  background: var(--price-surface);
  color: var(--price-text);
  box-shadow: 0 12px 35px #00000014;
}
html[data-theme="dark"] .price-card { box-shadow: 0 12px 30px #06141666; }
.price-card h2 { margin: 0 0 8px; font-size: 20px; color: var(--price-text); }
.price-card > p, .price-accordion-body > p { margin: 0 0 16px; color: var(--price-muted); }

.price-preview-messages {
  max-height: min(68vh, 760px);
  overflow: auto;
  border-radius: 12px;
}
.price-preview pre {
  margin: 0 0 12px;
  padding: 18px;
  border-radius: 12px;
  background: #172332;
  color: #dce9ff;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.price-preview pre:last-child { margin-bottom: 0; }

.price-accordion { padding: 0; overflow: hidden; }
.price-accordion summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  color: var(--price-text);
}
.price-accordion summary::-webkit-details-marker { display: none; }
.price-accordion summary > span { font-size: 19px; font-weight: 700; }
.price-accordion summary small { margin-left: auto; color: var(--price-muted); font-size: 12px; white-space: nowrap; }
.price-accordion summary::after { content: '⌄'; color: #159d91; font-size: 24px; line-height: 1; transition: transform .2s ease; }
.price-accordion[open] summary::after { transform: rotate(180deg); }
.price-accordion summary:hover { background: #81d8d014; }
.price-accordion summary:focus-visible { outline: 3px solid #159d91; outline-offset: -3px; }
.price-accordion[open] summary { border-bottom: 1px solid var(--price-line); }
.price-accordion-body { max-height: min(66vh, 720px); overflow: auto; padding: 18px 20px 20px; }

.price-section-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.price-page .price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 0;
  border-bottom: 1px solid var(--price-line);
  color: var(--price-text);
  cursor: pointer;
}
.price-page input.price-check {
  flex: none;
  width: 21px;
  height: 21px;
  margin: 0;
  accent-color: #159d91;
  cursor: pointer;
}
html[data-theme="dark"] .price-page input.price-check { color-scheme: dark; }
.price-page input.price-check:focus-visible { outline: 3px solid #159d91; outline-offset: 3px; }
.price-page input.price-check:disabled { cursor: not-allowed; opacity: .5; }

.price-filters { position: sticky; top: -18px; z-index: 1; margin: 0; padding: 0 0 12px; background: var(--price-surface); }
.price-filters input { flex: 1; min-width: 160px; }
.price-product-list { min-width: 0; }
.price-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--price-line);
}
.price-product > div:first-child { min-width: 0; }
.price-product strong, .price-product small { display: block; }
.price-product strong { color: var(--price-text); }
.price-product small { margin-top: 4px; color: var(--price-muted); font-size: 12px; }
.price-product small.price-included { color: var(--price-success); }
.price-product-actions { display: grid; justify-items: end; gap: 5px; flex: none; }
.price-page .price-product-toggle { display: flex; align-items: center; gap: 8px; color: var(--price-text); font-size: 13px; white-space: nowrap; cursor: pointer; }
.price-auto-reset { border: 0; background: transparent; color: #159d91; padding: 2px 0; font-size: 11px; font-weight: 700; }
.price-auto-reset:hover { text-decoration: underline; }
.price-auto-reset:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1050px) { .price-columns { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .price-card { padding: 16px; }
  .price-accordion { padding: 0; }
  .price-accordion summary { padding: 16px; }
  .price-accordion summary small { white-space: normal; text-align: right; }
  .price-accordion-body { padding: 16px; }
  .price-section-list { grid-template-columns: 1fr; }
  .price-product { align-items: flex-start; flex-direction: column; }
  .price-product-actions { width: 100%; display: flex; justify-content: space-between; align-items: center; }
}

.price-editor { margin: 16px 0; border: 1px solid var(--price-line); border-radius: 10px; padding: 12px; }
.price-editor summary { cursor: pointer; font-weight: 600; }
.price-editor-toolbar, .price-editor-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.price-editor-toolbar { margin: 12px 0; }
.price-editor-toolbar select { max-width: 100%; background: var(--price-input); color: var(--price-text); padding: 8px; border: 1px solid var(--price-line); border-radius: 8px; }
.price-editor-rows { max-height: 560px; overflow: auto; }
.price-editor-row { padding: 10px 0; border-bottom: 1px solid var(--price-line); display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.price-editor-row > span { min-width: 0; overflow-wrap: anywhere; }
.price-editor-actions { flex-shrink: 0; }
.price-editor button { padding: 6px 10px; border: 1px solid var(--price-line); border-radius: 7px; color: var(--price-text); background: var(--price-input); cursor: pointer; }
.price-editor button:disabled { opacity: .45; cursor: default; }
@media (max-width: 700px) { .price-editor-row { align-items: stretch; flex-direction: column; } }
