/* Tailwind overrides + brand CSS vars applied by src/brand.js. */

:root {
  --brand-primary: #1E293B;
  --brand-accent:  #2563EB;
  --brand-text:    #0F172A;
  --brand-bg:      #F8FAFC;
}

body {
  background: var(--brand-bg);
  color: var(--brand-text);
}

.brand-primary-bg  { background: var(--brand-primary); }
.brand-accent-bg   { background: var(--brand-accent); }
.brand-accent-text { color: var(--brand-accent); }

.status-green  { color: #16a34a; }
.status-amber  { color: #d97706; }
.status-red    { color: #dc2626; }
.status-unknown { color: #64748b; }

/* Stampeders brand tweaks. Variables --brand-primary/--brand-accent/etc.
   are set at runtime by src/brand.js from clientConfig.brand. */

:root {
  color-scheme: light;
}

body {
  background: var(--brand-bg, #F8FAFC);
  color:      var(--brand-text, #0F172A);
}

/* Cards: retone Tailwind's pure-white surface to a warm cream that ties to the
   brand gold, and force dark text inside so readability doesn't depend on body
   color. Without this, page-level body text (white, set so loose text reads on
   the green page bg) bleeds into card interiors and renders white-on-white. */
.bg-white {
  background-color: #FBF7EE !important;
  color: #0F172A;
}

/* Form controls: force dark text and white bg with !important to win the
   cascade regardless of anything (Tailwind CDN preflight, late style
   injection, etc.) competing at the same element-level specificity. Native
   OS rendering handles the closed-select text and the dropdown arrow; our
   only job is making sure the colors stick. */
input, select, textarea {
  color: #0F172A !important;
  background-color: #ffffff !important;
}
option {
  color: #0F172A !important;
  background-color: #ffffff !important;
}

.btn-primary {
  background: var(--brand-primary, #206444);
  color: #ffffff;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-accent {
  background: var(--brand-accent, #C9A96C);
  color: #0F172A;
}

/* Pulsing red badge used by missing-list when a deadline has passed.
   Implemented as a class so the JS just toggles it. */
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.badge-urgent {
  background: #DC2626;
  color: #ffffff;
  animation: pulse-red 1.4s ease-out infinite;
}
.badge-approaching {
  background: #F59E0B;
  color: #1F2937;
}

/* Banner colors. */
.banner-red    { background: #FEE2E2; border-left: 4px solid #DC2626; color: #7F1D1D; }
.banner-amber  { background: #FEF3C7; border-left: 4px solid #F59E0B; color: #78350F; }
.banner-green  { background: #DCFCE7; border-left: 4px solid #16A34A; color: #14532D; }

/* Per-team missing-list PDF report (browser-native print-to-PDF).
   #print-host is hidden at all times on screen; @media print rules below
   flip it to visible and hide everything else during browser print preview.
   Module that populates it: src/compliance/print-report.js */
#print-host { display: none; }

@media print {
  /* Hide everything except the print-host while printing. */
  body > *:not(#print-host) { display: none !important; }
  #print-host {
    display: block !important;
    background: #ffffff !important;
    color: #0F172A !important;
    padding: 1.25cm 1.5cm;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.4;
  }
  body, html {
    background: #ffffff !important;
    color: #0F172A !important;
    margin: 0;
    padding: 0;
  }
  .print-header {
    border-bottom: 2px solid #206444;
    padding-bottom: 0.4cm;
    margin-bottom: 0.6cm;
  }
  .print-title {
    margin: 0;
    font-size: 16pt;
    color: #206444;
    font-weight: 700;
  }
  .print-date {
    margin: 0.2cm 0 0;
    font-size: 9pt;
    color: #475569;
  }
  .print-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .print-item {
    padding: 0.25cm 0;
    border-bottom: 1px solid #e2e8f0;
    page-break-inside: avoid;
  }
  .print-item.print-empty {
    color: #475569;
    font-style: italic;
    border-bottom: 0;
  }
  .print-name {
    font-weight: 600;
    font-size: 11pt;
  }
  .print-missing {
    font-size: 10pt;
    color: #334155;
    margin-top: 0.1cm;
  }
  .print-badge {
    display: inline-block;
    margin-left: 0.3cm;
    padding: 0.05cm 0.2cm;
    border-radius: 0.1cm;
    font-size: 8pt;
    font-weight: 600;
    vertical-align: middle;
  }
  .print-badge-red {
    background: #FEE2E2;
    color: #7F1D1D;
    border: 1px solid #FCA5A5;
  }
  .print-badge-amber {
    background: #FEF3C7;
    color: #78350F;
    border: 1px solid #FCD34D;
  }
  .print-footer {
    margin-top: 0.8cm;
    padding-top: 0.3cm;
    border-top: 1px solid #cbd5e1;
    font-size: 9pt;
    color: #64748b;
  }
  .print-footer p {
    margin: 0.1cm 0;
  }
  /* Page setup: standard letter, margins handled by .print-host padding above. */
  @page {
    size: letter;
    margin: 0;
  }
}
