/* ========================================
   DRAWINF - Premium Dark Theme
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-base: #0d0d14;
  --bg-surface: #13131f;
  --bg-elevated: #1a1a2e;
  --bg-glass: rgba(26, 26, 46, 0.7);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #f1f1f5;
  --text-secondary: #8b8ba7;
  --text-muted: #4a4a6a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --purple: #a78bfa;
  --aws-color: #FF9900;
  --aws-bg: rgba(255, 153, 0, 0.1);
  --azure-color: #0078D4;
  --azure-bg: rgba(0, 120, 212, 0.1);
  --gcp-color: #4285F4;
  --gcp-bg: rgba(66, 133, 244, 0.1);
  --success: #34d399;
  --danger: #f87171;
  --navbar-h: 44px;
  --sidebar-w: 260px;
  --panel-w: 340px;
  --radius: 10px;
  --radius-sm: 6px;
  --transition: all 0.18s ease;
}

html,
body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  overflow: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 10px;
}

/* ============================
   NAVBAR
   ============================ */
.navbar {
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 100;
  /* overflow: hidden; — removido para evitar cortes extraños con scrolls o tooltips */
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
  overflow: visible;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

/* TIER 1 — 1500px: ocultar texto de botones, mantener iconos */
@media (max-width: 1500px) {
  .nav-btn span:not(.validate-badge):not(.cloud-chevron):not(.zoom-label) {
    display: none;
  }

  .zoom-label {
    display: none;
  }
}

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

/* ── Progressive Responsiveness — todos los botones siempre visibles ──────
   Estrategia: reducir texto → padding → gap → iconos, en cascada.
   No se esconde ningún botón (excepto en mobile que ya tiene su overlay).
   ────────────────────────────────────────────────────────────────────── */

/* TIER 2 — 1200px: reducir padding y gap */
@media (max-width: 1200px) {
  .nav-btn {
    padding: 5px 7px;
  }

  .navbar-actions {
    gap: 2px;
  }

  .navbar {
    padding: 0 12px;
  }
}

/* TIER 3 — 1000px: reducir padding y gap, ocultar separadores */
@media (max-width: 1000px) {
  .nav-btn {
    padding: 4px 5px;
  }

  .navbar-actions {
    gap: 1px;
  }

  .nav-divider:not(#userDivider) {
    display: none;
  }

  .user-name {
    display: none;
  }

  .navbar {
    padding: 0 8px;
  }
}

/* TIER 4 — 850px: ultra-compacto, iconos más pequeños */
@media (max-width: 850px) {
  .nav-btn {
    padding: 3px 4px;
  }

  .nav-btn svg:not(.cloud-chevron) {
    width: 14px;
    height: 14px;
  }

  .navbar-actions {
    gap: 0;
  }
}

/* TIER 5 — 769px: mínimo absoluto antes del mobile-block */
@media (max-width: 769px) {
  .nav-btn {
    padding: 3px 3px;
  }

  .nav-btn svg:not(.cloud-chevron) {
    width: 13px;
    height: 13px;
  }
}

.nav-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 500;
}

.lang-toggle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  min-width: 32px;
  padding: 4px 6px;
}

.nav-btn.primary:hover {
  background: var(--accent-light);
  border-color: transparent;
}

.zoom-label {
  font-size: 12px;
  color: var(--text-muted);
  width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* ============================
   APP LAYOUT
   ============================ */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr 0px;
  height: calc(100vh - var(--navbar-h));
  transition: grid-template-columns 0.25s ease;
}

.app-layout.panel-open {
  grid-template-columns: var(--sidebar-w) 1fr var(--panel-w);
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* Cloud Tabs */
.cloud-tabs {
  display: flex;
  padding: 8px 10px;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}

.cloud-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.cloud-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.cloud-tab.active {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}

.cloud-tab.aws.active {
  color: var(--aws-color);
  border-color: rgba(255, 153, 0, 0.3);
  background: var(--aws-bg);
}

.cloud-tab.azure.active {
  color: var(--azure-color);
  border-color: rgba(0, 120, 212, 0.3);
  background: var(--azure-bg);
}

.cloud-tab.gcp.active {
  color: var(--gcp-color);
  border-color: rgba(66, 133, 244, 0.3);
  background: var(--gcp-bg);
}

.cloud-tab.clients.active {
  color: #2DD4BF;
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.08);
}

.node-bg.clients {
  stroke: #2DD4BF;
}

.node-bg.clients.selected {
  stroke: #5eead4;
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.4));
}

/* Traffic simulation dot */
.traffic-dot {
  fill: #2DD4BF;
  filter: drop-shadow(0 0 4px rgba(45, 212, 191, 0.8));
}

.traffic-trail {
  stroke: #2DD4BF;
  stroke-width: 2;
  fill: none;
  opacity: 0.3;
  stroke-dasharray: 4 4;
}

/* Protocol badge on connections */
.conn-protocol {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  fill: #e2e8f0;
  paint-order: stroke;
  stroke: rgba(15, 15, 25, 0.9);
  stroke-width: 3px;
}

/* Elements Container */
.elements-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.cloud-group {
  margin-bottom: 12px;
}

.cloud-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 6px;
  margin-bottom: 4px;
}

.cloud-group-title.aws {
  color: var(--aws-color);
}

.cloud-group-title.azure {
  color: var(--azure-color);
}

.cloud-group-title.gcp {
  color: var(--gcp-color);
}

.cloud-group-title.clients {
  color: #2DD4BF;
}

/* Category Accordion */
.cat-accordion {
  margin-bottom: 4px;
}

.cat-accordion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
  user-select: none;
}

.cat-accordion-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cat-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
  width: 12px;
}

.cat-chevron.open {
  transform: rotate(90deg);
}

.cat-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  flex: 1;
}

.cat-count {
  font-size: 9px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Play button in toolbar */
.tb-play {
  border-color: rgba(45, 212, 191, 0.3) !important;
  background: rgba(45, 212, 191, 0.1) !important;
}

.tb-play:hover {
  background: rgba(45, 212, 191, 0.2) !important;
  border-color: rgba(45, 212, 191, 0.5) !important;
}

/* Continuous ping button */
.tb-ping-active {
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.tb-ping-active:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

/* Ping interval picker */
.ping-picker {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  min-width: 190px;
}

.ping-picker-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.ping-picker-opts {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.ping-opt {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #F38020;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 2px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.ping-opt:hover {
  background: rgba(243, 128, 32, 0.15);
  border-color: #F38020;
}

.ping-picker-custom {
  display: flex;
  gap: 6px;
}

.ping-custom-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
}

.ping-custom-input:focus {
  border-color: #F38020;
}

.ping-ok-btn {
  background: #F38020;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
}

.ping-ok-btn:hover {
  background: #d96d10;
}

.elements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.element-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: var(--transition);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.element-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.element-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.element-item:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.element-item.aws:hover {
  border-color: rgba(255, 153, 0, 0.4);
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.1);
}

.element-item.azure:hover {
  border-color: rgba(0, 120, 212, 0.4);
  box-shadow: 0 4px 20px rgba(0, 120, 212, 0.1);
}

.element-item.gcp:hover {
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.1);
}

.element-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.element-icon svg,
.element-icon img {
  width: 32px;
  height: 32px;
}

.element-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* ============================
   CANVAS
   ============================ */
.canvas-area {
  position: relative;
  background: var(--bg-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-wrapper {
  width: 100%;
  flex: 1;
  min-height: 0;
  position: relative;
  cursor: default;
}

.canvas-wrapper.panning {
  cursor: grab;
}

.canvas-wrapper.panning:active {
  cursor: grabbing;
}

.main-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.canvas-hint.hidden {
  opacity: 0;
}

.canvas-hint p {
  color: var(--text-muted);
  font-size: 13px;
}

.canvas-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.canvas-info {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* Selection box */
.selection-box {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 5 3;
  fill: var(--accent-glow);
}

/* ============================
   SVG NODES
   ============================ */
.node-group {
  cursor: pointer;
}

.node-group:hover .node-bg {
  filter: brightness(1.2);
}

.node-bg {
  rx: 10;
  ry: 10;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  transition: filter 0.15s;
}

.node-bg.aws {
  fill: #1c1a10;
  stroke: rgba(255, 153, 0, 0.35);
  stroke-width: 1.5;
}

.node-bg.azure {
  fill: #0f1520;
  stroke: rgba(0, 120, 212, 0.35);
  stroke-width: 1.5;
}

.node-bg.gcp {
  fill: #101520;
  stroke: rgba(66, 133, 244, 0.35);
  stroke-width: 1.5;
}

.node-bg.selected {
  stroke-width: 2;
  stroke-dasharray: none;
}

.node-bg.aws.selected {
  stroke: var(--aws-color);
  filter: drop-shadow(0 0 8px rgba(255, 153, 0, 0.4));
}

.node-bg.azure.selected {
  stroke: var(--azure-color);
  filter: drop-shadow(0 0 8px rgba(0, 120, 212, 0.4));
}

.node-bg.gcp.selected {
  stroke: var(--gcp-color);
  filter: drop-shadow(0 0 8px rgba(66, 133, 244, 0.4));
}

.node-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  fill: #ccc;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}

.node-label-name {
  font-weight: 600;
  fill: var(--text-primary);
}

/* Connection handle wraps — visible on node hover */
.conn-wrap {
  opacity: 0;
  transition: opacity 0.18s ease;
  cursor: crosshair;
}

.node-group:hover .conn-wrap {
  opacity: 1;
}

/* Ring: outer glow circle */
.conn-ring {
  fill: rgba(99, 102, 241, 0.18);
  stroke: var(--accent);
  stroke-width: 1.5;
  transition: fill 0.15s, r 0.15s;
}

.conn-wrap:hover .conn-ring {
  fill: rgba(167, 139, 250, 0.3);
  stroke: var(--purple);
  r: 11;
}

/* Dot: solid inner circle */
.conn-point {
  fill: var(--accent);
  stroke: var(--bg-base);
  stroke-width: 2;
  transition: fill 0.15s;
}

.conn-wrap:hover .conn-point {
  fill: var(--purple);
}

/* Arrow hint text inside the handle */
.conn-arrow-hint {
  font-size: 9px;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.conn-wrap:hover .conn-arrow-hint {
  opacity: 1;
}

/* Temp drawing line */
#tempLine {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  fill: none;
  pointer-events: none;
  marker-end: url(#arrowhead);
}

/* Connection lines */
.connection-line {
  stroke: #4a4a7a;
  stroke-width: 2;
  fill: none;
  cursor: pointer;
  transition: stroke 0.15s;
}

.connection-line:hover {
  stroke: var(--accent-light);
}

.connection-line.selected {
  stroke: #f59e0b;
}

.connection-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  fill: var(--text-muted);
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}

.connection-label-bg {
  fill: var(--bg-base);
  rx: 3;
}

/* ============================
   RIGHT PANEL
   ============================ */
.right-panel {
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 0;
  transition: width 0.25s ease;
}

.app-layout.panel-open .right-panel {
  width: var(--panel-w);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.panel-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  line-height: 1;
}

.panel-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

.panel-empty p {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

.terraform-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.terraform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.resource-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.resource-badge.aws {
  color: var(--aws-color);
  border-color: rgba(255, 153, 0, 0.3);
  background: var(--aws-bg);
}

.resource-badge.azure {
  color: var(--azure-color);
  border-color: rgba(0, 120, 212, 0.3);
  background: var(--azure-bg);
}

.resource-badge.gcp {
  color: var(--gcp-color);
  border-color: rgba(66, 133, 244, 0.3);
  background: var(--gcp-bg);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
}

.terraform-code {
  flex: 1;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  background: #0d1117;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
}

.terraform-code code {
  background: transparent;
  padding: 0;
}

/* ============================
   CONTEXT MENU
   ============================ */
.context-menu {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  animation: ctx-in 0.1s ease;
}

@keyframes ctx-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ctx-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

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

#ctxDelete:hover {
  color: var(--danger);
}

/* ============================
   TOAST
   ============================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  max-width: 340px;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================
   LABEL EDIT INPUT (inline SVG)
   ============================ */
.inline-label-input {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  outline: none;
  z-index: 500;
  min-width: 80px;
  text-align: center;
}

/* ============================
   TOOLBAR FLOATING
   ============================ */
.node-toolbar {
  position: fixed;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  z-index: 400;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: ctx-in 0.15s ease;
}

.tb-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.tb-btn.tf {
  color: var(--purple);
}

.tb-btn.tf:hover {
  background: rgba(167, 139, 250, 0.1);
  color: var(--purple);
}

.tb-btn.danger:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
}

.tb-btn.tb-props {
  color: var(--accent-light);
}

.tb-btn.tb-props:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--purple);
}

/* ============================
   CONTAINER ZONES (VPC/VNet)
   ============================ */
.container-group {
  cursor: move;
}

.container-group:hover .resize-handle {
  opacity: 0.7 !important;
}

.container-group .resize-handle:hover {
  opacity: 1 !important;
}

.container-bg.selected {
  stroke-width: 2.5 !important;
  stroke-dasharray: none !important;
}

/* ============================
   INHERIT TOAST NOTIFICATION
   ============================ */
.inherit-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 30, 40, 0.95);
  border: 1px solid rgba(255, 200, 50, 0.3);
  color: #f0d060;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 10000;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.inherit-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.inherit-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* ============================
   CONTEXT MENU SEPARATOR
   ============================ */
.ctx-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ============================
   PROPERTIES MODAL
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  width: 520px;
  max-width: 96vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-resource-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.modal-resource-badge.aws {
  color: var(--aws-color);
  border-color: rgba(255, 153, 0, 0.4);
  background: var(--aws-bg);
}

.modal-resource-badge.azure {
  color: var(--azure-color);
  border-color: rgba(0, 120, 212, 0.4);
  background: var(--azure-bg);
}

.modal-resource-badge.gcp {
  color: var(--gcp-color);
  border-color: rgba(66, 133, 244, 0.4);
  background: var(--gcp-bg);
}

.modal-docs-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-light);
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 5px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.modal-docs-link:hover {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--purple);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.modal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

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

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

.modal-btn.primary {
  background: var(--accent);
  color: #fff;
}

.modal-btn.primary:hover {
  background: var(--accent-light);
}

/* Form fields inside modal */
.props-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 0 4px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.props-section-title:first-child {
  border-top: none;
  margin-top: 0;
}

.prop-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.prop-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.prop-required-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 3px;
  padding: 1px 4px;
}

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

.prop-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: var(--transition);
}

.prop-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.prop-input.invalid {
  border-color: var(--danger);
}

select.prop-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8ba7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

select.prop-input option {
  background: #1a1a2e;
  color: #f1f1f5;
}

/* Toggle switch */
.prop-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.prop-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prop-toggle-label span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.prop-toggle-label small {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 22px;
  cursor: pointer;
  transition: 0.2s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::after {
  left: calc(100% - 17px);
  background: #fff;
}

/* ============================
   NAVBAR TERRAFORM BUTTON
   ============================ */
.nav-btn.tf-all {
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.08);
}

.nav-btn.tf-all:hover {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.5);
}

/* ============================
   TERRAFORM ALL MODAL
   ============================ */
.tf-modal {
  width: 820px;
  max-width: 96vw;
  max-height: 90vh;
}

.tf-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
}

.tf-tab {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.tf-tab.active {
  background: var(--bg-surface);
  border-color: var(--border-hover);
  color: var(--text-primary);
  font-weight: 600;
}

.tf-tab.aws.active {
  border-color: rgba(255, 153, 0, 0.5);
  color: var(--aws-color);
}

.tf-tab.azure.active {
  border-color: rgba(0, 120, 212, 0.5);
  color: var(--azure-color);
}

.tf-tab.gcp.active {
  border-color: rgba(66, 133, 244, 0.5);
  color: var(--gcp-color);
}

.tf-code-wrap {
  flex: 1;
  overflow: auto;
  padding: 0;
}

.tf-all-code {
  margin: 0;
  border-radius: 0 0 14px 14px;
  min-height: 300px;
  max-height: none;
}

/* ============================
   SG RULES EDITOR
   ============================ */
.sg-rules-container,
.lb-rules-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.sg-rule-row,
.lb-rule-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.sg-rule-select,
.sg-rule-port,
.lb-rule-host,
.lb-rule-path,
.lb-rule-target {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: var(--transition);
}

.sg-rule-select:focus,
.sg-rule-port:focus,
.lb-rule-host:focus,
.lb-rule-path:focus,
.lb-rule-target:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.lb-rule-path {
  flex: 0 0 60px;
}

.sg-rule-del {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}

.sg-rule-del:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

.sg-rule-add {
  width: 100%;
  padding: 5px 10px;
  background: transparent;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 2px;
}

.sg-rule-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ============================
   IMPORT TERRAFORM MODAL
   ============================ */
.tf-import-modal {
  width: 680px;
  max-width: 95vw;
}

.tf-import-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.tf-import-textarea {
  width: 100%;
  height: 320px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
  outline: none;
}

.tf-import-textarea:focus {
  border-color: var(--accent);
}

.tf-import-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.tf-import-result {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.tf-import-result.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.tf-import-result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ============================
   TAB BAR
   ============================ */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.tab-item:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.tab-item.active {
  background: var(--bg-base);
  border-color: var(--border);
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: -1px;
  padding-bottom: 6px;
}

.tab-name-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  width: 80px;
  padding: 0;
}

.tab-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 3px;
  transition: var(--transition);
}

.tab-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.tab-add {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 4px;
  transition: var(--transition);
}

/* ========================================
   LIGHT THEME
   ======================================== */
html[data-theme="light"] {
  --bg-base: #f0f2f5;
  --bg-surface: #ffffff;
  --bg-elevated: #e4e8f0;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --aws-bg: rgba(255, 153, 0, 0.08);
  --azure-bg: rgba(0, 120, 212, 0.08);
  --gcp-bg: rgba(66, 133, 244, 0.08);
}

html[data-theme="light"] .canvas-hint p {
  color: rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .canvas-hint svg path,
html[data-theme="light"] .canvas-hint svg rect {
  stroke: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .panel-empty svg {
  stroke: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .search-input::placeholder {
  color: var(--text-muted);
}

html[data-theme="light"] .element-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .modal {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .login-overlay {
  background: #f0f2f5;
}

/* Nodes — light mode fills */
html[data-theme="light"] .node-bg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

html[data-theme="light"] .node-bg.aws {
  fill: #fffbf0;
  stroke: rgba(255, 153, 0, 0.55);
}

html[data-theme="light"] .node-bg.azure {
  fill: #f0f7ff;
  stroke: rgba(0, 120, 212, 0.45);
}

html[data-theme="light"] .node-bg.gcp {
  fill: #f2f5ff;
  stroke: rgba(66, 133, 244, 0.45);
}

html[data-theme="light"] .node-bg.clients {
  fill: #f0fffe;
  stroke: rgba(45, 212, 191, 0.55);
}

html[data-theme="light"] .node-bg.aws.selected {
  filter: drop-shadow(0 0 8px rgba(255, 153, 0, 0.35));
}

html[data-theme="light"] .node-bg.azure.selected {
  filter: drop-shadow(0 0 8px rgba(0, 120, 212, 0.3));
}

html[data-theme="light"] .node-bg.gcp.selected {
  filter: drop-shadow(0 0 8px rgba(66, 133, 244, 0.3));
}

html[data-theme="light"] .node-bg.clients.selected {
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.35));
}

html[data-theme="light"] .node-group:hover .node-bg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15)) brightness(0.97);
}

html[data-theme="light"] .node-label {
  fill: #555;
}

html[data-theme="light"] .node-label-name {
  fill: #111827;
}

/* Theme toggle button icons */
.icon-moon {
  display: none;
}

.icon-sun {
  display: block;
}

html[data-theme="light"] .icon-sun {
  display: none;
}

html[data-theme="light"] .icon-moon {
  display: block;
}

/* ========================================
   CONFIRM DIALOG
   ======================================== */
.confirm-modal {
  max-width: 340px;
  width: 100%;
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.confirm-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.confirm-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.confirm-actions .modal-btn {
  flex: 1;
}

.modal-btn.danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

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

/* ========================================
   LOGIN OVERLAY (Premium Split Layout)
   ======================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  overflow: hidden;
}

.login-split {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Left Section: Visual (65%) */
.login-visual {
  flex: 0 0 65%;
  position: relative;
  background: #0f1016;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-visual-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.login-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  /* Animation 5: Cinematic Entry */
  animation: cinematicEntry 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-base-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Animation 2: Data Flow Overlay */
.login-overlay-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.data-pulse {
  fill: var(--accent);
  filter: blur(2px) drop-shadow(0 0 10px var(--accent));
}

.code-highlight {
  filter: blur(4px) drop-shadow(0 0 15px var(--accent));
}

.login-visual-text {
  margin-top: 40px;
  text-align: center;
  max-width: 500px;
  animation: fadeInUp 1s ease 0.4s both;
}

.visual-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.visual-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.login-visual-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.1), transparent 70%),
    linear-gradient(to right, transparent 80%, var(--bg-base));
  z-index: 1;
}

/* Right Section: Form (35%) */
.login-form-side {
  flex: 0 0 35%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border-left: 1px solid var(--border);
  position: relative;
  z-index: 10;
  animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-form-container {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.login-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.login-form-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.login-form-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-google-btn-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: #fff;
  color: #1f2937;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.login-google-btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: #fdfdfd;
}

.login-google-btn-premium:active {
  transform: translateY(0);
}

.login-footer-info {
  margin-top: 20px;
  text-align: center;
}

.login-footer-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Animations Keyframes */
@keyframes cinematicEntry {
  0% {
    opacity: 0;
    transform: scale(1.05) translateY(30px);
    filter: blur(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes slideInRight {
  0% {
    transform: translateX(50px);
    opacity: 0;
  }

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

/* Responsive */
@media (max-width: 1024px) {
  .login-visual {
    display: none;
  }

  .login-form-side {
    flex: 0 0 100%;
    border-left: none;
  }
}

/* ========================================
   USER INFO (navbar)
   ======================================== */
.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 6px 3px 4px;
  flex-shrink: 0;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-logout-btn {
  padding: 3px 5px !important;
  min-width: unset;
  color: var(--text-muted);
  background: none !important;
  border: none !important;
  border-radius: 50% !important;
}

.user-logout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1) !important;
}

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

/* ========================================
   COST ESTIMATOR
   ======================================== */

/* Navbar button */
.nav-btn.cost-btn {
  color: #34d399;
}

.nav-btn.cost-btn:hover {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
}

/* Modal container */
.pricing-modal {
  width: min(760px, 95vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Total banner */
.pricing-total-banner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(99, 102, 241, 0.08));
  border-bottom: 1px solid var(--border);
}

.pricing-total-label {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pricing-total-amount {
  font-size: 28px;
  font-weight: 700;
  color: #34d399;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

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

/* Scrollable body */
.pricing-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

/* Cloud section */
.pricing-section {
  margin-bottom: 4px;
}

.pricing-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pricing-cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cloud-color, #888);
  flex-shrink: 0;
}

/* Resource row */
.pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.pricing-row:hover {
  background: var(--bg-elevated);
}

.pricing-row.pricing-free {
  opacity: 0.45;
}

.pricing-row.pricing-free:hover {
  opacity: 0.65;
  background: transparent;
}

.pricing-row-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pricing-node-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.pricing-row-cost {
  flex-shrink: 0;
  text-align: right;
}

.pricing-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.pricing-period {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

.pricing-free-badge {
  font-size: 11px;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* Usage inputs */
.pricing-usage {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px 8px 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pricing-usage-row {
  display: grid;
  grid-template-columns: 160px 90px 1fr auto;
  align-items: center;
  gap: 8px;
}

.pricing-usage-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.pricing-usage-input {
  width: 100%;
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  text-align: right;
}

.pricing-usage-input:focus {
  border-color: var(--accent);
}

.pricing-usage-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.pricing-usage-cost {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 60px;
}

/* Cloud subtotal */
.pricing-subtotal {
  display: flex;
  justify-content: space-between;
  padding: 7px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* Empty state */
.pricing-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Footer disclaimer */
.pricing-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 20px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.pricing-footer svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Updated-at label */
.pricing-updated {
  font-size: 11px;
  color: var(--text-muted);
}

/* Spin animation for refresh button */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Light mode overrides */
html[data-theme="light"] .pricing-total-banner {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.06), rgba(99, 102, 241, 0.06));
}

html[data-theme="light"] .pricing-usage {
  background: var(--bg-elevated);
}

html[data-theme="light"] .pricing-usage-input {
  background: var(--bg-surface);
}

/* ── TEMPLATES MODAL ──────────────────────────────────────────────────────── */
.templates-modal {
  max-width: 800px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.tpl-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 24px 12px;
  flex-shrink: 0;
}

.tpl-body {
  overflow-y: auto;
  flex: 1;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tpl-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tpl-group-line {
  flex: 1;
  height: 1px;
}

.tpl-group-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tpl-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tpl-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.tpl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tpl-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  flex: 1;
}

.tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tpl-chip {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--text-secondary);
}

.tpl-use-btn {
  width: 100%;
  margin-top: 4px;
}

/* ── UPGRADE MODAL ──────────────────────────────────────────────────────────── */
.upgrade-modal {
  max-width: 700px;
  width: 100%;
}

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

.upgrade-limit-badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
}

.upgrade-limit-num {
  font-size: 32px;
  font-weight: 700;
  color: #f87171;
  line-height: 1;
}

.upgrade-limit-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.upgrade-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.upgrade-desc strong {
  color: #a78bfa;
}

.upgrade-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
}

.upgrade-check {
  color: #22c55e;
  font-weight: 700;
  font-size: 14px;
  width: 18px;
  flex-shrink: 0;
}

.upgrade-cta-btn {
  display: block;
  text-align: center;
  padding: 11px 20px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.upgrade-cta-btn:hover {
  opacity: 0.88;
}

.upgrade-cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.upgrade-plans {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.upgrade-plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  position: relative;
}

.upgrade-plan-card--edu {
  border-color: rgba(34, 197, 94, 0.3);
}

.upgrade-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.upgrade-plan-edu-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.upgrade-cta-btn--edu {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.upgrade-x {
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
  width: 18px;
  flex-shrink: 0;
}

.upgrade-limit {
  color: #f59e0b;
  font-weight: 700;
  font-size: 13px;
  min-width: 18px;
  flex-shrink: 0;
}

.upgrade-current-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 0 2px;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

/* ── SHARE MODAL ────────────────────────────────────────────────────────────── */
.share-modal {
  max-width: 420px;
  width: 100%;
}

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

.share-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.share-select {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
}

.share-select:focus {
  border-color: var(--accent);
}

.share-expiry-group {
  display: flex;
  gap: 16px;
}

.share-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.share-radio input {
  accent-color: var(--accent);
  cursor: pointer;
}

.share-generate-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-result {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-url-row {
  display: flex;
  gap: 8px;
}

.share-url-input {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
}

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

/* Share button in navbar */
.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Shared view navbar info */
.shared-nav-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.shared-nav-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.shared-cta {
  font-size: 12px;
  padding: 5px 12px;
}

/* ============================
   VERSIONS MODAL
   ============================ */
.versions-modal {
  width: 540px;
  max-width: 95vw;
}

.versions-body {
  padding: 8px 0;
  max-height: 60vh;
  overflow-y: auto;
}

.versions-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.versions-empty small {
  opacity: 0.7;
}

.versions-list {
  display: flex;
  flex-direction: column;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.version-item:last-child {
  border-bottom: none;
}

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

.version-item.version-current {
  background: rgba(99, 102, 241, 0.06);
}

.version-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.version-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.6;
}

.version-item.version-current .version-icon {
  color: var(--accent);
  opacity: 1;
}

.version-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.version-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

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

.version-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.version-tabs-preview {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* ============================
   VALIDATE
   ============================ */
.validate-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.validate-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.validate-modal {
  width: 520px;
  max-width: 95vw;
}

.validate-body {
  padding: 12px 0;
  max-height: 65vh;
  overflow-y: auto;
}

.validate-ok {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.validate-ok svg {
  opacity: 0.4;
}

.validate-section {
  margin-bottom: 4px;
}

.validate-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.validate-section-header.error {
  color: #f87171;
}

.validate-section-header.warning {
  color: #fbbf24;
}

.validate-section-header.info {
  color: #60a5fa;
}

.validate-count {
  padding: 1px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
}

.error .validate-count {
  background: rgba(239, 68, 68, .15);
  color: #f87171;
}

.warning .validate-count {
  background: rgba(251, 191, 36, .15);
  color: #fbbf24;
}

.info .validate-count {
  background: rgba(96, 165, 250, .15);
  color: #60a5fa;
}

.validate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.validate-item:last-child {
  border-bottom: none;
}

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

.validate-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.validate-item.error .validate-dot {
  background: #ef4444;
}

.validate-item.warning .validate-dot {
  background: #f59e0b;
}

.validate-item.info .validate-dot {
  background: #3b82f6;
}

.validate-msg {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.validate-goto {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 10px;
}

/* Node highlight flash */
@keyframes node-flash {
  0% {
    filter: drop-shadow(0 0 0px transparent);
  }

  30% {
    filter: drop-shadow(0 0 12px var(--flash-color, #f59e0b));
  }

  70% {
    filter: drop-shadow(0 0 12px var(--flash-color, #f59e0b));
  }

  100% {
    filter: drop-shadow(0 0 0px transparent);
  }
}

.node-flash {
  animation: node-flash 1.6s ease-in-out;
}

/* ── PRESENTATION MODE ─────────────────────────────────────────── */
body.present-mode .navbar,
body.present-mode .tab-bar,
body.present-mode .sidebar,
body.present-mode .right-panel {
  display: none !important;
}

body.present-mode .app-layout {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
  height: 100vh;
}

body.present-mode .canvas-wrapper {
  border-radius: 0;
}

.present-exit-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity .3s, background .2s;
  opacity: 0;
}

body.present-mode .present-exit-btn {
  display: flex;
  opacity: 1;
}

body.present-mode.present-idle .present-exit-btn {
  opacity: 0;
  pointer-events: none;
}

/* ── MINI-MAP ───────────────────────────────────────────────────── */
.minimap-container {
  position: absolute;
  bottom: 40px;
  right: 16px;
  width: 168px;
  height: 94px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.88;
  transition: opacity .2s;
}

.minimap-container:hover {
  opacity: 1;
}

body.present-mode .minimap-container {
  display: none;
}

/* ── TF IMPORT TABS ─────────────────────────────────────────────── */
.tf-import-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tf-import-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}

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

.tf-import-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tf-import-tab-hint {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}

.tf-import-panel code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-base);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-light);
}

/* ── SIDEBAR PLAN FOOTER ────────────────────────────────────────── */
.sidebar-plan {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-plan-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-plan-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-plan-badge.pro {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
}

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

.sidebar-plan-upgrade {
  width: 100%;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}

.sidebar-plan-upgrade:hover {
  opacity: .88;
  transform: translateY(-1px);
}

/* ── MOBILE BLOCK ───────────────────────────────────────────────── */
.mobile-block {
  display: none;
}

@media (max-width: 768px) {
  .mobile-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-base);
    padding: 32px 24px;
    text-align: center;
  }

  .mobile-block h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }

  .mobile-block p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
    margin: 0;
  }

  .mobile-block p strong {
    color: var(--text-primary);
  }

  /* Hide everything else on mobile */
  body>*:not(.mobile-block) {
    display: none !important;
  }
}

/* ── UPGRADE MODAL — STRIPE ─────────────────────────────────────── */
.upgrade-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 2px;
}

.upgrade-price-amount {
  font-size: 32px;
  font-weight: 700;
  color: #a78bfa;
}

.upgrade-price-period {
  font-size: 13px;
  color: var(--text-muted);
}

.upgrade-portal-btn {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.upgrade-portal-btn:hover {
  opacity: 1 !important;
  background: var(--bg-hover) !important;
}

.upgrade-stripe-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 4px 0 0;
}

/* ============================
   COLLAB
   ============================ */

/* Collab navbar button */
.collab-btn {
  color: #a78bfa;
}

.collab-btn-active {
  background: rgba(167, 139, 250, 0.15) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(167, 139, 250, 0.4) !important;
}

/* Remote cursor */
.collab-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  transition: opacity 0.4s ease;
}

.collab-cursor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.collab-cursor-name {
  font-size: 11px;
  font-family: Inter, sans-serif;
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Presence chip in tab bar */
.collab-presence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: default;
  margin-left: 6px;
  flex-shrink: 0;
  align-self: center;
  overflow: hidden;
}

.collab-presence img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ============================
   CLOUD CONNECT DROPDOWN
   ============================ */

.cloud-connect-wrap {
  position: relative;
}

.cloud-connect-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.cloud-connect-btn:hover {
  color: var(--text-primary);
}

.cloud-chevron {
  opacity: 0.6;
  transition: transform 0.2s;
}

.cloud-connect-wrap.open .cloud-chevron {
  transform: rotate(180deg);
}

.cloud-connect-menu {
  position: fixed;
  top: var(--navbar-h);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 230px;
  padding: 6px;
  z-index: 1000;
  animation: cloudMenuIn 0.15s ease;
}

@keyframes cloudMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

.cloud-connect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: background 0.12s;
}

.cloud-connect-item:hover:not(:disabled) {
  background: var(--bg-hover);
}

.cloud-connect-item:disabled {
  cursor: default;
  opacity: 0.6;
}

.cloud-connect-logo {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cloud-connect-name {
  flex: 1;
  font-weight: 500;
}

.cloud-connect-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.cloud-connect-badge.active {
  background: rgba(52, 168, 83, 0.15);
  color: #34A853;
}

.cloud-connect-badge.soon {
  background: var(--bg-hover);
  color: var(--text-muted);
}

/* ============================
   EXPORT / IMPORT DROPDOWN
   ============================ */

.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.nav-dropdown-btn:hover {
  color: var(--text-primary);
}

.nav-dropdown-wrap.open .cloud-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: fixed;
  top: var(--navbar-h);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 190px;
  padding: 6px;
  z-index: 1000;
  animation: cloudMenuIn 0.15s ease;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: background 0.12s;
}

.nav-dropdown-item:hover {
  background: var(--bg-hover);
}

.nav-dropdown-item kbd {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.5;
}

/* ============================
   GCP DISCOVERY MODAL
   ============================ */

.gcp-discover-btn {
  color: #4285F4;
}

.gcp-discover-modal {
  max-width: 560px;
  width: 100%;
}

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

/* Instructions collapsible */
.gcp-instructions {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.gcp-instructions summary {
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gcp-instructions summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform 0.2s;
}

.gcp-instructions[open] summary::before {
  transform: rotate(90deg);
}

.gcp-instructions-list {
  margin: 10px 0 4px 16px;
  padding: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* SA JSON textarea — taller than normal */
.gcp-sa-textarea {
  min-height: 110px;
  max-height: 180px;
  font-size: 12px;
  line-height: 1.4;
}

/* Loading */
.gcp-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 0;
}

.gcp-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: #4285F4;
  border-radius: 50%;
  animation: gcp-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* Error */
.gcp-error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 260px;
  overflow-y: auto;
}
.gcp-error details summary { color: #fca5a5; margin-top: 4px; }
.gcp-error details ul { color: #fca5a5; opacity: 0.85; }

/* Result summary */
.gcp-summary-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.gcp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.gcp-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

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

.gcp-summary-label {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gcp-summary-count {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-hover);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.gcp-import-btn {
  width: 100%;
  justify-content: center;
}

/* ========================================
   USER DROPDOWN MENU
   ======================================== */
.user-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.user-info:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: 4px;
  z-index: 500;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.user-dropdown-item:hover {
  background: var(--bg-hover);
}

.user-dropdown-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.user-dropdown-item--danger {
  color: #ef4444;
}

.user-dropdown-item--danger svg {
  color: #ef4444;
}

.user-dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

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

.incident-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 4px;
  margin-left: auto;
}

.admin-badge {
  background: #f59e0b;
}

/* ========================================
   ABOUT MODAL
   ======================================== */
.about-modal {
  width: 420px;
  max-width: 95vw;
}

.about-body {
  padding: 20px 24px 24px;
}

.about-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.about-app-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.about-app-version {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.about-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 18px;
}

.about-meta {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.about-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.about-meta-row:last-child {
  border-bottom: none;
}

.about-meta-label {
  color: var(--text-muted);
  min-width: 80px;
  font-size: 12px;
}

.about-meta-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   INCIDENTS MODAL
   ======================================== */
.incidents-modal {
  width: 560px;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.incidents-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 0;
}

.incidents-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

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

.incidents-tab.active {
  color: #6366f1;
  border-bottom-color: #6366f1;
}

.incidents-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.incidents-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incidents-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.incidents-input,
.incidents-textarea {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 13px;
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s;
  resize: vertical;
}

.incidents-input:focus,
.incidents-textarea:focus {
  outline: none;
  border-color: #6366f1;
}

.incidents-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.incidents-form-hint {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.incidents-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 0;
}

.incidents-loading {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}

/* Incident card */
.incident-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incident-card.has-response {
  border-color: rgba(99, 102, 241, 0.3);
}

.incident-card.has-unread {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2);
}

.incident-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.incident-subject {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.incident-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.incident-status.open {
  background: rgba(251,188,4,0.12);
  color: #f59e0b;
}

.incident-status.resolved {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

.incident-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.incident-response-box {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 7px;
  padding: 10px 12px;
  margin-top: 4px;
}

.incident-response-label {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.incident-response-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.incident-mark-read-btn {
  font-size: 11px;
  color: #6366f1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  text-decoration: underline;
}

/* ========================================
   ADMIN PANEL MODAL
   ======================================== */
.admin-panel-modal {
  width: 700px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.admin-filter-row {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-filter-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-filter-btn:hover,
.admin-filter-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.admin-incidents-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

/* Admin card = incident-card + extra respond section */
.admin-incident-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-incident-card.status-open {
  border-left: 3px solid #f59e0b;
}

.admin-incident-card.status-resolved {
  border-left: 3px solid #22c55e;
  opacity: 0.8;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-user-name {
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-respond-area {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-respond-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-respond-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  min-height: 64px;
}

.admin-respond-textarea:focus {
  outline: none;
  border-color: #6366f1;
}

.admin-respond-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-respond-btn {
  padding: 6px 14px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}

.admin-respond-btn:hover { opacity: 0.85; }

.admin-respond-btn.send {
  background: #6366f1;
  color: #fff;
}

.admin-respond-btn.resolve {
  background: #22c55e;
  color: #fff;
}

.admin-respond-btn.reopen {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ========================================
   INCIDENT THREAD (mensajes bidireccionales)
   ======================================== */
.incident-thread {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.thread-msg {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  max-width: 90%;
}

.thread-msg.from-admin {
  background: rgba(99, 102, 241, 0.12);
  border-left: 3px solid #6366f1;
  align-self: flex-start;
}

.thread-msg.from-user {
  background: var(--bg-elevated);
  border-left: 3px solid #a78bfa;
  align-self: flex-end;
}

.thread-msg-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.thread-msg-author { color: var(--text-secondary); }

.thread-msg-content {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.incident-reply-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.incident-reply-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 7px 10px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
}

.incident-reply-textarea:focus {
  outline: none;
  border-color: #6366f1;
}

.incident-reply-footer {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.incident-reply-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #6366f1;
  color: #fff;
  transition: opacity 0.15s;
}
.incident-reply-btn:hover { opacity: 0.85; }
.incident-reply-btn.resolve { background: #22c55e; }
.incident-reply-btn.reopen {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.incident-no-messages {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}
.incident-waiting {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
  margin-top: 4px;
}