html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus:not(:disabled),
.btn:active:focus:not(:disabled),
.btn-link.nav-link:focus,
.form-control:focus:not(:disabled):not([readonly]),
.form-select:focus:not(:disabled),
.form-check-input:focus:not(:disabled) {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* Layout */
body.layout-fixed .main-header {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

body.layout-fixed .content-wrapper {
  margin-top: calc(3.5rem + 1px);
}

@media (min-width: 768px) {
  body.layout-fixed:not(.sidebar-collapse) .main-header {
    margin-left: 250px;
  }

  body.layout-fixed.sidebar-collapse .main-header {
    margin-left: 4.6rem;
  }
}

/* Dark mode */
.dark-mode {
  background-color: #343a40 !important;
  color: #fff !important;
}

.dark-mode .main-header {
  background-color: #343a40 !important;
  border-bottom: 1px solid #454d55;
}

.dark-mode .main-header .nav-link {
  color: #fff !important;
}

.dark-mode .navbar-nav .nav-link i {
  color: #fff !important;
}

.dark-mode .nav-sidebar .nav-link.active {
  background-color: var(--afh-accent) !important;
  color: #fff !important;
}

.dark-mode .card {
  background-color: #343a40 !important;
  color: #fff !important;
  border: 1px solid #454d55;
}

.dark-mode .card-header {
  background-color: #3f474e !important;
  border-bottom: 1px solid #454d55;
}

.dark-mode .table {
  --bs-table-bg: #343a40;
  --bs-table-color: #fff;
  --bs-table-striped-bg: #3b434a;
  --bs-table-active-bg: #454d55;
  --bs-table-hover-bg: #454d55;
  --bs-table-border-color: #4b545c;
  background-color: #343a40 !important;
  color: #fff !important;
}

.dark-mode .table> :not(caption)>*>* {
  background-color: #343a40 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.dark-mode .table thead th {
  background-color: #3f474e !important;
  color: #fff !important;
}

.dark-mode .table tbody tr:hover>* {
  background-color: #454d55 !important;
  color: #fff !important;
}

.dark-mode .table-bordered td,
.dark-mode .table-bordered th {
  border-color: #4b545c !important;
}

.dark-mode .dataTables_wrapper {
  color: #fff !important;
}

.dark-mode .dataTables_wrapper .dataTables_length,
.dark-mode .dataTables_wrapper .dataTables_filter,
.dark-mode .dataTables_wrapper .dataTables_info,
.dark-mode .dataTables_wrapper .dataTables_paginate {
  color: #fff !important;
}

.dark-mode .dataTables_wrapper input,
.dark-mode .dataTables_wrapper select {
  background-color: #454d55 !important;
  color: #fff !important;
  border: 1px solid #6c757d !important;
}

.dark-mode .page-link {
  background-color: #343a40 !important;
  color: #fff !important;
  border-color: #454d55 !important;
}

.dark-mode .page-item.active .page-link {
  background-color: #007bff !important;
  border-color: #007bff !important;
}

.dark-mode .form-control,
.dark-mode .form-select {
  background-color: #454d55 !important;
  color: #fff !important;
  border-color: #6c757d !important;
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
  background-color: #454d55 !important;
  color: #fff !important;
}

.dark-mode .dropdown-menu {
  background-color: #343a40 !important;
  border: 1px solid #454d55;
}

.dark-mode .dropdown-item {
  color: #fff !important;
}

.dark-mode .dropdown-item:hover {
  background-color: #495057 !important;
}

.dark-mode table.dataTable tbody tr,
.dark-mode table.dataTable tbody td,
.dark-mode table.dataTable thead th {
  background-color: #343a40 !important;
  color: #fff !important;
}

.dark-mode table.dataTable.stripe tbody tr.odd,
.dark-mode table.dataTable.display tbody tr.odd {
  background-color: #3b434a !important;
}

.dark-mode table.dataTable.hover tbody tr:hover,
.dark-mode table.dataTable.display tbody tr:hover {
  background-color: #495057 !important;
}

.dark-mode table.dataTable thead th {
  border-bottom: 1px solid #4b545c !important;
}

.dark-mode table.dataTable tbody td {
  border-color: #4b545c !important;
}

.dark-mode .small-box {
  color: #fff !important;
}

.dark-mode .list-group-item {
  background-color: #343a40 !important;
  color: #fff !important;
  border-color: #454d55 !important;
}

/* Field validation messages below inputs */
span.text-danger.field-validation-valid {
  display: none;
}

span.text-danger[data-valmsg-for] {
  display: block;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Disabled & readonly inputs — no text cursor, no focus ring */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  cursor: default;
  user-select: none;
  background-color: #e9ecef;
  opacity: 1;
}

.form-control:disabled:focus,
.form-control[readonly]:focus,
.form-select:disabled:focus {
  outline: none;
  box-shadow: none;
  border-color: #ced4da;
}

.dark-mode .form-control:disabled,
.dark-mode .form-control[readonly],
.dark-mode .form-select:disabled {
  background-color: #3a4046 !important;
  color: #adb5bd !important;
  cursor: default;
}

.dark-mode .form-control:disabled:focus,
.dark-mode .form-control[readonly]:focus,
.dark-mode .form-select:disabled:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #6c757d !important;
}

/* App shell & dashboard */
:root {
  --afh-primary: #0b3d6e;
  --afh-primary-dark: #082a4d;
  --afh-accent: #0ea5e9;
  --afh-accent-soft: rgba(14, 165, 233, 0.12);
  --afh-surface: #ffffff;
  --afh-page-bg: #f1f5f9;
  --afh-muted: #64748b;
  --afh-border: #e2e8f0;
  --afh-radius: 0.75rem;
  --afh-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --afh-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

body.hold-transition {
  background-color: var(--afh-page-bg);
}

.content-wrapper {
  background-color: var(--afh-page-bg);
}

/* Brand logo sizing */
.main-sidebar .brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.95;
  background: transparent;
}

/* Light theme — light sidebar, dark brand */
body:not(.dark-mode) .main-sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid var(--afh-border);
}

body:not(.dark-mode) .main-sidebar .brand-link {
  background-color: #ffffff !important;
  color: var(--afh-primary-dark) !important;
  border-bottom: 1px solid var(--afh-border) !important;
}

body:not(.dark-mode) .main-sidebar .brand-text {
  color: var(--afh-primary-dark) !important;
  letter-spacing: 0.02em;
}


body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link {
  color: #475569 !important;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link .nav-icon {
  color: #94a3b8 !important;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link:hover {
  background: var(--afh-accent-soft) !important;
  color: var(--afh-primary) !important;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link:hover .nav-icon {
  color: var(--afh-primary) !important;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link.active {
  background: var(--afh-accent-soft) !important;
  color: var(--afh-primary) !important;
}

body:not(.dark-mode) .main-sidebar .nav-sidebar .nav-link.active .nav-icon {
  color: var(--afh-accent) !important;
}

/* Dark theme — dark sidebar, light brand */
body.dark-mode .main-sidebar {
  background: linear-gradient(180deg, #1a2332 0%, var(--afh-primary-dark) 50%, var(--afh-primary) 100%) !important;
  border-right: none;
}

body.dark-mode .main-sidebar .brand-link {
  background-color: transparent !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode .main-sidebar .brand-text {
  color: #ffffff !important;
  letter-spacing: 0.02em;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link .nav-icon {
  color: rgba(255, 255, 255, 0.65) !important;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link:hover .nav-icon {
  color: #fff !important;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link.active {
  background: var(--afh-accent) !important;
  color: #fff !important;
}

body.dark-mode .main-sidebar .nav-sidebar .nav-link.active .nav-icon {
  color: #fff !important;
}

.main-sidebar .nav-treeview>.nav-item>.nav-link {
  padding-left: 1.75rem;
}

.main-sidebar .nav-treeview>.nav-item>.nav-link>p {
  margin: 0;
}

.main-header {
  border-bottom: 1px solid var(--afh-border) !important;
  box-shadow: var(--afh-shadow-sm);
}

.main-header .nav-link {
  color: #334155 !important;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--afh-primary), var(--afh-accent));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.35rem;
}

.content-header {
  padding-bottom: 0 !important;
}

.content-header .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.content-header .page-subtitle {
  color: var(--afh-muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.main-footer {
  border-top: 1px solid var(--afh-border);
  color: var(--afh-muted);
  font-size: 0.85rem;
}

.card-app {
  border: 1px solid var(--afh-border);
  border-radius: var(--afh-radius);
  box-shadow: var(--afh-shadow-sm);
}

.card-app>.card-header {
  background: var(--afh-surface);
  border-bottom: 1px solid var(--afh-border);
  padding: 1rem 1.25rem;
}

.card-app>.card-header .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--afh-surface);
  border: 1px solid var(--afh-border);
  border-radius: var(--afh-radius);
  box-shadow: var(--afh-shadow-sm);
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--afh-shadow);
  transform: translateY(-2px);
}

.stat-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-card--primary .stat-card__icon {
  background: var(--afh-accent-soft);
  color: var(--afh-primary);
}

.stat-card--success .stat-card__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.stat-card--warning .stat-card__icon {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.stat-card--info .stat-card__icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.stat-card--danger .stat-card__icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.stat-card--purple .stat-card__icon {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.stat-card__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-card__label {
  display: block;
  font-size: 0.8rem;
  color: var(--afh-muted);
  margin-top: 0.2rem;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.quick-actions .btn {
  font-weight: 500;
  border-radius: 0.5rem;
}

.quick-actions .btn-primary {
  background: var(--afh-primary);
  border-color: var(--afh-primary);
}

/* Form pages */
.form-section {
  margin-bottom: 1.75rem;
}

.form-section.mb-0 {
  margin-bottom: 0;
}

.form-section__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--afh-muted);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--afh-border);
}

.card-app .form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

.total-amount-display {
  display: flex;
  align-items: stretch;
  background: var(--afh-accent-soft);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--afh-radius);
  overflow: hidden;
}

.total-amount-display__currency {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-weight: 700;
  color: var(--afh-primary);
  background: rgba(14, 165, 233, 0.08);
  border-right: 1px solid rgba(14, 165, 233, 0.2);
}

.total-amount-display__input {
  border: none !important;
  background: transparent !important;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--afh-primary-dark);
  box-shadow: none !important;
}

.dark-mode .form-section__title {
  color: #adb5bd;
  border-color: #454d55;
}

.dark-mode .card-app .form-label {
  color: #dee2e6;
}

.dark-mode .total-amount-display {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.35);
}

.dark-mode .total-amount-display__currency,
.dark-mode .total-amount-display__input {
  color: #7dd3fc;
}

.recent-txn-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-txn-item {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--afh-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.recent-txn-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-txn-item:first-child {
  padding-top: 0;
}

.recent-txn-item:hover {
  color: inherit;
}

.recent-txn-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.recent-txn-item__id {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
}

.recent-txn-item__amount {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--afh-primary);
  white-space: nowrap;
}

.recent-txn-item__meta {
  font-size: 0.8rem;
  color: var(--afh-muted);
  margin-top: 0.2rem;
}

.recent-txn-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--afh-muted);
  font-size: 0.9rem;
}

.table-app {
  margin-bottom: 0;
}

.table-app thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--afh-muted);
  background-color: #f8fafc;
  border-bottom: 1px solid var(--afh-border);
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}

.table-app tbody td {
  padding: 0.85rem 1.25rem;
  vertical-align: middle;
  border-color: var(--afh-border);
}

.table-app tbody tr:hover td {
  background-color: var(--afh-accent-soft);
}

.card-app .table-app tbody tr:last-child td {
  border-bottom: none;
}

.dark-mode .table-app thead th {
  background-color: #3f474e;
  color: #adb5bd;
  border-color: #454d55;
}

.dark-mode .table-app tbody td {
  border-color: #454d55;
}

.dark-mode .table-app tbody tr:hover td {
  background-color: rgba(14, 165, 233, 0.15);
}

.table-app tfoot td,
.table-app-footer td {
  background-color: #f8fafc;
  border-top: 2px solid var(--afh-border);
  padding: 0.85rem 1.25rem;
}

.dark-mode .table-app tfoot td,
.dark-mode .table-app-footer td {
  background-color: #3f474e;
  border-color: #454d55;
}

.dark-mode .table-app tbody td.text-primary {
  color: var(--afh-accent) !important;
}

.dark-mode .table-app a.fw-semibold {
  color: #7dd3fc;
}

/* Search toolbar (history, lists) */
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  width: 100%;
}

.search-toolbar__input {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 420px;
}

/* Date range filter (Reports) — buttons align with inputs, not labels */
.search-toolbar--dates {
  align-items: flex-end;
}

.search-toolbar__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.search-toolbar__field {
  min-width: 10rem;
}

.search-toolbar__field .form-label {
  margin-bottom: 0.25rem;
}

.search-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.search-toolbar--dates .search-toolbar__actions .btn,
.search-toolbar--dates .search-toolbar__export {
  height: calc(1.5em + 0.75rem + 2px);
  display: inline-flex;
  align-items: center;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  white-space: nowrap;
}

.search-toolbar__export {
  margin-left: auto;
}

/* Detail page */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
}

.detail-item--full {
  grid-column: 1 / -1;
}

.detail-item__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--afh-muted);
  margin-bottom: 0.25rem;
}

.detail-item__value {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  text-transform: capitalize;
}

.status-badge--success {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.status-badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.status-badge--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.status-badge--neutral {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

.status-badge--info {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

/* DataTables in app tables */
.card-app .dataTables_wrapper .dataTables_filter input,
.card-app .dataTables_wrapper .dataTables_length select {
  border-radius: 0.375rem;
  border-color: var(--afh-border);
}

.card-app .dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

.dark-mode .dataTables_wrapper .dataTables_filter input,
.dark-mode .dataTables_wrapper .dataTables_length select {
  background-color: #454d55 !important;
  color: #fff !important;
  border-color: #6c757d !important;
}

/* Profile page */
.profile-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--afh-primary), var(--afh-accent));
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Privacy policy */
.privacy-section {
  margin-bottom: 1.5rem;
}

.privacy-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.privacy-section p,
.privacy-section li {
  color: var(--afh-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.privacy-section ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.dark-mode .privacy-section h4 {
  color: #fff;
}

.summary-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  color: var(--afh-muted);
}

.summary-card__row strong {
  color: #0f172a;
}

.summary-card__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1rem;
}

.summary-card__total strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--afh-primary);
}

@media (max-width: 767.98px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.training-lesson-content {
  min-height: 16rem;
  color: #1f2937;
  font-size: 1.05rem;
  line-height: 1.85;
  white-space: pre-wrap;
}

.dark-mode .training-lesson-content {
  color: #f3f4f6;
}

.training-lesson-content h1,
.training-lesson-content h2,
.training-lesson-content h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.75rem;
  color: #153b5b;
  font-weight: 700;
}

.training-lesson-content p,
.training-lesson-content ul,
.training-lesson-content ol,
.training-lesson-content blockquote,
.training-lesson-content pre {
  margin-bottom: 1rem;
}

.training-lesson-content blockquote {
  padding: 0.75rem 1rem;
  border-left: 4px solid #4fa7e1;
  background: #eef8fe;
}

.training-lesson-content pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #17202a;
  color: #f8fafc;
}

.dark-mode .training-lesson-content h1,
.dark-mode .training-lesson-content h2,
.dark-mode .training-lesson-content h3 {
  color: #f3f4f6;
}

.dark-mode .training-lesson-content blockquote {
  background: #2d3742;
}

.training-topic-page {
  max-width: 1100px;
  margin: 0 auto;
}

.training-topic-toolbar,
.training-completion-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.training-topic-card {
  overflow: hidden;
}

.training-completion-panel {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid #dce5ec;
  border-radius: 0.9rem;
  background: #fff;
}

.training-topic-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.training-topic-navigation__side {
  min-width: 0;
}

.training-topic-navigation__side--next {
  display: flex;
  justify-content: flex-end;
}

.training-topic-navigation__card {
  display: flex;
  width: 100%;
  min-height: 7rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  border: 1px solid #d8dee5;
  border-radius: 1rem;
  background: #fff;
  color: #28323d;
  text-decoration: none !important;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.training-topic-navigation__card:hover {
  border-color: #4fa7e1;
  color: #123f60;
  transform: translateY(-2px);
  box-shadow: 0 0.6rem 1.25rem rgba(15, 91, 140, 0.14);
}

.training-topic-navigation__card span {
  margin-bottom: 0.4rem;
  color: #7a8794;
  font-size: 0.9rem;
}

.training-topic-navigation__card strong {
  overflow: hidden;
  font-size: 1.15rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.training-topic-navigation__card--next {
  text-align: right;
}

.training-topic-navigation__index {
  display: flex;
  min-width: 7rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #557086;
  text-decoration: none !important;
}

.training-topic-navigation__index:hover {
  color: #147db5;
}

.training-topic-navigation__finished {
  display: flex;
  min-height: 7rem;
  align-items: center;
  justify-content: center;
  color: #7a8794;
}

.dark-mode .training-completion-panel,
.dark-mode .training-topic-navigation__card {
  border-color: #4b5563;
  background: #343a40;
}

.dark-mode .training-topic-navigation__card,
.dark-mode .training-topic-navigation__card:hover {
  color: #f3f4f6;
}

.dashboard-content-section {
  margin-bottom: 3rem;
}

.dashboard-content-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dce5ec;
}

.dashboard-content-section__header h2 {
  margin: 0 0 0.35rem;
  color: #153b5b;
  font-size: 1.75rem;
  font-weight: 700;
}

.dashboard-content-section__header p {
  margin-bottom: 0;
  color: #64748b;
}

.dashboard-content-section__eyebrow {
  margin-bottom: 0.35rem !important;
  color: #4fa7e1 !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-content-section__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dark-mode .dashboard-content-section__header {
  border-bottom-color: #4b5563;
}

.dark-mode .dashboard-content-section__header h2 {
  color: #f3f4f6;
}

@media (max-width: 767.98px) {
  .dashboard-content-section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-content-section__actions {
    justify-content: flex-start;
  }
}

/* Course pricing */
.course-checkout-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem;
}

.course-checkout-card__eyebrow {
    display: block;
    margin-bottom: .45rem;
    color: #0f766e;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
}

.course-checkout-card__action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .65rem;
    min-width: 12rem;
}

.course-checkout-card__action > strong {
    color: var(--text-primary, #183153);
    font-size: 1.5rem;
}

.course-checkout-card__action small { font-size: .7rem; }

.btn-paypal {
    border-color: #ffc439;
    color: #0b3060;
    background: #ffc439;
    font-weight: 700;
}

.btn-paypal:hover,
.btn-paypal:focus {
    border-color: #f2ba36;
    color: #082b55;
    background: #f2ba36;
}

.training-preview-paywall {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(15, 118, 110, .28);
    border-left: 5px solid #0f6b72;
    border-radius: 1rem;
    background: linear-gradient(110deg, rgba(207, 242, 243, .96), rgba(229, 247, 247, .9));
}

.training-preview-paywall__content {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: #4b5563;
}

.training-preview-paywall__content > span { font-size: 1.05rem; }

.training-preview-paywall__content > strong {
    color: #27313f;
    font-size: 1.35rem;
    font-weight: 700;
}

.training-preview-paywall__action { flex: 0 0 auto; }

.training-preview-paywall__action .btn-primary {
    border-color: #0b6670;
    background: #0b6670;
    font-weight: 700;
}

.training-preview-paywall__action .btn-primary:hover,
.training-preview-paywall__action .btn-primary:focus {
    border-color: #084f57;
    background: #084f57;
}

.training-topic-navigation__preview-finished {
    color: #0f6b72;
    font-weight: 700;
}

[data-theme="dark"] .training-preview-paywall {
    border-color: rgba(45, 212, 191, .3);
    border-left-color: #2dd4bf;
    background: linear-gradient(110deg, rgba(15, 118, 110, .18), rgba(15, 23, 42, .65));
}

[data-theme="dark"] .training-preview-paywall__content > span { color: #a7b6c8; }
[data-theme="dark"] .training-preview-paywall__content > strong { color: #e6edf7; }

@media (max-width: 767.98px) {
    .training-preview-paywall {
        align-items: stretch;
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .training-preview-paywall__action .btn { width: 100%; }
}

.training-topic-locked {
    color: #718096;
    background: rgba(148, 163, 184, .08);
}

@media (max-width: 767.98px) {
    .course-checkout-card .card-body { align-items: flex-start; flex-direction: column; }
    .course-checkout-card__action { align-items: flex-start; min-width: 0; }
}

.course-pricing-panel {
    padding: 1.25rem;
    border: 1px solid var(--border-color, #dbe3ec);
    border-radius: .75rem;
    background: rgba(15, 118, 110, .035);
}

.training-price-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: .3rem .65rem;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 999px;
    color: #0f766e;
    background: rgba(15, 118, 110, .08);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
}

[data-theme="dark"] .course-pricing-panel {
    background: rgba(45, 212, 191, .06);
}

[data-theme="dark"] .training-price-badge {
    border-color: rgba(94, 234, 212, .3);
    color: #5eead4;
    background: rgba(45, 212, 191, .1);
}

/* Contact Us */
.contact-page {
    width: min(900px, 100%);
    margin: 0 auto;
}

.contact-intro {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(14, 116, 144, .18);
    border-radius: 1rem;
    background: linear-gradient(120deg, rgba(224, 247, 250, .95), rgba(239, 246, 255, .95));
}

.contact-intro__icon {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 3.5rem;
    place-items: center;
    border-radius: 1rem;
    color: #fff;
    background: #0b6b83;
    font-size: 1.35rem;
}

.contact-intro h2 { margin: 0 0 .35rem; color: #17385f; font-size: 1.45rem; }
.contact-intro p { margin: 0; color: #52657d; }

.contact-form-card .card-body { padding: 1.75rem; }
.contact-form .form-label { margin-bottom: .4rem; color: var(--text-primary, #24364f); font-weight: 650; }
.contact-form textarea { min-height: 9rem; resize: vertical; }

.contact-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
}

.contact-form__footer > span { color: #64748b; font-size: .88rem; }

[data-theme="dark"] .contact-intro {
    border-color: rgba(56, 189, 248, .2);
    background: linear-gradient(120deg, rgba(14, 116, 144, .16), rgba(30, 41, 59, .72));
}

[data-theme="dark"] .contact-intro h2 { color: #e6edf7; }
[data-theme="dark"] .contact-intro p { color: #a9b7c8; }

@media (max-width: 575.98px) {
    .contact-intro { align-items: flex-start; }
    .contact-form-card .card-body { padding: 1.2rem; }
    .contact-form__footer { align-items: stretch; flex-direction: column; }
    .contact-form__footer .btn { width: 100%; }
}

/* About Us */
.about-page {
  --about-navy: #0f3655;
  --about-blue: #4fa7e1;
  --about-ink: #17283a;
  max-width: 1500px;
  margin: 0 auto 3rem;
}

.about-hero {
  position: relative;
  display: grid;
  min-height: 28rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.65fr);
  align-items: center;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 6rem);
  border-radius: 1.5rem;
  background: linear-gradient(130deg, #0b2c49 0%, #125b88 58%, #4fa7e1 120%);
  color: #fff;
  box-shadow: 0 1.25rem 2.75rem rgba(15, 54, 85, 0.22);
}

.about-hero::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  mask-image: linear-gradient(to right, #000, transparent 80%);
}

.about-hero__content {
  position: relative;
  z-index: 1;
}

.about-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-hero h2 {
  max-width: 900px;
  margin: 0 0 1.5rem;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.about-hero p {
  max-width: 800px;
  margin: 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.about-hero__visual {
  position: relative;
  min-height: 19rem;
}

.about-hero__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 9rem;
  height: 9rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2.2rem;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px rgba(255,255,255,.25), 0 1rem 2rem rgba(3, 25, 43, 0.2);
  font-size: 3.75rem;
  transform: translate(-50%, -50%) rotate(-7deg);
  backdrop-filter: blur(8px);
}

.about-hero__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.about-hero__orbit--one { width: 16rem; height: 16rem; }
.about-hero__orbit--two { width: 22rem; height: 22rem; }

.about-story,
.about-philosophy,
.about-difference {
  padding: clamp(3rem, 6vw, 6rem) clamp(0rem, 3vw, 3rem) 0;
}

.about-story {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 6vw, 7rem);
}

.about-section-heading > span {
  color: var(--about-blue);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-section-heading h2 {
  margin: 0.55rem 0 0;
  color: var(--about-ink);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.about-section-heading > p {
  max-width: 720px;
  margin: 1rem auto 0;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-section-heading--center { text-align: center; }

.about-story__content {
  padding-left: 2rem;
  border-left: 4px solid #4fa7e1;
  color: #425466;
  font-size: 1.08rem;
  line-height: 1.85;
}

.about-story__lead {
  color: #1f3448;
  font-size: 1.35rem;
}

.about-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.about-pillar-card {
  position: relative;
  overflow: hidden;
  padding: 2.25rem;
  border: 1px solid #dceaf3;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 0.7rem 1.5rem rgba(15, 91, 140, 0.09);
}

.about-pillar-card__icon {
  display: grid;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1.4rem;
  place-items: center;
  border-radius: 0.9rem;
  background: #eaf7ff;
  color: #147db5;
  font-size: 1.35rem;
}

.about-pillar-card__number {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: #d9eaf5;
  font-size: 2.6rem;
  font-weight: 800;
}

.about-pillar-card h3,
.about-difference-card h3 {
  color: var(--about-ink);
  font-weight: 700;
}

.about-pillar-card h3 { font-size: 1.3rem; }
.about-pillar-card p,
.about-difference-card p { margin: 0; color: #607080; line-height: 1.7; }

.about-difference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.about-difference-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  border: 1px solid #dce5ec;
  border-radius: 1rem;
  background: #f8fbfd;
}

.about-difference-card > i {
  flex: 0 0 auto;
  color: #4fa7e1;
  font-size: 1.7rem;
}

.about-difference-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }

.dark-mode .about-section-heading h2,
.dark-mode .about-story__lead,
.dark-mode .about-pillar-card h3,
.dark-mode .about-difference-card h3 { color: #f3f4f6; }

.dark-mode .about-story__content,
.dark-mode .about-pillar-card p,
.dark-mode .about-difference-card p { color: #cbd5e1; }

.dark-mode .about-pillar-card,
.dark-mode .about-difference-card {
  border-color: #4b5563;
  background: #343a40;
}

.dark-mode .about-pillar-card__number { color: #4b5563; }
.dark-mode .about-pillar-card__icon { background: #263d4e; color: #7dd3fc; }

@media (max-width: 991.98px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-hero__visual { display: none; }
  .about-story { grid-template-columns: 1fr; gap: 2rem; }
  .about-difference-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .about-hero { min-height: auto; padding: 2.5rem 1.5rem; border-radius: 1rem; }
  .about-pillar-grid { grid-template-columns: 1fr; }
  .about-story__content { padding-left: 1.25rem; }
  .about-pillar-card { padding: 1.5rem; }
}

@media (max-width: 767.98px) {
  .training-completion-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .training-topic-navigation {
    grid-template-columns: 1fr;
  }

  .training-topic-navigation__index {
    min-height: 4rem;
    order: 2;
  }

  .training-topic-navigation__side--next {
    order: 3;
  }
}

.dark-mode .detail-item__value,
.dark-mode .summary-card__row strong {
  color: #fff;
}

.dark-mode .summary-card__total strong {
  color: #7dd3fc;
}

.dark-mode .content-wrapper,
.dark-mode body.hold-transition {
  background-color: #2b3035 !important;
}

.dark-mode .content-header .page-title {
  color: #fff;
}

.dark-mode .content-header .page-subtitle {
  color: #adb5bd;
}

.dark-mode .stat-card {
  background: #343a40;
  border-color: #454d55;
}

.dark-mode .stat-card__value {
  color: #fff;
}

.dark-mode .stat-card__label {
  color: #adb5bd;
}

.dark-mode .card-app {
  border-color: #454d55;
}

.dark-mode .card-app>.card-header .card-title {
  color: #fff;
}

.dark-mode .recent-txn-item {
  border-color: #454d55;
}

.dark-mode .recent-txn-item__id {
  color: #fff;
}


.dark-mode .quick-actions .btn-outline-secondary {
  color: #dee2e6;
  border-color: #6c757d;
}

/* CMS-managed services */
.service-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.service-card-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
  min-width: 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3f2fb;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.5rem rgba(14, 165, 233, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card-link:hover .service-card {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(14, 165, 233, 0.23);
}

.service-card__image-wrap {
  height: 13rem;
  overflow: hidden;
  background: #eaf7ff;
}

.service-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2rem 2.25rem 1.75rem;
}

.service-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.service-card__heading h2 {
  margin: 0;
  color: #4fa7e1;
  font-size: 1.55rem;
  font-weight: 700;
  text-transform: uppercase;
}

.service-card__new {
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  color: #ea8a00;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
}

.service-card__body h3 {
  margin: 0 0 0.75rem;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 600;
}

.service-card__description {
  color: #1f2937;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  white-space: pre-line;
}

.service-card__bullets {
  color: #1f2937;
  line-height: 1.7;
  padding-left: 1.5rem;
  margin: 0 0 1.5rem;
}

.service-card__bullets li::marker {
  color: #69b8e8;
  font-size: 1.25em;
}

.service-card__highlight {
  margin-top: auto;
  padding: 0.65rem 1rem;
  border: 1.5px solid #34a853;
  border-radius: 0.65rem;
  background: rgba(52, 168, 83, 0.07);
  color: #2ea04b;
  line-height: 1.4;
}

.service-card-detail {
  max-width: 980px;
  margin: 0 auto;
}

.service-admin-thumb,
.service-admin-image-preview {
  object-fit: cover;
  border: 1px solid var(--afh-border);
  border-radius: 0.5rem;
}

.service-admin-thumb {
  width: 4rem;
  height: 3rem;
}

.service-admin-image-preview {
  width: 100%;
  max-width: 12rem;
  height: 6rem;
}

.dark-mode .service-card {
  background: #343a40;
  border-color: #4b5563;
}

.dark-mode .service-card__body h3,
.dark-mode .service-card__description,
.dark-mode .service-card__bullets {
  color: #f3f4f6;
}

@media (max-width: 991.98px) {
  .service-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .service-card__body {
    padding: 1.5rem;
  }

  .service-card__image-wrap {
    height: 10rem;
  }
}

/* Native training catalog */
.training-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.training-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none !important;
  background: #fff;
  border: 1px solid #dcebf5;
  border-radius: 1rem;
  box-shadow: 0 0.6rem 1.4rem rgba(15, 91, 140, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.training-card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 0.9rem 1.8rem rgba(15, 91, 140, 0.2);
}

.training-card__image-wrap {
  height: 11rem;
  overflow: hidden;
  background: #eaf6fd;
}

.training-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.training-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.training-card__workspace {
  margin-bottom: 0.45rem;
  color: #5799c7;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.training-card__body h2 {
  margin-bottom: 0.75rem;
  color: #153b5b;
  font-size: 1.25rem;
  font-weight: 700;
}

.training-card__body > p:not(.training-card__workspace) {
  color: #526176;
  line-height: 1.6;
}

.training-card__action {
  margin-top: auto;
  color: #147db5;
  font-weight: 600;
}

.dark-mode .training-card {
  background: #343a40;
  border-color: #4b5563;
}

.dark-mode .training-card__body h2 {
  color: #f3f4f6;
}

.dark-mode .training-card__body > p:not(.training-card__workspace) {
  color: #d1d5db;
}

@media (max-width: 1199.98px) {
  .training-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .training-card-grid {
    grid-template-columns: 1fr;
  }
}
