/* Scoped report UI. Parent loads after style.css. */
.opening-reports { max-width: 1080px; margin: 0 auto; color: var(--ink, #212b29); }
.opening-reports .or-back { display: inline-block; margin-bottom: 16px; color: inherit; text-decoration: none; }
.opening-reports .or-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.opening-reports .or-head h1 { margin: 0; font-size: 24px; line-height: 1.4; }
.opening-reports .or-head p { margin: 8px 0 18px; color: var(--ink-2, #56635e); }
.opening-reports .or-state, .opening-reports .or-draft-label { background: #f1ede3; padding: 4px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.opening-reports .or-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0 20px; }
.opening-reports .or-count { display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; gap: 4px; padding: 16px 10px; background: var(--surface, #fff); border: 1px solid #dce3df; border-radius: 12px; text-align: center; }
.opening-reports .or-count strong { font-size: 27px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.opening-reports .or-count span { font-size: 14px; }
.opening-reports .or-accepted { color: #1d6345; }
.opening-reports .or-reject_fixable { color: #8b5418; }
.opening-reports .or-reject_unfixable { color: #9b2f2b; }
.opening-reports .or-pending { border: 1px solid #dfba66; border-radius: 10px; padding: 12px 16px; margin: 12px 0; background: #fff8e6; color: #77500f; }
.opening-reports .or-pending div { margin-top: 4px; }
/* A pending summary tile shares the notice color, but not its outer spacing. */
.opening-reports .or-count.or-pending { margin: 0; }
.opening-reports .or-identity { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: 12px; color: var(--ink-2, #56635e); margin: 12px 0; overflow-wrap: anywhere; }
.opening-reports .or-actions { margin: 20px 0; }
.opening-reports .or-actions .btn { min-height: 48px; min-width: 180px; justify-content: center; }
.opening-reports .or-actions .btn:disabled { opacity: .55; cursor: default; }
.opening-reports .or-fold { border-top: 1px solid var(--line, #dde2dd); padding: 12px 0; }
.opening-reports .or-fold > summary { cursor: pointer; font-size: 15px; padding: 8px 0; }
.opening-reports .or-fold > summary:focus-visible { outline: 2px solid #226546; outline-offset: 4px; }
.opening-reports .or-filter-row, .opening-reports .or-sent-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.opening-reports label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; min-width: 150px; }
.opening-reports .or-sent-form p { flex-basis: 100%; margin: 0; }
.opening-reports .or-doc-list { list-style: none; padding: 0; margin: 8px 0; }
.opening-reports .or-doc-list li { border-bottom: 1px solid #e5e9e5; }
.opening-reports .or-doc-list a { display: flex; flex-direction: column; padding: 14px 0; color: inherit; text-decoration: none; }
.opening-reports .or-doc-list span { font-size: 12px; color: #56635e; margin-top: 4px; }
.opening-reports .or-print-tools { margin: 12px 0; }
.opening-reports .or-paper { padding: 24px; background: #fff; border: 1px solid #dce3df; border-radius: 8px; color: #202b26; font-size: 13px; line-height: 1.65; }
.opening-reports .or-paper-head { border-bottom: 2px solid #273f32; padding-bottom: 12px; margin-bottom: 16px; }
.opening-reports .or-paper-brand { color: #56635e; letter-spacing: .05em; font-size: 11px; }
.opening-reports .or-paper h1 { font-size: 23px; margin: 4px 0; }
.opening-reports .or-paper h2 { font-size: 17px; margin: 8px 0; }
.opening-reports .or-paper h3 { font-size: 14px; margin: 6px 0; }
.opening-reports .or-paper p { margin: 5px 0 10px; }
.opening-reports .or-paper ul { padding-left: 20px; }
.opening-reports .or-paper a { color: #285c43; text-decoration: underline; overflow-wrap: anywhere; }
.opening-reports .or-section { margin-top: 24px; }
.opening-reports .or-paper table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 8px 0; font-size: 12px; }
.opening-reports .or-paper th, .opening-reports .or-paper td { min-width: 0; border: 1px solid #cbd3cd; padding: 7px; vertical-align: top; overflow-wrap: anywhere; word-break: normal; text-align: left; white-space: normal; }
.opening-reports .or-paper th { background: #eef3ef; font-weight: 600; }
.opening-reports .or-paper .or-set-list th:first-child { width: 62%; }
.opening-reports .or-small, .opening-reports .or-ref { font-size: 10px; }
.opening-reports .or-muted { color: #56635e; }
.opening-reports .or-missing { color: #9b2f2b; }
.opening-reports .or-result-text { display: block; }
.opening-reports .or-measure-grid { display: grid; grid-template-columns: 28px repeat(3, minmax(0, 1fr)); gap: 3px 4px; font-size: 10px; font-variant-numeric: tabular-nums; }
.opening-reports .or-measure-grid b { font-weight: 500; }
.opening-reports .or-mark { font-style: normal; font-weight: 700; }
.opening-reports .or-pending-item { border-bottom: 1px solid #dce3df; padding: 10px 0; }
.opening-reports .or-paper-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid #cbd3cd; font-size: 10px; color: #56635e; }
/* Phone sizing must not follow the browser viewport into the A4 layout. */
@media screen and (max-width: 640px) {
  .opening-reports .or-head h1 { font-size: 20px; }
  .opening-reports .or-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .opening-reports .or-count { padding: 12px 6px; }
  .opening-reports .or-count strong { font-size: 24px; }
  .opening-reports .or-count span { font-size: 12px; }
  .opening-reports .or-paper { padding: 12px 8px; }
  .opening-reports .or-results { font-size: 10px !important; }
  .opening-reports .or-paper th, .opening-reports .or-paper td { padding: 4px; }
  .opening-reports .or-measure-grid { grid-template-columns: 22px repeat(3, minmax(0, 1fr)); font-size: 9px; gap: 2px; }
  .opening-reports .or-actions .btn { width: 100%; }
}
@page { size: A4 portrait; margin: 12mm 10mm 14mm; }
@media print {
  body:has(.opening-reports) { background: #fff !important; color: #000; margin: 0 !important; padding: 0 !important; }
  body:has(.opening-reports) > :not(main):not(#app):not(:has(.opening-reports)) { display: none !important; }
  body:has(.opening-reports) .topbar, body:has(.opening-reports) .bottombar,
  body:has(.opening-reports) .ez-bar, body:has(.opening-reports) .ez-chat,
  body:has(.opening-reports) .fab, body:has(.opening-reports) #toast,
  .opening-reports .or-screen-only, .opening-reports summary { display: none !important; }
  body:has(.opening-reports) #app, .opening-reports { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .opening-reports .or-fold, .opening-reports .or-paper { display: block !important; border: 0; border-radius: 0; padding: 0; box-shadow: none; overflow: visible !important; }
  .opening-reports .or-details::details-content { display: block !important; content-visibility: visible !important; }
  .opening-reports .or-paper { font-family: "Thonburi", "Tahoma", "Noto Sans Thai", sans-serif; font-size: 9pt; line-height: 1.5; }
  .opening-reports .or-paper h1 { font-size: 18pt; }
  .opening-reports .or-paper h2 { font-size: 12pt; break-after: avoid; page-break-after: avoid; }
  .opening-reports .or-paper h3 { font-size: 10pt; break-after: avoid; page-break-after: avoid; }
  .opening-reports .or-paper .or-counts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 10px 0; }
  .opening-reports .or-paper .or-count { padding: 6px 4px; border-radius: 0; }
  .opening-reports .or-paper .or-count strong { font-size: 15pt; }
  .opening-reports .or-paper .or-count span { font-size: 8pt; }
  .opening-reports .or-paper .or-identity { font-size: 8pt; }
  .opening-reports .or-paper table { font-size: 8pt; overflow: visible !important; }
  .opening-reports .or-paper th, .opening-reports .or-paper td { padding: 4px 5px; overflow: visible !important; }
  .opening-reports .or-paper thead { display: table-header-group; }
  .opening-reports .or-paper tbody { break-inside: auto; page-break-inside: auto; }
  .opening-reports .or-paper tr { break-inside: avoid; page-break-inside: avoid; }
  .opening-reports .or-measure-grid { grid-template-columns: 22px repeat(3, minmax(0, 1fr)); gap: 2px; font-size: 7pt; }
  .opening-reports .or-small { font-size: 7pt; }
  .opening-reports .or-paper a { color: inherit; text-decoration: none; }
  .opening-reports .or-section { margin-top: 16px; }
  .opening-reports .or-pending-item, .opening-reports .or-paper-head, .opening-reports .or-paper-foot { break-inside: avoid; page-break-inside: avoid; }
  .opening-reports .or-pending { background: #fff; border-color: #8b6d2c; }
}
