:root {
  --ink: #183229;
  --muted: #66766f;
  --forest: #2f6d4f;
  --forest-dark: #1f523a;
  --mint: #def1e7;
  --cream: #f7f5ee;
  --paper: #fffefb;
  --line: #dfe5df;
  --amber: #f4b942;
  --danger: #a83e3e;
  --shadow: 0 16px 40px rgba(29, 61, 48, .08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247,245,238,.92); border-bottom: 1px solid rgba(47,109,79,.12); backdrop-filter: blur(16px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-size: 1.25rem; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 9px; border-radius: 11px; background: var(--forest); color: white; font-weight: 800; }
.brand strong { color: var(--forest); }
.main-nav { display: flex; align-items: center; gap: 20px; font-size: .92rem; }
.main-nav a, .link-button { border: 0; padding: 6px 0; background: none; color: var(--muted); text-decoration: none; cursor: pointer; }
.page { padding-block: 42px 100px; }
.hero { position: relative; overflow: hidden; min-height: 230px; display: flex; align-items: center; margin-bottom: 22px; padding: 44px; border-radius: 30px; color: white; background: linear-gradient(125deg, #173e2c, #3e8060); box-shadow: var(--shadow); }
.hero::after { content: "+"; position: absolute; right: 5%; top: -80px; color: rgba(255,255,255,.08); font-size: 22rem; font-weight: 800; line-height: 1; }
.hero > div { position: relative; z-index: 1; max-width: 650px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin-bottom: 14px; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.15; letter-spacing: -.025em; }
.hero p:last-child { max-width: 580px; margin-bottom: 0; color: rgba(255,255,255,.82); font-size: 1.08rem; }
.eyebrow, .step-label { margin-bottom: 7px; color: var(--forest); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero .eyebrow { color: #b8e6cc; }
.card { border: 1px solid rgba(47,109,79,.12); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.quick-create { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.3fr); gap: 28px; align-items: end; padding: 26px 28px; }
.quick-create h2 { margin: 0; }
.link-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.link-form .field-error { grid-column: 1 / -1; }
input, textarea, select { width: 100%; min-height: 48px; border: 1px solid #cfd8d1; border-radius: 12px; padding: 11px 13px; background: white; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(47,109,79,.12); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; accent-color: var(--forest); }
input[type="file"] { height: auto; padding: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--forest); color: white; }
.button.primary:hover { background: var(--forest-dark); }
.button.secondary { border-color: #b6d7c4; background: var(--mint); color: var(--forest-dark); }
.button.ghost { border-color: var(--line); background: white; color: var(--ink); }
.button.full { width: 100%; }
.danger-button { border-color: #e6c4c4; color: var(--danger); background: #fff8f8; }
.hint, .muted { color: var(--muted); }
.hint { margin: 8px 0 0; font-size: .82rem; }
.quick-create > .hint { grid-column: 2; margin-top: -20px; }
.section-heading, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 52px 0 18px; }
.page-heading { align-items: center; margin-top: 0; }
.section-heading h2, .page-heading h1 { margin-bottom: 0; }
.page-heading h1 { font-size: clamp(2rem, 4vw, 3rem); }
.integration-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pill, .status { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 6px 10px; background: #ecefe9; color: #69736d; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #a6ada9; }
.pill.ok { color: var(--forest-dark); background: var(--mint); }
.pill.ok::before { background: #3a9663; }
.pill.safe { color: #79560e; background: #fff0c7; }
.integration-link { text-decoration: none; }
.integration-link:hover { color: var(--forest-dark); background: var(--mint); }
.offer-list { display: grid; gap: 10px; }
.offer-row { display: grid; grid-template-columns: 66px 1fr auto; gap: 16px; align-items: center; min-width: 0; padding: 12px 16px 12px 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,254,251,.86); text-decoration: none; transition: border .15s, transform .15s; }
.offer-row:hover { border-color: #9fc3ae; transform: translateY(-1px); }
.offer-thumb { display: grid; place-items: center; width: 66px; height: 66px; overflow: hidden; border-radius: 13px; background: #edf3ee; color: var(--forest); font-size: 2rem; }
.offer-thumb img { width: 100%; height: 100%; object-fit: contain; background: white; }
.offer-summary { display: grid; min-width: 0; }
.offer-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-summary span { color: var(--muted); font-size: .84rem; }
.status-draft { color: #606b65; }
.status-scheduled { color: #6d510f; background: #fff0c7; }
.status-sent { color: #256445; background: var(--mint); }
.status-failed { color: #8b3434; background: #fae0e0; }
.status-canceled { color: #727272; background: #eee; }
.empty-state { padding: 56px 20px; border: 1px dashed #b9c8bd; border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-state span { font-size: 2rem; }
.editor-form { display: grid; gap: 18px; }
.editor-section { padding: clamp(22px, 4vw, 34px); }
.editor-section > :last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: 1 / -1; }
.field label, .upload-field > label, .channel-fieldset legend { display: block; margin-bottom: 6px; font-size: .87rem; font-weight: 750; }
.input-wrap { display: flex; align-items: center; border: 1px solid #cfd8d1; border-radius: 12px; background: white; }
.input-wrap:focus-within { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(47,109,79,.12); }
.input-wrap > span { padding-inline: 12px 0; color: var(--muted); white-space: nowrap; }
.input-wrap > span:last-child { padding: 0 12px 0 0; }
.input-wrap input, .input-wrap textarea, .input-wrap select { border: 0; box-shadow: none; }
.source-link { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.source-link a, .text-link { color: var(--forest-dark); font-weight: 750; }
.image-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.image-option { position: relative; display: grid; gap: 8px; justify-items: center; padding: 9px; border: 2px solid transparent; border-radius: 16px; background: #f4f6f2; cursor: pointer; }
.image-option.selected { border-color: var(--forest); background: var(--mint); }
.image-option input { position: absolute; top: 12px; left: 12px; z-index: 1; }
.image-option img { width: 100%; aspect-ratio: 1; border-radius: 10px; background: white; object-fit: contain; }
.image-option span { font-size: .8rem; font-weight: 750; }
.selected-upload img { max-width: 280px; max-height: 280px; border-radius: 14px; object-fit: contain; }
.upload-field { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.section-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.preview-box { margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.preview-box summary { color: var(--forest-dark); font-weight: 750; cursor: pointer; }
.preview-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.preview-tabs > div { min-width: 0; border-radius: 14px; padding: 16px; background: #f3f5f1; }
pre { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #31433b; font: .86rem/1.55 system-ui, sans-serif; }
.schedule-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr); gap: 24px; }
.channel-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.channel-fieldset legend { grid-column: 1 / -1; }
.check-card { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.check-card span { display: grid; }
.check-card small { color: var(--muted); }
.sticky-actions { position: sticky; bottom: 14px; z-index: 10; display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid rgba(47,109,79,.15); border-radius: 17px; background: rgba(255,254,251,.92); box-shadow: 0 15px 50px rgba(20,50,38,.15); backdrop-filter: blur(12px); }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message, .notice, .form-error { border-radius: 13px; padding: 12px 14px; background: #fff3cd; color: #684f0b; }
.message.success { background: var(--mint); color: var(--forest-dark); }
.message.error, .notice.danger, .form-error { background: #fae0e0; color: #842e2e; }
.field-error { margin-top: 5px; color: var(--danger); font-size: .82rem; }
.field-error ul, .form-error ul { margin: 0; padding-left: 18px; }
.login-wrap { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.login-card { width: min(440px, 100%); padding: clamp(26px, 6vw, 42px); }
.login-card h1 { font-size: 2rem; }
.form-stack { display: grid; gap: 11px; }
.form-stack .button { margin-top: 8px; }
.detail-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.product-card { overflow: hidden; }
.product-card > img { width: 100%; max-height: 420px; background: white; object-fit: contain; }
.product-card > div { padding: 24px; }
.product-card h2 { margin-bottom: 6px; }
.big-price { margin: 12px 0; color: var(--forest-dark); font-size: 1.6rem; font-weight: 800; }
.timeline { display: grid; gap: 10px; margin: 20px 0; }
.timeline-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: #f3f5f1; }
.timeline-item p, .timeline-item small { display: block; margin: 0; color: var(--muted); }
.channel-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--forest); color: white; font-weight: 800; }
.narrow { max-width: 760px; }
@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1120px); }
  .site-header { position: static; }
  .header-inner { align-items: flex-start; padding-block: 14px; }
  .main-nav { flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; font-size: .82rem; }
  .main-nav > a:first-child { display: none; }
  .page { padding-block: 22px 90px; }
  .hero { min-height: 210px; padding: 28px 22px; border-radius: 22px; }
  .hero::after { right: -20%; }
  .quick-create { grid-template-columns: 1fr; padding: 22px; gap: 18px; }
  .link-form { grid-template-columns: 1fr; }
  .quick-create > .hint { grid-column: 1; margin-top: -10px; }
  .section-heading, .page-heading { align-items: flex-start; margin-top: 34px; }
  .section-heading { flex-direction: column; }
  .integration-pills { justify-content: flex-start; }
  .offer-row { grid-template-columns: 58px minmax(0, 1fr); padding: 10px; }
  .offer-thumb { width: 58px; height: 58px; }
  .offer-row > .status { grid-column: 2; }
  .form-grid, .schedule-grid, .preview-tabs, .detail-layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section-action { align-items: flex-start; flex-direction: column; }
  .section-action .button { width: 100%; }
  .channel-fieldset { grid-template-columns: 1fr; }
  .image-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-actions { display: grid; grid-template-columns: .8fr 1.2fr; bottom: 8px; }
  .sticky-actions .button { min-height: 54px; padding-inline: 10px; font-size: .89rem; }
}
@media (max-width: 390px) {
  .image-picker { grid-template-columns: 1fr; }
}
