:root {
  --navy: #173c61;
  --navy-2: #0f2e4d;
  --blue-soft: #eaf1f7;
  --yellow: #f7c844;
  --ink: #1b2733;
  --muted: #687786;
  --line: #dce3e9;
  --surface: #ffffff;
  --canvas: #f2f5f7;
  --success: #2e7d5b;
  --danger: #b53c3c;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(20, 45, 69, .09);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mobile-only { display: none; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #eaf1f7 0, transparent 42%), #f6f8fa; }
.auth-card { width: min(460px, 100%); padding: 36px; border-radius: 22px; background: #fff; box-shadow: 0 20px 60px rgba(20,45,69,.12); border-top: 5px solid var(--yellow); }
.auth-logo { width: 210px; height: 58px; object-fit: contain; object-position: left center; margin-bottom: 24px; }
.auth-card h1 { margin: 4px 0 10px; font-size: 30px; }
.auth-card > p:not(.eyebrow) { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: 68px minmax(0, 1fr); }
.topbar { position: sticky; top: 0; z-index: 20; grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 8px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.brand-logo { width: 158px; height: 46px; object-fit: contain; object-position: left center; }
.brand-copy { display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid var(--line); }
.brand-copy strong { font-size: 15px; }
.brand-copy span { color: var(--success); font-size: 11px; }
.brand-copy i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.brand-copy span.offline { color: #bd7c00; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-pill { padding: 8px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-size: 13px; font-weight: 600; }

.sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; flex-direction: column; padding: 22px 14px; background: #24292c; color: #fff; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 0; border-radius: 10px; color: #dce8f2; background: transparent; text-align: left; }
.nav-item span { width: 22px; color: #9fb6ca; font-size: 18px; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: var(--yellow); color: #20272b; box-shadow: none; }
.nav-item.active span { color: #20272b; }
.sidebar-note { margin-top: auto; display: grid; gap: 6px; padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; color: #d8e2ea; }
.sidebar-note strong { font-size: 12px; color: var(--yellow); }
.sidebar-note span { font-size: 11px; line-height: 1.4; }

.workspace { min-width: 0; padding: 30px; }
.view { max-width: 1680px; margin: 0 auto; }
.page-heading, .report-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.page-heading h1, .report-toolbar h1 { margin: 3px 0 4px; font-size: 30px; letter-spacing: -.02em; }
.page-heading p:not(.eyebrow), .report-toolbar p:not(.eyebrow) { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: #6e7d8b; font-size: 10px; font-weight: 800; letter-spacing: .14em; }

button { border: 0; border-radius: 9px; padding: 10px 15px; font-weight: 700; transition: .16s ease; }
button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.primary { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(23,60,97,.18); }
.primary:hover { background: #204c76; }
.secondary { border: 1px solid #b8c7d4; background: #fff; color: var(--navy); }
.secondary:hover, .ghost:hover { background: var(--blue-soft); }
.ghost { background: transparent; color: var(--navy); }
.wide { width: 100%; margin-top: 4px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 22px; }
.link-button { padding: 6px 0; background: transparent; color: var(--navy); text-align: left; }

.stack-form { display: grid; gap: 16px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; gap: 6px; color: #4c5c6a; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd5dd; border-radius: 8px; outline: none; background: #fff; color: var(--ink); }
.field-help { color: var(--muted); font-size: 11px; font-weight: 500; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: #547a9d; box-shadow: 0 0 0 3px rgba(68,112,151,.12); }
.check-row { display: flex; align-items: center; gap: 9px; min-height: 36px; }
.check-row input { width: 17px; min-height: 17px; accent-color: var(--navy); }
.field-title { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: #4c5c6a; }
.hint { color: var(--muted); font-size: 11px; font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.form-actions .hint { margin-right: auto; }
.extra-effort-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #d8b239; border-left: 5px solid var(--yellow); border-radius: 10px; background: #fffaf0; }
.extra-effort-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.extra-effort-heading > div { display: grid; gap: 2px; }
.extra-effort-heading strong { color: var(--ink); font-size: 13px; }
.extra-effort-heading span { color: var(--muted); font-size: 11px; }
.extra-effort-heading .check-row { color: var(--ink); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.project-card { display: grid; gap: 17px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.project-card:hover { border-color: #9eb4c6; transform: translateY(-2px); }
.project-card header { display: flex; justify-content: space-between; gap: 12px; }
.project-card h2 { margin: 0; font-size: 17px; }
.project-card .number { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.project-card .project-status { align-self: flex-start; padding: 5px 8px; border-radius: 999px; background: #e5f3eb; color: var(--success); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.project-card .project-status.dormant { background: #fff2d6; color: #936000; }
.project-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.project-meta span { display: grid; gap: 3px; padding: 10px; border-radius: 8px; background: #f5f7f9; color: var(--muted); font-size: 10px; }
.project-meta strong { color: var(--ink); font-size: 13px; }
.project-client { color: var(--muted); font-size: 12px; }

.user-admin-layout { display: grid; grid-template-columns: minmax(640px, 1.5fr) minmax(320px, .7fr); gap: 18px; align-items: start; }
.user-list-panel, .assignment-panel { padding: 0; overflow: hidden; }
.user-list-panel > .panel-title, .assignment-panel > .panel-title { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: 42px minmax(210px, 1fr) minmax(150px, .65fr) auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .15s ease, box-shadow .15s ease; }
.user-row:last-child { border-bottom: 0; }
.user-row:hover, .user-row.selected { background: #f6f9fb; }
.user-row.selected { box-shadow: inset 4px 0 0 var(--yellow); }
.user-row.inactive { opacity: .62; }
.user-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); font-size: 17px; font-weight: 900; }
.user-copy, .user-role { display: grid; gap: 3px; min-width: 0; }
.user-copy strong, .user-copy span, .user-copy small, .user-role span, .user-role small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy span, .user-copy small, .user-role small { color: var(--muted); font-size: 11px; }
.user-role span { color: var(--navy); font-size: 12px; font-weight: 800; }
.account-state { padding: 5px 8px; border-radius: 999px; background: #eceff1; color: #6f7981; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.account-state.active { background: #e5f3eb; color: var(--success); }
.user-actions { display: flex; gap: 5px; }
.user-actions button { padding: 8px 10px; font-size: 11px; }
.assignment-empty { padding: 46px 22px; color: var(--muted); text-align: center; }
.assignment-panel form { padding: 18px 20px 20px; }
.assignment-panel .hint { margin: 4px 0 0; }
.assignment-projects { display: grid; gap: 7px; max-height: 54vh; overflow: auto; }
.assignment-project { display: grid; grid-template-columns: 19px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); cursor: pointer; }
.assignment-project:has(input:checked) { border-color: #d6ad2d; background: #fff9e8; }
.assignment-project input { width: 17px; min-height: 17px; accent-color: var(--navy); }
.assignment-project span { display: grid; gap: 2px; font-size: 12px; font-weight: 500; }
.assignment-project strong { color: var(--navy); font-size: 11px; }

.document-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.document-toolbar label { min-width: min(430px, 48vw); }
.document-toolbar > p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.document-legend { display: flex; gap: 16px; color: var(--muted); font-size: 11px; }
.document-legend span { display: flex; align-items: center; gap: 6px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #98a2aa; }
.status-dot.open { background: #c98912; }
.status-dot.in-progress { background: #2b6ca3; }
.status-dot.closed { background: var(--success); }
.document-list { display: grid; gap: 11px; }
.document-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 18px rgba(20,45,69,.045); }
.document-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; font-size: 21px; font-weight: 900; }
.document-icon.ncr { background: #fff0ea; color: #a44322; }
.document-icon.cost { background: #eaf3f9; color: var(--navy); }
.document-copy { min-width: 0; }
.document-title { display: flex; align-items: center; gap: 10px; }
.document-title h2 { margin: 0; font-size: 17px; }
.document-copy > p { margin: 7px 0 10px; color: #41505c; line-height: 1.45; white-space: pre-wrap; }
.document-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; color: var(--muted); font-size: 11px; }
.document-meta a { color: var(--navy); font-weight: 800; }
.ncr-photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.ncr-photo-strip a { display: block; overflow: hidden; width: 104px; height: 76px; border: 1px solid var(--line); border-radius: 9px; background: #edf1f3; }
.ncr-photo-strip img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.ncr-photo-strip a:hover img { transform: scale(1.04); }
.document-status { padding: 4px 7px; border-radius: 999px; background: #eceff1; color: #66717a; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.document-status.open, .document-status.draft { background: #fff2d7; color: #8d5b00; }
.document-status.in_progress, .document-status.issued { background: #e6eef9; color: #24558a; }
.document-status.closed { background: #e5f3eb; color: var(--success); }
.document-actions { display: grid; justify-items: end; gap: 8px; min-width: 150px; }
.document-actions select { min-width: 150px; }
.empty-state.compact { padding: 42px 20px; }
.dialog-help { margin: -8px 0 2px; color: var(--muted); font-size: 12px; }
.ncr-photo-fieldset { margin: 0; }
.ncr-photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.ncr-photo-actions > span { color: var(--muted); font-size: 11px; }
.camera-button { border-color: var(--navy); background: var(--navy); color: #fff; }
.ncr-photo-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 10px; margin-top: 12px; }
.ncr-photo-preview:empty { display: none; }
.ncr-photo-preview figure { position: relative; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 9px; background: #f0f3f5; }
.ncr-photo-preview img { display: block; width: 100%; height: 105px; object-fit: cover; }
.ncr-photo-preview figcaption { overflow: hidden; padding: 7px 8px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ncr-photo-preview button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 25px; min-height: 25px; padding: 0; border: 0; border-radius: 50%; background: rgba(24,35,44,.82); color: #fff; font-size: 17px; }
.contribution-picker { display: grid; gap: 7px; max-height: 300px; overflow: auto; padding: 4px; }
.contribution-choice { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; }
.contribution-choice:has(input:checked) { border-color: #d6ad2d; background: #fff9e8; }
.contribution-choice input { width: 17px; min-height: 17px; accent-color: var(--navy); }
.contribution-choice span { display: grid; gap: 3px; font-size: 11px; font-weight: 500; line-height: 1.4; }
.contribution-choice strong { color: var(--navy); font-size: 11px; }

.empty-state { display: grid; justify-items: center; padding: 70px 20px; border: 1px dashed #bac6cf; border-radius: var(--radius); background: rgba(255,255,255,.6); text-align: center; }
.empty-state h2 { margin: 12px 0 4px; }
.empty-state p { max-width: 430px; margin: 0 0 18px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--blue-soft); color: var(--navy); font-size: 30px; }

.toolbar-fields { display: flex; align-items: flex-end; gap: 10px; }
.toolbar-fields label { min-width: 190px; }
.toolbar-fields label:first-child { min-width: 300px; }
.report-view { max-width: none; }
.report-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.report-page-head h1 { margin: 5px 0 0; font-size: 28px; }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs b { padding: 0 7px; color: #a2adb6; }
.report-head-actions { display: flex; gap: 10px; }
.report-dark { border: 1px solid #24292c; background: #24292c; color: #fff; }
.report-selection-bar { align-items: center; margin: 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px 12px 0 0; background: #fff; }
.toolbar-report-state { display: grid; gap: 6px; min-width: 260px; padding-left: 18px; border-left: 1px solid var(--line); }
.toolbar-report-state > div { display: flex; align-items: center; gap: 10px; }
.toolbar-report-state strong { font-size: 12px; }
.report-layout { min-width: 0; }
.report-layout.review-mode { display: grid; grid-template-columns: minmax(620px, 1fr) 330px; gap: 0; align-items: stretch; min-height: calc(100vh - 250px); border: 1px solid var(--line); border-top: 0; }
.report-layout.review-mode .editor-column { display: none; }
.report-layout.edit-mode { display: block; max-width: 1120px; margin: 22px auto 0; }
.report-layout.edit-mode .preview-column, .report-layout.edit-mode .report-filter-panel { display: none; }
.mobile-capture-hub { max-width: 1120px; margin: 18px auto 0; }
.capture-back:not(.hidden) { display: inline-flex; }
.report-layout.edit-mode.mobile-section-open { margin-top: 8px; }
.report-layout.edit-mode.mobile-section-open .editor-column > .panel { display: none; }
.report-layout.edit-mode.mobile-section-open .editor-column > .mobile-capture-selected,
.report-layout.edit-mode.mobile-section-open .editor-column > .mobile-capture-selected-container { display: block; }
.report-layout.edit-mode.mobile-section-open .compact-sections > details { display: none; }
.report-layout.edit-mode.mobile-section-open .compact-sections > details.mobile-capture-selected { display: block; border: 0; }
.report-layout.edit-mode.mobile-section-open .compact-sections > details.mobile-capture-selected > summary { display: block; font-size: 20px; padding: 0 0 16px; }
.readable-overview { display: none; min-width: 0; }
.day-summary-heading { padding: 20px; border-left: 4px solid var(--navy); background: #e8f0f6; border-radius: 12px; }
.day-summary-heading h2 { font-size: 21px; line-height: 1.35; margin: 6px 0; overflow-wrap: anywhere; }
.day-summary-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.day-summary-card { padding: 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.day-summary-card h3 { margin: 0 0 12px; font-size: 18px; padding-bottom: 8px; border-bottom: 2px solid var(--yellow); }
.day-summary-card ul { margin: 0; padding-left: 20px; }
.day-summary-card li { padding: 6px 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.day-summary-card small { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.day-summary-description { white-space: pre-wrap; }
.day-summary-card strong + .day-summary-description { display: block; }
.day-summary-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.day-summary-photos figure { margin: 0; min-width: 0; }
.day-summary-photos img { width: 100%; height: 160px; object-fit: contain; background: #f4f6f8; border-radius: 8px; }
.day-summary-photos figcaption { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; margin-top: 6px; }
@media (max-width: 850px) {
  .capture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-layout.review-mode { display: block; border: 0; }
  .report-layout.review-mode .readable-overview { display: block; margin-bottom: 20px; }
  .report-layout.review-mode .preview-column { display: none; }
}
.capture-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 2px 2px 0; }
.capture-welcome h2 { margin: 3px 0 0; }
.capture-welcome > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.capture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capture-grid button { display: grid; grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 4px 14px rgba(20,45,69,.05); }
.capture-grid button:hover { border-color: #d6ad2d; background: #fffaf0; transform: translateY(-1px); }
.capture-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--blue-soft); color: var(--navy); font-size: 25px; font-weight: 900; }
.capture-grid button:nth-child(3n+1) .capture-icon { background: #fff4cf; color: #8a6200; }
.capture-grid button:nth-child(3n+2) .capture-icon { background: #e9f4ed; color: var(--success); }
.capture-grid strong { align-self: end; font-size: 16px; }
.capture-grid small { align-self: start; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.capture-back { display: none; margin: 16px 0; }
.editor-column { display: grid; gap: 16px; min-width: 0; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 18px rgba(20,45,69,.055); }
.edit-intro h2 { margin: 3px 0 4px; }
.edit-intro p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.panel-title, .status-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-title { margin-bottom: 16px; }
.panel-title h2 { margin: 2px 0 0; font-size: 18px; }
.status-panel > div { display: flex; align-items: center; gap: 12px; }
.status-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.status-badge.draft { background: #fff2d7; color: #8d5b00; }
.status-badge.released { background: #e5f3eb; color: var(--success); }
.status-badge.signed { background: #e6eef9; color: #24558a; }
.metric { padding: 9px 12px; border-radius: 9px; background: var(--blue-soft); color: var(--navy); font-size: 13px; font-weight: 800; }
.worktime-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.worktime-grid .break-rows { grid-column: 1 / -1; }
.worktime-grid > button { justify-self: start; }
.worktime-grid > button[type="submit"] { justify-self: end; }
.break-rows { display: grid; gap: 8px; min-width: 0; }
.break-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
.break-row button { padding: 8px; color: var(--danger); background: transparent; }
.staff-rows { display: grid; gap: 8px; }
.staff-row { display: grid; grid-template-columns: minmax(200px, 1fr) 130px; gap: 10px; }

.contribution-groups { display: grid; gap: 17px; }
.contribution-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--navy); font-size: 14px; }
.contribution-group h3::before { content: ""; width: 4px; height: 17px; border-radius: 3px; background: var(--yellow); }
.contribution-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.contribution-item:last-child { border: 0; }
.contribution-item p { margin: 0; line-height: 1.45; white-space: pre-wrap; }
.contribution-item small { display: block; margin-top: 5px; color: var(--muted); }
.contribution-item.cancelled { opacity: .58; text-decoration: line-through; }
.entry-actions { display: flex; align-items: flex-start; gap: 5px; }
.entry-actions .hint { align-self: center; font-size: 10px; }
.cancel-button { align-self: start; padding: 5px 8px; background: transparent; color: var(--danger); font-size: 11px; }
.empty-line { margin: 0; color: var(--muted); font-size: 13px; }

.compact-sections { padding: 0; overflow: hidden; }
details { border-bottom: 1px solid var(--line); }
details:last-child { border-bottom: 0; }
summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; color: var(--navy); font-size: 14px; font-weight: 800; }
summary span { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: 50%; background: var(--blue-soft); font-size: 11px; }
details > form, details > .mini-list, details > .photo-settings { margin: 0 20px 18px; }
details form button { align-self: end; }
.weather-form { display: grid; gap: 10px; }
.weather-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(130px, .45fr); align-items: end; gap: 10px; }
.weather-row > strong { align-self: center; color: var(--navy); font-size: 12px; }
.weather-form > button { justify-self: end; }
.mini-list { display: grid; gap: 6px; }
.mini-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 7px; background: #f5f7f8; font-size: 12px; }
.mini-item span:last-child { color: var(--muted); }
.photo-settings { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; }

.preview-column { min-width: 0; }
.review-mode .preview-column { position: relative; top: auto; overflow: auto; padding: 20px 26px 38px; background: #dfe3e5; }
.preview-toolbar, .preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.preview-toolbar span { color: var(--muted); font-size: 11px; }
.paper-stack { display: grid; width:100%; min-width:0; gap: 18px; container-type: inline-size; max-width: 1123px; margin: 0 auto; }
.photo-page-stack:empty { display: none; }
.paper { position: relative; width: 100%; max-width: 1123px; aspect-ratio: 297 / 210; overflow: hidden; margin: 0 auto; padding: 3.4% 4.1% 2.9%; background: #fff; box-shadow: 0 10px 35px rgba(20,45,69,.16); color: #1b2733; font-family: Arial, sans-serif; font-size: clamp(6px, 1.18cqw, 13.3px); line-height: 1.35; }
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 1.4%; border-bottom: 3px solid var(--yellow); }
.paper-head img { width: 20%; height: auto; object-fit: contain; object-position: left top; }
.paper-head div { text-align: right; }
.paper-head h2 { margin: 0; font-size: 1.4em; color: #20272b; letter-spacing: .05em; }
.paper-head strong { display: block; margin-top: 3px; font-size: .8em; font-weight: 500; }
.paper-photo-reference { font-size:.84em; font-style:italic; color:#4e5a64; }
.paper-print-identifier { display:none; }
.paper-draft { position: absolute; top: 4.15%; left: 31%; right: 31%; z-index: 1; color: #d3d8dd; font-size: 1.6em; font-weight: 900; text-align: center; letter-spacing: .12em; pointer-events: none; }
.paper-meta { display: grid; grid-template-columns: 1.45fr 1fr 1fr .62fr; margin-top: 1.45%; background:#edf2f6; border:1px solid #bac8d4; border-left:4px solid #173c61; }
.paper-meta > div { display: grid; gap: 4px; min-height: 37px; padding: 8px 10px; border-right: 1px solid #bac8d4; }
.paper-meta > div:first-child { background:#dce7ef; }
.paper-meta > div:last-child { border-right: 0; }
.paper-meta span { color: #42596b; font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.paper-meta strong { color:#142f45; font-size: .95em; }
.paper-section { margin-top: 3%; }
.paper-section h3 { margin: 0 0 .55em; padding-bottom: .25em; border-bottom: 2px solid var(--yellow); color: #20272b; font-size: 1.1em; }
.paper-section h4 { margin: .8em 0 .3em; font-size: .95em; }
.paper-section p { margin: .3em 0; line-height: 1.35; }
.paper-section ul { margin: 2px 0; padding-left: 16px; }
.paper-section li { margin-bottom: .4em; overflow-wrap: anywhere; }
.paper-highlight { padding: 4px 0 0; border: 0; background: transparent; }
.paper-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3%; }
.paper-report-grid { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(0, 1fr); gap: 3%; padding-bottom: 12%; }
.paper-simple-list { display: flex; flex-wrap: wrap; gap: 4px; }
.paper-simple-list span { padding: 3px 5px; border: 1px solid #d4dade; border-radius: 3px; background: #f6f8f9; }
.paper-table { width: 100%; border-collapse: collapse; }
.paper-table th, .paper-table td { padding: 3px; border-bottom: 1px solid #c6ced5; text-align: left; }
.paper-table th { font-size: .8em; }
.paper-table td { font-size: .95em; }
.paper-signature-fixed { position: absolute; right: 4.1%; left: 4.1%; bottom: 6.2%; display: grid; grid-template-columns: 1fr 1fr; gap: 5%; }
.paper-signature-fixed > div { display: grid; grid-template-rows: auto 24px auto; }
.paper-signature-fixed strong { font-size: .85em; }
.paper-signature-fixed i { border-bottom: 1px solid #536474; }
.paper-signature-fixed span { padding-top: 3px; color: #75808a; font-size: .7em; }
.paper-footer { position: absolute; right: 4.1%; bottom: 2.1%; left: 4.1%; display: flex; justify-content: space-between; padding-top: 4px; border-top: 1px solid #e2e6e9; color: #8a949c; font-size: .75em; }
.photo-paper { padding-bottom: 3.4%; }
.photo-paper-project { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 2.2% 0 1.6%; }
.photo-paper-project strong { font-size: 1.4em; }
.photo-paper-project span { color: #75808a; }
.paper-photo-grid { display: grid; gap: 0; height: 71%; border:1px solid #d7dde1; background:#fff; }
.paper-photo-grid.six { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.paper-photo-grid.four { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.paper-photo-grid figure { min-width: 0; min-height: 0; display:flex; flex-direction:column; justify-content:center; margin: 0; padding:.6em; overflow: hidden; border: 1px solid #d7dde1; background: #fff; }
.paper-photo-grid img { display:block; width: 100%; height:auto; max-height:77%; min-height: 0; object-fit: contain; }
.paper-photo-grid figcaption { padding: 4px 0; background: #fff; color: #4e5a64; font-size: .72em; overflow-wrap:anywhere; }
.paper-photo-grid figcaption strong { color: #26333d; }

.report-filter-panel { min-width: 0; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); }
.filter-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.filter-title-row h2 { margin: 4px 0 0; font-size: 20px; }
.saved-chip { padding: 5px 8px; border-radius: 999px; background: #e8f5ed; color: var(--success); font-size: 10px; font-weight: 800; }
.filter-scroll { flex: 1; overflow: auto; padding: 0 20px; }
.filter-group { padding: 15px 0; border-bottom: 1px solid var(--line); }
.filter-group h3 { margin: 0 0 9px; font-size: 13px; }
.filter-check { display: flex; grid-template-columns: none; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink); font-size: 13px; font-weight: 500; }
.filter-check input { width: 17px; min-height: 17px; accent-color: #d4a900; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 8px; background: #f1f3f4; }
.segmented label { display: block; }
.segmented input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 5px; border-radius: 6px; color: var(--ink); text-align: center; font-size: 12px; font-weight: 500; cursor: pointer; }
.segmented input:checked + span { background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.09); font-weight: 800; }
.filter-switch { display: flex; grid-template-columns: none; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--ink); font-size: 12px; font-weight: 500; }
.filter-switch input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.filter-switch i { flex: 0 0 auto; width: 36px; height: 20px; padding: 3px; border-radius: 999px; background: #cbd3d8; transition: .2s; }
.filter-switch i::before { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.filter-switch input:checked + i { background: #e0b100; }
.filter-switch input:checked + i::before { transform: translateX(16px); }
.filter-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.filter-group-heading h3 { margin: 0; }
.filter-group-heading span, .filter-help { color: var(--muted); font-size: 11px; }
.filter-help { margin: 7px 0 10px; }
.filter-full { width: 100%; }
.filter-photo-options { display: grid; gap: 9px; margin-top: 12px; }
.filter-actions { display: grid; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); background: #fafbfb; }
.filter-export { background: var(--yellow); color: #20272b; }
.filter-export:hover { background: #e9b92f; }
.signature-summary { display: grid; gap: 7px; margin: 8px 0 10px; }
.signature-summary p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.signature-summary article { display: grid; gap: 2px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.signature-summary strong { color: var(--navy); font-size: 11px; }
.signature-summary span { color: var(--muted); font-size: 10px; }
.signature-filter-actions { display: grid; gap: 7px; }
.signature-filter-actions button { width: 100%; }
.signature-action { border-color: #2d7050; background: #2d7050; color: #fff; }
.signature-action:hover { background: #245b41; }

.signer-list { display: grid; gap: 8px; padding-top: 4px; }
.signer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.signer-copy { display: grid; gap: 2px; min-width: 0; }
.signer-copy strong, .signer-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signer-copy span { color: var(--muted); font-size: 11px; }
.signer-actions { display: flex; gap: 6px; }
.signer-actions button { padding: 7px 9px; font-size: 10px; }
.default-chip { display: inline-flex; width: max-content; margin-left: 5px; padding: 2px 5px; border-radius: 999px; background: #fff2c7; color: #755400; font-size: 9px; text-transform: uppercase; }
.signature-confirmation { margin: -4px 0 2px; padding: 13px 14px; border-left: 4px solid var(--yellow); border-radius: 7px; background: #fff9e8; color: #2d3942; font-size: 12px; line-height: 1.5; }
.signature-section-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin-top: 5px; padding: 8px 0 0 26px; border-top: 1px solid var(--line); }
.signature-section-choices.disabled { opacity: .5; }
.signature-all-row { color: var(--navy); }
.digital-signature-field { display: grid; gap: 8px; }
#signatureCanvas { display: block; width: 100%; height: 180px; border: 2px dashed #93a2ae; border-radius: 10px; background: #fff; cursor: crosshair; touch-action: none; }
.digital-signature-field button { justify-self: start; }

dialog { width: min(720px, calc(100% - 28px)); max-height: 90vh; padding: 0; border: 0; border-radius: 18px; box-shadow: 0 30px 90px rgba(10,30,50,.3); }
dialog::backdrop { background: rgba(9,25,40,.55); backdrop-filter: blur(2px); }
.dialog-card { padding: 24px; overflow: auto; }
.dialog-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.dialog-title h2 { margin: 3px 0 0; }
.photo-dialog, .master-dialog { width: 100%; }
.photo-dialog-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.upload-button { display: inline-flex; padding: 10px 14px; border-radius: 9px; background: var(--navy); color: #fff; cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; min-height: 120px; max-height: 58vh; overflow: auto; }
.photo-day-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:14px 0 6px; }
.photo-performance-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:10px 0; }
.photo-performance-actions .hint { flex:1; min-width:220px; }
.contribution-photo-links { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; font-size:14px; }
.photo-day-toolbar label { min-width:220px; flex:1; }
.photo-day-toolbar > span { padding-bottom:12px; }
#photoDayNotice { margin:6px 0 12px; }
.photo-card { position: relative; overflow: hidden; border: 2px solid transparent; border-radius: 11px; background: #f0f3f5; }
.photo-card.selected { border-color: var(--yellow); box-shadow: 0 0 0 2px #fff inset; }
.photo-card img { display: block; width: 100%; height: 125px; object-fit: cover; }
.photo-card footer { padding: 8px; font-size: 10px; }
.photo-card input { position: absolute; top: 8px; right: 8px; width: 20px; min-height: 20px; accent-color: var(--navy); }
.master-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
fieldset { border: 1px solid var(--line); border-radius: 9px; }
legend { padding: 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: min(420px, calc(100% - 44px)); padding: 13px 16px; border-radius: 10px; background: #172b3e; color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #8f2f2f; }

@media (max-width: 1200px) {
  .report-layout.review-mode { grid-template-columns: minmax(500px, 1fr) 310px; }
  .report-head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .report-selection-bar { align-items: stretch; flex-direction: column; }
  .toolbar-report-state { padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 1100px) {
  .user-admin-layout { grid-template-columns: 1fr; }
  .report-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-fields { display: grid; grid-template-columns: minmax(0, 1fr) 190px auto; }
  .toolbar-fields label, .toolbar-fields label:first-child { min-width: 0; }
  .toolbar-report-state { padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .report-layout.review-mode { grid-template-columns: 1fr; }
  .review-mode .preview-column { min-height: 620px; }
  .report-filter-panel { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 850px) {
  .mobile-only { display: grid; }
  .app-shell { grid-template-columns: 1fr; }
  .topbar { padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .brand-logo { width: 120px; }
  .brand-copy { display: flex; order: 4; flex-basis: 100%; padding-left: 0; border-left: 0; }
  .brand-copy strong { display: none; }
  .user-pill { display: none; }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 68px; width: 230px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace { padding: 20px 14px 40px; }
  .page-heading, .report-toolbar { align-items: stretch; flex-direction: column; }
  .report-page-head { align-items: stretch; flex-direction: column; }
  .report-head-actions { justify-content: stretch; }
  .report-head-actions button { flex: 1; }
  .mobile-capture-hub { display: block; }
  .report-layout.review-mode.own-report .editor-column { display: block; }
  .report-layout.review-mode.own-report .editor-column > :not([data-capture-section="overview"]) { display: none; }
  .report-layout.review-mode.own-report .preview-column { display: none; }
  .capture-back:not(.hidden) { display: inline-flex; }
  .report-layout.edit-mode.mobile-section-open { margin-top: 8px; }
  .report-layout.edit-mode.mobile-section-open .editor-column > .panel { display: none; }
  .report-layout.edit-mode.mobile-section-open .editor-column > .mobile-capture-selected,
  .report-layout.edit-mode.mobile-section-open .editor-column > .mobile-capture-selected-container { display: block; }
  .report-layout.edit-mode.mobile-section-open .compact-sections > details { display: none; }
  .report-layout.edit-mode.mobile-section-open .compact-sections > details.mobile-capture-selected { display: block; border: 0; }
  .report-layout.edit-mode.mobile-section-open .compact-sections > details.mobile-capture-selected > summary { display: block; font-size: 20px; padding: 0 0 16px; }
  .toolbar-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-fields label:first-child { min-width: 0; grid-column: 1 / -1; }
  .toolbar-fields label { min-width: 0; }
  .toolbar-fields button { align-self: end; }
  .form-grid.three, .form-grid.four { grid-template-columns: 1fr 1fr; }
  .worktime-grid { grid-template-columns: 1fr 1fr; }
  .worktime-grid .break-rows { grid-column: 1 / -1; }
  .worktime-grid > button { align-self: end; }
  .user-row { grid-template-columns: 40px 1fr auto; }
  .user-role { grid-column: 2; }
  .account-state { grid-column: 3; grid-row: 1; }
  .user-actions { grid-column: 2 / -1; }
  .document-toolbar { align-items: stretch; flex-direction: column; }
  .document-toolbar label { min-width: 0; }
  .document-toolbar > p { text-align: left; }
  .document-card { grid-template-columns: 44px minmax(0, 1fr); }
  .document-icon { width: 42px; height: 42px; }
  .document-actions { grid-column: 2; grid-template-columns: 1fr auto; justify-items: stretch; min-width: 0; }
  .entry-actions { flex-direction: column; }
}

@media (max-width: 540px) {
  .auth-card { padding: 26px 20px; }
  .top-actions .ghost { padding: 8px; font-size: 0; }
  .top-actions .ghost::after { content: "↪"; font-size: 20px; }
  .top-actions #offlineQueueButton::after { content: "↻"; }
  .photo-dialog-actions { align-items: stretch; flex-direction: column; }
  .photo-dialog-actions .upload-button { justify-content: center; min-height: 48px; }
  .page-heading h1, .report-toolbar h1 { font-size: 25px; }
  .report-page-head { margin-bottom: 12px; }
  .report-page-head .breadcrumbs { display: none; }
  .report-selection-bar { padding: 12px; }
  .capture-welcome { align-items: flex-start; flex-direction: column; gap: 4px; }
  .capture-grid { gap: 8px; }
  .capture-grid button { grid-template-columns: 1fr; grid-template-rows: 50px auto auto; justify-items: center; min-height: 142px; padding: 13px 8px; text-align: center; }
  .capture-icon { grid-row: auto; width: 48px; height: 48px; }
  .capture-grid strong { align-self: center; font-size: 14px; }
  .capture-grid small { align-self: center; font-size: 10px; }
  .toolbar-fields, .form-grid.two, .form-grid.three, .form-grid.four, .master-columns { grid-template-columns: 1fr; }
  .toolbar-fields label:first-child { grid-column: auto; }
  .report-selection-bar .toolbar-fields { grid-template-columns: minmax(0, 1fr) auto; }
  .report-selection-bar .toolbar-fields label:first-child { grid-column: 1 / -1; }
  .report-selection-bar .toolbar-fields button { min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .report-page-head { gap: 10px; }
  .report-page-head h1 { font-size: 24px; }
  .report-head-actions button { min-height: 44px; padding: 8px; font-size: 12px; }
  .toolbar-report-state { gap: 4px; }
  .report-layout { display: block; }
  .report-layout.review-mode .preview-column { display: none; }
  .report-layout.review-mode .report-filter-panel { border: 0; border-radius: 14px; box-shadow: var(--shadow); }
  .report-layout.review-mode .filter-title-row h2::after { content: " · Smartphone"; color: var(--muted); font-weight: 500; }
  .status-panel, .panel-title { align-items: flex-start; }
  .status-panel, .panel-title, .status-panel > div, .panel-actions { flex-wrap: wrap; }
  .worktime-grid { grid-template-columns: 1fr 1fr; }
  .break-row { grid-template-columns: 1fr 1fr auto; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .hint { width: 100%; }
  .staff-row { grid-template-columns: 1fr 110px; }
  .extra-effort-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .weather-row { grid-template-columns: 44px minmax(0, 1fr); }
  .weather-row label:last-child { grid-column: 2; }
  .weather-form > button { width: 100%; }
  .document-legend { flex-wrap: wrap; }
  .document-title { align-items: flex-start; flex-direction: column; }
  .document-actions { grid-template-columns: 1fr; }
  .signature-section-choices { grid-template-columns: 1fr; }
  .signer-row { grid-template-columns: 1fr; }
  .signer-actions { justify-content: flex-start; }
}

.previous-choices { display: grid; gap: 10px; max-height: 45vh; overflow: auto; }
.offline-item { padding: 12px; border: 1px solid #d9dfe6; border-radius: 8px; overflow-wrap: anywhere; }
.offline-item small { display: block; color: #66727b; margin-bottom: 8px; }
#reportArchiveList small { display: block; color: #66727b; margin-top: 4px; }
.offline-readiness { display: flex; gap: 16px; align-items: center; margin: 20px 0; }
#offlineCompareValues { overflow: auto; }
#offlineCompareValues table { width: 100%; border-collapse: collapse; }
#offlineCompareValues td, #offlineCompareValues th { padding: 8px; border: 1px solid #d9dfe6; text-align: left; vertical-align: top; }
#offlineCompareValues pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 30ch; }
.previous-choice { display: flex; gap: 12px; padding: 12px; border: 1px solid #d9dfe6; border-radius: 8px; align-items: flex-start; }
.previous-choice input { width: auto; margin-top: 3px; flex-shrink: 0; }
.previous-day-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; }
.previous-day-heading h3 { margin:0; font-size:18px; }
.previous-day-heading button { padding:8px 12px; font-size:12px; }
.previous-section { display:grid; gap:8px; margin:12px 0; padding:12px; }
.previous-section legend { font-size:13px; font-weight:800; color:var(--navy); }
.previous-choice small { color:var(--muted); font-weight:500; }
.previous-choice > span { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }

@media print {
  .paper-screen-identifier { display:none !important; }
  .paper-print-identifier { display:inline !important; }
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  body > *:not(#app), .topbar, .sidebar, .editor-column, .preview-toolbar, .preview-actions { display: none !important; }
  #app, .workspace, #reportView, #reportWorkspace, .preview-column { display: block !important; padding: 0; margin: 0; }
  #reportView > :not(#reportWorkspace), #reportWorkspace > :not(.preview-column) { display: none !important; }
  .paper-stack, .photo-page-stack { display: block; max-width: none; container-type: normal; }
  .paper { display: block !important; width: 297mm; height: 210mm; padding: 13mm 15mm; box-shadow: none; font-size: 10pt; break-after: page; }
}

#speechAudio { width: 100%; }
#speechStatus { overflow-wrap: anywhere; }
#materialPresetsDialog textarea { width: 100%; }
.company-item { align-items: center; }
.company-item > span { min-width: 0; overflow-wrap: anywhere; }
.company-item strong, .company-item small { display: block; }
.company-item small { margin-top: 4px; color: var(--muted); }
.company-item button { flex-shrink: 0; padding: 8px 10px; font-size: 12px; }
.company-item .company-delete { color: #a12929; }
.master-menu { display: grid; gap: 12px; }
.master-menu button { text-align: left; padding: 18px; }
.master-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
@media (max-width: 600px) { .company-item { flex-wrap: wrap; } .master-row-actions { justify-content: flex-start; } }

.project-reports-panel { background: #fff; border: 1px solid #d9dfe6; border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.project-reports-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-reports-heading h2 { margin: 0; font-size: 18px; }
.project-reports-list { list-style: none; padding: 0; margin: 0; max-height: 280px; overflow-y: auto; }
.project-reports-list li + li { border-top: 1px solid #e6ebef; }
.project-report-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 20px; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; background: #fff; color: #193e5e; text-align: left; }
.project-report-row:hover { background: #f3f7fa; }
.project-report-row.active { border-color: #193e5e; background: #edf4f8; }
.project-report-row:focus-visible { outline: 2px solid #193e5e; outline-offset: -2px; }
.project-report-details { color: #66727b; font-size: 13px; }
@media (max-width: 600px) {
  .project-reports-panel { padding: 12px; }
  .project-reports-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .project-report-row { grid-template-columns: 1fr auto 16px; gap: 8px; }
  .project-report-details { grid-column: 1; grid-row: 2; }
  .project-report-row .status-badge { grid-column: 2; grid-row: 1 / 3; max-width: 145px; white-space: normal; }
  .project-report-row > span:last-child { grid-column: 3; grid-row: 1 / 3; }
}

/* NCR dashboard and document detail, following the supplied reference. */
#ncrView { color: #102033; }
.ncr-heading-actions, .ncr-detail-tools, .ncr-export-actions, .ncr-entry-heading, .ncr-entry-heading > div, .ncr-secondary-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ncr-orange { background:var(--navy); border:1px solid var(--navy); color:#fff; border-radius:12px; padding:12px 18px; font-weight:600; min-height:44px; }
.ncr-orange:hover { background:var(--navy-2); }
#ncrView button:focus-visible, .ncr-table-editor button:focus-visible { outline:3px solid #245ca5; outline-offset:3px; }
.ncr-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:24px 0 30px; }
.ncr-metric { display:flex; align-items:center; justify-content:space-between; padding:24px; background:#fff; border:1px solid #dce5ef; border-radius:14px; box-shadow:0 2px 3px #173c6106; }
.ncr-metric div { display:grid; gap:9px; }
.ncr-metric div > span { color:var(--muted); }
.ncr-metric strong { font-size:28px; }
.ncr-metric-icon { display:grid; place-items:center; width:54px; height:54px; border-radius:15px; font-size:28px; background:var(--blue-soft); color:var(--navy); }
.ncr-metric.entries .ncr-metric-icon { background:var(--blue-soft); color:var(--navy); }
.ncr-metric.open strong, .ncr-metric.open .ncr-metric-icon { color:#e58c00; }
.ncr-metric.open .ncr-metric-icon { background:#fff9e9; }
.ncr-metric.approved strong, .ncr-metric.approved .ncr-metric-icon { color:var(--success); }
.ncr-metric.approved .ncr-metric-icon { background:#ecfcf5; }
.ncr-projects-title { font-size:20px; margin:0 0 22px; }
.ncr-project { background:#fff; border:1px solid #dce5ef; border-radius:14px; overflow:hidden; margin-bottom:18px; box-shadow:0 2px 3px #173c6106; }
.ncr-project > summary { list-style:none; display:flex; align-items:center; gap:18px; padding:24px; cursor:pointer; min-height:94px; }
.ncr-project > summary::-webkit-details-marker { display:none; }
.ncr-project-arrow { display:grid; place-items:center; flex-shrink:0; height:46px; width:46px; border-radius:14px; background:var(--navy); color:#fff; font-size:24px; transform:rotate(-90deg); }
.ncr-project[open] .ncr-project-arrow { transform:none; }
.ncr-project-copy { min-width:0; }
.ncr-project-copy h3 { margin:0 0 7px; font-size:18px; line-height:1.45; }
.ncr-project-number { display:inline-block; color:var(--navy); background:var(--blue-soft); border-radius:4px; padding:2px 8px; font-size:14px; font-weight:500; margin-right:5px; }
.ncr-project-copy p { color:var(--muted); margin:0; font-size:14px; }
.ncr-project-count { color:var(--muted); margin-left:auto; white-space:nowrap; }
.ncr-project-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:18px; border-top:1px solid #dce5ef; border-bottom:1px solid #dce5ef; }
.ncr-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.ncr-tabs > span { color:var(--muted); margin-right:8px; }
.ncr-tabs button { border:1px solid #ccd6e2; border-radius:12px; background:#fff; padding:10px 14px; min-height:42px; }
.ncr-tabs button.selected { background:var(--navy); border-color:var(--navy); color:#fff; font-weight:600; }
.ncr-project-rows { background:#f7f9fc; padding:18px; display:grid; gap:10px; }
.ncr-report-row { display:flex; align-items:center; justify-content:space-between; gap:18px; width:100%; padding:20px; border:1px solid #dce5ef; border-radius:14px; background:#fff; text-align:left; color:var(--ink); }
.ncr-report-row:hover { border-color:var(--navy); background:var(--blue-soft); }
.ncr-report-row > span:first-child { display:grid; gap:8px; min-width:0; }
.ncr-report-row strong { font-size:18px; font-weight:500; overflow-wrap:anywhere; }
.ncr-report-row small { color:var(--muted); font-size:14px; line-height:1.5; }
.ncr-badge { display:inline-block; white-space:nowrap; border-radius:99px; padding:6px 13px; background:#fff6c4; border:1px solid #ffdc72; color:#b65b00; font-size:12px; text-transform:uppercase; }
.ncr-badge.approved { color:var(--success); background:#e8faf1; border-color:#a7e8ce; }
.ncr-badge.rejected { color:#b02e32; background:#fff0f1; border-color:#f3b8bc; }
.ncr-badge.closed { color:#536779; background:#edf1f5; border-color:#ccd6df; }
.ncr-empty { margin:0; padding:20px; color:var(--muted); }
.ncr-detail-tools { justify-content:space-between; margin:0 0 20px; }
.ncr-export-actions a { font-size:13px; }
.ncr-detail { background:#fff; border:1px solid #dce5ef; border-radius:14px; overflow:hidden; }
.ncr-detail header { padding:32px; border-bottom:3px solid var(--yellow); }
.ncr-detail-brand { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.ncr-detail-brand img { width:240px; max-width:65%; height:64px; object-fit:contain; object-position:left; }
.ncr-detail h2 { font-size:28px; margin:26px 0 24px; overflow-wrap:anywhere; }
.ncr-header-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin:0; }
.ncr-header-meta dt, .ncr-caption, .ncr-resources h3, .ncr-author span { color:var(--muted); text-transform:uppercase; font-size:11px; font-weight:500; letter-spacing:.065em; }
.ncr-header-meta dd { margin:8px 0 0; line-height:1.5; }
.ncr-detail-entry { padding:24px 32px 32px; border-bottom:1px solid #dce5ef; }
.ncr-entry-heading { justify-content:space-between; }
.ncr-entry-heading strong { font-size:18px; }
.ncr-entry-number { background:#232d3b; color:white; padding:5px 9px; border-radius:4px; font-size:13px; }
.ncr-type { background:var(--blue-soft); color:var(--navy); border-radius:99px; padding:4px 10px; font-size:13px; }
.ncr-area { color:var(--muted); font-size:13px; }
.ncr-danger { background:white; color:var(--danger); border:1px solid #f1aaaa; border-radius:12px; padding:10px 14px; min-height:42px; }
.ncr-danger:hover { background:#fff0f0; }
.ncr-effort { display:flex; align-items:center; flex-wrap:wrap; gap:26px; color:var(--muted); margin:18px 0; }
.ncr-effort strong { color:var(--ink); font-weight:500; }
.ncr-caption { margin:18px 0 8px; }
.ncr-entry-title { margin:8px 0; font-size:15px; }
.ncr-description { margin:0 0 20px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.ncr-photo-thumbnails { display:flex; flex-wrap:wrap; gap:10px; margin:10px 0 20px; }
.ncr-photo-thumbnails a { display:block; width:128px; height:128px; background:#fff; border:1px solid #dce5ef; border-radius:12px; overflow:hidden; }
.ncr-photo-thumbnails img { width:100%; height:100%; object-fit:contain; }
.ncr-resources { margin:20px 0; }
.ncr-resources h3 { margin:0 0 10px; }
.ncr-table-scroll { overflow:auto; border:1px solid #dce5ef; border-radius:12px; }
.ncr-resources table { width:100%; border-collapse:collapse; min-width:420px; table-layout:fixed; }
.ncr-resources th, .ncr-resources td { padding:12px; text-align:left; font-weight:400; font-size:14px; overflow-wrap:anywhere; }
.ncr-resources th:first-child, .ncr-resources td:first-child { width:40%; }
.ncr-resources th { color:var(--muted); background:#f7f9fc; }
.ncr-resources.materials th { background:var(--blue-soft); }
.ncr-resources.equipment th { background:var(--blue-soft); }
.ncr-resources tbody tr + tr { border-top:1px solid #dce5ef; }
.ncr-secondary-actions { margin-top:22px; }
.ncr-detail footer { padding:24px 32px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; }
.ncr-status-controls { display:flex; flex-wrap:wrap; gap:14px; }
.ncr-status-controls label { font-size:12px; display:grid; gap:6px; }
.ncr-status-controls select { min-width:160px; }
.ncr-author { display:grid; gap:6px; text-align:right; margin-left:auto; }
.ncr-cancelled { color:#b02e32; }
.ncr-line-items { display:grid; gap:12px; }
.ncr-table-editor { border:1px solid #dce5ef; border-radius:12px; padding:14px; }
.ncr-table-editor summary { cursor:pointer; font-weight:600; padding:6px 0; }
.ncr-table-editor > button { margin-top:10px; }
.ncr-item-row { display:grid; grid-template-columns:2fr .8fr 1fr 1.5fr auto; gap:8px; align-items:end; margin:12px 0; }
.ncr-item-row label { font-size:12px; min-width:0; }
.ncr-item-row input { width:100%; min-width:0; padding:10px; }
@media (max-width:1100px) { .ncr-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .ncr-metric { padding:18px; } }
@media (max-width:640px) {
  #ncrView .page-heading { align-items:flex-start; flex-direction:column; gap:16px; }
  .ncr-metrics { gap:10px; } .ncr-metric { padding:14px; } .ncr-metric-icon { width:32px; height:38px; font-size:22px; } .ncr-metric div > span { font-size:12px; } .ncr-metric strong { font-size:24px; }
  .ncr-project > summary { padding:16px; gap:12px; flex-wrap:wrap; } .ncr-project-count { width:100%; margin-left:58px; font-size:12px; } .ncr-project-copy { flex:1; } .ncr-project-copy h3 { font-size:16px; }
  .ncr-project-tools, .ncr-project-rows { padding:12px; } .ncr-tabs button { padding:9px 10px; font-size:12px; } .ncr-tabs > span { width:100%; font-size:12px; }
  .ncr-report-row { padding:16px; gap:10px; flex-wrap:wrap; } .ncr-report-row strong { font-size:16px; } .ncr-report-row small { font-size:12px; }
  .ncr-detail header, .ncr-detail-entry, .ncr-detail footer { padding:20px; } .ncr-detail h2 { font-size:22px; } .ncr-header-meta { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; } .ncr-header-meta dd { font-size:14px; }
  .ncr-photo-thumbnails a { width:96px; height:96px; } .ncr-status-controls { width:100%; } .ncr-status-controls label { flex:1; } .ncr-status-controls select { min-width:0; width:100%; }
  .ncr-item-row { grid-template-columns:1fr 1fr; padding-bottom:12px; border-bottom:1px solid #dce5ef; } .ncr-item-row label:first-child { grid-column:1/-1; } .ncr-item-row > button { justify-self:end; }
}
@media print { .project-reports-panel { display: none !important; } }
@media (max-width: 850px) {
  .report-layout.review-mode.own-report .editor-column { display: none; }
}
