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

body {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  background: #0a0a0a;
  color: #e5e5e5;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  margin-bottom: 24px;
}

header h1 {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats {
  font-size: 0.85em;
  color: #737373;
}

/* System Stats */
.sys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.sys-card {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 14px;
}

.sys-label {
  font-size: 0.75em;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.sys-value {
  font-size: 1.1em;
  font-weight: 600;
}

.text-warn { color: #f87171; }

/* Progress bars */
.progress-bar {
  background: #262626;
  border-radius: 4px;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar.thin {
  height: 3px;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.bar-ok { background: #4ade80; }
.bar-warn { background: #facc15; }
.bar-danger { background: #ef4444; }
.bar-ctx { background: linear-gradient(90deg, #60a5fa, #a78bfa); }

/* Sections */
section h2 {
  font-size: 1.1em;
  font-weight: 600;
  color: #a3a3a3;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sessions */
.session {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.session:hover {
  border-color: #404040;
}

.session-main {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #141414, #0c1a3d);
}

.session-main:hover {
  border-color: #3b82f6;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.session-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-name {
  font-weight: 600;
  font-size: 0.95em;
}

.type-badge {
  font-size: 0.75em;
  padding: 2px 8px;
  background: #262626;
  border-radius: 4px;
  color: #a3a3a3;
}

.badge {
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 3px;
}

.badge-channel {
  background: #1e3a5f;
  color: #60a5fa;
}

.status-badge {
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.session-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8em;
  color: #737373;
  flex-wrap: wrap;
}

/* Task & output descriptions */
.session-task, .session-output {
  margin-top: 10px;
  padding: 8px 10px;
  background: #0a0a0a;
  border-left: 2px solid #333;
  border-radius: 0 4px 4px 0;
  font-size: 0.8em;
  line-height: 1.4;
  color: #a3a3a3;
}

.session-task {
  border-left-color: #60a5fa;
}

.session-output {
  border-left-color: #4ade80;
  margin-top: 6px;
}

.task-label, .output-label {
  font-weight: 600;
  color: #d4d4d4;
  margin-right: 4px;
}

.task-text, .output-text {
  color: #a3a3a3;
}

.session-stale {
  opacity: 0.6;
}

.badge-msgs {
  background: #1a2e1a;
  color: #4ade80;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 3px;
}

.empty {
  text-align: center;
  padding: 32px;
  color: #525252;
  font-style: italic;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #262626;
  font-size: 0.8em;
  color: #525252;
}

.status-ok { color: #4ade80; }
.status-error { color: #ef4444; }

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 16px 12px; }
  header h1 { font-size: 1.4em; }
  .session-meta { flex-direction: column; gap: 4px; }
  .session-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sys-grid { grid-template-columns: 1fr; }
}
