/* Application styles. Everything that used to sit in <style> blocks and style=""
   attributes lives here, so the Content-Security-Policy can say
   `style-src 'self'` without 'unsafe-inline': an HTML injection then cannot
   bring its own CSS either (no attribute-selector exfiltration, no overlay).
   Styles set from scripts through element.style are CSSOM and unaffected. */

/* Which canvas the browser paints on its own, the surface shown while
   navigating between pages. Without it the browser paints white between pages
   even in dark mode. This file is linked first in <head>, before Bootstrap, and
   a stylesheet there blocks rendering until it is loaded, so it holds from the
   first frame just as the inline block it replaces did. */
:root { color-scheme: light; }
:root[data-bs-theme="dark"] { color-scheme: dark; }

/* Small type */
.text-xs  { font-size: .75rem; }
.text-2xs { font-size: .72rem; }

/* Layout helpers */
.pre-line       { white-space: pre-line; }
.sticky-below-nav { top: 76px; }
.scroll-60vh    { max-height: 60vh; overflow-y: auto; }
.max-w-20rem    { max-width: 20rem; }
.max-w-420      { max-width: 420px; }
.min-w-120      { min-width: 120px; }
.w-3rem         { width: 3rem; }
.w-6rem         { width: 6rem; }
.w-10rem        { width: 10rem; }

/* Navigation */
.stage-badge { font-size: .6em; vertical-align: middle; }
.agent-lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6c757d;
  flex-shrink: 0;
}

/* Scan images */
.scan-preview {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  object-position: top;
  cursor: zoom-in;
}
.scan-modal-img { max-width: 850px; max-height: 90vh; }
.batch-thumb { max-width: 80px; max-height: 56px; object-fit: cover; }

/* Dashboard */
.news-meta { opacity: .7; letter-spacing: .03em; }
.home-tile,
.home-stat {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.home-tile:hover,
.home-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Sign-in pages */
.auth-hero {
  height: 160px;
  object-fit: cover;
  object-position: center 60%;
}

/* Landing page */
.landing-hero {
  height: 300px;
  object-fit: cover;
  object-position: center 60%;
}
@media (max-width: 576px) {
  .landing-hero { height: 180px; }
}
.landing-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.landing-tile {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.landing-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
