/* ZB2 v6.6: presentation-only refinements; ASTM 53A engine is unchanged. */

/* Approved laboratory look: dark translucent panel with a gold title,
   cool-blue readings and a gold report action. Stays below the calculator. */
#app-view #results-panel {
  position: relative;
  width: 100%;
  max-height: none;
  overflow: visible;
  scroll-margin-top: 74px;
  margin: 16px 0 18px;
  padding: clamp(15px, 2.2vw, 28px);
  border: 1px solid rgba(169, 203, 230, .58);
  background: linear-gradient(145deg, rgba(9, 44, 83, .91), rgba(4, 30, 65, .86));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 23px;
  box-shadow: 0 10px 34px rgba(0, 7, 28, .48);
}
.results-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.results-dialog-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: clamp(19px, 4.4vw, 24px);
  color: #ffdf98;
  font-weight: 900;
}
.results-section-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #12334d;
  background: #ffdb91;
  font-size: 24px;
  font-weight: 900;
}
#results-panel .result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
#results-panel .result-metric {
  min-width: 0;
  word-break: break-word;
  padding: 17px 7px;
  background: #dceaf4;
  border: 1px solid #d1e2ee;
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(8, 29, 52, .06);
}
#results-panel .result-metric strong { color: #0b3559; font-size: clamp(20px, 2.2vw, 27px); }
#results-panel .result-metric small,
#results-panel .result-metric span { color: #6f879a; }
#results-panel #open-report-btn { min-height: 72px; border-radius: 12px; font-size: clamp(16px, 2vw, 19px); }
@media (max-width: 1050px) and (min-width: 651px) {
  #results-panel .result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Admin-only consolidated archive across every shift and date. */
#page-archive .archive-bulk-panel {
  display: grid;
  gap: 10px;
  padding: 15px;
  margin-bottom: 13px;
  border: 1px solid rgba(255, 211, 110, .65);
  background: rgba(7, 37, 73, .89);
  color: #fff7df;
}
#page-archive .archive-bulk-panel[hidden] { display: none !important; }
#page-archive .archive-bulk-panel p { margin: 0; font-size: 12px; line-height: 1.8; }
#page-archive .shift-folder-card { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
#page-archive .shift-folder-card .folder { width: 100%; min-height: 85px; }
.archive-merge-all-button {
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: 1px solid #ffda83;
  border-radius: 11px;
  color: #162d45;
  background: linear-gradient(115deg, #e6a52c, #ffdf83);
  box-shadow: 0 3px 8px rgba(2, 16, 36, .22);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 900;
  cursor: pointer;
}
.archive-merge-all-button:hover { filter: brightness(1.06); }
.archive-merge-all-button:disabled { opacity: .7; cursor: progress; }
.archive-merge-status {
  margin: 5px 0 12px;
  min-height: 21px;
  padding: 0 8px;
  color: #fff8d8;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px #061729;
}

/* Last report is a pale hint, not actual input or a pre-saved value. */
#report-form .previous-report-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 11px;
  border: 1px dashed #d2dce5;
  border-radius: 9px;
  background: #f9fbfd;
  color: #75899a;
  font-size: 12px;
  line-height: 1.65;
}
#report-form .previous-value-hint {
  display: block;
  margin-top: 5px;
  color: #a2adba;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  direction: auto;
  unicode-bidi: plaintext;
}
#report-form input::placeholder { color: #aeb9c6 !important; opacity: .85; font-weight: 400; }

/* Secure in-page PDF preview. The original download remains available. */
.archive-pdf-viewer {
  position: fixed;
  z-index: 85;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #1d3449;
}
.archive-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px clamp(10px, 2vw, 25px);
  color: #fff;
  background: #092a46;
}
.archive-pdf-toolbar > div { display: flex; gap: 9px; flex-wrap: wrap; }
.archive-pdf-toolbar b { font-size: 16px; }
.archive-pdf-toolbar button { min-height: 39px; }
#archive-pdf-frame { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: white; }

@media (max-width: 650px) {
  #results-panel .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #results-panel .result-metric { padding: 10px 7px; }
  #results-panel .result-metric strong { font-size: clamp(15px, 4.5vw, 22px); }
  #page-archive .archive-bulk-panel { padding: 12px; }
  #page-archive .shift-folder-card .folder { min-height: 75px; }
  .archive-merge-all-button { font-size: 14px; min-height: 58px; }
  .archive-pdf-toolbar b { font-size: 13px; }
}
@media print {
  #app-view #results-panel,
  .archive-pdf-viewer { display: none !important; }
}
