/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ebebeb;
  --card: #ffffff;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --muted: #888;
  --danger: #e17055;
  --success: #00b894;
  --radius: 8px;
}

/* ── Full-screen overlay (login) ──────────────────────────── */
.full-screen-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.full-screen-overlay.hidden {
  display: none;
}

.login-card {
  background: var(--card);
  border-radius: 12px;
  padding: 40px 36px;
  width: 360px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}
.login-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
  text-align: center;
}
.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #fdf0ee;
  border-radius: 6px;
}
.btn-full {
  width: 100%;
  margin-top: 4px;
}

/* ── Projects screen ──────────────────────────────────────── */
.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.projects-title {
  font-size: 18px;
  font-weight: 700;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.projects-empty {
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
}
.project-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.project-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.project-card-thumb-empty {
  background: #e8e8e8;
}
.project-card-body {
  padding: 12px 14px 10px;
  flex: 1;
}
.project-card-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.project-card-meta {
  font-size: 12px;
  color: var(--muted);
}
.project-card-actions {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.12s;
}
.project-card:hover .project-card-actions {
  opacity: 1;
}
.project-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1;
}
.project-action-btn:hover {
  background: #f0f0f0;
}
.project-action-danger:hover {
  background: #fdf0ee;
}
.project-delete-btn {
  display: none;
}

/* ── Admin panel ──────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #f8f8f8;
}
.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.role-admin {
  background: #e8f0ff;
  color: #3b5bdb;
}
.role-user {
  background: #e8f5e9;
  color: #2e7d32;
}
.btn-danger-sm {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger-sm:hover {
  background: #fdf0ee;
}

/* ── Header additions ─────────────────────────────────────── */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-weight: 500;
}
.btn-ghost:hover {
  background: #f0f0f0;
}
.user-badge {
  font-size: 12px;
  color: var(--muted);
  padding: 0 4px;
}
.project-name-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 0 4px;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  z-index: 10;
}

.app-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.view-tabs {
  display: flex;
  gap: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  transition:
    background 0.12s,
    color 0.12s;
}
.tab-btn:hover {
  background: #f0f0f0;
  color: var(--text);
}
.tab-btn.active {
  background: var(--text);
  color: #fff;
}

/* ── Main layout ──────────────────────────────────────────── */
.app-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.view {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}

#view-board:not(.hidden) {
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
}
.view.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

/* ── Board view ───────────────────────────────────────────── */
.board-section {
  flex-shrink: 0;
  width: 220px;
  background: #e0e0e0;
  border-radius: var(--radius);
  padding: 10px;
}

.board-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.board-section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.board-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.board-section-count {
  font-size: 11px;
  color: var(--muted);
  background: #e8e8e8;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}

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

.board-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border-top: 3px solid var(--accent, #888);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.board-card img {
  -webkit-user-drag: none;
  user-select: none;
}
.board-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.board-card.dragging {
  opacity: 0.4;
  transform: scale(0.97);
}
.board-cards.drag-over {
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.board-card-body {
  padding: 10px 12px 12px;
}

.board-card-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.badge-placeholder {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #e0e0e0;
  color: #666;
}

.backlink-badge {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}

.lock-badge {
  font-size: 10px;
  color: #fff;
  background: #e17055;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  white-space: nowrap;
}

/* ── Detail side panel ────────────────────────────────────── */
.side-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
}
.side-panel.hidden {
  display: none;
}

.side-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.side-content {
  position: relative;
  z-index: 1;
  background: var(--bg);
  width: min(92vw, 1100px);
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Detail content ───────────────────────────────────────── */
.detail-header {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-template {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
}

.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail-sections {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.detail-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
}

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

/* ── Field rendering ──────────────────────────────────────── */
.field-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.field-label {
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
}
.field-value {
  color: var(--text);
}
.field-value-empty {
  color: #ccc;
  font-style: italic;
}

.field-rich-text {
  font-size: 13px;
  color: #333;
  line-height: 1.55;
}

.field-image {
  width: 100%;
}
.field-img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.field-loot {
  font-style: italic;
  color: #555;
}

/* Reference chips */
.ref-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f5f5f5;
  border-left: 3px solid var(--accent, #888);
  border-radius: 4px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.ref-chip:hover {
  background: #eee;
}

.ref-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ref-chip-name {
  font-weight: 600;
}
.ref-chip-rel {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* Inline reference (inside field-row) */
.ref-chip-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border-left: 3px solid var(--accent, #888);
}
.ref-chip-inline:hover {
  background: #e8e8e8;
}

/* Recipe grid */
.field-recipe {
  margin-top: 2px;
}
.recipe-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-align: center;
}
.recipe-grid {
  border-collapse: collapse;
  width: 100%;
}
.recipe-grid td {
  border: 1px solid var(--border);
  padding: 5px 8px;
  font-size: 12px;
  text-align: center;
  background: #fafafa;
  min-width: 44px;
}

/* Checkbox list */
.field-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

/* ── Todo view ────────────────────────────────────────────── */
.todo-view {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.todo-group {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.todo-group-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-group-title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--group-color, #888);
}

.todo-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.todo-item:last-child {
  margin-bottom: 0;
}
.todo-item:hover {
  background: #fafafa;
}
.todo-item.complete {
  border-color: #b2dfdb;
}
.todo-item.empty {
  opacity: 0.65;
}

.todo-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.todo-item-name {
  font-weight: 600;
  flex: 1;
  font-size: 13px;
}
.todo-pct {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.todo-bar {
  height: 3px;
  background: #eee;
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.todo-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

.todo-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.todo-field {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
}
.todo-field.done {
  background: #d4f5e9;
  color: #00897b;
}
.todo-field.missing {
  background: #fde8e4;
  color: #c0392b;
}

/* ── Mindmap view ─────────────────────────────────────────── */
#view-mindmap {
  padding: 0;
}
#cy {
  width: 100%;
  height: 100%;
}
#cy canvas {
  image-rendering: pixelated;
}

/* ── Modal (create/edit form) ─────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  padding: 24px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.form-header h2 {
  font-size: 17px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 14px;
}
.form-group > label:first-child {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--text);
}

.form-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.form-section legend {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #555;
  padding: 0 6px;
}

.req {
  color: var(--danger);
}

.multi-entry-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

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

.multi-entry-row input[type="text"] {
  flex: 1;
}

.multi-entry-row select {
  flex: 0 0 160px;
}

.btn-add-entry {
  font-size: 12px;
  padding: 4px 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.btn-add-entry:hover {
  background: #f0f0f0;
  color: var(--text);
}

.btn-remove-entry {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
}
.btn-remove-entry:hover {
  color: var(--danger);
  background: #fdf0ee;
}

.img-upload-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.img-upload-preview {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  image-rendering: pixelated;
}

.img-upload-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  color: var(--muted);
  font-size: 12px;
}

.img-upload-btn {
  font-size: 12px;
  padding: 4px 12px;
  background: #f0f0f0;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}
.img-upload-label:hover .img-upload-btn {
  background: #e4e4e4;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin-bottom: 4px;
  color: var(--text) !important;
}
.checkbox-label input {
  width: auto !important;
}

.recipe-grid-edit td input {
  width: 70px;
  text-align: center;
  padding: 4px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--text);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}

/* ── Incomplete obtained FAB ──────────────────────────────── */
.incomplete-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f39c12;
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 90;
  transition: background 0.15s, transform 0.15s;
}
.incomplete-fab:hover { background: #e67e22; transform: scale(1.08); }

.incomplete-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.incomplete-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 300px;
  max-height: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 89;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.incomplete-panel.hidden { display: none; }

.incomplete-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.incomplete-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.incomplete-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.incomplete-item:hover { background: var(--bg); }

.incomplete-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.incomplete-item-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incomplete-item-type {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
}
.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.btn-danger:hover {
  background: #fff5f3;
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  font-family: inherit;
}
.btn-icon:hover {
  background: #f0f0f0;
}

/* ── Misc ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state p {
  margin-bottom: 16px;
  font-size: 15px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.error-state {
  background: #fff5f3;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--danger);
  margin: 20px;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
