.architecture-view {
  position: relative;
  min-height: 400px;
}

.arch-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.arch-legend {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

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

.arch-dot { width: 10px; height: 10px; border-radius: 50%; }
.arch-dot-running { background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
.arch-dot-stopped { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }

/* VPS main box */
.arch-vps {
  background: linear-gradient(145deg, var(--sidebar), var(--card));
  border-radius: 20px;
  border: 2px solid var(--border);
  padding: 1.5rem;
}

.arch-vps-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.arch-vps-icon {
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  background: rgba(124, 106, 252, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-vps-title { font-size: 1.1rem; font-weight: 700; color: #fff; }
.arch-vps-subtitle { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* Networks */
.arch-networks { display: flex; flex-direction: column; gap: 1.25rem; }

.arch-network {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 14px;
  border: 1px dashed;
  padding: 1rem;
}

.arch-network-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.arch-network-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.arch-network-name { font-weight: 600; font-size: 0.85rem; }

.arch-network-badge {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
}

.arch-conn-hint {
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
  font-style: italic;
  margin-top: -2px;
  margin-bottom: 4px;
}

/* Container nodes */
.arch-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}

.arch-node {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.arch-node::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
}

.arch-node.arch-up::before { background: var(--green); }
.arch-node.arch-down::before { background: var(--red); }

.arch-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}

.arch-node.arch-down { opacity: 0.5; }

.arch-node-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

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

.arch-node-dot.on { background: var(--green); animation: arch-pulse 2s infinite; }
.arch-node-dot.off { background: var(--red); }

@keyframes arch-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.arch-node-name {
  font-weight: 600;
  font-size: 0.78rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.arch-node-image {
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.arch-node-stats {
  display: flex;
  gap: 10px;
  font-size: 0.62rem;
  color: var(--muted);
}

.arch-node-stats span { color: #fff; font-weight: 500; }

.arch-node-domain {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.56rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(124, 106, 252, 0.12);
  color: var(--accent);
  border: 1px solid rgba(124, 106, 252, 0.2);
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arch-node-domain:hover { background: rgba(124, 106, 252, 0.25); }

/* Context menu */
.arch-menu {
  display: none;
  margin-top: 8px;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.arch-node.arch-open .arch-menu { display: flex; }

.arch-menu .btn-sm {
  flex: 1;
  min-width: 45px;
  text-align: center;
  padding: 4px 6px;
  font-size: 0.65rem;
}

/* Logs toolbar */
.logs-toolbar { display: flex; align-items: center; gap: 8px; }

.logs-filter-input {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  width: 150px;
}

.logs-filter-input:focus { outline: none; border-color: var(--accent); }
.logs-count { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

/* View mode buttons */
.arch-view-modes {
  display: flex;
  background: var(--sidebar);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}

.arch-mode-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  background: transparent;
  transition: all 0.15s;
}

.arch-mode-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Graph view */
.arch-graph-canvas {
  width: 100%;
  height: 550px;
  display: block;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
}

.arch-graph-svg {
  width: 100%;
  max-height: 600px;
  display: block;
}

.arch-graph-legend {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.arch-graph-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.arch-graph-legend-item span:first-child {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

/* Table view */
.arch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.arch-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
}

.arch-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.arch-table tbody tr:hover {
  background: rgba(124, 106, 252, 0.05);
}

.arch-table-down { opacity: 0.5; }

.arch-table-name { font-weight: 600; color: #fff; }
.arch-table-image { font-size: 0.7rem; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-table-ip { font-family: monospace; font-size: 0.72rem; color: var(--muted); }
.arch-table-actions { white-space: nowrap; }

.arch-table-net {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
  margin: 1px;
}

/* Table status indicator */
.arch-table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.arch-table-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.arch-table-dot.on {
  background: var(--green);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.arch-table-dot.off {
  background: var(--red);
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}
