/* The existing TPMS header and role colors come from the original stylesheets. */
#demo { margin:0; color:#273641; font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; background:#f5f7f9; }
#demo *, #demo *::before, #demo *::after { box-sizing:border-box; }
#demo [hidden] { display:none !important; }
#demo button,#demo input,#demo select { font:inherit; }
#demo button { cursor:pointer; }
#demo button:disabled { cursor:default; }
#demo button:focus-visible,#demo input:focus-visible,#demo select:focus-visible,#demo a:focus-visible { outline:3px solid #68a9cc; outline-offset:3px; }
#demo .header { position:sticky; top:0; z-index:20; }
#demo .m_mainToolBarTable { width:100%; border-collapse:collapse; }
#demo .shell-button { border:0; background:transparent; color:white; padding:0 12px; min-height:44px; min-width:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; opacity:.9; }
#demo .m_mainToolBarMenu { padding:0 8px; }
#demo .shell-button svg { margin:0; }
#demo .m_mainToolMenuText { width:100%; }
#demo .m_mainToolMenuTextDiv { width:auto; min-width:0; }
#demo .shell-end { text-align:right; white-space:nowrap; padding-right:10px; color:white; }
#demo .shell-brand { font-size:11px; letter-spacing:.08em; margin-right:20px; opacity:.85; }
#demo .icon-button { height:44px; min-width:44px; border:0; border-radius:6px; color:#65727e; background:transparent; font-size:24px; display:inline-flex; align-items:center; justify-content:center; }
#demo .icon-button:hover { background:#eef3f6; }
#demo .workspace { display:block; }
#demo #mainContent { min-width:0; padding:0 28px 110px; max-width:1800px; margin:0 auto; }
#demo #adminBar .adminBarSeed { color:#9aa5b1; white-space:nowrap; }
#demo .toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 0 0; border-bottom:1px solid #dce4e9; }
#demo .status-tabs { display:flex; gap:6px; overflow-x:auto; }
#demo .status-tabs button { white-space:nowrap; min-height:52px; padding:0 9px; background:none; border:0; border-bottom:2px solid transparent; color:#7a8791; font-size:12px; }
#demo .status-tabs button[aria-pressed="true"] { color:#126f9f; border-bottom-color:#0088cc; font-weight:600; }
#demo .status-tabs button span { font-size:10px; margin-left:5px; border-radius:4px; background:#e9eef2; padding:2px 5px; }
#demo .tools { display:flex; gap:8px; padding-bottom:8px; }
#demo .search-field { display:flex; align-items:center; width:210px; border:1px solid #dbe3e9; border-radius:6px; background:#fff; padding:0 10px; }
#demo .search-field svg { width:17px; height:17px; fill:none; stroke:#81909d; stroke-width:1.5; flex:none; }
#demo .search-field input { border:0; background:transparent; color:#334754; min-width:0; width:100%; height:42px; padding:0 8px; outline-offset:-2px; font-size:12px; }
#demo .search-field input::placeholder { color:#9aa5ad; }
#demo .secondary,#demo .primary { min-height:42px; padding:8px 14px; border:1px solid #dbe3e9; border-radius:6px; background:#fff; color:#536673; font-size:12px; font-weight:500; white-space:nowrap; }
#demo .secondary:hover { background:#f0f6f9; }
#demo .primary { background:#0088cc; color:#fff; border-color:#0088cc; }
#demo .primary:hover { background:#0078b4; }
#demo .full { width:100%; }
#demo .list-context { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:68px; }
#demo .type-filters { display:flex; gap:6px; flex-wrap:wrap; }
#demo .type-chip { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:34px; padding:5px 10px; border:1px solid transparent; border-radius:5px; font-size:11px; color:#72818d; background:transparent; white-space:nowrap; }
#demo .type-chip svg,#demo .identity-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; flex:none; }
#demo .type-chip[aria-pressed="true"] { background:white; border-color:#d9e4eb; color:#264c64; }
#demo .type-chip.simulator svg { color:#417da6; }
#demo .type-chip.flight svg { color:#448e78; }
#demo .type-chip.classroom svg { color:#8870ae; }
#demo #resultCount,#demo .directory-label { font-size:11px; color:#83919b; white-space:nowrap; }
#demo .directory-label { font-size:12px; font-weight:500; }
#demo .mobile-sort { display:none; }
#demo .table-surface { position:relative; border:1px solid #e0e6eb; border-radius:8px; background:#fff; overflow-x:auto; }
#demo #recordsTable { width:100%; border-collapse:collapse; table-layout:auto; text-align:left; }
#demo #recordsTable th { background:#f9fbfc; border-bottom:1px solid #e4eaee; font-size:10px; color:#8997a2; font-weight:500; white-space:nowrap; padding:0 12px; }
#demo #recordsTable th button { min-height:44px; background:none; border:0; color:inherit; font-size:11px; font-weight:500; text-align:left; padding:0; width:100%; }
#demo #recordsTable th button span { margin-left:5px; opacity:.55; }
#demo #recordsTable td { padding:15px 12px; border-bottom:1px solid #edf1f4; vertical-align:middle; max-width:340px; font-size:12px; }
#demo #recordsTable tbody tr:last-child td { border-bottom:0; }
#demo #recordsTable tbody tr:hover { background:#fbfdfe; }
#demo #recordsTable tbody tr.selected { background:#f0f8fc; }
#demo #recordsTable .selection-cell { width:42px; max-width:42px; padding:10px 6px 10px 14px; }
#demo input[type="checkbox"] { display:inline-block !important; position:static !important; opacity:1 !important; appearance:auto !important; visibility:visible !important; width:17px; height:17px; margin:0; padding:0; accent-color:#0088cc; cursor:pointer; clip:auto; }
#demo #recordsTable .action-cell { width:44px; padding:0 8px; text-align:right; }
#demo .primary-column { min-width:230px; }
#demo .identity { display:flex; align-items:center; gap:11px; }
#demo .identity-icon { flex:none; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:7px; background:#edf4fa; color:#4a81a8; }
#demo .identity-icon.flight { background:#edf6f2; color:#4b8a73; }
#demo .identity-icon.classroom { background:#f3eff8; color:#8a72ad; }
#demo .identity-icon.person { border-radius:50%; background:#ecf1f5; color:#637d92; font-size:11px; font-weight:600; }
#demo .record-link { display:block; text-align:left; padding:0; border:0; background:transparent; color:#304b5d; font-size:12px; font-weight:600; line-height:1.5; min-height:24px; }
#demo .record-link:hover { color:#0088cc; }
#demo .identity-meta { display:block; font-size:10px; color:#95a0a9; margin-top:3px; }
#demo .cell-main { color:#536774; line-height:1.5; overflow-wrap:anywhere; }
#demo .cell-sub { display:block; color:#98a3ab; font-size:10px; margin-top:4px; }
#demo .nowrap { white-space:nowrap; }
#demo .status-badge { display:inline-flex; align-items:center; gap:6px; border-radius:4px; background:#f1f4f6; padding:4px 7px; font-size:10px; color:#70818e; white-space:nowrap; }
#demo .status-badge i { height:5px; width:5px; border-radius:50%; background:currentColor; }
#demo .status-badge.overdue { color:#b26c48; background:#fcf1e9; }
#demo .status-badge.today { color:#317ea8; background:#edf6fc; }
#demo .status-badge.completed,#demo .status-badge.acknowledged,#demo .status-badge.active { color:#598773; background:#eef6f1; }
#demo .result-pill,#demo .pr-pill { color:#8a98a2; font-size:11px; }
#demo .result-pill.pass { color:#51856b; }
#demo .pr-pill.review { color:#b17b45; }
#demo .row-open { width:44px; height:44px; background:transparent; border:0; border-radius:5px; color:#9cabb5; font-size:18px; }
#demo .row-open:hover { color:#0088cc; background:#eff7fb; }
#demo progress { display:block; width:115px; max-width:100%; height:5px; border:0; border-radius:4px; margin-top:7px; background:#edf1f4; accent-color:#69a7c8; }
#demo progress::-webkit-progress-bar { background:#edf1f4; border-radius:4px; }
#demo progress::-webkit-progress-value { background:#69a7c8; border-radius:4px; }
#demo .progress-label { display:flex; justify-content:space-between; align-items:center; gap:14px; font-size:11px; color:#59798d; }
#demo .progress-label .cell-sub { margin:0; }
#demo .table-footer { display:flex; justify-content:space-between; gap:16px; font-size:10px; color:#99a4ad; padding:16px 2px; }
#demo .empty-state { padding:64px 20px; text-align:center; color:#657f90; }
#demo .empty-state strong { font-size:16px; font-weight:500; }
#demo .empty-state p { font-size:13px; color:#8e9ba5; margin:8px 0 20px; }
#demo #selectionBar { position:fixed; z-index:25; bottom:20px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; background:#fff; border:1px solid #dce5eb; border-radius:9px; padding:10px 16px; box-shadow:0 6px 30px #253f5420; max-width:calc(100vw - 24px); white-space:nowrap; }
#demo #selectionBar strong { font-size:12px; font-weight:500; margin-right:18px; }
#demo dialog { color:#334b5b; padding:24px; background:white; border:1px solid #dfe6eb; border-radius:10px; width:440px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 32px); box-shadow:0 20px 90px #0e30453b; }
#demo dialog::backdrop { background:#152b3e4d; }
#demo .dialog-heading,#demo .detail-top { display:flex; align-items:center; justify-content:space-between; }
#demo .dialog-heading h2 { font-size:18px; font-weight:600; margin:0; }
#demo #columnsDialog p { font-size:12px; color:#8696a1; margin:8px 0 20px; }
#demo #columnOptions { display:flex; flex-direction:column; }
#demo #columnOptions label { display:flex; align-items:center; gap:12px; min-height:44px; font-size:12px; cursor:pointer; }
#demo #columnOptions label::before { display:none !important; }
#demo #columnOptions small { margin-left:auto; color:#98a6b0; font-size:10px; }
#demo .dialog-actions,#demo .detail-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:20px; }
#demo .detail-dialog { margin:0 0 0 auto; height:100dvh; max-height:100dvh; width:480px; max-width:100vw; border-radius:0; padding:24px 28px; border:0; }
#demo #detailTitle { font-size:23px; line-height:1.3; letter-spacing:-.4px; margin:18px 0 12px; }
#demo #detailSubtitle { padding-bottom:22px; border-bottom:1px solid #e7edf1; }
#demo #detailFields { display:grid; grid-template-columns:1fr 1fr; gap:22px 24px; margin:24px 0; }
#demo #detailFields div { min-width:0; }
#demo #detailFields dt { color:#98a5ae; font-size:10px; margin-bottom:6px; }
#demo #detailFields dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
#demo .detail-actions { border-top:1px solid #e7edf1; padding-bottom:20px; }
#demo .detail-type { color:#899aa5; font-size:12px; }
#demo #toast { position:fixed; z-index:100; bottom:88px; left:50%; transform:translateX(-50%); background:#2e4b5e; color:white; padding:12px 18px; border-radius:7px; font-size:12px; max-width:calc(100vw - 30px); box-shadow:0 4px 20px #203c5420; }
#demo .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1250px) { #demo .toolbar { flex-wrap:wrap; } #demo .tools { margin-left:auto; } #demo .status-tabs { flex:1; } #demo #mainContent { padding-left:20px; padding-right:20px; } }
@media (max-width:1000px) {
 #demo .status-tabs { order:2; flex-basis:100%; }
 #demo .tools { width:100%; padding:0; }
 #demo .search-field { flex:1; }
 #demo .toolbar { gap:4px; padding-top:16px; }
 #demo #recordsTable td { padding:14px 10px; }
 #demo .primary-column { min-width:210px; }
}
@media (max-width:600px) {
 #demo .shell-brand { display:none; }
 #demo #mainContent { padding:0 12px 100px; }
 #demo .list-context { align-items:flex-start; flex-direction:column; gap:6px; padding:12px 0; }
 #demo .type-filters { width:100%; justify-content:space-between; gap:2px; }
 #demo .type-chip { padding:4px 7px; min-height:40px; font-size:10px; }
 #demo .status-tabs { gap:0; }
 #demo .status-tabs button { padding:0 8px; min-height:48px; }
 #demo .status-tabs button span { margin-left:3px; }
 #demo .table-surface { border:0; background:transparent; overflow:visible; }
 #demo #recordsTable, #demo #recordsTable tbody { display:block; }
 #demo #tableHead { display:none; }
 #demo #recordsTable tbody tr[data-id] { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; border:1px solid #e0e6eb; background:white; border-radius:8px; margin-bottom:10px; padding:16px; }
 #demo #recordsTable td { display:block; max-width:none; border:0; padding:0; }
 #demo #recordsTable .selection-cell { position:absolute; right:58px; top:17px; width:24px; max-width:none; padding:10px 0; }
 #demo #recordsTable .action-cell { position:absolute; right:8px; top:13px; width:44px; padding:0; }
 #demo #recordsTable .primary-cell { grid-column:1 / -1; padding-right:60px; min-height:44px; }
 #demo .identity { gap:9px; }
 #demo .record-link { font-size:13px; }
 #demo .data-cell::before { content:attr(data-label); display:block; color:#98a5ae; font-size:10px; margin-bottom:5px; }
 #demo .cell-main { font-size:12px; }
 #demo .table-footer { flex-wrap:wrap; }
 #demo #selectionBar { gap:8px; padding:8px 10px; bottom:max(12px,env(safe-area-inset-bottom)); }
 #demo #selectionBar strong { margin-right:4px; }
 #demo .detail-dialog { padding:20px; }
}

@media(max-width:600px) {
 #demo .list-context { flex-direction:row; flex-wrap:wrap; align-items:center; }
 #demo .mobile-sort { display:flex; gap:6px; align-items:center; font-size:11px; color:#83919b; }
 #demo .mobile-sort select { max-width:170px; min-height:40px; padding:0 8px; background:transparent; border:0; color:#536d7e; font-size:11px; }
 #demo .mobile-sort button { width:40px; height:40px; background:transparent; border:0; color:#536d7e; }
 #demo .mobile-sort button:disabled { opacity:.3; }
}
/* Source-backed actions belong to their event or person, never to a generic completion control. */
#demo .context-trigger { display:inline-flex; align-items:center; justify-content:center; width:36px; min-width:36px; height:44px; padding:0; border:0; background:transparent; color:#79909f; border-radius:5px; font-size:22px; }
#demo .context-trigger:hover { color:#087bad; background:#eef6fa; }
#demo #recordsTable .action-cell { width:92px; min-width:92px; white-space:nowrap; text-align:right; }
#demo .action-cell .row-open { width:32px; }
#demo .source-primary { display:block; min-height:38px; padding:6px 12px; margin:0 0 3px auto; border:1px solid #cee2ee; border-radius:5px; background:#f1f8fc; color:#1678a5; font-size:11px; font-weight:600; }
#demo .people-list { display:flex; flex-direction:column; gap:8px; }
#demo .person-entry { display:flex; align-items:center; justify-content:space-between; gap:5px; }
#demo .person-entry > div { min-width:0; }
#demo .person-link,#demo .attendee-link { display:block; border:0; background:transparent; padding:0; min-height:24px; text-align:left; color:#376981; font-size:12px; line-height:1.4; }
#demo .person-link:hover,#demo .attendee-link:hover { text-decoration:underline; }
#demo .person-name { font-size:12px; color:#536774; }
#demo .person-meta { display:block; font-size:9px; color:#8b9aa5; margin-top:3px; }
#demo .attendee-link span { margin-left:6px; }
#demo .field-with-menu { display:flex; align-items:center; gap:5px; }
#demo #detailPeople h2 { font-size:11px; font-weight:500; color:#8596a2; margin:22px 0 12px; }
#demo #detailPeople .person-entry { padding:7px 0; border-bottom:1px solid #edf1f4; }
#demo #detailPeople .person-meta { font-size:11px; }
#demo #detailPeople .person-link { font-size:13px; }
#demo #detailPrimaryActions { display:flex; align-items:center; gap:8px; }
#demo #detailPrimaryActions .source-primary { margin:0; min-height:44px; }
#demo .context-dialog { position:fixed; margin:0; top:100px; left:calc(50% - 150px); width:300px; padding:8px; max-height:calc(100dvh - 24px); border-radius:8px; }
#demo .context-dialog::backdrop { background:transparent; }
#demo .context-heading { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e6edf1; padding:4px 6px 8px 10px; }
#demo .context-heading strong { display:block; font-size:12px; font-weight:600; }
#demo .context-heading small { display:block; font-size:10px; color:#899aa6; margin-top:4px; }
#demo #contextItems { padding-top:6px; }
#demo #contextItems button { display:block; width:100%; text-align:left; min-height:44px; border:0; background:transparent; border-radius:5px; padding:10px 12px; font-size:12px; color:#425f72; }
#demo #contextItems button:hover,#demo #contextItems button:focus { background:#eef6fb; }
#demo #contextItems .destructive { color:#a6664f; }
#demo #actionBody { font-size:13px; color:#607b8c; line-height:1.6; }
#demo .action-context { font-weight:600; color:#365971; margin:12px 0 20px; }
#demo .preview-note { padding-top:12px; border-top:1px solid #e8eef2; font-size:11px; color:#8c9ba6; }
#demo .person-profile { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
#demo .person-profile dt { font-size:10px; color:#8c9ba6; }
#demo .person-profile dd { margin:4px 0 0; color:#365971; }
@media(max-width:600px) {
 #demo #recordsTable .action-cell { position:static; width:auto; grid-column:1 / -1; display:flex; justify-content:flex-end; align-items:center; gap:6px; border-top:1px solid #edf1f4; padding-top:6px; }
 #demo #recordsTable .selection-cell { right:16px; }
 #demo #recordsTable .primary-cell { padding-right:28px; }
 #demo .source-primary { display:inline-flex; align-items:center; min-height:44px; margin:0; }
 #demo .context-dialog { top:auto !important; left:12px !important; bottom:12px; width:calc(100vw - 24px); }
 #demo .person-meta { font-size:10px; }
}

/* ---- prototype bar: layout, view and dataset controls above the product header ---- */
#demo .demobar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-height:42px; padding:6px 14px; background:#fff; border-bottom:1px solid #dbe3e9; }
#demo .demobar-brand { font-size:12px; color:#7b8892; white-space:nowrap; }
#demo .demobar-brand b { color:#33475a; font-weight:600; }
#demo .demobar-sp { flex:1 1 auto; }
#demo .demobar-group { display:inline-flex; border:1px solid #d5dee4; border-radius:6px; overflow:hidden; background:#fff; }
#demo .demobar-group button { min-height:30px; padding:0 13px; border:0; border-left:1px solid #e2e9ee; background:#fff; color:#5a6a76; font-size:12px; white-space:nowrap; }
#demo .demobar-group button:first-child { border-left:0; }
#demo .demobar-group button:hover { background:#f2f6f9; color:#2d3f4d; }
#demo .demobar-group button[aria-pressed="true"] { background:#0088cc; color:#fff; font-weight:600; }
#demo .demobar-field { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:#7b8892; white-space:nowrap; }
#demo .demobar-field select { min-height:30px; max-width:210px; padding:0 8px; border:1px solid #d5dee4; border-radius:6px; background:#fff; color:#33475a; font-size:12px; }
#demo .demobar-btn { min-height:30px; padding:0 13px; border:1px solid #d5dee4; border-radius:6px; background:#fff; color:#33475a; font-size:12px; font-weight:600; white-space:nowrap; }
#demo .demobar-btn:hover { background:#f2f6f9; }
@media (max-width:600px) {
  #demo .demobar { gap:8px; padding:6px 10px; }
  #demo .demobar-brand, #demo .demobar-sp { display:none; }
  #demo .demobar-field { font-size:11px; }
  #demo .demobar-group { order:-1; width:100%; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
  #demo .demobar-group::-webkit-scrollbar { display:none; }
  #demo .demobar-group button { flex:0 0 auto; padding:0 11px; }
}
