/* ── Hub header (slim) ───────────────────────────────────────── */

#hub-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  z-index: 100;
}

/* ── Tab content area ───────────────────────────────────────── */

#tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-pane {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

.tab-pane-inner {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Chat tab specific — needs flex column for messages + input */
#tab-chat {
  display: none;
  flex-direction: column;
}

#tab-chat.active {
  display: flex;
}

/* Chat tab sub-header with session controls */
#chat-tab-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.provider-badge {
  margin-right: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.3px;
}
.provider-badge.provider-openai {
  background: rgba(16, 163, 127, 0.15);
  color: rgba(16, 163, 127, 0.8);
}

/* Messages area fills remaining space */
#tab-chat #messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Input bar stays at bottom of chat tab */
#tab-chat #input-bar {
  flex-shrink: 0;
}

/* ── Bottom tab bar ─────────────────────────────────────────── */

#tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #111318;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  z-index: 100;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 4px;
  min-width: 0;
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  color: var(--accent, #7cb8ff);
}

.tab-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tab-label {
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56px;
}

/* ── Tab badge ──────────────────────────────────────────────── */

.tab-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 16px);
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: #ff4d5a;
  color: #fff;
  font-size: 0.55em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.tab-badge.hidden {
  display: none;
}

/* ── Tab pane section styles (shared by all non-chat tabs) ─── */

.tab-section-header {
  font-size: 0.82em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  padding: 14px 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.tab-date-sep {
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.3);
  padding: 12px 0 6px;
}

.tab-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  padding: 60px 20px;
  font-size: 0.9em;
}

.tab-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  padding: 60px 0;
  font-size: 0.9em;
}

/* ── Tab item cards ─────────────────────────────────────────── */

.tab-item {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 8px;
  transition: background 0.15s;
  overflow: hidden;
  word-break: break-word;
  position: relative;
}

.tab-item-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 1;
}

.tab-item:hover .tab-item-dismiss {
  opacity: 1;
}

.tab-item-dismiss:hover {
  background: rgba(255, 90, 107, 0.3);
  color: #ff5a6b;
}

.tab-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tab-item-expandable {
  cursor: pointer;
}

.tab-item-expandable.expanded {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.tab-item-actionable {
  border-color: rgba(255, 210, 60, 0.25);
  background: rgba(255, 210, 60, 0.03);
}

.tab-item-error {
  border-color: rgba(255, 90, 107, 0.3);
  background: rgba(255, 90, 107, 0.04);
}

.tab-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-item-icon {
  font-size: 1em;
  flex-shrink: 0;
}

.tab-item-title {
  flex: 1;
  font-weight: 600;
  color: #e8e8e8;
  font-size: 0.92em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-item-status {
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tab-status-ok {
  color: rgba(74, 255, 122, 0.8);
  background: rgba(74, 255, 122, 0.08);
}

.tab-status-error {
  color: rgba(255, 90, 107, 0.8);
  background: rgba(255, 90, 107, 0.08);
}

.tab-item-drive-link {
  font-size: 1em;
  text-decoration: none;
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.tab-item-drive-link:hover {
  background: rgba(74, 158, 255, 0.2);
}

.tab-item-time {
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-item-meta {
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
  white-space: nowrap;
}

.tab-item-from {
  font-size: 0.82em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}

.tab-item-preview {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tab-item-body {
  margin-top: 10px;
  font-size: 0.88em;
  line-height: 1.5;
  color: #d0d0d0;
  max-height: 500px;
  overflow-y: auto;
}

.tab-item-body.hidden {
  display: none;
}

.tab-item-reason {
  font-size: 0.82em;
  color: rgba(255, 180, 60, 0.7);
  margin-top: 4px;
  font-style: italic;
}

.tab-item-error-msg {
  font-size: 0.82em;
  color: rgba(255, 90, 107, 0.8);
  margin-top: 4px;
  font-family: monospace;
}

.tab-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.35);
}

.tab-detail {
  white-space: nowrap;
}

/* ── Tab action buttons ─────────────────────────────────────── */

.tab-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tab-action-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #d0d0d0;
  font-size: 0.82em;
  cursor: pointer;
  transition: background 0.15s;
}

.tab-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tab-action-primary {
  background: rgba(74, 158, 255, 0.2);
  border-color: rgba(74, 158, 255, 0.35);
  color: #7cb8ff;
}

.tab-action-primary:hover {
  background: rgba(74, 158, 255, 0.3);
}

/* ── Bookmarks in tab ───────────────────────────────────────── */

.tab-bookmark-title {
  display: block;
  color: #7cb8ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-bookmark-title:hover { text-decoration: underline; }

.tab-bookmark-host {
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}

.tab-bookmark-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tab-bookmark-tag {
  font-size: 0.72em;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
}

/* ── Tasks quick-add in tab ─────────────────────────────────── */

.tab-tasks-quickadd {
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.tab-tasks-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tab-tasks-row:first-child { margin-top: 0; }

.tab-tasks-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: 0.88em;
  outline: none;
}

.tab-tasks-input:focus { border-color: rgba(74, 158, 255, 0.4); }
.tab-tasks-input::placeholder { color: rgba(255, 255, 255, 0.25); }

.tab-tasks-due {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 10px;
  color: #e0e0e0;
  font-size: 0.82em;
  outline: none;
  color-scheme: dark;
}

.tab-tasks-addbtn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: rgba(74, 158, 255, 0.2);
  color: #7cb8ff;
  font-weight: 600;
  font-size: 0.85em;
  cursor: pointer;
}

.tab-tasks-addbtn:hover { background: rgba(74, 158, 255, 0.3); }
.task-tab-item { padding-bottom: 10px; }
.task-tab-desc { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.72); line-height: 1.35; }
.task-tab-source { display: inline-flex; align-items: center; max-width: 100%; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(125, 183, 255, 0.12); border: 1px solid rgba(125, 183, 255, 0.28); font-size: 11px; color: #9ac5ff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-tab-source:hover { text-decoration: none; background: rgba(125, 183, 255, 0.18); }
.task-tab-due { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.6); }
.task-tab-due.task-due-overdue { color: #ff6b7a; }
.task-tab-due.task-due-today { color: #ffd166; }
.task-tab-due.task-due-upcoming { color: #7dd3fc; }

/* ── Media grid in tab ──────────────────────────────────────── */

.tab-media-tabs {
  display: flex;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.tab-media-tab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-media-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.15);
}

.tab-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.tab-media-card {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s;
}

.tab-media-card:hover { border-color: rgba(255, 255, 255, 0.15); }

.tab-media-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.tab-media-label {
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.35);
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Detail view (push/pop within a tab) ────────────────────── */

.tab-detail-view {
  position: absolute;
  inset: 0;
  background: var(--bg, #1a1c24);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-detail-view.tab-detail-visible {
  transform: translateX(0);
}

.tab-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.tab-detail-back {
  background: none;
  border: none;
  color: var(--accent, #7cb8ff);
  font-size: 1.3em;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.tab-detail-header-text {
  flex: 1;
  min-width: 0;
}

.tab-detail-title {
  font-weight: 600;
  font-size: 1em;
  color: #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-detail-subtitle {
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.tab-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-detail-content {
  width: 100%;
  min-height: 180px;
  max-height: 50vh;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  color: #e0e0e0;
  font-size: 0.9em;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.tab-detail-content:focus {
  border-color: rgba(74, 158, 255, 0.4);
}

.tab-detail-content-ro {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  color: #d0d0d0;
  font-size: 0.9em;
  line-height: 1.6;
  max-height: 50vh;
  overflow-y: auto;
}

.tab-detail-guidance-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tab-detail-guidance-label {
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
}

.tab-detail-guidance {
  width: 100%;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e0e0e0;
  font-size: 0.85em;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.tab-detail-guidance:focus {
  border-color: rgba(255, 180, 60, 0.4);
}

.tab-detail-guidance::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.tab-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.tab-detail-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #d0d0d0;
  font-size: 0.88em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.tab-detail-btn:hover { background: rgba(255, 255, 255, 0.1); }
.tab-detail-btn:disabled { opacity: 0.4; cursor: default; }

.tab-detail-btn-primary {
  background: rgba(74, 158, 255, 0.2);
  border-color: rgba(74, 158, 255, 0.35);
  color: #7cb8ff;
}

.tab-detail-btn-primary:hover { background: rgba(74, 158, 255, 0.3); }

.tab-detail-btn-warn {
  background: rgba(255, 180, 60, 0.15);
  border-color: rgba(255, 180, 60, 0.3);
  color: #ffb83c;
}

.tab-detail-btn-warn:hover { background: rgba(255, 180, 60, 0.25); }

.tab-detail-btn-danger {
  background: rgba(255, 90, 107, 0.12);
  border-color: rgba(255, 90, 107, 0.25);
  color: #ff5a6b;
}

.tab-detail-btn-danger:hover { background: rgba(255, 90, 107, 0.2); }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .tab-label {
    font-size: 0.55em;
    max-width: 42px;
  }

  .tab-btn svg {
    width: 18px;
    height: 18px;
  }

  .tab-pane-inner {
    padding: 12px 10px;
  }
}

@media (min-width: 768px) {
  .tab-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ── System Dashboard Overlay ──────────────────────────────── */

.sys-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg, #0d0f13);
  display: flex;
  flex-direction: column;
}

.sys-overlay.hidden {
  display: none;
}

.sys-overlay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sys-overlay-title {
  font-size: 0.95em;
  font-weight: 600;
  color: #e8e8e8;
}

.sys-overlay-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* ── System Dashboard Widgets ─────────────────────────────── */

.sys-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0 14px;
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.sys-rings {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0 20px;
}

.sys-ring-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sys-ring {
  display: block;
}

.sys-ring-fill {
  transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}

.sys-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 80px;
}

.sys-ring-pct {
  font-size: 1.3em;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sys-ring-label {
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.sys-ring-sub {
  font-size: 0.62em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 1px;
  white-space: nowrap;
}

/* Sections */

.sys-section {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sys-section-title {
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 10px;
}

/* CPU core bars */

.sys-cores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.sys-cores-col {
  min-width: 0;
}

.sys-cores-heading {
  font-size: 0.72em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
}

.sys-core-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.sys-core-label {
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.35);
  width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sys-core-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.sys-core-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background 0.4s ease;
}

.sys-core-pct {
  font-size: 0.68em;
  color: rgba(255, 255, 255, 0.4);
  width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Stat cards row */

.sys-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sys-stat {
  flex: 1;
  min-width: 70px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.sys-stat-val {
  font-size: 1.05em;
  font-weight: 600;
  color: #e8e8e8;
  font-variant-numeric: tabular-nums;
}

.sys-stat-label {
  font-size: 0.68em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Network / Disk I/O */

.sys-io-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sys-io-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.sys-io-dir {
  font-size: 0.78em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.sys-io-arrow {
  font-weight: 700;
}

.sys-io-arrow.up { color: #7cb8ff; }
.sys-io-arrow.down { color: #4aff7a; }

.sys-io-rate {
  font-size: 1.15em;
  font-weight: 700;
  color: #e8e8e8;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.sys-spark {
  display: block;
  width: 100%;
  height: 32px;
  margin: 4px 0;
}

.sys-io-total {
  font-size: 0.68em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

/* Top processes table */

.sys-procs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82em;
}

.sys-procs th {
  text-align: left;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sys-procs td {
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sys-proc-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d0d0d0 !important;
}

/* Mobile: stack rings 2x2, cores single column */

@media (max-width: 480px) {
  .sys-rings {
    gap: 12px;
  }
  .sys-ring-wrap {
    flex-basis: 40%;
  }
  .sys-cores-grid {
    grid-template-columns: 1fr;
  }
  .sys-io-row {
    grid-template-columns: 1fr;
  }
}
