* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f5f6f8; color: #1a1a1a; }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: #172b4d; color: white;
}
header h1 { font-size: 18px; margin: 0; }
header button {
  background: #0052cc; color: white; border: none; padding: 8px 14px;
  border-radius: 4px; cursor: pointer;
}

nav { display: flex; gap: 4px; padding: 12px 24px 0; background: #fff; border-bottom: 1px solid #ddd; }
.tab-btn {
  padding: 10px 16px; border: none; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; font-size: 14px;
}
.tab-btn.active { border-bottom-color: #0052cc; font-weight: 600; }

#statusBar { padding: 8px 24px; font-size: 13px; color: #555; }
#statusBar.error { color: #de350b; }

#filterBar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px; background: #fff; border-bottom: 1px solid #eee;
}
#filterBar label { font-size: 13px; color: #555; }
#filterBar input {
  padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px;
  font-size: 13px; width: 220px;
}
#filterBar button {
  padding: 6px 10px; border: 1px solid #ccc; background: #fafbfc;
  border-radius: 4px; cursor: pointer; font-size: 13px;
}

main { padding: 16px 24px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.kanban-board { display: flex; gap: 16px; overflow-x: auto; }
.kanban-column { background: #ebecf0; border-radius: 6px; padding: 10px; min-width: 260px; flex: 1; }
.kanban-column h3 { margin: 4px 0 10px; font-size: 14px; }
.kanban-card {
  background: white; border-radius: 4px; padding: 8px 10px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15); cursor: pointer; font-size: 13px;
}
.kanban-card.flagged { border-left: 4px solid #de350b; }

table { width: 100%; border-collapse: collapse; background: white; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
th { cursor: pointer; background: #fafbfc; user-select: none; }
tr[data-key] { cursor: pointer; }
tr[data-key]:hover { background: #f0f4ff; }

.report-card {
  background: white; border-radius: 4px; padding: 12px; margin-bottom: 10px;
  border-left: 4px solid #de350b; cursor: pointer;
}
.history-chain { font-size: 13px; margin: 6px 0; color: #333; }
.muted { color: #666; font-size: 12px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-content { background: white; border-radius: 6px; padding: 24px; max-width: 500px; width: 90%; position: relative; max-height: 80vh; overflow-y: auto; }
#modalClose { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 20px; cursor: pointer; }
