:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-nav: #010409;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-brand {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(88, 166, 255, 0.1);
}
.nav-status {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.nav-status.online { color: var(--green); }
.nav-status.offline { color: var(--red); }
.nav-status.unknown { color: var(--yellow); }

/* Main */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
  width: 100%;
}

/* Tabs */
.tab { display: none; }
.tab.active { display: block; }

h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.card-value {
  font-size: 22px;
  font-weight: 600;
}
.card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Session list */
.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.session-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.session-item .s-title {
  font-weight: 600;
  font-size: 14px;
}
.session-item .s-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.session-item .s-summary {
  font-size: 13px;
  margin-top: 6px;
  color: var(--text);
}

/* Container list */
.container-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.container-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.container-item .c-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.c-status.healthy { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.c-status.unhealthy { background: rgba(248, 81, 73, 0.15); color: var(--red); }

/* Message form */
.msg-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 560px;
}
.desc {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 14px;
}
.msg-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.msg-form input, .msg-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 12px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.msg-form input:focus, .msg-form textarea:focus {
  border-color: var(--accent);
}
.msg-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.msg-form button:hover { opacity: 0.85; }
.msg-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.msg-result {
  margin-top: 12px;
  font-size: 13px;
}
.msg-result.success { color: var(--green); }
.msg-result.error { color: var(--red); }

/* Task list */
.task-group { margin-bottom: 16px; }
.task-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.task-list { list-style: none; }
.task-item {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.task-item:last-child { border: none; }
.task-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  flex-shrink: 0;
}
.task-tag.done { background: rgba(63,185,80,0.15); color: var(--green); }
.task-tag.todo { background: rgba(210,153,34,0.15); color: var(--yellow); }
.task-tag.doing { background: rgba(88,166,255,0.15); color: var(--accent); }
.task-tag.blocked { background: rgba(248,81,73,0.15); color: var(--red); }

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

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
  .nav-inner { gap: 12px; }
  .nav-links { gap: 2px; }
  .nav-link { font-size: 12px; padding: 4px 6px; }
  .cards { grid-template-columns: 1fr; }
}
