/* ============================================
   MAPA MENTAL MAKER - Components
   ============================================ */

/* --- Botoes --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background-color: var(--accent-blue);
  color: var(--text-inverse);
  box-shadow: var(--shadow-xs);
}

.btn--primary:hover {
  background-color: #3D7AEE;
  box-shadow: var(--shadow-soft);
}

.btn--secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
}

.btn--ghost {
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.btn--danger {
  background-color: var(--accent-red);
  color: var(--text-inverse);
}

.btn--danger:hover {
  background-color: #E85D5D;
}

.btn--lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn--icon i {
  width: 18px;
  height: 18px;
}

/* --- Mind Map Node --- */
.mm-node {
  position: absolute;
  min-width: 120px;
  max-width: 280px;
  background-color: var(--node-default);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: var(--z-nodes);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  will-change: transform;
}

.mm-node:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.mm-node.selected {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
}

.mm-node.dragging {
  cursor: grabbing;
  box-shadow: var(--shadow-drag);
  z-index: var(--z-node-dragging);
}

.mm-node.central {
  min-width: 160px;
  border-width: 2px;
}

/* --- Node Color Stripe (borda superior colorida) --- */
.mm-node__stripe {
  height: 4px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background-color: var(--accent-blue);
}

.mm-node--blue .mm-node__stripe { background-color: var(--node-border-blue); }
.mm-node--green .mm-node__stripe { background-color: var(--node-border-green); }
.mm-node--orange .mm-node__stripe { background-color: var(--node-border-orange); }
.mm-node--purple .mm-node__stripe { background-color: var(--node-border-purple); }
.mm-node--red .mm-node__stripe { background-color: var(--node-border-red); }
.mm-node--teal .mm-node__stripe { background-color: var(--node-border-teal); }

.mm-node--blue { background-color: var(--node-blue); }
.mm-node--green { background-color: var(--node-green); }
.mm-node--orange { background-color: var(--node-orange); }
.mm-node--purple { background-color: var(--node-purple); }
.mm-node--red { background-color: var(--node-red); }
.mm-node--teal { background-color: var(--node-teal); }

/* --- Node Content --- */
.mm-node__content {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Header: icon + title in a row */
.mm-node__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mm-node__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.mm-node__icon svg {
  width: 16px;
  height: 16px;
}

.mm-node__text {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  outline: none;
  word-break: break-word;
  min-width: 40px;
  flex: 1;
}

.mm-node__text:empty::before {
  content: 'Digite aqui...';
  color: var(--text-muted);
  pointer-events: none;
}

.mm-node.central .mm-node__text {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-align: center;
}

/* Description: secondary text below title */
.mm-node__description {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--text-secondary);
  line-height: 1.4;
  outline: none;
  word-break: break-word;
  min-height: 0;
  transition: min-height var(--transition-fast), opacity var(--transition-fast);
}

.mm-node__description--empty {
  min-height: 0;
  opacity: 0;
  font-size: 0;
  margin: 0;
  padding: 0;
}

.mm-node:hover .mm-node__description--empty,
.mm-node.selected .mm-node__description--empty {
  opacity: 0.5;
  font-size: var(--text-xs);
  min-height: 14px;
}

.mm-node:hover .mm-node__description--empty::before,
.mm-node.selected .mm-node__description--empty::before {
  content: 'Duplo-clique para adicionar descricao';
  color: var(--text-muted);
  font-style: italic;
  pointer-events: none;
}

.mm-node__description:focus {
  opacity: 1 !important;
  font-size: var(--text-sm) !important;
  min-height: 18px !important;
}

/* --- Node Actions (visivel no hover) --- */
.mm-node__actions {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
}

.mm-node:hover .mm-node__actions,
.mm-node.selected .mm-node__actions {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.mm-node__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.mm-node__action-btn:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--text-inverse);
}

.mm-node__action-btn i {
  width: 12px;
  height: 12px;
}

/* --- Collapse Toggle --- */
.mm-node__collapse {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast), background-color var(--transition-fast);
}

.mm-node:hover .mm-node__collapse,
.mm-node.selected .mm-node__collapse {
  opacity: 1;
}

.mm-node__collapse:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.mm-node__collapse i {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-smooth);
}

.mm-node__collapse.collapsed i {
  transform: rotate(-90deg);
}

.mm-node__children-count {
  position: absolute;
  bottom: -12px;
  left: calc(50% + 16px);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 6px;
  height: 20px;
  line-height: 18px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.mm-node.has-collapsed-children .mm-node__children-count {
  opacity: 1;
}

/* --- Connection Port (para criar conexoes) --- */
.mm-node__port {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--accent-blue);
  border: 2px solid var(--bg-secondary);
  border-radius: var(--radius-full);
  cursor: crosshair;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.mm-node:hover .mm-node__port,
.mm-node.selected .mm-node__port {
  opacity: 1;
  transform: scale(1);
}

.mm-node__port--right {
  right: -6px;
  top: 50%;
  margin-top: -6px;
}

.mm-node__port--bottom {
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
}

.mm-node__port--left {
  left: -6px;
  top: 50%;
  margin-top: -6px;
}

.mm-node__port--top {
  top: -6px;
  left: 50%;
  margin-left: -6px;
}

/* --- Template Card --- */
.template-card {
  padding: var(--space-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.template-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-2px);
}

.template-card__name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
}

.template-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.template-card__preview {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.template-card__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

/* --- Color Picker Grid --- */
.color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: var(--text-primary);
}

/* --- Icon Grid --- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.icon-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  border: 1px solid transparent;
}

.icon-grid__item svg {
  width: 18px;
  height: 18px;
}

.icon-grid__item span {
  font-size: 10px;
  line-height: 1;
}

.icon-grid__item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.icon-grid__item.active {
  background-color: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.icon-grid__item--none {
  grid-column: span 1;
}

/* --- Outline Tree (Estrutura) --- */
.outline-tree {
  font-size: var(--text-sm);
}

.outline-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.outline-item:hover {
  background-color: var(--bg-hover);
}

.outline-item.active {
  background-color: var(--accent-blue-light);
}

.outline-item__indent {
  flex-shrink: 0;
}

.outline-item__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.outline-item__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Export Options --- */
.export-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.export-option:hover {
  border-color: var(--accent-blue);
  background-color: var(--node-blue);
}

.export-option__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.export-option__info {
  flex: 1;
}

.export-option__name {
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
}

.export-option__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- Tooltip --- */
.tooltip {
  position: fixed;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyboard Shortcut Badge --- */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--space-xs);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-muted);
}

.empty-state__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state__text {
  font-size: var(--text-sm);
  max-width: 200px;
}

/* --- Sidebar Toggle Button --- */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sidebar-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.sidebar-toggle__label {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.sidebar-toggle:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* --- Mobile sidebar overlay --- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-overlay);
  z-index: calc(var(--z-sidebar) - 1);
  display: none;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ============================================
   PREMIUM ADDITIONS
   ============================================ */

/* --- Node Tags --- */
.mm-node__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.mm-node__tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.6;
}

.mm-node__tag:hover {
  filter: brightness(0.9);
  transform: scale(0.95);
}

.mm-node__tag--blue { background: rgba(79, 140, 255, 0.15); color: #3B6FD9; }
.mm-node__tag--green { background: rgba(92, 196, 137, 0.15); color: #3DA66A; }
.mm-node__tag--orange { background: rgba(246, 169, 74, 0.15); color: #D48B2C; }
.mm-node__tag--purple { background: rgba(154, 109, 255, 0.15); color: #7B4FDB; }
.mm-node__tag--red { background: rgba(255, 107, 107, 0.15); color: #D94444; }
.mm-node__tag--teal { background: rgba(56, 189, 248, 0.15); color: #1A96CC; }
.mm-node__tag--pink { background: rgba(244, 114, 182, 0.15); color: #C9438A; }
.mm-node__tag--yellow { background: rgba(251, 191, 36, 0.15); color: #B88916; }

/* Dark mode tag adjustments */
[data-theme="dark"] .mm-node__tag--blue { background: rgba(79, 140, 255, 0.2); color: #7AACFF; }
[data-theme="dark"] .mm-node__tag--green { background: rgba(92, 196, 137, 0.2); color: #7EDBA3; }
[data-theme="dark"] .mm-node__tag--orange { background: rgba(246, 169, 74, 0.2); color: #F8C072; }
[data-theme="dark"] .mm-node__tag--purple { background: rgba(154, 109, 255, 0.2); color: #B48FFF; }
[data-theme="dark"] .mm-node__tag--red { background: rgba(255, 107, 107, 0.2); color: #FF8A8A; }
[data-theme="dark"] .mm-node__tag--teal { background: rgba(56, 189, 248, 0.2); color: #5DCEFA; }
[data-theme="dark"] .mm-node__tag--pink { background: rgba(244, 114, 182, 0.2); color: #F78CBE; }
[data-theme="dark"] .mm-node__tag--yellow { background: rgba(251, 191, 36, 0.2); color: #FCCF4D; }

/* --- Tag Input System --- */
.tag-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tag-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

/* --- Description textarea --- */
.description-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 52px;
  max-height: 120px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.description-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.tag-color-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-color-dot:hover {
  transform: scale(1.15);
}

.tag-color-dot.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px currentColor;
}

/* --- Node Premium Hover Effects --- */
.mm-node {
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.mm-node:hover:not(.dragging) {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.mm-node.selected {
  animation: nodeSelectionPulse 2s ease-in-out infinite;
}

@keyframes nodeSelectionPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--border-focus), 0 0 0 4px rgba(79, 140, 255, 0.15); }
  50% { box-shadow: 0 0 0 2px var(--border-focus), 0 0 0 6px rgba(79, 140, 255, 0.08); }
}

.mm-node.dragging {
  box-shadow: var(--shadow-drag) !important;
  transform: scale(1.02) !important;
  z-index: var(--z-node-dragging) !important;
}

/* --- Sidebar Tabs (Icon-only with tooltip) --- */
.sidebar__tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.sidebar__tab svg {
  width: 18px;
  height: 18px;
}

.sidebar__tab:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.sidebar__tab.active {
  color: var(--accent-blue);
  background-color: var(--accent-blue-light);
}

[data-theme="dark"] .sidebar__tab.active {
  background-color: rgba(79, 140, 255, 0.15);
}

/* Tooltip on hover */
.sidebar__tab::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 11px;
  font-weight: var(--weight-medium);
  border-radius: var(--radius-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 100;
}

.sidebar__tab:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sidebar__tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  justify-content: center;
}

/* --- Theme Toggle --- */
.theme-toggle {
  border-radius: var(--radius-full) !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}



/* --- Maps Toolbar (Header + Search) --- */
.home-maps-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.home-maps-toolbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.home-maps-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-maps-badge {
  font-size: var(--text-xs);
  color: var(--text-primary);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: var(--weight-medium);
}

/* --- Home search bar --- */
.home-search {
  position: relative;
  width: 200px;
}

.home-search__input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.home-search__input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.home-search__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.home-search__icon svg {
  width: 14px;
  height: 14px;
}

/* --- Maps Grid --- */
.home-maps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

/* --- Map Card (Notion-style list item premium) --- */
.home-map-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.home-map-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-map-card__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-map-card__icon {
  color: var(--accent-blue);
  background: rgba(79, 140, 255, 0.1);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: background var(--transition-fast);
}

.home-map-card:hover .home-map-card__icon {
  background: rgba(79, 140, 255, 0.2);
}

.home-map-card__icon svg {
  width: 20px;
  height: 20px;
}

.home-map-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.home-map-card__title {
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.home-map-card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.home-map-card__actions {
  display: flex;
  gap: 4px;
  opacity: 1; /* Sem esconder, sempre visível */
  transition: opacity var(--transition-fast);
}

.home-map-card__action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  cursor: pointer;
}

.home-map-card__action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.home-map-card__action-btn.danger:hover {
  background: var(--accent-red-light);
  color: var(--accent-red);
}

.home-map-card__action-btn svg {
  width: 14px;
  height: 14px;
}

/* --- Empty state --- */
.home-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}

.home-empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* --- Old map list header removed to prevent conflicts --- */

/* --- Global dark mode transition --- */
[data-theme="dark"] .header,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .canvas-container,
[data-theme="dark"] .home-screen,
[data-theme="dark"] .modal,
[data-theme="dark"] .context-menu {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

/* --- Responsive Home Screen Components --- */
@media (max-width: 767px) {
  .home-maps-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .home-search {
    width: 100%;
  }

  .home-content__actions {
    flex-direction: column !important;
    width: 100%;
  }

  .home-content__actions .btn {
    width: 100%;
  }
  
  .home-content__title {
    font-size: 2.2rem;
  }
}
