:root {
  color: #1a2a23;
  background: #f6f8f5;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  --muted: #526158;
  --line: #dce5dc;
  --accent: #174936;
  --soft: #e7f0e6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.2rem; }
button, input, select { font: inherit; }
button, select, input:not([type=checkbox]) { min-height: 42px; border-radius: 8px; }
button { cursor: pointer; border: 1px solid var(--accent); padding: .53rem .95rem; background: var(--accent); color: white; font-weight: 650; }
button:hover { background: #245d48; }
button:disabled { opacity: .52; cursor: default; }
button.secondary { background: white; color: var(--accent); }
button.secondary:hover { background: var(--soft); }
a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid #65a789; outline-offset: 3px; }
input:not([type=checkbox]), select { border: 1px solid #adbfb2; background: white; color: inherit; padding: .45rem .65rem; }
select { max-width: 100%; }
input[type=checkbox] { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
[hidden] { display: none !important; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1180px; margin: auto; padding: .88rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: #1a2a23; text-decoration: none; font-size: 1.12rem; font-weight: 750; white-space: nowrap; }
.mark { display: grid; place-items: center; background: var(--accent); color: #e5fba5; width: 2.25rem; height: 2.25rem; border-radius: 9px; font-size: 1.5rem; }
nav { display: flex; flex-wrap: wrap; gap: .3rem; }
nav a { color: var(--muted); padding: .4rem .7rem; border-radius: 7px; text-decoration: none; font-weight: 620; white-space: nowrap; }
nav a[aria-current=page] { color: var(--accent); background: var(--soft); }
main { max-width: 1180px; margin: auto; padding: 2.2rem 1.5rem 4rem; }
.hero { padding: 1.2rem 0 1.7rem; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem; }
.hero-action { display: flex; align-items: center; flex-wrap: wrap; gap: .9rem; }
.hero-action label { display: flex; align-items: center; gap: .45rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-weight: 720; font-size: .83rem; margin-bottom: .65rem; }
.description { color: var(--muted); font-size: 1.08rem; margin-top: .65rem; }
.mode, .badge { display: inline-block; background: var(--soft); color: var(--accent); border-radius: 8px; padding: .16rem .55rem; font-weight: 650; font-size: .83rem; }
.mode { padding: .45rem .7rem; }
.notice { padding: .62rem .9rem; border: 1px solid #dbe9c9; background: #edf5e3; border-radius: 8px; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stats div, .panel, .campaign, .product-card, .product-detail { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stats div { display: grid; padding: .9rem 1.2rem; }
.stats div span, .muted, .section-head span, .campaign-action span { color: var(--muted); }
.stats strong { font-size: 2rem; line-height: 1.25; }
.desk-grid { display: grid; gap: 1rem; grid-template-columns: 1.65fr 1fr; }
.panel { padding: 1.2rem; }
.panel > h2 { margin-bottom: .8rem; }
.accounts { margin-top: 1rem; }
.account-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; }
.account-row p { margin-top: .3rem; }
.connection-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: .4rem .7rem; list-style: none; padding: 0; margin: 0; }
.readiness { margin: .5rem 0 .65rem; }
.panel label { display: block; font-weight: 620; }
.panel .check { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 .35rem; }
.buttons, .inline { display: flex; flex-wrap: wrap; gap: .55rem; }
.inline { margin-top: .35rem; }
.inline input { flex: 1; min-width: 10rem; }
#add-link { margin-top: .75rem; }
#schedule { margin-top: .35rem; }
.list { margin-top: 1.8rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin: 0 0 .75rem; }
.section-head select { margin-left: .4rem; }
#status:empty { display: none; }
#status { color: var(--accent); margin-bottom: .55rem; }
.campaign { display: grid; grid-template-columns: 8.3rem 1fr auto; gap: 1rem; padding: .85rem; margin-bottom: .7rem; }
.preview, .placeholder { width: 100%; aspect-ratio: 1; display: block; border-radius: 8px; object-fit: cover; background: #dbebde; }
.placeholder { display: grid; place-items: center; color: var(--muted); font-size: .85rem; text-align: center; }
.campaign-info h3 { margin-top: .38rem; }
.campaign-info .muted { margin-top: .22rem; }
.subline { display: flex; gap: .6rem; align-items: center; color: var(--muted); }
.deliveries { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .85rem; padding: 0; margin: .55rem 0; }
.deliveries li { display: flex; align-items: center; flex-wrap: wrap; gap: .32rem; font-size: .88rem; }
.deliveries li p, .error { color: #8c2f1c; font-size: .87rem; }
.campaign details { margin-top: .45rem; }
.campaign summary { cursor: pointer; color: var(--accent); font-weight: 650; font-size: .89rem; }
.draft { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .5rem; }
.badge.failed, .badge.blocked, .badge.check { background: #f9e9e2; color: #8c2f1c; }
.badge.pending, .badge.retry, .badge.preparing { background: #f4edda; color: #6a4a14; }
.campaign-action { min-width: 7rem; display: grid; align-content: start; gap: .1rem; }
.campaign-action strong { line-height: 1.1; font-size: 1.3rem; }
.campaign-action span { font-size: .84rem; margin-bottom: .35rem; }
.minor, button.minor { min-height: 0; display: inline-block; color: var(--accent); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .18em; font-weight: 650; padding: 0; font-size: .89rem; }
.empty { background: white; border: 1px dashed #c2d1c4; border-radius: 10px; padding: 1.15rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,15rem),1fr)); gap: 1rem; }
.product-card { display: block; color: inherit; text-decoration: none; overflow: hidden; min-width: 0; }
.product-card:hover { border-color: #75978a; }
.product-card .preview { aspect-ratio: 4 / 3; border-radius: 0; }
.product-card > div { padding: .95rem; }
.product-card h3 { margin: .35rem 0 .55rem; }
.product-meta { color: var(--accent); font-size: .9rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; align-items: start; padding: 1.3rem; }
.product-detail h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.product-detail h2 { margin: 1.25rem 0 .4rem; }
.offers { display: grid; gap: .6rem; margin: .8rem 0; }
.offers form { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem; background: var(--soft); padding: .65rem; border-radius: 8px; }
.buy { display: inline-block; border-radius: 8px; padding: .53rem .85rem; background: var(--accent); color: #fff; font-weight: 650; text-decoration: none; }
.buy:hover { background: #245d48; }
@media (max-width: 680px) {
  .top-inner, main { padding-left: .85rem; padding-right: .85rem; }
  nav a { font-size: .88rem; padding: .35rem .42rem; }
  .desk-grid, .product-detail { grid-template-columns: 1fr; }
  .stats { gap: .35rem; }
  .stats div { padding: .55rem; }
  .stats div span { font-size: .79rem; }
  .campaign { grid-template-columns: 4.3rem 1fr; gap: .55rem; }
  .campaign-action { grid-column: span 2; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
  .campaign-action span { margin: 0 .25rem 0 0; }
}
