/* Reset + body bazowe — tylko to, czego nie da sie pominac */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-hero);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  /* Hint do browsera: aplikacja ma dark theme — native controls (select dropdown,
     date picker, scrollbar) maja uzyc ciemnej wersji systemowej. */
  color-scheme: dark;
}
/* Subtelny grid overlay (Codex) — daje produktowy vibe bez dominowania */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.6), transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, rgba(255,255,255,0.6), transparent 90%);
  opacity: 0.4;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 0%, transparent 55%, rgba(5,7,13,0.68) 100%);
  z-index: 0;
}
.app-shell { position: relative; z-index: 1; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); }
/* programatyczny focus heading po zmianie ekranu (a11y) — bez ringu wizualnego.
   Announcer aria-live juz oglasza zmiane screen readerowi. */
h1[tabindex="-1"], h2[tabindex="-1"], [role="heading"][tabindex="-1"] {
  outline: none !important;
  box-shadow: none !important;
}
p { margin: 0; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
a { color: var(--accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea {
  font-family: inherit; font-size: var(--fs-base); color: var(--text-primary);
  background: var(--bg-glass); border: 1px solid var(--bg-border);
  border-radius: var(--radius-inner); padding: 12px 16px; width: 100%;
  outline: none;
}
/* Select — wlasny chevron (SVG w background) zeby user widzial ze to dropdown.
   Native appearance na inicializacji zostaje (opens on click), customujemy tylko tlo. */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23a855f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
/* Styling dla opcji dropdowna. Native <option> ma ograniczoną stylizację (browser
   maluje je systemowym widgetem), ale background-color i color są respektowane
   przez Chromium/Firefox/Edge. color-scheme: dark na body dodaje dark hint systemowi.
   NIE stylujemy :hover / :checked — native selection highlight wystarczy i jest
   spojny z OS (purple rgba mixował sie na rozowy na ciemnym tle). */
select option {
  background-color: #0f172a;
  color: var(--text-primary);
  padding: 8px 12px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.35);
}
.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;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
