:root {
  --app-bg: #f5f7fb;
  --app-border: rgba(98, 105, 118, .18);
  --app-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  --app-radius: 8px;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  max-width: 100%;
}

body.antialiased {
  background: var(--app-bg) !important;
  color: #172033;
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.page,
.wrapper,
.page-wrapper,
.page-body,
.container-xl,
.card,
.alert,
.modal-content {
  min-width: 0;
}

.container-xl {
  max-width: 1280px;
}

.sticky-top {
  z-index: 1030;
  box-shadow: 0 1px 0 var(--app-border);
}

.navbar {
  min-height: 64px;
}

.navbar-brand-image {
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

.navbar .container-xl {
  gap: 12px;
}

.navbar-nav {
  gap: 4px;
  min-width: 0;
}

.nav-link {
  border-radius: 6px;
}

.nav-link-title,
.dropdown-item,
.btn,
.form-label,
.table th {
  letter-spacing: 0;
}

.page-wrapper {
  background: transparent;
}

.page-header {
  margin: 0;
  padding: 24px 0 12px;
}

.page-title {
  line-height: 1.25;
}

.page-body {
  margin-top: 0;
  padding: 12px 0 28px;
}

.card {
  border-color: var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.card-header {
  min-height: 56px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.card-title {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.btn {
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  white-space: normal;
}

.btn-sm {
  min-height: 34px;
}

.btn-list {
  gap: 8px;
}

.form-control,
.form-selectgroup-label,
.input-group .btn {
  border-radius: 6px;
}

.form-control {
  min-height: 42px;
}

textarea.form-control {
  min-height: 92px;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.table-responsive > .table {
  margin-bottom: 0;
}

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

.table .btn-list {
  flex-wrap: wrap;
  min-width: 150px;
}

.dataTables_wrapper {
  padding: 14px;
}

.dataTables_wrapper .row {
  row-gap: 10px;
}

.dataTables_filter,
.dataTables_length {
  text-align: left !important;
}

.dataTables_filter label,
.dataTables_length label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dataTables_filter input,
.dataTables_length select {
  min-height: 38px;
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.modal-dialog {
  max-width: min(100% - 24px, var(--tblr-modal-width, 640px));
}

.dropdown-menu {
  max-width: min(92vw, 360px);
}

.destination-suggestions {
  display: grid;
  gap: 8px;
}

.destination-suggestion {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

.portal-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-step {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 14px;
  background: #fff;
  min-height: 118px;
}

.portal-step-number {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #206bc4;
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}

.app-mobile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.portal-test-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
}

.portal-test-title,
.portal-history-title {
  margin: 0;
  color: #092049;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.32;
}

.portal-test-meta,
.portal-test-status {
  margin-top: 4px;
  color: #56647a;
  font-size: .92rem;
  line-height: 1.45;
}

.portal-test-action {
  min-width: 136px;
}

.portal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: normal;
}

.portal-chip-primary {
  background: #e8f1ff;
  color: #1557b0;
}

.portal-chip-info {
  background: #e8f7fb;
  color: #087489;
}

.portal-chip-success {
  background: #e9f8ef;
  color: #137333;
}

.portal-chip-warning {
  background: #fff4de;
  color: #9a5b00;
}

.portal-chip-danger {
  background: #fdecec;
  color: #b42318;
}

.portal-chip-muted {
  background: #eef1f5;
  color: #5d6675;
}

.portal-history-card .card-header {
  border-bottom: 1px solid var(--app-border);
}

.portal-payment-section {
  display: grid;
  gap: 16px;
}

.benefit-section .card-header {
  border-bottom: 1px solid var(--app-border);
}

.benefit-header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.benefit-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: #f8fafc;
}

.benefit-tab {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: .85rem;
  font-weight: 700;
}

.benefit-tab.is-active {
  background: #5b121a;
  color: #fff;
  box-shadow: 0 8px 20px rgba(91, 18, 26, .18);
}

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

.benefit-card {
  display: grid;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.benefit-card-main {
  min-width: 0;
}

.benefit-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.benefit-card-title {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: #092049;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.benefit-card-description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: .9rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.benefit-card-action {
  display: grid;
  gap: 8px;
  align-self: end;
  margin-top: 16px;
}

.benefit-card-action .btn {
  min-height: 38px;
  justify-content: center;
}

.benefit-empty {
  padding: 12px;
  border: 1px dashed var(--app-border);
  border-radius: var(--app-radius);
  color: #667085;
  font-size: .9rem;
}

.portal-history-responsive {
  overflow-x: auto;
  overflow-y: visible;
}

.portal-history-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1120px;
}

.portal-history-table th {
  color: #5b6577;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
}

.portal-history-table td {
  color: #172033;
  font-size: .92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.portal-history-table th:nth-child(1) {
  width: 15%;
}

.portal-history-table th:nth-child(2) {
  width: 11%;
}

.portal-history-table th:nth-child(3) {
  width: 6%;
}

.portal-history-table th:nth-child(4) {
  width: 15%;
}

.portal-history-table th:nth-child(5) {
  width: 14%;
}

.portal-history-table th:nth-child(6) {
  width: 15%;
}

.portal-history-table th:nth-child(7) {
  width: 13%;
}

.portal-history-table th:nth-child(8) {
  width: 11%;
}

.portal-history-score {
  font-size: 1.05rem !important;
  font-weight: 700;
  color: #092049 !important;
}

.portal-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.portal-history-actions {
  min-width: 0;
  white-space: normal;
}

.portal-history-actions .btn,
.portal-history-actions .portal-chip,
.portal-history-actions form {
  display: inline-flex;
  align-items: center;
  margin: 0 .35rem .35rem 0;
  vertical-align: top;
  white-space: normal;
}

.portal-history-actions form {
  display: inline-block;
}

.portal-history-actions .text-muted.small {
  display: block;
  margin-top: .15rem;
}

@media (max-width: 991.98px) {
  .navbar-collapse .navbar {
    min-height: 0;
    padding: 8px 0 12px;
  }

  .navbar-collapse .container-xl {
    align-items: stretch;
  }

  .navbar-collapse .navbar-nav {
    width: 100%;
    gap: 6px;
  }

  .navbar-collapse .nav-link {
    padding: 12px;
    justify-content: flex-start;
    min-height: 44px;
  }

  .navbar .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 6px;
  }

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

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

@media (max-width: 767.98px) {
  body.antialiased {
    background: #f8fafc !important;
  }

  .container-xl {
    padding-left: 14px;
    padding-right: 14px;
  }

  .navbar {
    min-height: 58px;
  }

  .navbar-brand-image {
    max-width: 150px;
    max-height: 42px;
  }

  .page-header {
    padding-top: 18px;
    padding-bottom: 8px;
  }

  .page-header .row {
    row-gap: 12px;
  }

  .page-header .col-auto {
    width: 100%;
  }

  .page-header .col-auto .btn,
  .page-header .col-auto .btn-list,
  .app-mobile-actions,
  .card-footer .btn {
    width: 100%;
  }

  .navbar > .container-xl,
  .sticky-top > .navbar .container-xl {
    row-gap: 10px;
  }

  .navbar-brand {
    max-width: calc(100vw - 96px);
    min-width: 0;
  }

  .navbar-nav.flex-row.order-md-last {
    margin-left: auto;
  }

  .page-title {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .page-body {
    padding-bottom: 22px;
  }

  .card {
    box-shadow: none;
  }

  .card-body,
  .card-header,
  .card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .row-cards {
    --tblr-gutter-y: 14px;
  }

  .btn-list,
  .table .btn-list {
    width: 100%;
  }

  .btn-list .btn,
  .btn-list form,
  .table .btn,
  .table form {
    width: 100%;
  }

  .table td,
  .table th {
    white-space: normal;
  }

  .table-responsive > .table {
    min-width: 760px;
  }

  .portal-test-list {
    gap: 10px;
  }

  .portal-test-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .portal-test-title,
  .portal-history-title {
    font-size: 1rem;
  }

  .portal-test-action {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .portal-test-action .btn {
    width: 100%;
  }

  .benefit-header {
    align-items: stretch;
    flex-direction: column;
  }

  .benefit-tabs {
    width: 100%;
    border-radius: 12px;
  }

  .benefit-tab {
    flex: 1 1 0;
    padding-left: 10px;
    padding-right: 10px;
  }

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

  .portal-history-responsive {
    overflow: visible;
  }

  .portal-history-responsive > .portal-history-table {
    min-width: 0;
    display: block;
  }

  .portal-history-table thead {
    display: none;
  }

  .portal-history-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .portal-history-table tr.portal-history-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: var(--app-shadow);
  }

  .portal-history-table td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    font-size: .92rem;
  }

  .portal-history-table td::before {
    content: attr(data-label);
    color: #667085;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .portal-history-table td.portal-history-test {
    display: block;
  }

  .portal-history-table td.portal-history-test::before {
    display: none;
  }

  .portal-history-actions .btn,
  .portal-history-actions form,
  .portal-history-primary-action .portal-chip {
    width: 100%;
    justify-content: center;
    margin-right: 0;
  }

  .portal-history-actions .portal-chip {
    width: auto;
  }

  .dataTables_wrapper {
    padding: 10px;
  }

  .dataTables_filter label {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .dataTables_filter input {
    width: 100% !important;
  }

  .dataTables_length label {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dataTables_length select {
    width: 92px !important;
  }

  .form-selectgroup-label {
    min-height: 82px;
    align-items: flex-start !important;
  }

  .input-group {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .input-group > .form-control,
  .input-group > .btn,
  .input-group > .input-group-text {
    width: 100%;
    border-radius: 6px !important;
  }

  .portal-step-grid {
    grid-template-columns: 1fr;
  }

  .portal-step {
    min-height: auto;
  }

  .profile-photo-preview {
    margin-left: auto;
    margin-right: auto;
  }

  .modal-dialog {
    margin: 12px auto;
  }

  .modal-body {
    max-height: calc(100vh - 160px);
    overflow: auto;
  }
}

@media (max-width: 420px) {
  .container-xl {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand-image {
    max-width: 124px;
  }

  .page-title {
    font-size: 1.15rem;
  }

  .card-body,
  .card-header,
  .card-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .portal-history-table tbody {
    padding: 10px;
  }

  .portal-history-table tr.portal-history-row {
    padding: 12px;
  }

  .portal-history-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.tenafl-admin .tes-list-page .tes-table-card,
.tenafl-admin .tes-list-page .tes-table-card .card-body,
.tenafl-admin .tes-list-page .dataTables_wrapper {
  max-width: 100%;
  overflow: visible;
}

.tenafl-admin .tes-list-page .tes-data-table {
  width: 100% !important;
}

.tenafl-admin .tes-list-page .tes-data-table th,
.tenafl-admin .tes-list-page .tes-data-table td {
  white-space: normal;
}

.tenafl-admin .tes-list-page .tes-name-col {
  min-width: 14rem;
  max-width: 28rem;
  overflow-wrap: anywhere;
}

.tenafl-admin .tes-list-page .tes-select-col {
  width: 2.5rem;
}

.tenafl-admin .tes-list-page .tes-action-col {
  width: 8.5rem;
}

.tenafl-admin .tes-list-page .tes-action-col .dropdown,
.tenafl-admin .tes-list-page .tes-action-col .btn {
  max-width: 100%;
}

.tenafl-admin .tes-list-page .tes-action-col .btn {
  min-width: 6.75rem;
  white-space: nowrap;
}

.tenafl-admin .tes-list-page .tes-action-col .dropdown-menu {
  max-width: min(18rem, calc(100vw - 32px));
  white-space: normal;
}

@media (max-width: 767.98px) {
  .tenafl-admin .tes-list-page .page-header .row {
    gap: .75rem;
  }

  .tenafl-admin .tes-list-page .page-header .col-auto,
  .tenafl-admin .tes-list-page .page-header .btn-list,
  .tenafl-admin .tes-list-page #bulkTesAction {
    width: 100%;
  }

  .tenafl-admin .tes-list-page .tes-table-card .card-body {
    padding: .75rem;
  }

  .tenafl-admin .tes-list-page .dataTables_wrapper {
    padding: 0;
  }

  .tenafl-admin .tes-list-page .dataTables_wrapper > .row {
    margin-right: 0;
    margin-left: 0;
  }

  .tenafl-admin .tes-list-page .dataTables_wrapper > .row > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
  }

  .tenafl-admin .tes-list-page .table-responsive,
  .tenafl-admin .tes-list-page .dataTables_scroll,
  .tenafl-admin .tes-list-page .dataTables_scrollBody {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .tenafl-admin .tes-list-page .table-responsive > .table,
  .tenafl-admin .tes-list-page .tes-data-table {
    min-width: 0 !important;
  }

  .tenafl-admin .tes-list-page .tes-name-col {
    min-width: 0;
    max-width: calc(100vw - 178px);
    line-height: 1.35;
  }

  .tenafl-admin .tes-list-page .tes-select-col {
    width: 2.25rem !important;
    min-width: 2.25rem;
  }

  .tenafl-admin .tes-list-page .tes-action-col {
    width: 7.25rem !important;
    min-width: 7.25rem;
  }

  .tenafl-admin .tes-list-page .tes-action-col .btn {
    width: auto;
    min-width: 6.25rem;
    padding-right: .65rem;
    padding-left: .65rem;
  }

  .tenafl-admin .tes-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
  .tenafl-admin .tes-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    padding-left: 2.1rem;
  }
}

/* TENAFL internal redesign: scoped to admin/operator/student only. */
:root {
  --tenafl-primary: #4b1117;
  --tenafl-primary-dark: #32090e;
  --tenafl-accent: #d2a344;
  --tenafl-bg: #f6f7fb;
  --tenafl-surface: #ffffff;
  --tenafl-text: #101828;
  --tenafl-muted: #667085;
  --tenafl-border: #e4e7ec;
  --tenafl-success: #12b76a;
  --tenafl-warning: #f79009;
  --tenafl-danger: #f04438;
  --tenafl-radius: 16px;
  --tenafl-shadow: 0 16px 36px rgba(16, 24, 40, .08);
}

body.tenafl-admin,
body.tenafl-student {
  background:
    radial-gradient(circle at top left, rgba(210, 163, 68, .12), transparent 32rem),
    var(--tenafl-bg) !important;
  color: var(--tenafl-text);
}

.tenafl-admin .navbar,
.tenafl-student .navbar {
  border-color: rgba(75, 17, 23, .08);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.tenafl-admin .sticky-top,
.tenafl-student .sticky-top {
  box-shadow: 0 1px 0 rgba(75, 17, 23, .08);
}

.tenafl-admin .tenafl-brand-logo,
.tenafl-student .tenafl-brand-logo,
.tenafl-admin .auth-brand-logo,
.tenafl-student .auth-brand-logo {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(75, 17, 23, .08);
}

.tenafl-admin .tenafl-brand-copy strong,
.tenafl-student .tenafl-brand-copy strong,
.tenafl-admin .auth-brand-copy strong,
.tenafl-student .auth-brand-copy strong {
  color: var(--tenafl-primary);
  letter-spacing: 0;
}

.tenafl-admin .page-wrapper,
.tenafl-student .page-wrapper {
  background: transparent;
}

.tenafl-admin .page-header,
.tenafl-student .page-header {
  padding-top: 28px;
}

.tenafl-admin .page-pretitle,
.tenafl-student .page-pretitle,
.tenafl-admin .subheader,
.tenafl-student .subheader {
  color: var(--tenafl-muted);
  font-weight: 800;
  letter-spacing: .02em;
}

.tenafl-admin .page-title,
.tenafl-student .page-title {
  color: var(--tenafl-text);
  font-weight: 850;
  letter-spacing: 0;
}

.tenafl-admin .card,
.tenafl-student .card {
  border: 1px solid var(--tenafl-border);
  border-radius: var(--tenafl-radius);
  background: var(--tenafl-surface);
  box-shadow: var(--tenafl-shadow);
}

.tenafl-admin .card-header,
.tenafl-student .card-header {
  border-color: var(--tenafl-border);
  border-radius: var(--tenafl-radius) var(--tenafl-radius) 0 0;
}

.tenafl-admin .card-title,
.tenafl-student .card-title {
  color: var(--tenafl-text);
  font-weight: 800;
}

.tenafl-admin .btn,
.tenafl-student .btn {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.tenafl-admin .btn-primary,
.tenafl-student .btn-primary {
  border-color: var(--tenafl-primary);
  background: var(--tenafl-primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(75, 17, 23, .16);
}

.tenafl-admin .btn-primary:hover,
.tenafl-student .btn-primary:hover,
.tenafl-admin .btn-primary:focus,
.tenafl-student .btn-primary:focus {
  border-color: var(--tenafl-primary-dark);
  background: var(--tenafl-primary-dark);
}

.tenafl-admin .btn-outline-primary,
.tenafl-student .btn-outline-primary {
  border-color: rgba(75, 17, 23, .26);
  color: var(--tenafl-primary);
}

.tenafl-admin .btn-outline-primary:hover,
.tenafl-student .btn-outline-primary:hover {
  border-color: var(--tenafl-primary);
  background: rgba(75, 17, 23, .08);
  color: var(--tenafl-primary);
}

.tenafl-admin .form-control,
.tenafl-admin .form-select,
.tenafl-student .form-control,
.tenafl-student .form-select {
  min-height: 44px;
  border-color: var(--tenafl-border);
  border-radius: 12px;
  color: var(--tenafl-text);
}

.tenafl-admin .form-control:focus,
.tenafl-admin .form-select:focus,
.tenafl-student .form-control:focus,
.tenafl-student .form-select:focus {
  border-color: var(--tenafl-accent);
  box-shadow: 0 0 0 .2rem rgba(210, 163, 68, .18);
}

.tenafl-admin .alert,
.tenafl-student .alert {
  border-radius: 14px;
  border-width: 1px;
}

.tenafl-admin .modal-content,
.tenafl-student .modal-content {
  border: 1px solid var(--tenafl-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .2);
}

.tenafl-admin .table,
.tenafl-student .table {
  color: var(--tenafl-text);
}

.tenafl-admin .table thead th,
.tenafl-student .table thead th {
  border-bottom-color: var(--tenafl-border);
  color: var(--tenafl-muted);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tenafl-admin .table tbody tr,
.tenafl-student .table tbody tr {
  transition: background .16s ease;
}

.tenafl-admin .table tbody tr:hover,
.tenafl-student .table tbody tr:hover {
  background: rgba(75, 17, 23, .035);
}

.tenafl-admin .dropdown-menu,
.tenafl-student .dropdown-menu {
  border-color: var(--tenafl-border);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, .12);
}

.tenafl-admin .dropdown-item,
.tenafl-student .dropdown-item {
  border-radius: 10px;
  margin: 2px 6px;
  width: auto;
}

.tenafl-admin .navbar-nav .nav-link,
.tenafl-student .navbar-nav .nav-link {
  min-height: 42px;
  border-radius: 12px;
  color: #3f2a2d;
  font-weight: 750;
}

.tenafl-admin .navbar-nav .nav-item.active > .nav-link,
.tenafl-admin .navbar-nav .nav-link.active,
.tenafl-student .navbar-nav .nav-item.active > .nav-link,
.tenafl-student .navbar-nav .nav-link.active {
  background: rgba(75, 17, 23, .09);
  color: var(--tenafl-primary);
}

.tenafl-admin .navbar-nav .nav-link-icon svg,
.tenafl-student .navbar-nav .nav-link-icon svg {
  width: 21px;
  height: 21px;
}

.tenafl-auth {
  min-height: 100vh;
  border-top: 0 !important;
  background:
    radial-gradient(circle at top, rgba(210, 163, 68, .2), transparent 24rem),
    linear-gradient(135deg, #fffaf0 0%, #f6f7fb 48%, #ffffff 100%) !important;
}

.tenafl-auth .page-center {
  min-height: 100vh;
}

.tenafl-auth .container-tight {
  max-width: 460px;
}

.tenafl-auth form.card {
  border: 1px solid rgba(75, 17, 23, .1);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(75, 17, 23, .12);
}

@media (min-width: 1200px) {
  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md {
    position: fixed;
    z-index: 1025;
    top: 72px;
    bottom: 18px;
    left: 18px;
    width: 252px;
    overflow: hidden auto;
    border: 1px solid rgba(75, 17, 23, .08);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--tenafl-shadow);
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md #navbar-menu,
  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .navbar,
  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .container-xl {
    display: block !important;
    min-height: 0;
    width: 100%;
    padding: 0;
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .navbar {
    background: transparent;
    box-shadow: none;
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .navbar-nav {
    display: grid;
    gap: 6px;
    padding: 12px;
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .nav-link {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .nav-link-icon {
    display: inline-flex !important;
  }

  .tenafl-admin .wrapper > .sticky-top > .navbar-expand-md .dropdown-menu {
    position: static;
    width: 100%;
    margin: 4px 0 8px;
    border: 0;
    background: rgba(75, 17, 23, .035);
    box-shadow: none;
  }

  .tenafl-admin .page-wrapper {
    margin-left: 288px;
  }

  .tenafl-admin .page-wrapper .container-xl {
    max-width: 1500px;
  }
}

.tenafl-student .portal-test-card {
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, .07);
}

.tenafl-student .portal-step {
  border-radius: 18px;
}

.tenafl-student .portal-step-number,
.tenafl-student .portal-chip-primary {
  background: rgba(75, 17, 23, .1);
  color: var(--tenafl-primary);
}

.tenafl-student-bottomnav {
  position: fixed;
  z-index: 1040;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(75, 17, 23, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 45px rgba(16, 24, 40, .18);
  backdrop-filter: blur(16px);
}

.tenafl-student-bottomnav a {
  display: grid;
  min-height: 52px;
  place-items: center;
  gap: 2px;
  border-radius: 16px;
  color: var(--tenafl-muted);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}

.tenafl-student-bottomnav a.active {
  background: var(--tenafl-primary);
  color: #fff;
}

@media (max-width: 991.98px) {
  .tenafl-admin #navbar-menu.collapse.show,
  .tenafl-student #navbar-menu.collapse.show {
    position: fixed;
    z-index: 1045;
    top: 66px;
    right: 12px;
    left: 12px;
    max-height: calc(100dvh - 88px);
    overflow: auto;
    border: 1px solid rgba(75, 17, 23, .1);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .22);
  }

  .tenafl-admin .navbar-collapse .nav-link,
  .tenafl-student .navbar-collapse .nav-link {
    border-radius: 14px;
  }
}

@media (max-width: 767.98px) {
  body.tenafl-admin,
  body.tenafl-student {
    background: #f8fafc !important;
  }

  .tenafl-admin .page-body,
  .tenafl-student .page-body {
    padding-bottom: 92px;
  }

  .tenafl-admin .page-header,
  .tenafl-student .page-header {
    padding-top: 18px;
  }

  .tenafl-admin .card,
  .tenafl-student .card {
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
  }

  .tenafl-admin .table-responsive,
  .tenafl-student .table-responsive,
  .tenafl-admin .dataTables_wrapper,
  .tenafl-student .dataTables_wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .tenafl-admin .table-responsive > table:not(.tenafl-mobile-cards),
  .tenafl-student .table-responsive > table:not(.tenafl-mobile-cards),
  .tenafl-admin .dataTables_wrapper table:not(.tenafl-mobile-cards),
  .tenafl-student .dataTables_wrapper table:not(.tenafl-mobile-cards) {
    display: table !important;
    width: 100% !important;
    min-width: 760px;
    table-layout: auto;
  }

  .tenafl-admin table.tenafl-mobile-cards,
  .tenafl-student table.tenafl-mobile-cards {
    display: block;
    min-width: 0 !important;
  }

  .tenafl-admin table.tenafl-mobile-cards thead,
  .tenafl-student table.tenafl-mobile-cards thead {
    display: none;
  }

  .tenafl-admin table.tenafl-mobile-cards tbody,
  .tenafl-student table.tenafl-mobile-cards tbody {
    display: grid;
    gap: 12px;
  }

  .tenafl-admin table.tenafl-mobile-cards tr,
  .tenafl-student table.tenafl-mobile-cards tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--tenafl-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
  }

  .tenafl-admin table.tenafl-mobile-cards td,
  .tenafl-student table.tenafl-mobile-cards td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tenafl-admin table.tenafl-mobile-cards td::before,
  .tenafl-student table.tenafl-mobile-cards td::before {
    content: attr(data-tenafl-label);
    color: var(--tenafl-muted);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .tenafl-admin .modal-dialog,
  .tenafl-student .modal-dialog {
    display: flex;
    min-height: calc(100dvh - 24px);
    align-items: flex-end;
    margin: 12px;
  }

  .tenafl-admin .modal-content,
  .tenafl-student .modal-content {
    width: 100%;
    border-radius: 22px 22px 16px 16px;
  }
}

@media (max-width: 420px) {
  .tenafl-student-bottomnav {
    right: 6px;
    left: 6px;
    padding: 6px;
  }

  .tenafl-student-bottomnav a {
    min-height: 50px;
    font-size: .58rem;
  }

  .tenafl-admin table.tenafl-mobile-cards td,
  .tenafl-student table.tenafl-mobile-cards td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
