/* مرصد الحكومة — surface styles. Values measured from the individuals-portal Figma file
   (temp page 25705:99273): page #f9fafb · panel white r8 p20 · group container r16 border #e5e7eb,
   68px header (40px tile r4 #f3f4f6, 16/24 name, 12/18 count line) · table head 48px #f3f4f6 12/18 ·
   rows 68px p8/16 · selects 34px border #e5e7eb r4 · tabs/tags from the library. */

::selection { background: var(--tag-border-success-light); color: #0d121c; }
:focus-visible { outline: 2px solid var(--border-primary); outline-offset: 2px; border-radius: 4px; }
html { scrollbar-color: #d2d6db transparent; }
.spring { flex: 1; }
.muted { color: var(--text-secondary); }
.mono { font: 400 14px/20px var(--font-family-text); color: var(--text-primary-paragraph); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ic { flex: none; }
.label { font: 500 12px/18px var(--font-family-text); color: var(--text-secondary); }

/* menu additions */
a.m-item { text-decoration: none; }
.m-item .m-label { white-space: normal; line-height: 20px; }
.m-item { height: auto; min-height: 36px; }
.m-item.is-active .m-icon { filter: none; }
.m-body { display: flex; flex-direction: column; }
.m-brand-title { white-space: nowrap; }
.m-note { padding: 0 12px; font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }

/* النطاق الإداري */
.scope { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 24px; background: var(--background-white); border-bottom: 1px solid var(--border-neutral-tertiary); flex-wrap: wrap; }
.scope-title { font: 500 12px/18px var(--font-family-text); color: var(--text-secondary); margin-inline-end: 4px; }
.scope-fixed { font: 600 14px/20px var(--font-family-text); color: var(--text-display); }
.scope-sep { color: var(--text-default-disabled); }
.sel { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 6px 12px; background: var(--background-white); border: 1px solid var(--border-neutral-secondary); border-radius: 4px; font: 500 14px/20px var(--font-family-text); color: var(--text-default); }
.sel:hover { border-color: var(--border-neutral-primary); }
.sel:focus-within { border-color: var(--border-primary); }
.sel-label { font-weight: 400; color: var(--text-secondary); white-space: nowrap; }
.sel-native { field-sizing: content; appearance: none; border: 0; background: transparent; font: inherit; color: inherit; padding: 0; padding-inline-end: 2px; cursor: pointer; max-width: 220px; }
.sel-native:focus-visible { outline: none; }
.sel .ic { color: var(--text-secondary); pointer-events: none; }
.sel--static { border-color: transparent; background: var(--background-neutral-50); }

/* page header */
.ph { border-bottom: 0; align-items: flex-end; }
.ph-stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-sub { font: 400 14px/20px var(--font-family-text); color: var(--text-secondary); }
.crumb { display: flex; align-items: center; gap: 6px; font: 400 14px/20px var(--font-family-text); color: var(--text-secondary); }
.crumb a { color: var(--text-primary); }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lib-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: background-color .16s cubic-bezier(.2,.8,.2,1), border-color .16s cubic-bezier(.2,.8,.2,1); }
.lib-btn:hover { filter: none; }
.lib-btn--primary:hover { background: var(--background-neutral-800); border-color: var(--button-bg-black-hovered); }
.lib-btn--secondary:hover { background: var(--background-neutral-50); }
.lib-btn:active { transform: translateY(1px); }

.body { flex: 1; padding: 20px; }
.panel { background: var(--background-white); border-radius: 8px; padding: 20px; }
.panel-title { font: 700 20px/30px var(--font-family-text); color: var(--text-display); margin-bottom: 16px; }

/* ===== split view ===== */
.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.list-pane { display: flex; flex-direction: column; gap: 20px; }
.sum-pane { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; padding: 24px; }

/* signature */
.sig { display: flex; gap: 24px; align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid var(--border-neutral-tertiary); }
.sig-main { flex: 1; min-width: 0; }
.sig-title { font: 600 16px/24px var(--font-family-text); color: var(--text-display); }
.sig-bar { display: flex; gap: 2px; height: 10px; margin: 12px 0 10px; }
.sig-bar i { display: block; min-width: 3px; border-radius: 4px; }
.sig-bar .bad, .sig-dot.bad { background: var(--icon-error); }
.sig-bar .unver, .sig-dot.unver { background: var(--background-neutral-400); }
.sig-bar .ok, .sig-dot.ok { background: var(--background-primary); }
.sig-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sig-key { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); }
.sig-key b { font: 600 14px/20px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; }
.sig-dot { width: 8px; height: 8px; border-radius: 4px; }
.sig-side { display: flex; gap: 20px; }
.sig-side dt { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.sig-side dd { font: 600 16px/24px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; }
.sig-side small { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }

/* toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--border-neutral-secondary); border-radius: 4px; color: var(--text-secondary); background: var(--background-white); }
.search:focus-within { border-color: var(--border-primary); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 14px/20px var(--font-family-text); color: var(--text-default); }
.search input::placeholder { color: var(--text-secondary); }
.search input { text-overflow: ellipsis; }
.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-neutral-primary); border-radius: 4px; color: var(--text-primary-paragraph); background: var(--background-white); }
.icon-btn:hover { background: var(--background-neutral-50); }

/* group container (entity-table pattern) */
.grp-stack { display: flex; flex-direction: column; gap: 12px; }
.grp { background: var(--background-white); border: 1px solid var(--border-neutral-secondary); border-radius: 16px; overflow: hidden; }
.grp-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px 16px; text-align: start; cursor: pointer; list-style: none; }
.grp-head::-webkit-details-marker { display: none; }
.grp-head:hover { background: var(--background-neutral-50); }
.grp-head:focus-visible { outline-offset: -2px; border-radius: 16px; }
.grp-tile { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--background-neutral-100); border-radius: 4px; color: var(--text-primary-paragraph); }
.grp-tile b { font: 600 16px/24px var(--font-family-text); font-variant-numeric: tabular-nums; }
.grp-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grp-title { margin: 0; font: 600 16px/24px var(--font-family-text); color: var(--text-display); }
.grp-sub { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.grp-chev { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--text-primary-paragraph); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
details[open] > .grp-head .grp-chev { transform: rotate(180deg); }

.vt-head, .vt-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 76px; }
.vt-head { min-height: 48px; background: var(--background-neutral-100); align-items: center; }
.vt-head span { padding: 8px 16px; font: 500 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); }
.vt-head span:last-child, .vt-score { text-align: end; justify-content: flex-end; }
.vt-row { min-height: 68px; align-items: center; border-top: 1px solid var(--border-neutral-secondary); color: inherit; transition: background-color .16s cubic-bezier(.2,.8,.2,1); }
.vt-row:first-of-type { border-top: 0; }
.vt-row:hover { background: var(--background-neutral-50); }
.vt-row.is-on { background: #f3fcf6; }
.vt-row.is-on .vt-main { color: #14573a; }
.vt-row:focus-visible { outline-offset: -2px; }
.vt-cell { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; min-width: 0; }
.vt-score { flex-direction: row; align-items: center; }
.vt-main { font: 500 14px/20px var(--font-family-text); color: var(--text-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-meta { display: flex; align-items: center; gap: 4px; font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.vt-mark { display: inline-flex; color: var(--text-primary-paragraph); margin-inline-start: 4px; }
.vt-reason { font: 400 14px/20px var(--font-family-text); color: var(--text-primary-paragraph); }
.vt-reason-m { display: none; font: 400 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); }
.vt-foot, .vt-none { padding: 12px 16px; border-top: 1px solid var(--border-neutral-secondary); font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.vt-none { border-top: 1px solid var(--border-neutral-secondary); }

/* summary */
.sum-head { display: flex; align-items: center; gap: 16px; }
.score { display: flex; align-items: baseline; gap: 6px; flex: none; }
.score-num { font: 700 36px/44px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.score-of, .score-none { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.score-none { font-weight: 600; font-size: 16px; line-height: 44px; color: var(--text-primary-paragraph); }
.score--lg .score-num { font-size: 48px; line-height: 56px; }
.sum-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-inline-start: 16px; border-inline-start: 1px solid var(--border-neutral-secondary); }
.sum-title { font: 600 18px/28px var(--font-family-text); color: var(--text-display); }
.reason p, .verdict-reason { font: 400 16px/26px var(--font-family-text); color: var(--text-display); max-width: 62ch; text-wrap: pretty; }
.reason { display: flex; flex-direction: column; gap: 4px; }

.pstrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-block: 1px solid var(--border-neutral-tertiary); }
.pstrip-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pstrip-name { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); min-height: 36px; }
.pstrip-val { font: 600 14px/20px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; }
.pstrip-track { height: 4px; border-radius: 4px; background: var(--background-neutral-100); margin-top: 4px; overflow: hidden; }
.pstrip-track i { display: block; height: 100%; border-radius: 4px; background: var(--background-primary); }
.is-bad .pstrip-track i { background: var(--icon-error); }
.is-bad .pstrip-val { color: var(--text-error); }
.is-na .pstrip-val { color: var(--text-secondary); font-weight: 500; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.facts--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--border-neutral-tertiary); }
.fact dt { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.fact dd { font: 500 14px/20px var(--font-family-text); color: var(--text-display); }
.block { display: flex; flex-direction: column; gap: 8px; }
.block--row { flex-direction: row; align-items: center; gap: 12px; }
.rests { display: flex; flex-direction: column; }
.rests li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--border-neutral-tertiary); flex-wrap: wrap; }
.rests li:first-child { border-top: 0; }
.rests-main { display: inline-flex; align-items: baseline; gap: 8px; font: 400 14px/20px var(--font-family-text); color: var(--text-primary-paragraph); }
.rests-main b { font-weight: 600; color: var(--text-display); }
.deadline { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); white-space: nowrap; }
.deadline.is-warm { color: var(--tag-text-warning); }
.deadline.is-hot { color: var(--text-error); }
.sum-foot { display: flex; padding-top: 4px; }
.sum-foot .lib-btn { flex: 1; }
.sum-empty { min-height: 320px; justify-content: center; align-items: flex-start; }

/* ===== visit page ===== */
.vp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.vp-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.vp-side { position: sticky; top: 20px; display: flex; flex-direction: column; background: var(--background-white); border-radius: 8px; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 24px; align-items: center; padding: 24px; }
.verdict-body { display: flex; flex-direction: column; gap: 6px; padding-inline-start: 24px; border-inline-start: 1px solid var(--border-neutral-secondary); }
.verdict-top { display: flex; align-items: center; gap: 12px; }

.pillar > .grp-head { cursor: pointer; }
.checks { border-top: 1px solid var(--border-neutral-secondary); }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border-neutral-tertiary); }
.check:first-child { border-top: 0; }
.check-ic { display: inline-flex; margin-top: 1px; }
.check-ic.ok { color: var(--text-primary); } .check-ic.fail { color: var(--text-error); } .check-ic.na { color: var(--text-default-disabled); }
.check-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check-name { font: 500 14px/20px var(--font-family-text); color: var(--text-display); }
.check-res { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.check.is-fail .check-res { color: var(--text-error); font-size: 14px; line-height: 20px; }

.sev-m { display: none; margin-top: 6px; }
.ev { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border-neutral-tertiary); }
.ev .facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ev-row { display: flex; align-items: center; gap: 12px; }
.ev-note { font: 400 14px/22px var(--font-family-text); color: var(--text-primary-paragraph); }
.ev-map { position: relative; height: 168px; border-radius: 8px; background: var(--background-neutral-50); overflow: hidden;
  background-image: linear-gradient(#eef0f2 1px, transparent 1px), linear-gradient(90deg, #eef0f2 1px, transparent 1px); background-size: 28px 28px; }
.map-range { position: absolute; inset-inline-end: 9%; top: 50%; width: 112px; height: 112px; transform: translateY(-50%); border-radius: 50%; border: 1px dashed var(--border-primary); background: rgba(27,131,84,.06); }
.map-pt { position: absolute; display: inline-flex; align-items: center; gap: 6px; font: 500 12px/18px var(--font-family-text); color: var(--text-display); white-space: nowrap; }
.map-pt::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--background-primary); box-shadow: 0 0 0 3px #f9fafb; }
.map-lic { inset-inline-end: calc(9% + 51px); top: calc(50% - 9px); }
.map-start { inset-inline-start: 14%; top: 34%; } .map-end { inset-inline-start: 17%; top: 58%; }
.map-start::before, .map-end::before { background: var(--icon-error); }
.map-line { position: absolute; inset-inline: 22% calc(9% + 60px); top: 50%; border-top: 1px dashed var(--icon-default-400); }
.moment { display: flex; gap: 12px; align-items: stretch; margin: 0; }
.moment-frame { width: 128px; flex: none; aspect-ratio: 16/10; border-radius: 8px; background: var(--background-neutral-800); color: var(--text-oncolor-primary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 500 12px/18px var(--font-family-text); }
.moment-frame .mono { color: var(--text-oncolor-primary); }
.moment figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.moment-src { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/18px var(--font-family-text); color: var(--text-secondary); }
.moment blockquote { font: 400 14px/22px var(--font-family-text); color: var(--text-display); }

.how { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.how th, .how td { padding: 12px 16px; text-align: start; font: 400 14px/20px var(--font-family-text); color: var(--text-display); border-top: 1px solid var(--border-neutral-secondary); }
.how thead th { background: var(--background-neutral-100); font: 500 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); border-top: 0; }
.how thead th:first-child { border-start-start-radius: 8px; } .how thead th:last-child { border-start-end-radius: 8px; }
.how tbody th { font-weight: 500; }
.how-total th, .how-total td { font-weight: 700; }

.side-block { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-top: 1px solid var(--border-neutral-tertiary); }
.side-block:first-child { border-top: 0; }
.side-title { font: 600 16px/24px var(--font-family-text); color: var(--text-display); }
.baseer-lines { display: flex; flex-direction: column; gap: 10px; }
.baseer-lines li { font: 400 14px/22px var(--font-family-text); color: var(--text-display); text-wrap: pretty; }
.basis { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.dims li { display: flex; align-items: center; justify-content: space-between; min-height: 40px; border-top: 1px solid var(--border-neutral-tertiary); font: 400 14px/20px var(--font-family-text); color: var(--text-display); }
.dims li:first-child { border-top: 0; }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 40px 24px; max-width: 560px; }
.empty .lib-btn { margin-top: 12px; }
.empty-mark { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: var(--background-neutral-100); border-radius: 4px; color: var(--text-primary-paragraph); margin-bottom: 8px; }
.empty-mark .m-icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* structural collapse */
@media (max-width: 1099px) {
  .split, .vp { grid-template-columns: minmax(0, 1fr); }
  .sum-pane { display: none; }
  .vp-side { position: static; }
  .facts--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .menu { order: 0; width: 100%; min-height: 0; max-height: none; position: static; padding: 12px 16px; border-inline-start: 0; border-bottom: 1px solid var(--border-neutral-tertiary); }
  .menu .m-rule, .menu .m-userchip, .menu .spring { display: none; }
  .menu .m-note { padding: 0; }
  .m-items { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); padding-inline-end: 32px; }
  .m-items { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .m-item { width: auto; flex: none; }
  .m-item .m-label { white-space: nowrap; }
  .scope, .ph { padding-inline: 16px; }
  .body { padding: 12px; }
  .panel { padding: 16px; }
  .sig { flex-direction: column; align-items: stretch; gap: 16px; }
  .vt-head, .vt-row { grid-template-columns: minmax(0, 1fr) 68px; }
  .vt-head span:nth-child(2), .vt-row .vt-cell:nth-child(2) { display: none; }
  .vt-reason-m { display: block; }
  .vt-row { min-height: 84px; }
  .ev-map { height: 190px; }
  .map-range { width: 76px; height: 76px; inset-inline-end: 6%; top: 30%; }
  .map-lic { inset-inline-end: calc(6% + 33px); top: calc(30% - 9px); }
  .map-start { inset-inline-start: 6%; top: 62%; } .map-end { inset-inline-start: 6%; top: 80%; }
  .map-line { display: none; }
  .verdict { grid-template-columns: minmax(0, 1fr); }
  .verdict-body { padding-inline-start: 0; border-inline-start: 0; }
  .facts, .facts--6, .ev .facts--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph { flex-direction: column; align-items: stretch; }
  .how th, .how td { padding: 10px 8px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search { flex: 1 1 100%; }
  .moment { flex-direction: column; }
  .moment-frame { width: 100%; max-width: 220px; }
  .ev { margin-inline-start: -32px; }
  .sev-d { display: none; }
  .sev-m { display: block; }
  .check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px 12px; padding: 12px; }
  .grp-head { padding: 12px; }
}

/* ===== tabs with counts (Tab Items: gap 24, 14/20, count pill r999, active green underline) ===== */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border-neutral-tertiary); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 0 12px; font: 400 14px/20px var(--font-family-text); color: var(--text-primary-paragraph); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text-display); }
.tab.is-on { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--border-primary); }
.tab-count { padding: 2px 8px; border-radius: 9999px; background: var(--background-neutral-100); font: 600 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); font-variant-numeric: tabular-nums; }
.tab.is-on .tab-count { background: #f3fcf6; color: var(--text-primary); }

/* view toggle (76x40 #f3f4f6 r4, segments 32) */
.segs { display: inline-flex; gap: 4px; padding: 4px; background: var(--background-neutral-100); border-radius: 4px; }
.seg { width: 32px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--text-primary-paragraph); }
.seg.is-on { background: var(--background-white); color: var(--text-default); }

/* responsibles stack on the group header */
.avs { display: inline-flex; flex-direction: row-reverse; padding-inline-start: 8px; }
.av { width: 24px; height: 24px; margin-inline-start: -8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: var(--background-neutral-100); color: var(--text-primary-paragraph); box-shadow: 0 0 0 2px #ffffff; }
.vt-foot { display: flex; align-items: center; gap: 12px; }

/* board */
.split.is-board { grid-template-columns: minmax(0, 1fr); }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1240px) { .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); overflow-x: auto; padding-bottom: 8px; -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); padding-inline-end: 24px; } }
.bcol.is-on .bcol-head { background: #f3fcf6; border-radius: 4px; }
.bcol.is-on .grp-title { color: #14573a; }
.bcol-none { border-top: 0; padding: 8px 4px; }
.bcol-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0; font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.bcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bcol-head { display: flex; align-items: center; gap: 12px; }
.bcol-body { display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--background-neutral-100); border-radius: 16px; min-height: 120px; }
.vcard { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--background-white); border-radius: 16px; color: inherit; transition: border-color .16s cubic-bezier(.2,.8,.2,1); }
.vcard { border: 1px solid transparent; }
.vcard:hover { border-color: var(--border-neutral-primary); }
.vcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border-neutral-tertiary); }
.vcard-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vcard-title { font: 600 16px/24px var(--font-family-text); color: var(--text-display); }
.vcard-rows { display: flex; flex-direction: column; gap: 8px; }
.vcard-rows > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vcard-rows dt { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); }
.vcard-rows dd { font: 500 14px/20px var(--font-family-text); color: var(--text-display); }

/* evidence pieces */
.photos { display: flex; gap: 12px; flex-wrap: wrap; }
.photo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.photo-frame { width: 148px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--background-neutral-100); font: 500 12px/18px var(--font-family-text); color: var(--text-secondary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 2px 10px; border-radius: 9999px; background: var(--background-neutral-100); }
.baseer-line { font: 400 14px/22px var(--font-family-text); color: var(--text-primary-paragraph); max-width: 62ch; padding-top: 10px; border-top: 1px solid var(--border-neutral-tertiary); margin-top: 6px; }
.baseer-line b { font-weight: 600; color: var(--text-display); margin-inline-end: 4px; }

/* recording */
.rec { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.rec-screen { aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; background: var(--background-neutral-800); color: var(--text-oncolor-primary); }
.rec-screen .mono { color: var(--text-oncolor-primary); }
.rec-line { position: relative; height: 24px; margin-top: 12px; border-radius: 4px; background: var(--background-neutral-100); }
.rec-line i { position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 4px; background: var(--background-primary); }
.rec-line i.bad { background: var(--icon-error); }
.rec-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rec-side .label { margin-top: 8px; }
.rec-side .label:first-child { margin-top: 0; }
.finds li, .segs-t li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-neutral-tertiary); font: 400 14px/20px var(--font-family-text); color: var(--text-display); flex-wrap: wrap; }
.finds li:first-child, .segs-t li:first-child { border-top: 0; }
.find-t { flex: 1 1 180px; }
@media (max-width: 760px) {
  .tabs { gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .tab { white-space: nowrap; }
  .rec { grid-template-columns: minmax(0, 1fr); }
  .photo-frame { width: 120px; }
}

/* ===== الزيارات v2: overview band + one table (split view removed) ===== */
.stack { display: flex; flex-direction: column; gap: 20px; }
.ov { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; padding: 0; }
.ov > div { padding: 24px; min-width: 0; }
.ov-pillars { border-inline-start: 1px solid var(--border-neutral-tertiary); }
.ov-title { font: 600 16px/24px var(--font-family-text); color: var(--text-display); }
.ov .sig-bar { height: 12px; margin: 16px 0 12px; }
.ov .sig-side { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-neutral-tertiary); gap: 32px; }
.pbars { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.pbar { display: grid; grid-template-columns: 132px minmax(0, 1fr) 56px 56px; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 4px 8px; margin-inline: -8px; border-radius: 4px; text-align: start; transition: background-color .16s cubic-bezier(.2,.8,.2,1); }
.pbar:hover { background: var(--background-neutral-50); }
.pbar.is-on { background: #f3fcf6; }
.pbar-name { font: 500 14px/20px var(--font-family-text); color: var(--text-display); }
.pbar-track { display: flex; justify-content: flex-start; height: 8px; border-radius: 4px; background: var(--background-neutral-100); overflow: hidden; }
.pbar-track i { display: block; height: 100%; border-radius: 4px; background: var(--icon-error); }
.pbar-n { font: 600 14px/20px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; text-align: end; }
.pbar-pct { font: 400 12px/18px var(--font-family-text); color: var(--text-primary-paragraph); font-variant-numeric: tabular-nums; text-align: end; }

.list { display: flex; flex-direction: column; gap: 20px; }
.toolbar { flex-wrap: wrap; }
.toolbar .search { flex: 1 1 260px; }
.vt { border: 1px solid var(--border-neutral-secondary); border-radius: 16px; overflow: hidden; }
.vt-head, .vt-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.7fr) minmax(0, .95fr) minmax(0, .8fr) 72px; }
.vt-row:first-of-type { border-top: 1px solid var(--border-neutral-secondary); }
.vt-head + .vt-row { border-top: 0; }
.vt-text { font: 400 14px/20px var(--font-family-text); color: var(--text-primary-paragraph); }
.vt-text.mono { color: var(--text-primary-paragraph); }
.vt-ghead { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 16px; background: var(--background-neutral-50); border-top: 1px solid var(--border-neutral-secondary); text-align: start; }
.vt-ghead:hover { background: var(--background-neutral-100); }
.vt-ghead:focus-visible { outline-offset: -2px; }
.vt-gchev { display: inline-flex; color: var(--text-primary-paragraph); }
.vt-gname { font: 600 14px/20px var(--font-family-text); color: var(--text-display); }
.vt-ghead .tab-count { background: var(--background-white); }
.vt-group .vt-row { border-top: 1px solid var(--border-neutral-secondary); }
.vt-more { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border-neutral-secondary); font: 400 12px/18px var(--font-family-text); }
@media (max-width: 1240px) {
  .vt-head, .vt-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, .9fr) 72px; }
  .vt-head span:nth-child(2), .vt-row .vt-cell:nth-child(2), .vt-head span:nth-child(3), .vt-row .vt-cell:nth-child(3), .vt-head span:nth-child(7), .vt-row .vt-cell:nth-child(7) { display: none; }
}
@media (max-width: 1099px) { .ov { grid-template-columns: minmax(0, 1fr); } .ov-pillars { border-inline-start: 0; border-top: 1px solid var(--border-neutral-tertiary); } }
@media (max-width: 760px) {
  .ov > div { padding: 16px; }
  .vt-head, .vt-row { grid-template-columns: minmax(0, 1fr) 68px; }
  .vt-head span:not(:first-child):not(:last-child), .vt-row .vt-cell:not(:first-child):not(:last-child) { display: none; }
  .pbar { grid-template-columns: 104px minmax(0, 1fr) 44px; }
  .pbar-pct { display: none; }
  .toolbar .sel { flex: 1 1 calc(50% - 6px); }
}

/* review fixes: sortable heads, filter chip, neutral score pill, mobile controls */
.ov-hint { font: 400 12px/18px var(--font-family-text); color: var(--text-secondary); margin-top: 2px; }
.pbar { cursor: pointer; }
.pbar.is-on .pbar-name { color: #14573a; font-weight: 600; }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 24px; padding: 0 8px; border-radius: 9999px; background: var(--background-neutral-100); font: 600 14px/20px var(--font-family-text); color: var(--text-display); font-variant-numeric: tabular-nums; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
.th-sort .ic { color: var(--text-default-disabled); }
.th-sort.is-on { color: var(--text-display); font-weight: 600; }
.th-sort.is-on .ic { color: var(--text-primary); }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 4px; background: #f3fcf6; font: 500 14px/20px var(--font-family-text); color: #14573a; }
.fchip:hover { background: var(--tag-bg-success-light); }
.fchip-x { font-size: 18px; line-height: 1; }
.vt-dl-m { display: none; }
@media (max-width: 760px) {
  .tabs { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); padding-inline-end: 24px; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .toolbar .search { flex: 0 0 240px; }
  .toolbar .sel, .toolbar .fchip, .toolbar .segs { flex: none; }
  .toolbar .fchip, .toolbar .segs { order: -1; }
  .toolbar .search { flex: 0 0 200px; }
  .vt-dl-m { display: block; }
}

.vt-also { white-space: normal; overflow: visible; }
.th-sort { white-space: nowrap; }
.vt-head, .vt-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .95fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, .95fr) 112px 80px; }
.th-sort:not(.is-on) .ic { opacity: 0; }
.th-sort:hover .ic, .th-sort:focus-visible .ic { opacity: 1; }
@media (max-width: 1240px) { .vt-head, .vt-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, .9fr) 80px; } }
@media (max-width: 760px) {
  .vt-head, .vt-row { grid-template-columns: minmax(0, 1fr) 68px; }
  .toolbar { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); padding-inline-end: 40px; }
  .pbar { grid-template-columns: 104px minmax(0, 1fr) 44px 44px; }
  .pbar-pct { display: block; }
}

/* Page Header sits on the page ground, as in the portal file (no white band). */
.ph { background: transparent; padding-bottom: 4px; }
.scope { background: transparent; border-bottom: 0; padding-bottom: 0; }
.sel--static { background: var(--background-neutral-100); }
