/* Stock reports — dropdown, options modal, print preview (greyscale) */

.report-select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  width: 240px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}
.report-select:focus {
  outline: none;
  border-color: #525252;
  box-shadow: 0 0 0 2px rgba(82, 82, 82, .2);
}

.report-options-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

#overlayReportPrint {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 320;
}
#overlayReportPrint.open { display: flex; }

.report-print-modal {
  background: #fff;
  border-radius: 12px;
  max-width: min(1400px, 98vw);
  width: 98%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.report-print-modal .print-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #d4d4d4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.report-print-modal .print-modal-header h2 {
  margin: 0;
  font-size: 18px;
  color: #171717;
}
.report-print-modal .print-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-print-modal .print-modal-content {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  background: #f5f5f5;
}
.report-print-modal .print-preview {
  background: #fff;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  max-width: none;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Report document styles — greyscale */
.sr-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #171717;
}
.sr-doc-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #171717;
}
.sr-doc-meta {
  font-size: 12px;
  color: #525252;
  line-height: 1.5;
}
.sr-company {
  text-align: right;
  font-size: 12px;
  color: #404040;
  line-height: 1.45;
}
.sr-section {
  margin-top: 22px;
  page-break-inside: avoid;
}
.sr-section .sr-section {
  margin-top: 12px;
  margin-left: 4px;
}
.sr-section .sr-section .sr-section-title {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.sr-section-title {
  margin: 0 0 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #171717;
  background: #e5e5e5;
  border-left: 4px solid #737373;
}
.sr-section-title.sr-emphasis {
  background: #d4d4d4;
  border-left-color: #171717;
  color: #000;
}
.sr-section-title.sr-end,
.sr-section-title.sr-assembly,
.sr-section-title.sr-matparts,
.sr-section-title.sr-part,
.sr-section-title.sr-material {
  background: #e5e5e5;
  border-left-color: #737373;
  color: #171717;
}
.sr-section-title.sr-end { background: #f5f5f5; border-left-color: #171717; }
.sr-section-title.sr-assembly { background: #e5e5e5; border-left-color: #525252; }
.sr-section-title.sr-matparts { background: #d4d4d4; border-left-color: #404040; }
.sr-section-title.sr-part { background: #f5f5f5; border-left-color: #737373; }
.sr-section-title.sr-material { background: #e5e5e5; border-left-color: #525252; }

.sr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 4px;
  table-layout: auto;
}
.sr-table th,
.sr-table td {
  border: 1px solid #a3a3a3;
  padding: 5px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  color: #171717;
}
.sr-table th {
  background: #e5e5e5;
  font-weight: 600;
  color: #171717;
}
.sr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-table .sr-parent-row td { font-weight: 600; background: #f5f5f5; }
.sr-table .sr-child-row td { color: #404040; }
.sr-table .sr-child-row td:first-child { padding-left: 18px; }
.sr-table .sr-nested-row td:first-child { padding-left: 32px; }
.sr-table .sr-nested-row td { color: #525252; font-size: 11px; }
.sr-muted { color: #737373; font-weight: 400; }
.sr-table tr.sr-low td { background: #d4d4d4; font-weight: 600; }
.sr-table tr.sr-warn td { background: #f5f5f5; }
.sr-empty {
  margin: 8px 0 0;
  font-size: 12px;
  color: #737373;
  font-style: italic;
}
.sr-totals {
  margin-top: 10px;
  font-size: 12px;
  color: #404040;
}
.sr-totals strong { font-variant-numeric: tabular-nums; color: #171717; }
.sr-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid #d4d4d4;
  font-size: 11px;
  color: #737373;
}

@media print {
  body * { visibility: hidden; }
  #overlayReportPrint,
  #overlayReportPrint * { visibility: visible; }
  #overlayReportPrint {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: block !important;
  }
  .report-print-modal {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .report-print-modal .print-modal-header,
  .no-print { display: none !important; }
  .report-print-modal .print-modal-content {
    padding: 0;
    overflow: visible;
    background: #fff;
  }
  .report-print-modal .print-preview {
    padding: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
    width: 100%;
  }
  .sr-table th,
  .sr-table td { white-space: nowrap; }
}
