/* Server Administration Page */

.admin-panel-header {
  align-items: flex-start;
  gap: 16px;
}

.admin-panel-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.admin-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.admin-toggle-row input {
  margin: 0;
}

.admin-version-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: linear-gradient(135deg, rgba(63, 114, 255, 0.08), rgba(63, 114, 255, 0.03));
}

.admin-version-values {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.admin-version-arrow {
  color: var(--color-text-muted);
}

.admin-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-install-command {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-medium);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

.admin-install-command code {
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--color-text);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-toolbar-search {
  flex: 1 1 280px;
  min-width: 220px;
}

.admin-toolbar-search .form-input {
  margin: 0;
}

.admin-search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(63, 114, 255, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(63, 114, 255, 0.08), var(--color-surface));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-search-shell:focus-within {
  border-color: var(--color-accent);
  background: linear-gradient(180deg, rgba(63, 114, 255, 0.14), var(--color-surface));
  box-shadow: 0 0 0 4px rgba(63, 114, 255, 0.12), 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-search-icon {
  flex: 0 0 auto;
  color: var(--color-accent);
}

.admin-search-shell .form-input.admin-search-input {
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.admin-search-shell .form-input.admin-search-input:focus {
  outline: none;
  border-color: transparent;
}

.admin-search-input::placeholder {
  color: var(--color-text-muted);
}

.admin-toolbar-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.admin-toolbar-select label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-toolbar-select .form-input {
  margin: 0;
}

.admin-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.admin-filter-btn.active {
  border-color: var(--color-accent);
  background: rgba(63, 114, 255, 0.12);
  color: var(--color-accent);
}

.admin-segmented-control {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-surface-muted), rgba(63, 114, 255, 0.04));
}

.admin-order-btn {
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-color: transparent;
  background: transparent;
  color: var(--color-text-muted);
}

.admin-order-btn:hover {
  border-color: transparent;
  background: rgba(15, 23, 42, 0.05);
}

.admin-order-btn.active {
  border-color: rgba(63, 114, 255, 0.2);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.admin-order-btn-icon {
  flex: 0 0 auto;
}

.admin-order-btn-label {
  white-space: nowrap;
}

.admin-stream-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-stream-indicator.live {
  background: rgba(46, 182, 125, 0.14);
  color: var(--color-success);
}

.admin-stream-indicator.error {
  background: rgba(229, 83, 104, 0.12);
  color: var(--color-danger);
}

.admin-log-meta,
.admin-usage-period {
  margin-bottom: 14px;
  font-size: 13px;
}

.admin-usage-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-drilldown-hint {
  margin: 0;
  font-size: 13px;
}

.admin-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-section-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-log-container {
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: #0f172a;
  color: #e2e8f0;
}

.admin-log-entry {
  padding: 12px 14px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.admin-log-entry.selected {
  background: rgba(56, 189, 248, 0.08);
}

.admin-log-entry + .admin-log-entry {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-log-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-log-header-main {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-log-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #cbd5e1;
  cursor: pointer;
}

.admin-log-select-checkbox {
  margin: 0;
  accent-color: #38bdf8;
}

.admin-log-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-log-copy-btn {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
}

.admin-log-copy-btn:hover {
  background: rgba(30, 41, 59, 0.9);
}

.admin-log-timestamp {
  color: #94a3b8;
}

.admin-log-level {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-log-level.level-debug {
  background: rgba(34, 211, 238, 0.16);
  color: #22d3ee;
}

.admin-log-level.level-info {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.admin-log-level.level-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.admin-log-level.level-error {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.admin-log-message {
  margin-top: 6px;
  color: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-log-context {
  margin-top: 8px;
}

.admin-log-context summary {
  cursor: pointer;
  color: #93c5fd;
}

.admin-log-selection-actions {
  align-items: center;
  margin-left: auto;
}

.admin-log-selection-count {
  font-size: 13px;
  white-space: nowrap;
}

.admin-log-context pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5e1;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 720px) {
  .admin-toolbar-search {
    width: 100%;
  }

  .admin-segmented-control {
    width: 100%;
  }

  .admin-order-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .admin-log-selection-actions {
    width: 100%;
    margin-left: 0;
  }
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-summary-card,
.admin-usage-section,
.admin-code-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
}

.admin-summary-card {
  padding: 18px;
}

.admin-summary-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-summary-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
}

.admin-summary-value.status-good {
  color: var(--color-success);
}

.admin-summary-value.status-warn {
  color: var(--color-warning, #f59e0b);
}

.admin-summary-value.status-bad {
  color: var(--color-danger);
}

.admin-summary-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-usage-section {
  padding: 18px;
}

.admin-usage-section .section-header {
  margin-bottom: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-data-table th,
.admin-data-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.admin-data-table th {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-data-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-data-table tbody tr.admin-drilldown-row {
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.admin-data-table tbody tr.admin-drilldown-row:hover,
.admin-data-table tbody tr.admin-drilldown-row.active {
  background: rgba(63, 114, 255, 0.08);
}

.admin-data-table tbody tr.admin-drilldown-row:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.admin-bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
}

.admin-bar-row-button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-medium);
}

.admin-bar-row-button:hover .admin-bar-track {
  box-shadow: 0 0 0 1px rgba(63, 114, 255, 0.18);
}

.admin-bar-row-button.active .admin-bar-track {
  box-shadow: 0 0 0 2px rgba(63, 114, 255, 0.24);
}

.admin-bar-row-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.admin-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.admin-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.admin-bar-fill.status-completed {
  background: var(--color-success);
}

.admin-bar-fill.status-failed,
.admin-bar-fill.status-rejected {
  background: var(--color-danger);
}

.admin-bar-fill.status-interrupted {
  background: var(--color-warning, #f59e0b);
}

.admin-bar-fill.status-running,
.admin-bar-fill.status-queued,
.admin-bar-fill.status-staged {
  background: var(--color-accent);
}

.admin-bar-value {
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin-code-groups {
  display: grid;
  gap: 16px;
}

.admin-code-group {
  display: grid;
  gap: 12px;
}

.admin-code-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-code-card {
  padding: 14px 16px;
}

.admin-code-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  color: var(--color-text);
}

.admin-code-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Code Impact — compact card layout */

.admin-impact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-impact-card {
  padding: 12px;
  border-radius: var(--radius-medium);
  background: var(--color-surface-muted);
}

.admin-impact-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.admin-impact-card-values {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.admin-impact-card-all {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.admin-impact-card-approved {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-success);
}

.admin-impact-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(46, 182, 125, 0.15);
  overflow: hidden;
}

.admin-impact-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--color-success);
  transition: width 0.4s ease;
}

.admin-impact-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.admin-impact-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-impact-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.admin-impact-legend-all {
  background: var(--color-text-muted);
}

.admin-impact-legend-approved {
  background: var(--color-success);
}

.admin-drilldown-drawer {
  width: min(540px, 100vw);
  max-width: 100%;
  padding: 28px;
  gap: 18px;
}

.admin-drilldown-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.admin-drilldown-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.admin-drilldown-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.admin-drilldown-section {
  min-height: 0;
}

.admin-drilldown-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-drilldown-summary-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  padding: 14px;
  background: var(--color-surface-muted);
}

.admin-drilldown-summary-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-drilldown-summary-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.admin-drilldown-summary-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin-drilldown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-drilldown-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-drilldown-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-drilldown-card-title {
  min-width: 0;
}

.admin-drilldown-task-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text);
  word-break: break-word;
}

.admin-drilldown-task-id {
  margin-top: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--color-text-muted);
}

.admin-drilldown-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.admin-drilldown-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 13px;
  color: var(--color-text);
}

.admin-drilldown-meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-drilldown-stats,
.admin-drilldown-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-drilldown-chip,
.admin-drilldown-flag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.admin-drilldown-chip {
  background: rgba(31, 42, 68, 0.08);
  color: var(--color-text-muted);
}

.admin-drilldown-flag.approved {
  background: rgba(46, 182, 125, 0.14);
  color: var(--color-success);
}

.admin-drilldown-flag.pushed {
  background: rgba(63, 114, 255, 0.14);
  color: var(--color-accent);
}

.admin-drilldown-flag.changed {
  background: rgba(245, 158, 11, 0.14);
  color: var(--color-warning, #f59e0b);
}

.admin-drilldown-flag.neutral {
  background: rgba(31, 42, 68, 0.08);
  color: var(--color-text-muted);
}

.admin-drilldown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-nav-item svg {
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .admin-summary-grid,
  .admin-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #admin-content.settings-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
  }

  #admin-content .settings-sidebar {
    position: static;
    top: auto;
    align-self: start;
    max-height: none;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  #admin-content .settings-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
  }

  #admin-content .settings-nav-item {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 6px;
    border-radius: var(--radius-small);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .admin-panel-header,
  .admin-version-card {
    flex-direction: column;
  }

  .admin-panel-actions,
  .admin-version-actions {
    justify-content: flex-start;
  }

  .admin-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-summary-grid,
  .admin-usage-grid,
  .admin-code-grid {
    grid-template-columns: 1fr;
  }

  .admin-impact-cards {
    grid-template-columns: 1fr;
  }

  .admin-drilldown-summary,
  .admin-drilldown-meta {
    grid-template-columns: 1fr;
  }
}

#health-content {
  position: relative;
}

.admin-update-output {
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  overflow: hidden;
}

.admin-update-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--color-surface-muted);
  border-bottom: 1px solid var(--color-border);
}

.admin-update-output-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-update-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

.admin-update-status.success {
  background: rgba(46, 182, 125, 0.14);
  color: var(--color-success);
}

.admin-update-status.error {
  background: rgba(229, 83, 104, 0.12);
  color: var(--color-danger);
}

.admin-update-status.in-progress {
  background: rgba(63, 114, 255, 0.12);
  color: var(--color-accent);
}

.admin-update-output-pre {
  margin: 0;
  padding: 12px 14px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  background: #0f172a;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-restart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
  border-radius: var(--radius-medium);
}

[data-theme="dark"] .admin-restart-overlay {
  background: rgba(15, 23, 42, 0.9);
}

.admin-restart-overlay-content {
  text-align: center;
  max-width: 400px;
  padding: 40px 24px;
}

.admin-restart-overlay-content h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.admin-restart-overlay-content p {
  margin: 0 0 16px;
}

/* Drilldown metric cards */

.metric-card-drilldown {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card-drilldown:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(63, 114, 255, 0.1);
}

.metric-card-drilldown:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.drilldown-chevron {
  opacity: 0;
  vertical-align: middle;
  margin-left: 2px;
  color: var(--color-accent);
  transition: opacity 0.2s ease;
}

.metric-card-drilldown:hover .drilldown-chevron {
  opacity: 1;
}

/* Drilldown modal */

.drilldown-modal-content {
  max-width: 860px;
  width: 90vw;
  max-height: 85vh;
}

.drilldown-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 64px);
  padding: 20px 24px 24px;
}

.drilldown-section {
  margin-bottom: 24px;
}

.drilldown-section:last-child {
  margin-bottom: 0;
}

.drilldown-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.drilldown-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.drilldown-info-item {
  padding: 12px 14px;
  border-radius: var(--radius-medium);
  background: var(--color-surface-muted);
}

.drilldown-info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.drilldown-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  word-break: break-all;
}

.drilldown-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
}

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

.drilldown-table th,
.drilldown-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.drilldown-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-surface-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.drilldown-table tbody tr:last-child td {
  border-bottom: none;
}

.drilldown-table tbody tr:hover {
  background: rgba(63, 114, 255, 0.04);
}

.drilldown-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drilldown-status-running {
  background: rgba(46, 182, 125, 0.14);
  color: var(--color-success);
}

.drilldown-status-exited,
.drilldown-status-stopped,
.drilldown-status-dead {
  background: rgba(229, 83, 104, 0.12);
  color: var(--color-danger);
}

.drilldown-status-created,
.drilldown-status-paused {
  background: rgba(245, 158, 11, 0.16);
  color: var(--color-warning, #f59e0b);
}

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

.drilldown-actions .btn-small {
  padding: 2px 10px;
  min-height: 28px;
  font-size: 12px;
}

.drilldown-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.drilldown-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.drilldown-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--color-surface-muted);
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  color: var(--color-text);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drilldown-inline-message {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-medium);
  background: rgba(63, 114, 255, 0.08);
  color: var(--color-text);
  font-size: 13px;
}

@media (max-width: 720px) {
  .drilldown-modal-content {
    width: 98vw;
    max-height: 92vh;
  }

  .drilldown-info-grid {
    grid-template-columns: 1fr;
  }

  .drilldown-modal-body {
    padding: 16px;
  }
}
