/* PayrollPro — base tokens, dark mode, and hand-authored component classes.
   No build step: this file is loaded directly by the browser. */

@font-face { font-display: swap; }

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --color-brand-50: #eef4ff;
  --color-brand-100: #d9e6ff;
  --color-brand-200: #bcd3ff;
  --color-brand-300: #8eb6ff;
  --color-brand-400: #598dff;
  --color-brand-500: #3366ff;
  --color-brand-600: #1f47f5;
  --color-brand-700: #1735e1;
  --color-brand-800: #192db6;
  --color-brand-900: #1a2c8f;
  --color-brand-950: #141d57;

  --color-accent-50: #ecfdf5;
  --color-accent-100: #d1fae5;
  --color-accent-200: #a6f4d0;
  --color-accent-300: #6ee7b6;
  --color-accent-400: #34d399;
  --color-accent-500: #10b981;
  --color-accent-600: #059669;
  --color-accent-700: #047857;
  --color-accent-800: #065f46;
  --color-accent-900: #064e3b;

  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --border: #e4e8ef;
  --text: #11141c;
  --text-muted: #677589;
  --shadow: 0 1px 3px rgba(16, 20, 28, 0.06), 0 1px 2px rgba(16, 20, 28, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 20, 28, 0.12), 0 4px 12px -4px rgba(16, 20, 28, 0.08);
}

.dark {
  --bg: #0b0e16;
  --surface: #141823;
  --surface-2: #1b2030;
  --border: #262c3d;
  --text: #e8ecf4;
  --text-muted: #8593a8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.5), 0 4px 12px -4px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; padding: 0; }
html { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background-color: var(--bg); color: var(--text); transition: background-color .3s ease, color .3s ease; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font-family: inherit; }
table { border-collapse: collapse; }
ul { list-style: none; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- component classes ---- */
.bg-app { background-color: var(--bg); }
.bg-surface { background-color: var(--surface); }
.bg-surface-2 { background-color: var(--surface-2); }
.text-default { color: var(--text); }
.text-muted { color: var(--text-muted); }
.border-app { border-color: var(--border); }
.shadow-card { box-shadow: var(--shadow); }
.shadow-float { box-shadow: var(--shadow-lg); }

.glass {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.card { background-color: var(--surface); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); }

.input {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: .625rem;
  padding: .5rem .75rem;
  width: 100%;
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--color-brand-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-500) 18%, transparent); }
.input::placeholder { color: var(--text-muted); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--color-brand-600); color: #fff; font-weight: 600;
  border-radius: .625rem; padding: .5rem 1rem; font-size: .875rem;
  transition: background-color .15s, transform .1s;
}
.btn-primary:hover { background-color: var(--color-brand-700); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); border: 1px solid var(--border); border-radius: .625rem;
  padding: .5rem 1rem; font-size: .875rem; font-weight: 500; transition: background-color .15s;
}
.btn-ghost:hover { background-color: var(--surface-2); }
.btn-ghost:disabled { opacity: .6; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .5rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; border: 1px solid var(--border);
}

.animate-fade-in { animation: fadeIn .4s ease both; }
.animate-rise { animation: rise .45s cubic-bezier(.16,1,.3,1) both; }
.animate-slide-in { animation: slideIn .3s ease both; }
.animate-scale-in { animation: scaleIn .2s ease both; }
.animate-pulse { animation: pulse 1.6s cubic-bezier(.4,0,.6,1) infinite; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: .5rem;
}
