/* ==========================================================================
   GEZO mindmap — Arhitektura & Pregled kompleksnih sistemov
   Barvna shema po wall2.jpg (#999999 nevtralna siva, #ffffff bela, #ffcc00 zlata)
   ========================================================================== */

:root {
  /* Osnovna barvna paleta (Temna grafitna tema po motivu wall2.jpg) */
  --bg-primary: #1c1c1c;
  /* Globoko grafitno ozadje platna */
  --bg-secondary: #262626;
  /* Glava, paneli in modalna okna */
  --bg-tertiary: #333333;
  /* Orodne vrstice in vnosna polja */
  --bg-surface: #3d3d3d;
  /* Poudarjena površina ob prehodu */
  --bg-card: rgba(38, 38, 38, 0.95);
  --bg-card-hover: rgba(54, 54, 54, 0.96);

  --text-primary: #ffffff;
  /* Čista bela (wall2.jpg) */
  --text-secondary: #d4d4d4;
  /* Svetlo siva */
  --text-muted: #999999;
  /* Nevtralna siva iz wall2.jpg */

  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #ffcc00;
  /* Značilna GEZO rumeno-zlata */
  --border-active: #e6b800;

  --accent-primary: #ffcc00;
  /* GEZO Gold / Rumena (wall2.jpg & plogo_2.png) */
  --accent-hover: #ffd633;
  --accent-secondary: #999999;
  /* Nevtralna siva (wall2.jpg) */
  --accent-danger: #ef4444;
  /* Rdeča */
  --accent-success: #10b981;
  /* Zelena */
  --accent-warning: #f97316;
  /* Oranžna (opozorila in izbor) */

  /* Kategorije / Sloji sistemov */
  --cat-core: #3b82f6;
  /* Modra */
  --cat-frontend: #06b6d4;
  /* Turkizna */
  --cat-backend: #6366f1;
  /* Indigo */
  --cat-database: #10b981;
  /* Smaragdna */
  --cat-api: #ffcc00;
  /* GEZO Gold */
  --cat-queue: #8b5cf6;
  /* Vijolična */
  --cat-infra: #ec4899;
  /* Roza */
  --cat-security: #ef4444;
  /* Rdeča */
  --cat-external: #999999;
  /* Nevtralna siva (wall2.jpg) */

  /* Sence in učinki */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-node: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-node-selected: 0 0 0 2px var(--accent-primary), 0 12px 30px rgba(255, 204, 0, 0.25);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-height: 56px;
  --inspector-width: 380px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Svetla tema (po motivu wall2.jpg: nevtralna siva #999999, bela #ffffff, zlata #ffcc00) */
body.light-theme {
  --bg-primary: #e5e5e5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #efefef;
  --bg-surface: #e0e0e0;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #fafafa;

  --text-primary: #171717;
  --text-secondary: #404040;
  --text-muted: #666666;

  --border-color: rgba(0, 0, 0, 0.12);
  --border-focus: #d9a300;
  --border-active: #b38600;

  --accent-primary: #d9a300;
  --accent-hover: #b38600;

  --shadow-node: 0 8px 20px -3px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.07);
  --shadow-node-selected: 0 0 0 2px #e6b800, 0 10px 25px rgba(255, 204, 0, 0.28);
}

/* Reset in osnovno oblikovanje */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Pomožni razredi */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.flex-1 {
  flex: 1;
  min-width: 0;
}

.text-muted {
  color: var(--text-muted);
  font-size: 12px;
}

/* ==========================================================================
   GLAVNA ORODNA VRSTICA (Header)
   ========================================================================== */
.app-header {
  position: relative;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

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

.header-center {
  flex: 1;
  max-width: 420px;
}

/* Logotip & Brand */
.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-logo-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #3a3a3a;
  border: 1px solid rgba(255, 204, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

body.light-theme .brand-logo-wrap {
  background: #999999;
  border-color: rgba(0, 0, 0, 0.15);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.18);
  display: block;
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.brand-title strong {
  color: var(--accent-primary);
  font-weight: 800;
  letter-spacing: 0.3px;
}

body.light-theme .brand-title strong {
  color: #b38600;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

.viewer-project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Izbira projekta (Slug) */
.project-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 4px 2px 8px;
  gap: 6px;
}

.project-tag {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.slug-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  width: 130px;
  padding: 2px 4px;
  outline: none;
}

.slug-input:focus {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

/* Gumb za shranjevanje v glavi (Save Button) */
.btn-save {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  cursor: pointer;
}

.btn-save:hover:not(:disabled) {
  background: rgba(255, 204, 0, 0.14);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-save.has-changes {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.65);
  color: #fb923c;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.25);
  animation: pulse-save-btn 2.5s infinite;
}

.btn-save.has-changes:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.3);
  border-color: #f97316;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.4);
}

.btn-save.saving {
  opacity: 0.8;
  cursor: wait;
}

.save-changes-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f97316;
  box-shadow: 0 0 6px #f97316;
  display: inline-block;
  margin-left: 1px;
}

@keyframes pulse-save-btn {

  0%,
  100% {
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 4px rgba(249, 115, 22, 0.2);
  }

  50% {
    border-color: rgba(249, 115, 22, 0.85);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.45);
  }
}

body.light-theme .btn-save {
  background: #efefef;
  border-color: #cccccc;
  color: #333333;
}

body.light-theme .btn-save:hover:not(:disabled) {
  background: #fef9c3;
  border-color: #d9a300;
  color: #9a6b00;
}

body.light-theme .btn-save.has-changes {
  background: #ffedd5;
  border-color: #f97316;
  color: #c2410c;
}

/* Indikator shranjevanja */
.save-status-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-left: 4px;
}

.badge-local-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  letter-spacing: 0.2px;
  user-select: none;
}

body.light-theme .badge-local-mode {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  transition: background-color 0.3s;
}

.status-indicator.unsaved {
  background-color: var(--accent-warning);
  box-shadow: 0 0 6px var(--accent-warning);
}

.status-indicator.saving {
  background-color: var(--accent-primary);
  animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.3);
  }
}

/* Iskalnik */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  width: 100%;
  color: var(--text-secondary);
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.22);
}

.search-box svg {
  color: var(--text-muted);
  margin-right: 6px;
  flex-shrink: 0;
}

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

.btn-clear-search {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.search-count {
  font-size: 11px;
  background: var(--accent-primary);
  color: #171717;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  margin-left: 4px;
}

/* Gumbi in skupine gumbov */
.button-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #ffcc00;
  color: #171717;
  font-weight: 700;
}

.btn-primary:hover {
  background: #ffd633;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.38);
}

body.light-theme .btn-primary:hover {
  background: #e6b800;
  box-shadow: 0 2px 10px rgba(202, 138, 4, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-icon-text {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
}

.btn-icon-text:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

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

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

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

.btn-outline:hover {
  border-color: var(--border-focus);
  color: var(--accent-primary);
}

.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
}

/* Spustni meniji (Dropdowns) */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.dropdown-menu.dropdown-menu-right {
  left: auto;
  right: 0;
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s ease;
}

.dropdown-menu button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.menu-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ==========================================================================
   GLAVNO OBMOČJE S PLATNOM (Viewport & World)
   ========================================================================== */
.app-main {
  position: relative;
  height: calc(100% - var(--header-height));
  display: flex;
  overflow: hidden;
}

.canvas-viewport {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  cursor: grab;
  user-select: none;
  outline: none;
}

.canvas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-viewport.is-connecting {
  cursor: crosshair !important;
}

/* Mreža ozadja platna */
.canvas-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.1) 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px, 120px 120px, 120px 120px;
  pointer-events: none;
}

body.light-theme .canvas-grid-bg {
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.12) 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Premakljiv in povečljiv svet (World container) */
.canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* ==========================================================================
   SVG PLAST ZA POVEZAVE (Edges)
   ========================================================================== */
.connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: visible !important;
  pointer-events: none;
  z-index: 10;
}

.connections-svg path {
  pointer-events: stroke;
  cursor: pointer;
}

/* Povezovalna črta */
.connection-edge {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2.2px;
  stroke-linecap: round;
  transition: stroke 0.15s, stroke-width 0.15s;
}

.connection-edge:hover {
  stroke: var(--accent-hover);
  stroke-width: 3.5px;
}

/* Dvojna črta za dvosmerne povezave */
.connection-edge.is-double {
  stroke-width: 1.8px;
}

.connection-edge.is-double:hover {
  stroke-width: 2.4px;
}

.connection-edge-group {
  cursor: pointer;
}

.connection-edge-group:hover .connection-edge {
  stroke: var(--accent-hover);
}

.connection-edge-group.selected .connection-edge {
  stroke: #f97316 !important;
  stroke-width: 2.4px !important;
}

.connection-hit-area {
  pointer-events: stroke;
}

.connection-edge.selected {
  stroke: #f97316 !important;
  stroke-width: 3.2px !important;
  stroke-dasharray: 6, 4 !important;
  animation: edge-flow 1.2s linear infinite;
}

/* Vrste črt povezav */
.connection-edge.pattern-solid {
  stroke-dasharray: none;
}

.connection-edge.pattern-dashed {
  stroke-dasharray: 8, 5;
}

.connection-edge.pattern-dotted {
  stroke-dasharray: 2.5, 4.5;
  stroke-linecap: round;
}

.connection-edge.is-parent {
  stroke-width: 2.5px;
  opacity: 1;
}

@keyframes edge-flow {
  from {
    stroke-dashoffset: 20;
  }

  to {
    stroke-dashoffset: 0;
  }
}

/* Začasna povezovalna linija med vlečenjem */
.temp-connection {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2.5px;
  stroke-dasharray: 5, 5;
  animation: edge-flow 0.8s linear infinite;
  pointer-events: none !important;
}

/* Labele povezav */
.edge-label-group {
  pointer-events: all;
  cursor: pointer;
}

.edge-label-bg {
  fill: var(--bg-secondary);
  stroke: var(--border-color);
  stroke-width: 1px;
  rx: 4px;
  ry: 4px;
  filter: url(#label-shadow);
  transition: all 0.15s ease;
}

.edge-label-group:hover .edge-label-bg {
  fill: var(--bg-tertiary);
  stroke: var(--accent-primary);
}

.edge-label-text {
  fill: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
  user-select: none;
}

.edge-label-group:hover .edge-label-text {
  fill: var(--text-primary);
}

/* ==========================================================================
   VOZLIŠČA (Nodes)
   ========================================================================== */
.nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
}

.node {
  position: absolute;
  width: 240px;
  min-height: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-node);
  backdrop-filter: blur(8px);
  cursor: move;
  transition: transform 0.05s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
  user-select: none;
}

.node:hover {
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.node.selected {
  box-shadow: var(--shadow-node-selected) !important;
  border-color: var(--accent-primary) !important;
  z-index: 50;
}

.node.is-dragging {
  cursor: grabbing !important;
  opacity: 0.9;
  z-index: 100 !important;
}

/* Stanja iskanja */
.node.search-dimmed {
  opacity: 0.18;
  filter: grayscale(80%);
}

.node.search-matched {
  box-shadow: 0 0 0 3px #f97316, 0 12px 30px rgba(249, 115, 22, 0.35) !important;
  border-color: #f97316 !important;
}

/* Poudarjen zgornji rob vozlišča glede na kategorijo */
.node-accent-bar {
  height: 4px;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  background-color: var(--cat-core);
}

/* Vsebina vozlišča */
.node-body {
  padding: 10px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.node-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.node-category-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.node-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-progress-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 204, 0, 0.14);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.32);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

body.light-theme .node-progress-badge:not(.pct-100):not(.pct-low):not(.pct-zero) {
  background: rgba(234, 179, 8, 0.14);
  color: #9a6b00;
  border-color: rgba(202, 138, 4, 0.35);
}

.node-progress-badge.pct-100 {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.45);
}

.node-progress-badge.pct-low {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.node-progress-badge.pct-zero {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

.node-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  flex-shrink: 0;
}

.node-status-dot.status-active {
  background-color: #10b981;
}

.node-status-dot.status-in_progress {
  background-color: #f59e0b;
}

.node-status-dot.status-planned {
  background-color: #38bdf8;
}

.node-status-dot.status-critical {
  background-color: #ef4444;
}

.node-status-dot.status-deprecated {
  background-color: #64748b;
}

/* Tanka vrstica napredka pod nazivom */
.node-progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 1px 0 2px 0;
}

body.light-theme .node-progress-bar-container {
  background: rgba(0, 0, 0, 0.08);
}

.node-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #10b981);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.node-progress-bar-fill.pct-100 {
  background: #10b981;
}

.node-progress-bar-fill.pct-zero {
  width: 0% !important;
}

.node-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  outline: none;
  word-break: break-word;
}

.node-title[contenteditable="true"] {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 4px;
  border-radius: 4px;
  cursor: text;
}

.node-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Funkcionalnosti in postavke na kartici (Features) */
.node-features-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .node-features-container {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.node-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

body.light-theme .node-feature-item {
  color: #334155;
}

.node-feature-bullet {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.node-feature-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-feature-pct {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 204, 0, 0.14);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.28);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

body.light-theme .node-feature-pct:not(.pct-100):not(.pct-zero) {
  background: rgba(234, 179, 8, 0.14);
  color: #9a6b00;
  border-color: rgba(202, 138, 4, 0.3);
}

.node-feature-pct.pct-100 {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

.node-feature-pct.pct-zero {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Oznake (Tags) */
.node-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.node-tag-pill {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid rgba(255, 204, 0, 0.3);
  color: #ffe066;
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

body.light-theme .node-tag-pill {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(202, 138, 4, 0.32);
  color: #854d0e;
}

/* Gumb za razpiranje / zlaganje otrok */
.node-collapse-toggle {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, background-color 0.15s;
}

.node-collapse-toggle:hover {
  background: var(--accent-primary);
  color: #171717;
  transform: translateY(-50%) scale(1.15);
}

/* Povezovalne točke (Port handles za vlečenje povezave) */
.port-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  cursor: crosshair;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s;
}

.node:hover .port-handle,
.node.selected .port-handle {
  opacity: 1;
}

.port-handle:hover {
  background-color: var(--accent-primary);
  transform: scale(1.3);
}

.port-handle.port-top {
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
}

.port-handle.port-top:hover {
  transform: translateX(-50%) scale(1.3);
}

.port-handle.port-bottom {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
}

.port-handle.port-bottom:hover {
  transform: translateX(-50%) scale(1.3);
}

.port-handle.port-left {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.port-handle.port-left:hover {
  transform: translateY(-50%) scale(1.3);
}

.port-handle.port-right {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.port-handle.port-right:hover {
  transform: translateY(-50%) scale(1.3);
}

/* ==========================================================================
   PLAVAJOČE KONTROLE & MINIMAP
   ========================================================================== */
.floating-controls {
  position: absolute;
  z-index: 80;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  padding: 4px;
}

.zoom-controls {
  bottom: 20px;
  left: 20px;
  gap: 2px;
}

.btn-floating {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-floating:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-zoom-level {
  width: auto;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.floating-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 4px;
}

/* Navodila na dnu platna */
.canvas-hints {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  background: rgba(28, 28, 28, 0.88);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

body.light-theme .canvas-hints {
  background: rgba(255, 255, 255, 0.92);
}

.hint-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin: 0 2px;
}

/* Mini-zemljevid (Minimap) */
.minimap-wrapper {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
}

.btn-mini-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.minimap-canvas-container {
  position: relative;
  width: 180px;
  height: 110px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.minimap-wrapper.collapsed .minimap-canvas-container {
  display: none;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.minimap-viewport-indicator {
  position: absolute;
  border: 1.5px solid var(--accent-primary);
  background: rgba(255, 204, 0, 0.16);
  pointer-events: none;
  border-radius: 2px;
}

/* ==========================================================================
   STRANSKA PLOŠČA (Inspector)
   ========================================================================== */
.inspector-panel {
  width: var(--inspector-width);
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 90;
  transition: margin-right 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.28);
  position: relative;
}

.inspector-panel.collapsed {
  margin-right: calc(-1 * var(--inspector-width));
  box-shadow: none;
  pointer-events: none;
}

.inspector-header {
  padding: 12px 16px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inspector-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.inspector-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
}

/* Prilagojeni tanki drsniki (Scrollbars) za inšpektor */
.inspector-body::-webkit-scrollbar,
.features-inspector-list::-webkit-scrollbar,
.connections-list::-webkit-scrollbar {
  width: 5px;
}

.inspector-body::-webkit-scrollbar-track,
.features-inspector-list::-webkit-scrollbar-track,
.connections-list::-webkit-scrollbar-track {
  background: transparent;
}

.inspector-body::-webkit-scrollbar-thumb,
.features-inspector-list::-webkit-scrollbar-thumb,
.connections-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.inspector-body::-webkit-scrollbar-thumb:hover,
.features-inspector-list::-webkit-scrollbar-thumb:hover,
.connections-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.inspector-body,
.features-inspector-list,
.connections-list {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.inspector-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Obrazci in polja */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-control {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25);
}

body.light-theme .form-control {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-primary);
}

body.light-theme .form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(217, 163, 0, 0.22);
}

select.form-control {
  cursor: pointer;
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
  line-height: 1.45;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Izbira barve */
.color-palette-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}

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

.color-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.custom-color-input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  vertical-align: middle;
}

.custom-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Seznam povezav v inšpektorju */
.inspector-section {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h3,
.inspector-section h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}

.connections-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  gap: 8px;
  transition: border-color 0.15s, background-color 0.15s;
}

.connection-item:hover {
  border-color: rgba(255, 204, 0, 0.4);
  background: rgba(255, 204, 0, 0.06);
}

body.light-theme .connection-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.connection-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.connection-item-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.connection-label-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-muted);
  flex-shrink: 0;
}

body.light-theme .connection-label-badge {
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

.btn-remove-conn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}

.btn-remove-conn:hover {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.15);
}

/* Zaključenost komponente v inšpektorju */
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-percent-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(255, 204, 0, 0.14);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.32);
  font-variant-numeric: tabular-nums;
}

body.light-theme .progress-percent-badge:not(.pct-100):not(.pct-low) {
  color: #9a6b00;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(202, 138, 4, 0.35);
}

.progress-percent-badge.pct-100 {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}

.progress-percent-badge.pct-low {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

.progress-slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

body.light-theme .progress-slider {
  background: #e2e8f0;
}

.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.1s;
}

.progress-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.progress-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

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

.btn-quick-pct {
  flex: 1;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-theme .btn-quick-pct {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #334155;
}

.btn-quick-pct:hover {
  background: rgba(255, 204, 0, 0.15);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.btn-quick-pct.active {
  background: #ffcc00;
  color: #171717;
  border-color: #ffcc00;
  font-weight: 700;
}

/* Inšpektor seznam funkcionalnosti */
.features-inspector-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.feature-inspector-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  transition: border-color 0.15s, background-color 0.15s;
}

.feature-inspector-row:focus-within {
  border-color: var(--border-focus);
}

body.light-theme .feature-inspector-row {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.feature-inp-text {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.feature-inp-pct {
  width: 52px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 4px;
  text-align: right;
  outline: none;
}

body.light-theme .feature-inp-pct {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--accent-primary);
}

.btn-remove-feature {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
}

.btn-remove-feature:hover {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.15);
}

/* Inšpektor povezav (Edge Inspector) */
.edge-color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-sm {
  font-size: 12px;
}

/* Dejanja inšpektorja */
.inspector-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* Statistika sistema (Globalni inšpektor) */
.system-stats-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.light-theme .system-stats-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.system-stats-card h3 {
  font-size: 14px;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.stat-item {
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

body.light-theme .stat-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Skupna zaključenost celotnega sistema */
.system-overall-progress-wrapper {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.progress-label-row strong {
  color: var(--accent-success);
  font-size: 13px;
  font-weight: 700;
}

.system-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

body.light-theme .system-progress-bar-bg {
  background: rgba(0, 0, 0, 0.08);
}

.system-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-pill {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-pill.core {
  background: var(--cat-core);
}

.legend-pill.frontend {
  background: var(--cat-frontend);
}

.legend-pill.backend {
  background: var(--cat-backend);
}

.legend-pill.database {
  background: var(--cat-database);
}

.legend-pill.api {
  background: var(--cat-api);
}

.legend-pill.queue {
  background: var(--cat-queue);
}

.legend-pill.infra {
  background: var(--cat-infra);
}

.legend-pill.security {
  background: var(--cat-security);
}

.legend-pill.external {
  background: var(--cat-external);
}

.tips-list {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   MODALNA OKNA (Modals)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modal-fade-in 0.18s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-dialog-sm {
  max-width: 400px;
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

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

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.modal-static-value {
  background: var(--bg-tertiary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--accent-primary);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.1);
}

/* Tabela bližnjic */
.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.shortcuts-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.shortcuts-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 11px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
}

.api-test-result {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.api-test-result.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.api-test-result.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Predloge za nov projekt */
.template-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.template-option {
  display: flex;
  cursor: pointer;
  user-select: none;
}

.template-option input[type="radio"] {
  display: none;
}

.template-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.template-card:hover {
  border-color: rgba(255, 204, 0, 0.4);
  background: rgba(255, 204, 0, 0.05);
}

.template-option input[type="radio"]:checked+.template-card {
  border-color: var(--accent-primary);
  background: rgba(255, 204, 0, 0.1);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

body.light-theme .template-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .template-card:hover {
  border-color: rgba(217, 163, 0, 0.4);
  background: rgba(255, 204, 0, 0.06);
}

body.light-theme .template-option input[type="radio"]:checked+.template-card {
  background: rgba(255, 204, 0, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.template-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.template-info {
  flex: 1;
  min-width: 0;
}

.template-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.template-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* ==========================================================================
   TOAST OBVESTILA
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-slide 0.25s ease-out;
  min-width: 250px;
  max-width: 380px;
}

@keyframes toast-slide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.toast-success {
  border-left: 4px solid var(--accent-success);
}

.toast.toast-error {
  border-left: 4px solid var(--accent-danger);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-primary);
}

.toast.toast-warning {
  border-left: 4px solid var(--accent-warning);
}

/* Odzivnost (Responsive) */
@media (max-width: 992px) {
  .inspector-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin-right: 0;
    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  }

  .inspector-panel.collapsed {
    margin-right: 0;
    transform: translateX(100%);
  }

  .header-center {
    max-width: 260px;
  }

  .canvas-hints {
    display: none;
  }
}

/* ==========================================================================
   IZBIRNIK PROJEKTOV / SLUGOV (Project Selector Dropdown)
   ========================================================================== */
.project-dropdown-wrapper {
  position: relative;
}

.project-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  max-width: 300px;
}

.project-selector-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-focus);
}

.project-active-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  color: var(--text-primary);
}

.project-active-slug-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 204, 0, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 204, 0, 0.32);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

body.light-theme .project-active-slug-badge {
  background: rgba(234, 179, 8, 0.14);
  color: #9a6b00;
  border-color: rgba(202, 138, 4, 0.35);
}

.project-selector-btn .chevron-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.project-dropdown-wrapper.open .project-selector-btn .chevron-icon {
  transform: rotate(180deg);
}

.project-dropdown-menu {
  width: 350px;
  padding: 10px;
  gap: 8px;
}

.project-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.btn-icon-xs {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.btn-icon-xs:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.project-dropdown-search input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.project-dropdown-search input:focus {
  border-color: var(--accent-primary);
}

.project-dropdown-list {
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.project-dropdown-list::-webkit-scrollbar {
  width: 4px;
}

.project-dropdown-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.project-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  gap: 8px;
}

.project-dropdown-item:hover {
  background: rgba(255, 204, 0, 0.08);
  border-color: rgba(255, 204, 0, 0.28);
}

.project-dropdown-item.active {
  background: rgba(255, 204, 0, 0.16);
  border-color: var(--accent-primary);
}

.project-dropdown-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.project-item-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.project-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.project-item-slug-tag {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

.btn-item-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0.6;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.project-dropdown-item:hover .btn-item-delete {
  opacity: 1;
}

.btn-item-delete:hover {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.15);
}

.project-dropdown-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-manual-slug-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.manual-slug-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.manual-slug-input:focus {
  border-color: var(--accent-primary);
}

.project-empty-search {
  padding: 14px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   NASTAVITVE & SISTEMSKI SLOJI (Settings Modal & Layers Manager)
   ========================================================================== */
.modal-dialog-lg {
  max-width: 680px;
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.08);
  padding: 0 16px;
  gap: 6px;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

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

.settings-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.settings-tab-content.hidden {
  display: none !important;
}

.settings-section-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.layers-manager-table-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.layers-settings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.layers-settings-list::-webkit-scrollbar {
  width: 5px;
}

.layers-settings-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.layer-manager-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: border-color 0.15s;
}

.layer-manager-row:focus-within {
  border-color: var(--border-focus);
}

.layer-color-input {
  width: 32px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.layer-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.layer-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.layer-name-input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.layer-name-input:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.1);
}

.layer-id-input {
  width: 120px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--accent-primary);
  font-size: 11px;
  font-family: monospace;
  outline: none;
  flex-shrink: 0;
}

.layer-id-input:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.1);
}

.btn-remove-layer {
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-remove-layer:hover {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.15);
}

.layers-manager-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   SLIKE NA KARTICAH (Node Images & n8n Upload)
   ========================================================================== */
.node-image-container {
  width: 100%;
  height: 124px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .node-image-container {
  background: rgba(0, 0, 0, 0.04);
}

.node-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-image-container:hover .node-image {
  transform: scale(1.04);
}

.node-image-zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(28, 28, 28, 0.82);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.18s ease;
  pointer-events: none;
}

.node-image-container:hover .node-image-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.node-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f59e0b;
  font-size: 11px;
  font-weight: 500;
  padding: 12px;
  text-align: center;
}

/* Območje za nalaganje slike v inšpektorju */
.inspector-image-group {
  margin-top: 4px;
}

.badge-image-status {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.badge-image-status.n8n {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-image-status.local {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.node-image-dropzone {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.node-image-dropzone:hover {
  border-color: var(--accent-primary);
  background: rgba(255, 204, 0, 0.05);
}

.node-image-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(255, 204, 0, 0.12);
  transform: scale(1.01);
}

body.light-theme .node-image-dropzone {
  background: #f5f5f5;
}

body.light-theme .node-image-dropzone:hover {
  background: #fefce8;
}

.node-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.image-upload-icon {
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.upload-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-subtext {
  font-size: 10px;
  color: var(--text-muted);
}

.node-image-preview-wrapper {
  position: relative;
  width: 100%;
  max-height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.node-image-preview-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
}

.node-image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(24, 24, 24, 0.72);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.node-image-preview-wrapper:hover .node-image-preview-overlay {
  opacity: 1;
}

.btn-image-action {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.btn-image-action:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.btn-image-remove:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 1);
}

/* Spinner nalaganja slike */
.node-image-upload-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--accent-primary);
  font-weight: 600;
  padding: 14px;
}

.spinner-ring {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(255, 204, 0, 0.22);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.image-url-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* Info polje v nastavitvah za n8n slike */
.settings-hint-box {
  background: rgba(255, 204, 0, 0.07);
  border: 1px solid rgba(255, 204, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

body.light-theme .settings-hint-box {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(202, 138, 4, 0.28);
}

.hint-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
}

.hint-box-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.hint-box-list code {
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent-primary);
  font-family: monospace;
  font-size: 10.5px;
}

body.light-theme .hint-box-list code {
  background: rgba(0, 0, 0, 0.06);
}

.hint-box-footer {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* Celozaslonski Lightbox Modal za slike */
.modal-lightbox-container {
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modal-fade-in 0.18s ease-out;
}

.modal-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  gap: 12px;
}

.lightbox-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.modal-lightbox-body {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  max-width: 90vw;
  max-height: calc(85vh - 50px);
  overflow: auto;
}

body.light-theme .modal-lightbox-body {
  background: #1c1c1c;
}

.modal-lightbox-img {
  max-width: 86vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   JAVNI PREGLEDOVALNIK (Public Mindmap Viewer Styles)
   ========================================================================== */
.badge-public-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 204, 0, 0.14);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.35);
  letter-spacing: 0.3px;
  user-select: none;
  white-space: nowrap;
}

body.light-theme .badge-public-view {
  background: rgba(234, 179, 8, 0.14);
  color: #9a6b00;
  border-color: rgba(202, 138, 4, 0.35);
}

.viewer-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.viewer-inspector {
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.viewer-inspector.open {
  transform: translateX(0);
}

.viewer-inspector-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-tertiary);
}

.viewer-inspector-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viewer-image-preview-container,
.inspector-image-preview-card {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  position: relative;
}

body.light-theme .viewer-image-preview-container,
body.light-theme .inspector-image-preview-card {
  background: rgba(0, 0, 0, 0.05);
}

.viewer-image-preview-container img,
.inspector-preview-img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.viewer-image-preview-container:hover img,
.inspector-image-preview-card:hover .inspector-preview-img {
  transform: scale(1.02);
}

.viewer-image-preview-badge,
.image-preview-overlay-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.viewer-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 28, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 500;
  backdrop-filter: blur(4px);
}

body.light-theme .viewer-loading-overlay {
  background: rgba(240, 240, 240, 0.9);
}

.viewer-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 204, 0, 0.22);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.viewer-chip-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.viewer-chip {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.viewer-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.viewer-chip.active {
  background: rgba(255, 204, 0, 0.16);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.viewer-connected-node-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.viewer-connected-node-card:hover {
  border-color: var(--accent-primary);
  transform: translateX(2px);
}

/* ==========================================================================
   PRILAGODITEV PREGLEDOVALNIKA ZA MOBILNE NAPRAVE (Viewer Mobile Responsive)
   ========================================================================== */
body.viewer-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body.viewer-page .app-main {
  flex: 1;
  height: auto;
  min-height: 0;
}

body.viewer-page .canvas-viewport {
  touch-action: none;
  -webkit-touch-callout: none;
}

@media (max-width: 768px) {
  body.viewer-page .app-header {
    height: auto;
    min-height: var(--header-height);
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }

  body.viewer-page .header-left {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
  }

  body.viewer-page .header-right {
    order: 2;
    flex: 0 0 auto;
    gap: 4px;
  }

  body.viewer-page .header-center {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  body.viewer-page .search-box {
    padding: 5px 10px;
  }

  body.viewer-page .search-box input {
    font-size: 14px;
  }

  body.viewer-page .header-right .dropdown-menu {
    left: auto;
    right: 0;
    max-width: calc(100vw - 20px);
  }

  body.viewer-page .viewer-project-name {
    max-width: 120px;
    font-size: 13px;
  }

  body.viewer-page .slug-badge {
    display: none;
  }

  body.viewer-page .inspector-panel {
    width: 100%;
    max-width: 420px;
    z-index: 150;
  }

  body.viewer-page .inspector-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px;
  }

  body.viewer-page .viewer-image-preview-container img,
  body.viewer-page .inspector-preview-img {
    max-height: min(500px, 55dvh);
  }

  body.viewer-page .toast-container {
    left: 12px;
    right: 12px;
    bottom: 72px;
    align-items: center;
  }

  body.viewer-page .toast {
    min-width: 0;
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 540px) {
  body.viewer-page .brand-logo-wrap {
    width: 28px;
    height: 28px;
  }

  body.viewer-page .app-brand .brand-title {
    font-size: 14px;
  }

  body.viewer-page .brand-divider {
    display: none;
  }

  body.viewer-page .viewer-project-name {
    display: none;
  }

  body.viewer-page .badge-public-view {
    padding: 3px 6px;
  }

  body.viewer-page .badge-public-view span {
    display: none;
  }

  body.viewer-page #btn-layout-menu span,
  body.viewer-page #btn-header-share span {
    display: none;
  }

  body.viewer-page #btn-layout-menu,
  body.viewer-page #btn-header-share {
    padding: 6px 8px;
    min-width: 34px;
    height: 34px;
  }

  body.viewer-page .btn-icon {
    width: 34px;
    height: 34px;
  }

  body.viewer-page .zoom-controls {
    bottom: 12px;
    left: 10px;
    padding: 3px;
  }

  body.viewer-page .zoom-controls .btn-floating {
    width: 34px;
    height: 34px;
  }

  body.viewer-page .minimap-wrapper {
    bottom: 12px;
    right: 10px;
  }

  body.viewer-page .minimap-canvas-container {
    width: 118px;
    height: 74px;
  }

  body.viewer-page .minimap-header {
    padding: 3px 6px;
    font-size: 10px;
  }

  body.viewer-page .modal-body {
    padding: 14px;
  }

  body.viewer-page .modal-header,
  body.viewer-page .modal-footer {
    padding: 12px 14px;
  }
}

@media (max-width: 390px) {
  body.viewer-page #btn-fullscreen {
    display: none;
  }

  body.viewer-page .minimap-canvas-container {
    width: 100px;
    height: 64px;
  }
}

/* ==========================================================================
   ZAŠČITA UREJEVALNIKA Z GESLOM (Editor Password Gate Overlay)
   ========================================================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 20, 20, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.light-theme .auth-gate-overlay {
  background: rgba(220, 220, 220, 0.92);
}

.auth-gate-card {
  width: 100%;
  max-width: 390px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-gate-card.shake {
  animation: auth-shake 0.35s ease;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

.auth-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-gate-brand .brand-logo-wrap {
  width: 42px;
  height: 42px;
}

.auth-gate-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.auth-gate-title strong {
  color: var(--accent-primary);
}

.auth-gate-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .form-control {
  padding-right: 40px;
}

.btn-toggle-auth-vis {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-toggle-auth-vis:hover {
  color: var(--text-primary);
}

.auth-gate-error {
  font-size: 12px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.auth-gate-submit {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.auth-gate-footer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}