/* ==========================================================================
   qr-dg — Compiled Main Stylesheet (from scss/main.scss)
   ========================================================================== */

/* --- 1. Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- 2. Tokens & Themes --- */
:root,
[data-theme='light'] {
  --font-sans: 'Inter', 'M PLUS 1p', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'M PLUS 1p', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --brand-primary: #0d9488;
  --brand-accent: #ff3b30;

  --bg-page: #fafafa;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;

  --text-primary: #09090b;
  --text-secondary: #71717a;

  --border-color: rgba(9, 9, 11, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

[data-theme='dark'] {
  --bg-page: #09090b;
  --bg-surface: #18181b;
  --bg-subtle: #27272a;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;

  --border-color: rgba(255, 255, 255, 0.12);
}

/* --- 3. Base & Layout --- */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
}

code, pre {
  font-family: var(--font-mono);
}

.heading-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.app-container {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 24px;
}

.app-main {
  padding-block: 36px 80px;
}

/* --- 4. Utilities --- */
/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }

/* Flex */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* Margin */
.m-0 { margin: 0; }
.mx-auto { margin-inline: auto; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* Padding */
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-inline: 16px; }
.py-2 { padding-block: 8px; }
.py-4 { padding-block: 16px; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 1040px; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }

/* Position & Z-Index */
.pos-relative { position: relative; }
.pos-absolute { position: absolute; }
.pos-fixed { position: fixed; }
.pos-sticky { position: sticky; top: 0; }
.inset-0 { inset: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* Text */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-teal { color: #0d9488; }
.text-coral { color: #ff3b30; }

/* Background, Border, Radius, Shadow */
.bg-surface { background-color: var(--bg-surface); }
.bg-subtle { background-color: var(--bg-subtle); }
.bg-teal { background-color: #0d9488; color: #ffffff; }
.bg-coral { background-color: #ff3b30; color: #ffffff; }
.border { border: 1px solid var(--border-color); }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.rounded-sm { border-radius: 8px; }
.rounded-md { border-radius: 12px; }
.rounded-lg { border-radius: 16px; }
.rounded-xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08); }
.shadow-lg { box-shadow: 0 20px 48px rgba(0, 0, 0, 0.14); }

/* Misc Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.pe-none { pointer-events: none; }
.pe-auto { pointer-events: auto; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-auto { aspect-ratio: auto; }

.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;
}

/* --- 5. Components --- */
.ui-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* --- 6. Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.anim-fade-in {
  animation: fadeIn 0.24s ease both;
}

/* --- 7. Print --- */
@media print {
  nav, header, button, .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}