.incident-page { max-width: 1180px; margin: 0 auto; color: var(--text-main); }
.incident-topbar, .incident-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.incident-topbar h2 { margin: 0 0 6px; }
.incident-topbar p { margin: 0 0 18px; color: var(--text-muted); }
.incident-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.incident-actions button { white-space: nowrap; }
.incident-week-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px 0 20px; padding: 14px 16px; border: 1px solid var(--border-color); border-left: 3px solid var(--accent-amber); border-radius: 8px; background: var(--card-bg); }
.incident-week-bar label { font-weight: 700; }
.incident-week-bar select { min-width: min(100%,320px); padding: 9px 12px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--preview-bg); color: var(--text-main); }
.incident-week-bar span { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.incident-list { display: grid; gap: 8px; margin-bottom: 24px; }
.incident-list-item { width: 100%; display: grid; grid-template-columns: 64px 70px minmax(190px,2fr) minmax(150px,1.1fr) 150px 170px; align-items: center; gap: 12px; padding: 12px; text-align: left; border: 1px solid var(--border-color); border-radius: 6px; background: var(--card-bg); color: var(--text-main); cursor: pointer; }
.incident-list-item:hover { border-color: var(--accent-blue); }
.incident-list-item small { display: block; margin-top: 4px; color: var(--text-muted); }
.incident-list-thumbnail { position: relative; display: block; width: 64px; height: 64px; overflow: hidden; border: 1px solid var(--border-color); border-radius: 6px; background: var(--preview-bg); }
.incident-list-thumbnail-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 23px; }
.incident-list-thumbnail img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.incident-list-thumbnail.has-image img { opacity: 1; }
.incident-list-id { font: 600 13px 'Roboto Mono',monospace; }
.incident-count,.incident-muted { color: var(--text-muted); }
.incident-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.incident-count-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.incident-count-badge.approved { color: var(--accent-green); border-color: var(--accent-green); background: rgba(52,177,110,.12); }
.incident-count-badge.pending { color: var(--accent-amber); border-color: var(--accent-amber); background: rgba(231,174,88,.12); }
@media (max-width: 850px) { .incident-counts { grid-column: 1 / -1; } }
.incident-error { color: #d2222c; }
.incident-state { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.incident-state.pending { color: #9b6500; background: #fff2d1; }
.incident-state.approved { color: #086534; background: #d9f5e6; }
.incident-state.rejected { color: #a5272d; background: #ffe0e2; }
.incident-editor-actions { max-width: 210mm; margin: 12px auto; justify-content: space-between; }
.incident-paper { box-sizing: border-box; width: min(100%,210mm); min-height: 297mm; margin: 0 auto; padding: 18mm 18mm 16mm; background: #fff; color: #17202b; box-shadow: 0 4px 22px #0004; font-family: Georgia,'Times New Roman',serif; }
.incident-letterhead { display: flex; align-items: center; gap: 14px; }
.incident-letterhead img { width: 60px; height: 60px; object-fit: contain; }
.incident-letterhead h2 { margin: 2px 0; font: 700 19px Georgia,'Times New Roman',serif; letter-spacing: 1.2px; color: #17202b; }
.incident-letterhead p { margin: 0; color: #465466; font: 11px Arial,sans-serif; }
.incident-overline { color: #86363c; font: 700 10px Arial,sans-serif; letter-spacing: 2px; }
.incident-file-no { margin-left: auto; align-self: start; padding: 5px 8px; border: 1px solid #aab2ba; color: #4d5864; font: 10px Arial,sans-serif; white-space: nowrap; }
.incident-rule { height: 4px; background: #a92730; margin: 14px 0 20px; }
.incident-section-title { margin: 17px 0 8px; padding: 5px 8px; border-left: 3px solid #a92730; background: #f1f3f4; color: #27323e; font: 700 11px Arial,sans-serif; text-transform: uppercase; letter-spacing: .8px; break-after: avoid; }
.incident-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.incident-wide { grid-column: 1 / -1; }
.incident-paper label { display: block; color: #404b56; font: 700 10px Arial,sans-serif; }
.incident-paper input,.incident-paper select,.incident-paper textarea { box-sizing: border-box; width: 100%; margin-top: 4px; padding: 6px 7px; border: 1px solid #acb5be; border-radius: 0; background: #fff; color: #17202b; font: 12px Arial,sans-serif; box-shadow: none; }
.incident-paper input:disabled,.incident-paper select:disabled,.incident-paper textarea:disabled { opacity: 1; color: #17202b; background: #f7f8f8; -webkit-text-fill-color: #17202b; }
.incident-paper textarea { resize: vertical; min-height: 43px; line-height: 1.4; }
.incident-paper > textarea { min-height: 130px; }
.incident-image-preview { margin-top: 8px; font: 11px Arial,sans-serif; }
.incident-image-preview img { display: block; max-width: 100%; max-height: 200px; margin-bottom: 6px; object-fit: contain; }
.incident-image-preview a { color: #245a85; overflow-wrap: anywhere; }
.incident-print-value { display: none; }
.incident-paper-footer { display: flex; justify-content: space-between; border-top: 1px solid #c8ced5; margin-top: 26px; padding-top: 7px; color: #65707b; font: 10px Arial,sans-serif; }
#incidentSaveBar { max-width: 210mm; margin: 14px auto 30px; }
#incidentSaveBar span { color: var(--text-muted); font-size: 12px; }
.incident-detail { max-width: 210mm; margin: 24px auto; padding: 20px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--card-bg); }
.incident-detail h3 { margin-top: 0; }
.incident-detail h4 { margin: 22px 0 8px; }
.incident-review-note { padding: 10px; border-left: 3px solid #a92730; background: var(--preview-bg); }
.incident-participate { display: flex; align-items: end; gap: 9px; margin: 20px 0; }
.incident-participate label { flex: 1; }
.incident-participate input { display: block; width: 100%; margin-top: 5px; }
.incident-participants { display: grid; gap: 8px; }
.incident-participant { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; }
.incident-participant-person { display: flex; align-items: center; min-width: 0; gap: 12px; }
.incident-participant-person > div { min-width: 0; overflow-wrap: anywhere; }
.incident-participant-avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); background: var(--sidebar-bg); }
.incident-participant-avatar-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 20px; }
.incident-participant a { display: inline-block; margin-top: 4px; }
.incident-danger { color: #b33d42 !important; }
@media (max-width: 850px) { .incident-list-item { grid-template-columns: 56px minmax(0,1fr); gap: 7px 10px; } .incident-list-item > :not(.incident-list-thumbnail) { grid-column: 2; } .incident-list-thumbnail { grid-column: 1; grid-row: 1 / span 5; width: 56px; height: 56px; } .incident-counts { grid-column: 2; } .incident-topbar { display: block; } .incident-paper { min-height: auto; padding: 18px; } .incident-form-grid { grid-template-columns: 1fr; } .incident-wide { grid-column: auto; } .incident-participate,.incident-participant { display: block; } .incident-participate button { margin-top: 8px; } }
@page { size: A4 portrait; margin: 0; }
@media print {
  html,body { width: 210mm !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body * { visibility: hidden !important; }
  #incidentPaper,#incidentPaper * { visibility: visible !important; }
  body > aside, .okf-banner, #gridContainer, #panelTitle, #incidentList, .incident-week-bar, .incident-topbar, .incident-editor-actions, #incidentSaveBar, #incidentDetail { display: none !important; }
  main,#fullPanelContainer,#karesetekFullPanel,#incidentEditor,#incidentForm { display: block !important; width: 210mm !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  #incidentPaper { position: static; width: 210mm; min-height: 297mm; margin: 0; padding: 18mm 18mm 16mm; box-shadow: none; border: 0; color: #17202b !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #incidentPaper input,#incidentPaper select,#incidentPaper textarea { border: 0; border-bottom: 1px solid #9da5ad; background: #fff !important; color: #17202b !important; padding-left: 0; }
  #incidentPaper textarea { display: none !important; }
  #incidentPaper .incident-print-value { display: block; margin-top: 4px; padding: 5px 0; border-bottom: 1px solid #9da5ad; color: #17202b; font: 12px Arial,sans-serif; font-weight: normal; white-space: pre-wrap; overflow-wrap: anywhere; }
  #incidentPaper .incident-section-title,.incident-letterhead,.incident-paper-footer { break-inside: avoid; }
}
