:root{--bg: #f4f5f7;--card: #ffffff;--text: #1f2430;--muted: #6b7280;--border: #e3e5ea;--accent: #2563eb;--sev-critical: #dc2626;--sev-high: #ea580c;--sev-medium: #d97706;--sev-low: #64748b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,Segoe UI,Helvetica Neue,Arial,sans-serif;font-size:15px;line-height:1.5}.app{max-width:920px;margin:0 auto;padding:24px 20px 64px}.app-header{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--border)}.title-block h1{margin:0;font-size:24px}.subtitle{margin:2px 0 0;color:var(--muted);font-size:14px}.header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.stat{color:var(--muted);font-size:13px}.edited-stat{color:var(--accent);font-weight:600}.download-btn{background:var(--accent);color:#fff;border:none;border-radius:8px;padding:9px 16px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit}.download-btn:hover{background:#1d4ed8}.download-btn:disabled{background:#9ca3af;cursor:not-allowed}.save-note{margin:14px 0 0;color:var(--muted);font-size:13px}.message{margin-top:40px;text-align:center;color:var(--muted)}.message.error{color:var(--sev-critical)}.message code{background:#eef0f3;padding:1px 5px;border-radius:4px;font-size:13px}.flight-card{background:var(--card);border:1px solid var(--border);border-radius:10px;margin-top:14px;overflow:hidden}.flight-header{width:100%;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 16px;background:none;border:none;cursor:pointer;font-family:inherit;font-size:14px;text-align:start;color:var(--text)}.flight-header:hover{background:#fafbfc}.chevron{color:var(--muted);font-size:12px}.flight-date,.flight-msz{font-weight:600}.flight-project{color:var(--muted)}.flight-count{color:var(--muted);font-size:13px;margin-inline-start:auto}.badge{font-size:12px;padding:2px 8px;border-radius:999px;background:#eef2ff;color:#3730a3}.relevance-badge{font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;background:#f0f1f3;color:var(--muted);margin-inline-end:8px;vertical-align:1px;white-space:nowrap}.relevance-badge.context{background:#eef4ff;color:#3f5b8a}.severity-dots{display:inline-flex;gap:4px}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.flight-body{border-top:1px solid var(--border);padding:6px 16px 14px}.event-row{padding:12px 0;border-bottom:1px solid #f0f1f3}.event-row:last-of-type{border-bottom:none}.event-row.edited{border-inline-start:3px solid var(--accent);padding-inline-start:11px;margin-inline-start:-14px}.event-desc{margin:0 0 8px}.event-fields{display:flex;gap:16px;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:3px}.field-label{font-size:12px;color:var(--muted)}.severity-select,.fault-input{font-family:inherit;font-size:14px;padding:6px 9px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--text)}.fault-input{min-width:180px}.severity-select{font-weight:600;border-inline-start-width:4px}.sev-critical{border-inline-start-color:var(--sev-critical);color:var(--sev-critical)}.sev-high{border-inline-start-color:var(--sev-high);color:var(--sev-high)}.sev-medium{border-inline-start-color:var(--sev-medium);color:var(--sev-medium)}.sev-low{border-inline-start-color:var(--sev-low);color:var(--sev-low)}.dot.sev-critical{background:var(--sev-critical)}.dot.sev-high{background:var(--sev-high)}.dot.sev-medium{background:var(--sev-medium)}.dot.sev-low{background:var(--sev-low)}.source-toggle{margin-top:10px;background:none;border:1px solid var(--border);border-radius:7px;padding:6px 12px;font-family:inherit;font-size:13px;color:var(--muted);cursor:pointer}.source-toggle:hover{background:#fafbfc}.source-preview{margin-top:10px;background:#f8f9fa;border:1px solid var(--border);border-radius:8px;padding:6px 14px}.source-line{margin:8px 0;font-size:13px;color:#374151;white-space:pre-wrap}.tab-bar{display:flex;gap:4px;margin-top:16px;border-bottom:1px solid var(--border)}.tab{background:none;border:none;border-bottom:2px solid transparent;padding:9px 18px;font-family:inherit;font-size:15px;color:var(--muted);cursor:pointer}.tab:hover{color:var(--text)}.tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}.tab-panel{margin-top:18px}.tab-panel h2{font-size:19px;margin:0 0 4px}.tab-panel h3{font-size:15px;margin:0 0 4px}.panel-note{margin:0 0 14px;color:var(--muted);font-size:13px}.events-tab{margin-top:6px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0 26px}.stat-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:16px}.stat-num{font-size:25px;font-weight:700;color:var(--text)}.stat-card-label{margin-top:4px;color:var(--muted);font-size:13px}@media (max-width: 560px){.stat-grid{grid-template-columns:repeat(2,1fr)}}.chart-block{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:16px 18px;margin-bottom:16px}.bar-row,.month-row{display:flex;align-items:center;gap:12px;margin:9px 0}.bar-label{flex:0 0 96px;font-size:14px;font-weight:600}.bar-track{flex:1;position:relative;height:22px;background:#f0f1f3;border-radius:5px;overflow:hidden}.bar-fill{position:absolute;inset-block:0;inset-inline-start:0;background:var(--accent);border-radius:5px}.bar-fill-hi{position:absolute;inset-block:0;inset-inline-start:0;background:#0f172a6b;border-radius:5px}.bar-value{flex:0 0 auto;min-width:134px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.crit-badge{flex:0 0 auto;font-size:12px;padding:3px 9px;border-radius:999px;background:#eef0f3;color:var(--muted)}.crit-badge.active{background:var(--sev-critical);color:#fff;font-weight:600}.callout{margin:14px 0 0;padding:10px 14px;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;font-size:13px;color:#9a3412}.pivot-wrap{overflow-x:auto}.pivot-table{border-collapse:collapse;font-size:14px}.pivot-table th,.pivot-table td{border:1px solid var(--border);padding:8px 12px;text-align:center;font-variant-numeric:tabular-nums}.pivot-table thead th{background:#f8f9fa;font-weight:600}.pivot-corner{background:#f8f9fa}.pivot-row-head{background:#f8f9fa;font-weight:600;text-align:start}.pivot-cell{min-width:48px}.pivot-total,.pivot-footer td,.pivot-footer .pivot-row-head{font-weight:600;background:#f8f9fa}
