:root {
  --bg: #04101a;
  --panel: #0d1a2c;
  --panel-deep: #071421;
  --surface: rgba(255, 255, 255, .05);
  --surface-strong: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f2f7ff;
  --muted: #9fb2c9;
  --accent: #22c55e;
  --accent-2: #86efac;
  --danger: #ef4444;
  --warn: #f59e0b;
  --shadow: 0 28px 80px rgba(0, 0, 0, .36);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --control-h: 38px;
  --sidebar-w: 224px;
  --topbar-h: 66px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, .13), transparent 30%),
    radial-gradient(circle at 92% 5%, rgba(59, 130, 246, .10), transparent 26%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:disabled {
  cursor: default;
  opacity: .38;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Controls */
.field {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}

.field label {
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 760;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(4, 16, 26, .74);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input {
  min-height: 42px;
  padding: 9px 12px;
}

.textarea {
  height: 100px;
  padding: 10px 12px;
  resize: none;
  line-height: 1.45;
}

.textarea.compact {
  height: 76px;
}

.input:focus,
.textarea:focus {
  border-color: rgba(34, 197, 94, .55);
  background: rgba(4, 16, 26, .92);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .10);
}

.btn,
.icon-button,
.segmented button,
.nav-button,
.page-number,
.feature-tab,
.preview-tab {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  min-height: var(--control-h);
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 800;
  line-height: 1;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #22c55e, #15803d);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, .055);
}

.btn-secondary:not(:disabled):hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .075);
}

.btn-danger {
  border-color: rgba(239, 68, 68, .25);
  color: #fecaca;
  background: rgba(239, 68, 68, .10);
}

.btn-block {
  width: 100%;
}

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  background: var(--surface);
  font-size: 16px;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}

.icon-button:not(:disabled):hover {
  border-color: rgba(34, 197, 94, .40);
  background: var(--surface-strong);
}

.btn:focus-visible,
.icon-button:focus-visible,
.segmented button:focus-visible,
.nav-button:focus-visible,
.page-number:focus-visible,
.feature-tab:focus-visible,
.preview-tab:focus-visible {
  outline: 2px solid rgba(134, 239, 172, .8);
  outline-offset: 2px;
}

.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  background: rgba(255, 255, 255, .035);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  color: var(--text);
  background: var(--surface-strong);
}

.lang-chip,
.source-badge,
.unsaved {
  white-space: nowrap;
}

.lang-chip {
  padding: 5px 8px;
  border: 1px solid rgba(34, 197, 94, .24);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(34, 197, 94, .11);
  font-size: 10px;
  font-weight: 900;
}

.unsaved {
  padding: 6px 9px;
  border: 1px solid rgba(245, 158, 11, .18);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, .08);
  font-size: 10px;
}

/* Login */
.login-page {
  height: 100dvh;
  padding: var(--space-5);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.login-card {
  width: min(450px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 26, 44, .95);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 24px 0 8px;
  font-size: 29px;
  letter-spacing: -.035em;
}

.login-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, .24);
  border-radius: 10px;
  color: #fecaca;
  background: rgba(239, 68, 68, .08);
  font-size: 12px;
  line-height: 1.4;
}

.login-error[hidden] {
  display: none;
}

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

.brand-lockup img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-lockup strong {
  display: block;
  font-size: 16px;
  white-space: nowrap;
}

.brand-lockup span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* Shell */
.admin-shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns .2s ease;
}

.admin-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  width: var(--sidebar-w);
  min-width: 0;
  height: 100dvh;
  padding: 14px 13px 12px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(4, 16, 26, .88);
  backdrop-filter: blur(18px);
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition: transform .2s ease, opacity .15s ease, visibility .2s ease;
}

.admin-shell.sidebar-collapsed .sidebar {
  border-right-color: transparent;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar .brand-lockup {
  margin-bottom: 10px;
  padding: 2px 5px 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-nav {
  min-height: 0;
  display: grid;
  gap: 4px;
}

.nav-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.15;
}

.nav-button:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-button.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 197, 94, .18), rgba(34, 197, 94, .05));
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.sidebar-mobile-actions {
  display: none;
}

.workspace {
  min-width: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  background: rgba(4, 16, 26, .88);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-toggle {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 18px;
}

.main {
  width: 100%;
  height: 100%;
  padding: 16px 18px 18px;
  overflow: hidden;
}

.screen {
  width: min(1280px, 100%);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.page-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-head-copy {
  min-width: 0;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(24px, 2.35vw, 34px);
  letter-spacing: -.035em;
  line-height: 1.05;
}

.page-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Panels */
.panel {
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(13, 26, 44, .79);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}

.panel-overview {
  grid-template-rows: minmax(0, 1fr);
}

.panel-head {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  min-height: 0;
  padding: 14px 16px;
  overflow: hidden;
}

.panel-footer {
  min-height: 52px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-count {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}


/* Authenticated CMS loading state */
.admin-loading-panel {
  min-height: 320px;
  display: grid;
  place-items: center;
}
.admin-loading-state {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 16px;
  padding: 28px;
}
.admin-loading-state h1 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}
.admin-loading-state p:not(.eyebrow) {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}
.admin-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: admin-loading-spin .8s linear infinite;
}
@keyframes admin-loading-spin { to { transform: rotate(360deg); } }

/* Overview */
.panel-body-overview {
  padding: 12px 14px;
}

.overview-dashboard {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.overview-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.platform-health {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(34, 197, 94, .20);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, .07);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.platform-health i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .10);
}

.platform-health.offline {
  border-color: rgba(245, 158, 11, .22);
  color: #fde68a;
  background: rgba(245, 158, 11, .08);
}

.platform-health.offline i {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .10);
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.analytics-kpi {
  position: relative;
  min-width: 0;
  min-height: 86px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.047), rgba(255,255,255,.022));
}

.analytics-kpi::after {
  content: "";
  position: absolute;
  inset: auto -18px -28px auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(34, 197, 94, .035);
  pointer-events: none;
}

.kpi-copy {
  min-width: 0;
  display: grid;
  align-content: center;
}

.kpi-copy > span,
.analytics-card-head span,
.content-health-item > span,
.content-health-footer span,
.operation-card span,
.pro-mini-head span,
.growth-insights span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kpi-copy > strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: clamp(20px, 1.8vw, 27px);
  letter-spacing: -.045em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-copy small {
  margin-top: 5px;
  overflow: hidden;
  color: #c5d4e5;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-visual {
  min-width: 0;
  align-self: end;
  opacity: .72;
}

.kpi-spark {
  width: 100%;
  height: 30px;
  display: block;
}

.kpi-spark-green rect { fill: rgba(34, 197, 94, .62); }
.kpi-spark-blue rect { fill: rgba(96, 165, 250, .65); }

.analytics-kpi-trend {
  grid-template-columns: minmax(0, 1fr) 46px;
  border-color: rgba(34, 197, 94, .18);
  background: linear-gradient(145deg, rgba(34, 197, 94, .075), rgba(34, 197, 94, .025));
}

.kpi-trend-mark {
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 13px;
  display: grid;
  place-items: center;
  justify-self: end;
  font-size: 21px;
  font-weight: 900;
  opacity: .72;
}

.kpi-copy > strong.positive,
.kpi-trend-mark.positive,
.trend-pill.positive {
  color: #86efac;
}

.kpi-copy > strong.negative,
.kpi-trend-mark.negative,
.trend-pill.negative {
  color: #fca5a5;
}

.kpi-copy > strong.neutral,
.kpi-trend-mark.neutral,
.trend-pill.neutral {
  color: #dbe7f5;
}

.overview-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(310px, .72fr);
  gap: 10px;
}

.overview-side-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 10px;
}

.analytics-card {
  min-height: 0;
  padding: 12px 13px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(4, 16, 26, .62), rgba(13, 26, 44, .46));
}

.analytics-card-primary {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.analytics-card-head {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.analytics-card-head > div:first-child {
  min-width: 0;
}

.analytics-card-head strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-head-value {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.analytics-card-head .analytics-head-value > strong,
.analytics-card-head > .side-card-total {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.04em;
}

.trend-pill,
.content-status {
  min-height: 23px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255, 255, 255, .04);
}

.trend-pill.positive,
.content-status.success {
  border-color: rgba(34, 197, 94, .22);
  color: #86efac;
  background: rgba(34, 197, 94, .08);
}

.trend-pill.negative {
  border-color: rgba(239, 68, 68, .22);
  background: rgba(239, 68, 68, .08);
}

.content-status.warning {
  border-color: rgba(245, 158, 11, .22);
  color: #fde68a;
  background: rgba(245, 158, 11, .08);
}

.analytics-chart {
  min-height: 0;
  padding-top: 8px;
  display: flex;
  align-items: stretch;
}

.analytics-bars-svg {
  width: 100%;
  height: 100%;
  min-height: 92px;
  overflow: visible;
}

.analytics-bars-svg rect { fill: rgba(34, 197, 94, .74); }
.analytics-bars-svg-pro rect { fill: rgba(96, 165, 250, .76); }

.chart-axis {
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: grid;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
}

.chart-axis-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chart-axis-five span:nth-child(1) { text-align: left; }
.chart-axis-five span:nth-child(2),
.chart-axis-five span:nth-child(3),
.chart-axis-five span:nth-child(4) { text-align: center; }
.chart-axis-five span:nth-child(5) { text-align: right; }
.chart-axis-seven { grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }

.growth-insights {
  min-height: 42px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.growth-insights > div {
  min-width: 0;
  padding-right: 8px;
  border-right: 1px solid rgba(255,255,255,.07);
}

.growth-insights > div:last-child { border-right: 0; }
.growth-insights strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-overview-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.pro-overview-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.conversion-ring-wrap {
  min-width: 0;
  display: grid;
  place-items: center;
}

.conversion-ring {
  width: 88px;
  height: 88px;
  overflow: visible;
  transform: rotate(-90deg);
}

.conversion-ring-track,
.conversion-ring-value {
  fill: none;
  stroke-width: 8;
}

.conversion-ring-track { stroke: rgba(255,255,255,.07); }
.conversion-ring-value {
  stroke: #60a5fa;
  stroke-linecap: round;
}

.conversion-ring-number,
.conversion-ring-label {
  fill: var(--text);
  transform: rotate(90deg);
  transform-origin: 42px 42px;
  font-family: inherit;
}

.conversion-ring-number { font-size: 15px; font-weight: 900; }
.conversion-ring-label { fill: var(--muted); font-size: 7px; font-weight: 900; letter-spacing: .08em; }

.pro-mini-chart {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.pro-mini-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pro-mini-head strong { font-size: 14px; }

/* Content health card */
.content-health-card {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.content-health-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
}

.content-health-item {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.content-health-item > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-health-value {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.content-health-value small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.content-health-footer {
  min-width: 0;
  min-height: 28px;
  padding: 7px 2px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-health-footer span {
  flex: none;
}

.content-health-footer strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-operations-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(190px, .82fr) minmax(220px, .92fr) minmax(360px, 1.45fr);
  gap: 8px;
}

.operation-card {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  overflow: hidden;
  background: rgba(255,255,255,.028);
}

.operation-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #86efac;
  background: rgba(34,197,94,.07);
  font-weight: 900;
}

.operation-icon.warning {
  border-color: rgba(245,158,11,.25);
  color: #fde68a;
  background: rgba(245,158,11,.08);
}

.operation-card strong,
.operation-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-card strong { margin-top: 2px; font-size: 11px; }
.operation-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.overview-shortcuts {
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  background: rgba(255,255,255,.025);
}

.overview-shortcut {
  min-width: 0;
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: grid;
  align-content: center;
  gap: 2px;
  cursor: pointer;
  color: #dbe7f5;
  background: rgba(255,255,255,.04);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.overview-shortcut b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-shortcut span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-shortcut:hover {
  border-color: rgba(34,197,94,.22);
  background: rgba(34,197,94,.06);
  transform: translateY(-1px);
}

/* Lists */
.cards-list,
.faq-list,
.history-list,
.feature-pages-list {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 7px;
}

.feature-pages-list.feature-pages-list-all,
.cards-list.cards-list-all {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card,
.faq-item,
.history-item,
.feature-page-item {
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  background: rgba(4, 16, 26, .44);
}

.content-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.faq-item,
.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.feature-page-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
}

.card-order {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 900;
}

.card-copy,
.faq-copy,
.feature-page-copy {
  min-width: 0;
}

.card-copy strong,
.faq-copy strong,
.feature-page-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-copy span,
.faq-copy span,
.feature-page-copy span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions,
.faq-actions,
.feature-page-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-actions .icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 14px;
}

.card-actions .btn,
.faq-actions .btn,
.feature-page-actions .btn,
.history-item .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.history-item strong {
  font-size: 12px;
}

.history-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
}

.status-dot.off {
  background: #64748b;
}

.source-badge {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.source-badge.configured {
  border-color: rgba(34, 197, 94, .25);
  color: var(--accent-2);
  background: rgba(34, 197, 94, .10);
}

.empty-state {
  min-height: 100%;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .025);
  font-size: 11px;
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-number {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.page-number.active {
  border-color: rgba(34, 197, 94, .42);
  color: #fff;
  background: rgba(34, 197, 94, .14);
}

/* Content summaries */
.content-summary {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 12px;
}

.summary-preview,
.summary-actions {
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(4, 16, 26, .40);
}

.summary-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-preview h2 {
  margin: 5px 0 8px;
  font-size: clamp(20px, 2vw, 29px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.summary-preview > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.summary-preview .mini-buttons {
  margin-top: 14px;
}

.mini-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.summary-meta {
  display: grid;
  gap: 8px;
}

.summary-meta-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.summary-meta-row span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.summary-meta-row strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Access pages */
.access-page-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, .45fr);
  gap: 12px;
}

.access-page-preview,
.access-page-meta {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(4, 16, 26, .40);
}

.access-page-preview {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr);
  gap: 14px;
}

.access-preview-hero {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.access-preview-hero h2 {
  margin: 5px 0 7px;
  font-size: clamp(20px, 2vw, 29px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.access-preview-hero > p:not(.eyebrow),
.access-preview-form > p,
.access-full-preview > section > p:not(.eyebrow),
.access-full-preview-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.access-preview-features {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.access-preview-features article {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.access-preview-features strong,
.access-preview-features span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-preview-features strong {
  font-size: 10px;
  white-space: nowrap;
}

.access-preview-features span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.access-preview-form,
.access-full-preview-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(13, 26, 44, .74);
}

.access-preview-form > span,
.access-full-preview-panel > span {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.access-preview-form h3,
.access-full-preview-panel h2 {
  margin: 5px 0 4px;
  font-size: 17px;
  letter-spacing: -.025em;
}

.access-preview-tabs {
  margin: 10px 0 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  background: rgba(255, 255, 255, .025);
}

.access-preview-tabs b,
.access-preview-tabs span {
  padding: 5px 7px;
  border-radius: 7px;
  text-align: center;
  font-size: 9px;
}

.access-preview-tabs b { background: var(--surface-strong); }
.access-preview-tabs span { color: var(--muted); }

.access-preview-input,
.access-preview-submit {
  min-height: 31px;
  margin-top: 6px;
  padding: 7px 9px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-size: 9px;
}

.access-preview-input {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(4, 16, 26, .72);
}

.access-preview-submit {
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #22c55e, #15803d);
  font-weight: 850;
}

.access-page-meta {
  padding: 13px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.access-page-meta .summary-meta { gap: 6px; }
.access-page-meta .summary-meta-row { padding: 8px 9px; }

.access-state-list {
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
  background: var(--surface);
}

.access-state-list > span {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.access-state-list strong {
  padding: 5px 8px;
  border: 1px solid rgba(34, 197, 94, .20);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(34, 197, 94, .07);
  font-size: 9px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(10px);
}

.dialog-shell,
.preview-shell {
  position: relative;
  width: min(1180px, 100%);
  height: min(900px, calc(100dvh - 32px));
  border: 1px solid var(--line);
  border-radius: 21px;
  overflow: hidden;
  background: var(--panel-deep);
  box-shadow: var(--shadow);
}

.dialog-shell {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 60px;
}

.dialog-header {
  min-height: 64px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.dialog-body {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.dialog-footer {
  min-height: 60px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-footer-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px 14px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-grid--centered {
  align-content: center;
}

.form-grid--narrow,
.form-grid--medium {
  width: 100%;
  margin: 0 auto;
}

.form-grid--narrow {
  max-width: 760px;
}

.form-grid--medium {
  max-width: 800px;
}

.form-span-2 {
  grid-column: 1 / -1;
}

.card-editor-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 16px;
  overflow: hidden;
}

.card-fields-grid {
  min-height: 0;
  max-height: 100%;
  padding-right: 7px;
  padding-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.card-editor-fields {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 11px;
}

.editor-context {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


.card-lang {
  flex: 0 0 auto;
}

.card-lang button {
  min-width: 38px;
}

.card-editor-side {
  min-height: 0;
  max-height: 100%;
  padding-right: 3px;
  padding-bottom: 10px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.image-box {
  min-height: 0;
  padding: 12px;
  border: 1px dashed rgba(159, 178, 201, .34);
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  background: rgba(4, 16, 26, .48);
}

.image-box img {
  width: 100%;
  height: 100%;
  max-height: 300px;
  border-radius: 9px;
  object-fit: contain;
}

.image-placeholder strong {
  display: block;
  font-size: 13px;
}

.image-placeholder small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.image-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.switch-row {
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
}

.switch-copy strong {
  display: block;
  font-size: 12px;
}

.switch-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
}

.switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #334155;
  transition: background .18s ease;
}

.slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider::after {
  transform: translateX(20px);
}

/* Feature-page editor */
.feature-editor {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.feature-editor-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature-tabs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-tab {
  height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 850;
}

.feature-tab.active {
  border-color: rgba(34, 197, 94, .35);
  color: #fff;
  background: rgba(34, 197, 94, .13);
}

.feature-lang {
  flex: 0 0 auto;
}

.feature-pane {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.feature-content-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
}

.feature-route-strip {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(4, 16, 26, .42);
}

.feature-route-strip > div {
  min-width: 0;
  flex: 1 1 auto;
}

.feature-route-input {
  width: min(520px, 100%);
  min-height: 34px;
  margin-top: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 11px;
}

.feature-route-strip span:first-child {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.feature-route-strip strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-fields {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 11px;
}

.feature-fields--content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-fields--content .field:last-child {
  grid-column: 1 / -1;
}

.feature-fields--centered {
  align-content: center;
}

.feature-textarea {
  height: 92px;
}

.feature-textarea.small {
  height: 62px;
}

.feature-sections-editor {
  display: grid;
  gap: 12px;
  padding-right: 3px;
}

.feature-section-editor {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  background: rgba(4, 16, 26, .32);
}

.feature-section-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature-section-editor-head span {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.feature-section-editor-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-section-fields {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 9px;
}

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

.feature-block-editor {
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  align-content: start;
  gap: 7px;
  background: rgba(4, 16, 26, .38);
}

.feature-block-editor > span {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.feature-block-editor .field {
  gap: 4px;
}

.feature-block-editor .input {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.feature-block-editor .feature-textarea {
  height: 54px;
}

.feature-info-box {
  padding: 11px 12px;
  border: 1px solid rgba(59, 130, 246, .23);
  border-radius: 12px;
  background: rgba(59, 130, 246, .07);
}

.feature-info-box strong {
  display: block;
  font-size: 11px;
}

.feature-info-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.feature-divider {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}


/* Dedicated Desktop-page editor */
.desktop-page-editor {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.desktop-editor-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.desktop-editor-tabs {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.desktop-editor-tab {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.desktop-editor-tab.active {
  border-color: rgba(34, 197, 94, .38);
  color: #fff;
  background: rgba(34, 197, 94, .14);
}

.desktop-editor-lang {
  flex: 0 0 auto;
}

.desktop-editor-pane {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 24px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.desktop-editor-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.desktop-editor-section,
.desktop-block-editor {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 16, 26, .34);
}

.desktop-section-title,
.desktop-block-editor > span {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.desktop-editor-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.desktop-span-2 {
  grid-column: 1 / -1;
  min-width: 0;
}

.desktop-block-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.desktop-field {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  align-content: start;
}

.desktop-field label {
  position: static;
  display: block;
  margin: 0;
  color: #dbe7f5;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.desktop-field .input,
.desktop-field .textarea {
  position: static;
  margin: 0;
}

.desktop-input {
  min-height: 44px;
}

.desktop-textarea {
  height: auto;
  min-height: 96px;
  max-height: none;
  resize: vertical;
}

.desktop-textarea.small {
  min-height: 76px;
}

.desktop-textarea.bullets {
  min-height: 112px;
}

.desktop-preview {
  display: grid;
  gap: 14px;
}

.desktop-page-summary {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .42fr);
}

.desktop-page-summary .summary-meta-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.desktop-page-summary .access-page-meta {
  overflow-y: auto;
  overflow-x: hidden;
}

.feature-preview {
  display: grid;
  gap: 10px;
  padding-right: 3px;
}

.feature-preview-section {
  display: grid;
  gap: 8px;
}

.feature-preview-section > header h2 {
  margin: 0;
  font-size: 15px;
}

.feature-preview-section > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.feature-preview-hero {
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 0%, rgba(34, 197, 94, .16), transparent 34%),
    rgba(4, 16, 26, .48);
}

.feature-preview-hero h1 {
  margin: 4px 0 7px;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -.04em;
}

.feature-preview-hero > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.preview-route {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 9px;
}

.feature-preview-blocks {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.feature-preview-blocks article {
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}

.feature-preview-blocks strong {
  display: block;
  font-size: 10px;
}

.feature-preview-blocks p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.feature-preview-blocks ul {
  margin: 5px 0 0;
  padding-left: 14px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.feature-preview-cta {
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(4, 16, 26, .44);
}

.feature-preview-cta strong {
  display: block;
  font-size: 11px;
}

.feature-preview-cta span:not(.btn) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

/* Access-page editor */
.access-modal-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.access-modal-column {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.access-feature-editor,
.access-states-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-feature-editor { grid-template-rows: repeat(2, minmax(0, 1fr)); }

.access-feature-editor section,
.access-states-grid section {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: hidden;
  background: rgba(4, 16, 26, .42);
}

.access-feature-editor section > span,
.access-states-grid section > span {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.access-form-grid { align-content: start; }
.access-textarea { height: 72px; }
.access-textarea.compact { height: 58px; }
.access-textarea.small { height: 48px; }

.access-full-preview {
  height: 100%;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  overflow: hidden;
  background: rgba(4, 16, 26, .38);
}

.access-full-preview > section:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.access-full-preview h1 {
  margin: 5px 0 7px;
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.access-full-preview-panel small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

/* Homepage preview */
.preview-shell {
  width: min(1160px, 100%);
  display: grid;
  grid-template-rows: 64px 44px minmax(0, 1fr);
}

.preview-tabs {
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.preview-tab {
  height: 30px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.preview-tab.active {
  border-color: var(--line);
  color: #fff;
  background: var(--surface-strong);
}

.preview-content {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.preview-page {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(13, 26, 44, .54);
}

.preview-cards-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 42px;
}

.preview-card-pagination {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-hero {
  height: 100%;
  padding: clamp(26px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 82% 5%, rgba(34, 197, 94, .18), transparent 34%),
    linear-gradient(135deg, #071628, #04101a);
}

.preview-hero h1 {
  max-width: 820px;
  margin: 6px 0 12px;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.preview-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.preview-actions {
  margin-top: 17px;
  display: flex;
  gap: 8px;
}

.preview-cards {
  height: 100%;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-card {
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.preview-card .fake-image {
  height: 54px;
  margin-bottom: 9px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(59, 130, 246, .10));
  font-size: 9px;
}

.preview-card .fake-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card h3 {
  margin: 2px 0 5px;
  font-size: 12px;
}

.preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.preview-card-bullets{margin:0;padding-left:18px;display:grid;gap:5px;color:var(--muted);font-size:11px;line-height:1.4}
.preview-card-tags{display:flex;gap:6px;flex-wrap:wrap}
.preview-card-tags span{min-height:22px;padding:0 8px;border-radius:999px;border:1px solid var(--line);display:inline-flex;align-items:center;color:var(--muted);font-size:9px;font-weight:800}
.preview-card-cta{width:max-content;pointer-events:none}

.preview-section {
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-section h2 {
  margin: 5px 0 10px;
  font-size: clamp(25px, 3vw, 40px);
  letter-spacing: -.04em;
}

.preview-section > p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.preview-steps {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.preview-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 850;
}

.preview-faq {
  height: 100%;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-faq-item {
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.preview-faq-item strong {
  font-size: 11px;
}

.preview-faq-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

/* Feedback */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  padding: 11px 14px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 11px;
  pointer-events: none;
  color: var(--text);
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 12px;
  font-weight: 750;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive: one consolidated section, no shell scroll */
@media (max-height: 760px) {
  :root {
    --topbar-h: 60px;
    --control-h: 36px;
  }

  .sidebar {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .sidebar .brand-lockup {
    margin-bottom: 7px;
    padding-bottom: 8px;
  }

  .brand-lockup img {
    width: 36px;
    height: 36px;
  }

  .nav-button {
    min-height: 32px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 11px;
  }

  .sidebar-bottom {
    padding-top: 7px;
    font-size: 9px;
  }

  .topbar {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .main {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .screen {
    gap: 9px;
  }

  .page-head {
    min-height: 50px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .panel-head {
    min-height: 50px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .panel-footer {
    min-height: 48px;
  }

  .content-card,
  .faq-item,
  .history-item,
  .feature-page-item {
    min-height: 44px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .dialog-shell,
  .preview-shell {
    height: calc(100dvh - 20px);
  }

  .dialog-shell {
    grid-template-rows: 56px minmax(0, 1fr) 54px;
  }

  .dialog-header {
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dialog-footer {
    min-height: 54px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dialog-body {
    padding: 12px 14px;
  }

  .input {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .textarea {
    height: 82px;
  }

  .textarea.compact {
    height: 62px;
  }

  .card-fields-grid,
  .form-grid {
    gap: 9px 11px;
  }

  .switch-row {
    min-height: 48px;
  }

  .feature-editor {
    grid-template-rows: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .feature-tab {
    height: 30px;
    padding: 4px 8px;
  }

  .feature-content-layout {
    gap: 9px;
  }

  .feature-route-strip {
    min-height: 48px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .feature-textarea {
    height: 70px;
  }

  .feature-textarea.small {
    height: 50px;
  }
}

@media (max-height: 640px) {
  .main {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .page-head {
    min-height: 44px;
  }

  .page-head .eyebrow,
  .page-head p:not(.eyebrow) {
    display: none;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .panel-head {
    min-height: 44px;
  }

  .panel-footer {
    min-height: 42px;
  }

  .panel-body-overview {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .overview-dashboard { gap: 7px; }

  .analytics-kpi {
    min-height: 62px;
    padding: 7px 9px;
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .kpi-copy > strong { font-size: 19px; }
  .kpi-copy small { margin-top: 3px; }
  .kpi-spark { height: 23px; }
  .kpi-trend-mark { width: 34px; height: 34px; font-size: 17px; }

  .analytics-card {
    padding-top: 8px;
    padding-bottom: 7px;
  }

  .growth-insights { min-height: 34px; margin-top: 5px; padding-top: 5px; }
  .content-health-card { grid-template-rows: auto minmax(0, 1fr); }
  .content-health-grid { gap: 6px; }
  .content-health-item { padding: 8px 9px; gap: 5px; }
  .content-health-value { font-size: 17px; }
  .content-health-footer { display: none; }
  .overview-operations-row { min-height: 50px; }
  .operation-card { padding-top: 5px; padding-bottom: 5px; }
  .operation-icon { width: 28px; height: 28px; }
  .overview-shortcut { min-height: 38px; padding-top: 4px; padding-bottom: 4px; }

  .dialog-shell {
    grid-template-rows: 50px minmax(0, 1fr) 50px;
  }

  .dialog-header,
  .dialog-footer {
    min-height: 50px;
  }

  .dialog-header h2 {
    font-size: 17px;
  }

  .dialog-header .eyebrow {
    display: none;
  }

  .dialog-body {
    padding: 10px 12px;
  }

  .textarea {
    height: 68px;
  }

  .textarea.compact {
    height: 52px;
  }

  .image-box {
    padding: 8px;
  }

  .feature-info-box {
    padding: 8px 10px;
  }

  .access-preview-features article:nth-child(n+3) {
    display: none;
  }

  .access-preview-features {
    margin-top: 8px;
  }

  .access-page-preview,
  .access-page-meta {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .access-feature-editor section,
  .access-states-grid section {
    padding: 7px 8px;
    gap: 5px;
  }

  .access-textarea { height: 58px; }
  .access-textarea.compact { height: 48px; }
  .access-textarea.small { height: 40px; }
}

@media (max-width: 1120px) {
  :root {
    --sidebar-w: 196px;
  }

  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-right .btn {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 11px;
  }

  .main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .content-summary {
    grid-template-columns: 1fr;
  }

  .access-page-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .access-page-preview {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 10px;
  }

  .summary-actions {
    display: none;
  }

  .analytics-kpis {
    gap: 6px;
  }

  .overview-main-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
  }

  .analytics-kpi {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .growth-insights > div:nth-child(2) {
    display: none;
  }

  .growth-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-mini-chart .chart-axis {
    display: none;
  }

  .pro-mini-chart {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .overview-operations-row {
    grid-template-columns: minmax(150px, .75fr) minmax(170px, .85fr) minmax(310px, 1.4fr);
  }

  .overview-shortcut {
    padding-left: 6px;
    padding-right: 6px;
  }

  .card-editor-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  }

  .feature-preview-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .feature-tabs {
    gap: 4px;
  }

  .feature-tab {
    padding-left: 7px;
    padding-right: 7px;
  }
}

@media (max-width: 780px) {
  :root {
    --sidebar-w: 206px;
  }

  .admin-shell,
  .admin-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    box-shadow: 24px 0 60px rgba(0, 0, 0, .36);
  }

  .admin-shell.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  .admin-shell.sidebar-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .topbar-right {
    gap: 4px;
  }

  .topbar-right .btn {
    min-height: 34px;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 10px;
  }

  .unsaved {
    display: none;
  }

  .page-head {
    gap: 10px;
  }

  .page-head p:not(.eyebrow) {
    display: none;
  }

  .overview-head-actions .platform-health {
    display: none;
  }

  .analytics-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .analytics-kpi {
    min-height: 72px;
    grid-template-columns: 1fr;
  }

  .analytics-kpi .kpi-visual,
  .analytics-kpi-trend .kpi-trend-mark {
    display: none;
  }

  .overview-main-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
    gap: 7px;
  }

  .overview-side-stack {
    gap: 7px;
  }

  .pro-overview-body {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px;
  }

  .conversion-ring {
    width: 66px;
    height: 66px;
  }

  .content-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-operations-row {
    grid-template-columns: minmax(150px, .8fr) minmax(0, 1.4fr);
  }

  .status-card {
    display: none;
  }

  .overview-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .card-editor-grid {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .card-fields-grid,
  .card-editor-side {
    max-height: none;
    padding-right: 0;
    overflow: visible;
  }

  .desktop-page-editor {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .desktop-editor-pane {
    overflow: visible;
    padding-right: 0;
  }

  .desktop-editor-grid,
  .desktop-block-list {
    grid-template-columns: 1fr;
  }

  .desktop-span-2 {
    grid-column: auto;
  }

  .desktop-page-summary {
    grid-template-columns: 1fr;
  }

  .access-page-layout {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .access-page-preview {
    grid-template-columns: minmax(0, 1fr) 205px;
    padding: 10px;
    gap: 8px;
  }

  .access-preview-features article:nth-child(n+3) {
    display: none;
  }

  .access-page-meta {
    padding: 9px;
  }

  .access-modal-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

  .access-full-preview {
    grid-template-columns: minmax(0, 1fr) 235px;
  }

  .feature-fields--content,
  .feature-section-fields {
    grid-template-columns: 1fr;
  }

  .feature-fields--content .field:last-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  :root {
    --sidebar-w: min(82vw, 292px);
    --topbar-h: 52px;
    --control-h: 36px;
    --radius-lg: 15px;
    --radius-md: 12px;
  }

  .sidebar {
    padding: 10px 9px 9px;
  }

  .sidebar .brand-lockup {
    margin-bottom: 7px;
    padding-bottom: 8px;
  }

  .sidebar-nav {
    gap: 3px;
  }

  .nav-button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .sidebar-bottom {
    padding: 8px 5px 0;
    font-size: 9px;
  }

  .sidebar-mobile-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .sidebar-mobile-actions .btn {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .topbar {
    padding: 6px 8px;
    gap: 6px;
  }

  .topbar-left,
  .topbar-right {
    gap: 4px;
  }

  .sidebar-toggle {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .topbar .segmented {
    padding: 2px;
    gap: 2px;
  }

  .topbar .segmented button {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .topbar-right #preview-button,
  .topbar-right #logout-button {
    display: none;
  }

  .topbar-right .btn {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .main {
    padding: 8px;
  }

  .screen {
    gap: 7px;
  }

  .page-head {
    min-height: 40px;
    gap: 7px;
  }

  .page-head .eyebrow {
    display: none;
  }

  .page-head h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-actions {
    flex: none;
    gap: 5px;
  }

  .page-actions .btn {
    min-height: 34px;
    max-width: 104px;
    padding: 6px 9px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  .panel-head {
    min-height: 44px;
    padding: 8px 10px;
    gap: 8px;
  }

  .panel-head h2 {
    font-size: 14px;
  }

  .panel-head p {
    display: none;
  }

  .panel-body {
    padding: 8px;
  }

  .panel-footer {
    min-height: 40px;
    padding: 5px 8px;
  }

  .panel-count {
    font-size: 9px;
  }

  .page-number {
    min-width: 27px;
    height: 27px;
    padding: 0 6px;
    font-size: 10px;
  }

  .panel-body-overview {
    padding: 6px;
  }

  .overview-dashboard {
    gap: 6px;
  }

  .analytics-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .analytics-kpi,
  .analytics-kpi-trend {
    min-height: 58px;
    grid-column: span 2;
    padding: 6px 7px;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .analytics-kpi:nth-child(4),
  .analytics-kpi:nth-child(5) {
    grid-column: span 3;
  }

  .kpi-copy > span {
    font-size: 7px;
    letter-spacing: .03em;
  }

  .kpi-copy > strong {
    margin-top: 3px;
    font-size: 17px;
  }

  .kpi-copy small {
    margin-top: 2px;
    font-size: 7px;
  }

  .overview-main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 102px;
    gap: 6px;
  }

  .overview-side-stack {
    display: block;
    min-height: 0;
  }

  .pro-overview-card {
    display: none;
  }

  .overview-growth-card {
    padding: 8px 9px 7px;
  }

  .analytics-card-head {
    min-height: 28px;
  }

  .analytics-card-head strong {
    font-size: 10px;
  }

  .analytics-card-head .analytics-head-value > strong,
  .analytics-card-head > .side-card-total {
    font-size: 15px;
  }

  .analytics-bars-svg {
    min-height: 68px;
  }

  .growth-insights {
    min-height: 32px;
    margin-top: 4px;
    padding-top: 4px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .growth-insights > div {
    padding-right: 5px;
  }

  .growth-insights span {
    font-size: 7px;
  }

  .growth-insights strong {
    font-size: 9px;
  }

  .content-health-card {
    height: 100%;
    padding: 7px 8px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px;
  }

  .content-health-card .analytics-card-head {
    min-height: 22px;
  }

  .content-health-card .content-status {
    min-height: 20px;
    padding: 3px 6px;
    font-size: 7px;
  }

  .content-health-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .content-health-item {
    padding: 6px;
    gap: 4px;
  }

  .content-health-item > span {
    font-size: 7px;
  }

  .content-health-value {
    font-size: 16px;
  }

  .content-health-value small {
    font-size: 7px;
  }

  .content-health-footer {
    display: none;
  }

  .overview-operations-row {
    min-height: 54px;
    display: block;
  }

  .overview-operations-row > .operation-card {
    display: none;
  }

  .overview-shortcuts {
    height: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .overview-shortcut {
    min-height: 54px;
    padding: 5px 4px;
    text-align: center;
  }

  .overview-shortcut b {
    font-size: 9px;
  }

  .overview-shortcut span {
    display: none;
  }

  .content-summary {
    grid-template-columns: 1fr;
  }

  .summary-preview {
    padding: 12px;
  }

  .summary-preview h2 {
    font-size: 21px;
  }

  .summary-preview > p:not(.eyebrow) {
    font-size: 10px;
    line-height: 1.4;
  }

  .mini-buttons {
    gap: 5px;
  }

  .mini-pill {
    padding: 5px 7px;
    font-size: 8px;
  }

  .access-page-layout {
    grid-template-columns: 1fr;
  }

  .access-page-meta {
    display: none;
  }

  .access-page-preview {
    padding: 9px;
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 7px;
  }

  .access-preview-hero h2 {
    font-size: 18px;
  }

  .access-preview-hero > p:not(.eyebrow) {
    font-size: 9px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .access-preview-features {
    margin-top: 7px;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .access-preview-features article:nth-child(n+3) {
    display: none;
  }

  .access-preview-features article {
    padding: 5px 6px;
  }

  .access-preview-features span {
    display: none;
  }

  .access-preview-form {
    padding: 8px;
  }

  .access-preview-form h3 {
    font-size: 13px;
  }

  .access-preview-form > p {
    display: none;
  }

  .access-preview-tabs {
    margin: 6px 0 4px;
  }

  .access-preview-input,
  .access-preview-submit {
    min-height: 26px;
    margin-top: 4px;
    padding: 5px 6px;
    font-size: 8px;
  }

  .content-card,
  .faq-item,
  .history-item,
  .feature-page-item {
    min-height: 54px;
    padding: 6px 7px;
    gap: 6px;
  }

  .content-card {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto 30px;
  }

  .card-order {
    width: 27px;
    height: 27px;
  }

  .card-copy {
    grid-column: 2;
    min-width: 0;
  }

  .card-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .card-actions .icon-button {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .card-actions .btn,
  .faq-actions .btn,
  .feature-page-actions .btn,
  .history-item .btn {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .card-copy strong,
  .faq-copy strong,
  .feature-page-copy strong,
  .history-item strong {
    font-size: 10px;
  }

  .card-copy span,
  .faq-copy span,
  .feature-page-copy span,
  .history-item small {
    font-size: 8px;
  }

  .feature-page-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .feature-page-item .source-badge {
    display: none;
  }

  .modal {
    padding: 6px;
  }

  .dialog-shell,
  .preview-shell {
    width: 100%;
    height: calc(100dvh - 12px);
    border-radius: 16px;
  }

  .dialog-shell {
    grid-template-rows: 48px minmax(0, 1fr) 52px;
  }

  .dialog-header {
    min-height: 48px;
    padding: 7px 9px;
  }

  .dialog-header .eyebrow {
    display: none;
  }

  .dialog-header h2 {
    max-width: calc(100vw - 78px);
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dialog-body {
    padding: 9px;
  }

  .dialog-footer {
    min-height: 52px;
    padding: 7px 9px;
    gap: 6px;
  }

  .dialog-footer > .lang-chip,
  .dialog-footer > .panel-count {
    display: none;
  }

  .dialog-footer-actions {
    gap: 5px;
  }

  .dialog-footer .btn {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 9px;
  }

  .input {
    min-height: 36px;
    padding: 7px 9px;
  }

  .textarea {
    height: 58px;
    padding: 7px 9px;
  }

  .textarea.compact {
    height: 48px;
  }

  .field {
    gap: 4px;
  }

  .field label {
    font-size: 9px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
  }

  .form-grid.single {
    grid-template-columns: 1fr;
  }

  .card-editor-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dialog-body > .card-editor-grid {
    grid-template-rows: minmax(0, 1fr) 122px;
  }

  .card-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .card-editor-fields {
    gap: 7px;
  }

  .editor-context {
    min-height: 28px;
  }

  .editor-context .panel-count {
    display: none;
  }

  .card-lang button {
    min-width: 34px;
  }

  .switch-row {
    min-height: 44px;
    padding: 7px 8px;
  }

  .switch-copy strong {
    font-size: 10px;
  }

  .switch-copy span {
    font-size: 8px;
  }

  .card-editor-side {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    gap: 7px;
  }

  .image-box {
    min-height: 0;
    padding: 7px;
  }

  .image-box img {
    max-height: 108px;
  }

  .image-placeholder strong {
    font-size: 10px;
  }

  .image-placeholder small {
    font-size: 8px;
  }

  .image-actions {
    width: 118px;
    align-content: center;
    flex-direction: column;
    justify-content: center;
  }

  .image-actions .btn {
    width: 100%;
    min-height: 32px;
    padding: 5px 6px;
    font-size: 8px;
  }

  .feature-editor {
    grid-template-rows: 62px minmax(0, 1fr);
    gap: 7px;
  }

  .feature-editor-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 28px 30px;
    align-items: center;
    gap: 4px 6px;
  }

  .feature-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    gap: 3px;
  }

  .feature-editor:not(.access-editor) .feature-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .access-editor .feature-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature-lang {
    grid-column: 2;
    grid-row: 1;
  }

  .feature-lang button {
    min-width: 31px;
    min-height: 25px;
    padding: 3px 6px;
    font-size: 9px;
  }

  .feature-tab {
    width: 100%;
    height: 28px;
    padding: 3px 2px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .feature-content-layout {
    gap: 7px;
  }

  .feature-route-strip {
    min-height: 48px;
    padding: 6px 8px;
  }

  .feature-route-input {
    min-height: 32px;
    margin-top: 2px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .feature-fields {
    gap: 7px;
  }

  .feature-fields--content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-fields--content .field:last-child {
    grid-column: 1 / -1;
  }

  .feature-info-box {
    padding: 7px 8px;
  }

  .feature-info-box strong {
    font-size: 9px;
  }

  .feature-info-box span {
    margin-top: 2px;
    font-size: 8px;
  }

  .feature-textarea {
    height: 52px;
  }

  .feature-textarea.small {
    height: 44px;
  }

  .feature-section-editor {
    padding: 8px;
    gap: 7px;
  }

  .feature-section-items {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .feature-block-editor {
    padding: 7px;
    gap: 4px;
  }

  .feature-block-editor > span {
    font-size: 7px;
  }

  .feature-block-editor .input {
    min-height: 32px;
    padding: 5px 7px;
  }

  .feature-block-editor .feature-textarea {
    height: 42px;
  }

  .feature-pane > .card-editor-grid {
    grid-template-rows: 122px minmax(0, 1fr);
  }

  .feature-preview {
    gap: 6px;
  }

  .feature-preview-hero {
    padding: 10px;
  }

  .feature-preview-hero h1 {
    font-size: 20px;
  }

  .feature-preview-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .feature-preview-blocks article {
    padding: 7px;
  }

  .feature-preview-cta {
    min-height: 46px;
    padding: 6px 8px;
  }

  .access-modal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
  }

  .access-modal-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .access-feature-editor,
  .access-states-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .access-feature-editor section,
  .access-states-grid section {
    padding: 6px;
    gap: 4px;
  }

  .access-textarea {
    height: 46px;
  }

  .access-textarea.compact {
    height: 42px;
  }

  .access-textarea.small {
    height: 38px;
  }

  .access-full-preview {
    padding: 8px;
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 7px;
  }

  .access-full-preview h1 {
    font-size: 20px;
  }

  .access-full-preview .access-preview-features article:nth-child(n+3) {
    display: none;
  }

  .preview-shell {
    grid-template-rows: 48px 64px minmax(0, 1fr);
  }

  .preview-tabs {
    padding: 5px 7px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 25px;
    align-content: center;
    gap: 3px;
  }

  .preview-tab {
    width: 100%;
    height: 25px;
    padding: 3px 2px;
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
  }

  .preview-content {
    padding: 8px;
  }

  .preview-cards {
    padding: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .preview-card {
    padding: 7px;
  }

  .preview-card .fake-image {
    height: 42px;
    margin-bottom: 5px;
  }

  .preview-card h3 {
    margin: 1px 0 3px;
    font-size: 9px;
  }

  .preview-card p {
    font-size: 7px;
  }

  .preview-hero {
    padding: 18px;
  }

  .preview-hero h1 {
    font-size: 28px;
  }

  .preview-hero p:not(.eyebrow) {
    font-size: 11px;
  }

  .preview-section {
    padding: 16px;
  }

  .preview-section h2 {
    font-size: 24px;
  }

  .preview-section > p:not(.eyebrow) {
    font-size: 10px;
  }

  .preview-steps {
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .preview-step {
    padding: 9px;
    font-size: 9px;
  }

  .preview-faq {
    padding: 9px;
    gap: 6px;
  }

  .preview-faq-item {
    padding: 8px;
  }

  .preview-faq-item strong {
    font-size: 9px;
  }

  .preview-faq-item p {
    margin-top: 4px;
    font-size: 8px;
  }

  .toast {
    right: 8px;
    bottom: 8px;
    max-width: calc(100vw - 16px);
    font-size: 10px;
  }

  .login-page {
    padding: 12px;
  }

  .login-card {
    padding: 20px;
    border-radius: 18px;
  }

  .login-card h1 {
    margin-top: 18px;
    font-size: 24px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-left: 6px;
    padding-right: 6px;
  }

  .topbar .segmented button {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 9px;
  }

  .topbar-right .btn {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 8px;
  }

  .page-head h1 {
    font-size: 18px;
  }

  .page-actions .btn {
    max-width: 88px;
    padding-left: 7px;
    padding-right: 7px;
    font-size: 9px;
  }

  .analytics-kpi,
  .analytics-kpi-trend {
    min-height: 51px;
  }

  .kpi-copy > strong {
    font-size: 16px;
  }

  .content-health-item {
    padding-left: 5px;
    padding-right: 5px;
  }

  .overview-shortcut b {
    font-size: 8px;
  }

  .access-page-preview {
    grid-template-columns: minmax(0, 1fr) 132px;
  }

  .dialog-footer .btn {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 8px;
  }

  .feature-tab {
    font-size: 7px;
  }

  .access-full-preview {
    grid-template-columns: minmax(0, 1fr) 132px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .analytics-kpi,
  .analytics-kpi-trend {
    min-height: 54px;
  }

  .overview-main-grid {
    grid-template-rows: minmax(0, 1fr) 92px;
  }

  .overview-operations-row {
    min-height: 48px;
  }

  .overview-shortcut {
    min-height: 48px;
  }

  .summary-preview {
    padding: 9px;
  }

  .dialog-shell {
    grid-template-rows: 46px minmax(0, 1fr) 48px;
  }

  .dialog-header {
    min-height: 46px;
  }

  .dialog-footer {
    min-height: 48px;
  }

  .dialog-body {
    padding: 7px;
  }

  .dialog-body > .card-editor-grid {
    grid-template-rows: minmax(0, 1fr) 105px;
  }

  .feature-pane > .card-editor-grid {
    grid-template-rows: 105px minmax(0, 1fr);
  }

  .feature-editor {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .feature-editor-toolbar {
    grid-template-rows: 26px 28px;
  }

  .feature-tab {
    height: 26px;
  }

  .textarea {
    height: 50px;
  }

  .textarea.compact {
    height: 43px;
  }
}

@media (max-width: 780px) and (max-height: 500px) {
  :root {
    --topbar-h: 48px;
    --control-h: 34px;
    --sidebar-w: min(88vw, 520px);
  }

  .sidebar {
    padding: 8px;
  }

  .sidebar .brand-lockup {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 5px;
  }

  .nav-button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .sidebar-bottom {
    padding-top: 6px;
    font-size: 8px;
  }

  .sidebar-mobile-actions {
    margin-top: 5px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .sidebar-mobile-actions .btn {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .topbar {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .main {
    padding: 6px;
  }

  .screen {
    gap: 5px;
  }

  .page-head {
    min-height: 32px;
  }

  .page-head .eyebrow,
  .page-head p:not(.eyebrow) {
    display: none;
  }

  .page-head h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-actions .btn {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 9px;
  }

  .panel-head {
    min-height: 38px;
    padding: 6px 9px;
  }

  .panel-head p {
    display: none;
  }

  .panel-body {
    padding: 7px 9px;
  }

  .panel-footer {
    min-height: 36px;
    padding: 4px 8px;
  }

  .panel-body-overview {
    padding: 5px;
  }

  .overview-dashboard {
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 5px;
  }

  .analytics-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .analytics-kpi,
  .analytics-kpi-trend {
    min-height: 46px;
    padding: 5px 7px;
    grid-template-columns: 1fr;
  }

  .analytics-kpi .kpi-visual,
  .analytics-kpi-trend .kpi-trend-mark,
  .kpi-copy small {
    display: none;
  }

  .kpi-copy > span {
    font-size: 7px;
  }

  .kpi-copy > strong {
    margin-top: 2px;
    font-size: 16px;
  }

  .overview-main-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(205px, .55fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 5px;
  }

  .overview-growth-card {
    padding: 6px 8px;
  }

  .analytics-card-head {
    min-height: 25px;
  }

  .analytics-chart {
    padding-top: 3px;
  }

  .analytics-bars-svg {
    min-height: 58px;
  }

  .growth-insights {
    min-height: 28px;
    margin-top: 3px;
    padding-top: 3px;
  }

  .growth-insights span {
    font-size: 7px;
  }

  .growth-insights strong {
    font-size: 9px;
  }

  .overview-side-stack {
    display: block;
  }

  .pro-overview-card {
    display: none;
  }

  .content-health-card {
    height: 100%;
    padding: 7px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px;
  }

  .content-health-card .analytics-card-head {
    min-height: 24px;
    align-items: center;
  }

  .content-health-card .analytics-card-head strong {
    max-width: 112px;
  }

  .content-health-card .content-status {
    min-height: 18px;
    padding: 2px 5px;
    font-size: 0;
  }

  .content-health-card .content-status.success::after {
    content: "OK";
    font-size: 7px;
  }

  .content-health-card .content-status.warning::after {
    content: "ATENÇÃO";
    font-size: 7px;
  }

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

  .content-health-item {
    padding: 5px 6px;
    gap: 2px;
  }

  .content-health-item > span {
    font-size: 7px;
  }

  .content-health-value {
    font-size: 15px;
  }

  .content-health-footer,
  .overview-operations-row {
    display: none;
  }

  .content-card,
  .faq-item,
  .history-item,
  .feature-page-item {
    min-height: 42px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .modal {
    padding: 4px;
  }

  .dialog-shell,
  .preview-shell {
    height: calc(100dvh - 8px);
    border-radius: 15px;
  }

  .dialog-shell {
    grid-template-rows: 44px minmax(0, 1fr) 46px;
  }

  .dialog-header {
    min-height: 44px;
    padding: 6px 12px;
  }

  .dialog-header .eyebrow {
    display: none;
  }

  .dialog-header h2 {
    font-size: 16px;
  }

  .dialog-body {
    padding: 7px 12px;
  }

  .dialog-footer {
    min-height: 46px;
    padding: 6px 12px;
  }

  .dialog-footer > .lang-chip,
  .dialog-footer > .panel-count {
    display: none;
  }

  .dialog-footer .btn {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 9px;
  }

  .input {
    min-height: 34px;
    padding: 6px 9px;
  }

  .textarea {
    height: 48px;
  }

  .textarea.compact {
    height: 42px;
  }

  .field {
    gap: 3px;
  }

  .field label {
    font-size: 9px;
  }

  .card-editor-grid,
  .dialog-body > .card-editor-grid,
  .feature-pane > .card-editor-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
  }

  .card-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }

  .card-editor-fields {
    gap: 5px;
  }

  .editor-context {
    min-height: 27px;
  }

  .card-editor-side {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .image-box {
    padding: 6px;
  }

  .image-box img {
    max-height: 130px;
  }

  .image-actions {
    gap: 5px;
  }

  .image-actions .btn {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 8px;
  }

  .switch-row {
    min-height: 40px;
    padding: 5px 8px;
  }

  .feature-editor {
    grid-template-rows: 32px minmax(0, 1fr);
    gap: 5px;
  }

  .feature-editor-toolbar {
    gap: 5px;
  }

  .feature-tab {
    height: 28px;
    padding: 3px 7px;
    font-size: 8px;
  }

  .feature-content-layout > .feature-info-box {
    display: none;
  }

  .feature-route-strip {
    min-height: 42px;
    padding: 5px 8px;
  }

  .feature-fields {
    gap: 5px;
  }

  .feature-textarea {
    height: 44px;
  }

  .feature-textarea.small {
    height: 38px;
  }

  .feature-section-editor {
    padding: 6px;
    gap: 5px;
  }

  .feature-section-items {
    gap: 5px;
  }

  .feature-block-editor {
    padding: 5px 7px;
    gap: 3px;
  }

  .feature-block-editor .input {
    min-height: 30px;
    padding: 4px 7px;
  }

  .feature-block-editor .feature-textarea {
    height: 36px;
  }

  .feature-info-box {
    padding: 5px 7px;
  }

  .access-modal-grid {
    gap: 7px;
  }

  .access-feature-editor,
  .access-states-grid {
    gap: 5px;
  }

  .access-feature-editor section,
  .access-states-grid section {
    padding: 5px 7px;
    gap: 3px;
  }

  .access-textarea {
    height: 42px;
  }

  .access-textarea.compact {
    height: 38px;
  }

  .access-textarea.small {
    height: 34px;
  }

  .preview-shell {
    grid-template-rows: 44px 36px minmax(0, 1fr);
  }

  .preview-tabs {
    padding: 4px 9px;
    gap: 3px;
  }

  .preview-tab {
    height: 26px;
    padding: 3px 6px;
    font-size: 8px;
  }

  .preview-content {
    padding: 6px;
  }

  .preview-cards {
    padding: 7px;
    gap: 5px;
  }

  .preview-card .fake-image {
    height: 34px;
  }

  .preview-hero {
    padding: 14px 20px;
  }

  .preview-hero h1 {
    font-size: 27px;
  }

  .preview-section {
    padding: 12px 18px;
  }

  .preview-section h2 {
    font-size: 23px;
  }

  .preview-steps {
    margin-top: 7px;
  }
}

/* Visibility */
[hidden] {
  display: none;
}

/* APP HOMEPAGE / LEGAL CMS */
.layout-sections-list{display:grid;gap:18px}.layout-section-card{border:1px solid var(--line);border-radius:18px;background:var(--panel-2);padding:18px}.layout-section-card>header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:16px}.layout-section-card h3,.legal-admin-card h3{margin:4px 0 7px}.layout-section-card p,.legal-admin-card p{margin:0;color:var(--muted);line-height:1.5}.layout-module-list{display:grid;gap:8px}.layout-module-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.layout-select-label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.layout-select{min-width:190px}.layout-unassigned{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}.legal-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.legal-admin-card{display:flex;flex-direction:column;justify-content:space-between;gap:22px;border:1px solid var(--line);border-radius:18px;background:var(--panel-2);padding:20px}.legal-admin-card small{display:block;margin-top:12px;color:var(--muted)}.legal-textarea{min-height:420px!important;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.55}@media(max-width:980px){.legal-admin-grid{grid-template-columns:1fr}.layout-section-card>header{display:grid}.layout-module-row{grid-template-columns:auto minmax(0,1fr)}.layout-module-row .card-actions,.layout-select-label{grid-column:1/-1}.layout-select{min-width:0;width:100%}}


/* V2 — content stack: long configuration screens scroll inside the workspace */
.screen-scroll-stack{
  min-height:0;
  height:100%;
  display:grid;
  grid-auto-rows:max-content;
  gap:12px;
  padding-right:4px;
  padding-bottom:6px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.screen-scroll-stack>.panel{
  height:auto;
  min-height:max-content;
}
.screen-scroll-stack>.panel .panel-body{
  overflow:visible;
}


/* V2 — tabs mirror the new public feature-page structure */
.feature-tabs{
  flex-wrap:wrap;
  align-content:center;
}
.feature-preview-new{
  overflow-y:auto;
  padding-bottom:8px;
}
@media(max-width:900px){
  .feature-editor{
    grid-template-rows:auto minmax(0,1fr);
  }
  .feature-editor-toolbar{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .feature-tabs{
    width:100%;
  }
}
