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

html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #121212;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

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

.header-logo {
  height: 64px;
  width: auto;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

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

.summary {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

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

.summary-item.total {
  color: #888;
  font-weight: 600;
}

.summary-item.earned {
  color: #d4af37;
  font-weight: 600;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid #333;
}
.summary-item.earned .muted { color: #666; font-weight: 400; font-size: 12px; }

.network-avg-indicator {
  color: #555;
  font-size: 12px;
  margin-left: auto;
  align-self: center;
  cursor: default;
}

.icon-btn {
  background: none;
  border: 1px solid #333;
  color: #888;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: #fff;
  border-color: #555;
}

.settings-icon-btn {
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-icon-btn img {
  width: 20px;
  height: 20px;
  display: block;
  filter: invert(0.65);
  transition: filter 0.2s;
}

.settings-icon-btn:hover img {
  filter: invert(1);
}

/* ntfy settings modal rows */
.ntfy-topic-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ntfy-topic-row input { flex: 1; }

.ntfy-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #e94560;
  cursor: pointer;
}

.quiet-hours-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  color: #ccc;
  font-size: 13px;
}
.quiet-hours-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.quiet-hours-row input[type="time"] {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: inherit;
  color-scheme: dark;
}
.quiet-hours-row.disabled { opacity: 0.4; pointer-events: none; }

.repeat-section {
  margin-top: 8px;
}
.repeat-global {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 10px;
}
.repeat-overrides {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
  border-left: 2px solid #333;
}

.inline-number {
  width: 60px;
  background: #1e1e1e;
  border: 1px solid #333;
  color: #ccc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  color-scheme: dark;
  margin: 0 2px;
}

/* Settings modal tabs */
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #333;
  margin: 8px 0 16px 0;
}
.settings-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.settings-tab:hover { color: #ccc; }
.settings-tab.active {
  color: #e94560;
  border-bottom-color: #e94560;
}
.settings-panel.hidden { display: none; }

/* Visible stats tab */
.visible-stats-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 12px 0;
}
.visible-stats-list .checkbox-row {
  font-size: 13px;
}
.visible-stats-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

/* Hidden stat on node card — keeps grid flowing naturally */
.stat-hidden { display: none; }

/* Solana poller status block in the Codes tab */
.solana-status {
  margin-top: 20px;
  padding: 12px 14px;
  background: #161622;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
}
.solana-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.solana-status-body {
  font-size: 12px;
  color: #aaa;
  line-height: 1.6;
  font-family: Consolas, Menlo, monospace;
}
.solana-status-body .ok   { color: #4caf50; }
.solana-status-body .err  { color: #e94560; }
.solana-status-body .dim  { color: #666; }

/* Sort dropdown */
.sort-select {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.sort-select:hover {
  color: #fff;
  border-color: #555;
}

.sort-select:focus {
  outline: none;
  border-color: #555;
}

.sort-select option {
  background: #1e1e1e;
  color: #ccc;
}

/* Period toggle */
.period-toggle {
  display: flex;
  background: #1e1e1e;
  border-radius: 6px;
  border: 1px solid #333;
  overflow: hidden;
}

.period-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.period-btn:hover {
  color: #aaa;
  background: #252525;
}

.period-btn.active {
  color: #fff;
  background: #333;
}

/* Custom N-days entry wedged into the period toggle */
.period-custom {
  display: flex;
  align-items: center;
  padding: 0 8px 0 6px;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  border-left: 1px solid #333;
  background: none;
  transition: all 0.2s;
}
.period-custom.active {
  color: #fff;
  background: #333;
}
.period-custom input[type="number"] {
  width: 48px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: right;
  padding: 6px 2px 6px 6px;
  outline: none;
  -moz-appearance: textfield;
}
.period-custom input[type="number"]::-webkit-outer-spin-button,
.period-custom input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.period-custom input[type="number"]:focus {
  color: #fff;
}
.period-custom span {
  padding-right: 2px;
}

/* Status dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.rendering {
  background: #00cc6a;
  animation: pulse 2s infinite;
}

.dot.idle {
  background: #888;
}

.dot.unreachable {
  background: #9b59b6;
}

.dot.offline {
  background: #e74c3c;
}

.dot.receiving-job {
  background: #00bcd4;
  animation: pulse 1.5s infinite;
}

.dot.loading-scene {
  background: #9b59b6;
  animation: pulse 1.5s infinite;
}

.dot.waiting-for-resources {
  background: #1abc9c;
  animation: pulse 1s infinite;
}

.dot.aborted {
  background: #ff4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Nodes grid */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.empty-state p:first-child {
  font-size: 18px;
  margin-bottom: 8px;
}

.muted {
  color: #666;
  font-size: 13px;
}

/* Node card */
.node-card {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 16px;
  border-left: 4px solid #333;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: grab;
}

.node-card:active {
  cursor: grabbing;
}

.node-card.dragging {
  opacity: 0.3;
  transform: scale(0.95);
}

.node-card.drag-over {
  border: 2px dashed #555;
  border-left-width: 4px;
}

.node-card[data-state="Rendering"] {
  border-left-color: #00cc6a;
  background: linear-gradient(135deg, #0a1f0a 0%, #1e1e1e 100%);
}

.node-card[data-state="Idle"] {
  border-left-color: #666;
  background: linear-gradient(135deg, #171717 0%, #1e1e1e 100%);
}
.node-card[data-state="Idle"] .node-name {
  color: rgba(255, 255, 255, 0.5);
}
.node-card[data-state="Offline"] .node-name {
  color: #e74c3c;
}
.node-card[data-state="Rendering"] .node-name {
  color: #00cc6a;
}

.node-card[data-state="Unreachable"] {
  border-left-color: #9b59b6;
  background: linear-gradient(135deg, #1a0a1f 0%, #1e1e1e 100%);
  opacity: 0.75;
}

.node-card[data-state="Receiving Job"] {
  border-left-color: #00bcd4;
  background: linear-gradient(135deg, #0a1a1f 0%, #1e1e1e 100%);
}

.node-card[data-state="Loading Scene"] {
  border-left-color: #9b59b6;
  background: linear-gradient(135deg, #160a1f 0%, #1e1e1e 100%);
}

.node-card[data-state="Waiting for Resources"] {
  border-left-color: #1abc9c;
  background: linear-gradient(135deg, #0a1f1a 0%, #1e1e1e 100%);
}

.node-card[data-state="Aborted"] {
  border-left-color: #ff4444;
  background: linear-gradient(135deg, #1f0a0a 0%, #1e1e1e 100%);
}

.node-card[data-state="Offline"] {
  border-left-color: #e74c3c;
  background: linear-gradient(135deg, #1f0a0a 0%, #1e1e1e 100%);
  opacity: 0.65;
}

.node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Card header */
.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.state-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
}

.state-badge.rendering {
  color: #00cc6a;
  background: rgba(0, 204, 106, 0.15);
}

.rendering-duration {
  font-weight: 400;
  opacity: 0.7;
  font-size: 11px;
}

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

.notif-toggle {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
}
.notif-toggle:hover { opacity: 1; }
.notif-toggle.muted { opacity: 0.3; }

.state-badge.idle {
  color: #aaa;
  background: rgba(170, 170, 170, 0.12);
}

.state-badge.unreachable {
  color: #9b59b6;
  background: rgba(155, 89, 182, 0.15);
}

.state-badge.receiving-job {
  color: #00bcd4;
  background: rgba(0, 188, 212, 0.15);
}

.state-badge.loading-scene {
  color: #9b59b6;
  background: rgba(155, 89, 182, 0.15);
}

.state-badge.waiting-for-resources {
  color: #1abc9c;
  background: rgba(26, 188, 156, 0.15);
}

.state-badge.aborted {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.15);
}

.state-badge.offline {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.15);
}

/* GPU info */
.node-gpus {
  font-size: 13px;
  color: #aaa;
}

/* Stats grid */
.node-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.node-stats-secondary {
  border-top: 1px solid #2a2a2a;
  padding-top: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  font-size: 12px;
  color: #888;
}

.stat-value {
  color: #ccc;
  font-weight: 600;
}

.stat-period {
  color: #555;
  font-size: 10px;
}

/* Stat color classes */
.stat-good {
  color: #00cc6a;
}

.stat-warn {
  color: #f5a623;
}

.stat-low {
  color: #888;
}

.stat-bad {
  color: #e74c3c;
}

/* Version info */
.node-version {
  font-size: 11px;
  color: #666;
}

.version-value {
  color: #888;
  font-weight: 600;
}

.version-outdated {
  color: #f5a623;
}

.version-latest {
  color: #555;
  font-size: 10px;
}

/* Last seen */
.node-lastseen {
  font-size: 11px;
  color: #555;
}

/* Action buttons row */
.node-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Restart button */
.restart-btn {
  background: #2a1a1a;
  color: #e74c3c;
  border: 1px solid #3a2020;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.restart-btn:hover:not(:disabled) {
  background: #3a2020;
  border-color: #e74c3c;
}

.restart-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.restart-btn.restarting {
  color: #f5a623;
  border-color: #f5a623;
  background: #2a2010;
}

/* Update button */
.update-btn {
  background: #0a1a2e;
  color: #00bcd4;
  border: 1px solid #1a3a5c;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.update-btn:hover:not(:disabled) {
  background: #1a3a5c;
  border-color: #00bcd4;
}

.update-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.update-btn.updating {
  color: #f5a623;
  border-color: #f5a623;
  background: #2a2010;
}

/* Reboot button — more alarming red to differentiate from restart */
.reboot-btn {
  background: #2a0a0a;
  color: #ff4444;
  border: 1px solid #4a1a1a;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.reboot-btn:hover:not(:disabled) {
  background: #3a1010;
  border-color: #ff4444;
}
.reboot-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Cache-clear button — amber tone, distinct from restart/update/reboot */
.cache-clear-btn {
  background: #2a1a05;
  color: #f5a623;
  border: 1px solid #4a3210;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cache-clear-btn:hover:not(:disabled) {
  background: #3a2610;
  border-color: #f5a623;
}
.cache-clear-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Update-all banner (shown below cards when nodes are outdated) */
.update-all-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #1a1a10;
  border: 1px solid #3a3a20;
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: 16px;
}
.update-all-text {
  color: #f5a623;
  font-size: 13px;
}
.update-all-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Health log button */
.health-log-btn {
  background: #1a1a2a;
  color: #9e9eff;
  border: 1px solid #2a2a4a;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.health-log-btn:hover {
  background: #2a2a4a;
  border-color: #9e9eff;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-content h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #fff;
}

.modal-content label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #ccc;
}

.modal-content input {
  width: 100%;
  padding: 10px 12px;
  background: #121212;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 14px;
  margin-top: 8px;
}

.modal-content input:focus {
  outline: none;
  border-color: #555;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #333;
  background: #2a2a2a;
  color: #ccc;
  transition: all 0.2s;
}

.btn:hover {
  background: #333;
}

.btn-primary {
  background: #1a3a5c;
  border-color: #2a5a8c;
  color: #7cb3e8;
}

.btn-primary:hover {
  background: #2a5a8c;
}

/* Health log modal */
.modal-wide {
  width: 560px;
}

.health-log-body {
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
}

.health-log-body table {
  width: 100%;
  border-collapse: collapse;
}

.health-log-body th,
.health-log-body td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
}

.health-log-body th {
  color: #999;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: #1e1e1e;
}

.health-log-body .status-up { color: #4caf50; }
.health-log-body .status-down { color: #f44336; }
.health-log-body .error-msg { color: #999; font-size: 12px; }

.health-log-empty {
  color: #666;
  text-align: center;
  padding: 24px;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.success {
  background: #0a2e0a;
  color: #00cc6a;
  border: 1px solid #00cc6a33;
}

.toast.error {
  background: #2e0a0a;
  color: #e74c3c;
  border: 1px solid #e74c3c33;
}

.toast.info {
  background: #0a1a2e;
  color: #7cb3e8;
  border: 1px solid #7cb3e833;
}

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

/* View toggle */
.view-toggle {
  display: flex;
  background: #1e1e1e;
  border-radius: 6px;
  border: 1px solid #333;
  overflow: hidden;
}

.view-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  color: #aaa;
  background: #252525;
}

.view-btn.active {
  color: #fff;
  background: #333;
}

/* Generic hidden utility */
.hidden {
  display: none !important;
}

/* Graph view */
.graph-view {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.graph-sidebar {
  width: 200px;
  min-width: 200px;
  background: #1a1a1a;
  border-right: 1px solid #2a2a2a;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.graph-sidebar h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 8px;
}

/* Graph metric dropdown */
.graph-metric-select {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #333;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.graph-metric-select:hover {
  color: #fff;
  border-color: #555;
}

.graph-metric-select:focus {
  outline: none;
  border-color: #7cb3e8;
}

.graph-metric-select option {
  background: #1e1e1e;
  color: #ccc;
}

.graph-controls-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.graph-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ccc;
  padding: 4px 0;
  cursor: pointer;
}

.graph-checkbox input[type="checkbox"] {
  accent-color: #7cb3e8;
  cursor: pointer;
}

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

.graph-checkbox.selected {
  font-weight: 700;
  color: #fff;
}

#graph-node-list .graph-checkbox {
  user-select: none;
}

.node-toggle-all {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.graph-chart-area {
  flex: 1;
  padding: 16px;
  position: relative;
  min-width: 0;
}

#graph-canvas {
  width: 100% !important;
  height: 100% !important;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
}

/* Errors view */
.errors-view {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.errors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  padding: 24px;
}

.error-card {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 16px;
  border-left: 4px solid #333;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-card[data-state="Rendering"] { border-left-color: #00cc6a; }
.error-card[data-state="Idle"] { border-left-color: #f5a623; }
.error-card[data-state="Unreachable"] { border-left-color: #9b59b6; opacity: 0.75; }
.error-card[data-state="Offline"] { border-left-color: #e74c3c; opacity: 0.65; }

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

.error-card .node-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.error-card .error-summary {
  font-size: 12px;
  color: #888;
}

.error-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.error-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  padding: 6px 8px;
  background: #161616;
  border-radius: 6px;
  border-left: 3px solid #e74c3c;
}

.error-entry.cancel {
  border-left-color: #f5a623;
}

.error-entry .error-message {
  flex: 1;
  color: #ccc;
  word-break: break-word;
}

.error-entry .error-count {
  background: #e74c3c33;
  color: #e74c3c;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.error-entry.cancel .error-count {
  background: #f5a62333;
  color: #f5a623;
}

.error-entry .error-last-seen {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

.no-errors {
  font-size: 13px;
  color: #555;
  font-style: italic;
  padding: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .graph-view {
    flex-direction: column;
  }

  .graph-sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
    max-height: 200px;
    overflow-y: auto;
  }

  .graph-controls-section {
    min-width: 140px;
  }

  .graph-chart-area {
    height: 50vh;
    min-height: 300px;
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 12px;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .summary {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nodes-grid,
  .errors-grid {
    padding: 12px;
    gap: 12px;
  }
}
