:root {
  color-scheme: light;
  --ink: #1c252b;
  --muted: #65717b;
  --line: #d6ded8;
  --field: #f8faf6;
  --green: #2f6f4e;
  --yellow: #f7c531;
  --red: #d71946;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef3ee;
}

.admin-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.preview-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--white);
  color: var(--muted);
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(420px, 0.7fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.editor,
.preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: clamp(18px, 3vw, 28px);
}

.lead {
  margin: 0 0 20px;
  font-size: 1.18rem;
  font-weight: 760;
}

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

.coupon-hole {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

legend {
  padding: 0 6px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 720;
  resize: vertical;
}

textarea {
  min-height: 76px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 10px;
}

button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 850;
}

.pdf-sheet {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(28, 37, 43, 0.04);
}

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

.mini-coupon {
  min-height: 146px;
  border: 2px dashed var(--ink);
  background: var(--white);
  overflow: hidden;
}

.coupon-strip {
  background: var(--red);
  color: var(--white);
  padding: 5px 6px;
  text-align: center;
  font-size: 0.54rem;
  font-weight: 900;
}

.mini-body {
  position: relative;
  min-height: 122px;
  padding: 9px;
}

.product-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 0.72rem;
  font-weight: 900;
}

.offer {
  position: absolute;
  top: 7px;
  right: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100px;
  color: var(--ink);
}

.offer strong {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 0.9;
}

.offer span {
  font-size: 0.9rem;
  font-weight: 900;
}

.mini-coupon h3 {
  margin: 11px 0 4px;
  font-size: 0.82rem;
  line-height: 1.05;
}

.mini-coupon p {
  max-width: 64%;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.22;
}

.barcode {
  position: absolute;
  right: 8px;
  bottom: 9px;
  width: 72px;
  height: 34px;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px);
}

.ad-preview {
  margin-top: 12px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow);
  padding: 20px;
  text-align: center;
}

.ad-preview h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.02;
}

.ad-preview p {
  margin: 10px 0 14px;
  font-size: 1.04rem;
  font-weight: 850;
}

.contact-card {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
}

.contact-card strong {
  font-size: 1.22rem;
}

.contact-card span {
  font-size: 1.12rem;
  font-weight: 850;
}

.ad-preview small {
  display: block;
  margin-top: 12px;
  font-weight: 850;
}

@media (max-width: 980px) {
  .workspace,
  .coupon-inputs {
    grid-template-columns: 1fr;
  }

  .preview {
    margin-top: 20px;
  }
}

@media (max-width: 540px) {
  .topbar {
    display: block;
  }

  .status {
    display: inline-block;
    margin-top: 14px;
  }

  .preview-coupons {
    grid-template-columns: 1fr;
  }
}
