.nav-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overview-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 120ms ease;
}

.overview-link:hover,
.overview-link.active {
  background: transparent;
  color: var(--accent-strong);
}

.overview-link strong {
  display: inline;
  min-width: 0;
  height: auto;
  margin-left: auto;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.overview-link.active strong {
  background: transparent;
  color: var(--accent-strong);
}

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

.section-head h2 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list,
.prompt-list,
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-list {
  gap: 8px;
}

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

.category-node {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 9px 8px 9px 10px;
  color: var(--text);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.section-head .icon-button {
  border-color: transparent;
  background: transparent;
}

.section-head .icon-button:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent-strong);
}

.category-form {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.category-form[hidden] {
  display: none;
}

.category-form input {
  min-height: 36px;
}

.category-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nav-item:hover,
.nav-item.active {
  border-left-color: var(--accent);
  background: transparent;
  color: var(--accent-strong);
}

.nav-item span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.category-children {
  display: grid;
  gap: 4px;
  margin-left: 31px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.category-prompt {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 4px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-prompt:hover,
.category-prompt.active {
  background: transparent;
  color: var(--text);
}

.tag-cloud,
.placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.placeholder-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag.active,
.placeholder-chip {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tag-toggle {
  border-style: dashed;
  background: var(--panel-muted);
  color: var(--accent-strong);
}

.storage {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.storage-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.storage-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.storage-row.primary {
  color: var(--text);
  font-weight: 800;
}

.storage-row span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.main {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
}

.topbar h2 {
  font-size: 22px;
  line-height: 1.2;
}

.app-status {
  margin-bottom: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
}

.export-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-muted);
  padding: 4px;
}

.export-group .button {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
}

.search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
}

.workspace {
  min-height: calc(100vh - 79px);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state [data-icon] svg {
  width: 34px;
  height: 34px;
}

.empty-state h3 {
  color: var(--text);
  font-size: 16px;
}

.editor-empty-state {
  min-height: calc(100vh - 80px);
  padding: 24px;
}

.empty-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.text-action {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  font-size: 13px;
  font-weight: 800;
}

.text-action:hover,
.text-action.primary {
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
}

.text-action.danger {
  color: var(--red);
}

.text-action.danger:hover {
  border-bottom-color: var(--red);
}
