/* ============================================================
   App-rendering vocabulary (shared: front page + audience pages)
   Extracted from front-page.css 2026-07-12 (kills the
   page-supervisors -> front-page.css coupling, HANDOFF note).

   Chrome + primitives traced from VERIFIED references:
   - APP-UI-REFERENCE.md + .review-shots/app-reference/*.png
   - .review-shots/app-reference-rbt/*.png (RBT module, 2026-07-12)
   - abaft-app app/views/layouts/app.php + public/assets/css/app.css
   ============================================================ */

/* ---- hs scale + text primitives ---- */
.hs7 { font-size: 7.5px; line-height: 1.35; }
.hs8 { font-size: 8px; line-height: 1.35; }
.hs9 { font-size: 9px; line-height: 1.35; }
.hs10 { font-size: 10px; line-height: 1.4; }
.hs11 { font-size: 11px; line-height: 1.4; }
.hs14 { font-size: 14.5px; line-height: 1.3; }
.hs16 { font-size: 17px; line-height: 1.25; }
.hs-eyebrow { font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- phone hardware ---- */
.hs-sbtn { position: absolute; width: 4px; border-radius: 4px; background: #0d0d12; }
.hs-sbtn-l1 { left: -4px; top: 110px; height: 34px; }
.hs-sbtn-l2 { left: -4px; top: 156px; height: 58px; }
.hs-sbtn-r { right: -4px; top: 140px; height: 72px; }

/* ---- mobile app chrome (topbar) ---- */
.hs-logo { width: 26px; height: 26px; }
.hs-ic { width: 15px; height: 15px; }
.hs-ic-s { width: 12px; height: 12px; flex-shrink: 0; }
.hs-chip-avatar {
  width: 24px; height: 24px; border-radius: 8px; background: #7c3aed; color: #fff;
  font-size: 9px; font-weight: 800; display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.hs-topbar { padding: 10px 16px; }
.hs-tb-btn { width: 26px; height: 26px; border: 1px solid #ececf2; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #6b7280; }
.hs-tb-div { width: 1px; height: 16px; background: #e5e7eb; }
.hs-crumb { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: #4b2ba0; color: #fff; padding: 8px 12px; }
.hs-crumb-back { display: block; width: 100%; text-align: center; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px; padding: 5px; font-weight: 600; }

/* ---- mobile app body + cards ---- */
.hs-body { padding: 12px; display: flex; flex-direction: column; gap: 9px; background: #fcfcfe; }
.hs-body-auto { height: auto; min-height: 0; }
.hs-card { border: 1px solid #eeecf4; border-radius: 12px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.hs-card-tight { gap: 0; padding: 4px 10px; }
.hs-card-progress { background: #f6f4ff; border-color: #e7e2fb; }
.hs-card-alert { border-left: 3px solid #f59e0b; }
.hs-bar { height: 6px; background: #e7e2fb; border-radius: 999px; margin: 6px 0 4px; overflow: hidden; }
.hs-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7c3aed, #9d82e0); }
.hs-crow { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 7px 0; border-top: 1px solid #f3f2f8; }
.hs-crow:first-child, .hs-card-tight .hs-crow:first-child { border-top: 0; }
.hs-crow-s { padding: 5px 0; gap: 4px; }
.hs-met { font-size: 8px; font-weight: 800; color: #047857; background: #d1fae5; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.hs-met-warn { color: #b45309; background: #fef3c7; }
.hs-btn-primary { background: #7c3aed; color: #fff; border-radius: 9px; padding: 6px 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; transition: transform 140ms ease, filter 140ms ease; }
.hs-btn-primary.is-pressed { transform: scale(0.94); filter: brightness(0.9); }
.hs-btn-ghost { border: 1px solid #e5e7eb; color: #374151; border-radius: 9px; padding: 6px 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hs-hidden { display: none; }
.hs-newchip { background: #ede9fe; color: #6d28d9; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.hs-flag { background: #ede9fe; color: #6d28d9; font-weight: 800; border-radius: 5px; padding: 1px 5px; }
.hs-x { color: #9ca3af; font-size: 14px; font-weight: 700; line-height: 1; }
.hs-ampm { background: #f3f4f6; color: #6b7280; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.hs-drop { color: #9ca3af; font-size: 8px; }

/* ---- form-row / interactive primitives (demo + scenes) ---- */
.hs-frow { border: 1px solid #eeecf4; border-radius: 10px; padding: 7px 9px; background: #fff; display: flex; flex-direction: column; opacity: 0.35; transition: opacity 250ms ease, border-color 250ms ease; }
.hs-frow.is-focus { opacity: 1; border-color: #c4b5fd; box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.35); }
.hs-frow.is-done { opacity: 1; }
.hs-field { font-weight: 700; color: #111827; min-height: 14px; }
.hs-field.is-typing::after { content: "|"; color: #7c3aed; animation: hs-caret 0.7s steps(1) infinite; }
@keyframes hs-caret { 50% { opacity: 0; } }
.hs-alot { background: #f8f7fc; border: 1px solid #eeecf4; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; opacity: 0.35; transition: opacity 250ms ease; }
.hs-alot.is-focus, .hs-alot.is-done { opacity: 1; }
.hs-alot-box { background: #fff; border-radius: 9px; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.hs-alot-ind { border-left: 3px solid #7c3aed; }
.hs-alot-sup { border-left: 3px solid #10b981; }
.hs-hmv { display: inline-flex; align-items: baseline; gap: 2px; }
.hs-hmv b { font-size: 10px; font-weight: 800; color: #d1d5db; background: #fafafa; border: 1px solid #f0f0f3; border-radius: 5px; padding: 1px 5px; min-width: 16px; text-align: center; transition: color 250ms ease; }
.hs-hmv i { font-size: 7px; color: #c4c4cf; font-style: normal; }
.hs-hmv.is-on b { color: #111827; }
.hs-rem { color: #9ca3af; transition: color 250ms ease; }
.hs-rem.is-on { color: #059669; }
.hs-tog { border: 1px solid #e5e7eb; border-radius: 9px; padding: 6px 4px; text-align: center; color: #6b7280; font-weight: 600; transition: all 250ms ease; }
.hs-tog.is-sel { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; font-weight: 700; }

/* ---- document / report / signature primitives ---- */
.hs-pdf { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 18px 40px rgba(10, 4, 34, 0.35); display: flex; flex-direction: column; gap: 4px; }
.hs-pdf-real { padding: 0; overflow: hidden; gap: 0; }
.hs-pdf-real > * { margin: 0 10px; }
.hs-pdf-real > .hs-rephead { margin: 0; }
.hs-rephead { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: linear-gradient(100deg, #2d1b69 0%, #5b21b6 100%); }
.hs-rephead > div { display: flex; flex-direction: column; gap: 1px; }
.hs-rephead .hs10 { line-height: 1.2; }
.hs-rephead .hs8 { line-height: 1.2; }
.hs-logo-s { width: 20px; height: 20px; }
.hs-repbanner { display: flex; align-items: center; gap: 5px; background: #ecfdf5; color: #047857; border-radius: 8px; padding: 6px 8px; margin-top: 8px !important; }
.hs-repstat { border: 1px solid #eeecf4; border-radius: 9px; padding: 6px 8px; display: flex; flex-direction: column; margin-top: 6px; }
.hs-repstat i { font-style: normal; font-weight: 600; }
.hs-stack { display: flex; height: 7px; border-radius: 999px; overflow: hidden; margin: 4px 10px !important; }
.hs-stack span { display: block; height: 100%; }
.hs-pdf-real > span:last-of-type { margin-bottom: 10px; padding-bottom: 0; }
.hs-confirm { align-items: center; padding: 16px 14px; gap: 5px; }
.hs-bigcheck { width: 34px; height: 34px; color: #10b981; }
.hs-checkrow { display: flex; align-items: center; gap: 6px; width: 100%; background: #f8f7fc; border: 1px solid #eeecf4; border-radius: 8px; padding: 6px 8px; }
.hs-checkbox { width: 13px; height: 13px; border-radius: 4px; background: #7c3aed; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hs-sigbox { border: 1px dashed #d8d2ea; border-radius: 10px; padding: 6px 9px 2px; background: #fff; }
.hs-sig { width: 100%; height: 34px; }
.hs-sig path { stroke-dasharray: 340; stroke-dashoffset: 340; }
.hs-sig path.is-drawn { transition: stroke-dashoffset 1300ms ease-in-out; stroke-dashoffset: 0; }
.hs-signedbar { display: flex; align-items: center; justify-content: center; gap: 6px; background: #d1fae5; color: #047857; border-radius: 10px; padding: 7px; opacity: 0; transform: translateY(6px); transition: opacity 300ms ease, transform 300ms ease; }
.hs-signedbar.is-on { opacity: 1; transform: translateY(0); }

/* ---- audience-page phone + browser frames ---- */
.hs-phone {
  width: 310px; max-width: 88vw; padding: 9px; border-radius: 2.8rem; background: #0d0d12;
  box-shadow: 0 12px 28px rgba(13, 5, 40, 0.22), inset 0 0 0 1.5px rgba(255, 255, 255, 0.07);
  position: relative; margin: 0 auto; text-align: left;
}
.hstage-phone-screen { border-radius: 2.4rem; overflow: hidden; position: relative; }
.hs-browser { border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px rgba(13, 5, 40, 0.18); border: 1px solid #e9e7f2; background: #fff; text-align: left; }
.hs-browser-bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; background: #f4f3f9; border-bottom: 1px solid #e9e7f2; }
.hs-browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: #ddd9ea; }
.hs-browser .hs-body { height: auto; min-height: 0; }
.sup-block { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) {
  .sup-block { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .sup-flip .sup-media { order: -1; }
}

/* ============================================================
   Canonical devices: exactly TWO frames, real proportions,
   same size site-wide. Phone 390:844; Desktop 16:10.
   ============================================================ */
:root { --dev-phone-w: 300px; --dev-desktop-w: 600px; }

.dev-phone {
  width: var(--dev-phone-w); max-width: 86vw; aspect-ratio: 390 / 844; padding: 9px;
  border-radius: 2.6rem; background: #0d0d12;
  box-shadow: 0 12px 28px rgba(13, 5, 40, 0.22), inset 0 0 0 1.5px rgba(255, 255, 255, 0.07);
  position: relative; margin: 0 auto; text-align: left; display: flex;
}
.dev-phone .dev-screen { flex: 1; border-radius: 2.1rem; overflow: hidden; background: #fcfcfe; display: flex; flex-direction: column; min-width: 0; }
.dev-phone .hs-body { height: auto; min-height: 0; flex: 1; overflow: hidden; }

.dev-desktop {
  width: var(--dev-desktop-w); max-width: 92vw; aspect-ratio: 16 / 10; border-radius: 14px;
  background: #0d0d12; padding: 6px;
  box-shadow: 0 12px 28px rgba(13, 5, 40, 0.22), inset 0 0 0 1.5px rgba(255, 255, 255, 0.07);
  position: relative; margin: 0 auto; text-align: left; display: flex; flex-direction: column;
}
.dev-desktop .dev-browser-bar { display: flex; align-items: center; gap: 5px; padding: 6px 10px; flex-shrink: 0; }
.dev-desktop .dev-browser-bar span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.dev-desktop .dev-browser-bar .dev-url {
  flex: 1; max-width: 220px; margin: 0 auto; height: 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.55); font-size: 8px;
  display: flex; align-items: center; justify-content: center;
}
.dev-desktop .dev-screen { flex: 1; border-radius: 9px; overflow: hidden; background: #fcfcfe; display: flex; min-height: 0; }
.dev-screen { position: relative; }

/* Desktop app chrome — traced from VERIFIED references (APP-UI-REFERENCE.md):
   real light theme = WHITE 250px sidebar (sectioned nav, pinned footer),
   white topbar w/ right user cluster, gray-50 content. Colors are the app's
   own tokens (abaft-app app.css :root). Scaled ~0.37 to the 600px frame with
   fonts floored for legibility (subtractive densify liberty). */
.dev-sidebar { width: 122px; flex-shrink: 0; background: #fff; border-right: 1px solid #f0f0f6; display: flex; flex-direction: column; }
.dev-side-logo { height: 26px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 9px; border-bottom: 1px solid #f0f0f6; }
.dev-side-logo img { width: 13px; height: 13px; }
.dev-side-wordmark { font-size: 9px; font-weight: 800; color: #220066; letter-spacing: -0.01em; }
.dev-side-wordmark i { font-style: italic; color: #9d82e0; }
.dev-nav { flex: 1; padding: 5px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; min-height: 0; }
.dev-nav-label { font-size: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6a6a85; padding: 4px 6px 2px; }
.dev-nav-item { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 5px; color: #5e5e78; font-size: 8px; font-weight: 500; white-space: nowrap; }
.dev-ic { width: 9px; height: 9px; flex-shrink: 0; }
.dev-nav-item.is-active { background: #f7f4fd; color: #5b34b5; }
.dev-side-foot { border-top: 1px solid #f0f0f6; padding: 4px 5px; display: flex; flex-direction: column; gap: 1px; }
.dev-main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.dev-topbar { height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 9px; background: #fff; border-bottom: 1px solid #f0f0f6; }
.dev-tb-avatar { width: 14px; height: 14px; border-radius: 4px; background: #7c5ccf; color: #fff; font-size: 6.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dev-tb-name { font-size: 7.5px; font-weight: 600; color: #1a1a2e; }
/* topbar user cluster w/ pathway line (real pattern: name over 0.65rem pathway,
   traced from rbt--dashboard captures: "RBT · Ongoing Supervision") */
.dev-tb-user { display: flex; flex-direction: column; line-height: 1.15; }
.dev-tb-user .dev-tb-name { line-height: 1.15; }
.dev-tb-pathway { font-size: 5.5px; color: #6a6a85; }
/* workspace switch pill (dual-context users; traced from app.css
   .workspace-switch: 999px pill, active = solid accent #5B34B5 + white) */
.dev-ws { display: inline-flex; border: 1px solid #e2e2ec; border-radius: 999px; overflow: hidden; background: #f8f8fb; margin-right: 2px; }
.dev-ws span { font-size: 6px; font-weight: 600; padding: 2.5px 6px; color: #5e5e78; line-height: 1.4; }
.dev-ws span.is-active { background: #5b34b5; color: #fff; }
.dev-tb-logout { color: #6a6a85; display: flex; align-items: center; justify-content: center; margin-left: 2px; width: 14px; height: 14px; border: 1px solid #e2e2ec; border-radius: 4px; }
.dev-tb-logout .dev-ic { width: 8px; height: 8px; }
.dev-body { flex: 1; overflow: hidden; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; background: #f8f8fb; }
.dev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }

/* In-content page header (real pattern: title in content, not topbar) */
.dev-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.dev-ph-title { display: block; font-size: 11px; font-weight: 800; color: #1a1a2e; line-height: 1.2; }
.dev-ph-sub { display: block; font-size: 7px; color: #5e5e78; margin-top: 1px; }

/* Traced primitives: cards, buttons, segmented filter, badges, data table */
.dev-card { background: #fff; border: 1px solid #f0f0f6; border-radius: 7px; }
.dev-card-alert { border-left: 2px solid #f59e0b; }
.dev-btn { display: inline-flex; align-items: center; justify-content: center; font-size: 6.5px; font-weight: 600; padding: 3px 6px; border-radius: 4px; white-space: nowrap; line-height: 1; }
.dev-btn-solid { background: #5b34b5; color: #fff; }
.dev-btn-outline { background: #fff; border: 1px solid #e2e2ec; color: #464660; }
.dev-input { flex: 1; background: #fff; border: 1px solid #e2e2ec; border-radius: 5px; padding: 3px 6px; font-size: 7px; color: #9e9eb4; }
.dev-seg { display: flex; }
.dev-seg span { font-size: 6.5px; font-weight: 600; padding: 3px 7px; border: 1px solid #e2e2ec; border-left-width: 0; color: #464660; background: #fff; line-height: 1; }
.dev-seg span:first-child { border-left-width: 1px; border-radius: 4px 0 0 4px; }
.dev-seg span:last-child { border-radius: 0 4px 4px 0; }
.dev-seg span.is-active { background: #5b34b5; border-color: #5b34b5; color: #fff; }
.dev-pills { display: flex; gap: 3px; }
.dev-pills span { font-size: 6.5px; font-weight: 600; padding: 2px 6px; border-radius: 999px; border: 1px solid #e2e2ec; background: #fff; color: #464660; line-height: 1.4; }
.dev-pills span.is-active { background: #eee8fb; border-color: #ddd0f7; color: #5b34b5; }
.dev-badge { font-size: 5.5px; font-weight: 700; padding: 1px 3.5px; border-radius: 3px; vertical-align: 1px; white-space: nowrap; }
.dev-badge-green { background: #d1fae5; color: #047857; }
.dev-badge-amber { background: #fef3c7; color: #92400e; }
.dev-badge-purple { background: #eee8fb; color: #5b34b5; }
.dev-table { width: 100%; border-collapse: collapse; }
.dev-table th { font-size: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6a6a85; text-align: left; padding: 4px 6px; border-bottom: 1px solid #f0f0f6; }
.dev-table td { padding: 4px 6px; border-top: 1px solid #f6f6fa; font-size: 7.5px; color: #464660; vertical-align: middle; }
.dev-table tr:first-child td { border-top: 0; }
.dev-avatar-sm { width: 13px; height: 13px; border-radius: 4px; background: #7c5ccf; color: #fff; font-size: 5.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dev-cell-name { font-size: 7.5px; font-weight: 600; color: #1a1a2e; line-height: 1.25; }
.dev-cell-email { font-size: 6px; color: #6a6a85; line-height: 1.25; }
.dev-actions { display: flex; gap: 2.5px; flex-wrap: wrap; }

/* ---- dashboard-content primitives (traced 2026-07-12 from
   rbt--dashboard-june + trainee--dashboard captures) ---- */
/* slim full-width banner card (Overall Progress / All Service Hours) */
.dev-slim { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; }
.dev-slim-label { font-size: 7.5px; font-weight: 700; color: #1a1a2e; display: block; }
.dev-slim-sub { font-size: 6px; color: #6a6a85; display: block; margin-top: 1px; }
.dev-slim-val { font-size: 10px; font-weight: 800; color: #5b34b5; white-space: nowrap; }
/* stat cards row: colored icon square + big value + uppercase label + sub */
.dev-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dev-stat { padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; }
.dev-stat-ic { width: 14px; height: 14px; border-radius: 4px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.dev-stat-ic .dev-ic { width: 8px; height: 8px; color: #fff; }
.dev-stat-ic.is-purple { background: #7c5ccf; }
.dev-stat-ic.is-green { background: #10b981; }
.dev-stat-ic.is-blue { background: #3b82f6; }
.dev-stat-ic.is-amber { background: #f59e0b; }
.dev-stat-val { font-size: 11px; font-weight: 800; color: #1a1a2e; line-height: 1.1; }
.dev-stat-label { font-size: 5.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6a6a85; }
.dev-stat-sub { font-size: 5.5px; color: #9e9eb4; }
/* compliance/check rows: icon + name/desc + value + chip + mini bar */
.dev-check { padding: 5px 0; border-top: 1px solid #f6f6fa; }
.dev-check:first-of-type { border-top: 0; }
.dev-check-top { display: flex; align-items: center; gap: 5px; }
.dev-check-ic { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.dev-check-ic svg { width: 6px; height: 6px; }
.dev-check-ic.is-pass { background: #d1fae5; color: #047857; }
.dev-check-ic.is-warn { background: #fef3c7; color: #b45309; }
.dev-check-name { font-size: 7px; font-weight: 600; color: #1a1a2e; flex: 1; }
.dev-check-val { font-size: 7.5px; font-weight: 800; color: #1a1a2e; }
.dev-check-desc { font-size: 5.5px; color: #9e9eb4; margin-left: 15px; display: block; }
.dev-check-bar { height: 3px; border-radius: 999px; background: #eef2f0; margin: 3px 0 0 15px; overflow: hidden; }
.dev-check-bar span { display: block; height: 100%; border-radius: 999px; background: #10b981; }
.dev-check-bar.is-purple span { background: linear-gradient(90deg, #7c5ccf, #9d82e0); }
