/*
 * Inventory print layout — loaded only by layouts/print.html.erb
 */

:root {
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-faint: #64748b;
  --line: #cbd5e1;
  --line-light: #e2e8f0;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --accent: #0f5b99;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.45;
  background: #e8edf2;
}

.no-print {
  display: block;
}

.print-toolbar {
  max-width: 8.5in;
  margin: 16px auto 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.print-toolbar__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.print-toolbar__btn {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.print-toolbar__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.print-document {
  max-width: 8.5in;
  margin: 0 auto 48px;
  padding: 0.55in 0.6in;
  background: var(--surface);
  box-shadow: 0 2px 24px rgba(15, 23, 42, 0.12);
}

.archived-notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  font-size: 12px;
  color: #92400e;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--accent);
}

.doc-header__brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.doc-header__logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-header__org {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.doc-header__doc-type {
  font-size: 15px;
  font-weight: 600;
}

.doc-header__meta {
  text-align: right;
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.hero-ident {
  margin-bottom: 18px;
}

.hero-ident__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-ident__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.supp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.supp-card {
  border: 1px solid var(--line-light);
  padding: 10px 12px;
  background: var(--surface-muted);
}

.supp-card__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.supp-card__dl {
  margin: 0;
  display: grid;
  gap: 6px;
}

.supp-card__dl dt {
  display: inline;
  font-size: 10px;
  color: var(--ink-faint);
}

.supp-card__dl dt::after {
  content: ": ";
}

.supp-card__dl dd {
  display: inline;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
}

.supp-card__empty {
  margin: 0;
  font-size: 11px;
  color: var(--ink-faint);
  font-style: italic;
}

.print-section {
  margin-bottom: 22px;
}

.section-heading {
  margin: 0 0 10px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid var(--line-light);
}

.field-grid {
  display: grid;
  gap: 12px 20px;
  margin: 0;
}

.field-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.field-grid__full {
  grid-column: 1 / -1;
}

.field-grid__full dd {
  white-space: pre-wrap;
  line-height: 1.4;
}

.field-grid dt {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.field-grid dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.field-meta {
  margin: 10px 0 0;
  font-size: 10px;
  color: var(--ink-faint);
}

.note-block {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-light);
  background: var(--surface-muted);
  page-break-inside: avoid;
}

.note-block__label {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.note-block__year {
  font-weight: 500;
  text-transform: none;
}

.note-block__body {
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th,
.data-table td {
  padding: 5px 6px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.data-table thead th {
  background: var(--surface-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.data-table tbody th[scope="row"] {
  background: var(--surface-muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table--compact th,
.data-table--compact td {
  padding: 4px 5px;
}

.data-table--year-comparison {
  max-width: 100%;
}

.data-table--year-comparison .year-group {
  text-align: center;
  font-size: 11px;
  background: var(--surface-muted);
}

.data-table--year-comparison tbody th[scope="row"] {
  min-width: 9rem;
  white-space: normal;
}

.doc-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid var(--line-light);
  font-size: 9px;
  color: var(--ink-faint);
}

@media print {
  html {
    font-size: 10pt;
  }

  body {
    background: white;
  }

  .no-print {
    display: none !important;
  }

  .print-document {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  @page {
    size: letter portrait;
    margin: 0.5in 0.55in;
  }

  .print-section,
  .note-block,
  .hero-ident {
    break-inside: avoid;
  }

  tr {
    break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  .data-table {
    font-size: 8pt;
  }
}
