:root {
  --ink: #17213a;
  --muted: #5c6578;
  --navy: #0a1f8f;
  --navy-2: #1456b8;
  --navy-dark: #07176b;
  --tint: #eaf0ff;
  --sand: #eef1f8;
  --cream: #f5f8fc;
  --line: #dde3ee;
  --white: #fff;
  --green: #1d5a46;
  --green-soft: #e0efe7;
  --red: #ad3328;
  --red-soft: #fae8e5;
  --amber: #8a5b12;
  --amber-soft: #fff0ce;
  --shadow: 0 16px 50px rgba(10, 31, 143, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.site-header { min-height: 76px; padding: 12px max(24px, calc((100vw - 1180px) / 2)); background: var(--navy); color: white; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner { width: 100%; display: flex; flex-wrap: wrap; row-gap: 8px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; color: white; text-decoration: none; }
.project-name { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.department-name { padding-left: 14px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; border-left: 1px solid rgba(255,255,255,.3); }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.main-nav a { padding: 9px 13px; color: rgba(255,255,255,.82); border-radius: 9px; font-size: 14px; font-weight: 650; text-decoration: none; }
.main-nav a:hover { background: rgba(255,255,255,.12); color: white; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero, .admin-hero { padding: 64px 0 40px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.hero > div:first-child { max-width: 780px; }
.eyebrow { display: block; margin-bottom: 9px; color: var(--navy-2); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.hero h1, .admin-hero h1 { margin-bottom: 13px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 66px); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
.hero p, .admin-hero p { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 17px; }
.hero-stat { min-width: 190px; padding: 22px; background: var(--tint); border-radius: var(--radius); }
.hero-stat strong, .hero-stat span { display: block; }
.hero-stat strong { font-family: Georgia, serif; font-size: 44px; line-height: 1; }
.hero-stat span { margin-top: 6px; color: var(--navy-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.partner-logos { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.partner-logos img { height: 40px; width: auto; max-width: 130px; object-fit: contain; }

.card { margin-bottom: 24px; padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-heading { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-heading > div, .checklist-header > div { display: flex; align-items: center; gap: 13px; }
.section-heading h2, .checklist-header h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.step-number, .section-index { color: var(--navy-2); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.required, label b { color: var(--red); }

.field-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.field-grid .wide { grid-column: span 2; }
.field-grid.one-col { grid-template-columns: 1fr; }
.field-grid + .field-grid, .field-grid + .checkbox-grid, .checkbox-grid + .field-grid { margin-top: 16px; }
.checkbox-grid { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.checkbox-tile { display: flex; align-items: center; gap: 9px; padding: 11px 13px; background: #f5f7fb; border: 1px solid #d7deea; border-radius: 9px; font-size: 13px; font-weight: 650; cursor: pointer; }
.checkbox-tile input { width: 16px; height: 16px; accent-color: var(--navy); }
.section-picker-hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.list-fields { margin-bottom: 16px; display: grid; gap: 8px; }
.list-fields > span { display: block; margin-bottom: 2px; color: #26324a; font-size: 12px; font-weight: 750; }
.field-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.photo-upload { margin-bottom: 16px; }
.photo-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-tile { position: relative; aspect-ratio: 1; overflow: hidden; background: #f0f2f7; border: 1px solid var(--line); border-radius: 10px; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6px; color: white; background: rgba(10,31,143,.55); font-size: 11px; font-weight: 700; text-align: center; }
.photo-tile.error .photo-tile-status { background: rgba(173,51,40,.75); }
.photo-tile-remove { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; display: grid; place-items: center; color: white; background: rgba(0,0,0,.55); border: 0; border-radius: 50%; font-size: 11px; cursor: pointer; }
label > span { display: block; margin-bottom: 7px; color: #26324a; font-size: 12px; font-weight: 750; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fbfcfe; border: 1px solid #cdd5e3; border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(20,86,184,.15); }

.checklist-header { position: sticky; z-index: 10; top: 0; margin: 34px 0 14px; padding: 18px 24px; color: white; background: rgba(10,31,143,.96); border-radius: 14px; box-shadow: 0 8px 28px rgba(10,31,143,.22); display: flex; align-items: center; justify-content: space-between; gap: 24px; backdrop-filter: blur(8px); }
.checklist-header h2 { color: white; font-size: 21px; }
.checklist-header p { margin: 2px 0 0; color: rgba(255,255,255,.66); font-size: 12px; }
.progress-track { width: min(38%, 340px); height: 6px; overflow: hidden; background: rgba(255,255,255,.2); border-radius: 20px; }
.progress-track span { display: block; width: 0; height: 100%; background: white; border-radius: inherit; transition: width .25s ease; }

.checklist-sections { display: grid; gap: 12px; }
.loading-card { padding: 40px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.checklist-section { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 20px rgba(10,31,143,.05); }
.checklist-section[open] { border-color: #c3cde3; }
.checklist-section summary { min-height: 62px; padding: 15px 20px; cursor: pointer; list-style: none; display: grid; grid-template-columns: 34px 1fr auto 24px; align-items: center; gap: 8px; }
.checklist-section summary::-webkit-details-marker { display: none; }
.section-name { font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.section-progress { padding: 4px 9px; color: var(--muted); background: var(--sand); border-radius: 20px; font-size: 11px; font-weight: 800; }
.section-complete .section-progress { color: var(--navy); background: var(--tint); }
.chevron { color: var(--muted); font-size: 20px; text-align: center; transition: transform .2s; }
.checklist-section[open] .chevron { transform: rotate(180deg); }
.requirements { border-top: 1px solid var(--line); }
.requirement { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) 255px; align-items: center; gap: 18px; border-bottom: 1px solid #e7ebf3; }
.requirement:last-child { border-bottom: 0; }
.requirement[data-result="Y"] { box-shadow: inset 3px 0 var(--green); }
.requirement[data-result="N"] { background: #fffafa; box-shadow: inset 3px 0 var(--red); }
.requirement-copy { display: flex; align-items: flex-start; gap: 14px; }
.item-number { flex: 0 0 auto; margin-top: 2px; color: #7c8598; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.requirement-copy p { margin: 0; font-size: 14px; }
.choices { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.choices label { margin: 0; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { margin: 0; padding: 9px 6px; color: #4c5568; background: #f5f7fb; border: 1px solid #d7deea; border-radius: 9px; font-size: 12px; font-weight: 800; text-align: center; cursor: pointer; transition: .15s; }
.choices input:focus-visible + span { outline: 3px solid rgba(20,86,184,.2); }
.choices input[value="Y"]:checked + span { color: white; background: var(--green); border-color: var(--green); }
.choices input[value="N"]:checked + span { color: white; background: var(--red); border-color: var(--red); }
.choices input[value="NA"]:checked + span { color: #3c4658; background: #dfe4ee; border-color: #c7cede; }
.observation { grid-column: 1 / -1; margin-left: 39px; }
.observation textarea { background: white; border-color: #d69a93; }

.signoff-card { margin-top: 28px; }
.signoff-card > label { display: block; }
.signoff-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1.4fr; align-items: end; gap: 22px; }
.confirmation { min-height: 48px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; background: var(--sand); border-radius: 10px; cursor: pointer; }
.confirmation input { width: 18px; height: 18px; accent-color: var(--navy); }
.confirmation span { margin: 0; font-size: 12px; }
.submit-bar { position: sticky; z-index: 9; bottom: 16px; margin: 22px 0 50px; padding: 15px 18px 15px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: white; background: var(--navy); border: 1px solid rgba(255,255,255,.08); border-radius: 15px; box-shadow: 0 12px 40px rgba(10,31,143,.28); }
.submit-bar strong, .submit-bar span { display: block; }
.submit-bar span { color: rgba(255,255,255,.6); font-size: 11px; }
.button { min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.primary { color: white; background: var(--navy-2); }
.submit-bar .button.primary { color: var(--navy); background: white; }
.button.secondary { color: var(--navy); background: white; border-color: #c7d0e3; }
.button.ghost { color: var(--navy); background: transparent; border-color: #b7c2da; }
.button.ghost.danger { color: var(--red); border-color: #e0b8b3; }
.button.ghost.danger:hover { background: var(--red-soft); }
.button:hover { filter: brightness(.96); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.form-error, .notice { margin: 20px 0; padding: 14px 16px; border-radius: 10px; font-size: 13px; font-weight: 650; }
.form-error, .notice.danger { color: #7e261e; background: var(--red-soft); border: 1px solid #efc1bb; }
.success-panel { margin: 20px 0 50px; padding: 48px; min-height: 320px; background: white; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; gap: 26px; box-shadow: var(--shadow); }
.success-icon { flex: 0 0 auto; width: 70px; height: 70px; display: grid; place-items: center; color: white; background: var(--navy-2); border-radius: 50%; font-size: 34px; }
.success-panel h2 { margin-bottom: 10px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.success-panel p { color: var(--muted); }

.login-shell { min-height: calc(100vh - 190px); padding: 70px 0; display: grid; place-items: center; }
.login-card { width: min(460px, 100%); padding: 42px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.lock-mark { width: 48px; height: 48px; margin-bottom: 24px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 14px; font-size: 27px; }
.login-card h1 { margin-bottom: 10px; font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.login-card > p { margin-bottom: 26px; color: var(--muted); }
.login-card form { display: grid; gap: 18px; }
.full { width: 100%; }

.admin-hero { padding-bottom: 30px; }
.admin-hero h1 { font-size: clamp(38px, 5vw, 58px); }
.record-tabs { margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.record-tab { padding: 10px 16px; color: var(--navy); background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 750; text-decoration: none; }
.record-tab span { margin-left: 6px; padding: 1px 7px; color: var(--muted); background: var(--sand); border-radius: 20px; font-size: 11px; font-weight: 800; }
.record-tab.active { color: white; background: var(--navy); border-color: var(--navy); }
.record-tab.active span { color: white; background: rgba(255,255,255,.2); }

.chart-card { padding: 24px 26px; }
.chart-heading { margin-bottom: 12px; }
.chart-heading h2 { margin: 0 0 3px; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.chart-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-legend { margin-bottom: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; }
.chart-legend i.inspections { background: #2a78d6; }
.chart-legend i.near-miss { background: #eb6834; }
.chart-legend i.violations { background: #1baf7a; }
.chart-legend i.good-practices { background: #0e9488; }
.chart-legend i.inductions { background: #7c3aed; }
.chart-legend i.trainings { background: #c026d3; }
.chart-legend i.tbts { background: #f59e0b; }
.stats-period { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.stats-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stats-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stats-grid.cols-8 { grid-template-columns: repeat(4, 1fr); }
.stats-grid article { padding: 21px 23px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.stats-grid span, .stats-grid strong { display: block; }
.stats-grid span { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.stats-grid strong { font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.stats-grid strong.text { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.overview-grid { margin-bottom: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.overview-grid .card { margin-bottom: 0; padding: 24px 26px; }

.home-grid { margin: 8px 0 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.home-card { padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; color: inherit; background: white; border: 1px solid var(--line); border-top: 4px solid var(--accent, var(--navy)); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.home-card:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(10,31,143,.14); }
.home-card h2 { margin: 0; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.home-card p { margin: 0; color: var(--muted); font-size: 13px; flex-grow: 1; }
.home-card-arrow { color: var(--accent, var(--navy-2)); font-size: 13px; font-weight: 800; }
.home-card.inspection { --accent: #2a78d6; }
.home-card.near-miss { --accent: #eb6834; }
.home-card.violation { --accent: #ad3328; }
.home-card.ptw { --accent: #1baf7a; }
.home-card.training { --accent: #7c3aed; }
.home-card.good-practice { --accent: #0e9488; }
.home-card.records { --accent: var(--navy); }
.records-card { padding: 0; overflow: hidden; }
.filter-bar { padding: 22px; background: #f4f6fb; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(240px, 1fr) 160px 160px auto auto; align-items: end; gap: 12px; }
.filter-bar label > span { margin-bottom: 5px; }
.text-link { color: var(--navy-2); font-size: 13px; font-weight: 750; text-decoration: none; }
.filter-bar .text-link { align-self: center; padding-top: 20px; }
.records-actions { padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.records-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.records-actions > div { display: flex; gap: 8px; }
.training-import { padding: 14px 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.training-import label { font-size: 13px; font-weight: 650; }
.table-wrap { overflow-x: auto; }
.pagination { padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pagination span { color: var(--muted); font-size: 12px; font-weight: 650; }
.pagination-links { display: flex; gap: 8px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; color: #5c6578; background: #fbfcff; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 850; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { padding: 15px 14px; border-bottom: 1px solid #e6eaf2; font-size: 12px; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.score-pill, .result { display: inline-flex; padding: 4px 8px; color: var(--green); background: var(--green-soft); border-radius: 20px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.score-pill.medium { color: var(--amber); background: var(--amber-soft); }
.score-pill.low, .result-n { color: #8e2c23; background: var(--red-soft); }
.result-na { color: #56625d; background: #e5e9e6; }
.row-link { color: var(--navy-2); font-weight: 800; text-decoration: none; white-space: nowrap; }
.empty-state { padding: 50px; color: var(--muted); text-align: center; }

.record-toolbar { padding: 30px 0 14px; display: flex; align-items: center; justify-content: space-between; }
.record-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.delete-form { margin: 0; display: flex; gap: 8px; align-items: center; }
.delete-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; width: 140px; }

/* Daily OHS inspection sheet — mirrors the "1 Hotel Diriyah" printed checklist layout */
.doc-sheet { margin-bottom: 50px; padding: 20px 26px 30px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-family: "Times New Roman", Times, serif; color: #111; }
.doc-sheet table { width: 100%; border-collapse: collapse; }
.doc-sheet td, .doc-sheet th { border: 1px solid #000; padding: 4px 8px; font-size: 13px; vertical-align: middle; }

.doc-logos { margin-bottom: 0; }
.doc-logos td.logo-cell { height: 64px; text-align: center; vertical-align: middle; }
.doc-logos img { display: block; max-height: 40px; max-width: 90%; margin: 0 auto 3px; }
.doc-logos .logo-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .02em; }

.doc-letterhead { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #000; }
.doc-letterhead img { display: block; height: 30px; width: auto; }

.doc-classification { margin-top: 16px; padding-top: 6px; border-top: 1px solid #000; display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #555; }

.qr-poster-intro { margin: 14px 0; font-size: 14px; text-align: center; }
.qr-poster-grid { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.qr-card { padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 1px solid #000; border-radius: 8px; }
.qr-card .qr-code-image { width: 100%; max-width: 220px; height: auto; }
.qr-card h2 { margin: 4px 0 0; font-size: 16px; font-weight: 700; }
.qr-card p { margin: 0; font-size: 12px; color: #444; }

.doc-banner { padding: 10px 12px; color: white; background: #002060; border: 1px solid #000; border-top: none; font-size: 22px; font-weight: 700; letter-spacing: .03em; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

.doc-title { margin: 14px 0 10px; color: #1F3864; font-size: 16px; font-weight: 700; text-align: center; text-decoration: underline; }

.doc-info td.info-label, .doc-summary td.section-header, .doc-checklist tr.section-row td, .doc-footer td.info-label, .doc-noncompliance td.section-header {
  background: #DAE9F7; font-weight: 700; print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.doc-info td.info-label, .doc-footer td.info-label { background: #A5C9EB; width: 20%; white-space: nowrap; }
.doc-info td:not(.info-label), .doc-footer td:not(.info-label) { width: 30%; }
.doc-info td.info-label.tan, .doc-footer td.info-label.tan { background: #DDD9C3; }
.doc-info.stacked td { width: 100%; white-space: normal; }

.doc-band { margin: 14px 0 0; padding: 8px 12px; color: white; background: #002060; font-weight: 700; font-size: 14px; text-align: center; text-transform: uppercase; letter-spacing: .02em; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-band:first-child { margin-top: 0; }
.doc-checkbox-row { margin: 8px 0; padding: 4px 0; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.doc-checkbox.checked { font-weight: 700; }
.doc-note { margin: 8px 0; font-size: 13px; }
.doc-evidence { margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.doc-evidence img { width: 100%; height: 140px; object-fit: contain; background: #f4f4f4; display: block; border: 1px solid #000; }

/* Violation notice — mirrors the company's official "Occupational Health & Safety
   Violation Notice" Word template exactly: sans-serif body text, a plain
   centered/underlined title (no colored banner), bulleted section headings, and
   every field table carrying its own navy "Field / Details" header row. Scoped to
   .violation-notice so it doesn't touch the inspection or near-miss doc-sheets,
   which follow their own separate official templates. */
.doc-sheet.violation-notice { font-family: "Lato", "Segoe UI", Calibri, Arial, sans-serif; }
.doc-title-plain { margin: 14px 0 10px; color: #111; font-weight: 700; text-align: center; text-decoration: underline; }
.doc-heading { margin: 16px 0 4px 20px; color: #111; font-weight: 700; font-size: 13px; }
.doc-heading::before { content: "•"; margin-right: 8px; }
.doc-field-table { margin-left: 20px; width: calc(100% - 20px); }
.doc-field-table thead th { background: #002060; color: white; font-weight: 700; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-field-table td:first-child, .doc-field-table th:first-child { width: 27%; }
.doc-actions-table { margin-left: 20px; width: calc(100% - 20px); }
.doc-actions-table tr:first-child td { text-align: center; }
.doc-actions-table td.label { background: #002060; color: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-attachment-row { margin: 8px 0 8px 20px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.doc-evidence-table { margin-left: 20px; width: calc(100% - 20px); }
.doc-evidence-table thead th { background: #002060; color: white; font-weight: 700; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-evidence-table td { width: 50%; text-align: center; }
.doc-evidence-table img { width: 100%; height: 160px; object-fit: contain; background: #f4f4f4; display: block; }

/* Training / TBT / Induction record — mirrors a real filled-in TBT record: a small
   eyebrow label, a big topic heading, an optional objective subtitle, a shaded summary
   box, a bulleted "key lessons" list, then the record table, photos, and attendance
   sheet. Scoped to .training-record so it doesn't touch the other doc-sheets. */
.doc-eyebrow-label { margin: 14px 0 0; color: #008C95; font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.doc-topic-title { margin: 4px 0 0; color: #17365D; font-weight: 700; font-size: 20px; }
.doc-topic-subtitle { margin: 4px 0 0; color: #666; font-size: 13px; }
.doc-summary-box { margin: 12px 0 0; padding: 12px 14px; background: #EAF2F8; border: 1px solid #c3d8e8; border-radius: 6px; font-size: 13px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-lessons-list { margin: 6px 0 0; padding-left: 22px; font-size: 13px; }
.doc-lessons-list li { margin-bottom: 4px; }
.doc-record-table thead th { background: #1F4E78; color: white; font-weight: 700; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-record-table td { text-align: center; }

.doc-checklist thead th { background: #9DC3E6; font-weight: 700; text-align: left; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.doc-checklist thead th:last-child, .doc-checklist td.result-cell { text-align: center; width: 15%; }
.doc-checklist tr.section-row td { text-transform: uppercase; }

.doc-columns { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }

.result-cell { font-weight: 700; }
.result-cell.result-y { color: #1d5a2e; }
.result-cell.result-n { color: #a01515; }
.result-cell.result-na { color: #555; }

.doc-noncompliance, .doc-summary { margin-top: 14px; }
.doc-noncompliance td.nc-item { width: 65%; }

.doc-footer { margin-top: 14px; }


@media (max-width: 900px) {
  .field-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .search-field { grid-column: span 2; }
  .records-actions { align-items: flex-start; flex-direction: column; }
  .stats-grid.cols-4, .stats-grid.cols-5, .stats-grid.cols-6, .stats-grid.cols-8 { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  main { width: min(100% - 24px, 1180px); }
  .site-header { padding: 10px 14px; }
  .department-name { display: none; }
  .main-nav { width: 100%; gap: 6px; }
  .main-nav a { padding: 7px 9px; font-size: 12px; }
  .hero, .admin-hero { padding: 38px 2px 25px; align-items: stretch; flex-direction: column; gap: 20px; }
  .hero h1, .admin-hero h1 { font-size: 39px; }
  .hero p { font-size: 15px; }
  .hero-stat { min-width: 0; padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
  .hero-stat strong { font-size: 30px; }
  .hero-stat span { margin: 0; }
  .partner-logos { width: 100%; justify-content: space-between; gap: 12px; }
  .partner-logos img { max-width: 80px; max-height: 30px; }
  .card { padding: 20px; border-radius: 15px; }
  .section-heading { align-items: flex-start; }
  .section-heading > p { display: none; }
  .field-grid, .signoff-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .checklist-header { top: 0; margin-top: 24px; padding: 13px 15px; }
  .checklist-header h2 { font-size: 17px; }
  .progress-track { width: 90px; }
  .checklist-section summary { padding: 13px 12px; grid-template-columns: 28px 1fr auto 18px; }
  .section-name { font-size: 16px; }
  .requirement { padding: 16px 12px; grid-template-columns: 1fr; gap: 12px; }
  .observation { margin-left: 0; }
  .submit-bar { bottom: 8px; margin-bottom: 28px; padding: 12px; }
  .submit-bar span { display: none; }
  .submit-button { min-width: 165px; }
  .success-panel { padding: 28px 20px; align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .search-field { grid-column: auto; }
  .records-actions > div { width: 100%; flex-direction: column; }
  .doc-sheet { padding: 14px 10px 20px; }
  .doc-sheet td, .doc-sheet th { font-size: 11px; padding: 3px 5px; }
  .doc-logos { display: none; }
  .doc-banner { border-top: 1px solid #000; font-size: 17px; }
  .doc-columns { grid-template-columns: 1fr; }
  .qr-poster-grid { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body { background: white; color: black; font-size: 9pt; }
  .site-header, .no-print { display: none !important; }
  main { width: 100%; }
  .doc-sheet { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .doc-sheet * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .doc-sheet td, .doc-sheet th { padding: 2px 5px; font-size: 7.5pt; }
  .doc-title { font-size: 13pt; }
  .doc-banner, .doc-band { font-size: 11pt; }
  .doc-checkbox-row { font-size: 8.5pt; }
  .doc-letterhead img { height: 24px; }
  .doc-classification { font-size: 7pt; }
  .doc-checklist tr, .doc-noncompliance tr, .doc-summary tr, .doc-footer tr, .doc-info tr { break-inside: avoid; }
  .doc-evidence { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); break-inside: avoid; }
  .doc-evidence img { height: 190px; }
  .doc-title-plain { font-size: 13pt; }
  .doc-heading { font-size: 9pt; }
  .doc-attachment-row { font-size: 8.5pt; }
  .doc-field-table tr, .doc-actions-table tr, .doc-evidence-table tr { break-inside: avoid; }
  .doc-evidence-table img { height: 190px; }
  .doc-eyebrow-label { font-size: 8pt; }
  .doc-topic-title { font-size: 14pt; }
  .doc-topic-subtitle, .doc-summary-box, .doc-lessons-list { font-size: 9pt; }
  .doc-record-table tr { break-inside: avoid; }
  .qr-poster-grid { grid-template-columns: repeat(3, 1fr); }
  .qr-card { break-inside: avoid; padding: 16px 10px; }
  .qr-card .qr-code-image { max-width: 180px; }
}
