/* attendance: year/session report + retroactive edits. Shared chrome lives in theme.css. */

:root { --container-max: 1300px; }

#app-screen { text-align: left; padding: 30px; }

.page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.header-actions { display: flex; gap: 10px; }

.error-message, .success-message { padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; }
.error-message { background: #fdecea; color: #8a1c13; }
.success-message { background: #e8f5e9; color: #1b5e20; }
.empty-state { color: var(--muted); text-align: center; padding: 24px 8px; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 8px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; font-size: 0.85rem; font-weight: 700; color: var(--navy); gap: 4px; }
.filters select, .modal input[type=date], .modal select, .modal textarea {
  font: inherit; padding: 8px; border: 1px solid #bbb; border-radius: 6px; background: #fff;
}
.actions { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

.table-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.grid { border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.grid th, .grid td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.grid thead th { position: sticky; top: 0; background: var(--navy); color: #fff; z-index: 2; font-weight: 700; }
.grid .who { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; border-right: 1px solid var(--line); min-width: 180px; }
.grid thead .who { background: var(--navy); z-index: 3; }
.grid .patrol-col { text-align: left; color: var(--muted); }
.grid thead .patrol-col { color: #fff; }
.grid .tally { font-weight: 700; background: #f4f6fb; }
.grid thead .tally { background: var(--navy-light); }
.grid th.meeting-col { cursor: pointer; font-weight: 400; font-size: 0.8rem; }
.grid th.meeting-col.unheld { background: #8a93a6; }
.grid th.meeting-col:hover { text-decoration: underline; }
.grid td.cell { cursor: pointer; }
.grid td.cell:hover { background: #eef3fb; }
.grid td.cell.present { color: #2e7d32; font-weight: 900; }
.grid td.cell.absent { color: #b0b0b0; }
.grid td.cell.unheld { background: #f2f2f2; }
.grid td.cell.has-note::after { content: ' \2022'; color: var(--navy-light); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; width: 100%; max-width: 420px; border-radius: 12px; padding: 20px; }
.modal h2 { margin: 0 0 12px; font-size: 1.1rem; }
.modal .block { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 0.85rem; margin-bottom: 10px; }
.modal .check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
