/* ============================================================
   IMATA Payroll – Base / Reset
   ============================================================ */

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

html {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(135deg, var(--page-bg-from), var(--page-bg-to));
  min-height: 100vh;
  scroll-behavior: smooth;
  transition: background 200ms ease-out, color 200ms ease-out;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--orange-500);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: var(--radius-chip);
  text-decoration: none;
  transition: top 150ms ease-out;
}
.skip-link:focus {
  top: 16px;
}

/* Typography */
h1 { font-size: 24px; font-weight: 600; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
h4 { font-size: 14px; font-weight: 600; line-height: 1.4; }
h5 { font-size: 13px; font-weight: 500; line-height: 1.4; }

p  { color: var(--text); }

a  {
  color: var(--orange-700);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Focus ring – global */
:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

/* Money: tabular numerals everywhere */
.money,
.kpi-number,
[data-money] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Utility helpers */
.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;
}

.text-muted    { color: var(--text-muted); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }
.text-orange   { color: var(--orange-700); }

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