/* ============================================================================
   ClubBoard — design system
   A "planner" look: warm paper, ink navy, mono timetable chips,
   CCA = indigo, ECA = amber. The week strip is the signature motif.
   ========================================================================== */

:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --ink: #1b2330;
  --ink-2: #46536a;
  --ink-3: #7b879d;
  --line: #e3ded3;
  --surface: #ffffff;

  --cca: #4f46e5;
  --cca-soft: #ecebfe;
  --eca: #e8862d;
  --eca-soft: #fdf0e2;

  --danger: #d64545;
  --danger-soft: #fdecec;
  --warn: #c77b1d;
  --warn-soft: #fdf3e3;
  --ok: #2e8b57;
  --ok-soft: #e7f4ec;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(27, 35, 48, 0.08);
  --shadow-lg: 0 24px 60px rgba(27, 35, 48, 0.16);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cca) 45%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.muted {
  color: var(--ink-3);
  font-weight: 400;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 35, 48, 0.22);
}

.btn--primary:hover {
  background: #2a3650;
  box-shadow: 0 6px 20px rgba(27, 35, 48, 0.28);
}

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--ink-2);
  background: var(--surface);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.btn--danger-text {
  color: var(--danger);
}

.btn--sm {
  padding: 6px 12px;
  font-size: 0.83rem;
  border-radius: 9px;
}

.btn--lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 14px;
}

/* ---------------------------------------------------------------------------
   Brand
   --------------------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.brand__mark::before {
  background: var(--cca);
  top: 5px;
  left: 5px;
}

.brand__mark::after {
  background: var(--eca);
  bottom: 5px;
  right: 5px;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand__role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--cca-soft);
  color: var(--cca);
  border-radius: 999px;
  padding: 3px 9px;
  margin-left: 2px;
}

/* ---------------------------------------------------------------------------
   Topbar
   --------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__who {
  text-align: right;
  line-height: 1.2;
}

.topbar__who strong {
  display: block;
  font-size: 0.9rem;
}

.topbar__who small {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-2);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
   Shell + admin head
   --------------------------------------------------------------------------- */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

.admin-head,
.student-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-head h1,
.student-head h1 {
  font-size: 1.9rem;
  margin-bottom: 6px;
}

.admin-head p,
.student-head p {
  color: var(--ink-2);
  max-width: 54ch;
}

.stat-row {
  display: flex;
  gap: 10px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  text-align: center;
  min-width: 84px;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.stat span {
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------------------
   Tabs
   --------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--cca);
}

.panel.is-hidden {
  display: none;
}

.panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel__toolbar h2 {
  font-size: 1.25rem;
}

.toolbar__right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  min-width: 220px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus {
  outline: none;
  border-color: var(--cca);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cca) 18%, transparent);
}

/* ---------------------------------------------------------------------------
   Type badges, day chips, pills
   --------------------------------------------------------------------------- */
.type-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 7px;
  display: inline-block;
  white-space: nowrap;
}

.type-badge--cca {
  background: var(--cca-soft);
  color: var(--cca);
}

.type-badge--eca {
  background: var(--eca-soft);
  color: var(--eca);
}

.day-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.day-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}

.day-chip--on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.mini-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.mini-chip--cca {
  background: var(--cca-soft);
  color: var(--cca);
}

.mini-chip--eca {
  background: var(--eca-soft);
  color: var(--eca);
}

.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
}

.status-pill--ok {
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  color: var(--ok);
}

.count-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.count-pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}

/* ---------------------------------------------------------------------------
   Admin: activity cards
   --------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.act-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 2px rgba(27, 35, 48, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.act-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.act-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.act-card h3 {
  font-size: 1.15rem;
}

.act-card__desc {
  color: var(--ink-2);
  font-size: 0.88rem;
  margin: 4px 0 2px;
  flex-grow: 1;
}

.act-card__meta {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.act-card__meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.act-card__meta dt {
  color: var(--ink-3);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.act-card__meta dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
}

.icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 6px;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
  opacity: 0.6;
}

.icon-btn:hover {
  background: var(--paper-2);
  opacity: 1;
  transform: scale(1.08);
}

.icon-btn--danger:hover {
  background: var(--danger-soft);
}

/* ---------------------------------------------------------------------------
   Admin: table
   --------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 0.12s ease;
}

.table tbody tr:hover {
  background: var(--paper);
}

.stu-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stu-id small {
  display: block;
  color: var(--ink-3);
  font-size: 0.78rem;
}

.ta-right {
  text-align: right;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Empty states
   --------------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 56px 20px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty--sm {
  padding: 30px 16px;
}

.empty__icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.empty h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.empty p {
  color: var(--ink-2);
  font-size: 0.9rem;
  max-width: 40ch;
  margin: 0 auto 16px;
}

/* ---------------------------------------------------------------------------
   Student: week card
   --------------------------------------------------------------------------- */
.week-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.week-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.week-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.week-card__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.week-card__note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  min-height: 1.3em;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot--cca {
  background: #a5b4fc;
}

.dot--eca {
  background: #fbbf24;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.week-strip__day {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-align: center;
  padding: 8px 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, color 0.2s ease;
}

.week-strip__day.is-on {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ---------------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.alert--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

.alert--warn {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}

.alert--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}

/* ---------------------------------------------------------------------------
   Student: pick columns & cards
   --------------------------------------------------------------------------- */
.pick-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 860px) {
  .pick-cols {
    grid-template-columns: 1fr;
  }
}

.pick-col__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pick-col__head h2 {
  font-size: 1.15rem;
  flex-grow: 1;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.pick-card {
  appearance: none;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
  font-family: inherit;
  color: var(--ink);
}

.pick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pick-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* When 2 of a type are already picked, dim the rest so the cap is obvious.
   They stay clickable so the toast can explain why a 3rd pick is blocked. */
.pick-card.is-capped {
  opacity: 0.5;
  box-shadow: none;
}

.pick-card.is-capped:hover {
  transform: none;
  box-shadow: none;
}

.pick-card.is-selected {
  box-shadow: 0 0 0 1px currentColor, var(--shadow);
}

.pick-card--cca.is-selected {
  border-color: var(--cca);
  background: var(--cca-soft);
}

.pick-card--eca.is-selected {
  border-color: var(--eca);
  background: var(--eca-soft);
}

.pick-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: transparent;
  transition: all 0.16s ease;
}

.pick-card.is-selected .pick-card__check {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pick-card--cca.is-selected .pick-card__check {
  background: var(--cca);
  border-color: var(--cca);
}

.pick-card--eca.is-selected .pick-card__check {
  background: var(--eca);
  border-color: var(--eca);
}

.pick-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-right: 20px;
}

.pick-card__top strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.full-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.pick-card__desc {
  color: var(--ink-2);
  font-size: 0.82rem;
  margin-top: 4px;
}

.pick-card__meta {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 8px;
  flex-wrap: wrap;
}

.pick-card__spots {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.pick-card__spots.spots--full {
  color: var(--danger);
  font-weight: 500;
}

.pick-card.is-gender-restricted {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pick-card.is-gender-restricted:hover {
  transform: none;
  box-shadow: none;
}

.quota-full-text {
  color: var(--danger);
}

/* ---------------------------------------------------------------------------
   Admin: edit-student-choices picker
   --------------------------------------------------------------------------- */
.admin-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.admin-pick {
  appearance: none;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.admin-pick:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.admin-pick.is-on {
  border-color: var(--cca);
  background: var(--cca-soft);
}

.admin-pick--eca.is-on {
  border-color: var(--eca);
  background: var(--eca-soft);
}

.admin-pick.is-full,
.admin-pick.is-capped {
  opacity: 0.5;
}

.admin-pick.is-full {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.admin-pick__name {
  font-weight: 600;
  font-size: 0.88rem;
}

.admin-pick__days {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.admin-pick__days span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.admin-pick.is-on .admin-pick__days span {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------------------
   Save bar
   --------------------------------------------------------------------------- */
.savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -6px 24px rgba(27, 35, 48, 0.07);
}

.savebar__status {
  font-size: 0.92rem;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Login
   --------------------------------------------------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login__hero {
    display: none;
  }
}

.login__hero {
  background: var(--ink);
  color: #fff;
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login__hero::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.35), transparent 65%);
  top: -120px;
  right: -120px;
}

.login__hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 134, 45, 0.28), transparent 65%);
  bottom: -140px;
  left: -100px;
}

.login__hero .brand,
.login__hero h1,
.login__hero p,
.login__hero ul,
.login__hero .login__sample {
  position: relative;
  z-index: 1;
}

.login__hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 28px 0 16px;
}

.login__lede {
  color: rgba(255, 255, 255, 0.78);
  max-width: 46ch;
  font-size: 1.02rem;
}

.login__points {
  list-style: none;
  padding: 0;
  margin: 26px 0;
  display: grid;
  gap: 10px;
}

.login__points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(46, 139, 87, 0.85);
  position: relative;
  flex-shrink: 0;
}

.tick::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.login__sample {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 480px;
}

.login__sample-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.sample-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sample-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
}

.sample-days {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.sample-days .day-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: transparent;
}

.sample-days .day-chip--on {
  background: #fff;
  color: var(--ink);
}

.sample-ok {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: #86efac;
}

.login__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login__card {
  width: 100%;
  max-width: 400px;
}

.login__card h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.login__hint {
  color: var(--ink-2);
  margin-bottom: 24px;
}

.btn--google {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(27, 35, 48, 0.1);
  padding: 13px;
  font-weight: 600;
}

.btn--google:hover {
  background: var(--paper);
  box-shadow: var(--shadow);
}

.demo-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.demo-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--ink-3);
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.demo-note code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ---------------------------------------------------------------------------
   Unauthenticated screen
   --------------------------------------------------------------------------- */
.unauth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
}

.unauth__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 440px;
  text-align: center;
}

.unauth__icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.unauth__card h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.unauth__card p {
  color: var(--ink-2);
  margin-bottom: 22px;
  font-size: 0.94rem;
}

/* ---------------------------------------------------------------------------
   Forms & modal
   --------------------------------------------------------------------------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cca);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cca) 18%, transparent);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field__note {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.seg {
  display: flex;
  gap: 8px;
}

.seg__opt {
  flex: 1;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.15s ease;
}

.seg__opt.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.seg__opt[data-type="CCA"].is-on {
  background: var(--cca);
  border-color: var(--cca);
}

.seg__opt[data-type="ECA"].is-on {
  background: var(--eca);
  border-color: var(--eca);
}

.day-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.day-opt {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.day-opt.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 35, 48, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fade-in 0.18s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.22s ease;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}

.modal__head h2 {
  font-size: 1.2rem;
}

.modal__close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px 8px;
  border-radius: 8px;
}

.modal__close:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.modal__body {
  padding: 20px 22px;
}

.modal__foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

.modal__message {
  color: var(--ink-2);
  margin-bottom: 12px;
}

.modal__section {
  margin-top: 10px;
}

.modal__section h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  margin: 0 0 8px;
}

.choice-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.choice-line:last-child {
  border-bottom: none;
}

.choice-line strong {
  display: block;
  font-size: 0.92rem;
}

.choice-line small {
  color: var(--ink-3);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------------- */
#toast-root {
  position: fixed;
  bottom: 88px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 340px;
  border-left: 4px solid var(--ok);
}

.toast--error {
  border-left-color: var(--danger);
}

.toast--info {
  border-left-color: var(--warn);
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
   Motion
   --------------------------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Reports panel
   --------------------------------------------------------------------------- */
.reports-section {
  margin-bottom: 2rem;
}

.reports-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--ink);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.report-group {
  margin-bottom: 1.5rem;
}

.report-group h3 {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.report-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.report-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.report-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
  text-align: right;
}

.table--compact {
  font-size: 0.85rem;
}

.table--compact th,
.table--compact td {
  padding: 0.5rem 0.75rem;
}

/* ---------------------------------------------------------------------------
   ECA categories, by-day picker view, bulk-upload helpers
   --------------------------------------------------------------------------- */

/* Generic visibility helper (used to hide the admin activity category field) */
.is-hidden {
  display: none !important;
}

/* Athletics category pill */
.cat-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  background: var(--eca-soft);
  color: var(--eca);
  border: 1px solid color-mix(in srgb, var(--eca) 35%, transparent);
}

/* By-day grouping in the student picker */
.pick-byday {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pick-day-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.pick-day-group__head .day-chip--on {
  font-size: 0.8rem;
}

.pick-day-empty {
  color: var(--ink-3);
  font-size: 0.85rem;
  margin: 0;
  padding: 8px 2px;
}

/* Bulk-upload modal toolbar */
.modal__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
