:root {
  --sidebar-bg: #0f2d3a;
  --sidebar-accent: #18b56b;
  --page-bg: #f2f4f6;
  --card-bg: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.06);
  --theme-color: #29385d;
}

* {
  box-sizing: border-box;
}

body.app-body {
  font-family: "Manrope", sans-serif;
  background: #ffffff;
  color: var(--text-dark);
  margin: 0;
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: 80px;
  min-height: 80px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--sidebar-accent);
  display: grid;
  place-items: center;
  color: var(--sidebar-accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-logo {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 48px;
  display: block;
}

.logo-box {
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  height: 58px;
}

.header-bar {
  padding: 8px 8px;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-search {
  width: 100%;
}

.header-row {
  width: 100%;
}

.search-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.search-shell .form-control {
  height: 38px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.9rem;
  padding-right: 42px;
}

.search-shell .form-control:focus {
  border-color: var(--theme-color);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--theme-color) !important;
  box-shadow: none !important;
  outline: none !important;
}

.form-check-input:focus {
  border-color: var(--theme-color) !important;
  box-shadow: none !important;
  outline: none !important;
}

.form-check-input {
  width: 1.5em;
  height: 1.2em;
}

.form-check-input:checked {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.student-table .form-check-input {
  width: 1.2em;
  height: 1.2em;
  background-color: var(--page-bg);
  border-color: #cfd4da;
}

.student-table .form-check-input:hover,
.student-table .form-check-input:focus {
  border-color: var(--theme-color) !important;
}

.student-table .form-check-input:checked {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.search-shell i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.header-datetime {
  font-size: 0.75rem;
  line-height: 1.2;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-datetime .date-text {
  font-weight: 600;
}

.header-datetime .time-text {
  color: #6b7280;
}

.header-datetime .bi {
  font-size: 1rem;
  color: #6b7280;
}

.datetime-text {
  display: flex;
  flex-direction: column;
}

.btn-logout {
  border-radius: 6px;
  padding: 6px 18px;
  font-weight: 600;
  border-color: #cfd4da;
}

.login-page {
  min-height: 100vh;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 16px;
}

.login-logo {
  border: 1px solid #cfd4da;
  border-radius: 6px;
  padding: 8px 28px;
  background: #ffffff;
  font-weight: 600;
  color: #111827;
  text-align: center;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #cfd4da;
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.login-title {
  font-weight: 600;
  text-align: center;
  margin-bottom: 18px;
}

.login-field {
  margin-bottom: 14px;
}

.login-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.login-input {
  height: 38px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.9rem;
}

.login-input:focus {
  border-color: var(--theme-color);
  box-shadow: none;
}

.login-forgot {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: none;
  margin-top: 6px;
}

.login-forgot:hover {
  color: #374151;
}

.login-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.login-btn {
  min-width: 120px;
  border-radius: 6px;
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
}

.login-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  background: #f3f4f6;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 1.05rem;
}

.app-layout {
  flex: 1;
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  background: linear-gradient(180deg, #0f2d3a 0%, #0b2531 100%);
  color: #d4dee6;
}

.app-sidebar.offcanvas-lg {
  --bs-offcanvas-width: 260px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.app-sidebar .offcanvas-body {
  padding: 12px 0 24px;
}

.superadmin-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 12px;
}

.superadmin-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #1f3946;
}

.superadmin-meta {
  line-height: 1.2;
}

.superadmin-name {
  font-weight: 600;
  font-size: 1rem;
  color: #f8fafc;
}

.superadmin-email {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.sidebar-divider {
  height: 1px;
  margin: 0 18px 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  padding-top: 4px;
}

.sidebar-nav a {
  color: #c5d1d9;
  text-decoration: none;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
}

.sidebar-nav a i {
  font-size: 1.05rem;
  color: #9fb3be;
}

.sidebar-nav a .bi-grid {
  color: #00a2ff;
}

.sidebar-nav a:hover .bi-grid {
  color: #ffffff;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border-left-color: transparent;
}

.sidebar-nav a.active i {
  color: var(--sidebar-accent);
}

.sidebar-nav a.sidebar-primary {
  font-weight: 600;
  font-size: 1rem;
  color: #f8fafc;
}

.sidebar-sub {
  padding: 0 24px 8px 56px;
}

.sidebar-sub a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: #aab7c2;
  text-decoration: none;
}

.sidebar-sub a.active {
  color: var(--sidebar-accent);
  font-weight: 600;
}

.sidebar-sub .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  display: inline-block;
}

.app-content {
  flex: 1;
  background: var(--page-bg);
  padding: 0;
}

.content-body {
  padding: 28px 28px 40px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.dashboard-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #e1e5ea;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.dashboard-card .card-header {
  padding: 16px 18px 6px;
  border-bottom: none;
  background: transparent;
}

.dashboard-card .card-title {
  font-weight: 600;
  font-size: 1rem;
}

.dashboard-card .card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.card-icon.icon-primary {
  background: rgba(13, 110, 253, 0.12);
  color: var(--bs-primary);
}

.card-icon.icon-success {
  background: rgba(25, 135, 84, 0.12);
  color: var(--bs-success);
}

.card-icon.icon-warning {
  background: rgba(255, 193, 7, 0.18);
  color: var(--bs-warning);
}

.card-icon.icon-info {
  background: rgba(13, 202, 240, 0.15);
  color: var(--bs-info);
}

.card-icon.icon-danger {
  background: rgba(220, 53, 69, 0.12);
  color: var(--bs-danger);
}

.card-icon.icon-secondary {
  background: rgba(108, 117, 125, 0.16);
  color: var(--bs-secondary);
}

.dashboard-card .card-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

.dashboard-card .card-body {
  padding: 6px 18px 16px;
  display: grid;
  gap: 8px;
}

.dashboard-card .card-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
}

.dashboard-card .card-row strong {
  font-weight: 600;
  color: #111827;
}

.dashboard-card .card-footer {
  padding: 0 18px 18px;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: stretch;
}

.btn-view {
  border-radius: 8px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  border-color: var(--theme-color);
  color: var(--theme-color);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-view:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.student-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.filter-panel {
  background: #ffffff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.select-pill {
  border: 1px solid #cfd4da;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
  background: #ffffff;
}

.filter-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 140px 140px minmax(200px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.filter-row > * {
  width: 100%;
}

.filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

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

.import-title {
  font-size: 1.35rem;
  font-weight: 600;
}

.import-search {
  min-width: 220px;
  max-width: 360px;
  width: 100%;
}

.section-divider {
  border-bottom: none;
  margin-bottom: 30px;
}

.import-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.import-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.import-btn {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 6px;
}

.import-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.import-btn-outline {
  padding: 4px 14px;
  border-radius: 6px;
  font-weight: 600;
  border-color: var(--theme-color);
  color: var(--theme-color);
}

.import-btn-outline:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.upload-panel {
  width: 100%;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 18px 0;
  background: #ffffff;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.upload-title {
  font-weight: 600;
  margin-bottom: 0;
  min-width: 160px;
}

.upload-control {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

.upload-input {
  position: relative;
  flex: 1 1 260px;
}

.upload-input .form-control {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  padding-right: 34px;
}

.upload-input i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.upload-btn {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
}

.upload-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.upload-clear {
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  border-color: var(--theme-color);
  color: var(--theme-color);
}

.upload-clear:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.import-meta {
  margin-top: 6px;
}

.btn-approve {
  border-radius: 6px;
  padding: 4px 16px;
  border-color: var(--theme-color);
  color: var(--theme-color);
  font-weight: 600;
}

.btn-approve:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.form-block {
  margin-top: 16px;
  border-top: 1px solid #cfd4da;
  padding-top: 16px;
}

.form-block-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  align-items: start;
}

.form-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.form-row label {
  font-size: 0.9rem;
  color: #111827;
  padding-top: 6px;
}

.form-control-wrap {
  display: grid;
  gap: 4px;
}

.form-control-wrap .form-control,
.form-control-wrap .form-select {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.85rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--bs-danger);
  margin-top: -2px;
}


.additional-course {
  margin-top: 16px;
  border-top: 1px solid #cfd4da;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.course-title {
  font-weight: 600;
}

.course-switches {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.course-switches .form-check-input:checked,
.status-switch .form-check-input:checked {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

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

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.submit-btn {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
  padding: 6px 22px;
  border-radius: 6px;
}

.submit-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.form-wrapper {
  background: #ffffff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  padding: 18px 20px 24px;
  margin-top: 16px;
  width: 70%;
}

.form-wrapper .form-block:first-child {
  border-top: none;
  padding-top: 0;
}

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

.fees-title {
  font-size: 1.35rem;
  font-weight: 600;
}

.fees-add-btn {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 6px;
}

.fees-add-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.fees-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.fees-card {
  border: none;
  border-radius: 0;
  background: #ffffff;
}

.fees-card-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #cfd4da;
  font-weight: 600;
  background: #f3f4f6;
  font-size: 1rem;
}

.fees-card-body {
  padding: 8px 12px;
  display: grid;
  gap: 8px;
}

.fees-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid #cfd4da;
  border-radius: 0;
  background: #ffffff;
  font-size: 0.95rem;
}

.fees-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  color: #6b7280;
}

.fees-switch .form-check-input {
  width: 2.2em;
  height: 1.2em;
}

.fees-switch .form-check-input:checked {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.fees-switch .active-text {
  color: #111827;
}

.popup-card {
  display: grid;
  gap: 8px;
}

.popup-title {
  font-weight: 600;
}

.popup-body {
  border: 1px solid #6b7280;
  border-radius: 6px;
  background: #ffffff;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #6b7280;
  font-weight: 600;
}

.popup-input {
  margin: 16px 12px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.fees-modal .modal-dialog {
  max-width: 320px;
}

.fees-modal .modal-content {
  border-radius: 6px;
  border: 1px solid #6b7280;
}

.fees-modal .modal-header {
  border-bottom: 1px solid #6b7280;
}

.fees-modal .modal-body {
  padding: 16px;
}

.fees-modal .modal-footer {
  border-top: none;
  padding: 0 16px 16px;
}

.fees-modal .popup-input {
  margin: 0;
}

@media (max-width: 991.98px) {
  .fees-layout {
    grid-template-columns: 1fr;
  }
}

.fees-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.fees-module-actions {
  display: flex;
  gap: 10px;
}

.terms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.terms-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.terms-selects {
  display: flex;
  gap: 10px;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.term-card {
  border: none;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.term-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: none;
  font-weight: 600;
  background: transparent;
  border-bottom: 1px solid #cacaca;
}

.term-add {
  border: none;
  background: transparent;
  color: var(--theme-color);
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
}

.term-body {
  padding: 8px 12px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
}

.term-row input {
  width: 90px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  text-align: right;
  font-size: 0.85rem;
}

.term-striped .term-row:nth-child(odd) {
  background: #f9fafb;
}

.term-striped .term-row {
  padding: 6px 8px;
  border-radius: 6px;
}

.term-total {
  border-top: 1px solid #e1e5ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-weight: 600;
  margin-top: auto;
}

.term-card-empty .term-body {
  min-height: 180px;
}

.additional-grid {
  margin-top: 18px;
}

.term-card-small {
  max-width: 280px;
}

.fees-list {
  display: grid;
  gap: 12px;
}

.fees-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

@media (max-width: 991.98px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }

  .fees-module-header,
  .terms-header {
    flex-wrap: wrap;
  }
}

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

.student-details,
.fees-details {
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  margin-right: auto;
}

.details-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.details-grid {
  border: 1px solid #cfd4da;
  border-radius: 6px;
  padding: 12px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 130px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 0.9rem;
  background: #ffffff;
  position: relative;
}

.details-grid::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  background: #cfd4da;
  transform: translateX(-0.5px);
}

.details-grid > :nth-child(4n + 1),
.details-grid > :nth-child(4n + 2) {
  padding-right: 30px;
}

.details-grid > :nth-child(4n + 3),
.details-grid > :nth-child(4n + 4) {
  padding-left: 30px;
}

.detail-label {
  font-weight: 600;
  color: #111827;
  text-align: left;
}

.detail-value {
  color: #111827;
  text-align: right;
}

.fees-table {
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #ffffff;
  overflow-x: auto;
}

.fees-table-header,
.fees-table-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 120px 120px 160px 120px;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  min-width: 720px;
}

.fees-accordion .accordion-item {
  border: none;
  min-width: 720px;
}

.fees-accordion .accordion-button {
  padding: 8px 12px;
  width: 100%;
  background: #ffffff;
  border: none;
  box-shadow: none;
}

.fees-accordion .accordion-button::after {
  display: none;
}

.fees-accordion .accordion-body {
  padding: 8px 12px 12px;
  min-width: 720px;
}

.fees-accordion .accordion-item:nth-of-type(odd) .accordion-body {
  background: #f9fafb;
}

.fees-accordion .accordion-collapse {
  border-bottom: 1px solid #cfd4da;
}

.fees-table-header {
  background: #f3f4f6;
  font-weight: 600;
  border-bottom: 1px solid #cfd4da;
}

.fees-table-row {
  border-bottom: 1px solid #cfd4da;
}

.fees-table-row:last-of-type {
  border-bottom: none;
}

.select-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.select-all .checkbox-cell {
  margin-left: auto;
}

.partial-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0 6px;
}

.partial-summary .partial-values,
.partial-summary .partial-statuses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  column-gap: 12px;
  text-align: center;
}

.partial-summary .partial-statuses {
  color: #6b7280;
  font-size: 0.75rem;
}

.partial-summary::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 1px;
  background: #cfd4da;
}

.fees-table-row .checkbox-cell,
.fees-table-header .checkbox-cell {
  justify-self: end;
}

.fees-sub {
  padding: 8px 12px 12px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #cfd4da;
  min-width: 720px;
}

.fees-sub-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  font-size: 0.85rem;
  padding: 6px 8px;
}

.fees-sub-row:nth-child(odd) {
  background: #f9fafb;
  border-radius: 6px;
}

.fees-left {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.fees-left > div {
  display: grid;
  gap: 6px;
}

.fees-left > div:last-child {
  min-width: 80px;
  text-align: right;
}

.partial-placeholder {
  width: 1px;
  height: 1px;
}

.term-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.term-label i {
  font-size: 0.7rem;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.fees-accordion .accordion-button:not(.collapsed) .term-label i {
  transform: rotate(90deg);
}

.partial-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-self: stretch;
  width: 100%;
}

.partial-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partial-title {
  font-size: 0.84rem;
  color: #6b7280;
}

.partial-fields {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.partial-field {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  color: #6b7280;
}

.partial-field span {
  white-space: nowrap;
}

.partial-field .form-control {
  width: 94px;
  height: 34px;
  font-size: 0.84rem;
}

.partial-group .form-check-input {
  width: 2.04em;
  height: 1.15em;
}

.fees-additional {
  padding: 8px 12px 12px;
  min-width: 720px;
}

.fees-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #cfd4da;
  font-weight: 600;
}


.counter-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 16px;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding: 12px 28px 16px;
  border-top: 1px solid #cfd4da;
  margin-left: -28px;
  margin-right: -28px;
  z-index: 5;
}

.parents-dashboard .section-divider {
  margin-top: 6px;
}

.parents-dashboard-header {
  background: #ffffff;
  border-top: 6px solid #e2186b;
  border-bottom: 1px solid #e2e6f2;
  box-shadow: 0 12px 28px rgba(17, 36, 74, 0.12);
}

.parents-header-top {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.parents-bank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  background: #ffffff;
}

.parents-bank-logo {
  height: 36px;
  width: auto;
  display: block;
}

.parents-bank-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #2b2f8a;
}

.parents-school-title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #2b2f8a;
  letter-spacing: 0.4px;
}

.parents-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.parents-header-band {
  height: 10px;
  background: linear-gradient(90deg, #2b2f8a, #2b5bff);
}

.parents-transaction {
  display: flex;
  justify-content: flex-end;
}

.transaction-link {
  color: #111827;
  font-weight: 600;
  text-decoration: underline;
}

.parents-dashboard .fees-table-header,
.parents-dashboard .fees-table-row {
  grid-template-columns: minmax(0, 1fr) 130px 120px 150px 120px;
}

.parents-fees-sub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 120px 150px 120px;
  gap: 8px;
  /* padding: 6px 12px; */
}

.parents-fee-list {
  grid-column: 1 / 3;
  display: grid;
  gap: 6px;
}

.parents-fees-sub-row .partial-group {
  grid-column: 4 / 6;
  justify-self: end;
  align-self: start;
}

.parents-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 8px;
}

.parents-fee-row span:last-child {
  text-align: left;
  padding-left: 10px;
}

.counter-collection-page .parents-fee-row span:last-child {
  display: block;
  text-align: right;
  justify-self: stretch;
  padding-left: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.counter-collection-page .fees-table-row > span:nth-child(2) {
  display: block;
  text-align: right;
  justify-self: stretch;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.counter-collection-page .fees-table-row > span:nth-child(3) {
  text-align: center;
}

.counter-collection-page .fees-table-header > span:nth-child(3) {
  text-align: center;
}

.counter-collection-page .fees-details {
  --cc-amount-col: 130px;
}

.counter-collection-page .fees-details .fees-table-header,
.counter-collection-page .fees-details .fees-table-row,
.counter-collection-page .fees-details .parents-fees-sub-row {
  grid-template-columns: minmax(0, 1fr) var(--cc-amount-col) 120px 150px 120px;
}

.counter-collection-page .fees-details .parents-fee-row {
  grid-template-columns: minmax(0, 1fr) var(--cc-amount-col);
}

.counter-collection-page .parents-fee-list,
.counter-collection-page .parents-fee-row {
  width: 100%;
}

.parents-wrapper {
  width: 70%;
  margin: 0 auto;
}

.parents-dashboard .select-all {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.parents-dashboard .select-all .checkbox-cell {
  margin-left: 0;
  justify-self: end;
}

.parents-dashboard .fees-table-header .checkbox-cell,
.parents-dashboard .fees-table-row .checkbox-cell {
  align-self: center;
}

.parents-dashboard .fees-table .form-check-input {
  margin: 0;
}

.parents-dashboard .partial-summary {
  text-align: left;
}

.parents-dashboard .partial-summary .partial-values,
.parents-dashboard .partial-summary .partial-statuses {
  justify-items: start;
  text-align: left;
}

.parents-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 991.98px) {
  .parents-header-top {
    padding: 10px 16px;
  }

  .parents-school-title {
    text-align: left;
    width: 100%;
  }

  .parents-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .parents-dashboard .fees-table-header,
  .parents-dashboard .fees-table-row {
    grid-template-columns: minmax(0, 1fr) 120px 110px 130px 100px;
  }

  .parents-fees-sub-row {
    grid-template-columns: minmax(0, 1fr) 120px 110px 130px 100px;
  }

  .parents-fee-row {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .parents-wrapper {
    width: 100%;
  }
}

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

.user-table {
  background: #ffffff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  overflow: hidden;
}

.user-table .table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.user-table .table thead th {
  background: #f3f4f6;
  font-weight: 600;
  border-bottom: 1px solid #cfd4da;
}

.user-table .table tbody tr {
  border-bottom: 1px solid #cfd4da;
}

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

.user-table .table th,
.user-table .table td {
  border: none;
  padding: 10px 12px;
  vertical-align: middle;
}

.user-link {
  color: #111827;
  text-decoration: underline;
  font-weight: 600;
}

.user-link:hover {
  color: #111827;
}

.status-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.status-toggle .form-check-input {
  margin: 0;
}

.status-inactive {
  color: #9ca3af;
  font-size: 0.85rem;
}

.status-active {
  color: #111827;
  font-size: 0.85rem;
}

.user-modal .modal-dialog {
  max-width: 420px;
}

.user-modal .modal-content {
  border-radius: 8px;
  border: 1px solid #cfd4da;
}

.user-modal .modal-header {
  border-bottom: 1px solid #cfd4da;
}

.user-modal .modal-title {
  font-weight: 600;
}

.user-modal .modal-body {
  padding: 16px 20px;
}

.user-form {
  display: grid;
  gap: 12px;
}

.user-form .form-label {
  font-weight: 400;
  font-size: 0.85rem;
  margin: 0;
}

.user-form .form-control,
.user-form .form-select {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.85rem;
}

.user-modal .modal-footer {
  border-top: 1px solid #cfd4da;
  padding: 12px 20px;
  justify-content: flex-end;
  gap: 10px;
}

.user-details {
  display: grid;
  gap: 12px;
}

.user-detail {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.user-detail .detail-label {
  font-weight: 400;
  color: #111827;
}

.user-detail .detail-value {
  color: #374151;
  font-weight: 600;
}

.user-account-page .form-switch {
  padding-left: 0.5em;
}

@media (max-width: 991.98px) {
  .student-details,
  .fees-details {
    width: 100%;
  }

  .details-grid {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .details-grid::before {
    display: none;
  }

  .details-grid > :nth-child(4n + 1),
  .details-grid > :nth-child(4n + 2),
  .details-grid > :nth-child(4n + 3),
  .details-grid > :nth-child(4n + 4) {
    padding-left: 0;
    padding-right: 0;
  }

  .fees-table-header,
  .fees-table-row {
    grid-template-columns: 1fr 100px 100px 120px 90px;
  }
}

@media (max-width: 991.98px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.filter-select {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.85rem;
  color: #6b7280;
}

.filter-switch {
  height: 36px;
  border-radius: 6px;
  border: none;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
  background: #ffffff;
}

.filter-switch .form-check-input {
  width: 38px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.filter-switch .form-check-input:checked {
  background-color: #18b56b;
  border-color: #18b56b;
}

.filter-date,
.filter-search {
  position: relative;
}

.filter-search {
  max-width: none;
}

.filter-date .form-control,
.filter-search .form-control {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #cfd4da;
  font-size: 0.85rem;
  padding-right: 34px;
}

.filter-date i,
.filter-search i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  font-size: 0.9rem;
}

.filter-btn {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #ffffff;
  font-weight: 600;
  padding: 0;
  width: 96px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.filter-btn:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.filter-clear {
  padding: 0;
  width: 96px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 600;
  border-color: #cfd4da;
}

.student-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #374151;
  flex-wrap: wrap;
}

.btn-export {
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-color: var(--theme-color);
  color: var(--theme-color);
}

.btn-export:hover {
  background: #0379af;
  border-color: #0379af;
  color: #ffffff;
}

.pager {
  font-size: 0.8rem;
  color: #6b7280;
  margin-left: auto;
}

.pager-bottom {
  text-align: right;
  margin-top: 10px;
}

.student-table .table {
  font-size: 0.85rem;
  background: #ffffff;
}

.student-table {
  background: #ffffff;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  padding: 12px;
}

.student-table .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #f9fafb;
}

.student-table .table-striped > tbody > tr > * {
  background-color: #ffffff;
  box-shadow: none;
}

.student-table .table tbody tr:hover > * {
  background-color: rgba(41, 56, 93, 0.12);
}

.student-table .table thead th {
  background: #f3f4f6;
  font-weight: 600;
}

.student-table .table th,
.student-table .table td {
  border: none;
  vertical-align: middle;
}

.status-paid {
  color: var(--bs-success) !important;
  font-weight: 400;
}

.status-pending {
  color: var(--bs-danger) !important;
  font-weight: 400;
}

.card-shell {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.profile-card {
  padding: 28px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f3f5;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 1.4rem;
}

.info-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.info-value {
  font-weight: 500;
  color: #111827;
}

.flag-india {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid #d1d5db;
  background: linear-gradient(#ff9933 0 33%, #ffffff 33% 66%, #128807 66%);
  display: inline-block;
}

.email-card {
  margin-top: 24px;
  overflow: hidden;
}

.email-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe4e8;
  color: #e11d48;
  font-size: 1.2rem;
}

.email-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eafbf4;
  color: #17b26a;
}

.btn-edit {
  border-radius: 8px;
  padding: 8px 28px;
  font-weight: 600;
  background: var(--sidebar-accent);
  border: none;
}

.btn-edit:hover {
  background: #0379af;
  color: #ffffff;
}

.palette-f4571e {
  background: #f4571e !important;
  color: #111111 !important;
  border: 1px solid #f4571e !important;
}

.palette-f4571e:hover {
  background: #111111 !important;
  color: #f4571e !important;
}

.palette-1c2937 {
  background: #1c2937 !important;
  color: #ffffff !important;
  border: 1px solid #1c2937 !important;
}

.palette-1c2937:hover {
  background: #ffffff !important;
  color: #1c2937 !important;
}

.palette-c84a4a {
  background: #c84a4a !important;
  color: #ffffff !important;
  border: 1px solid #c84a4a !important;
}

.palette-c84a4a:hover {
  background: #ffffff !important;
  color: #c84a4a !important;
}

.palette-0373af {
  background: #0373af !important;
  color: #ffffff !important;
  border: 1px solid #0373af !important;
}

.palette-0373af:hover {
  background: #ffffff !important;
  color: #0373af !important;
}

.palette-184c54 {
  background: #184c54 !important;
  color: #ffffff !important;
  border: 1px solid #184c54 !important;
}

.palette-184c54:hover {
  background: #ffffff !important;
  color: #184c54 !important;
}

.palette-6d2531 {
  background: #6d2531 !important;
  color: #ffffff !important;
  border: 1px solid #6d2531 !important;
}

.palette-6d2531:hover {
  background: #ffffff !important;
  color: #6d2531 !important;
}

.palette-f4571e-outline {
  background: transparent;
  color: #f4571e;
  border: 1px solid #f4571e;
}

.palette-f4571e-outline:hover {
  background: #f4571e;
  color: #111111;
  border-color: #f4571e;
}

.palette-1c2937-outline {
  background: transparent;
  color: #1c2937;
  border: 1px solid #1c2937;
}

.palette-1c2937-outline:hover {
  background: #1c2937;
  color: #ffffff;
  border-color: #1c2937;
}

.palette-c84a4a-outline {
  background: transparent;
  color: #c84a4a;
  border: 1px solid #c84a4a;
}

.palette-c84a4a-outline:hover {
  background: #c84a4a;
  color: #ffffff;
  border-color: #c84a4a;
}

.palette-0373af-outline {
  background: transparent;
  color: #0373af;
  border: 1px solid #0373af;
}

.palette-0373af-outline:hover {
  background: #0373af;
  color: #ffffff;
  border-color: #0373af;
}

.palette-184c54-outline {
  background: transparent;
  color: #184c54;
  border: 1px solid #184c54;
}

.palette-184c54-outline:hover {
  background: #184c54;
  color: #ffffff;
  border-color: #184c54;
}

.palette-6d2531-outline {
  background: transparent;
  color: #6d2531;
  border: 1px solid #6d2531;
}

.palette-6d2531-outline:hover {
  background: #6d2531;
  color: #ffffff;
  border-color: #6d2531;
}

.palette-f4571e,
.palette-1c2937,
.palette-c84a4a,
.palette-0373af,
.palette-184c54,
.palette-6d2531 {
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.form-error{
  color: #dc3545;
  font-size: 0.8rem;
  /* margin-top: 4px; */
}
@media (max-width: 991.98px) {
  .app-topbar {
    height: auto;
    min-height: 0;
  }

  .content-body {
    padding: 24px 18px 32px;
  }

  .profile-card {
    padding: 22px;
  }

  .header-bar {
    padding: 6px 8px;
    height: auto;
  }

  .header-right {
    justify-content: flex-end;
  }

  .header-datetime {
    display: none;
  }

  .header-row {
    row-gap: 8px;
  }

  .search-shell {
    max-width: none;
  }

  .header-right {
    margin-left: auto;
  }

  .header-search {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .filter-actions {
    justify-content: flex-start;
  }

  .import-search {
    max-width: none;
  }

  .pager {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.35rem;
  }

  .app-topbar {
    height: auto;
    min-height: 0;
  }

  .header-right {
    justify-content: flex-end;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: flex-start;
  }

  .import-actions {
    justify-content: flex-start;
  }

  .upload-panel {
    margin-left: 0;
    margin-right: 0;
  }

  .upload-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .upload-control {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .student-meta {
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .logo-box {
    height: 44px;
    padding: 4px 6px;
  }

  .header-left {
    gap: 6px;
  }

  .btn-logout {
    padding: 6px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .header-right {
    white-space: nowrap;
  }
}
