html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Segoe UI, Arial, sans-serif;
  background: #f6f7fb;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

.app {
  padding: 14px;
}

.app-header {
  margin-bottom: 14px;
}

.app-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.toolbar {
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.search-input:focus {
  border-color: #4f46e5;
}

.quick-sections {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.panel-header h2 {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 12px;
}

.link-button {
  border: none;
  background: transparent;
  color: #4f46e5;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.empty-state {
  font-size: 13px;
  color: #6b7280;
  padding: 10px 0;
}

.category-section {
  border: 1px solid #e8ecf3;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fafbff;
}

.subcategory-section {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #ffffff;
}

.section-toggle,
.subsection-toggle {
  width: 100%;
  border: none;
  background: #f3f6fb;
  text-align: left;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subsection-toggle {
  background: #f9fbff;
  font-size: 13px;
}

.section-body,
.subsection-body {
  padding: 12px;
}

.section-toggle-icon {
  color: #6b7280;
  font-size: 14px;
}

.placeholder-card {
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
}

.placeholder-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.placeholder-title-area {
  min-width: 0;
}

.placeholder-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.placeholder-key {
  margin-top: 4px;
  font-size: 12px;
  color: #4b5563;
  font-family: Consolas, Monaco, monospace;
  word-break: break-word;
}

.placeholder-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.placeholder-description {
  margin-top: 8px;
  font-size: 12px;
  color: #4b5563;
}

.placeholder-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-button {
  border: 1px solid #d7ddea;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
}

.insert-button {
  margin-top: 10px;
  width: 100%;
  border: none;
  background: #4f46e5;
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.insert-button:hover,
.icon-button:hover,
.link-button:hover,
.section-toggle:hover,
.subsection-toggle:hover {
  opacity: 0.92;
}

.placeholder-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.placeholder-main-button {
  border: 1px solid #e3e8f2;
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  min-height: 38px;
}

.placeholder-main-button:hover {
  background: #f8faff;
}

.placeholder-side-button {
  border: 1px solid #d7ddea;
  background: #fff;
  border-radius: 10px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 14px;
}

.placeholder-side-button:hover {
  background: #f8faff;
}