@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --bg-accent: #fef8e7;
  --surface: #ffffff;
  --surface-muted: #f4efe7;
  --ink: #1f2024;
  --ink-soft: #5a5f68;
  --brand: #d14b36;
  --brand-2: #f2b366;
  --line: #e7dccb;
  --shadow: 0 24px 60px rgba(31, 32, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(
    circle at top,
    #fff8e6 0%,
    var(--bg) 45%,
    #efe6d9 100%
  );
  color: var(--ink);

  /* Styling for Body layout */
  max-height: 100dvh;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

/* ── Login screen ── */

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px 48px;
  overflow: hidden;
  background: #f3efe8;
}

.login-screen__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-screen__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.login-screen__orb--red {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: #e85a45;
}

.login-screen__orb--green {
  width: 380px;
  height: 380px;
  bottom: -100px;
  left: -60px;
  background: #3d8f5a;
}

.login-screen__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 32, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 32, 36, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.login-screen__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px 36px 32px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease both;
}

.login-screen__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  text-align: center;
}

.login-screen__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 16px 20px;
  overflow: hidden;
}

.login-screen__logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 220px;
  max-height: 120px;
  object-fit: contain;
  background: #ffffff;
}

.is-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-screen__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.login-screen__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.login-screen__subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.login-screen__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field__input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(209, 75, 54, 0.15);
  background: var(--surface);
}

.field__password {
  position: relative;
}

.field__password .field__input {
  padding-right: 72px;
}

.field__toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.field__toggle:hover {
  color: var(--brand);
  background: rgba(209, 75, 54, 0.08);
}

.login-screen__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  border: 1px solid #f5c2bc;
  color: #b42318;
  font-size: 13px;
}

.login-screen__submit {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--brand) 0%,
    #e86b3a 55%,
    var(--brand-2) 100%
  );
  box-shadow: 0 12px 28px rgba(209, 75, 54, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.login-screen__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(209, 75, 54, 0.4);
}

.login-screen__submit:active {
  transform: translateY(0);
}

.login-screen__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-screen__hint {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.login-screen__footer {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  padding: 32px 24px;
  background: linear-gradient(160deg, #1f2024 0%, #2c2f36 55%, #1f2024 100%);
  color: #f7f4ef;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 5;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f07c5a, #f4c27b);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #1f2024;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-switcher-wrap {
  width: 100%;
  max-width: 196px;
}

.brand-switcher {
  display: none;
}

.brand-switcher-wrap .choices {
  margin-bottom: 0;
  font-size: 13px;
}

.brand-switcher-wrap .choices .choices__inner {
  min-height: auto;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.brand-switcher-wrap .choices .choices__inner:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.brand-switcher-wrap .choices.is-open .choices__inner {
  border-color: rgba(242, 179, 102, 0.55);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.brand-switcher-wrap .choices .choices__list--single {
  padding: 0 22px 0 0;
}

.brand-switcher-wrap .choices .choices__list--single .choices__item {
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-switcher-wrap .choices .choices__list--dropdown,
.brand-switcher-wrap .choices .choices__list[aria-expanded] {
  background: #2a2d33;
  border: 1px solid rgba(242, 179, 102, 0.35);
  border-top: none;
  border-radius: 0 0 12px 12px;
  margin-top: 0;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  z-index: 30;
}

.brand-switcher-wrap .choices .choices__list--dropdown .choices__item,
.brand-switcher-wrap .choices .choices__list[aria-expanded] .choices__item {
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.brand-switcher-wrap
  .choices
  .choices__list--dropdown
  .choices__item--selectable.is-highlighted,
.brand-switcher-wrap
  .choices
  .choices__list[aria-expanded]
  .choices__item--selectable.is-highlighted {
  background: rgba(209, 75, 54, 0.32);
  color: #fff;
}

.brand-switcher-wrap
  .choices
  .choices__list--dropdown
  .choices__item--selectable.is-selected,
.brand-switcher-wrap
  .choices
  .choices__list[aria-expanded]
  .choices__item--selectable.is-selected {
  background: rgba(242, 179, 102, 0.18);
  color: #fff;
  font-weight: 600;
}

.brand-switcher-wrap .choices[data-type*="select-one"]::after {
  border-color: rgba(255, 255, 255, 0.75) transparent transparent;
  right: 13px;
  margin-top: -2px;
}

.brand-switcher-wrap .choices.is-open[data-type*="select-one"]::after {
  border-color: transparent transparent rgba(255, 255, 255, 0.75);
  margin-top: -8px;
}

.brand-switcher-wrap .choices.is-focused .choices__inner,
.brand-switcher-wrap .choices.is-open .choices__inner {
  box-shadow: 0 0 0 3px rgba(242, 179, 102, 0.22);
}

.brand-switcher-wrap .choices .choices__placeholder {
  color: rgba(255, 255, 255, 0.65);
  opacity: 1;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.nav button {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f4ef;
  padding: 10px 14px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.nav button.active {
  background: rgba(242, 179, 102, 0.25);
  color: #fff5e6;
  transform: translateX(4px);
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.content {
  padding: 40px 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
  overflow: hidden;
}

.topbar,
.summary,
.toast {
  flex-shrink: 0;
}

.workspace-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
}

.formats-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.formats-tabs__btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.formats-tabs__btn:hover {
  border-color: rgba(209, 75, 54, 0.35);
  color: var(--ink);
}

.formats-tabs__btn.active {
  border-color: rgba(209, 75, 54, 0.45);
  color: var(--brand);
  box-shadow: 0 8px 24px rgba(209, 75, 54, 0.12);
}

.workspace--catalog {
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.workspace--catalog > .panel {
  min-height: 0;
  overflow: hidden;
}

.catalog-form {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.catalog-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.catalog-preview__card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 220, 203, 0.9);
  border-radius: 28px;
  padding: 22px;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(180, 220, 170, 0.35) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(242, 179, 102, 0.28) 0%,
      transparent 45%
    ),
    linear-gradient(145deg, #f8f1e6 0%, #f3f7f0 48%, #f7f2ea 100%);
  box-shadow: 0 18px 48px rgba(31, 32, 36, 0.08);
}

.catalog-preview__card::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(209, 75, 54, 0.08);
  filter: blur(40px);
  pointer-events: none;
}

.catalog-preview__top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.catalog-preview__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.catalog-preview__badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 20px rgba(31, 32, 36, 0.06);
}

.catalog-preview__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: stretch;
}

.catalog-preview__feature {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(31, 32, 36, 0.05);
}

.catalog-preview__feature h4 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}

.catalog-preview__feature p,
.catalog-preview__highlight p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.catalog-preview__highlights {
  display: grid;
  gap: 12px;
}

.catalog-preview__highlight {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px rgba(31, 32, 36, 0.05);
}

.catalog-preview__highlight strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--ink);
}

.catalog-preview__cta {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.catalog-preview__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(31, 32, 36, 0.08);
}

.catalog-preview__cta-btn::after {
  content: "→";
  font-size: 16px;
  line-height: 1;
}

.catalog-preview__cta-meta {
  display: none;
}

.catalog-preview__hidden-badge {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}

.catalog-preview__card.is-hidden-preview {
  opacity: 0.72;
}

@media (max-width: 1100px) {
  .workspace--catalog {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .catalog-preview__grid {
    grid-template-columns: 1fr;
  }
}

.workspace-shell > .workspace {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

h1 {
  margin: 0 0 6px 0;
  font-size: 32px;
}

.topbar p {
  margin: 0;
  color: var(--ink-soft);
}

.topbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.topbar-user__label {
  font-size: 12px;
  color: var(--ink-soft);
}

.topbar-user__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.primary {
  background: linear-gradient(135deg, var(--brand), #f08147);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--surface);
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.summary-label {
  color: var(--ink-soft);
  font-size: 13px;
}

.summary-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 6px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 20px;
  align-content: stretch;
}

.workspace--table {
  grid-template-columns: 1fr;
}

.panel {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.workspace > .panel,
.workspace--table > .panel--full,
.workspace--singleton > .panel--full,
.workspace--section-headings {
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
}

.workspace--section-headings > .panel {
  height: 100%;
  max-height: 100%;
}

.panel--full {
  min-height: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-header--split {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.panel-header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.panel-header__row h2 {
  margin: 0;
  min-width: 0;
}

.panel-header--split .panel-actions {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  animation: fadeUp 0.4s ease both;
}

.list-item.active {
  border-color: var(--brand-2);
  background: #fff3dc;
}

.list-item__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  color: inherit;
}

.list-item__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.list-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-item__title {
  display: block;
  font-weight: 600;
}

.list-item__meta {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.list-item__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.crud-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.field__textarea {
  resize: vertical;
  min-height: 88px;
}

.field__textarea--mono {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
}

.image-field {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 0;
}

.image-field legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 4px;
}

.image-field__preview {
  min-height: 120px;
  border-radius: 12px;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.image-field__preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.image-field__preview--logo {
  min-height: 140px;
  background: #fff;
}

.image-field__preview--logo img {
  max-height: 120px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.image-field__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.image-field__sizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.file-upload {
  display: inline-flex;
}

.file-upload__btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  white-space: nowrap;
}

.file-upload__btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.ghost--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.ghost--danger {
  color: #b42318;
  border-color: #f5c2bc;
}

.ghost--danger:hover {
  background: #fdecea;
}

.danger {
  border: none;
  background: #b42318;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.empty-state,
.empty-cell {
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
  padding: 24px 12px;
}

.table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.section-preview,
.chrome-preview {
  flex-shrink: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.data-table tbody tr:hover {
  background: #fff8ee;
}

.data-table a {
  color: var(--brand);
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

.status-select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
  cursor: pointer;
}

.status-select[value="sent"],
.status-select option[value="sent"] {
  color: #1a7f4b;
}

.toast {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.toast--success {
  background: #e8f7ee;
  border: 1px solid #b7e4c7;
  color: #1a7f4b;
}

.toast--error {
  background: #fdecea;
  border: 1px solid #f5c2bc;
  color: #b42318;
}

.toast--info {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  color: #3538cd;
}

.modal {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(31, 32, 36, 0.45);
}

.modal__content {
  padding: 24px;
}

.modal__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal__text {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .login-screen__panel {
    padding: 32px 24px 28px;
  }

  .login-screen__logo-img {
    max-width: 180px;
    max-height: 100px;
  }

  .app {
    grid-template-columns: 1fr;
    height: 100dvh;
  }

  .sidebar {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    height: auto;
    flex-shrink: 0;
  }

  .nav {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .content {
    padding: 24px 24px 20px;
    min-height: 0;
  }

  .workspace-shell {
    min-height: 0;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-user {
    align-items: flex-start;
    width: 100%;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .list-item__actions {
    justify-content: flex-end;
  }
}

/* ── Site chrome admin ── */

.workspace--singleton .panel--full {
  grid-column: 1 / -1;
}

.nested-field {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px;
}

.nested-field legend {
  font-weight: 600;
  padding: 0 6px;
}

.field-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.field--checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 120px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.nav-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.nav-editor__item {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  cursor: grab;
}

.nav-editor__item.is-dragging {
  opacity: 0.5;
}

.nav-editor__handle {
  font-size: 18px;
  color: var(--ink-soft);
  padding-bottom: 10px;
}

.nav-editor__toggle {
  align-self: end;
  padding: 8px 12px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.nav-editor__toggle .toggle-field__text strong {
  font-size: 13px;
  font-weight: 600;
}

.toggle-field--compact {
  gap: 10px;
}

.tag-input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff3dc;
  border: 1px solid #f0d7a5;
  font-size: 13px;
}

.tag-chip button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-soft);
}

.tag-input__row {
  display: flex;
  gap: 10px;
}

.panel-header__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.panel-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.section-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.section-card:hover {
  border-color: var(--brand-2);
  transform: translateY(-1px);
}

.section-card.active {
  border-color: var(--brand);
  background: #fff3dc;
  box-shadow: 0 8px 24px rgba(209, 75, 54, 0.08);
}

.section-card--empty {
  border-style: dashed;
  background: #fff;
}

.section-card--hidden {
  opacity: 0.82;
}

.section-card__index {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.section-card.active .section-card__index {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.section-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.section-card__label {
  font-size: 14px;
  font-weight: 600;
}

.section-card__meta {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: "Consolas", "Courier New", monospace;
}

.section-card__title {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

.section-card__status {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.section-card__status--on {
  background: #e8f5e9;
  color: #2e7d32;
}

.section-card__status--off {
  background: #fdecea;
  color: #b42318;
}

.section-card__status--empty {
  background: #eef2ff;
  color: #3f51b5;
}

.section-editor__empty {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}

.section-editor__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

.section-form {
  flex: 0 1 auto;
  max-height: 55%;
  min-height: 0;
}

.section-form__group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
}

.section-form__group-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.field__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.field__counter {
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.field__counter.is-limit {
  color: var(--brand);
  font-weight: 600;
}

.align-toggle {
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.align-toggle__btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}

.align-toggle__btn.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(31, 32, 36, 0.08);
}

.field-row--align {
  align-items: stretch;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-field__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d5d0c6;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.toggle-field__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.toggle-field input:checked + .toggle-field__track {
  background: var(--brand);
}

.toggle-field input:checked + .toggle-field__track::after {
  transform: translateX(20px);
}

.toggle-field__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-field__text strong {
  font-size: 14px;
}

.toggle-field__text small {
  font-size: 12px;
  color: var(--ink-soft);
}

.form-actions-inline {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.chrome-preview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.chrome-preview__title {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.brand-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-preview img {
  border-radius: 8px;
}

.brand-preview strong {
  display: block;
  font-size: 18px;
  color: var(--brand);
}

.brand-preview p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-preview {
  background: #1f2024;
  color: #f7f4ef;
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.footer-preview__brand img {
  border-radius: 8px;
  margin-bottom: 8px;
}

.footer-preview__desc {
  color: rgba(247, 244, 239, 0.75);
  font-size: 14px;
}

.footer-preview__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-preview__socials a {
  color: var(--brand-2);
  text-decoration: none;
  font-size: 13px;
}

.footer-preview__copy {
  margin: 0;
  font-size: 12px;
  color: rgba(247, 244, 239, 0.6);
}

.section-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 16px 4px 4px;
  border-top: 1px dashed var(--line);
}

.section-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-preview__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.section-preview__anchor {
  font-size: 12px;
  font-family: "Consolas", "Courier New", monospace;
  color: var(--brand);
  background: #fff3dc;
  padding: 4px 8px;
  border-radius: 8px;
}

.section-title-preview {
  background: linear-gradient(180deg, #fff 0%, var(--surface-muted) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
}

.section-title-preview--center {
  text-align: center;
}

.section-title-preview--left {
  text-align: left;
}

.section-title-preview.is-hidden-preview {
  opacity: 0.72;
  border-style: dashed;
}

.section-title-preview__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  font-weight: 600;
}

.section-title-preview__title {
  margin: 0 0 10px;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.25;
}

.section-title-preview__lead {
  margin: 0;
  color: var(--ink-soft);
  max-width: 640px;
}

.section-title-preview--center .section-title-preview__lead {
  margin-inline: auto;
}

.section-title-preview__eyebrow.is-placeholder,
.section-title-preview__lead.is-placeholder {
  opacity: 0.45;
  font-style: italic;
}

.section-title-preview__badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdecea;
  color: #b42318;
  font-size: 12px;
}

@media (max-width: 960px) {
  .social-row,
  .nav-editor__item {
    grid-template-columns: 1fr;
  }

  .field-row,
  .field-row--align {
    grid-template-columns: 1fr;
  }

  .workspace--section-headings {
    grid-template-columns: 1fr;
  }

  .section-form {
    max-height: none;
  }
}
