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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0e27;
  color: #e0e0e0;
}

.app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #121836;
  border-bottom: 1px solid #2a2d5e;
  position: relative;
  z-index: 10;
}

.top-bar h1 {
  font-size: 18px;
  color: #7eb8ff;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab, .tab-active {
  padding: 6px 14px;
  border: 1px solid #2a2d5e;
  border-radius: 4px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  pointer-events: auto;
  user-select: none;
}

.tab-active {
  background: #1a1f45;
  color: #7eb8ff;
  border-color: #7eb8ff;
}

.main-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  background: #121836;
  padding: 14px;
  overflow-y: auto;
  border-right: 1px solid #2a2d5e;
}

.sidebar h2 {
  font-size: 14px;
  color: #7eb8ff;
  margin-bottom: 12px;
}

.panel {
  background: #1a1f45;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.panel h3 {
  font-size: 12px;
  color: #7eb8ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.panel select,
.panel input[type="text"],
 sql-input {
  width: 100%;
  padding: 6px 8px;
  background: #0a0e27;
  border: 1px solid #2a2d5e;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 13px;
  font-family: monospace;
}

.resource-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.res-name {
  font-size: 12px;
  width: 80px;
  color: #aaa;
}

.res-val {
  font-size: 12px;
  font-family: monospace;
  width: 30px;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  accent-color: #7eb8ff;
}

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

.btn-start {
  padding: 10px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-reset {
  padding: 10px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.content-area {
  flex: 1;
  padding: 16px;
  overflow: auto;
}

.sim-view svg {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  background: #070a1f;
}

.status-panel .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

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

.stat-val {
  font-size: 14px;
  font-family: monospace;
  font-weight: 600;
}

.stat-val.ok { color: #2ecc71; }
.stat-val.warn { color: #f39c12; }
.stat-val.bad { color: #e74c3c; }

.sql-input {
  width: 100%;
  font-family: monospace;
}

.sql-result-count {
  margin-top: 8px;
  font-size: 12px;
  color: #7eb8ff;
}

.sql-error {
  margin-top: 8px;
  font-size: 12px;
  color: #e74c3c;
}

.table-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #2a2d5e;
}

.data-table th {
  background: #1a1f45;
  color: #7eb8ff;
}

.col-type {
  font-size: 10px;
  color: #888;
}
