:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #22c55e;
  --neutral: #f59e0b;
  --border: rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font: normal 9pt/normal Arial, Helvetica, sans-serif;
  text-transform: none;
  color: #353535;
  text-decoration: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  padding: 24px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: width 0.25s ease, padding 0.25s ease, transform 0.25s ease, border 0.25s ease;
  transform: translateX(0);
  overflow: hidden;
  scrollbar-width: none;
  /* Hide on parent */
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  display: none;

  /* Hide on parent */
}

.brand {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(37, 99, 235, 0.35);
}

.brand-logo {
  width: 150px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

.nav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 24px;
  overflow-y: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.nav-links::-webkit-scrollbar {
  display: none;
}


.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #334155;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  justify-content: flex-start;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.nav-link.has-sub {
  justify-content: flex-start;
}

.nav-link.has-sub .link-icon,
.nav-link.has-sub .link-text {
  flex-shrink: 0;
}

.link-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.08);
  font-size: 16px;
  flex-shrink: 0;
}

.link-text {
  display: flex;
  align-items: center;
  line-height: 1;
}

.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 12px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 4px;
}

.hamburger:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.sidebar-collapsed .sidebar {
  flex: 0 0 72px;
  width: 72px;
  padding: 20px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  transform: translateX(0);
}

.sidebar-collapsed .brand {
  display: none;
}

.sidebar-collapsed .nav-link {
  justify-content: center;
}

.sidebar-collapsed .nav-link .link-text {
  display: none;
}

.sidebar-collapsed .submenu {
  display: none !important;
}

.sidebar-collapsed .layout {
  flex: 1 1 100%;
  width: 100%;
}

.profile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-left: auto;
  transition: background 0.2s, transform 0.1s;
}

.profile:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: scale(1.05);
}

.profile:active {
  transform: scale(0.98);
}

.profile-icon {
  color: var(--text);
  width: 24px;
  height: 24px;
}

.submenu {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 0 10px;
}

.submenu.open {
  display: flex;
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-left: 6px;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.04);
  transition: background 0.2s, color 0.2s;
}

.sub-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.caret {
  font-size: 12px;
  color: #94a3b8;
  margin-left: auto;
}

.nav-link.has-sub.open .caret {
  transform: rotate(180deg);
}

.welcome-text {
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.chevron {
  font-size: 12px;
  color: var(--muted);
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 150px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.dropdown.open {
  display: flex;
}

.dropdown a {
  padding: 12px 14px;
  color: var(--text);
  transition: background 0.2s;
}

.dropdown a:hover {
  background: rgba(37, 99, 235, 0.08);
}

.profile:hover .dropdown,
.profile:focus-within .dropdown {
  display: flex;
}

.content {
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  flex-wrap: wrap;
  width: 650px;
  margin-left: 200px;
}

.search-icon {
  font-size: 16px;
  color: #94a3b8;
}

.search-bar input,
.student-search input,
.followup-search input {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
}

.search-bar select,
.student-search select,
.followup-search select {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
}

.search-bar button,
.student-search button,
.followup-search button {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.search-bar button:hover,
.student-search button:hover,
.followup-search button:hover {
  background: #1d4ed8;
}

.search-bar button:active,
.student-search button:active,
.followup-search button:active {
  transform: translateY(1px);
}

.student-search {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 150px;
  gap: 12px;
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  align-items: center;

}

.search-spacer {
  display: block;
}

/* Remove old row styles */

.student-search input,
.student-search select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  /* Gray border */
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  box-sizing: border-box;
}

.student-search .search-btn {
  width: 90%;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  height: 100%;
  /* Match height of inputs */
  max-height: 42px;
  /* Fix height if needed */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: -45px;
  margin-left: 10px;
  font-size: 1.2rem;
}

.student-search .search-btn:hover {
  background: #1d4ed8;
}

.student-search .search-btn:active {
  transform: translateY(1px);
}

@media (max-width: 1024px) {
  .student-search {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-spacer {
    display: none;
  }
}

@media (max-width: 640px) {
  .student-search {
    grid-template-columns: 1fr;
  }
}

.followup-search {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  flex-wrap: wrap;
}

.followup-search input {
  flex: 1 1 auto;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  box-sizing: border-box;
}

/* Academic Settings & Fees search bar */
.settings-search-bar {
  width: 100%;
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-search-bar input,
.settings-search-bar select {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
}

.settings-search-bar button {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.settings-search-bar button:hover {
  background: #1d4ed8;
}

.settings-search-bar button:active {
  transform: translateY(1px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  min-height: 120px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  transform: translateY(-1px);
  transition: transform 0.15s ease;
}

.card-blue {
  background: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

.card-cyan {
  background: #a5f3fc;
  border-color: rgba(6, 182, 212, 0.35);
}

.card-amber {
  background: #fecaca;
  border-color: rgba(248, 113, 113, 0.4);
}

.card-green {
  background: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.35);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  text-align: center;
}

.icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  font-size: 16px;
}

.card-cyan .icon {
  background: rgba(6, 182, 212, 0.12);
}

.card-amber .icon {
  background: rgba(245, 158, 11, 0.14);
}

.card-green .icon {
  background: rgba(34, 197, 94, 0.14);
}

.card-value {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;

}

.pill.active {
  background: #16a34a;
  color: #ffffff;
}

.pill.inactive {
  background: #dc2626;
  color: #ffffff;
}

.pill.positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-2);
}

.pill.neutral {

  color: rgb(0, 0, 0);
  justify-content: center;
  align-items: center;
  margin-right: 500px;
}

.download-btn {
  margin-left: auto;
  background: #16a34a;
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.download-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.consulting-header-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.consulting-header-actions .records-pill {
  flex: 1;
  text-align: center;
  position: relative;
  left: 280px;
  font-size: 15px;
}

.consulting-header-actions .download-btn {
  margin-left: auto;
}

.consulting-active-toggle {
  cursor: pointer;
}

.add_newuser {
  align-items: flex-end;
  justify-content: flex-end;
}

.add_newuser_btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 130px;
  height: 40px;
  border-radius: 10px;
  border: none;
  color: rgb(11, 11, 11);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background-color: #f8fafc;
  font-size: .95rem;
  text-decoration: none;
}

.add_newuser_btn:hover {

  color: rgb(57, 63, 243);
}

.add-new-button-wrapper {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  margin-right: 20px;
  margin-bottom: 16px;
}

.centered-absolute-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  color: var(--text);
  font-size: 15px;
}

.btn-add-student {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: rgb(11, 11, 11);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background-color: #f8fafc;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn-add-student:hover {
  color: rgb(57, 63, 243);
  background-color: #f1f5f9;
  border-color: rgba(57, 63, 243, 0.3);
}

.btn-add-student-icon {
  color: #9333ea;
}

.edit-icon {
  height: 20px;
  width: 20px
}

.sparkline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  height: 70px;
  align-items: end;
}

.sparkline span {
  display: block;
  background: linear-gradient(180deg, var(--accent), rgba(59, 130, 246, 0.25));
  border-radius: 8px 8px 2px 2px;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 16px;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  justify-self: center;
  max-width: 280px;
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.student-card {
  grid-column: span 2;
  max-width: none;
  width: 100%;
  animation-delay: 0.1s;
}

.pie-card {
  justify-self: center;
  max-width: 360px;
  width: 100%;
  animation-delay: 0.3s;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.chart-header h3 {
  margin: 0;
  font-size: 16px;
}

.chart-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 180px;
  align-items: end;
}

.bar-chart div {
  background: linear-gradient(180deg, var(--accent-2), rgba(16, 185, 129, 0.2));
  border-radius: 10px 10px 4px 4px;
}

.user-list {
  display: grid;
  gap: 8px;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
  gap: 10px;
}

.user-name {
  font-weight: 600;
  color: #0f172a;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status.active {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.25);
}

.status.inactive {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.2);
}

.admissions {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.student-table th,
.student-table td {
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
  color: #0f172a;
  border: 1px solid var(--border);
}

.student-table thead th {
  background: rgba(15, 23, 42, 0.03);
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.student-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

.edit-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #000000;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.edit-btn:hover {
  background: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.25);
}

.edit-btn.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.view-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ecfeff;
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.view-btn:hover {
  background: #bae6fd;
  border-color: rgba(14, 165, 233, 0.35);
}

.view-btn:active {
  transform: translateY(1px);
}

#studentViewBody,
#followupViewBody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

#studentViewBody div,
#followupViewBody div {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
  font-size: 14px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

#studentViewBody strong,
#followupViewBody strong {
  color: #475569;
  font-weight: 700;
  min-width: 140px;
  flex: 0 0 140px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  width: min(720px, 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#studentViewModal .modal-content {
  width: min(840px, 100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #475569;
}

.modal-subtitle {
  margin: 0;
  color: #475569;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dual-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  height: 180px;
  align-items: end;
}

.bar-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  height: 100%;
  align-items: end;
}

.bar-pair span {
  display: block;
  border-radius: 8px 8px 3px 3px;
}

.bar-pair .primary {
  background: linear-gradient(180deg, var(--accent), rgba(59, 130, 246, 0.18));
}

.bar-pair .secondary {
  background: linear-gradient(180deg, var(--neutral), rgba(245, 158, 11, 0.18));
}

.alt-dual {
  grid-template-columns: repeat(4, 1fr);
}

.student-chart {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: end;
  gap: 20px;
  padding: 6px 10px 4px 0;
}

.y-axis {
  display: grid;
  align-items: center;
  justify-items: start;
  font-size: 12px;
  color: #475569;
  padding-left: 5px;
}

.student-bars {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: end;
  gap: 6px;
  height: 230px;
  background: linear-gradient(to top, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 100% calc(230px / 8);
  padding: 0 6px;
}

.student-bar {
  display: block;
  width: 70%;
  margin: 0 auto;
  border-radius: 8px 8px 3px 3px;
  background: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
  transform-origin: bottom;
  animation: barGrowUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

/* Stagger animation for each bar */
.student-bar:nth-child(1) {
  animation-delay: 0.1s;
}

.student-bar:nth-child(2) {
  animation-delay: 0.2s;
}

.student-bar:nth-child(3) {
  animation-delay: 0.3s;
}

.student-bar:nth-child(4) {
  animation-delay: 0.4s;
}

.student-bar:nth-child(5) {
  animation-delay: 0.5s;
}

.student-bar:nth-child(6) {
  animation-delay: 0.6s;
}

.student-bar:nth-child(7) {
  animation-delay: 0.7s;
}

.student-bar:nth-child(8) {
  animation-delay: 0.8s;
}

.student-bar:nth-child(9) {
  animation-delay: 0.9s;
}

/* Hover effect for bars */
.student-bar:hover {
  transform: scale(1.08) translateY(-4px);
  filter: brightness(1.15);
  z-index: 10;
}

@keyframes barGrowUp {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes tooltipFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.student-bar:nth-child(1) {
  background: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.14);
}

.student-bar:nth-child(1):hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35), 0 0 20px rgba(37, 99, 235, 0.3);
}

.student-bar:nth-child(2) {
  background: #10b981;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.14);
}

.student-bar:nth-child(2):hover {
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35), 0 0 20px rgba(16, 185, 129, 0.3);
}

.student-bar:nth-child(3) {
  background: #f59e0b;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.18);
}

.student-bar:nth-child(3):hover {
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4), 0 0 20px rgba(245, 158, 11, 0.35);
}

.student-bar:nth-child(4) {
  background: #f97316;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.18);
}

.student-bar:nth-child(4):hover {
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.4), 0 0 20px rgba(249, 115, 22, 0.35);
}

.student-bar:nth-child(5) {
  background: #6366f1;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.16);
}

.student-bar:nth-child(5):hover {
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.38), 0 0 20px rgba(99, 102, 241, 0.33);
}

.student-bar:nth-child(6) {
  background: #0ea5e9;
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.16);
}

.student-bar:nth-child(6):hover {
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.38), 0 0 20px rgba(14, 165, 233, 0.33);
}

.student-bar:nth-child(7) {
  background: #8b5cf6;
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.16);
}

.student-bar:nth-child(7):hover {
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.38), 0 0 20px rgba(139, 92, 246, 0.33);
}

.student-bar:nth-child(8) {
  background: #22c55e;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.16);
}

.student-bar:nth-child(8):hover {
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.38), 0 0 20px rgba(34, 197, 94, 0.33);
}

.student-bar:nth-child(9) {
  background: #ef4444;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.18);
}

.student-bar:nth-child(9):hover {
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4), 0 0 20px rgba(239, 68, 68, 0.35);
}

.x-labels {
  margin-top: 12px;
  margin-left: 80px;
  /* 60px Y-axis + 20px gap */
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
  align-items: center;
}

.x-labels span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Center labels within their grid cell */
  gap: 6px;
  white-space: nowrap;
}

.x-labels span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.x-labels span:nth-child(1)::before {
  background: #2563eb;
}

.x-labels span:nth-child(2)::before {
  background: #10b981;
}

.x-labels span:nth-child(3)::before {
  background: #f59e0b;
}

.x-labels span:nth-child(4)::before {
  background: #f97316;
}

.x-labels span:nth-child(5)::before {
  background: #6366f1;
}

.x-labels span:nth-child(6)::before {
  background: #0ea5e9;
}

.x-labels span:nth-child(7)::before {
  background: #8b5cf6;
}

.x-labels span:nth-child(8)::before {
  background: #22c55e;
}

.x-labels span:nth-child(9)::before {
  background: #ef4444;
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #475569;
  font-size: 13px;
  flex-wrap: wrap;
}

.legend.column {
  flex-direction: column;
  align-items: flex-start;
  /* Left-align lines relative to each other */
  gap: 12px;
  width: fit-content;
}

.legend-item {
  display: grid;
  grid-template-columns: 10px 110px auto;
  /* Dot, Label, Amount */
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.legend-item:hover {
  transform: translateX(4px);
  background: rgba(37, 99, 235, 0.05);
  color: #0f172a;
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-flex;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legend-item:hover .dot {
  transform: scale(1.4);
  box-shadow: 0 0 12px currentColor;
  animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.dot.primary {
  background: var(--accent);
}

.dot.secondary {
  background: var(--neutral);
}

.dot.success {
  background: var(--accent-2);
}

.dot.revenue {
  background: #fca5a5;
}

.dot.collected {
  background: #86efac;
}

.pie-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.pie {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(#fca5a5 0 58%, #86efac 58% 100%);
  flex: 0 0 auto;
  display: block;
  animation: pieSpinIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pie:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 30px rgba(252, 165, 165, 0.3);
  filter: brightness(1.05);
}

@keyframes pieSpinIn {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.pie::after {
  content: "";
  position: absolute;
  inset: 56px;
  background: var(--card);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: inset 0.3s ease;
}

.pie:hover::after {
  inset: 52px;
}


@media (max-width: 960px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 10px 12px;
  }

  .topbar {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px 18px;
  }

  .profile {
    padding: 8px 10px;
  }

  .welcome {
    display: none;
  }

  .cards,
  .charts {
    grid-template-columns: 1fr;
  }
}

/* ===== Login Page Styles ===== */
.login-body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding-top: 0;
  overflow: hidden;
}

.login-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
}

.login-left {
  flex: 0 0 70%;
  background-color: #fff7e694;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
}

.logo-circle {
  width: min(520px, 85%);
  height: auto;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.635);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #ff8c007b;
}

.logo-circle img {
  width: 80%;
  height: auto;
  object-fit: contain;
}



.login-form {
  flex: 1;
  margin-left: 70%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  min-height: 100vh;
}

.form-card {
  width: 100%;
  max-width: 360px;
}

.form-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.form-logo img {
  width: 280px;
  margin-bottom: 0.5rem;
  animation: logoIntro 0.9s ease-out forwards, logoFloat3D 9s ease-in-out infinite 0.9s;
  transform-origin: center;
}

.form-logo h2 {
  font-size: 2.2rem;
  color: #fd9802;
  margin-bottom: 0.5rem;
  font: bold 30pt/normal Arial, Helvetica, sans-serif;
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-field {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
}

.input-field i {
  position: absolute;
  left: 0.85rem;
  color: var(--primary-blue);
  font-size: 0.95rem;
  pointer-events: none;
}

.login-body label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.input-control {
  width: 100%;
  padding: 0.9rem 1rem;
  padding-left: 2.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: #f9fafb;
}

.input-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: #fff;
  animation: inputGlow 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(27, 191, 223, 0.35);
}

.password-toggle {
  position: absolute;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
  pointer-events: auto;
  width: auto;
  height: auto;
  min-width: 24px;
  min-height: 24px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.password-toggle i {
  pointer-events: none;
}

.password-toggle:hover {
  color: #1d4ed8;
}

.password-toggle:focus {
  outline: none;
}

#password {
  padding-right: 3.75rem;
}

.login-btn {
  width: 100%;
  padding: 0.95rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  margin-top: 0.5rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.35);
  filter: brightness(1.05);
}

.login-extra {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.login-extra a {
  color: var(--dark-blue);
  text-decoration: none;
}

.login-underline {
  width: 127%;
  min-height: 2px;
  height: 3px;
  background-color: #53badccc;
  margin-top: 14rem;
  margin-bottom: 0;
  border-radius: 2px;
  display: block !important;
  visibility: visible !important;
  position: relative;
  opacity: 1 !important;
  transform: none !important;
  left: -48px;
}

.login-message {
  margin-bottom: 1rem;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #f50000;
  box-shadow: none;
  text-align: center;
  animation: fadeInMessage 0.3s ease-out;
}

.login-message:not(:empty) {
  display: flex;
}

.login-message.success {
  background-color: #ffffff;
  color: #1de337;
  box-shadow: none;
}

@keyframes fadeInMessage {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .login-body {
    padding-top: 0;
  }

  .login-left {
    display: none;
    position: relative;
    height: auto;
    width: 100%;
  }

  .login-form {
    flex: 1;
    margin-left: 0;
    padding: 2.5rem 2rem 3rem;
    box-shadow: none;
  }

  .login-visual h1 {
    font-size: 2.4rem;
  }

  .login-form {
    flex-basis: 100%;
    padding: 2.5rem 2rem 3rem;
    box-shadow: none;
  }
}



/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-title .cursor,
.page-title .cursor.blink {
  animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  50.01%,
  100% {
    opacity: 0;
  }
}

@keyframes logoIntro {
  0% {
    opacity: 0;
    transform: translateY(35px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoFloat3D {
  0% {
    transform: translateY(0) rotateY(0deg);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.15));
  }

  25% {
    transform: translateY(-6px) rotateY(6deg);
    filter: drop-shadow(0 18px 25px rgba(15, 103, 193, 0.35));
  }

  50% {
    transform: translateY(0) rotateY(0deg);
  }

  75% {
    transform: translateY(-4px) rotateY(-6deg);
    filter: drop-shadow(0 18px 25px rgba(27, 191, 223, 0.3));
  }

  100% {
    transform: translateY(0) rotateY(0deg);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.15));
  }
}

.login-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slideFade 18s infinite;
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.login-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slideFade 18s infinite;
}

@keyframes slideFade {
  0% {
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  25% {
    opacity: 1;
  }

  30% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes noticeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes inputGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(27, 191, 223, 0.25);
  }

  50% {
    box-shadow: 0 0 12px 2px rgba(19, 131, 217, 0.3);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(27, 191, 223, 0.25);
  }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.slide-in-right:nth-child(2) {
  animation-delay: 0.2s;
}

/* ===== User Setup Page (scoped) ===== */
.user-setup-main {
  flex: 1;
  padding: 18px 28px;
  display: flex;
  justify-content: center;
}

.user-setup-page {
  width: 100%;
  max-width: 1180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: 450px;

}

.profile-page {
  width: 100%;
  max-width: 760px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-page h1,
.profile-page p {
  text-align: center;
}

.profile-avatar {
  display: grid;
  place-items: center;
  font-size: 48px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  margin: 0 auto 8px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.password-setup-page {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: 380px;
}

.profile-summary {
  display: block;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  table-layout: fixed;
}

.profile-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  color: #0f172a;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  color: #475569;
  font-weight: 700;
}

.field-value {
  color: #0f172a;
  word-break: break-word;
}

.password-setup-page h1 {
  margin: 0 0 4px;
  font-size: 24px;
  text-align: center;
}

.password-setup-page p {
  margin: 0 0 8px;
  color: var(--muted);
  text-align: center;
}

.user-setup-page h1 {
  margin: 0;
  font-size: 24px;
  text-align: left;
}

.user-setup-page p {
  margin: 4px 0 0;
  color: var(--muted);
  text-align: center;
}

.password-hint {
  margin-top: 2px;
  color: #475569;
  font-size: 13px;
  text-align: center;
}

.password-hint.error {
  color: #dc2626;
}

.hidden {
  display: none;
}

.user-setup-page form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px 22px;
  width: 100%;
}

.password-setup-form {
  grid-template-columns: 1fr;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  row-gap: 64px;
  margin-top: 10px;
  color: #0745d6;
  margin-top: -10px;
  padding: 20px;

}

.password-setup-form input {
  padding: 20px;
  gap: 70px;
}

.password-setup-form label {
  margin-bottom: 16px;


}

.password-setup-form label span {
  margin-bottom: 10px;

}

.password-setup-form label+label {
  margin-top: 40px;

}

.user-setup-main .user-setup-actions {
  justify-content: center;
  margin-top: 20px;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 240px;
  padding: 16px 24px;
  border-radius: 12px;
  background: transparent;
  color: #16a34a;
  border: 2px solid #16a34a;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  animation: fadeInMessage 0.3s ease-out;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.toast.error {
  background: transparent;
  color: #dc2626;
  border: 2px solid #dc2626;
}

.user-setup-page label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}

.user-setup-page label span::after {
  content: " *";
  color: #dc2626;
}

.user-setup-page input,
.user-setup-page select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}


.user-setup-page input:focus,
.user-setup-page select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}



.password-input {
  position: relative;
  display: block;
}

.password-input input {
  width: 100%;
  padding-right: 46px;
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
}

.pwd-toggle:hover {
  background: transparent;
}

.user-setup-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

.user-setup-actions .user-setup-btn {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  font: bold 10pt/normal Arial, Helvetica, sans-serif;
}

.user-setup-actions .user-setup-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(37, 99, 235, 0.4);
}

.user-setup-actions .user-setup-btn.primary:hover {
  background: #1d4ed8;
}

.user-setup-btn.danger {
  background: #dc2626;
  color: #fff;
  border-color: rgba(220, 38, 38, 0.4);
}

.user-setup-btn.danger:hover {
  background: #b91c1c;
}

@media (max-width: 640px) {
  .admin-profile-card {
    padding: 18px;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }
}

.user-setup-actions .user-setup-btn.secondary {
  background: #e2e8f0;
  color: var(--text);
}

.user-setup-actions .user-setup-btn.secondary:hover {
  background: #cbd5e1;
}

.user-setup-actions .user-setup-btn:active {
  transform: translateY(1px);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}

.status-toggle {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 4px;
}

.status-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #0f172a;
}

.status-option input {
  margin: 0;
}

.status-option span:last-child {
  display: inline-flex;
  align-items: center;
}

/* Remove required asterisk on status option spans */
.status-option span::after {
  content: none !important;
}

/* Admin Profile layout */
.admin-profile-card {
  width: 100%;
  max-width: 960px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.admin-profile-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.admin-profile-photo svg {
  width: 40px;
  height: 40px;
  color: #0f172a;
}

.admin-profile-top {
  display: grid;
  gap: 6px;
}

.admin-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.admin-label {
  color: #475569;
  font-weight: 700;
}

.admin-value {
  color: #0f172a;
  font-weight: 600;
}

.admin-value.success {
  color: #16a34a;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid transparent;
}

.badge.success {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.25);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
}

@media (max-width: 640px) {
  .admin-profile-card {
    padding: 18px;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.active {
  background: #16a34a;
}

.status-dot.inactive {
  background: #dc2626;
}

@media (max-width: 640px) {
  .user-setup-page {
    padding: 24px;
  }

  .user-setup-page form {
    grid-template-columns: 1fr;
  }

  .user-setup-actions {
    justify-content: stretch;
  }

  .user-setup-actions .user-setup-btn {
    flex: 1;
  }
}

/* ===== Settings & Fees Pages (shared) ===== */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-hero h1 {
  margin: 0;
  font-size: 24px;
  color: #0f172a;
}

.settings-hero p {
  margin: 4px 0 0;
  color: #475569;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-card h3 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.settings-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.settings-card input,
.settings-card select {
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
}

.settings-card .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-card button,
.settings-card .link-button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.settings-card .link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-card button.primary,
.settings-card .link-button.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.settings-card button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

/* Course settings - 2x2 grid layout */
.course-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .course-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.settings-table {
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.settings-table h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-table .table-wrap {
  flex: 1 1 auto;
  overflow: auto;
}

.settings-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 320px;
}

.settings-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-toolbar input,
.settings-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 13px;
  background: #f8fafc;
}

.settings-toolbar .pill-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  background: #e2e8f0;
  color: #0f172a;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  z-index: 999;
  overflow: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: min(1100px, 96vw);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  border: 1px solid #e2e8f0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.modal-close {
  border: none;
  background: #e2e8f0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.settings-table th,
.settings-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.settings-table th {
  color: #475569;
  font-weight: 700;
}

.settings-table td {
  color: #0f172a;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.status-pill.active {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.status-pill.inactive {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.edit-btn.small {
  background: #e0f2fe;
  color: #0ea5e9;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.settings-status {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  color: #0f172a;
}

.settings-status.error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #b91c1c;
}

.settings-status.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.total-records-display {
  text-align: center;
  margin: 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-top: -20px;
}

.settings-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.settings-actions button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Profile Sidebar ===== */
.profile-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.15);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.profile-sidebar.open {
  transform: translateX(0);
}

.profile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.profile-sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.profile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.profile-sidebar-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.profile-sidebar-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.profile-sidebar-close:hover {
  color: var(--text);
}

.profile-sidebar-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.profile-sidebar .admin-profile-card {
  max-width: 100%;
  box-shadow: none;
  border: none;
  padding: 0;
}

@media (max-width: 640px) {
  .profile-sidebar {
    width: 100vw;
    max-width: 100vw;
  }
}