.students-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding-bottom: 64px;
}

.students-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.st-stat-card {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 4px 14px rgba(15, 41, 66, 0.08);
}

.st-stat-card.is-blue {
  background: #2563EB;
}

.st-stat-card.is-teal {
  background: #0F766E;
}

.st-stat-card.is-navy {
  background: #0F2942;
}

.st-stat-card.is-amber {
  background: #D97706;
}

.st-stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.st-stat-value {
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.2;
}

.students-subtabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.subtab-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.44rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--navy-900);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 41, 66, 0.05);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.subtab-btn.is-active {
  background: var(--navy-900);
  color: #FFFFFF;
}

.subtab-count {
  background: #D97706;
  color: #FFFFFF;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
}

.students-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.students-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.students-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.students-search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--navy-900);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(15, 41, 66, 0.05);
  outline: none;
}

.students-search-input:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.students-selects {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.students-htable-wrap {
  width: 100%;
  max-width: 100%;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(15, 41, 66, 0.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-400) var(--bg-page);
}

.students-htable-wrap::-webkit-scrollbar {
  height: 6px;
}

.students-htable-wrap::-webkit-scrollbar-thumb {
  background: var(--blue-400);
  border-radius: 999px;
}

.students-htable {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.students-htable th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.students-htable td {
  padding: 0.82rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--navy-900);
  vertical-align: middle;
  white-space: nowrap;
}

.students-htable tbody tr {
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.students-htable tbody tr:hover {
  background: #F8FAFF;
}

.students-htable tbody tr:last-child td {
  border-bottom: none;
}

.st-id-with-pfp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.st-mini-pfp {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.st-mini-pfp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-cell-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-900);
}

.st-cell-id {
  font-family: var(--font-en);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-600);
}

.st-cell-class {
  font-family: var(--font-en);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-body);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fab-add-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
  z-index: 40;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.fab-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.4);
}

.fab-add-btn svg {
  width: 18px;
  height: 18px;
}

.st-modal-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-page);
}

.st-modal-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.st-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.st-detail-item {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.st-detail-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-900);
}

.payment-strip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: #F8FAFF;
  border: 1px solid var(--border-subtle);
}

.payment-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.payment-months-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pay-month-pill {
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
}

.pay-month-pill.is-paid {
  background: var(--success-bg);
  color: var(--success-ink);
}

.pay-month-pill.is-unpaid {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.pay-month-pill.is-inactive {
  background: #E2E8F0;
  color: var(--text-muted);
}

.input-with-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-with-btn .form-input {
  flex: 1;
}

.reset-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reset-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: 0 3px 10px rgba(15, 41, 66, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.reset-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reset-pass-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
}

.pass-chip {
  background: var(--bg-page);
  padding: 0.16rem 0.55rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--navy-900);
}

.old-pass-badge {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.16rem 0.58rem;
  border-radius: var(--radius-pill);
  color: #FFFFFF;
}

.old-pass-badge.is-match {
  background: #16A34A;
}

.old-pass-badge.is-mismatch {
  background: #DC2626;
}

.reset-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trash-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trash-note {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger-ink);
  background: var(--danger-bg);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}

@media (max-width: 900px) {
  .students-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .students-search-wrap {
    max-width: none;
    width: 100%;
  }

  .st-detail-grid {
    grid-template-columns: 1fr;
  }

  .fab-add-btn {
    right: 16px;
    bottom: 16px;
    height: 48px;
    padding: 0 16px;
    font-size: 0.84rem;
  }
}