/* Registrar desk styles on top of Bootstrap 5. Colors meet WCAG AA contrast. */
:root {
  --ccs-navy: #003f87;
  --ccs-navy-dark: #002855;
  --ccs-focus: #1a5fd0;
  --ccs-surface: #ffffff;
  --ccs-page: #f5f6f8;
}

body { background: var(--ccs-page); }

/* Visible focus everywhere, not only where Bootstrap adds it. */
:focus-visible {
  outline: 3px solid var(--ccs-focus);
  outline-offset: 2px;
}

.skip-link:focus {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 2000;
  padding: .5rem 1rem;
  background: #fff;
}

.app-navbar { background: var(--ccs-navy-dark); }

.council-switch {
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: .375rem;
  padding: .3rem .75rem;
}
.council-switch:hover, .council-switch:focus { color: #fff; background: rgba(255, 255, 255, .12); }

.council-bar {
  background: #e7eef8;
  border-bottom: 1px solid #c7d5ea;
  padding: .35rem 0;
  font-size: .95rem;
}

.flash-region:empty { display: none; }

/* Combobox (Quick Find and course picker) */
.quickfind { min-width: 20rem; }
.combobox-list {
  position: absolute;
  z-index: 1060;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 20rem;
  max-height: 24rem;
  overflow-y: auto;
  margin-top: .25rem;
  background: var(--ccs-surface);
  border: 1px solid #ced4da;
  border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.combobox-option {
  display: block;
  padding: .6rem .8rem;
  color: #212529;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f5;
}
.combobox-option:hover { background: #eef4ff; color: #212529; }
.combobox-option.active {
  background: #dbe7ff;
  box-shadow: inset 4px 0 0 var(--ccs-navy);
}
.combobox-empty { padding: .6rem .8rem; color: #5c636a; }
/* "Several people match": ask, never guess. */
.combobox-prompt {
  padding: .6rem .8rem;
  font-weight: 600;
  color: #5c3c00;
  background: #fff3cd;
  border-bottom: 1px solid #f0d58c;
}
.combobox-option-conflict { border-left: 4px solid #b45309; }
.person-position { font-weight: 600; color: #212529; }

/* Commissioner page */
.commissioner-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.header-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  align-items: center;
  font-size: 1.05rem;
}
/* Tabs wrap on tablets rather than scrolling sideways. */
.commissioner-tabs .nav-link { white-space: nowrap; min-height: 2.75rem; }
.tab-content { background: var(--ccs-surface); padding: 1rem; border: 1px solid #dee2e6; border-top: 0; }

.quick-add { background: #fbfcfe; border-left: 4px solid var(--ccs-navy); }
.quick-add .btn-group .btn { min-height: 2.5rem; }
.records-table td, .records-table th { padding-top: .5rem; padding-bottom: .5rem; }
.editing-row > td { background: #fff8e1; }
.identity-list dt { font-weight: 600; color: #495057; }
.notes-box { background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; padding: 1rem; }

/* Dashboard */
.dashboard-find { max-width: 44rem; }
.stat-card {
  display: block;
  height: 100%;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  background: var(--ccs-surface);
  border: 1px solid #dee2e6;
  border-radius: .5rem;
}
.stat-card:hover { border-color: var(--ccs-navy); }
.stat-value { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: #495057; }
.stat-attention { border-left: 5px solid #b45309; }

.auth-panel {
  max-width: 38rem;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--ccs-surface);
  border: 1px solid #dee2e6;
  border-radius: .75rem;
}
.form-narrow { max-width: 62rem; }

kbd { font-size: .72em; padding: .1rem .3rem; }

/* Touch targets: nothing operational smaller than 24px; primary actions larger.
   Buttons and button-styled links align the same way. */
.btn { min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.btn-sm { min-height: 2.25rem; }
.btn-inline { display: inline; min-height: 0; padding: 0; vertical-align: baseline; }

@media (max-width: 1199.98px) {
  /* The main menu collapses below 1200px (iPads in landscape included). */
  .quickfind { width: 100%; min-width: 0; }
}
@media (max-width: 991.98px) {
  .header-actions { width: 100%; }
}

/* Secondary text on an active (blue) menu item must keep contrast. */
.dropdown-item.active .text-body-secondary,
.dropdown-item:active .text-body-secondary { color: inherit !important; }

/* Imports */
.import-row {
  background: var(--ccs-surface);
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin-bottom: .6rem;
}
.import-row-pending { border-left: 5px solid #b45309; }
.candidate-list { display: grid; gap: .4rem; }
.candidate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  border: 1px solid #e3e6ea;
  border-radius: .375rem;
  background: #fbfcfe;
}
.recon-list { display: grid; gap: .2rem; margin: 0; }
.recon-list div { display: flex; justify-content: space-between; border-bottom: 1px solid #f1f3f5; }
.recon-list dt { font-weight: 400; }
.recon-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.mapping-choice { min-width: 16rem; }

/* Districts served: many checkboxes, laid out in columns. */
.district-checklist .form-label { display: block; }
.district-checklist .form-check { break-inside: avoid; }
.district-checklist > div > div { columns: 13rem auto; }

/* Course summary: headline numbers and the completions-per-year chart. */
.course-stats .stat-value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.course-stats .stat-label { font-size: .85rem; color: var(--bs-secondary-color); }
.course-chart svg { width: 100%; max-width: 56rem; height: auto; max-height: 16rem; }
.course-chart .chart-axis { stroke: #adb5bd; stroke-width: 1; }
.course-chart .chart-student { fill: #0d6efd; }
.course-chart .chart-faculty { fill: #fd7e14; }
.course-chart .chart-transfer { fill: #20c997; }
.course-chart .chart-total, .course-chart .chart-year { font-size: 10px; fill: #495057; }
.chart-key { display: inline-block; width: .8em; height: .8em; margin-right: .3em; border-radius: 2px; vertical-align: -.05em; }
.chart-key-student { background: #0d6efd; }
.chart-key-faculty { background: #fd7e14; }
.chart-key-transfer { background: #20c997; }

/* Transcript header preview. */
.transcript-header-preview { text-align: center; }
.doc-logo-preview { display: block; max-width: 100%; max-height: 8rem; margin: 0 auto .5rem; }

/* College schedule grid. */
.schedule-grid th[scope="row"] { width: 7rem; }
.schedule-grid td { min-width: 11rem; }
.schedule-grid tr.block-meal td, .schedule-grid tr.block-break td, .schedule-grid tr.block-general td,
.schedule-grid tr.block-registration td { background: #f8f9fa; }
.schedule-grid .offering-cell + .offering-cell { margin-top: .4rem; padding-top: .4rem; border-top: 1px dashed #dee2e6; }
.schedule-grid .add-cell { display: inline-block; min-width: 2rem; text-decoration: none; }

/* Catalog section editor. */
.section-image-preview { max-width: 12rem; max-height: 14rem; border: 1px solid #dee2e6; }
.form-wide { max-width: 52rem; }

/* Attachments: the Official, From the participant, and Removed tables line up. */
.attachments-table { table-layout: fixed; }
.attachments-table th:nth-child(1) { width: 42%; }
.attachments-table th:nth-child(2) { width: 16%; }
.attachments-table th:nth-child(3) { width: 20%; }
.attachments-table td:first-child { overflow-wrap: anywhere; }

/* Check-in mode: large targets for tablets and touch, readable at arm's length. */
.checkin { max-width: 960px; margin: 0 auto; }
.checkin-counts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.checkin-count {
  display: inline-flex; align-items: baseline; gap: .35rem;
  padding: .4rem .75rem; border: 1px solid #dee2e6; border-radius: .5rem;
  background: var(--ccs-surface); color: #212529; text-decoration: none;
}
.checkin-count:hover { border-color: var(--ccs-navy); }
.checkin-count-value { font-size: 1.5rem; font-weight: 700; }
.checkin-count-waiting { border-left: 5px solid #b45309; }
.checkin-search { background: var(--ccs-surface); border: 1px solid #dee2e6; border-radius: .5rem; padding: 1rem; margin-bottom: 1rem; }
.checkin-search .form-control-lg { font-size: 1.5rem; padding: .75rem 1rem; }
.checkin-person {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  background: var(--ccs-surface); border: 1px solid #dee2e6; border-radius: .5rem;
  padding: .75rem 1rem; margin-bottom: .5rem;
}
.checkin-person.is-checked-in { border-left: 6px solid #198754; }
.checkin-person.is-cancelled { border-left: 6px solid #6c757d; opacity: .85; }
.checkin-name { font-size: 1.25rem; font-weight: 600; }
.checkin-button { min-width: 10rem; min-height: 3.25rem; font-size: 1.25rem; }
.checkin-walkin { min-height: 3.25rem; }
.checkin-done { font-size: 1.25rem; }
.checkin-done-mark { font-weight: 700; }
.checkin-empty { color: #495057; padding: .5rem 0; }
@media (max-width: 575.98px) {
  .checkin-person > form, .checkin-person > a { width: 100%; }
  .checkin-button, .checkin-person .btn-lg { width: 100%; }
}
