body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.18), transparent 22%),
    radial-gradient(circle at right top, rgba(59, 130, 246, 0.18), transparent 26%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #0f172a;
}

.editor_page {
  width: min(1440px, calc(100% - 32px));
  margin: 20px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor_workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor_card,
.editor_header_card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 40px -24px rgba(15, 23, 42, 0.35);
  border-radius: 24px;
  padding: 18px;
  backdrop-filter: blur(12px);
}

.editor_header_card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.editor_console_bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.editor_console_main {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 1;
}

.editor_search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 320px;
  flex: 1;
}

.editor_search_label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.editor_search input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  color: #0f172a;
}

.editor_search input:focus,
.editor_field input:focus,
.editor_field textarea:focus,
.editor_field select:focus,
.editor_json_output:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.editor_quick_actions,
.editor_top_actions,
.editor_export_actions,
.editor_row_actions,
.editor_auth_row,
.editor_stats,
.editor_section_bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor_stats {
  flex-wrap: wrap;
  justify-content: end;
}

.editor_stat {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor_shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.editor_sidebar,
.editor_main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.editor_sidebar {
  position: sticky;
  top: 16px;
}

.editor_eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2563eb;
  font-weight: 700;
}

.editor_title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.editor_desc,
.editor_tip {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.editor_status {
  margin-top: 12px;
}

.editor_auth_card {
  max-width: 560px;
}

.editor_auth_field {
  flex: 1;
}

.editor_section_bar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.editor_section_title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.editor_primary_button,
.editor_secondary_button,
.editor_link_button,
.editor_ghost_button {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.editor_primary_button {
  background: #0f172a;
  color: #fff;
}

.editor_secondary_button,
.editor_link_button {
  background: #fff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.editor_ghost_button {
  background: transparent;
  color: #475569;
  border-color: transparent;
}

.editor_form_grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.editor_stack,
.editor_sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor_stack_compact {
  gap: 10px;
  margin-top: 12px;
}

.editor_nav_list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor_nav_item {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.editor_nav_item.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
}

.editor_nav_label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.editor_nav_count {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.editor_item,
.editor_group_section,
.editor_link_card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
}

.editor_item[draggable="true"],
.editor_link_card[draggable="true"] {
  cursor: default;
}

.editor_item.is-dragging,
.editor_link_card.is-dragging {
  opacity: 0.55;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.editor_item {
  padding: 14px;
}

.editor_stack_compact .editor_item {
  padding: 12px;
  border-radius: 16px;
}

.editor_stack_compact .editor_item_header {
  margin-bottom: 10px;
}

.editor_stack_compact .editor_item_grid {
  gap: 10px;
}

.editor_item_header,
.editor_group_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.editor_item_header {
  margin-bottom: 12px;
}

.editor_item_title,
.editor_group_title {
  font-size: 15px;
  font-weight: 700;
}

.editor_item_title {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.editor_field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

.editor_field.is-wide {
  grid-column: 1 / -1;
}

.editor_field span {
  font-weight: 600;
}

.editor_field input,
.editor_field textarea,
.editor_field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
}

.editor_field textarea {
  min-height: 90px;
  resize: vertical;
}

.editor_group_section {
  overflow: hidden;
}

.editor_group_header {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
  border-bottom: 1px solid #e2e8f0;
}

.editor_group_meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.editor_group_body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.editor_group_section.is-collapsed .editor_group_body {
  display: none;
}

.editor_link_card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.editor_link_card summary::-webkit-details-marker {
  display: none;
}

.editor_link_card[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

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

.editor_drag_handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.editor_drag_handle_link {
  margin-right: 2px;
}

.editor_link_icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  object-fit: cover;
  border: 1px solid #dbeafe;
  flex-shrink: 0;
}

.editor_link_fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
}

.editor_link_text {
  min-width: 0;
}

.editor_link_title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.editor_link_subtitle,
.editor_link_url {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.editor_link_tag {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.editor_link_body {
  padding: 14px 16px 16px;
}

.editor_json_output {
  width: 100%;
  min-height: 260px;
  margin-top: 12px;
  border: 1px solid #1e293b;
  border-radius: 18px;
  background: #0f172a;
  color: #dbeafe;
  padding: 16px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.editor_empty {
  padding: 18px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  background: #f8fafc;
}

.is-hidden {
  display: none !important;
}

.editor_sidebar_panel {
  padding: 0;
  overflow: hidden;
}

.editor_sidebar_summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor_sidebar_summary::-webkit-details-marker {
  display: none;
}

.editor_sidebar_panel[open] .editor_sidebar_summary {
  border-bottom: 1px solid #e2e8f0;
}

.editor_sidebar_panel #groups-editor {
  padding: 12px 14px 14px;
}

@media (hover: hover) {
  .editor_primary_button:hover {
    background: #1e293b;
  }

  .editor_secondary_button:hover,
  .editor_link_button:hover,
  .editor_nav_item:hover {
    background: #f8fafc;
  }

  .editor_ghost_button:hover {
    background: #f1f5f9;
  }
}

@media screen and (max-width: 1100px) {
  .editor_shell {
    grid-template-columns: 1fr;
  }

  .editor_sidebar {
    position: static;
  }
}

@media screen and (max-width: 900px) {
  .editor_header_card,
  .editor_console_bar,
  .editor_console_main,
  .editor_section_bar,
  .editor_group_header,
  .editor_item_header,
  .editor_link_card summary {
    flex-direction: column;
    align-items: stretch;
  }

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

  .editor_top_actions,
  .editor_quick_actions,
  .editor_export_actions,
  .editor_row_actions,
  .editor_auth_row {
    flex-wrap: wrap;
  }

  .editor_search {
    min-width: 0;
  }
}
