/* Admin SPA-specific styles. Tailwind via CDN handles most layout; here we
   keep tiny tweaks (sidebar item active state, table density) that would be
   noisy if expressed as utility classes everywhere. */

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  color: #cbd5e1;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 120ms ease, color 120ms ease;
  user-select: none;
}
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active {
  background: #1e3a8a22;
  border-left-color: #3070ff;
  color: #fff;
}
.nav-icon { font-size: 1rem; width: 1.25rem; display: inline-block; text-align: center; }

/* Compact data table */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th,
.table td {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 5;
}
.table tbody tr:hover { background: #f8fafc; }

/* Pills */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}
.pill-green  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pill-amber  { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.pill-red    { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.pill-blue   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pill-purple { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.pill-gray   { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

/* KPI tile */
.tile {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.tile-label { font-size: 0.75rem; color: #64748b; }
.tile-value { font-size: 1.4rem; font-weight: 600; color: #0f172a; }
.tile-sub   { font-size: 0.7rem; color: #94a3b8; }

/* Mini bar chart used on dashboard */
.bars { display: flex; align-items: end; gap: 2px; height: 60px; }
.bars > div {
  flex: 1;
  background: linear-gradient(180deg, #3070ff, #1e58e6);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.8rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  transition: background 120ms ease;
}
.btn:hover { background: #f1f5f9; }
.btn-primary { background: #1e58e6; border-color: #1e58e6; color: #fff; }
.btn-primary:hover { background: #1747bd; }
.btn-danger  { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-ghost { background: transparent; border-color: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }

/* Inline form fields used in modals */
.field { display: block; margin-bottom: 0.9rem; }
.field label { font-size: 0.78rem; color: #475569; margin-bottom: 0.25rem; display: block; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  font-size: 0.85rem;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #3070ff;
  box-shadow: 0 0 0 3px #eef6ff;
}

/* Mono cells (id, hash) */
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.78rem; color: #475569; }

/* Empty state */
.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}
