/* =========================================================
   POS Admin Template — Bootstrap Overrides & Design System
   ========================================================= */

/* Poppins font (local, offline-ready) */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Poppins-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Poppins-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Poppins-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Poppins-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Poppins-ExtraBold.ttf") format("truetype");
}

:root {
  /* Brand colors */
  --bs-primary: #003463;
  --bs-primary-rgb: 0, 52, 99;
  --bs-secondary: #6c757d;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-success: #21b362;
  --bs-success-rgb: 33, 179, 98;
  --bs-info: #0dcaf0;
  --bs-info-rgb: 13, 202, 240;
  --bs-warning: #f7b924;
  --bs-warning-rgb: 247, 185, 36;
  --bs-danger: #f15757;
  --bs-danger-rgb: 241, 87, 87;
  --bs-purple: #8b5cf6;
  --bs-purple-rgb: 139, 92, 246;
  --bs-pink: #ec4899;
  --bs-pink-rgb: 236, 72, 153;
  --bs-cyan: #06b6d4;
  --bs-cyan-rgb: 6, 182, 212;

  /* Theme tokens */
  --primary-color: #003463;
  --primary-color: #003463;
  --primary-hover: #b57407;
  --primary-soft: rgba(0, 52, 99, .12);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 84px;
  --header-height: 58px;
  --header-gap: .75rem;
  --body-bg: #f4f6fb;
  --body-bg-rgb: 244, 246, 251;
  --surface-bg: #ffffff;
  --surface-2-bg: #f8f9fc;
  --border-color: #e9ecf2;
  --text-color: #2d3748;
  --text-muted-color: #8a94a6;
  --sidebar-bg: #ffffff;
  --sidebar-bg-rgb: 255, 255, 255;
  --sidebar-color: #384551;
  --sidebar-muted: #8b93a7;
  --sidebar-hover: #f2f3f3;
  --sidebar-active-bg: rgba(181, 116, 7, .1);
  --sidebar-active-color: #b57407;

  /* Borders / Radius / Shadow */
  --radius-sm: 8px;
  --radius: 8px;
  --radius-lg: 8px;
  --card-shadow: 0 0.1875rem 0.5rem 0 rgba(34, 48, 62, 0.1);
  --card-shadow-hover: none;
  --header-shadow: 0 1px 0 var(--border-color);
  --float-shadow: none;
}

/* Dark mode tokens */
[data-bs-theme="dark"] {
  --body-bg: #0f172a;
  --body-bg-rgb: 15, 23, 42;
  --surface-bg: #131c31;
  --surface-2-bg: #1a2540;
  --border-color: #243049;
  --text-color: #e2e8f0;
  --text-muted-color: #7c8aa5;
  --sidebar-bg: #2b2c40;
  --sidebar-bg-rgb: 43, 44, 64;
  --sidebar-color: #b2b2c4;
  --sidebar-muted: #5d5d7c;
  --sidebar-hover: rgba(230, 230, 241, .06);
  --sidebar-active-bg: #b57407;
  --sidebar-active-color: #ffffff;
  --primary-soft: rgba(0, 52, 99, .22);
  --card-shadow: 0 0.1875rem 0.5rem 0 rgba(34, 48, 62, 0.1);
  --card-shadow-hover: none;
  --bs-light-bg-subtle: #1a2540;
  --bs-border-color: #243049;
}

/* Base */
html, body { height: 100%; }
body {
  background-color: var(--body-bg);
  color: var(--text-color);
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: .9rem;
  -webkit-font-smoothing: antialiased;
}
[data-bs-theme="dark"] body { color: var(--text-color); }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(140,150,170,.28); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(140,150,170,.48); }

a { text-decoration: none; }

/* Heading */
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--text-color); }

/* Remove heavy box-shadow from buttons (keep soft focus rings on inputs) */
.btn,
.btn:focus, .btn:focus-visible, .btn:active, .btn:hover, .btn.active,
.btn-check:focus + .btn,
.btn-check:checked + .btn,
.btn-check:active + .btn,
.show > .btn.dropdown-toggle,
button, button:hover, button:active, button:focus, button:focus-visible,
[role="button"], [role="button"]:hover, [role="button"]:active, [role="button"]:focus, [role="button"]:focus-visible {
  box-shadow: none !important;
}

/* DataTables pagination: remove box-shadow on hover/active/focus */
.dt-paging .page-link,
.dt-paging .page-link:hover,
.dt-paging .page-link:active,
.dt-paging .page-link:focus,
.dt-paging .page-link:focus-visible,
.dt-paging .page-item.active .page-link,
.dt-paging-button,
.dt-paging-button:hover,
.dt-paging-button:active,
.dt-paging-button:focus,
.dt-paging-button:focus-visible {
  box-shadow: none !important;
}

/* Hide dropdown caret where requested */
.dropdown-toggle.hide-arrow::after,
.dropdown-toggle-hide-arrow::after { display: none; }

/* Unified button system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  line-height: 1.5;
  letter-spacing: .01em;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
  font-weight: 500;
  border-radius: var(--radius);
}
.btn:active { transform: translateY(1px); }
.btn:hover { transform: translateY(-1px); }
.btn:active:hover { transform: translateY(1px); }
/* Keep the pressed state stable for split/grouped buttons (drop the lift) */
.btn-group .btn:hover, .btn-group-sm .btn:hover, .btn-group-lg .btn:hover { transform: none; }
.btn-sm { font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg { font-size: 1rem; border-radius: var(--radius-lg); }
/* Icon placement: even out icon-with-label buttons without relying on margin
   utilities (`me-1` / `ms-1` classes remain and stay additive). */
.btn > i:first-child:not(:last-child),
.btn > svg:first-child:not(:last-child) { margin-left: -.15em; }
.btn > i:last-child:not(:first-child),
.btn > svg:last-child:not(:first-child) { margin-right: -.15em; }
.btn > i.bi-chevron-down:last-child,
.btn > .dropdown-caret { margin-right: -.35em; }
/* Icon immediately followed by its text label.
   `.btn` is already `inline-flex` with `align-items: center`, so the icon is
   vertically centred on the label and no baseline/vertical-align tweak is
   wanted — `vertical-align` is inert on a flex item anyway. The only thing to
   correct is the gap: `.btn` sets `gap: .45rem` between the icon and the
   anonymous text item, which is what actually reads as the icon floating away
   from its label. `gap` is overridden here rather than a margin added to the
   icon, so the two do not stack. */
.btn:has(> .icon-gap) { gap: .1em; }

/* Keyboard focus must remain visible — the admin page does not load site.css,
   so the frontend `:focus-visible` rule is not present there. */
a:focus-visible,
.btn:focus-visible,
button:is(.icon-btn, [role="button"]):focus-visible,
.page-link:focus-visible,
.dropdown-item:focus-visible,
.form-check-input:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid rgba(181, 116, 7, .8);
  outline-offset: 2px;
}

/* Light buttons — the default secondary action across the admin. Soft surface,
   neutral border, primary-tinted hover so it reads intentional, not ghost-white. */
.btn-light {
  --bs-btn-bg: var(--surface-2-bg);
  --bs-btn-border-color: var(--border-color);
  --bs-btn-color: var(--text-color);
  --bs-btn-hover-bg: var(--primary-soft);
  --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), .45);
  --bs-btn-hover-color: var(--primary-color);
  --bs-btn-active-bg: rgba(var(--bs-primary-rgb), .18);
  --bs-btn-active-border-color: rgba(var(--bs-primary-rgb), .55);
  --bs-btn-active-color: #001D36;
  --bs-btn-disabled-bg: var(--surface-2-bg);
  --bs-btn-disabled-border-color: var(--border-color);
  --bs-btn-disabled-color: var(--text-muted-color);
}
[data-bs-theme="dark"] .btn-light {
  --bs-btn-bg: #1b2742;
  --bs-btn-border-color: #243049;
  --bs-btn-color: #e2e8f0;
  --bs-btn-hover-bg: rgba(0, 52, 99, .45);
  --bs-btn-hover-border-color: rgba(181, 116, 7, .55);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: rgba(0, 52, 99, .6);
  --bs-btn-active-border-color: rgba(181, 116, 7, .7);
  --bs-btn-active-color: #fff;
}

/* Link-as-button — used for quiet actions ("View all", "Add exam"). */
.btn-link {
  --bs-btn-color: var(--primary-color);
  --bs-btn-hover-color: #001D36;
  --bs-btn-active-color: #001D36;
  --bs-btn-disabled-color: var(--text-muted-color);
  text-decoration: none;
  font-weight: 500;
}
.btn-link:hover, .btn-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Extra small button (used in the enrolment/application UI). Unstyled whenever
   site.css is not loaded, so define it here too. */
.btn-xs {
  --bs-btn-padding-y: .12rem;
  --bs-btn-padding-x: .45rem;
  font-size: .72rem;
  line-height: 1.5;
  border-radius: 6px;
}
.btn-event-sm {
  --bs-btn-padding-y: .26rem;
  --bs-btn-padding-x: .6rem;
  font-size: .8rem;
  border-radius: 6px;
}

/* Gold accent buttons (Bootstrap-native token pattern; site.css re-declares the
   same on public pages, which load later, so there is no clash). */
.btn-gold {
  --bs-btn-bg: #b57407;
  --bs-btn-border-color: #b57407;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #996105;
  --bs-btn-hover-border-color: #996105;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #7d4f02;
  --bs-btn-active-border-color: #7d4f02;
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: #b57407;
  --bs-btn-disabled-border-color: #b57407;
  --bs-btn-disabled-color: rgba(255, 255, 255, .6);
  --bs-btn-focus-shadow-rgb: 181, 116, 7;
  background: var(--bs-btn-bg);
  border: 1px solid var(--bs-btn-border-color);
  color: var(--bs-btn-color);
}
.btn-outline-gold {
  --bs-btn-color: #b57407;
  --bs-btn-border-color: #b57407;
  --bs-btn-hover-bg: #b57407;
  --bs-btn-hover-border-color: #b57407;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #996105;
  --bs-btn-active-border-color: #996105;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 181, 116, 7;
  background: transparent;
  border: 1px solid var(--bs-btn-border-color);
  color: var(--bs-btn-color);
}

/* Soft variants — deepen on hover instead of inverting to solid, keeping the
   muted palette and improving contrast on hover without jarring fills. */
.btn-soft-primary { background: var(--primary-soft); color: var(--primary-color); border: 0; }
.btn-soft-primary:hover { background: rgba(var(--bs-primary-rgb), .18); color: #001D36; }
.btn-soft-primary:active { background: rgba(var(--bs-primary-rgb), .24); color: #000f20; }
.btn-soft-success { background: rgba(var(--bs-success-rgb), .12); color: var(--bs-success); border: 0; }
.btn-soft-success:hover { background: rgba(var(--bs-success-rgb), .18); color: #138b4d; }
.btn-soft-success:active { background: rgba(var(--bs-success-rgb), .24); color: #0d6b3b; }
.btn-soft-danger { background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); border: 0; }
.btn-soft-danger:hover { background: rgba(var(--bs-danger-rgb), .18); color: #d43b3b; }
.btn-soft-danger:active { background: rgba(var(--bs-danger-rgb), .24); color: #b02a2a; }
.btn-soft-warning { background: rgba(var(--bs-warning-rgb), .15); color: #b07d0c; border: 0; }
.btn-soft-warning:hover { background: rgba(var(--bs-warning-rgb), .22); color: #8f6406; }
.btn-soft-warning:active { background: rgba(var(--bs-warning-rgb), .28); color: #755203; }
[data-bs-theme="dark"] .btn-soft-warning { color: var(--bs-warning); }
.btn-primary { --bs-btn-bg: var(--primary-color); --bs-btn-border-color: var(--primary-color); --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover); --bs-btn-active-bg: #001D36; --bs-btn-active-border-color: #001D36; --bs-btn-disabled-bg: var(--primary-color); --bs-btn-disabled-border-color: var(--primary-color); }

[data-bs-theme="dark"] .btn-soft-primary,
[data-bs-theme="dark"] .btn-soft-success,
[data-bs-theme="dark"] .btn-soft-danger { filter: none; }

/* Forms */
.form-control, .form-select, .input-group-text {
  border-color: var(--border-color);
  background-color: var(--surface-bg);
  color: var(--text-color);
  font-size: .9rem;
  box-shadow: none;
  border-radius: 4px;
  transition: border-color .15s, box-shadow .15s;
}
.form-check-input { border-radius: 4px; }
.form-switch .form-check-input { border-radius: 2rem; }
.form-check-input:checked + label, .form-check-label { cursor: pointer; }
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple { border-radius: 4px; }
.select2-container--default .select2-dropdown { border-radius: 4px; }
.form-select:hover, select.form-control:hover { border-color: #b57407; }
.form-select option:hover, .form-select option:active { background-color: #b57407; color: #fff; }
.form-select option:checked { background-color: #b57407; color: #fff; }
.form-control, .form-select, .form-control.form-control-sm, .form-control.form-control-lg, .form-select.form-select-sm, .form-select.form-select-lg,
.form-control:focus, .form-select:focus, .form-control:active, .form-select:active,
.form-check-input, .form-check-input:focus, .form-check-input:active, .form-check-input:checked,
.input-group-text, .input-group > .form-control,
.form-floating > .form-control,
textarea.form-control {
  box-shadow: none !important;
}
.form-control:focus, .form-control:focus-visible, .form-control:active,
.form-select:focus, .form-select:focus-visible, .form-select:active,
.form-check-input:focus, .form-check-input:active {
  border-color: #b57407;
}
.form-control::placeholder { color: var(--text-muted-color); }
.input-group-text { background-color: var(--surface-2-bg); }
.form-label { font-size: .82rem; font-weight: 500; margin-bottom: .35rem; color: var(--text-color); }
.form-label .req { color: var(--bs-danger); }
.form-floating > label { color: var(--text-muted-color); }

/* Badge colors */
.badge.bg-primary { background-color: var(--primary-color) !important; }
.badge.soft-primary { background: var(--primary-soft); color: var(--primary-color); }
.badge.soft-success { background: rgba(var(--bs-success-rgb), .14); color: var(--bs-success); }
.badge.soft-warning { background: rgba(var(--bs-warning-rgb), .16); color: #b07d0c; }
.badge.soft-danger { background: rgba(var(--bs-danger-rgb), .14); color: var(--bs-danger); }
.badge.soft-info { background: rgba(var(--bs-info-rgb), .14); color: #0aa2c0; }
.badge.soft-purple { background: rgba(var(--bs-purple-rgb), .14); color: var(--bs-purple); }
[data-bs-theme="dark"] .badge.soft-warning { color: var(--bs-warning); }

/* Pills */
.nav-pills .nav-link { color: var(--text-muted-color); }
.nav-pills .nav-link.active { background-color: var(--primary-color); color: #fff; }

/* List group */
.list-group-item.active {
  --bs-list-group-active-bg: var(--primary-color);
  --bs-list-group-active-border-color: var(--primary-color);
  --bs-list-group-active-color: #fff;
}

/* Tables */
.table { --bs-table-bg: transparent; color: var(--text-color); }
.table > :not(caption) > * > * { padding: .75rem .9rem; border-color: var(--border-color); }
.table thead th { background-color: transparent; color: var(--text-muted-color); font-weight: 600; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.table-bordered > :not(caption) > * > * { border-color: var(--border-color); }
.table-hover > tbody > tr:hover > * { background-color: var(--surface-2-bg); }
.table-card { border-radius: 0; }

/* Card */
.card {
  background-color: var(--surface-bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.card-header { background-color: transparent; border-bottom: 1px solid var(--border-color); padding: .95rem 1.1rem; font-weight: 600; }
.card-body { padding: 1.15rem; }
.card-footer { background-color: transparent; border-top: 1px solid var(--border-color); padding: .85rem 1.1rem; }

/* Dropdown */
.dropdown-menu { border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--float-shadow); background-color: var(--surface-bg); font-size: .88rem; }
.dropdown-item { color: var(--text-color); padding: .55rem .95rem; border-radius: var(--radius-sm); margin: .125rem .375rem; }
.dropdown-item:hover, .dropdown-item:focus { background-color: var(--primary-soft); color: #b57407; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--primary-color); color: #fff; }
.dropdown-divider { border-color: var(--border-color); }

/* Modal */
.modal-content { background-color: var(--surface-bg); border: 1px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--float-shadow); }
.modal-header { border-bottom-color: var(--border-color); }
.modal-footer { border-top-color: var(--border-color); }

/* Payment modal: taller so all content fits */
#paymentModal .modal-dialog { max-width: 880px; }
#paymentModal .modal-content { max-height: 96vh; }
#paymentModal .modal-body { overflow-y: auto; }

/* Offcanvas */
.offcanvas { background-color: var(--sidebar-bg); color: var(--sidebar-color); }

/* Tabs */
.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs .nav-link { color: var(--text-muted-color); border: 0; padding: .6rem 1rem; font-weight: 500; transition: color .15s, background-color .15s; }
.nav-tabs .nav-link:hover { color: var(--text-color); background-color: var(--surface-2-bg); }
.nav-tabs .nav-link.active { color: #b57407; background: transparent; border-bottom: 2px solid #b57407; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* A denser strip for a tab bar whose tabs are links to whole pages rather than panes. */
.home-section-tabs .nav-link { padding: .3rem .6rem; }

/*
 * The home screen: the tab strip and the block's forms are one card.
 *
 * The strip is the card's header and scrolls sideways on its own when the block
 * names overflow - the card below it is the page's own content, so it must
 * never be pushed off screen by a long row of tabs. Its own border is dropped
 * because the header's border is the one between strip and body.
 *
 * overflow-y is stated because `overflow-x: auto` makes it `auto` as well, and a
 * strip that is one line tall then grows a scrollbar nobody can use.
 *
 * There is no scrollbar. A bar under the tabs is a control painted over a
 * heading, and no thickness makes it go away - the thinner it gets, the more it
 * reads as a stray line - while any slot for it pushes the active tab's underline
 * off the divider it is supposed to sit on. The strip is scrolled the way a
 * touch screen scrolls anything (drag, wheel, keyboard: see initHorizontalStrips
 * in public/js/layout.js) and the only cue is a fade at whichever edge still has
 * content behind it, which is the same cue a phone gives.
 */
.section-pane { background-color: var(--surface-bg); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.section-pane-nav { border-bottom: 1px solid var(--border-color); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.section-pane-nav::-webkit-scrollbar { display: none; }
.section-pane-nav.is-scrollable { cursor: grab; }
.section-pane-nav.is-dragging { cursor: grabbing; user-select: none; }
.section-pane-nav.is-dragging .nav-link { pointer-events: none; }
.section-pane-nav.has-more-left, .section-pane-nav.has-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.section-pane-nav.has-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.section-pane-nav.has-more-left.has-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.section-pane-nav .nav-tabs { border-bottom: 0; white-space: nowrap; }
.section-pane-panel { padding: 1.15rem; }
.section-pane-panel + .section-pane-panel { border-top: 1px solid var(--border-color); }

/* Accordion */
.accordion-button { background-color: var(--surface-2-bg); color: var(--text-color); font-weight: 500; }
.accordion-button:not(.collapsed) { background-color: var(--primary-soft); color: var(--primary-color); }
.accordion-item { border-color: var(--border-color); }

/* Tooltip / Popover */
.tooltip { font-size: .76rem; }
.popover { --bs-popover-bg: var(--surface-bg); --bs-popover-border-color: var(--border-color); --bs-popover-body-color: var(--text-color); }

/* Progress */
.progress { background-color: var(--surface-2-bg); }

/* Pagination */
.page-link { color: var(--text-muted-color); border-color: var(--border-color); background-color: var(--surface-bg); }
.page-link:hover { color: #b57407; background-color: var(--primary-soft); border-color: #b57407; }
.page-item.active .page-link { background-color: var(--primary-color); border-color: var(--primary-color); }
.page-item.active .page-link:hover { color: #fff; background-color: var(--primary-hover); border-color: var(--primary-hover); }
.page-item.disabled .page-link { color: var(--text-muted-color); background-color: var(--surface-2-bg); }
.page-item.disabled .page-link:hover { color: var(--text-muted-color); background-color: var(--surface-2-bg); border-color: var(--border-color); cursor: default; }
.pagination .page-link { min-width: 1.8rem; width: 1.8rem; height: 1.8rem; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.pagination .page-link i { line-height: 1; }

/* Toast */
.toast { background-color: var(--surface-bg); border: 1px solid transparent; box-shadow: var(--float-shadow); border-radius: var(--radius); }

/* Links — quiet underline-on-hover for plain text links throughout the admin.
   Interactive components (buttons, nav, dropdowns, pager) keep no underline. */
a { color: var(--primary-color); transition: color .15s; }
a:hover { color: var(--primary-hover); }
a, .btn, button { -webkit-tap-highlight-color: transparent; }
[data-bs-theme="dark"] a { color: #8bb3e8; }
[data-bs-theme="dark"] a:hover { color: #aecdf1; }
[data-bs-theme="dark"] .link-primary { color: #8bb3e8 !important; }
[data-bs-theme="dark"] .link-primary:hover { color: #aecdf1 !important; }
[data-bs-theme="dark"] .link-muted { color: #7c8aa5 !important; }
[data-bs-theme="dark"] .link-muted:hover { color: #8bb3e8 !important; }

.link-primary { color: var(--primary-color) !important; }
.link-primary:hover { color: var(--primary-hover) !important; text-decoration: underline; text-underline-offset: 3px; }
.link-danger { color: var(--bs-danger) !important; }
.link-danger:hover { color: #d43b3b !important; text-decoration: underline; text-underline-offset: 3px; }
.link-success { color: var(--bs-success) !important; }
.link-success:hover { color: #138b4d !important; text-decoration: underline; text-underline-offset: 3px; }
.link-muted { color: var(--text-muted-color) !important; }
.link-muted:hover { color: var(--primary-color) !important; text-decoration: underline; text-underline-offset: 3px; }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Text links inside cards and tables (e.g. record name links) get a gentle
   underline on hover so they read as clickable without button chrome. */
.card .card-body a:not(.btn):not(.dropdown-item):not(.nav-link):not(.icon-btn):not(.badge),
.card .card-footer a:not(.btn):not(.dropdown-item):not(.icon-btn):not(.badge),
.table a:not(.btn):not(.dropdown-item):not(.badge):not(.page-link),
.dt-container a:not(.btn):not(.badge) {
  text-decoration: none;
}
.card .card-body a:not(.btn):not(.dropdown-item):not(.nav-link):not(.icon-btn):not(.badge):hover,
.card .card-footer a:not(.btn):not(.dropdown-item):not(.icon-btn):not(.badge):hover,
.table a:not(.btn):not(.dropdown-item):not(.badge):not(.page-link):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}