/* here: mobile attendance check-in. Shared chrome lives in theme.css. */

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

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

.page-note { color: var(--muted); margin: 0 0 14px; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0 14px; }
.foot { margin-top: 28px; text-align: center; }

.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; }

/* Segmented controls (meeting kind, sort) */
.seg { display: flex; border: 2px solid var(--navy); border-radius: 10px; overflow: hidden; }
.seg-btn {
  flex: 1; padding: 14px 8px; font: inherit; font-weight: 700; background: #fff; color: var(--navy);
  border: 0; border-left: 1px solid var(--navy); cursor: pointer;
}
.seg-btn:first-child { border-left: 0; }
.seg-btn.active { background: var(--navy); color: #fff; }
.seg-btn small { display: block; font-weight: 400; font-size: 0.75rem; opacity: 0.85; }
.seg-small .seg-btn { padding: 8px 12px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.toolbar .seg { flex: 0 1 260px; }
.tally { font-weight: 700; color: var(--navy); white-space: nowrap; }
.plc-toggle { display: block; margin: 6px 0 10px; color: var(--ink); }

/* The roster */
.sheet { list-style: none; margin: 0; padding: 0; }
.group-head {
  margin: 16px 0 6px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 0.8rem; color: var(--navy-light);
}
.row {
  display: flex; align-items: stretch; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; overflow: hidden;
}
.row.present { border-color: #2e7d32; background: #f1f8f2; }
.row-main {
  flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 56px;
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.row-main:disabled { cursor: default; opacity: 0.6; }
.box {
  flex: 0 0 28px; height: 28px; border: 2px solid var(--navy); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff;
}
.row.present .box { background: #2e7d32; border-color: #2e7d32; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who .name { font-weight: 700; }
.who .sub { font-size: 0.82rem; color: var(--muted); }
.who .note-preview { font-size: 0.85rem; color: var(--navy-light); font-style: italic; overflow-wrap: anywhere; }
.row-note {
  flex: 0 0 auto; padding: 0 14px; border: 0; border-left: 1px solid var(--line); background: #fafafa;
  font: inherit; font-size: 0.85rem; color: var(--navy); cursor: pointer;
}
.row-note.has-note { font-weight: 700; background: #eef3fb; }
.row-note:disabled { opacity: 0.4; cursor: default; }

/* Note dialog */
.note-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex;
  align-items: flex-end; justify-content: center; z-index: 50;
}
.note-dialog { background: #fff; width: 100%; max-width: 640px; border-radius: 14px 14px 0 0; padding: 18px; }
.note-dialog h2 { margin: 0 0 10px; font-size: 1.1rem; }
.note-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border: 1px solid #bbb; border-radius: 8px; }
.note-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
