.setup-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.setup-progress__track {
  flex: 1;
  height: 0.375rem;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--surface-muted);
}

.setup-progress__fill {
  width: var(--progress, 0%);
  height: 100%;
  border-radius: var(--r-full);
  background: var(--brand);
}

.setup-progress__label {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}

.setup-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0 var(--sp-3);
  padding: var(--sp-3) 0;
}

.setup-step + .setup-step {
  border-top: 1px solid var(--line);
}

.setup-step__indicator {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.setup-step--done .setup-step__indicator {
  background: var(--brand);
  color: #ffffff;
}

.setup-step--current .setup-step__indicator {
  border: 2px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
}

.setup-step--pending .setup-step__indicator {
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
}

.setup-step__body {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
  padding-top: 0.2rem;
}

.setup-step__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
}

.setup-step__title {
  color: var(--text);
  font-weight: var(--fw-semibold);
}

.setup-step--pending .setup-step__title {
  color: var(--muted);
}

.setup-step__description {
  font-size: var(--fs-sm);
}

.setup-step__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.inbox-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.inbox-filter {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  white-space: nowrap;
}

.inbox-filter:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.inbox-filter--active {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.inbox-filter-form {
  margin: 0 0 0 auto;
}

.inbox-state-select {
  width: auto;
}

.inbox-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.inbox-item:last-child {
  border-bottom: 0;
}

.inbox-item:hover .inbox-item__title {
  color: var(--brand-dark);
}

.inbox-item__dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.inbox-item--unread .inbox-item__dot {
  background: var(--brand);
}

.inbox-item__body {
  flex: 1;
  min-width: 0;
}

.inbox-item__title {
  overflow: hidden;
  color: var(--text);
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item--unread .inbox-item__title {
  font-weight: var(--fw-semibold);
}

.inbox-item__meta {
  overflow: hidden;
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__badge {
  flex: 0 0 auto;
}

.attendance-entry-progress,
.movement-entry-context {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.attendance-entry-row__student {
  min-width: 0;
}

.attendance-entry-list {
  padding-bottom: var(--sp-4);
}

.attendance-entry-list > turbo-frame {
  border-bottom: 1px solid var(--line);
}

.attendance-entry-list > turbo-frame:last-child {
  border-bottom: 0;
}

.attendance-entry-list .attendance-mark-row {
  border-bottom: 0;
}

.attendance-entry-row__error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.attendance-summary-row {
  border-left: 3px solid transparent;
  padding-left: var(--sp-3);
}

.attendance-summary-row--present {
  border-left-color: var(--brand);
}

.attendance-summary-row--absent {
  border-left-color: var(--danger);
}

.attendance-summary-row--late,
.attendance-summary-row--excused {
  border-left-color: var(--accent);
}

.attendance-entry-actions,
.movement-entry-actions {
  position: sticky;
  bottom: var(--sp-3);
  z-index: 5;
  justify-content: space-between;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.attendance-correction-form {
  display: grid;
  grid-template-columns: minmax(8rem, 0.6fr) minmax(12rem, 1fr) auto;
  align-items: end;
  gap: var(--sp-2);
}

.attendance-correction-reason {
  flex: 2 1 18rem;
}

.attendance-review-cards {
  display: none;
  gap: var(--sp-2);
}

.attendance-review-card {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.attendance-review-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.movement-entry-fields {
  display: grid;
  gap: var(--sp-4);
}

.movement-entry-fieldset {
  background: var(--surface-hover);
}

.movement-entry-inline-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--sp-3);
}

.scanner-location {
  display: grid;
  gap: var(--sp-3);
}

.scanner-location__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.scanner-location__actions p {
  font-size: var(--fs-sm);
}

.scanner-camera {
  display: grid;
  gap: var(--sp-3);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #0f172a;
  color: #ffffff;
}

.scanner-camera__video {
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  object-fit: cover;
}

.scanner-camera__status {
  padding: 0 var(--sp-4) var(--sp-4);
  color: #ffffff;
  font-weight: var(--fw-semibold);
}

.scanner-recent {
  display: grid;
  gap: var(--sp-2);
}

.scanner-recent ul {
  display: grid;
  gap: var(--sp-1);
  margin: 0;
  padding-left: var(--sp-5);
}

.qr-confirmation {
  display: grid;
  gap: var(--sp-4);
  max-width: 54rem;
}

.transport-mobile-shell {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-8) + env(safe-area-inset-bottom, 0px));
}

.transport-mobile-shell__navigation {
  justify-content: flex-start;
}

.student-photo-card,
.student-photo-preview,
.student-qr-print-photo {
  margin: 0;
}

.student-photo-card__image,
.student-photo-preview__image,
.student-qr-print-photo__image {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
  object-fit: cover;
}

.student-photo-card__image {
  width: min(100%, 10rem);
  aspect-ratio: 1;
}

.student-photo-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.student-photo-preview__image {
  width: 4.5rem;
  aspect-ratio: 1;
}

.student-qr-card,
.student-qr-print-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-4);
}

.student-qr-print-identity {
  min-width: 0;
}

.student-qr-print-photo__image {
  width: min(100%, 9rem);
  aspect-ratio: 3 / 4;
}

.student-qr-card__code {
  width: min(100%, 15rem);
  aspect-ratio: 1;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #ffffff;
}

.student-qr-card__code svg {
  display: block;
  width: 100%;
  height: auto;
}

.student-qr-print-card {
  width: min(100%, 44rem);
  margin: 0 auto;
}

.student-qr-batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.student-qr-batch-grid .student-qr-print-card {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.student-qr-batch-grid .student-qr-print-layout {
  grid-template-columns: minmax(5rem, 8rem) minmax(0, 1fr);
}

.student-qr-batch-grid .detail-list > div {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0.25rem 0;
}

@media (max-width: 700px) {
  .student-qr-batch-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-qr-batch-grid .student-qr-print-layout {
    grid-template-columns: minmax(5rem, 8rem) minmax(0, 1fr);
  }
}

.fee-balance-hero__amount {
  display: grid;
  gap: var(--sp-1);
}

.fee-balance-hero__value,
.online-payment-checkout__amount {
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

.fee-balance-hero__label {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.online-payment-offer {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-lg);
  background: var(--brand-soft);
}

.online-payment-checkout {
  display: grid;
  justify-items: start;
  gap: var(--sp-4);
}

.online-payment-checkout__status:empty {
  display: none;
}

.online-payment-resolution {
  margin-top: var(--sp-3);
}

.fee-receipt-shell {
  display: grid;
  gap: var(--sp-4);
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}

.fee-receipt {
  display: grid;
  gap: var(--sp-5);
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.fee-receipt__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--text);
}

.fee-receipt__number {
  margin: 0;
  text-align: right;
}

.fee-receipt__number dt {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.fee-receipt__number dd {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
}

.fee-receipt__copy {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fee-receipt__copy--duplicate {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border: 2px solid currentColor;
  border-radius: var(--r-md);
}

.fee-receipt__canceled {
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--danger);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: var(--fw-semibold);
}

.fee-receipt__imported {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-muted);
  color: var(--text);
  font-weight: var(--fw-semibold);
}

.fee-receipt--canceled .fee-receipt__lines,
.fee-receipt--canceled .fee-receipt__words {
  text-decoration: line-through;
}

.fee-receipt__amount {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
  white-space: nowrap;
}

.fee-receipt__words {
  color: var(--text);
  font-weight: var(--fw-medium);
}

.fee-receipt__footer {
  display: grid;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
}

.fee-receipt-shell > .action-bar {
  justify-content: flex-end;
}

.report-card-shell {
  display: grid;
  gap: var(--sp-4);
  width: min(100%, 60rem);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}

.report-card-shell > .action-bar {
  justify-content: flex-end;
}

.report-card {
  display: grid;
  gap: var(--sp-4);
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
}

.report-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--text);
}

.report-card__logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.report-card__school {
  display: grid;
  gap: 0.125rem;
}

.report-card__school p {
  margin: 0;
}

.report-card__school-name {
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}

.report-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin: 0;
  font-size: var(--fs-lg);
}

.report-card__period {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.report-card > *,
.report-card__section > * {
  min-width: 0;
}

.report-card__label-pair {
  display: inline-flex;
  flex-direction: column;
}

.report-card__label-alt {
  color: var(--muted);
  font-size: 0.85em;
  font-weight: var(--fw-medium);
}

.report-card__label-alt:lang(hi) {
  font-family: "Inter Variable", "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif;
}

.report-card__label-alt:lang(te) {
  font-family: "Inter Variable", "Noto Sans Telugu Variable", "Noto Sans Telugu", "Nirmala UI", "Gautami", system-ui, sans-serif;
}

.report-card__student,
.report-card__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--sp-2) var(--sp-4);
  margin: 0;
}

.report-card__student dt,
.report-card__summary dt {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.report-card__student dd,
.report-card__summary dd {
  margin: 0;
  font-weight: var(--fw-medium);
}

.report-card__student-wide {
  grid-column: 1 / -1;
}

.report-card__section {
  display: grid;
  gap: var(--sp-2);
}

.report-card__section h2 {
  margin: 0;
  font-size: var(--fs-md);
}

.report-card__table-wrap {
  overflow-x: auto;
}

.report-card__table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.report-card__table th,
.report-card__table td {
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.report-card__table thead th,
.report-card__table tfoot th,
.report-card__table tfoot td {
  background: var(--surface-muted);
  font-weight: var(--fw-semibold);
}

.report-card__table--grouped thead tr:first-child th[scope="colgroup"] {
  text-align: center;
}

.report-card__numeric {
  text-align: center !important;
}

td.report-card__numeric {
  white-space: nowrap;
}

.report-card__unit {
  display: block;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: normal;
}

.report-card__key,
.report-card__notes,
.report-card__issued {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.report-card__notes {
  padding-left: var(--sp-4);
}

.report-card__remarks {
  min-height: 2.5rem;
  white-space: pre-line;
}

.report-card__footer {
  display: grid;
  gap: var(--sp-3);
}

.report-card__signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
  padding-top: var(--sp-8);
}

.report-card__signatures p {
  margin: 0;
  padding-top: var(--sp-1);
  border-top: 1px solid var(--text);
  text-align: center;
}

.inline-guardian-row__header,
.staff-row__header,
.support-access-request-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}

.guardian-evidence-event {
  display: grid;
  gap: 0.125rem;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
}

.guardian-evidence-event span {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.inline-guardian-rows {
  display: grid;
  gap: var(--sp-3);
}

.inline-guardian-row {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.inline-guardian-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--sp-3);
}

@media (max-width: 960px) {
  .attendance-review-cards {
    display: grid;
  }

  .attendance-review-table-wrap {
    display: none;
  }

  .attendance-correction-form,
  .student-qr-card,
  .student-qr-print-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-entry-actions,
  .movement-entry-actions {
    bottom: calc(var(--bottom-bar-h) + var(--sp-2) + env(safe-area-inset-bottom, 0px));
  }

  .attendance-entry-actions .button--primary,
  .movement-entry-actions .button--primary {
    flex: 1 1 100%;
  }

  .fee-receipt__number {
    text-align: left;
  }

  .inbox-filter-form {
    margin-left: 0;
  }
}
