:root {
    --navy: #071d34; --navy-2: #0d2c49; --blue: #0879bd; --blue-light: #e8f5fc;
    --ink: #12283c; --muted: #637588; --line: #dce5ec; --surface: #fff;
    --background: #f3f7fa; --success: #167552; --danger: #b42318;
    --shadow: 0 12px 35px rgba(11, 38, 62, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: "Segoe UI", Inter, Arial, sans-serif; color: var(--ink); background: var(--background); }
body { min-width: 320px; } a { color: var(--blue); text-decoration: none; } button, input, textarea { font: inherit; }
h1, h2, p { margin-top: 0; } h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -.035em; margin-bottom: .65rem; }
h2 { font-size: 1.25rem; letter-spacing: -.015em; margin-bottom: .2rem; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; }
.sidebar { background: var(--navy); color: white; position: sticky; top: 0; height: 100vh; }
.main-area { min-width: 0; }
.topbar { height: 72px; padding: 0 36px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.topbar-identity { display: flex; align-items: center; gap: 14px; }
.topbar-logo-button { height: 46px; min-width: 126px; padding: 5px 9px; display: inline-flex; align-items: center; justify-content: center; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 5px 16px rgba(11,38,62,.08); }
.topbar-logo-button:hover { border-color: #a8cadd; box-shadow: 0 7px 20px rgba(11,38,62,.12); }
.topbar-logo-button img { display: block; width: 108px; height: auto; }
.topbar-title { display: flex; flex-direction: column; gap: 3px; }
.topbar-title .eyebrow { margin-bottom: 0; }
.topbar strong { font-size: .96rem; }
.account-chip { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; font-size: .78rem; color: var(--muted); background: white; }
.page-content { width: min(1180px, 100%); margin: 0 auto; padding: 40px 36px 72px; }
.eyebrow { display: block; color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .16em; margin-bottom: 9px; } .eyebrow.light { color: #8dd1f5; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; } .page-heading.compact { align-items: center; }
.page-heading p { color: var(--muted); max-width: 650px; margin-bottom: 0; line-height: 1.55; }
.back-link { display: block; width: fit-content; color: var(--muted); font-size: .8rem; margin-bottom: 22px; }
.draft-chip, .count-chip { align-self: flex-start; border: 1px solid #b9dced; background: var(--blue-light); color: #05689f; border-radius: 99px; padding: 9px 13px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.brand-row { min-height: 72px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { color: white; display: flex; align-items: center; gap: 12px; } .brand:hover { color: white; }
.brand-logo { width: 88px; height: auto; display: block; padding: 4px 6px; background: white; border-radius: 7px; box-shadow: 0 5px 18px rgba(0,0,0,.2); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; background: var(--blue); color: white; font-weight: 900; letter-spacing: -.05em; border-radius: 5px 14px 5px 14px; box-shadow: 0 5px 18px rgba(0,121,189,.28); }
.brand-mark.large { width: 58px; height: 58px; font-size: 1.3rem; border-radius: 8px 20px 8px 20px; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.1; } .brand small { font-size: .55rem; letter-spacing: .18em; color: #8fa9be; margin-top: 5px; }
.nav-toggle { display: none; } .nav-panel { height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: space-between; }
.nav-list { padding: 22px 13px; display: grid; gap: 5px; }
.nav-link { min-height: 48px; padding: 0 13px; border-radius: 9px; display: flex; align-items: center; gap: 11px; color: #b8c9d6; font-size: .88rem; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.1); } .nav-link.active { box-shadow: inset 3px 0 0 var(--blue); }
.nav-link.disabled { opacity: .58; cursor: default; } .nav-link small { margin-left: auto; font-size: .48rem; color: #70bfe9; letter-spacing: .1em; }
.nav-glyph { width: 22px; color: #7fc9ef; font-size: 1.05rem; text-align: center; }
.nav-account { margin: 14px; padding: 15px; border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 36px 1fr; gap: 3px 10px; align-items: center; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-weight: 800; grid-row: span 2; }
.account-name { font-size: .72rem; color: #d8e3eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .signout { border: 0; padding: 0; background: transparent; color: #7f9bad; font-size: .68rem; cursor: pointer; }
.button { min-height: 46px; border-radius: 8px; padding: 0 18px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 16px; font-size: .83rem; font-weight: 750; cursor: pointer; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 8px 22px rgba(8,121,189,.2); } .button.primary:hover { background: #066ca9; color: white; }
.button.secondary { background: white; color: var(--ink); border-color: var(--line); } .button:disabled { opacity: .6; cursor: wait; }
.button.secondary:hover { border-color: #a8cadd; color: var(--blue); background: #f8fbfd; }
.button.destructive-secondary { background: white; color: var(--danger); border-color: #d92d20; box-shadow: none; }
.button.destructive-secondary:hover, .button.destructive-secondary:focus-visible { background: var(--danger); color: white; border-color: var(--danger); }
.button.destructive { background: var(--danger); color: white; border-color: var(--danger); box-shadow: none; }
.button.destructive:hover, .button.destructive:focus-visible { background: #8f1c14; border-color: #8f1c14; color: white; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card { min-height: 138px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.metric-card.accent { background: var(--navy); border-color: var(--navy); color: white; } .metric-label { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .14em; }
.metric-card.accent .metric-label { color: #8eb0c7; } .metric-card > strong { font-size: 2rem; margin-top: auto; line-height: 1; } .metric-card small { margin-top: 8px; color: var(--muted); }
.metric-card.accent small { color: #9bb3c4; } .metric-card .status-word { color: var(--success); font-size: 1.45rem; }
.content-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
.panel, .form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.panel-heading { min-height: 83px; padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-heading .eyebrow { margin-bottom: 5px; } .panel-heading h2 { margin: 0; } .panel-heading > a { font-size: .75rem; font-weight: 700; }
.action-row { padding: 18px 21px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
.action-row:last-child { border-bottom: 0; } .action-row:hover:not(.muted) { background: #f8fbfd; }
.action-row > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .action-row small { color: var(--muted); line-height: 1.4; }
.action-icon { width: 42px; height: 42px; display: grid; place-items: center; color: white; border-radius: 9px; font-size: .72rem; font-weight: 850; }
.action-icon.blue { background: var(--blue); } .action-icon.navy { background: var(--navy-2); } .arrow { color: var(--blue); font-size: 1.25rem; } .tag { font-size: .55rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.empty-state { min-height: 210px; padding: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #e9f7f1; color: var(--success); font-weight: 900; margin-bottom: 13px; }
.empty-state strong { color: var(--ink); } .empty-state p { margin: 7px 0 17px; }
.submission-row, .submission-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.submission-row > span:nth-child(2), .submission-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .submission-row small, .submission-main span, .submission-main small { color: var(--muted); }
.date-tile { width: 45px; height: 49px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.date-tile strong { font-size: 1.15rem; } .date-tile small { font-size: .55rem; margin-top: 5px; color: var(--blue); font-weight: 800; }
.status-pill { border-radius: 99px; padding: 6px 9px; background: #e9f7f1; color: var(--success); font-size: .62rem; font-weight: 800; }
.submissions-panel { overflow: hidden; } .submission-card { grid-template-columns: 48px minmax(0, 1fr) auto minmax(132px, auto); padding: 19px 22px; }
.success-banner { margin-bottom: 20px; padding: 17px 20px; border: 1px solid #9bd5bd; background: #f0faf6; color: #0e6043; border-radius: 11px; display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; }
.success-banner > span { width: 36px; height: 36px; border-radius: 50%; background: var(--success); color: white; display: grid; place-items: center; font-weight: 900; }
.success-banner p { margin: 4px 0 0; font-size: .8rem; } .success-banner a { font-size: .75rem; font-weight: 750; }
.validation-summary { border: 1px solid #f3aaa5; background: #fff3f2; color: var(--danger); border-radius: 9px; padding: 13px 17px; margin-bottom: 18px; } .validation-summary:empty { display: none; }
.required-note { margin: -10px 0 14px; color: var(--muted); font-size: .7rem; text-align: right; }
.required-note > span, .required-indicator { color: var(--danger); font-weight: 850; }
.required-indicator { margin-left: 2px; }
.form-input.required-incomplete { border-color: #d92d20; background: #fff4f3; }
.form-input.required-incomplete:hover { border-color: #c52218; }
.form-input.required-incomplete:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(8,121,189,.18); }
.confirmation:has(input.required-incomplete) { border-color: #d92d20; background: #fff4f3; }
.confirmation:has(input.required-incomplete):focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,121,189,.18); }
.validation-attention { margin-bottom: 18px; padding: 15px 17px; border: 1px solid #d92d20; border-radius: 9px; background: #fff4f3; color: var(--danger); display: grid; gap: 4px; }
.validation-attention > span { font-size: .76rem; }
.validation-attention .validation-summary { margin: 5px 0 0; padding: 10px 0 0 19px; border: 0; border-top: 1px solid #f3aaa5; border-radius: 0; background: transparent; }
.form-card { margin-bottom: 17px; overflow: hidden; } .form-card > header { padding: 20px 23px; border-bottom: 1px solid var(--line); display: flex; gap: 15px; align-items: center; }
.form-card.personnel-overlay-card { overflow: hidden; }
.form-card.project-information-card { position: relative; z-index: 30; overflow: visible; }
.form-card.project-information-card > header { border-radius: 13px 13px 0 0; }
.form-card.crew-review-card > header { border-radius: 13px 13px 0 0; }
.form-card header p { color: var(--muted); font-size: .79rem; margin: 4px 0 0; }
.section-number { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--navy); color: #83d1f7; font-size: .7rem; font-weight: 850; }
.form-grid, .form-stack, .check-grid { padding: 23px; } .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; } .form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid .span-2 { grid-column: span 2; } .form-stack { display: grid; gap: 18px; } .two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
label > span:first-child { display: block; margin-bottom: 7px; color: #344b5e; font-size: .72rem; font-weight: 750; }
.form-input { width: 100%; min-height: 45px; border: 1px solid #cbd8e1; border-radius: 7px; padding: 10px 12px; background: #fbfdfe; color: var(--ink); transition: .15s ease; }
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,121,189,.12); background: white; } .textarea { min-height: 100px; resize: vertical; line-height: 1.5; } .textarea.tall { min-height: 145px; }
.readonly-input { background: #eef3f6; color: #526878; cursor: not-allowed; }
.search-field { position: relative; }
.lookup-status { display: block; min-height: 17px; margin-top: 5px; color: var(--muted); font-size: .67rem; }
.lookup-status[data-state="loading"] { color: var(--blue); }
.lookup-status[data-state="success"] { color: var(--success); }
.lookup-status[data-state="error"], .lookup-status[data-state="empty"] { color: var(--danger); }
.project-search-results { position: absolute; z-index: 100; top: 64px; left: 0; right: 0; width: 100%; max-height: 330px; }
.project-search-results, .employee-search-results { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px; border: 1px solid #b9c8d8; border-radius: 8px; background: #fff; box-shadow: 0 15px 34px rgba(24, 47, 70, .24); }
.employee-search-results.autocomplete-portal { position: fixed; z-index: 2000; right: auto; margin: 0; max-height: 300px; }
.copy-previous-action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 2px 0 3px; }
.copy-previous-action[hidden] { display: none; }
.copy-previous-action .lookup-status { margin: 0; }
.submission-actions { display: grid; align-items: stretch; gap: 8px; min-width: 132px; }
.submission-actions .button { width: 100%; }
.detail-heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.submission-title { color: inherit; text-decoration: none; }
.submission-title:hover, .submission-title:focus-visible { text-decoration: underline; }
.compact-button { min-height: 34px; padding: 7px 11px; font-size: .78rem; }
.disabled-action { opacity: .52; cursor: not-allowed; pointer-events: none; box-shadow: none !important; }
.submission-delete-notice[hidden] { display: none; }
.success-banner.submission-action-error { border-color: #f2b8b5; background: #fff4f3; color: var(--danger); }
.success-banner.submission-action-error > span { background: var(--danger); }
.confirmation-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 14px; background: white; color: var(--ink); box-shadow: 0 28px 80px rgba(3, 20, 37, .34); }
.confirmation-dialog::backdrop { background: rgba(2, 16, 31, .68); }
.confirmation-dialog-content { padding: 27px; }
.confirmation-dialog-content h2 { margin-bottom: 20px; font-size: 1.45rem; }
.delete-submission-details { display: grid; gap: 0; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.delete-submission-details > div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 14px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.delete-submission-details > div:last-child { border-bottom: 0; }
.delete-submission-details dt { color: var(--muted); font-size: .72rem; font-weight: 750; }
.delete-submission-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 650; }
.delete-submission-warning { padding: 14px 15px; border: 1px solid #f2b8b5; border-radius: 9px; background: #fff4f3; color: #8f1c14; font-size: .82rem; line-height: 1.5; }
.delete-submission-error { color: var(--danger); font-size: .8rem; font-weight: 650; }
.delete-submission-error[hidden] { display: none; }
.confirmation-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.project-search-option, .employee-search-option { display: flex; width: 100%; flex-direction: column; gap: 2px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.project-search-option:hover, .project-search-option:focus, .project-search-option.active, .employee-search-option:hover, .employee-search-option:focus, .employee-search-option.active { background: #eaf3fb; outline: 2px solid transparent; }
.project-search-option.active, .employee-search-option.active { box-shadow: inset 3px 0 0 var(--blue); }
.project-search-option strong, .employee-search-option strong { font-size: .84rem; }
.project-search-option small, .employee-search-option small { color: var(--muted); font-size: .7rem; }
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .check-grid label { min-height: 47px; border: 1px solid var(--line); border-radius: 8px; padding: 0 13px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-grid label:hover { border-color: #a8cadd; background: #f7fbfd; } .check-grid input, .confirmation input { width: 18px; height: 18px; accent-color: var(--blue); } .check-grid label > span { margin: 0; font-size: .76rem; }
.confirmation { padding: 17px; display: flex; gap: 13px; align-items: flex-start; border: 1px solid #afd5e9; border-radius: 9px; background: var(--blue-light); cursor: pointer; }
.confirmation > span { margin: 0 !important; display: flex !important; flex-direction: column; gap: 5px; } .confirmation small { color: var(--muted); font-weight: 400; line-height: 1.45; }
.form-actions { display: flex; justify-content: flex-end; gap: 11px; padding-top: 4px; }
.empty-layout { min-height: 100vh; }
.login-page { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr); position: relative; isolation: isolate; overflow: hidden; background: #031020 url('/images/branding/nb-teams-watermark.png') center / cover no-repeat; }
.login-page::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(1, 10, 24, .3) 0%, rgba(1, 10, 24, .16) 52%, rgba(1, 10, 24, .56) 100%); }
.login-brand { color: white; padding: clamp(42px, 5.5vw, 88px); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.login-message { max-width: 790px; margin: auto 0 clamp(30px, 7vh, 72px); }
.login-brand h1 { color: #fff; font-size: clamp(3.15rem, 5.4vw, 5.65rem); line-height: .99; letter-spacing: -.055em; max-width: 790px; margin: 0 0 28px; text-wrap: balance; text-shadow: 0 3px 28px rgba(0, 0, 0, .28); }
.login-brand p { max-width: 650px; color: #d2dfeb; font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.7; margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.login-card { align-self: center; margin: clamp(24px, 4vw, 62px); margin-left: 0; padding: clamp(32px, 4.5vw, 62px); border: 1px solid rgba(255, 255, 255, .52); border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 28px 80px rgba(0, 8, 23, .4); display: flex; flex-direction: column; justify-content: center; backdrop-filter: blur(12px); } .login-card h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 13px; }
.login-card > div > p { color: var(--muted); line-height: 1.55; margin-bottom: 30px; }
.google-button { width: 100%; min-height: 54px; border: 1px solid #b9c8d3; border-radius: 8px; background: white; color: var(--ink); font-weight: 750; display: flex; align-items: center; justify-content: center; gap: 13px; cursor: pointer; }
.google-button:hover { border-color: var(--blue); background: #f7fbfd; } .google-g { font-size: 1.15rem; font-weight: 900; color: #4285f4; }
.login-help { margin: 18px 0 30px; padding: 12px 14px; border-radius: 7px; background: var(--blue-light); color: #3e6379; font-size: .74rem; text-align: center; }
.login-card footer { border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: .72rem; text-align: center; }
.setup-notice { border: 1px solid #f0c36d; background: #fff8e7; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 6px; color: #76520b; } .setup-notice span { font-size: .78rem; line-height: 1.4; }
.login-processing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; background: var(--background); } .login-processing .brand-mark { margin-bottom: 25px; } .login-processing p { color: var(--muted); }
#blazor-error-ui { color-scheme: light only; background: #fff4cf; bottom: 0; box-shadow: 0 -2px 8px rgba(0,0,0,.15); display: none; left: 0; padding: .8rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
.validation-message { color: var(--danger); font-size: .68rem; margin-top: 5px; } .invalid { border-color: #d92d20 !important; }
label:has(.validation-message) > .form-input, label:has(.validation-message) .search-field > .form-input { border-color: #d92d20; background: #fffafa; }
.submission-error { margin-bottom: 20px; padding: 16px 18px; border: 1px solid #f0a29c; background: #fff3f2; color: var(--danger); border-radius: 10px; display: grid; gap: 4px; }
.submission-error span { font-size: .82rem; }
.hazard-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 23px; }
.check-group { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.check-group legend { float: none; width: auto; margin: 0 0 10px; padding: 0; color: var(--blue); font-size: .63rem; font-weight: 850; letter-spacing: .08em; }
.check-option { min-height: 35px; display: flex; align-items: center; gap: 8px; color: #344b5e; font-size: .74rem; cursor: pointer; }
.check-option input, .compact-checks input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--blue); }
.ppe-emergency-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; padding: 23px; }
.ppe-emergency-grid h3 { margin: 0 0 12px; color: var(--blue); font-size: .78rem; letter-spacing: .04em; }
.compact-checks { padding: 0; grid-template-columns: repeat(2, 1fr); }
.emergency-fields { display: grid; align-content: start; gap: 13px; }
.repeat-section { padding: 23px; display: grid; gap: 15px; }
.repeat-section.compact-repeat { padding: 22px 0 0; }
.repeat-heading, .row-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.repeat-heading h3 { margin: 0; }
.task-row, .staff-row { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.task-row + .task-row, .staff-row + .staff-row { margin-top: 13px; }
.row-title { margin-bottom: 14px; color: var(--navy); }
.task-grid { display: grid; grid-template-columns: 1.2fr 1.2fr .55fr 1.7fr 1fr; gap: 12px; align-items: start; }
.task-grid .textarea { min-height: 82px; }
.staff-grid { display: grid; grid-template-columns: 1.5fr 1.5fr .7fr; gap: 12px; }
.remove-row { padding: 5px 8px; border: 0; background: transparent; color: var(--danger); font-size: .68rem; font-weight: 750; cursor: pointer; }
.add-row, .button.small { width: fit-content; min-height: 39px; padding: 0 13px; }
.ppe-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin-top: 9px; }
.ppe-row .remove-row { min-height: 45px; }
.detail-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 23px; }
.detail-item { display: grid; gap: 4px; }
.detail-item span { color: var(--muted); font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.detail-table-wrap { overflow-x: auto; padding: 0 23px 23px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: .77rem; }
.detail-table th, .detail-table td { padding: 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.detail-table th { background: #edf5fa; color: #34536a; font-size: .65rem; letter-spacing: .04em; }
.selected-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 23px 23px; }
.selected-item { padding: 7px 10px; border-radius: 99px; background: var(--blue-light); color: #05689f; font-size: .7rem; font-weight: 700; }
.confirmation-line { margin: 0 23px 23px; padding: 13px 15px; border-radius: 8px; background: #e9f7f1; color: var(--success); font-weight: 750; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.inspection-table-wrap { padding: 20px 23px 23px; }
.inspection-table { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(245px, 1.2fr) minmax(200px, 1.25fr); gap: 14px; align-items: center; }
.inspection-table-header { padding: 0 12px 10px; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.inspection-row { min-width: 0; margin: 0; padding: 11px 12px; border: 0; border-top: 1px solid var(--line); }
.inspection-row legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.inspection-item-name { font-size: .8rem; font-weight: 750; color: var(--ink); }
.result-options { display: flex; flex-wrap: wrap; gap: 7px; }
.result-options label { cursor: pointer; }
.result-options input { position: absolute; opacity: 0; pointer-events: none; }
.result-options label > span { min-width: 66px; min-height: 38px; margin: 0; display: grid; place-items: center; border: 1px solid #cbd8e1; border-radius: 7px; background: #fbfdfe; color: #526878; font-size: .7rem; font-weight: 800; }
.result-options input:checked + span { border-color: var(--blue); background: var(--blue); color: white; box-shadow: 0 0 0 3px rgba(8,121,189,.1); }
.result-options input:focus-visible + span { outline: 3px solid rgba(8,121,189,.22); outline-offset: 2px; }
.inspection-comment .form-input { min-height: 40px; }
.deficiency-row { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.deficiency-row + .deficiency-row { margin-top: 13px; }
.deficiency-grid { display: grid; grid-template-columns: 1fr 1fr minmax(170px, .55fr); gap: 13px; align-items: stretch; }
.deficiency-grid .textarea { min-height: 90px; }
.action-required-option { min-height: 90px; padding: 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #e8bd75; border-radius: 8px; background: #fff9ed; cursor: pointer; }
.action-required-option input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: #b86b00; }
.action-required-option > span { margin: 0 !important; display: flex !important; flex-direction: column; gap: 4px; }
.action-required-option small { color: #7b633b; font-size: .67rem; font-weight: 400; }
.status-pill.action-required { background: #fff1db; color: #9a5900; }
.success-banner.warning { border-color: #e8bd75; background: #fff9ed; color: #7b4a05; }
.success-banner.warning > span { background: #b86b00; }
.result-pill { display: inline-flex; min-width: 54px; justify-content: center; padding: 5px 8px; border-radius: 99px; font-size: .62rem; font-weight: 850; }
.result-pill.pass { background: #e9f7f1; color: var(--success); }
.result-pill.fail { background: #fff0ef; color: var(--danger); }
.result-pill.na { background: #eef3f6; color: var(--muted); }
.empty-state.compact { min-height: 145px; }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; } .sidebar { height: auto; position: sticky; z-index: 20; } .brand-row { min-height: 64px; justify-content: space-between; }
    .nav-toggle { display: block; appearance: none; width: 40px; height: 34px; border: 1px solid rgba(255,255,255,.2); border-radius: 7px; background: linear-gradient(white,white) center 10px/19px 2px no-repeat, linear-gradient(white,white) center 16px/19px 2px no-repeat, linear-gradient(white,white) center 22px/19px 2px no-repeat; cursor: pointer; }
    .nav-panel { display: none; height: auto; } .nav-toggle:checked { background-color: rgba(255,255,255,.12); }
    .brand-row:has(.nav-toggle:checked) + .nav-panel { display: block; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); box-shadow: 0 20px 35px rgba(0,0,0,.28); }
    .nav-account { margin-top: 0; } .topbar { display: none; } .page-content { padding: 28px 20px 56px; } .content-grid { grid-template-columns: 1fr; }
    .check-grid { grid-template-columns: repeat(2, 1fr); } .hazard-groups { grid-template-columns: repeat(2, 1fr); } .task-grid { grid-template-columns: 1fr 1fr; } .ppe-emergency-grid, .deficiency-grid { grid-template-columns: 1fr; } .inspection-table { grid-template-columns: 145px 1fr; } .inspection-table-header { display: none; } .inspection-comment { grid-column: 1 / -1; }
    .login-page { grid-template-columns: 1fr; overflow-y: auto; background-position: 42% center; }
    .login-page::before { background: linear-gradient(180deg, rgba(1, 10, 24, .14) 0%, rgba(1, 10, 24, .28) 50%, rgba(1, 10, 24, .52) 100%); }
    .login-brand { min-height: 56vh; padding: 36px clamp(26px, 7vw, 58px) 25px; }
    .login-message { margin: auto 0 0; }
    .login-brand h1 { font-size: clamp(2.75rem, 8vw, 4.6rem); max-width: 680px; }
    .login-brand p { max-width: 590px; }
    .login-card { width: auto; min-height: 0; margin: 0 clamp(20px, 6vw, 58px) 42px; padding: clamp(28px, 7vw, 48px); }
}
@media (max-width: 640px) {
    h1 { font-size: 2rem; } .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 23px; } .page-heading .button, .page-actions { width: 100%; } .page-actions { display: grid; }
    .metric-grid { grid-template-columns: 1fr 1fr; } .metric-card { min-height: 118px; padding: 18px; } .metric-card:nth-child(3) { grid-column: span 2; }
    .form-grid, .form-grid.two, .two-column, .task-grid, .staff-grid, .detail-list { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } .form-grid, .form-stack, .check-grid { padding: 18px; }
    .form-card > header { padding: 18px; align-items: flex-start; } .check-grid { grid-template-columns: 1fr 1fr; }
    .hazard-groups { grid-template-columns: 1fr; padding: 18px; } .ppe-emergency-grid, .repeat-section { padding: 18px; } .compact-checks { padding: 0; } .inspection-table-wrap { padding: 10px 18px 18px; } .inspection-table { grid-template-columns: 1fr; gap: 9px; } .inspection-comment { grid-column: auto; } .inspection-row { padding: 15px 0; } .inspection-item-name { font-size: .88rem; } .result-options label { flex: 1; } .result-options label > span { min-width: 0; } .form-actions { display: grid; grid-template-columns: 1fr 1.4fr; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--background) 18%); }
    .submission-row { grid-template-columns: 43px 1fr; } .submission-row .status-pill { display: none; } .submission-card { grid-template-columns: 43px minmax(0, 1fr); } .submission-card .status-pill { grid-column: 2; justify-self: start; } .submission-card .submission-actions { grid-column: 1 / -1; width: 100%; }
    .confirmation-dialog-content { padding: 22px 18px; } .delete-submission-details > div { grid-template-columns: 1fr; gap: 4px; } .confirmation-dialog-actions { display: grid; grid-template-columns: 1fr; } .confirmation-dialog-actions .button { width: 100%; }
    .success-banner { grid-template-columns: 35px 1fr; } .success-banner a { grid-column: 2; }
    .login-page { background-position: 39% center; }
    .login-brand { min-height: 53vh; padding: 24px 22px 20px; }
    .login-message { margin-top: auto; }
    .login-brand h1 { font-size: clamp(2.35rem, 12vw, 3.45rem); line-height: 1.02; margin-bottom: 19px; }
    .login-brand p { font-size: .94rem; line-height: 1.55; }
    .login-card { margin: 0 16px 28px; padding: 30px 22px; border-radius: 14px; }
    .project-search-results { max-height: min(320px, 45vh); }
}
.void-reason-label { display: block; font-weight: 600; margin: 12px 0 6px; }
.void-reason-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; resize: vertical; }
.void-banner { margin-bottom: 20px; padding: 15px 20px; border: 1px solid #f2b8b5; background: #fff4f3; color: var(--danger); border-radius: 11px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eaecf0; vertical-align: middle; }
.data-table th { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: #667085; }
.checkbox-row { display: flex; gap: 10px; align-items: center; }
@media (max-width: 640px) { .data-table thead { display: none; } .data-table td { display: block; border: 0; padding: 4px 0; } .data-table tr { display: block; padding: 10px 0; border-bottom: 1px solid #eaecf0; } }

/* Toolbox Talk and Project Incident forms (NB-SAF-002 / NB-SAF-003) */
.detail-list.narrative { grid-template-columns: 1fr; }
.detail-list.narrative strong { white-space: pre-wrap; font-weight: 550; line-height: 1.5; }
.attendee-grid { padding: 0; gap: 14px; }
.visitors-field { display: grid; gap: 7px; margin-top: 18px; } .visitors-field > span { font-size: .74rem; font-weight: 700; }
.injury-notice { margin: 0 23px 23px; padding: 14px 16px; border: 1px solid #e8bd75; border-left: 4px solid #b86b00; background: #fff9ed; color: #7b4a05; border-radius: 9px; font-size: .82rem; line-height: 1.5; }
.injury-notice a { color: #7b4a05; font-weight: 800; } .injury-notice[hidden] { display: none; }
.check-grid.factor-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .check-grid.factor-grid { grid-template-columns: 1fr; } }
.form-grid.single { grid-template-columns: 1fr; }
.check-grid.flag-checks { padding: 0 23px 23px; grid-template-columns: repeat(2, 1fr); }
.check-grid.factor-grid + .form-grid.single { padding-top: 0; }
@media (max-width: 760px) { .check-grid.flag-checks { grid-template-columns: 1fr; padding: 0 18px 18px; } }
.form-grid[hidden] { display: none; }
.form-card > header + .check-grid.flag-checks { padding-top: 23px; }
/* Project management (Projects pages and the dashboard panel). Phone first: cards, not tables; large tap targets. */
.project-management-panel { margin-bottom: 18px; }
.stage-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.stage-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--ink); font-size: .8rem; font-weight: 750; }
.stage-tab:hover { border-color: #a8cadd; color: var(--blue); }
.stage-tab.active { background: var(--navy); border-color: var(--navy); color: white; }
.stage-count { min-width: 24px; padding: 2px 7px; border-radius: 99px; background: var(--blue-light); color: #05689f; font-size: .68rem; text-align: center; }
.stage-tab.active .stage-count { background: rgba(255,255,255,.16); color: white; }
.project-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 10px; }
.project-filter-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--ink); font-size: .76rem; font-weight: 700; }
.filter-chip.on { background: var(--blue-light); border-color: #b9dced; color: #05689f; }
.muted-note { color: var(--muted); font-size: .72rem; }
.project-card { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.project-card:last-child { border-bottom: 0; }
.project-card:hover { background: #f8fbfd; color: var(--ink); }
.project-number { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; font-weight: 850; color: var(--navy-2); font-variant-numeric: tabular-nums; }
.project-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project-main strong { overflow-wrap: anywhere; }
.project-main small { color: var(--muted); line-height: 1.4; }
.project-team-line { color: #44607a !important; }
.status-pill.stage-tender { background: var(--blue-light); color: #05689f; }
.status-pill.stage-unsuccessful { background: #f2f4f7; color: #475467; }
.status-pill.stage-completed { background: #eef2f6; color: var(--navy-2); }
.project-problems { margin-top: 18px; padding: 16px 20px; }
.project-problems summary { cursor: pointer; font-weight: 750; color: #9a5900; }
.project-problems ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .project-card { grid-template-columns: 64px minmax(0, 1fr); padding: 14px 16px; }
    .project-card .status-pill { grid-column: 2; justify-self: start; }
    .project-filter { grid-template-columns: 1fr; }
    .project-filter .button { width: 100%; }
}
.no-pm-note { color: #9a5900 !important; font-weight: 700; }
.card-header-with-action > div { flex: 1 1 auto; min-width: 0; }
.card-header-with-action > .button { flex: 0 0 auto; }
@media (max-width: 640px) {
    .no-pm-banner .button { grid-column: 1 / -1; width: 100%; }
    .card-header-with-action { flex-wrap: wrap; }
    .card-header-with-action > .button { width: 100%; }
}
/* Project cards with their own buttons, and the project folder list. */
.project-card { grid-template-columns: minmax(0, 1fr) auto; }
.project-card:hover { background: transparent; }
.project-card-link { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; color: var(--ink); }
.project-card-link:hover { color: var(--blue); }
.project-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.no-pm-banner .button { font-size: .83rem; }
.folder-list { display: grid; }
.folder-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 23px; border-bottom: 1px solid var(--line); }
.folder-text { display: grid; gap: 4px; min-width: 0; }
.folder-text span { color: var(--muted); font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.folder-text strong { font-weight: 550; overflow-wrap: anywhere; }
.folder-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.folder-help { padding: 14px 23px 18px; color: var(--muted); font-size: .8rem; }
.folder-help summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.folder-help p { margin: 10px 0 0; line-height: 1.5; }
/* Phones and tablets have no Windows Explorer. */
@media (hover: none) and (pointer: coarse) { .explorer-link, .folder-help { display: none; } }
@media (max-width: 640px) {
    .project-card { grid-template-columns: 1fr; gap: 10px; }
    .project-card-link { grid-template-columns: 64px minmax(0, 1fr); }
    .project-card-actions { justify-content: flex-start; padding-left: 78px; }
    .folder-row { grid-template-columns: 1fr; padding: 14px 18px; }
    .folder-actions { justify-content: flex-start; }
}
/* Dashboard: compact project management strip. */
.pm-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; margin-bottom: 18px; }
.pm-strip .eyebrow { margin: 0; }
.pm-strip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-form-actions { margin-bottom: 30px; }
/* Version in the menu. */
.app-version { padding: 14px 22px 18px; color: rgba(255,255,255,.45); font-size: .68rem; letter-spacing: .04em; }
/* Reviews: dashboard panel and /reviews page. */
.review-panel { margin-bottom: 18px; }
.review-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 21px; border-bottom: 1px solid var(--line); color: var(--ink); }
.review-row:last-child { border-bottom: 0; }
.review-row:hover { background: #f8fbfd; color: var(--ink); }
.review-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-row-main small, .review-main small { color: var(--muted); overflow-wrap: anywhere; }
.review-type { font-size: .6rem; font-weight: 850; letter-spacing: .1em; color: #05689f; }
.urgent .review-type { color: var(--danger); }
.review-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 21px; border-bottom: 1px solid var(--line); }
.review-card:last-child { border-bottom: 0; }
.review-card.urgent { box-shadow: inset 4px 0 0 var(--danger); }
.review-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.review-reason { font-weight: 700; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) {
    .review-row { grid-template-columns: minmax(0, 1fr) auto; }
    .review-row .review-type { grid-column: 1 / -1; }
    .review-card { grid-template-columns: 1fr; }
    .review-actions { justify-content: flex-start; }
}
/* Project actions and Move to Completed progress. */
.project-actions-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 23px; }
.project-actions-note { padding: 0 23px 18px; margin: 0; }
.action-plan { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.action-plan strong { overflow-wrap: anywhere; font-weight: 600; }
.job-progress { width: 100%; height: 14px; }
.job-warnings { margin: 8px 0 0; padding-left: 18px; font-size: .8rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .project-actions-grid .button { width: 100%; } }
/* "Working…" buttons and Explorer setup help. */
.button.is-busy { opacity: .75; cursor: progress; }
.explorer-help { flex-basis: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid #e8bd75; background: #fff9ed; color: #7b4a05; border-radius: 9px; font-size: .78rem; display: grid; gap: 8px; }
.explorer-help p { margin: 0; line-height: 1.45; }
.explorer-help strong { overflow-wrap: anywhere; font-weight: 600; }
.explorer-help .button { justify-self: start; }

/* Page "working" indicator: projects.js sets the width of the inner bar as the page loads */
.page-working { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .25s; }
.page-working.active { opacity: 1; }
.page-working > span { display: block; height: 100%; width: 0; background: #f2a900; box-shadow: 0 0 6px rgba(242, 169, 0, .7); transition: width .5s ease-out; }
.is-working, .button.is-busy { position: relative; cursor: progress; }
.is-working { opacity: .8; }
.is-working::after, .button.is-busy::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .5em; vertical-align: -0.12em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-working::after, .button.is-busy::after { animation-duration: 3s; } }
.error-page .empty-state > span { background: #fdecea; color: #b42318; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.loading-state .spinner { background: none; border: 3px solid #e3e7ec; border-top-color: #f2a900; border-radius: 50%; animation: button-spin .9s linear infinite; }
.job-bar { width: 100%; height: 16px; border-radius: 8px; background: #e9edf1; overflow: hidden; }
.job-bar > span { display: block; height: 100%; background: #f2a900; transition: width 1.5s ease-out; }
.job-percent { margin: 8px 0 0; }
.job-step-number { color: var(--muted); }
a.is-working:not(.button)::after { display: none; }
.job-bar.indeterminate { position: relative; }
.job-bar.indeterminate > span { position: absolute; top: 0; bottom: 0; width: 35%; left: -35%; animation: job-bar-slide 2.4s ease-in-out infinite; }
@keyframes job-bar-slide { from { left: -35%; } to { left: 100%; } }
form[hidden], .working-panel + form { display: none !important; }
