:root {
  --ink: #162016;
  --muted: #667267;
  --line: #dfe8df;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --green: #123f23;
  --green-deep: #0d2d1a;
  --green-mid: #1d6537;
  --green-soft: #e7f2e8;
  --red: #b72f2a;
  --red-soft: #fbe8e6;
  --yellow: #f4b72a;
  --yellow-soft: #ffd86a;
  --shadow: 0 24px 70px rgba(13, 45, 26, 0.16);
  --radius: 8px;
  font-family: "Inter", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(29, 101, 55, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 101, 55, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar,
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar {
  background: rgba(251, 252, 248, 0.94);
}

.admin-locked .protected-shell,
.admin-unlocked .login-screen {
  display: none;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-box {
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.login-logo-lockup img {
  width: min(220px, 58%);
  height: auto;
  max-height: 118px;
  object-fit: contain;
}

.login-logo-lockup img:last-child {
  width: min(142px, 38%);
  max-height: 106px;
}

.login-box h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.95;
  letter-spacing: 0;
}

.login-box p {
  margin: 10px 0 0;
  color: var(--muted);
}

.login-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
}

.login-button {
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.brand-logo-lockup img {
  width: 168px;
  max-height: 66px;
  height: auto;
  object-fit: contain;
}

.brand-logo-lockup img:last-child {
  width: 134px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  border: 3px solid var(--yellow);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(13, 45, 26, 0.22);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: clamp(16px, 2vw, 20px);
}

.brand small,
.eyebrow,
.toolbar p,
.field span,
.weekday-field legend,
.offer-meta span,
.empty-state p {
  color: var(--muted);
}

.brand small {
  margin-top: 4px;
  font-size: 12px;
}

.topbar-actions,
.toolbar-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.primary-button,
.secondary-button,
.text-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(61, 43, 23, 0.08);
}

.icon-button:hover,
.secondary-button:hover,
.text-button:hover {
  border-color: var(--green);
}

.file-action {
  position: relative;
  overflow: hidden;
}

.file-action input,
.image-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.status-strip > div {
  min-height: 74px;
  padding: 14px 16px;
  background: var(--surface);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-strip strong {
  font-size: clamp(17px, 2vw, 22px);
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 16px;
}

.toolbar h1,
.public-hero h1,
.empty-state h2 {
  margin: 0;
  letter-spacing: 0;
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 900;
}

.toolbar h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.96;
}

.toolbar p {
  margin: 10px 0 0;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-top: 26px;
  border-bottom: 2px solid var(--line);
}

.admin-tab {
  min-height: 43px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.admin-tab:hover,
.admin-tab.is-active {
  color: var(--green);
  background: var(--green-soft);
}

.admin-tab.is-active {
  border-bottom-color: var(--green);
}

.admin-tab:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

#promotionsPanel[hidden],
#linksPanel[hidden] {
  display: none;
}

.links-panel {
  margin: 20px 0 32px;
  padding: clamp(16px, 2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(61, 43, 23, 0.1);
}

.links-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.links-panel-head h2 {
  margin: 0;
  font-family: "Outfit", "Inter", sans-serif;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
}

.links-panel-head p {
  margin: 9px 0 0;
  color: var(--muted);
}

.links-grid-head,
.link-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(0, 2fr));
  align-items: center;
  gap: 14px;
}

.links-grid-head {
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.links-grid {
  display: grid;
  gap: 8px;
}

.link-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.link-page,
.link-field {
  min-width: 0;
}

.link-page strong,
.link-page small {
  display: block;
}

.link-page strong {
  color: var(--green);
  font-weight: 900;
}

.link-page small {
  margin-top: 3px;
  color: var(--muted);
}

.link-field span {
  display: none;
}

.link-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.link-field input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(19, 107, 67, 0.16);
}

.link-field input:invalid {
  border-color: var(--red);
}

#unitSelector {
  width: min(330px, 100%);
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.text-button {
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 12px 24px rgba(189, 37, 31, 0.22);
}

.primary-button:hover {
  filter: brightness(0.95);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 10px;
}

.promo-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto 1fr;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(61, 43, 23, 0.1);
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.promo-card.is-reordering {
  z-index: 5;
  opacity: 0.72;
  border-color: var(--yellow);
  box-shadow: 0 22px 52px rgba(61, 43, 23, 0.22);
  transform: scale(0.985);
}

.card-head {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  padding-right: 34px;
}

.card-order {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.drag-handle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green);
  background: #fffdf8;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  outline: none;
}

.drag-handle:active,
.promo-card.is-reordering .drag-handle {
  cursor: grabbing;
}

.promo-grid.is-saving-order .drag-handle {
  cursor: wait;
  opacity: 0.55;
}

.drag-handle span {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -7px;
  line-height: 1;
  transform: rotate(90deg) translateY(3px);
}

.order-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.slot-kicker {
  display: block;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2ebe3;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.delete-slot {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.delete-slot:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.state-pill.is-active {
  color: var(--green);
  background: var(--green-soft);
}

.state-pill.is-problem {
  color: var(--red);
  background: var(--red-soft);
}

.image-drop {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 300px;
  overflow: hidden;
  border: 2px dashed #cfc2b5;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(-45deg, rgba(245, 191, 34, 0.18) 0 10px, transparent 10px 20px),
    #fff8e9;
}

.image-button {
  display: grid;
  place-items: center;
  gap: 8px;
  width: calc(100% - 28px);
  min-height: 120px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  pointer-events: none;
}

.image-button span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 30px;
  line-height: 1;
}

.image-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.image-preview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-preview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06130a;
}

.image-drop.has-media {
  border-style: solid;
  background: #eee0ce;
}

.image-drop.has-media .image-button {
  display: none;
}

.image-drop.has-image .image-preview {
  display: block;
}

.image-drop.has-video .video-preview {
  display: block;
}

.media-type-badge,
.media-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(13, 45, 26, 0.88);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 7px;
}

.unit-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.unit-field legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.general-unit {
  grid-column: 1 / -1;
  min-height: 30px !important;
  color: var(--green);
  background: #fff9e8 !important;
}

.general-unit small {
  display: inline !important;
  margin-left: 5px;
}

.general-unit:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft) !important;
}

.unit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.unit-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}

.unit-options label:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}

.unit-options input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.unit-options span {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.unit-options small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

body[data-selected-unit]:not([data-selected-unit="geral"]) .unit-options label:not(.general-unit) {
  display: none;
}

.field span,
.weekday-field legend {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--ink);
}

.field input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(19, 107, 67, 0.16);
}

.date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.date-row .field,
.date-row input {
  min-width: 0;
}

.weekday-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.weekday-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.weekday-toggle {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.weekday-toggle.is-selected {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.card-actions {
  align-self: end;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.text-button {
  min-height: 36px;
  padding: 0 8px;
  font-size: 12px;
  background: transparent;
}

.text-button.danger {
  color: var(--red);
}

.public-page {
  min-height: 100vh;
}

.public-header {
  position: relative;
  padding-block: 7px;
  background: rgba(13, 45, 26, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.public-header .brand strong {
  color: #fff;
}

body[data-selected-unit^="nsa-"] .public-brand .brand-logo-lockup img:last-child,
body[data-selected-unit^="bv-"] .public-brand .brand-logo-lockup img:first-child {
  display: none;
}

.public-header .brand small,
.public-header .eyebrow,
.public-header .public-date strong {
  color: rgba(255, 255, 255, 0.78);
}

.public-header .eyebrow {
  color: var(--yellow-soft);
}

.public-date {
  text-align: right;
}

.public-hero {
  display: grid;
  align-items: end;
  min-height: auto;
  padding: clamp(22px, 3vw, 40px) clamp(16px, 5vw, 70px) 26px;
  color: #fff;
  background:
    linear-gradient(125deg, rgba(13, 45, 26, 0.96), rgba(29, 101, 55, 0.86)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 12px, transparent 12px 26px);
  border-bottom: 8px solid var(--yellow);
}

.public-hero h1 {
  max-width: none;
  font-size: clamp(32px, 3.3vw, 62px);
  line-height: 0.98;
  white-space: nowrap;
}

.hero-day-title {
  display: flex;
  align-items: baseline;
  gap: clamp(28px, 5.4vw, 92px);
}

.hero-date-line {
  display: flex;
  align-items: baseline;
  gap: clamp(26px, 4.4vw, 78px);
}

.hero-title-label,
.hero-date-line span {
  display: inline-block;
}

.public-hero .eyebrow {
  color: var(--yellow-soft);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
  gap: clamp(14px, 3vw, 26px);
  width: min(1240px, calc(100% - 32px));
  margin: 22px auto 80px;
  position: relative;
  z-index: 2;
}

.offer-card {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(13, 45, 26, 0.18);
}

.offer-card:focus-visible {
  outline: 3px solid rgba(244, 183, 42, 0.72);
  outline-offset: 4px;
}

.offer-image-stage {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: #fff;
}

.offer-image-bg {
  display: none;
}

.offer-image-stage::after {
  display: none;
}

.offer-image-main {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  object-fit: contain;
  filter: none;
}

.offer-video-main {
  display: block;
  width: 100%;
  height: auto;
  background: #06130a;
  object-fit: contain;
}

.offer-image-bg[hidden],
.offer-image-main[hidden],
.offer-video-main[hidden],
.viewer-image[hidden],
.viewer-video[hidden],
.media-type-badge[hidden],
.media-badge[hidden] {
  display: none;
}

.offer-card.has-video {
  cursor: pointer;
}

.offer-card.has-video .offer-image-stage {
  background: #06130a;
}

.offer-video-main {
  cursor: default;
}

.offer-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 78px;
  padding: 14px 14px 13px;
  border-top: 5px solid var(--yellow);
}

.offer-meta > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.offer-period {
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 900;
  text-transform: uppercase;
}

.offer-days {
  display: block;
  color: var(--green-mid);
  font-size: clamp(13px, 0.95vw, 15px);
  font-weight: 900;
  line-height: 1.25;
}

.offer-meta strong {
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.08;
  text-align: right;
  max-width: 52%;
}

.offer-meta strong[hidden] {
  display: none;
}

.offer-store-scope {
  display: grid;
  gap: 3px;
  margin: 0 14px 12px;
  padding: 10px 12px;
  border-left: 5px solid var(--yellow);
  border-radius: 6px;
  color: #fff;
  background: var(--green-deep);
}

.offer-store-scope[hidden] {
  display: none;
}

.offer-store-scope > span {
  color: var(--yellow-soft);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.offer-store-list {
  font-size: 14px;
  line-height: 1.3;
}

.offer-actions {
  display: grid;
  gap: 8px;
  margin: 0 14px 14px;
}

.offer-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    #16843a;
  box-shadow: 0 12px 24px rgba(13, 45, 26, 0.18);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.offer-whatsapp.is-group {
  color: var(--green-deep);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 46%),
    var(--yellow);
  box-shadow: 0 12px 24px rgba(244, 183, 42, 0.22);
}

.offer-whatsapp:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    #0f7230;
  box-shadow: 0 16px 28px rgba(13, 45, 26, 0.22);
}

.offer-whatsapp.is-group:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 46%),
    var(--yellow-soft);
  box-shadow: 0 16px 28px rgba(244, 183, 42, 0.28);
}

.offer-whatsapp:focus-visible {
  outline: 3px solid rgba(244, 183, 42, 0.7);
  outline-offset: 3px;
}

.offer-whatsapp span {
  min-width: 0;
  text-align: center;
  line-height: 1.12;
}

.offer-whatsapp svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.empty-state {
  width: min(620px, calc(100% - 32px));
  margin: 54px auto;
  padding: 42px 20px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 40px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow);
  font-weight: 800;
  animation: lift 260ms ease-out;
}

.toast.is-error {
  background: var(--red);
}

body.viewer-open {
  overflow: hidden;
}

.promo-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
}

.promo-viewer.is-open {
  display: grid;
}

.promo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(244, 183, 42, 0.22), transparent 32%),
    rgba(5, 20, 12, 0.84);
  backdrop-filter: blur(5px);
}

.promo-viewer-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(1040px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  border: 2px solid rgba(244, 183, 42, 0.78);
  border-radius: 14px;
  background: #fffdf7;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  animation: lift 220ms ease-out;
}

.viewer-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background:
    linear-gradient(45deg, rgba(18, 63, 35, 0.06) 25%, transparent 25% 50%, rgba(18, 63, 35, 0.06) 50% 75%, transparent 75%),
    #fff;
  background-size: 24px 24px;
}

.viewer-image {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 104px);
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    width 320ms cubic-bezier(0.2, 0.72, 0.18, 1),
    max-height 320ms cubic-bezier(0.2, 0.72, 0.18, 1),
    transform 320ms cubic-bezier(0.2, 0.72, 0.18, 1);
}

.viewer-video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(88vh - 104px);
  background: #06130a;
}

.promo-viewer.is-video .viewer-image-wrap {
  place-items: center;
  background: #06130a;
  touch-action: pan-y;
}

.promo-viewer.is-zoomed .viewer-image-wrap {
  place-items: start center;
  cursor: grab;
  touch-action: none;
}

.promo-viewer.is-zoomed .viewer-image-wrap.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.promo-viewer.is-zoomed .viewer-image {
  width: min(1240px, 125vw);
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  transform: translateZ(0);
}

.viewer-close,
.viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.viewer-close {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.viewer-nav {
  top: 50%;
  width: 46px;
  height: 58px;
  border: 2px solid rgba(244, 183, 42, 0.82);
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 12px;
  border-radius: 999px 8px 8px 999px;
}

.viewer-next {
  right: 12px;
  border-radius: 8px 999px 999px 8px;
}

.viewer-nav[hidden] {
  display: none;
}

.viewer-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-top: 5px solid var(--yellow);
  background: #fff;
}

.viewer-footer > div {
  display: grid;
  gap: 4px;
}

.viewer-dots {
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(13, 45, 26, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.viewer-dots[hidden] {
  display: none;
}

.viewer-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transition: width 180ms ease, background 180ms ease, transform 180ms ease;
}

.viewer-dot.is-active {
  width: 34px;
  height: 9px;
  background: var(--yellow);
  box-shadow: inset 0 0 0 2px #0b2717;
}

.viewer-counter,
.viewer-hint {
  justify-self: end;
  color: var(--green-mid);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.viewer-counter {
  line-height: 1.25;
}

.viewer-footer strong {
  color: var(--green-deep);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
}

.viewer-footer small {
  color: var(--green-mid);
  font-size: 14px;
  font-weight: 900;
}

.active-seal {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: min(330px, calc(100vw - 36px));
  padding: 12px 14px 12px 18px;
  border: 2px solid var(--yellow);
  border-radius: 999px;
  color: var(--green-deep);
  background: linear-gradient(135deg, #fff8dd, #ffffff);
  box-shadow:
    0 18px 44px rgba(13, 45, 26, 0.18),
    0 0 0 7px rgba(244, 183, 42, 0.16);
  text-transform: uppercase;
}

.active-seal span {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0.035em;
}

.active-seal strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 21px;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

@media (min-width: 761px) {
  .public-hero {
    min-height: 174px;
    padding: 38px 28px 46px;
  }

  .public-hero h1 {
    font-size: clamp(32px, 2.8vw, 48px);
  }

  .public-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 520px));
    justify-content: center;
    width: min(1180px, calc(100% - 56px));
    margin-top: 24px;
  }

  .offer-image-stage {
    display: grid;
    place-items: center;
  }

  .offer-image-main,
  .offer-video-main {
    width: auto;
    max-width: 100%;
    max-height: min(62vh, 560px);
  }
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .links-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .links-grid-head {
    display: none;
  }

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

  .link-field span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .topbar,
  .public-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions > * {
    flex: 1;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .public-header {
    gap: 10px;
    padding: 7px 14px;
  }

  .brand-logo-lockup img {
    width: 116px;
    max-height: 48px;
  }

  .brand-logo-lockup img:last-child {
    width: 92px;
  }

  .public-brand {
    align-items: center;
  }

  .public-brand > span:last-child {
    display: none;
  }

  .public-date {
    text-align: left;
    display: none;
  }

  .public-hero {
    min-height: auto;
    padding: 18px 16px 28px;
  }

  .public-hero h1 {
    max-width: 100%;
    font-size: clamp(25px, 7.2vw, 34px);
    line-height: 1.03;
    white-space: normal;
  }

  .hero-day-title {
    display: block;
  }

  .hero-title-label {
    display: block;
  }

  .hero-date-line {
    display: flex;
    gap: clamp(18px, 9vw, 42px);
    margin-top: 6px;
    white-space: nowrap;
  }

  .public-grid {
    width: min(100% - 20px, 460px);
    margin-top: 16px;
    margin-bottom: 92px;
    gap: 14px;
  }

  .offer-image-main {
    padding: 0;
  }

  .promo-viewer {
    padding: 10px;
  }

  .promo-viewer-panel {
    width: 100%;
    max-height: 90vh;
    border-radius: 10px;
  }

  .viewer-image,
  .viewer-video {
    max-height: calc(90vh - 132px);
  }

  .promo-viewer.is-zoomed .viewer-image {
    width: 145vw;
  }

  .viewer-nav {
    display: none;
  }

  .viewer-prev {
    left: 7px;
  }

  .viewer-next {
    right: 7px;
  }

  .viewer-footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .viewer-hint {
    justify-self: start;
  }

  .viewer-footer strong {
    font-size: 20px;
  }

  .active-seal {
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-width: 0;
    padding: 10px 12px 10px 15px;
  }

  .active-seal span {
    font-size: 12px;
  }

  .active-seal strong {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) and (max-width: 1439px) {
  .promo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
