* {
  box-sizing: border-box;
}

:root {
  --app-bg: #0d1117;
  --panel-bg: #161b22;
  --panel-elevated: #1b222c;
  --panel-muted: #21262d;
  --panel-border: #30363d;
  --text-main: #c9d1d9;
  --text-muted: #8b949e;
  --text-strong: #f0f6fc;
  --accent: #58a6ff;
  --accent-strong: #238636;
  --danger: #f85149;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.22);
  --transition-ui: 200ms ease;
}

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

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, rgba(88, 166, 255, 0.08), transparent 35%), var(--app-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.editor-wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 14px;
  background: rgba(22, 27, 34, 0.96);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 20;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.toolbar-group--left {
  flex: 1 1 auto;
}

.toolbar-group--center {
  justify-content: center;
  flex: 0 1 auto;
}

.toolbar-group--right {
  justify-content: flex-end;
  flex: 1 1 auto;
}

.logo {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.logo span {
  color: var(--text-muted);
  font-weight: 500;
}

.site-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel-muted);
  color: var(--text-main);
  position: relative;
}

.site-selector__label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-selector select {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-strong);
  min-width: 160px;
  outline: none;
}

.toolbar-strip,
.panel__switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.74);
}

.toolbar-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  border-radius: 9px;
  padding: 8px 12px;
  min-height: 34px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-ui), border-color var(--transition-ui), color var(--transition-ui), transform var(--transition-ui);
}

.toolbar-btn:hover:not(:disabled) {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.18);
  color: var(--text-strong);
}

.toolbar-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.toolbar-btn:focus-visible,
.site-selector select:focus-visible {
  outline: 2px solid rgba(88, 166, 255, 0.5);
  outline-offset: 2px;
}

.toolbar-btn.is-active {
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.4);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.08);
}

.toolbar-btn--primary {
  background: linear-gradient(180deg, #2ea043, #238636);
  border-color: rgba(46, 160, 67, 0.6);
  color: #fff;
}

.toolbar-btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #35b04a, #2b9140);
  color: #fff;
}

.toolbar-btn--compact {
  min-height: 30px;
  padding: 6px 10px;
}

.toolbar-btn--icon {
  display: inline-flex;
  align-items: center;
  min-width: 34px;
  padding-inline: 0;
  justify-content: center;
}

.toolbar-btn--device {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toolbar-btn__icon {
  font-size: 14px;
  line-height: 1;
}

.toolbar-btn__label {
  white-space: nowrap;
}

.toolbar-viewport {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 10px 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(48, 54, 61, 0.9);
  background: rgba(13, 17, 23, 0.92);
  color: var(--text-main);
  white-space: nowrap;
  transition: border-color var(--transition-ui), box-shadow var(--transition-ui), transform var(--transition-ui);
}

.toolbar-viewport.is-resizing {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.toolbar-viewport[data-breakpoint='desktop'] {
  border-color: rgba(88, 166, 255, 0.34);
}

.toolbar-viewport[data-breakpoint='tablet'] {
  border-color: rgba(251, 191, 36, 0.34);
}

.toolbar-viewport[data-breakpoint='mobile'] {
  border-color: rgba(46, 160, 67, 0.34);
}

.toolbar-viewport__width {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.toolbar-viewport__badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toolbar-viewport[data-breakpoint='desktop'] .toolbar-viewport__badge {
  background: rgba(88, 166, 255, 0.16);
  color: #7cc4ff;
}

.toolbar-viewport[data-breakpoint='tablet'] .toolbar-viewport__badge {
  background: rgba(251, 191, 36, 0.18);
  color: #ffd166;
}

.toolbar-viewport[data-breakpoint='mobile'] .toolbar-viewport__badge {
  background: rgba(46, 160, 67, 0.18);
  color: #7ee787;
}

.workflow-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.74);
}

.workflow-status__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: rgba(251, 188, 5, 0.14);
  color: #f2cc60;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-status[data-state='published'] .workflow-status__badge {
  background: rgba(46, 160, 67, 0.16);
  color: #7ee787;
}

.workflow-status[data-state='review'] .workflow-status__badge {
  background: rgba(88, 166, 255, 0.16);
  color: #79c0ff;
}

.workflow-status__meta {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.site-health {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.74);
  color: var(--text-main);
  cursor: default;
}

.site-health__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f2cc60;
  box-shadow: 0 0 0 4px rgba(242, 204, 96, 0.12);
}

.site-health__label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-health__status {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.site-health[data-state='green'] .site-health__dot {
  background: #7ee787;
  box-shadow: 0 0 0 4px rgba(126, 231, 135, 0.14);
}

.site-health[data-state='yellow'] .site-health__dot {
  background: #f2cc60;
  box-shadow: 0 0 0 4px rgba(242, 204, 96, 0.12);
}

.site-health[data-state='red'] .site-health__dot {
  background: #ff7b72;
  box-shadow: 0 0 0 4px rgba(248, 81, 73, 0.14);
}

.site-health__popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 248px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #0b0f15;
  color: var(--text-main);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--transition-ui), transform var(--transition-ui);
  z-index: 45;
}

.site-health:hover .site-health__popover,
.site-health:focus-visible .site-health__popover {
  opacity: 1;
  transform: translateY(0);
}

.site-health__popover-title {
  display: block;
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.site-health__popover-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

.site-health__popover-row + .site-health__popover-row {
  margin-top: 6px;
}

.site-health__popover-key {
  color: var(--text-muted);
}

.site-health__popover-value {
  color: var(--text-strong);
  text-align: right;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid var(--panel-border);
  background: #0b0f15;
  color: var(--text-strong);
  font-size: 11px;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  transition: opacity var(--transition-ui), transform var(--transition-ui);
  z-index: 40;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.editor-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(13, 17, 23, 0.84);
  overflow-x: auto;
  white-space: nowrap;
}

.breadcrumb,
.breadcrumbs__empty {
  font-size: 12px;
}

.breadcrumb {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 0;
  position: relative;
}

.breadcrumb.is-active,
.breadcrumb:hover {
  color: var(--text-strong);
}

.breadcrumb-separator,
.breadcrumbs__empty {
  color: var(--text-muted);
}

.editor-row {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel-bg);
  transition: width var(--transition-ui), opacity var(--transition-ui), transform var(--transition-ui);
}

.panel--left {
  width: 280px;
  border-right: 1px solid var(--panel-border);
}

.panel--right {
  width: 320px;
  border-left: 1px solid var(--panel-border);
}

.panel__titlebar {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.8);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.panel__view {
  display: none;
  flex: 1;
  min-height: 0;
}

.panel__view.is-active {
  display: flex;
  flex-direction: column;
}

.panel__body--styles {
  display: flex;
  flex-direction: column;
}

.code-panel {
  padding: 14px;
}

.code-panel__card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.96), rgba(11, 15, 20, 0.98));
  overflow: hidden;
}

.code-panel__header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.8);
}

.code-panel__header h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text-strong);
}

.code-panel__header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.code-panel__editor {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 14px 16px 16px;
  gap: 10px;
}

.code-panel__label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-panel__textarea {
  flex: 1;
  min-height: 320px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(88, 166, 255, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(22, 27, 34, 0.98), rgba(13, 17, 23, 0.98)),
    #0b0f14;
  color: #dbe7f3;
  padding: 16px;
  font: 500 13px/1.6 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  tab-size: 2;
  white-space: pre;
}

.code-panel__textarea::placeholder {
  color: #6e7681;
}

.code-panel__textarea:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.panel__switcher {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--panel-border);
  padding: 6px;
  background: var(--panel-elevated);
}

.panel__switcher--left {
  justify-content: stretch;
}

.toolbar-btn--panel {
  flex: 1 1 0;
}

.pages-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.templates-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.templates-panel__intro {
  display: grid;
  gap: 6px;
}

.templates-panel__intro h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 14px;
}

.templates-panel__intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.templates-panel__list {
  display: grid;
  gap: 10px;
}

.templates-panel__card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    #11161d;
}

.templates-panel__eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.templates-panel__card h4 {
  margin: 0;
  color: var(--text-strong);
  font-size: 14px;
}

.templates-panel__card p,
.templates-panel__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.templates-panel__action {
  justify-self: start;
}

.pages-panel__list {
  display: grid;
  gap: 10px;
}

.pages-panel__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    #11161d;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-ui), background var(--transition-ui), transform var(--transition-ui);
}

.pages-panel__item:hover,
.pages-panel__item.is-active {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(27, 34, 44, 0.96);
  transform: translateY(-1px);
}

.pages-panel__item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.pages-panel__item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pages-panel__item-copy strong {
  color: var(--text-strong);
  font-size: 13px;
}

.pages-panel__item-copy span {
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pages-panel__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pages-panel__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.panel-resize-handle {
  flex: 0 0 8px;
  position: relative;
  cursor: col-resize;
  background: transparent;
}

.panel-resize-handle::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2px;
  height: 56px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.22);
  transition: background var(--transition-ui), transform var(--transition-ui);
}

.panel-resize-handle:hover::before,
.is-resizing-panels .panel-resize-handle::before {
  background: rgba(88, 166, 255, 0.68);
  transform: scaleY(1.08);
}

.editor-canvas {
  display: flex;
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(88, 166, 255, 0.05), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    #0b0f14;
}

.editor-search {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 35;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 12px;
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.98), rgba(10, 14, 20, 0.98));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.editor-search__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: end;
  gap: 10px;
}

.editor-search__field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.editor-search__label {
  color: #8b949e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-search__input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(88, 166, 255, 0.18);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.96);
  color: #f0f6fc;
}

.editor-search__input::placeholder {
  color: #6e7681;
}

.editor-search__input:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.14);
}

.editor-search__count {
  align-self: center;
  color: #8b949e;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.editor-search__results {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.editor-search__empty {
  padding: 12px 14px;
  border: 1px dashed rgba(139, 148, 158, 0.26);
  border-radius: 12px;
  color: #8b949e;
  font-size: 12px;
  line-height: 1.6;
}

.editor-search__result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(48, 54, 61, 0.92);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.84);
  color: #c9d1d9;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-ui), background var(--transition-ui), transform var(--transition-ui);
}

.editor-search__result:hover,
.editor-search__result.is-active {
  border-color: rgba(88, 166, 255, 0.44);
  background: rgba(24, 32, 42, 0.98);
  transform: translateY(-1px);
}

.editor-search__result-title {
  color: #f0f6fc;
  font-size: 12px;
  font-weight: 700;
}

.editor-search__result-copy {
  color: #8b949e;
  font-size: 12px;
  line-height: 1.5;
}

.editor-search__result mark {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(240, 196, 25, 0.26);
  color: #fff7cc;
}

.editor-canvas__workspace {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 0;
  transition: flex-basis 260ms ease, width 260ms ease;
}

.editor-preview {
  display: flex;
  flex-direction: column;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  border-left: 1px solid rgba(48, 54, 61, 0);
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(13, 17, 23, 0.98));
  transition:
    flex-basis 260ms ease,
    width 260ms ease,
    opacity 220ms ease,
    border-color 260ms ease,
    transform 260ms ease;
  transform: translateX(16px);
}

.editor-preview__header {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.8);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-preview__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.editor-wrap.is-split-preview .editor-canvas__workspace {
  flex-basis: 60%;
  width: 60%;
}

.editor-wrap.is-split-preview .editor-preview {
  flex-basis: 40%;
  width: 40%;
  opacity: 1;
  pointer-events: auto;
  border-left-color: rgba(48, 54, 61, 0.8);
  transform: translateX(0);
}

#editor {
  width: 100%;
  height: 100%;
}

.editor-wrap.is-right-panel-hidden .panel--right,
.editor-wrap.is-right-panel-hidden .panel-resize-handle--right,
.editor-wrap.is-left-panel-hidden .panel--left,
.editor-wrap.is-left-panel-hidden .panel-resize-handle--left {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.editor-wrap.is-fullscreen-canvas .panel--left,
.editor-wrap.is-fullscreen-canvas .panel--right,
.editor-wrap.is-fullscreen-canvas .panel-resize-handle,
.editor-wrap.is-fullscreen-canvas .editor-breadcrumbs {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.editor-wrap.is-fullscreen-canvas .editor-header {
  border-bottom-color: rgba(48, 54, 61, 0.45);
}

.status-indicator {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(22, 27, 34, 0.94);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-ui), transform var(--transition-ui);
}

.status-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

.status-indicator[data-state='success'] {
  color: #7ee787;
}

.status-indicator[data-state='error'] {
  color: var(--danger);
}

.status-indicator[data-state='saving'] {
  color: var(--accent);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(13, 17, 23, 0.52);
  backdrop-filter: blur(5px);
}

.loading-overlay[hidden] {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(201, 209, 217, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.loading-overlay__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}

.version-history {
  position: fixed;
  top: 57px;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(360px, 100vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--panel-border);
  background: rgba(13, 17, 23, 0.98);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.version-history__header,
.version-history__preview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--panel-border);
}

.version-history__header h2,
.version-history__preview strong {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text-strong);
}

.version-history__header p,
.version-history__preview p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.version-history__close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.version-history__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
}

.version-history__state {
  color: var(--text-muted);
  font-size: 13px;
}

.version-history__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.version-history__item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(22, 27, 34, 0.92);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-ui), background var(--transition-ui), transform var(--transition-ui);
}

.version-history__item:hover,
.version-history__item.is-active {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(27, 34, 44, 0.96);
  transform: translateY(-1px);
}

.version-history__timestamp {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
}

.version-history__label {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.confirm-modal[hidden],
.shortcuts-modal[hidden],
.export-modal[hidden],
.version-history[hidden],
.help-overlay[hidden] {
  display: none;
}

.confirm-modal,
.shortcuts-modal,
.export-modal,
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.help-overlay {
  z-index: 95;
}

.help-overlay__backdrop,
.help-overlay__layer {
  position: absolute;
  inset: 0;
}

.help-overlay__backdrop {
  background: rgba(1, 4, 9, 0.7);
}

.help-overlay__layer {
  pointer-events: none;
}

.help-overlay__controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  justify-content: flex-end;
}

.help-overlay__bubble {
  position: absolute;
  max-width: min(220px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(88, 166, 255, 0.36);
  border-radius: 14px;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color: var(--text-strong);
}

.help-overlay__bubble-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.help-overlay__bubble-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(88, 166, 255, 0.42);
  border-bottom: 1px solid rgba(88, 166, 255, 0.42);
  background: rgba(13, 17, 23, 0.96);
}

.help-overlay__bubble[data-position='bottom'] .help-overlay__bubble-arrow {
  top: -7px;
  left: calc(50% - 6px);
  transform: rotate(225deg);
}

.help-overlay__bubble[data-position='top'] .help-overlay__bubble-arrow {
  bottom: -7px;
  left: calc(50% - 6px);
  transform: rotate(45deg);
}

.help-overlay__bubble[data-position='left'] .help-overlay__bubble-arrow {
  top: calc(50% - 6px);
  right: -7px;
  transform: rotate(-45deg);
}

.help-overlay__bubble[data-position='right'] .help-overlay__bubble-arrow {
  top: calc(50% - 6px);
  left: -7px;
  transform: rotate(135deg);
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 9, 0.72);
}

.confirm-modal__dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  margin: 15vh auto 0;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
}

.confirm-modal__dialog h2 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-size: 18px;
}

.confirm-modal__dialog p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.shortcuts-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 9, 0.72);
}

.shortcuts-modal__dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 10vh auto 0;
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
}

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

.shortcuts-modal__header h2 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 20px;
}

.shortcuts-modal__header p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.shortcuts-modal__body {
  display: grid;
  gap: 10px;
}

.shortcuts-modal__row {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(22, 27, 34, 0.88);
}

.shortcuts-modal__keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shortcuts-modal__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(88, 166, 255, 0.24);
  border-radius: 9px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shortcuts-modal__description {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.4;
}

.export-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 9, 0.78);
  backdrop-filter: blur(4px);
}

.export-modal__dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 10vh auto 0;
  padding: 24px;
  border: 1px solid rgba(88, 166, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(88, 166, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(12, 17, 25, 0.98), rgba(8, 12, 18, 0.98));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.48);
}

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

.export-modal__header h2 {
  margin: 0 0 6px;
  color: #f0f6fc;
  font-size: 20px;
}

.export-modal__header p {
  margin: 0;
  color: rgba(230, 237, 243, 0.72);
  line-height: 1.5;
}

.export-modal__body {
  display: grid;
  gap: 12px;
}

.export-option {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(88, 166, 255, 0.16);
  border-radius: 16px;
  background: rgba(15, 21, 30, 0.92);
  color: #e6edf3;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.export-option:hover,
.export-option:focus-visible {
  border-color: rgba(88, 166, 255, 0.44);
  background: rgba(20, 28, 40, 0.98);
  transform: translateY(-1px);
}

.export-option strong {
  font-size: 15px;
  color: #f0f6fc;
}

.export-option span {
  color: rgba(230, 237, 243, 0.76);
  line-height: 1.45;
}

.export-option code {
  color: #9ecbff;
}

.export-modal__status {
  min-height: 20px;
  margin: 16px 2px 0;
  color: rgba(230, 237, 243, 0.72);
  font-size: 13px;
}

.export-modal__status[data-state='success'] {
  color: #7ee787;
}

.export-modal__status[data-state='error'] {
  color: #ff7b72;
}

body[data-previewing-version='true'] .workflow-status {
  border-color: rgba(88, 166, 255, 0.45);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.style-panel__extra {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(13, 17, 23, 0.5);
}

.style-extra-card {
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.08), rgba(88, 166, 255, 0.02));
}

.style-extra-card__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.style-extra-card__header strong {
  color: var(--text-strong);
  font-size: 12px;
}

.style-extra-card__header span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.style-extra-card__actions {
  display: flex;
  gap: 8px;
}

.theme-presets {
  display: grid;
  gap: 8px;
}

.theme-preset {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.55);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color var(--transition-ui), background var(--transition-ui), transform var(--transition-ui);
}

.theme-preset:hover {
  border-color: rgba(88, 166, 255, 0.24);
  background: rgba(88, 166, 255, 0.08);
}

.theme-preset.is-active {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.14);
}

.theme-preset__swatch {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, var(--swatch-accent), var(--swatch-accent-strong)),
    linear-gradient(180deg, var(--swatch-surface), var(--swatch-bg));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.theme-preset__copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.theme-preset__copy strong {
  color: var(--text-strong);
  font-size: 12px;
}

.theme-preset__copy span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.style-presets {
  display: grid;
  gap: 8px;
}

.style-presets__selection,
.style-presets__empty {
  padding: 10px 12px;
  border: 1px dashed rgba(139, 148, 158, 0.24);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  background: rgba(13, 17, 23, 0.34);
}

.style-preset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.55);
}

.style-preset__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.style-preset__copy strong {
  color: var(--text-strong);
  font-size: 12px;
}

.style-preset__copy span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.editor-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 188px;
  padding: 6px;
  border: 1px solid rgba(88, 166, 255, 0.16);
  border-radius: 12px;
  background: rgba(22, 27, 34, 0.98);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.editor-context-menu[hidden] {
  display: none;
}

.editor-context-menu__item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-ui), color var(--transition-ui);
}

.editor-context-menu__item:hover,
.editor-context-menu__item:focus-visible {
  background: rgba(88, 166, 255, 0.14);
  color: var(--text-strong);
  outline: none;
}

.simra-asset-manager {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: min(760px, calc(100vw - 80px));
}

.simra-asset-manager__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.simra-asset-manager__header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.simra-asset-manager__header p {
  margin: 0;
  color: var(--text-muted);
}

.simra-asset-manager__close {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: var(--panel-muted);
  color: var(--text-main);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.simra-asset-manager__dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 140px;
  border: 1px dashed rgba(88, 166, 255, 0.44);
  border-radius: 18px;
  background: rgba(88, 166, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--transition-ui), border-color var(--transition-ui);
}

.simra-asset-manager__dropzone.is-dragging {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.78);
}

.simra-asset-manager__status {
  min-height: 18px;
  margin: 0;
  color: var(--text-muted);
}

.simra-asset-manager__status[data-state='error'] {
  color: var(--danger);
}

.simra-asset-manager__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  max-height: 420px;
  overflow: auto;
}

.simra-asset-manager__item {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: var(--panel-muted);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.simra-asset-manager__item img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.simra-asset-manager__empty {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--panel-border);
  border-radius: 14px;
  color: var(--text-muted);
  text-align: center;
}

.gjs-editor,
.gjs-one-bg {
  background: transparent;
}

.gjs-cv-canvas {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

.gjs-frame-wrapper {
  max-width: 100%;
  transition: width 220ms ease, margin 220ms ease, transform var(--transition-ui);
}

.gjs-frame-wrapper iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.gjs-block-categories,
.gjs-layer-manager,
.gjs-sm-sectors,
.gjs-traits-container {
  padding: 12px;
}

.gjs-block-category,
.gjs-sm-sector {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(13, 17, 23, 0.34);
}

.gjs-block-category .gjs-title,
.gjs-sm-sector-title {
  background: rgba(33, 38, 45, 0.9);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.76);
}

.gjs-blocks-c {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.gjs-block {
  width: 100%;
  min-height: 74px;
  margin: 0;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  color: var(--text-main);
  transition: border-color var(--transition-ui), transform var(--transition-ui), background var(--transition-ui);
}

.gjs-block:hover {
  border-color: rgba(88, 166, 255, 0.55);
  background: rgba(88, 166, 255, 0.08);
  transform: translateY(-1px);
}

.gjs-block-label {
  color: var(--text-main);
  font-size: 12px;
}

.gjs-sm-properties {
  padding: 10px 12px 14px;
}

.gjs-sm-property {
  padding: 10px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.46);
}

.gjs-sm-property:last-child,
.gjs-trt-trait:last-child,
.gjs-layer:last-child {
  border-bottom: none;
}

.gjs-sm-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.gjs-sm-field,
.gjs-trt-trait__wrp {
  color: var(--text-main);
}

.gjs-sm-field input,
.gjs-sm-field select,
.gjs-sm-field textarea,
.gjs-trt-trait__wrp input,
.gjs-trt-trait__wrp select,
.gjs-trt-trait__wrp textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.84);
  color: var(--text-strong);
  padding: 8px 10px;
}

.gjs-sm-field input:focus,
.gjs-sm-field select:focus,
.gjs-sm-field textarea:focus,
.gjs-trt-trait__wrp input:focus,
.gjs-trt-trait__wrp select:focus,
.gjs-trt-trait__wrp textarea:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.65);
}

.brand-palette-field {
  width: 100%;
}

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

.brand-palette-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(13, 17, 23, 0.84);
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition-ui), background var(--transition-ui);
}

.brand-palette-swatch:hover,
.brand-palette-swatch:focus-visible,
.brand-palette-swatch.is-active {
  border-color: rgba(88, 166, 255, 0.65);
  background: rgba(88, 166, 255, 0.08);
}

.brand-palette-swatch:focus-visible {
  outline: none;
}

.brand-palette-swatch__chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.brand-palette-swatch__label {
  font-size: 11px;
}

.gjs-sm-composite {
  padding: 14px;
  border: 1px solid rgba(88, 166, 255, 0.22);
  border-radius: 14px;
  background: rgba(88, 166, 255, 0.04);
  position: relative;
}

.gjs-sm-composite::before {
  content: 'box model';
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel-bg);
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gjs-sm-composite .gjs-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gjs-field-colorp,
.gjs-clm-tags {
  border-radius: 10px;
  border-color: var(--panel-border);
}

.gjs-layer {
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  color: var(--text-main);
  background: transparent;
}

.gjs-layer:hover {
  background: rgba(88, 166, 255, 0.08);
}

.gjs-layer.gjs-selected {
  background: rgba(88, 166, 255, 0.16);
  color: var(--accent);
}

.gjs-layer-name {
  font-size: 12px;
}

.gjs-trt-trait {
  padding: 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}

.gjs-trt-trait__label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.gjs-toolbar {
  background: rgba(22, 27, 34, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.gjs-toolbar-item {
  color: var(--text-muted);
}

.gjs-toolbar-item:hover {
  color: var(--accent);
}

.gjs-badge {
  background: var(--accent);
  color: #0d1117;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}

.gjs-resizer-h {
  background: var(--accent);
  border: 1px solid #0d1117;
}

.gjs-rte-toolbar {
  background: rgba(22, 27, 34, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

.gjs-rte-actionbar .gjs-rte-action {
  color: var(--text-muted);
}

.gjs-rte-actionbar .gjs-rte-action:hover,
.gjs-rte-actionbar .gjs-rte-action.gjs-rte-active {
  color: var(--accent);
}

.brand-guide-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.08), rgba(88, 166, 255, 0.02));
}

.brand-guide-card__eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-guide-swatches,
.brand-guide-fonts {
  display: grid;
  gap: 10px;
}

.brand-guide-swatch,
.brand-guide-font {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.84);
}

.brand-guide-swatch__chip {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.brand-guide-swatch__value {
  font-size: 12px;
  font-weight: 600;
}

.brand-guide-font {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-guide-font strong {
  font-size: 18px;
  color: var(--text-strong);
}

.brand-guide-font span {
  font-size: 12px;
  color: var(--text-muted);
}

.odoo-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.odoo-card {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 34, 44, 0.96), rgba(22, 27, 34, 0.96));
  box-shadow: inset 0 1px 0 rgba(240, 246, 252, 0.02);
}

.odoo-card__header {
  padding: 16px 16px 0;
}

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

.odoo-card__header h3 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 14px;
}

.odoo-card__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.odoo-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

.odoo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.odoo-field span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.odoo-field input,
.odoo-field select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.88);
  color: var(--text-strong);
  outline: none;
  transition: border-color var(--transition-ui), box-shadow var(--transition-ui), background var(--transition-ui);
}

.odoo-field select {
  appearance: none;
}

.odoo-field input::placeholder {
  color: #66707b;
}

.odoo-field input:focus,
.odoo-field select:focus {
  border-color: rgba(88, 166, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.14);
}

.odoo-modules {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
}

.package-manager {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

.package-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(88, 166, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(17, 23, 31, 0.96), rgba(11, 17, 24, 0.98));
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-ui), transform var(--transition-ui), box-shadow var(--transition-ui), background var(--transition-ui);
}

.package-card:hover {
  border-color: rgba(88, 166, 255, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.package-card:focus-visible {
  outline: none;
  border-color: rgba(88, 166, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.16);
}

.package-card.is-active {
  border-color: rgba(46, 160, 67, 0.5);
  background: linear-gradient(180deg, rgba(18, 34, 27, 0.98), rgba(14, 24, 20, 0.98));
  box-shadow: inset 0 0 0 1px rgba(46, 160, 67, 0.16);
}

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

.package-card__header h4 {
  margin: 0 0 4px;
  color: var(--text-strong);
  font-size: 15px;
}

.package-card__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.package-card__badge,
.package-card__module,
.package-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.package-card__badge {
  padding: 0 10px;
  border: 1px solid rgba(88, 166, 255, 0.28);
  background: rgba(88, 166, 255, 0.12);
  color: #9fd2ff;
  white-space: nowrap;
}

.package-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-card__label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.package-card__modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.package-card__module {
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.package-card__action {
  align-self: flex-start;
  padding: 0 12px;
  border: 1px solid rgba(46, 160, 67, 0.24);
  background: rgba(46, 160, 67, 0.12);
  color: #7ee787;
}

.package-card.is-active .package-card__action {
  border-color: rgba(46, 160, 67, 0.42);
  background: rgba(46, 160, 67, 0.18);
}

.odoo-module {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition-ui);
}

.odoo-module:hover {
  background: rgba(88, 166, 255, 0.06);
}

.odoo-module.is-tier-enabled {
  background: rgba(46, 160, 67, 0.08);
}

.odoo-module.is-locked {
  background: rgba(255, 166, 0, 0.05);
}

.odoo-module.is-overridden {
  background: rgba(88, 166, 255, 0.08);
}

.odoo-module__meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.odoo-module__status {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #5b6570;
  box-shadow: 0 0 0 3px rgba(91, 101, 112, 0.14);
}

.odoo-module__status.is-active {
  background: #2ea043;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.16);
}

.odoo-module__label {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.odoo-module__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.odoo-module__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.odoo-module__lock {
  font-size: 12px;
}

.odoo-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.odoo-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.odoo-switch input:disabled {
  cursor: default;
}

.odoo-switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #39414b;
  transition: background var(--transition-ui);
}

.odoo-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #c9d1d9;
  transition: transform var(--transition-ui), background var(--transition-ui);
}

.odoo-switch input:checked + .odoo-switch__track {
  background: rgba(46, 160, 67, 0.55);
}

.odoo-switch input:checked + .odoo-switch__track::after {
  transform: translateX(20px);
  background: #ffffff;
}

.odoo-switch input:disabled + .odoo-switch__track {
  opacity: 0.8;
}

.odoo-settings__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.odoo-settings__status {
  min-height: 18px;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.odoo-settings__status[data-state='success'] {
  color: #7ee787;
}

.odoo-settings__status[data-state='error'] {
  color: var(--danger);
}

.odoo-settings__status[data-state='saving'] {
  color: var(--accent);
}

.odoo-settings__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(46, 160, 67, 0.3);
  border-radius: 999px;
  background: rgba(46, 160, 67, 0.16);
  color: #7ee787;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.leads-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.leads-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leads-stat {
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 34, 44, 0.98), rgba(18, 24, 31, 0.96));
}

.leads-stat__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leads-stat__value {
  color: var(--text-strong);
  font-size: 26px;
  line-height: 1;
}

.leads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 34, 44, 0.98), rgba(18, 24, 31, 0.96));
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-ui), transform var(--transition-ui), background var(--transition-ui);
}

.lead-card:hover {
  border-color: rgba(88, 166, 255, 0.42);
  background: linear-gradient(180deg, rgba(31, 40, 51, 0.98), rgba(21, 28, 36, 0.98));
  transform: translateY(-1px);
}

.lead-card__top,
.lead-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-card__meta {
  margin-top: 12px;
}

.lead-card__name {
  color: var(--text-strong);
  font-size: 14px;
}

.lead-card__date {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
}

.lead-card__pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.14);
  color: #9ccdff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead-card__stage {
  color: #7ee787;
  font-size: 12px;
  font-weight: 600;
}

.leads-panel__status,
.leads-panel__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 18px;
  border: 1px dashed rgba(139, 148, 158, 0.32);
  border-radius: 14px;
  background: rgba(13, 17, 23, 0.5);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.leads-panel__status--error {
  min-height: 120px;
  border-style: solid;
  border-color: rgba(248, 81, 73, 0.28);
  color: #ffb4ae;
}

.leads-panel__loading {
  flex-direction: column;
  gap: 12px;
}

.leads-panel__spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(201, 209, 217, 0.14);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.seo-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.seo-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    #11161d;
  box-shadow: var(--shadow-soft);
}

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

.seo-card__header h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 15px;
}

.seo-card__header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.seo-card__page {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(88, 166, 255, 0.24);
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.seo-field {
  display: grid;
  gap: 8px;
}

.seo-field > span,
.seo-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.seo-field input,
.seo-field textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #0d131a;
  color: var(--text-strong);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition-ui), box-shadow var(--transition-ui), background var(--transition-ui);
}

.seo-field textarea {
  min-height: 112px;
  resize: vertical;
}

.seo-field input::placeholder,
.seo-field textarea::placeholder {
  color: #6e7681;
}

.seo-field input:focus,
.seo-field textarea:focus {
  border-color: rgba(88, 166, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.14);
  background: #0f1720;
}

.seo-field__count {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.seo-field__count[data-state='warning'],
.seo-field__hint[data-state='warning'] {
  color: #ffb86b;
}

.seo-field__hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.seo-code-block {
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(48, 54, 61, 0.9);
  border-radius: 14px;
  background: #0a1016;
  color: #c5e4ff;
  font: 12px/1.6 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1180px) {
  .editor-header {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .toolbar-group--left,
  .toolbar-group--center,
  .toolbar-group--right {
    flex: 1 1 100%;
  }

  .toolbar-group--center,
  .toolbar-group--right {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .panel--left,
  .panel--right {
    width: 260px;
  }

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

  .site-selector select {
    min-width: 132px;
  }

  .toolbar-btn {
    padding-inline: 10px;
  }

  .toolbar-btn--device .toolbar-btn__label {
    display: none;
  }

  .toolbar-btn--device {
    min-width: 34px;
    justify-content: center;
    padding-inline: 10px;
  }

  .toolbar-viewport {
    padding-inline: 10px;
  }

  .workflow-status {
    width: 100%;
    justify-content: space-between;
  }

  .workflow-status__meta {
    white-space: normal;
  }

  .version-history {
    top: 0;
    width: 100vw;
  }

  .shortcuts-modal__row {
    grid-template-columns: 1fr;
  }

  .export-modal__dialog {
    margin-top: 6vh;
    padding: 20px;
  }

  .editor-search {
    left: 14px;
    right: 14px;
    width: auto;
    max-height: min(52vh, calc(100% - 28px));
  }

  .editor-search__bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .editor-search__count {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .editor-wrap.is-split-preview .editor-canvas__workspace {
    flex-basis: 55%;
    width: 55%;
  }

  .editor-wrap.is-split-preview .editor-preview {
    flex-basis: 45%;
    width: 45%;
  }
}

/* ── Phone (<520px) ── */
@media (max-width: 520px) {
  .editor-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    min-height: auto;
  }

  .toolbar-group--left {
    flex: 1 1 100%;
    order: 1;
  }

  .toolbar-group--center {
    display: none;
  }

  .toolbar-group--right {
    flex: 1 1 100%;
    order: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .logo {
    font-size: 11px;
  }

  .site-selector select {
    min-width: 100px;
    font-size: 12px;
  }

  .workflow-status {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .workflow-status__badge {
    min-width: 64px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 10px;
  }

  .workflow-status__meta {
    white-space: normal;
    font-size: 11px;
  }

  .site-health {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .toolbar-btn {
    padding-inline: 8px;
    min-height: 32px;
    font-size: 11px;
  }

  .toolbar-btn__label {
    font-size: 11px;
  }

  /* Panels: full-width overlay on phone */
  .panel--left,
  .panel--right {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 85vw;
    max-width: 320px;
    z-index: 100;
  }

  .panel--left {
    left: 0;
  }

  .panel--right {
    right: 0;
  }

  /* Hide panels by default on phone — toggle via JS */
  .editor-wrap:not(.is-left-panel-visible) .panel--left {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }

  .editor-wrap:not(.is-right-panel-visible) .panel--right {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
  }

  .editor-wrap.is-split-preview .editor-canvas__workspace,
  .editor-wrap.is-split-preview .editor-preview {
    flex-basis: 100%;
    width: 100%;
  }
}
