/* ============================================================
   Aurora UCP — Base & Reset
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow: hidden;
}

/* ---- Links ---- */
a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-hover); }

/* ---- Code / Mono ---- */
code, pre, .mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* ---- Scrollbars ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-emphasis); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

/* ---- Typography helpers ---- */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--text-accent); }
.text-xs        { font-size: var(--text-xs); }
.text-sm        { font-size: var(--text-sm); }
.text-md        { font-size: var(--text-md); }
.text-mono      { font-family: var(--font-mono); }

/* ---- Status text colors ---- */
.text-healthy  { color: var(--status-healthy); }
.text-warning  { color: var(--status-warning); }
.text-critical { color: var(--status-critical); }
.text-offline  { color: var(--status-unknown); }

/* ---- Utility ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.truncate {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.w-full { width: 100%; }

/* ---- Loading spinner ---- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---- Pulse dot ---- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ---- Fade in ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn var(--transition-slow) ease forwards;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-4) 0;
}
