/* ============================================
   PIXEL PRODUCTION — Base Styles & Reset
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-sm); /* 14px is standard for modern SaaS dashboards */
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-deepest);
  overflow: hidden;
  height: 100vh;
}

/* ─── Scrollbars (Sleek Mac OS style) ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 150, 150, 0.4);
}

/* ─── Selection ─── */
::selection {
  background: var(--primary-subtle);
  color: var(--text-primary);
}

/* ─── Links ─── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-light);
}

/* ─── Images ─── */
img {
  max-width: 100%;
  display: block;
}

/* ─── Headings ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em; /* Tighter letter spacing for premium feel */
}

h1 { font-size: var(--text-4xl); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

/* ─── Paragraphs ─── */
p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Lists ─── */
ul, ol { list-style: none; }

/* ─── Inputs ─── */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ─── Tables ─── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ─── Utility Classes ─── */
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-accent    { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-error     { color: var(--error) !important; }

.font-mono      { font-family: var(--font-mono) !important; }
.font-medium    { font-weight: 500 !important; }
.font-semibold  { font-weight: 600 !important; }
.font-bold      { font-weight: 700 !important; }

.text-xs   { font-size: var(--text-xs) !important; }
.text-sm   { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg   { font-size: var(--text-lg) !important; }
.text-xl   { font-size: var(--text-xl) !important; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-xs      { gap: var(--space-xs); }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }
.gap-xl      { gap: var(--space-xl); }

.hidden { display: none !important; }
.relative { position: relative; }
