:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --ink-soft: #d9e3f0;
  --muted: #91a0b5;
  --line: #29374f;
  --line-strong: #36527d;
  --surface: #202b3d;
  --surface-soft: #101827;
  --surface-deep: #0b1220;
  --surface-muted: #172238;
  --accent: #3f8cff;
  --accent-dark: #65a3ff;
  --accent-soft: #142b55;
  --violet: #9b7cff;
  --violet-strong: #b9a8ff;
  --violet-border: #4a3c83;
  --violet-soft: #1b1d3d;
  --focus: #68a4ff;
  --success: #18b989;
  --success-soft: #082f35;
  --warning: #f0b84b;
  --warning-soft: #2f2441;
  --danger: #ff6b6b;
  --danger-soft: #3a1824;
  --shadow: 0 18px 48px rgb(0 0 0 / 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-deep);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-admin-mode="demo"] [data-demo-hidden] {
  display: none !important;
}

::selection {
  background: rgb(63 140 255 / 0.35);
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  align-self: start;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #080f1d;
  padding: 24px 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
}

.brand strong {
  color: var(--ink);
}

.brand strong span {
  color: var(--violet);
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

nav {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  gap: 6px;
}

nav a {
  position: relative;
  z-index: 1;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

nav a.active,
nav a:hover {
  color: #6da9ff;
  background: #13264a;
}

main {
  padding: 30px clamp(20px, 3vw, 44px);
  min-width: 0;
}

.workspace {
  scroll-margin-top: 20px;
}

.topbar {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar > div {
  min-width: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 820px;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 650;
  color: var(--ink);
}

h2 {
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}

h3 {
  font-size: 16px;
  color: var(--ink);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.primary-action,
.secondary-action,
.danger-action,
.icon-button,
.segmented button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink);
  cursor: pointer;
}

.primary-action {
  min-width: 116px;
  padding: 11px 16px;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 650;
  box-shadow: 0 10px 28px rgb(63 140 255 / 0.32);
}

.notice {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #2f61aa;
  border-radius: 8px;
  background: linear-gradient(90deg, #13264a, #173764);
  color: var(--ink-soft);
  box-shadow: 0 0 0 1px rgb(63 140 255 / 0.16), 0 12px 32px rgb(63 140 255 / 0.12);
}

.notice strong {
  font-weight: 650;
}

.notice span {
  color: var(--muted);
  font-size: 13px;
}

.app-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #0e685b;
  border-radius: 8px;
  background: var(--success-soft);
  color: #42ddb7;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 0 0 1px rgb(24 185 137 / 0.12), 0 12px 28px rgb(24 185 137 / 0.1);
}

.app-status[hidden] {
  display: none;
}

.secondary-action {
  min-width: 128px;
  padding: 10px 14px;
  font-weight: 650;
  color: var(--accent-dark);
}

.primary-action:hover {
  background: #5a9dff;
  border-color: #5a9dff;
}

.primary-action:disabled,
.secondary-action:disabled,
.danger-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.danger-action {
  min-width: 112px;
  padding: 10px 14px;
  border-color: #653042;
  background: var(--danger-soft);
  color: #ff9b9b;
  font-weight: 650;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metrics article,
.workspace,
.group-card,
.setup-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metrics article {
  padding: 16px;
}

.metrics span,
.group-meta,
.group-footer,
.setup-list,
.rule-row {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.workspace {
  padding: 18px;
  margin-bottom: 24px;
  background: transparent;
  border-color: transparent;
}

.section-heading,
.group-main,
.group-footer,
.rule-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading > div {
  min-width: 0;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-deep);
}

.segmented button {
  border: 0;
  padding: 8px 10px;
  background: transparent;
}

.segmented button.selected {
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.28);
}

.group-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 420px);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  min-width: 0;
}

.group-card {
  padding: 16px;
  min-width: 0;
}

.group-card[data-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgb(63 140 255 / 0.48);
}

.group-title-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  background: #142b55;
  color: #8bbcff;
  font-size: 12px;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pill[data-status="draft"] {
  background: #332945;
  color: var(--warning);
}

.icon-button {
  min-width: 68px;
  padding: 8px 10px;
}

.swatches {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 42px;
  margin: 18px 0;
}

.swatch {
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  cursor: pointer;
}

.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: 1px solid rgb(255 255 255 / 0.12);
  overflow: hidden;
  text-align: center;
  font-size: 11px;
  line-height: 26px;
  font-weight: 700;
}

.swatch img,
.swatch-preview img,
.vk-card-swatches__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swatch[data-exposed="true"] {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.rule-row {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.rule-row:last-child {
  border-bottom: 0;
}

.rule-field {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rule-field:last-child {
  border-bottom: 0;
}

.rule-field span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.rule-field small,
.rule-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rule-field input,
.rule-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-deep);
  color: var(--ink);
  font: inherit;
}

.rule-field input {
  padding: 8px 10px;
}

.rule-field select {
  padding: 8px 34px 8px 10px;
}

.rule-field input::placeholder {
  color: #6f7f96;
}

.rule-field input:focus,
.rule-field select:focus,
.editor-form input:focus,
.editor-form select:focus,
.editor-form textarea:focus,
.color-edit-form textarea:focus {
  border-color: var(--focus);
}

.picker-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.collection-toggle-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
}

.collection-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.collection-toggle input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  accent-color: var(--violet);
}

.collection-browser {
  display: grid;
  gap: 10px;
}

.collection-browser__picker,
.collection-browser__more {
  justify-self: start;
}

.collection-browser__status {
  color: var(--muted);
}

.collection-browser .collection-toggle-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.collection-browser .collection-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-muted);
  cursor: pointer;
}

.collection-browser .collection-toggle:has(input:checked) {
  border-color: var(--violet-border);
  background: var(--violet-soft);
  color: var(--violet-strong);
}

.collection-browser .collection-toggle > span,
.collection-browser .collection-toggle strong,
.collection-browser .collection-toggle small {
  display: block;
  min-width: 0;
}

.collection-browser .collection-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #52617a;
  position: relative;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 160ms ease;
}

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

.switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgb(104 164 255 / 0.28);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.setup-list {
  padding-left: 20px;
  line-height: 1.8;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.setup-panel {
  padding: 14px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.12);
}

.setup-note {
  margin-top: 12px;
  border-color: #2f61aa;
  background: linear-gradient(135deg, #14233b 0%, #182c4f 100%);
}

.setup-note strong {
  color: var(--ink);
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.settings-panel,
.override-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.16);
}

.panel-head,
.override-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.override-list {
  display: grid;
  gap: 12px;
}

.override-card {
  background: var(--surface-muted);
}

.override-card .rule-row {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.detected-colors {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.color-token {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
}

.setup-panel strong {
  display: block;
  margin: 6px 0;
  font-size: 15px;
}

.setup-panel p,
.setup-kicker {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.setup-kicker {
  display: block;
  font-weight: 700;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.setup-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  padding: 9px 11px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

#legacy-cleanup-button {
  color: var(--violet-strong);
  border-color: var(--violet-border);
  background: var(--violet-soft);
}

#legacy-cleanup-button:hover {
  color: #d4cbff;
  border-color: #6f5bd4;
  background: #242653;
}

.secondary-action:hover,
.setup-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.secondary-action.collection-browser__picker {
  color: var(--violet-strong);
  border-color: var(--violet-border);
  background: var(--violet-soft);
}

.secondary-action.collection-browser__picker:hover {
  color: #d4cbff;
  border-color: #6f5bd4;
  background: #242653;
}

button.setup-link {
  cursor: pointer;
  font-family: inherit;
}

.setup-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.setup-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.setup-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink);
  text-decoration: none;
}

.setup-step[data-state="ready"] {
  border-color: #0e685b;
  background: var(--success-soft);
}

.setup-step[data-state="attention"] {
  border-color: #4b3a84;
  background: var(--warning-soft);
}

.setup-step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.setup-step[data-state="ready"] .setup-step-status {
  border-color: #0c7766;
  background: #063f3c;
  color: #42ddb7;
}

.setup-step[data-state="attention"] .setup-step-status {
  border-color: #514598;
  background: #211b4a;
  color: #a894ff;
}

.setup-step strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.setup-step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.setup-output {
  max-height: 260px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #09111f;
  color: #d9e8ff;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.setup-output:not([hidden]) {
  display: block;
}

.editor-panel {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

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

.editor-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.editor-form input,
.editor-form select,
.editor-form textarea,
.color-edit-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-deep);
  color: var(--ink);
  font: inherit;
}

.editor-form textarea,
.color-edit-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.resource-field {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
  min-width: 0;
}

.resource-field.compact {
  padding: 8px 10px;
}

.resource-field span,
.manual-id-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.resource-field strong {
  display: block;
  max-width: 230px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.resource-field .secondary-action {
  flex: 0 0 auto;
}

.advanced-panel {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.advanced-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.advanced-panel label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.manual-id-field input,
.manual-id-field textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.editor-color-list,
.swatch-row-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.color-edit-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-muted);
}

.color-edit-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.swatch-preview {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
}

.swatch-preview--text {
  background: var(--surface);
}

.inline-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.color-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.resource-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / 0.58);
}

.resource-modal[hidden] {
  display: none;
}

.resource-modal__panel {
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 22px 70px rgb(0 0 0 / 0.44);
}

.resource-modal__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.resource-modal__intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.resource-modal__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.resource-modal__list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.resource-modal__list--media {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.resource-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
  cursor: pointer;
}

.resource-modal__list--media .resource-option {
  align-items: start;
}

.resource-option img {
  width: 70px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.resource-option strong,
.resource-option small {
  display: block;
  overflow-wrap: anywhere;
}

.resource-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.color-row.editable {
  background: var(--surface-muted);
}

.color-row-main {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.color-row-main .swatch {
  flex: 0 0 auto;
}

.color-title {
  display: block;
  margin-bottom: 3px;
}

.color-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.color-row-side {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.listing-pill,
.media-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.listing-pill[data-exposed="true"] {
  background: #142b55;
  color: #8bbcff;
}

.swatch-manager {
  display: grid;
  gap: 12px;
}

.swatch-summary {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-muted);
}

.swatch-summary p,
.swatch-summary span {
  color: var(--muted);
  font-size: 13px;
}

.swatch-summary span {
  font-weight: 700;
}

.empty-panel {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .app-shell,
  .two-column,
  .group-workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .topbar,
  .section-heading {
    flex-direction: column;
  }

  .metrics,
  .group-list,
  .setup-grid,
  .billing-grid {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
  }

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

  .color-row,
  .swatch-summary,
  .resource-field {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .group-workspace {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
  }
}
