:root {
  --bg-root: #0a0a0c;
  --bg-surface: #111114;
  --bg-elevated: #18181c;
  --bg-input: #0e0e11;
  --border: #27272d;
  --border-subtle: #1e1e23;
  --text-primary: #e8e4dd;
  --text-secondary: #8a8580;
  --text-tertiary: #5c5853;
  --text-inverse: #0a0a0c;
  --amber: #d4a24e;
  --amber-dim: #b8882e;
  --amber-glow: rgba(212, 162, 78, 0.15);
  --amber-glow-strong: rgba(212, 162, 78, 0.3);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --copilot: #79c0ff;
  --copilot-dim: rgba(121, 192, 255, 0.12);
  --codex: #a78bfa;
  --codex-dim: rgba(167, 139, 250, 0.12);
  --claude: #fb923c;
  --claude-dim: rgba(251, 146, 60, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-display: "Lexend", sans-serif;
  --font-mono: "Geist Mono", "SF Mono", "Cascadia Code", monospace;
}

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

body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.text-muted {
  color: var(--text-tertiary);
}
.text-error {
  color: var(--red);
}

#login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-root);
}
#login-gate.hidden {
  display: none;
}

.login-box {
  width: 320px;
  text-align: center;
}
.login-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--amber);
  margin-bottom: 6px;
  text-shadow: 0 0 40px var(--amber-glow-strong);
}
.login-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-form {
  display: flex;
  gap: 0;
}
.login-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
  outline: none;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.login-form input:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 3px var(--amber-glow);
  z-index: 1;
}
.login-form input::placeholder {
  color: var(--text-tertiary);
}
.login-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  text-align: center;
}
.login-error:empty {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--amber);
  color: var(--text-inverse);
  border-color: var(--amber);
}
.btn-primary:hover:not(:disabled) {
  background: var(--amber-dim);
  border-color: var(--amber-dim);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
  background: var(--bg-elevated);
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--border);
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-dim);
  border-color: var(--red);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

#app {
  display: none;
}
#app.visible {
  display: block;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--amber);
}
.header-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.tab {
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color 120ms ease,
    border-color 120ms ease;
  margin-bottom: -1px;
}
.tab:hover {
  color: var(--text-secondary);
}
.tab.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}
.section-count {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: 8px;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 200ms ease;
}
.card:hover {
  border-color: var(--border);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.card-label {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.card-key {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.card-key code {
  font-family: var(--font-mono);
  user-select: all;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.card-meta + .card-meta {
  margin-top: 6px;
}
.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot-sep {
  color: var(--text-tertiary);
  opacity: 0.5;
}
.dot-sep::before {
  content: "\00b7";
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.badge-copilot {
  color: var(--copilot);
  background: var(--copilot-dim);
}
.badge-codex {
  color: var(--codex);
  background: var(--codex-dim);
}
.badge-claude {
  color: var(--claude);
  background: var(--claude-dim);
}
.badge-primary {
  color: var(--amber);
  background: var(--amber-glow);
}
.badge-active {
  color: var(--green);
  background: var(--green-dim);
}
.badge-expired {
  color: var(--red);
  background: var(--red-dim);
}
.badge-revoked {
  color: var(--text-tertiary);
  background: var(--bg-elevated);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.status-dot.expired {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.status-dot.unknown {
  background: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-tertiary);
}
.empty-state-text {
  font-size: 13px;
  margin-bottom: 16px;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.field {
  margin-bottom: 16px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.field-input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.field-input:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.field-input::placeholder {
  color: var(--text-tertiary);
}
textarea.field-input {
  resize: vertical;
  min-height: 60px;
  line-height: 1.45;
}
textarea.field-input-compact {
  min-height: 38px;
}
select.field-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%235c5853' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.field-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.scope-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: color 120ms ease;
}

.scope-grid .scope-check {
  margin-bottom: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}
.scope-grid .scope-check:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.scope-grid .scope-check:has(input:checked) {
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  color: var(--text-primary);
}

.scope-account-groups {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  overflow: hidden;
}

.scope-account-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 10px;
  color: var(--text-tertiary);
}

.scope-account-list {
  display: flex;
  flex-direction: column;
}

.scope-account-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 100ms ease;
}
.scope-account-option:hover {
  background: var(--bg-elevated);
}

.scope-account-option:has(input:checked) {
  background: var(--amber-glow);
}

.scope-account-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.scope-account-option input {
  flex-shrink: 0;
}

.scope-account-option + .scope-account-option {
  border-top: 1px solid var(--border-subtle);
}

.scope-account-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.scope-account-name {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
}

.scope-account-meta {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-empty {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 440px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}
.modal-sm {
  width: 380px;
}
.modal-wide {
  width: 580px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.modal-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  pointer-events: auto;
  animation: toast-in 200ms ease forwards;
  max-width: 380px;
}
.toast.success {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green-dim), var(--bg-elevated));
}
.toast.error {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red-dim), var(--bg-elevated));
}
.toast.removing {
  animation: toast-out 150ms ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

.oauth-flow-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 12px;
}
.oauth-flow-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.oauth-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.oauth-step-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber-glow);
  color: var(--amber);
  font-size: 10px;
  font-weight: 600;
}
.oauth-instructions {
  font-weight: 600;
  color: var(--amber);
  font-size: 14px;
}
.oauth-url {
  word-break: break-all;
  color: var(--text-secondary);
}
.oauth-url a {
  color: var(--amber);
  text-decoration: none;
}
.oauth-url a:hover {
  text-decoration: underline;
}

.key-reveal {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-root);
  border: 1px dashed var(--amber-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.key-reveal-value {
  flex: 1;
  font-size: 12px;
  color: var(--amber);
  word-break: break-all;
  user-select: all;
}

.snippet-block {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.collapsible {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  margin-top: 14px;
  transition: border-color 200ms ease;
}
.collapsible:hover {
  border-color: var(--border);
}
.collapsible > summary {
  padding: 16px 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.collapsible > summary::-webkit-details-marker {
  display: none;
}
.collapsible > summary::before {
  content: "\25B8";
  font-size: 10px;
  color: var(--text-tertiary);
  transition: transform 150ms ease;
}
.collapsible[open] > summary::before {
  transform: rotate(90deg);
}
.collapsible-body {
  padding: 0 20px 20px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
.spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fade-in 300ms ease forwards;
}
.fade-in-delay {
  opacity: 0;
  animation: fade-in 300ms ease 100ms forwards;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 16px;
  }
  .header-tag {
    display: none;
  }
  .tab {
    padding: 10px 12px;
    font-size: 11px;
  }
  .card-top {
    flex-direction: column;
    gap: 10px;
  }
  .card-actions {
    align-self: flex-start;
    flex-wrap: wrap;
  }
  .card-meta {
    gap: 8px;
  }
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.detail-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.detail-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.detail-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.detail-table th {
  text-align: left;
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.detail-table td {
  padding: 7px 8px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0 10px;
}

.dash-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.dash-window-selector {
  display: flex;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}
.dash-window-btn {
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 120ms ease;
}
.dash-window-btn:hover {
  color: var(--text-secondary);
}
.dash-window-btn.active {
  color: var(--text-inverse);
  background: var(--amber);
}
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.dash-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border-top: 2px solid var(--border-subtle);
  transition: border-color 200ms ease;
}
.dash-kpi:hover {
  border-color: var(--border);
}
.dash-kpi-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.dash-kpi-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}
.dash-kpi-delta {
  font-size: 11px;
  margin-top: 6px;
}
.dash-kpi-delta.positive {
  color: var(--green);
}
.dash-kpi-delta.negative {
  color: var(--red);
}
.dash-kpi-delta.neutral {
  color: var(--text-tertiary);
}
.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  transition: border-color 200ms ease;
}
.dash-card:hover {
  border-color: var(--border);
}
.dash-chart-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.dash-chart-svg {
  width: 100%;
  display: block;
}
.dash-legend {
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 10px;
}
.dash-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-provider-grid {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  column-gap: 10px;
}
.dash-provider-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-provider-row:last-child {
  border-bottom: none;
}
.dash-provider-info {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.dash-provider-info .badge {
  flex-shrink: 0;
}
.dash-provider-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: auto;
  width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dash-provider-track {
  height: 22px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.dash-provider-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 300ms ease;
}
.dash-provider-stat {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dash-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.dash-last-request {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: right;
  margin: 8px 2px 14px;
}

@media (max-width: 900px) {
  .detail-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dash-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .dash-grid-2 {
    grid-template-columns: 1fr;
  }
  .dash-provider-grid {
    grid-template-columns: 100px 1fr;
  }
  .dash-provider-stat {
    display: none;
  }
}
@media (max-width: 640px) {
  .detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-controls {
    flex-direction: column;
    align-items: flex-start;
  }
}
