:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f6f7fb;
  --orange: #ee4d2d;
  --orange-dark: #c83b20;
  --line: #e5e7eb;
  --muted: #6b7280;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button, .link {
  border: 0;
  border-radius: 10px;
  padding: .7rem 1rem;
  background: var(--orange);
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:hover { background: var(--orange-dark); }
.secondary { background: white; color: #374151; border: 1px solid var(--line); }

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem max(1.25rem, calc((100vw - 1080px) / 2));
  background: linear-gradient(135deg, #ffffff, #fff1ed);
  border-bottom: 1px solid var(--line);
}
h1, h2, h3, p { margin-top: 0; }
header h1 { margin-bottom: .35rem; font-size: clamp(1.8rem, 4vw, 2.7rem); }
header p:last-child { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--orange); font-size: .75rem; font-weight: 800; letter-spacing: .18em; margin-bottom: .5rem; }

main { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.summary article { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; }
.summary strong { display: block; font-size: 2rem; }
.summary span, .toolbar p, .meta, time { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.toolbar h2 { margin-bottom: .25rem; }
.toolbar p { margin-bottom: 0; }
.offers { display: grid; gap: 1rem; }
.offer-card { display: grid; grid-template-columns: 180px 1fr; background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.offer-card.without-image { grid-template-columns: 1fr; }
.offer-image { width: 100%; height: 100%; min-height: 180px; object-fit: cover; background: #f3f4f6; }
.offer-content { padding: 1.25rem; }
.offer-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .7rem; }
.status { display: inline-block; border-radius: 999px; padding: .3rem .65rem; font-size: .75rem; font-weight: 800; background: #eef2ff; color: #4338ca; }
.status.published { background: #ecfdf5; color: #047857; }
.status.failed { background: #fef2f2; color: #b91c1c; }
.price { color: var(--orange); font-size: 1.35rem; font-weight: 800; margin-bottom: .45rem; }
.meta, .error { margin-bottom: .8rem; }
.error { color: #b91c1c; }
.channel-delivery { margin: 1rem 0; }
.delivery-platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.channel-delivery h4 { margin: 0 0 .55rem; font-size: .82rem; }
.channel-statuses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.channel-status { display: grid; gap: .08rem; min-width: 0; padding: .48rem .58rem; border: 1px solid #e5e7eb; border-radius: 9px; background: #f9fafb; }
.channel-status strong { overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.channel-status span, .channel-status small { color: var(--muted); font-size: .68rem; line-height: 1.25; }
.channel-sent { border-color: #a7f3d0; background: #ecfdf5; }
.channel-sent span { color: #047857; font-weight: 750; }
.channel-publishing { border-color: #bfdbfe; background: #eff6ff; }
.channel-publishing span { color: #1d4ed8; font-weight: 750; }
.channel-queued { border-color: #c4b5fd; background: #f5f3ff; }
.channel-queued span { color: #6d28d9; font-weight: 750; }
.channel-pending { border-color: #fde68a; background: #fffbeb; }
.channel-pending span { color: #92400e; }
.channel-missing_config, .channel-error { border-color: #fecaca; background: #fef2f2; }
.channel-missing_config span, .channel-error span { color: #b91c1c; font-weight: 750; }
.channel-not_selected { opacity: .68; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
dialog { border: 0; border-radius: 16px; padding: 1.5rem; box-shadow: 0 24px 80px #11182733; width: min(420px, calc(100% - 2rem)); }
dialog::backdrop { background: #11182780; }
dialog label { display: grid; gap: .5rem; font-weight: 700; }
dialog input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .8rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.25rem; }
.empty { text-align: center; color: var(--muted); background: white; border: 1px dashed #cbd5e1; border-radius: 16px; padding: 3rem; }

@media (max-width: 650px) {
  header { flex-direction: column; }
  .summary { grid-template-columns: 1fr; }
  .offer-card { grid-template-columns: 1fr; }
  .offer-image { height: 240px; }
  .channel-statuses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-platforms { grid-template-columns: 1fr; }
}
