/* Force Technologies AS6171A Lab Platform — base styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --dark-blue: #232656;
  --dark-blue-90: #2b2f63;
  --dark-blue-12: rgba(35,38,86,0.12);
  --dark-blue-08: rgba(35,38,86,0.08);
  --dark-blue-04: rgba(35,38,86,0.04);
  --light-blue: #00ADEF;
  --light-blue-soft: #e6f6fd;
  --body-text: #5F727F;
  --body-text-strong: #3a4a55;
  --white: #ffffff;
  --canvas: #f4f6f8;
  --line: #e3e8ec;
  --line-strong: #d1d8de;
  --green: #1f8a4c;
  --green-soft: #e7f4ec;
  --amber: #c47a07;
  --amber-soft: #fbf1dc;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --grey-na: #6e7c85;
  --grey-na-soft: #eef1f3;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 0 rgba(35,38,86,0.04), 0 1px 3px rgba(35,38,86,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', 'Aptos', Arial, sans-serif;
  font-size: 13px;
  color: var(--body-text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* App layout */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  height: 100%;
  min-height: 720px;
  background: var(--canvas);
}

.topbar {
  grid-area: topbar;
  background: var(--dark-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 14px;
}
.topbar .brand .ft-mark {
  height: 28px;
  background-image: url('assets/force-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  background-color: white;
  border-radius: 4px;
  padding: 0 8px;
}
.topbar .brand .name { display: flex; flex-direction: column; line-height: 1.1; }
.topbar .brand .name .t1 { font-size: 13px; }
.topbar .brand .name .t2 { font-size: 10px; font-weight: 500; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; }

.topbar .spacer { flex: 1; }
.topbar .topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 6px 10px;
  border-radius: 4px;
  width: 320px;
  color: rgba(255,255,255,0.7);
}
.topbar .topbar-search input {
  flex: 1; background: transparent; border: 0; outline: 0; color: white;
  font-family: inherit; font-size: 12px;
}
.topbar .topbar-search input::placeholder { color: rgba(255,255,255,0.5); }

.topbar .topbar-action {
  display: flex; align-items: center; gap: 6px;
  background: transparent; color: white;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.topbar .topbar-action:hover { background: rgba(255,255,255,0.07); }

.topbar .user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 100px;
  cursor: pointer;
}
.topbar .user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--light-blue); color: var(--dark-blue);
  display: grid; place-items: center; font-weight: 700; font-size: 11px;
}
.topbar .user-chip .who { display: flex; flex-direction: column; line-height: 1.15; }
.topbar .user-chip .who .n { font-size: 12px; font-weight: 600; }
.topbar .user-chip .who .r { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.06em; }

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 14px 0 0 0;
}
.sidebar .nav-section {
  padding: 0 12px;
  margin-bottom: 6px;
}
.sidebar .nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--body-text);
  font-weight: 600;
  padding: 12px 10px 6px 10px;
}
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--dark-blue);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 0; background: transparent; width: 100%; text-align: left;
}
.sidebar .nav-item .ico {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  color: var(--body-text);
}
.sidebar .nav-item:hover { background: var(--dark-blue-04); }
.sidebar .nav-item.active {
  background: var(--dark-blue);
  color: white;
}
.sidebar .nav-item.active .ico { color: var(--light-blue); }
.sidebar .nav-item.disabled { opacity: 0.4; pointer-events: none; }
.sidebar .nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--light-blue);
  color: var(--dark-blue);
  font-weight: 700;
  border-radius: 100px;
  padding: 1px 7px;
  min-width: 18px; text-align: center;
}
.sidebar .nav-item.active .badge {
  background: var(--light-blue); color: var(--dark-blue);
}

.sidebar .footer-info {
  margin-top: auto;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--body-text);
  line-height: 1.5;
}

/* Main */
.main {
  grid-area: main;
  overflow: auto;
  padding: 22px 28px 60px 28px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.page-header h1 {
  font-size: 22px;
  margin: 0 0 4px 0;
  color: var(--dark-blue);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-header .sub {
  color: var(--body-text);
  font-size: 12px;
}
.page-header .actions { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--dark-blue);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--dark-blue-04); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: var(--dark-blue);
  border-color: var(--dark-blue);
  color: white;
}
.btn.primary:hover { background: var(--dark-blue-90); }
.btn.accent {
  background: var(--light-blue);
  border-color: var(--light-blue);
  color: var(--dark-blue);
}
.btn.accent:hover { filter: brightness(0.95); }
.btn.danger {
  background: white;
  border-color: var(--red);
  color: var(--red);
}
.btn.danger:hover { background: var(--red-soft); }
.btn.success {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.btn.ghost {
  background: transparent; border-color: transparent; color: var(--body-text);
  padding: 5px 8px;
}
.btn.ghost:hover { background: var(--dark-blue-04); color: var(--dark-blue); }
.btn.sm { padding: 4px 10px; font-size: 11px; }

/* Cards / panels */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 {
  font-size: 13px; font-weight: 700; color: var(--dark-blue);
  margin: 0;
  letter-spacing: 0.01em;
}
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

/* Stat cards */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--body-text); font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 700; color: var(--dark-blue); line-height: 1.1; }
.stat .delta { font-size: 11px; color: var(--body-text); }
.stat .ico { position: absolute; right: 12px; top: 12px; color: var(--light-blue); opacity: 0.7; }
.stat.accent { border-left: 3px solid var(--light-blue); }

/* Table */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.tbl th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--body-text);
  font-weight: 700;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--body-text-strong);
  vertical-align: middle;
}
.tbl tr.row-clickable { cursor: pointer; }
.tbl tr.row-clickable:hover td { background: var(--dark-blue-04); }
.tbl td.muted { color: var(--body-text); }
.tbl td .lead { color: var(--dark-blue); font-weight: 600; }
.tbl td.num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl th.num { text-align: right; }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.planned { color: #4a5666; background: var(--grey-na-soft); border-color: var(--line-strong); }
.pill.inprogress { color: var(--light-blue); background: var(--light-blue-soft); border-color: #b8e3f5; }
.pill.forapproval { color: var(--amber); background: var(--amber-soft); border-color: #ecd49a; }
.pill.rejected { color: var(--red); background: var(--red-soft); border-color: #f1c2bf; }
.pill.approved { color: var(--green); background: var(--green-soft); border-color: #b9dec6; }
.pill.complete { color: var(--dark-blue); background: var(--dark-blue-08); border-color: var(--dark-blue-12); }

.outcome-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em;
}
.outcome-pill.acceptable { color: #136435; background: var(--green-soft); }
.outcome-pill.suspect { color: #8b5500; background: var(--amber-soft); }
.outcome-pill.notacceptable { color: #871a14; background: var(--red-soft); }
.outcome-pill.notavailable { color: var(--grey-na); background: var(--grey-na-soft); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--body-text);
}
.field label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 11px; color: var(--body-text); margin-top: 2px; }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="email"],
.field select, .field textarea, .ctrl {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  background: white;
  color: var(--body-text-strong);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .ctrl:focus { border-color: var(--light-blue); box-shadow: 0 0 0 3px rgba(0,173,239,0.15); }
.field textarea { resize: vertical; min-height: 64px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.field-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Segmented outcome control */
.outcome-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.outcome-seg .opt {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: white;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; color: var(--body-text-strong); font-weight: 600;
  transition: all 0.12s ease;
}
.outcome-seg .opt .swatch { width: 10px; height: 10px; border-radius: 50%; }
.outcome-seg .opt.acceptable .swatch { background: var(--green); }
.outcome-seg .opt.suspect .swatch { background: var(--amber); }
.outcome-seg .opt.notacceptable .swatch { background: var(--red); }
.outcome-seg .opt.notavailable .swatch { background: var(--grey-na); }
.outcome-seg .opt:hover { border-color: var(--body-text); }
.outcome-seg .opt.selected { border-width: 1.5px; }
.outcome-seg .opt.selected.acceptable { border-color: var(--green); background: var(--green-soft); color: #136435; }
.outcome-seg .opt.selected.suspect { border-color: var(--amber); background: var(--amber-soft); color: #8b5500; }
.outcome-seg .opt.selected.notacceptable { border-color: var(--red); background: var(--red-soft); color: #871a14; }
.outcome-seg .opt.selected.notavailable { border-color: var(--grey-na); background: var(--grey-na-soft); }

/* Quantity tracker */
.qty-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.qty-cell {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.qty-cell label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--body-text); font-weight: 600; }
.qty-cell input { width: 100%; border: 0; padding: 4px 0 0 0; font-size: 18px; font-weight: 700; color: var(--dark-blue); font-family: inherit; outline: none; background: transparent; font-variant-numeric: tabular-nums; }

.qty-validation {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  display: flex; align-items: center; gap: 8px;
}
.qty-validation.ok { background: var(--green-soft); color: #136435; }
.qty-validation.bad { background: var(--red-soft); color: #871a14; }

/* Test sequence */
.seq-list {
  display: flex; flex-direction: column; gap: 0;
}
.seq-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s;
}
.seq-item:last-child { border-bottom: 0; }
.seq-item:hover { background: var(--dark-blue-04); }
.seq-item .step-num {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--canvas);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-weight: 700; color: var(--dark-blue); font-size: 13px;
}
.seq-item.complete .step-num { background: var(--green-soft); border-color: #b9dec6; color: #136435; }
.seq-item.inprogress .step-num { background: var(--light-blue-soft); border-color: #b8e3f5; color: #006a92; }
.seq-item.rejected .step-num { background: var(--red-soft); border-color: #f1c2bf; color: #871a14; }
.seq-item .test-meta .test-name { font-size: 13px; font-weight: 600; color: var(--dark-blue); }
.seq-item .test-meta .test-cat { font-size: 11px; color: var(--body-text); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.seq-item .destruct {
  font-size: 9.5px; padding: 1px 6px; background: var(--red-soft); color: #871a14;
  border-radius: 100px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.seq-item .qty-tag { font-size: 11px; color: var(--body-text); font-variant-numeric: tabular-nums; }

/* Evidence grid */
.evidence-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.evidence-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.evidence-card .img {
  aspect-ratio: 4/3;
  background: var(--canvas);
  background-size: cover; background-position: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.evidence-card .img .badge {
  position: absolute; left: 8px; top: 8px;
  background: rgba(35,38,86,0.85); color: white;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 6px; border-radius: 3px;
  text-transform: uppercase;
}
.evidence-card .img .figure-num {
  position: absolute; right: 8px; top: 8px;
  background: rgba(255,255,255,0.92); color: var(--dark-blue);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
}
.evidence-card .meta { padding: 10px 12px; }
.evidence-card .caption { font-size: 12px; color: var(--dark-blue); font-weight: 600; }
.evidence-card .sub { font-size: 10.5px; color: var(--body-text); margin-top: 4px; display: flex; justify-content: space-between; }
.evidence-card .actions { display: flex; gap: 6px; padding: 0 10px 10px 10px; }
.evidence-card .include-toggle {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--body-text); margin-top: 4px;
}

/* Drop zone */
.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--canvas);
  color: var(--body-text);
  font-size: 12px;
}
.dropzone .big { font-size: 14px; color: var(--dark-blue); font-weight: 600; margin-bottom: 4px; }

/* Two column */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.two-col-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 22px; align-items: start; }

/* Job header */
.job-header {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.job-header .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.job-header .crumb { font-size: 11px; color: var(--body-text); margin-bottom: 4px; }
.job-header .title-row { display: flex; align-items: baseline; gap: 14px; }
.job-header h1 {
  margin: 0; font-size: 22px; color: var(--dark-blue); font-weight: 700; letter-spacing: -0.01em;
}
.job-header .report-no {
  font-size: 13px; color: var(--body-text); font-variant-numeric: tabular-nums;
}
.job-header .meta-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.job-header .meta-row .cell { display: flex; flex-direction: column; gap: 2px; }
.job-header .meta-row .cell .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--body-text); font-weight: 600; }
.job-header .meta-row .cell .v { font-size: 12.5px; color: var(--dark-blue); font-weight: 500; }

/* Tabs */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tabs .tab {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--body-text);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: transparent; border-top: 0; border-left: 0; border-right: 0;
  font-family: inherit;
}
.tabs .tab.active { color: var(--dark-blue); border-bottom-color: var(--light-blue); }
.tabs .tab:hover { color: var(--dark-blue); }
.tabs .tab .count {
  background: var(--dark-blue-08); color: var(--dark-blue);
  font-size: 10px; font-weight: 700;
  border-radius: 100px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* Approval banner */
.approval-banner {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px;
}
.approval-banner.action { background: #fff7e3; border: 1px solid #ecd49a; color: #663d00; }
.approval-banner.rejected { background: var(--red-soft); border: 1px solid #f1c2bf; color: #871a14; }
.approval-banner.approved { background: var(--green-soft); border: 1px solid #b9dec6; color: #136435; }
.approval-banner.info { background: var(--light-blue-soft); border: 1px solid #b8e3f5; color: #006a92; }
.approval-banner .icon { font-size: 20px; }
.approval-banner .actions { margin-left: auto; display: flex; gap: 8px; }

/* Audit timeline */
.audit-timeline { display: flex; flex-direction: column; }
.audit-row {
  display: grid; grid-template-columns: 24px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.audit-row:last-child { border-bottom: 0; }
.audit-row .marker {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--light-blue);
  margin-top: 6px; margin-left: 8px;
  position: relative;
}
.audit-row .marker::before {
  content: ''; position: absolute;
  left: 50%; top: 14px;
  width: 1px; height: 100%;
  background: var(--line);
  transform: translateX(-50%);
}
.audit-row:last-child .marker::before { display: none; }
.audit-row .body .what { font-size: 12px; color: var(--dark-blue); font-weight: 500; }
.audit-row .body .who { font-size: 11px; color: var(--body-text); margin-top: 2px; }
.audit-row .when { font-size: 11px; color: var(--body-text); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(35,38,86,0.45);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: white;
  border-radius: 8px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.modal.lg { max-width: 960px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 { margin: 0; font-size: 15px; color: var(--dark-blue); font-weight: 700; }
.modal-body { padding: 20px; overflow: auto; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--canvas);
}

/* PDF preview */
.pdf-shell {
  background: #2a2d4d;
  padding: 28px;
  border-radius: 6px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.pdf-page {
  background: white;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1 / 1.414;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  font-family: 'Montserrat', sans-serif;
  color: var(--dark-blue);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.4;
}

/* Pdf elements */
.pdf-page .pdf-header {
  border-bottom: 1.5px solid var(--dark-blue);
  padding: 18px 28px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
}
.pdf-page .pdf-header .ft-mark {
  width: 100px; height: 28px;
  background: url('assets/force-logo.png') left center/contain no-repeat;
}
.pdf-page .pdf-header .ctr { text-align: center; }
.pdf-page .pdf-header .ctr .t { font-size: 10px; font-weight: 700; color: var(--dark-blue); }
.pdf-page .pdf-header .ctr .n { font-size: 8.5px; color: var(--body-text); }
.pdf-page .pdf-header .right { text-align: right; font-size: 8px; color: var(--body-text); }

.pdf-page .pdf-footer {
  margin-top: auto;
  border-top: 1.5px solid var(--light-blue);
  padding: 8px 28px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
  font-size: 7.5px; color: var(--body-text);
}
.pdf-page .pdf-footer .c { text-align: center; }
.pdf-page .pdf-footer .r { text-align: right; }

.pdf-content { padding: 22px 28px; flex: 1; overflow: hidden; }
.pdf-h1 { font-size: 22px; font-weight: 700; color: var(--dark-blue); margin: 0 0 4px 0; line-height: 1.2; }
.pdf-h2 { font-size: 13px; font-weight: 700; color: var(--dark-blue); margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--dark-blue); }
.pdf-h3 { font-size: 11px; font-weight: 700; color: var(--dark-blue); margin: 10px 0 4px; }
.pdf-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 9px; }
.pdf-meta-grid .k { color: var(--body-text); font-weight: 600; }
.pdf-meta-grid .v { color: var(--dark-blue); }

.pdf-tbl { width: 100%; border-collapse: collapse; font-size: 8.5px; }
.pdf-tbl th { background: var(--dark-blue); color: white; padding: 5px 7px; text-align: left; font-weight: 600; font-size: 8px; }
.pdf-tbl td { padding: 5px 7px; border-bottom: 1px solid var(--line); color: var(--body-text-strong); }
.pdf-tbl tr:nth-child(even) td { background: var(--canvas); }

.pdf-cover-block {
  background: var(--canvas);
  padding: 14px;
  border-left: 3px solid var(--light-blue);
  margin-top: 8px;
  font-size: 9.5px;
}
.pdf-cover-block h3 { margin: 0 0 6px 0; font-size: 11px; color: var(--dark-blue); }
.pdf-cover-block .row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.pdf-cover-block .row .k { color: var(--body-text); }
.pdf-cover-block .row .v { color: var(--dark-blue); font-weight: 600; }
.pdf-cover-block .row:last-child { border-bottom: 0; }

.pdf-imgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.pdf-imgrid .pdf-img { aspect-ratio: 4/3; background: #cfd5da; background-size: cover; background-position: center; border: 1px solid var(--line); border-radius: 2px; position: relative; }
.pdf-imgrid .pdf-img .fig { position: absolute; left: 4px; bottom: 4px; background: rgba(255,255,255,0.95); color: var(--dark-blue); font-size: 7px; font-weight: 700; padding: 1px 4px; border-radius: 1px; }

.pdf-pager {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.pdf-pager .p {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: white; font-size: 11px; padding: 4px 10px; border-radius: 3px; cursor: pointer;
}
.pdf-pager .p.active { background: var(--light-blue); border-color: var(--light-blue); color: var(--dark-blue); font-weight: 600; }

/* List action row */
.list-toolbar {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.list-toolbar input.search {
  flex: 1; max-width: 320px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 12px; font-family: inherit; outline: none;
}
.list-toolbar .filters { display: flex; gap: 6px; flex-wrap: wrap; }
.list-toolbar .chip {
  font-size: 11px; padding: 4px 10px; border-radius: 100px;
  background: white; border: 1px solid var(--line-strong); color: var(--body-text-strong); cursor: pointer;
}
.list-toolbar .chip.active { background: var(--dark-blue); color: white; border-color: var(--dark-blue); }
.list-toolbar .right { margin-left: auto; display: flex; gap: 8px; }

/* Misc */
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.empty { padding: 40px; text-align: center; color: var(--body-text); font-size: 12px; }
.empty .big { font-size: 14px; color: var(--dark-blue); font-weight: 600; margin-bottom: 4px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 7px;
  background: var(--dark-blue-08); color: var(--dark-blue);
  border-radius: 3px;
}

/* Checkbox */
.cb {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--body-text-strong);
  user-select: none;
}
.cb input { display: none; }
.cb .box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  display: grid; place-items: center;
  background: white;
  flex-shrink: 0;
}
.cb input:checked + .box {
  background: var(--dark-blue);
  border-color: var(--dark-blue);
  color: white;
}
.cb input:checked + .box::after {
  content: ''; width: 9px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg); margin-top: -2px;
}

/* Sig block */
.sig-block {
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px;
}
.sig-block .role { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--body-text); font-weight: 600; }
.sig-block .name { font-size: 13px; color: var(--dark-blue); font-weight: 600; font-family: 'Montserrat', cursive; font-style: italic; }
.sig-block .when { font-size: 10.5px; color: var(--body-text); }

/* Notification dot */
.dot-notif {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--light-blue);
  display: inline-block;
}

/* P10 a11y: skip-link is invisible until a keyboard user Tabs to it,
   at which point it becomes a high-contrast focusable anchor that jumps
   straight to <main id="main-content">, bypassing the topbar + sidebar.
   Use position:fixed so it doesn't shove anything around when revealed. */
.skip-link {
  position: fixed;
  left: -9999px; top: -9999px;
  z-index: 1000;
  padding: 8px 14px;
  background: var(--dark-blue); color: white;
  border-radius: 4px;
  font-weight: 600; font-size: 13px;
  text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible {
  left: 12px; top: 12px;
  outline: 3px solid var(--light-blue);
  outline-offset: 2px;
}

/* Responsive bits */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .job-header .meta-row { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .two-col-3-2 { grid-template-columns: 1fr; }
}

/* Calibration status colours (Equipment admin) */
.calib-overdue { color: var(--red); font-weight: 600; }
.calib-soon { color: var(--amber); font-weight: 500; }

/* Visible focus rings — keyboard nav (prototype suppressed all outlines) */
.btn:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.nav-item:focus-visible,
.outcome-seg .opt:focus-visible {
  outline: 2px solid var(--light-blue);
  outline-offset: 2px;
}

/* Auto-save indicator */
.autosave-indicator {
  font-size: 11px;
  color: var(--body-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.autosave-indicator.saving { color: var(--amber); }
.autosave-indicator.saved { color: var(--green); }
.autosave-indicator.dirty { color: var(--body-text); }

/* Stepper in the New Job wizard */
.wizard-steps {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.wizard-steps .step {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--body-text);
  border-bottom: 2px solid transparent;
  display: flex; gap: 8px; align-items: center;
}
.wizard-steps .step.active {
  color: var(--dark-blue);
  border-bottom-color: var(--light-blue);
}
.wizard-steps .step .num {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--line); color: var(--body-text);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}
.wizard-steps .step.active .num { background: var(--dark-blue); color: white; }
.wizard-steps .step.done .num { background: var(--green); color: white; }
.wizard-steps .step.done { color: var(--green); }

/* Char counter (reject reason) */
.char-counter {
  font-size: 10.5px;
  color: var(--body-text);
  text-align: right;
  margin-top: 4px;
}
.char-counter.bad { color: var(--red); }

/* Watermark for PDF preview */
.pdf-watermark {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  font-size: 86px;
  font-weight: 800;
  color: var(--dark-blue);
  opacity: 0.07;
  transform: rotate(-25deg);
  letter-spacing: 0.05em;
  z-index: 1;
}

/* Print stylesheet — used when user clicks Download PDF (Ctrl+P) on PdfPreview */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: white !important; height: auto !important; }
  body { font-size: 9px; }
  .topbar, .sidebar, .modal-header, .modal-footer { display: none !important; }
  .app { display: block !important; height: auto !important; min-height: 0 !important; }
  .main { padding: 0 !important; overflow: visible !important; }
  .modal-backdrop {
    position: static !important; padding: 0 !important; background: white !important;
    display: block !important;
  }
  .modal {
    max-width: none !important; width: 100% !important; max-height: none !important;
    box-shadow: none !important; border-radius: 0 !important; overflow: visible !important;
  }
  .modal-body { padding: 0 !important; overflow: visible !important; }
  .pdf-shell {
    background: white !important; padding: 0 !important; gap: 0 !important;
  }
  .pdf-pager { display: none !important; }
  .pdf-page {
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    page-break-after: always;
    page-break-inside: avoid;
    aspect-ratio: auto !important;
  }
  .pdf-page:last-child { page-break-after: auto; }
  /* Ensure colours print */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

