/* Loading skeletons and command palette. Visual language matches the app shell. */

.skeleton-block {
  padding: 8px 0 16px;
}

.skeleton-table {
  width: 100%;
  border-collapse: collapse;
}

.skeleton-row td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border, #1e3a5f);
}

.skeleton-bar {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface-2, #253349) 25%,
    var(--surface-3, #334155) 37%,
    var(--surface-2, #253349) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.2s ease infinite;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 4px;
}

.skeleton-stack .skeleton-bar {
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-bar {
    animation: none;
  }
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.cmdk-root[hidden] {
  display: none !important;
}

.cmdk-root {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.cmdk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.cmdk {
  position: relative;
  margin: 12vh auto 0;
  width: min(560px, calc(100% - 24px));
  background: var(--surface, #1e293b);
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.cmdk-input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid var(--border, #1e3a5f);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
}

.cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(360px, 50vh);
  overflow: auto;
}

.cmdk-group {
  margin: 6px 8px 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
}

.cmdk-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.cmdk-option[aria-selected="true"],
.cmdk-option:hover {
  background: var(--accent-muted, rgba(37, 99, 235, 0.16));
}

.cmdk-option-meta {
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
  white-space: nowrap;
}

.cmdk-empty {
  padding: 16px;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
}

.cmdk-hint {
  display: flex;
  gap: 12px;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--border, #1e3a5f);
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}

.cmdk-hint kbd {
  font-family: inherit;
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 4px;
  padding: 0 4px;
  background: var(--bg, #0b1120);
}
