/* أنماط أداة فحص الماسح.
   ملف مستقل لا مضمّن: CSP يمنع style-src 'unsafe-inline' — أي <style> أو
   سمة style في الترميز تُحجب صامتة. (الأنماط المضبوطة من JS غير معنيّة بذلك.) */

.lab-wrap { max-width: 780px; margin: 0 auto; padding: 16px 14px 40px }

h1 { font-size: 20px; margin: 0 0 4px }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--ink) }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.7 }
.ltr { direction: ltr; unicode-bidi: isolate; font-family: ui-monospace, Menlo, Consolas, monospace }

.card {
  background: #fff; border: 1px solid var(--line, #DBE1E7); border-radius: 14px;
  padding: 14px; margin-bottom: 14px;
}

.btn {
  font-family: inherit; font-size: 15.5px; font-weight: 700; padding: 13px 14px;
  border: none; border-radius: 12px; background: var(--brand, #0F6E6B); color: #fff;
  width: 100%; cursor: pointer;
}
.btn:active { filter: brightness(.92) }
.btn.grey { background: #E8ECF0; color: var(--ink, #17212B) }
.btn-row { display: flex; gap: 10px }
.hide { display: none }

.err { margin-top: 10px; padding: 10px; border-radius: 10px; background: #FDECEC; color: #A3282D; font-size: 13px }

.shot { display: block; width: 100%; height: auto; border-radius: 10px; background: #F2F5F7 }

.summary { font-size: 13px; line-height: 1.9; margin-bottom: 12px }
.summary b { font-weight: 700 }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700 }
.pill.yes { background: #DCF3EC; color: #0B6B4F }
.pill.no  { background: #FDECEC; color: #A3282D }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12.5px }
.legend span { display: flex; align-items: center; gap: 6px }
.legend i { width: 14px; height: 4px; border-radius: 2px; display: block }

.note { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 10px 0 0 }

.tbl-scroll { overflow-x: auto }
.tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap }
.tbl th, .tbl td { border: 1px solid var(--line, #DBE1E7); padding: 7px 9px; text-align: center }
.tbl th { background: #F2F5F7; font-weight: 700 }
.tbl td.num { direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace }
.tbl td.bad { background: #FDECEC; color: #A3282D; font-weight: 700 }
.tbl td.win { background: #DCF3EC; font-weight: 700 }

.masks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px }
.masks figure { margin: 0 }
.masks canvas { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line, #DBE1E7); image-rendering: pixelated }
.masks figcaption { font-size: 12px; text-align: center; margin-top: 5px; color: var(--muted) }

/* شاشة الكاميرا */
.cam-full { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column }
.cam-full[hidden] { display: none }
#lvVideo { flex: 1; width: 100%; min-height: 0; object-fit: contain; display: block }
.cam-bar { display: flex; gap: 10px; padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 16px); background: rgba(0,0,0,.6) }

.busy { position: fixed; inset: 0; z-index: 60; background: rgba(11,15,20,.55); display: grid; place-items: center }
.busy[hidden] { display: none }
.busy-box { background: #fff; padding: 16px 22px; border-radius: 12px; font-size: 14px; font-weight: 700 }
