/* ==========================================================================
   NetPlanner Pro - Design System & Styles
   Interface moderna estilo CAD / Figma para Projetos de Infraestrutura de Rede
   ========================================================================== */

:root {
  --bg-main: #090d16;
  --bg-panel: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #273549;
  --bg-surface-active: #334155;
  --border-subtle: #1e293b;
  --border-default: #334155;
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  --header-height: 56px;
  --sidebar-left-width: 310px;
  --sidebar-right-width: 320px;
  --status-bar-height: 28px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 16px rgba(59, 130, 246, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  user-select: auto;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-default);
  padding: 0 16px;
  z-index: 100;
}

.topbar-left, .topbar-center, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-title-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 8px;
  width: 200px;
  transition: all 0.2s;
}

.project-title-input:hover {
  background: var(--bg-surface);
  border-color: var(--border-default);
}

.project-title-input:focus {
  background: var(--bg-surface);
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Tool Mode Selector (Centro) */
.tool-mode-group {
  display: flex;
  background: var(--bg-main);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  transition: all 0.15s ease;
}

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

.tool-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tool-btn svg {
  width: 15px;
  height: 15px;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 12px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue-hover);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  border-color: #1d4ed8;
  box-shadow: var(--shadow-glow);
}

.btn-outline-primary {
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

.btn-outline-primary:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-icon-only {
  padding: 6px;
  width: 32px;
  height: 32px;
}

.btn-icon-only svg {
  width: 16px;
  height: 16px;
}

.btn-group {
  display: flex;
  gap: 4px;
}

.zoom-pill {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px 4px;
}

.zoom-level-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 8px;
  min-width: 48px;
  text-align: center;
  font-family: var(--font-mono);
}

/* ==========================================================================
   WORKSPACE BODY (LEFT SIDEBAR, CANVAS, RIGHT SIDEBAR)
   ========================================================================== */

.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Sidebar: Catálogo de Ativos e Passivos */
.sidebar-left {
  width: var(--sidebar-left-width);
  min-width: var(--sidebar-left-width);
  max-width: var(--sidebar-left-width);
  background: var(--bg-panel);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow: hidden;
  box-sizing: border-box;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 6px 10px;
}

.search-box svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  width: 100%;
  font-size: 12px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.category-tabs {
  display: none !important;
}

.catalog-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   ACORDEÃO DE CATEGORIAS DE DISPOSITIVOS
   ========================================================================== */

.category-accordion-group {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.category-accordion-group:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.category-accordion-group.expanded {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.35), 0 0 10px rgba(59, 130, 246, 0.15);
}

.category-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  width: 100%;
  border: none;
  color: var(--text-primary);
}

.category-accordion-header:hover {
  background: var(--bg-surface-hover);
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.category-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.category-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.6);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.category-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s;
}

.category-accordion-group.expanded .category-chevron {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

.category-accordion-body {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 6px;
  background: rgba(9, 13, 22, 0.6);
  border-top: 1px solid var(--border-subtle);
  max-height: 380px; /* Grade 2x5 (até 10 itens visíveis sem rolagem) */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
  box-sizing: border-box;
}

.category-accordion-group.expanded .category-accordion-body {
  display: grid;
}

.category-accordion-body::-webkit-scrollbar {
  width: 5px;
}

.category-accordion-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.category-accordion-body::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

.category-accordion-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Card do Ativo no Catálogo - Formato Grade 2x5 */
.asset-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: all 0.15s ease;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
}

.asset-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(59, 130, 246, 0.2);
}

.asset-card:active {
  cursor: grabbing;
  transform: scale(0.98);
}

/* Barra de Título Superior do Card na Grade */
.asset-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 22px;
}

.asset-card-name {
  font-weight: 600;
  font-size: 10px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.asset-badge {
  font-size: 7.5px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.badge-ativo {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-passivo {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Área Visual Central da Grade 2x5 */
.asset-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 4px 4px 4px;
  position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.asset-card-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.18s ease;
}

.asset-card:hover .asset-card-icon {
  transform: scale(1.12);
}

.asset-card-icon svg {
  width: 100%;
  height: 100%;
}

.asset-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 3px;
}

.asset-code-prefix {
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.7);
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Quick Cable Selector Box */
.cable-presets-box {
  padding: 10px 12px 12px 12px;
  border-top: 1px solid var(--border-default);
  background: rgba(15, 23, 42, 0.6);
  width: 100%;
  box-sizing: border-box;
}

.cable-presets-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cable-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.cable-preset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cable-preset-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.cable-preset-btn.active {
  border-color: var(--border-focus);
  background: rgba(59, 130, 246, 0.15);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.cable-preset-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.cable-swatch {
  width: 12px;
  height: 3px;
  border-radius: 1px;
  flex-shrink: 0;
}

/* ==========================================================================
   CANVAS CONTAINER
   ========================================================================== */

.canvas-viewport-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-main);
}

#projectCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Floating Quick Bar sobre o Canvas */
.canvas-floating-bar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-default);
  padding: 6px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.cable-direction-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
}

/* ==========================================================================
   RIGHT SIDEBAR: INSPECTOR / PROPERTIES / LEGENDA
   ========================================================================== */

.sidebar-right {
  width: var(--sidebar-right-width);
  background: var(--bg-panel);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.inspector-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-default);
}

.inspector-tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.inspector-tab:hover {
  color: var(--text-primary);
}

.inspector-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.inspector-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.panel-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 12px;
  transition: border-color 0.15s;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.empty-selection-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  gap: 12px;
  color: var(--text-muted);
}

.empty-selection-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.empty-selection-icon svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   STATUS BAR (RODAPÉ)
   ========================================================================== */

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--status-bar-height);
  background: var(--bg-panel);
  border-top: 1px solid var(--border-default);
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  z-index: 100;
}

.status-bar-left, .status-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

/* ==========================================================================
   MODAL & TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 40px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  border: 1px solid var(--border-focus);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 500;
  animation: slideInRight 0.25s ease-out;
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-dialog {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 480px;
  max-width: 90vw;
  overflow: hidden;
  animation: modalScaleUp 0.2s ease-out;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-surface);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Dropzone styling */
.dropzone-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(15, 23, 42, 0.4);
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

/* Size & Tag Scale Presets */
.btn-size-preset, .btn-tag-scale, .btn-multi-size-preset {
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-size-preset:hover, .btn-tag-scale:hover, .btn-multi-size-preset:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-size-preset.active, .btn-tag-scale.active {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   PAINEL DE EDIÇÃO DE FORMAS GEOMÉTRICAS & CORES
   ========================================================================== */

.shape-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  cursor: pointer;
  background: transparent;
  padding: 0;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.shape-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.shape-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.shape-color-picker:hover {
  transform: scale(1.08);
  border-color: var(--accent-blue);
}

.color-chips-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.color-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  flex-shrink: 0;
}

.color-chip:hover {
  transform: scale(1.22);
  z-index: 2;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.color-chip.active {
  border-color: #ffffff !important;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.btn-stroke-w, .btn-stroke-style, .btn-shape-radius, .btn-shape-preset, .btn-rotation-preset, .btn-rotation-step, .btn-conn-font-preset, .btn-conn-font-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-stroke-w:hover, .btn-stroke-style:hover, .btn-shape-radius:hover, .btn-shape-preset:hover, .btn-rotation-preset:hover, .btn-rotation-step:hover, .btn-conn-font-preset:hover, .btn-conn-font-step:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-stroke-w.active, .btn-stroke-style.active, .btn-shape-radius.active, .btn-shape-preset.active, .btn-rotation-preset.active, .btn-conn-font-preset.active {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}


