/* ── Solix Performance Monitor – component styles ── */
/* Tailwind CDN cannot process @apply in external files.
   All component rules below use plain CSS.                                */

/* ── Cards ── */
.card {
  background-color: #0f1a2e;
  border: 1px solid #1e3050;
  border-radius: 0.875rem;
  padding: 1.5rem;
}

/* ── Sidebar nav links ── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
  border: 1px solid transparent;
  position: relative;
}
.nav-link:hover {
  color: #f1f5f9;
  background-color: rgba(148,163,184,0.08);
}
.nav-link.active {
  color: #fff;
  background-color: rgba(249,115,22,0.12);
  border-color: rgba(249,115,22,0.25);
}
.nav-link.active svg { color: #fb923c; }
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  background: #f97316;
  border-radius: 0 3px 3px 0;
}

/* ── Form labels ── */
.form-label {
  display: block;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

/* ── Form inputs ── */
.form-input {
  width: 100%;
  background-color: #0a1526;
  border: 1px solid #1e3a5f;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: #f1f5f9;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.18);
}
.form-input::placeholder { color: #475569; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #f97316;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-primary:hover { background-color: #ea580c; box-shadow: 0 4px 14px rgba(249,115,22,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background-color: #273549; border-color: #4a6080; }

/* ── Range toggle buttons ── */
.range-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.active-range { background-color: rgba(249,115,22,0.12) !important; color: #fb923c !important; }

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-green  { background: rgba(34,197,94,0.12);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-red    { background: rgba(239,68,68,0.12);   color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-amber  { background: rgba(245,158,11,0.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-gray   { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }
.badge-orange { background: rgba(249,115,22,0.12);  color: #fb923c; border: 1px solid rgba(249,115,22,0.25); }

/* ── Sidebar section labels ── */
.nav-section {
  padding: 1rem 0.875rem 0.375rem;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2d4060;
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner-orange {
  border-color: rgba(249,115,22,0.25);
  border-top-color: #f97316;
}

/* ── History range buttons ── */
.active-range {
  background: #f97316;
  color: #fff;
}

/* ── Animated pulse for live badge ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.pulse-dot { animation: pulse-dot 1.5s ease-in-out infinite; }

/* ── Flash on value update ── */
@keyframes value-flash {
  0%   { color: #fb923c; }
  100% { color: inherit; }
}
.value-flash { animation: value-flash 0.6s ease-out; }
