/* ==========================================================================
   ListiPRO UI — lightweight hand-rolled design system
   Replaces Bootstrap/Sneat theme (core.css + demo.css) with a single file.
   Keeps the original Vuexy color palette and Tabler icon classes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette (unchanged) */
  --lp-primary: #7367f0;
  --lp-primary-hover: #665be0;
  --lp-primary-active: #5c50e0;
  --lp-secondary: #808390;
  --lp-success: #28c76f;
  --lp-danger: #ff4c51;
  --lp-warning: #ff9f43;
  --lp-info: #00bad1;
  --lp-dark: #2f3349;

  /* Light surfaces */
  --lp-body-bg: #f8f7fa;
  --lp-paper: #ffffff;
  --lp-body-color: #6d6b77;
  --lp-heading: #444050;
  --lp-muted: #a5a3ae;
  --lp-border: #e6e6e8;
  --lp-border-strong: #d5d4d8;
  --lp-hover-bg: rgba(47, 43, 61, 0.045);
  --lp-active-bg: rgba(115, 103, 240, 0.1);
  --lp-shadow-color: 47, 43, 61;
  --lp-shadow-sm: 0 1px 4px rgba(var(--lp-shadow-color), 0.08);
  --lp-shadow: 0 4px 18px rgba(var(--lp-shadow-color), 0.1);
  --lp-shadow-lg: 0 10px 40px rgba(var(--lp-shadow-color), 0.22);
  --lp-backdrop: rgba(37, 33, 50, 0.55);

  /* Shape + type */
  --lp-radius-sm: 0.375rem;
  --lp-radius: 0.5rem;
  --lp-radius-lg: 0.75rem;
  --lp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --lp-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Layout */
  --lp-sidebar-width: 16.25rem;
  --lp-navbar-height: 3.75rem;
  --lp-content-max: 1440px;
}

/* Back-compat aliases for templates that reference Bootstrap variable names */
:root,
[data-bs-theme="dark"] {
  --bs-primary: var(--lp-primary);
  --bs-secondary: var(--lp-secondary);
  --bs-success: var(--lp-success);
  --bs-danger: var(--lp-danger);
  --bs-warning: var(--lp-warning);
  --bs-info: var(--lp-info);
  --bs-body-bg: var(--lp-body-bg);
  --bs-body-color: var(--lp-body-color);
  --bs-heading-color: var(--lp-heading);
  --bs-border-color: var(--lp-border);
  --bs-card-bg: var(--lp-paper);
  --bs-paper-bg: var(--lp-paper);
  --bs-secondary-bg: var(--lp-body-bg);
}

[data-bs-theme="dark"] {
  --lp-body-bg: #25293c;
  --lp-paper: #2f3349;
  --lp-body-color: #acabc1;
  --lp-heading: #cfcde4;
  --lp-muted: #7a7c94;
  --lp-border: #44485e;
  --lp-border-strong: #565b78;
  --lp-hover-bg: rgba(255, 255, 255, 0.05);
  --lp-active-bg: rgba(115, 103, 240, 0.18);
  --lp-shadow-color: 12, 10, 20;
  --lp-backdrop: rgba(15, 13, 25, 0.65);
}

/* --------------------------------------------------------------------------
   2. Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--lp-font);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--lp-body-color);
  background-color: var(--lp-body-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h6 {
  margin: 0 0 0.5rem;
  color: var(--lp-heading);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.0625rem; }
h6, .h6 { font-size: 0.9375rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

a {
  color: var(--lp-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--lp-primary-hover); }

img, svg { vertical-align: middle; max-width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--lp-border);
  margin: 1rem 0;
}

label { display: inline-block; }
button { font: inherit; }

small, .small { font-size: 0.8125rem; }
strong, b { font-weight: 600; }
code { font-family: var(--lp-font-mono); font-size: 0.85em; color: var(--lp-danger); }

:focus-visible { outline: 2px solid rgba(115, 103, 240, 0.5); outline-offset: 1px; }

[x-cloak] { display: none !important; }

/* --------------------------------------------------------------------------
   3. Icons (Tabler via iconify masks — sizing helpers)
   -------------------------------------------------------------------------- */
.icon-base {
  font-size: 1.25rem;
  flex-shrink: 0;
  vertical-align: -0.22em;
}
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.375rem; }
.icon-lg { font-size: 1.625rem; }
.icon-18px { font-size: 1.125rem; }
.icon-20px { font-size: 1.25rem; }
.icon-22px { font-size: 1.375rem; }

/* --------------------------------------------------------------------------
   4. Layout shell
   -------------------------------------------------------------------------- */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.layout-container {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.layout-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: var(--lp-sidebar-width);
  transition: padding-left 0.25s ease;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.container-xxl,
.container-fluid {
  width: 100%;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.container-xxl { max-width: var(--lp-content-max); }

.container-p-y {
  padding-top: 1.625rem;
  padding-bottom: 1.625rem;
}

/* Sneat leftovers, neutralized */
.content-backdrop,
.drag-target,
.menu-inner-shadow {
  display: none !important;
}

/* Page heading convention used across templates (h4.py-4.mb-6) */
.container-p-y > h4 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   5. Sidebar (vertical menu)
   -------------------------------------------------------------------------- */
.layout-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  width: var(--lp-sidebar-width);
  background: var(--lp-paper);
  border-right: 1px solid var(--lp-border);
  transition: transform 0.25s ease;
}

.app-brand {
  display: flex;
  align-items: center;
  min-height: var(--lp-navbar-height);
  padding: 0 1.25rem;
  flex-shrink: 0;
}

.app-brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--lp-heading);
}
.app-brand-link:hover { color: var(--lp-heading); }

.app-brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lp-heading);
}

.menu-inner {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0;
  padding: 0.75rem;
  list-style: none;
}

.menu-item { list-style: none; }

.menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.875rem;
  margin-bottom: 0.125rem;
  border-radius: var(--lp-radius);
  color: var(--lp-body-color);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.menu-link:hover {
  background: var(--lp-hover-bg);
  color: var(--lp-heading);
}

.menu-link > div {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-icon {
  font-size: 1.375rem;
  color: inherit;
}

/* Active / open state */
.menu-item.active > .menu-link {
  background: var(--lp-active-bg);
  color: var(--lp-primary);
}

/* Submenus */
.menu-sub {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.menu-sub .menu-link {
  padding-left: 2.375rem;
  font-size: 0.875rem;
  font-weight: 400;
}
.menu-sub .menu-sub .menu-link { padding-left: 3.5rem; }
.menu-sub .menu-icon { font-size: 1.125rem; }

/* Collapsible submenu behaviour (vertical menu) */
.menu-vertical .menu-item:not(.open) > .menu-sub { display: none; }

/* Toggle chevron for items with submenus */
.menu-vertical .menu-item > .menu-link.menu-toggle::after {
  content: "";
  width: 0.9em;
  height: 0.9em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 6l6 6l-6 6'/%3E%3C/svg%3E") no-repeat 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 6l6 6l-6 6'/%3E%3C/svg%3E") no-repeat 100% 100%;
  transition: transform 0.2s ease;
}
.menu-vertical .menu-item.open > .menu-link.menu-toggle::after {
  transform: rotate(90deg);
}

/* Mobile behaviour: sidebar slides in */
@media (max-width: 1199.98px) {
  .layout-menu { transform: translateX(-100%); }
  html.layout-menu-expanded .layout-menu { transform: translateX(0); box-shadow: var(--lp-shadow-lg); }
  html.layout-menu-expanded { overflow: hidden; }
  .layout-page { padding-left: 0; }
}

/* Overlay shown behind mobile menu */
.layout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1035;
  display: none;
  background: var(--lp-backdrop);
}
html.layout-menu-expanded .layout-overlay { display: block; }

.menu-mobile-toggler { display: none; }

/* --------------------------------------------------------------------------
   6. Top navbar
   -------------------------------------------------------------------------- */
.layout-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  min-height: var(--lp-navbar-height);
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--lp-paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-border);
}

.layout-navbar.container-xxl { max-width: none; }

.navbar-nav {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav-right {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-item { list-style: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.625rem;
  color: var(--lp-body-color);
  border-radius: var(--lp-radius);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--lp-heading); }

/* Hamburger shown on small screens */
.layout-navbar .layout-menu-toggle { display: none; }
@media (max-width: 1199.98px) {
  .layout-navbar .layout-menu-toggle { display: flex; align-items: center; }
}

/* --------------------------------------------------------------------------
   7. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "";
  width: 0.85em;
  height: 0.85em;
  margin: 0 0.5rem;
  background-color: var(--lp-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m9 6l6 6l-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m9 6l6 6l-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.breadcrumb-item a { color: var(--lp-body-color); }
.breadcrumb-item a:hover { color: var(--lp-primary); }
.breadcrumb-item:last-child a { color: var(--lp-heading); font-weight: 500; }

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.content-footer {
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--lp-muted);
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-sm);
}

.card-header {
  padding: 1.25rem 1.5rem 0;
  background: transparent;
  border: 0;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--lp-border);
}

.card-title {
  margin-bottom: 0.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--lp-heading);
}

/* --------------------------------------------------------------------------
   10. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--lp-radius);
  background: transparent;
  color: var(--lp-body-color);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-sm { padding: 0.3125rem 0.75rem; font-size: 0.8125rem; border-radius: var(--lp-radius-sm); }
.btn-lg { padding: 0.6875rem 1.5rem; font-size: 1.0625rem; }

.btn-primary {
  background: var(--lp-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(115, 103, 240, 0.35);
}
.btn-primary:hover { background: var(--lp-primary-hover); color: #fff; }
.btn-primary:active { background: var(--lp-primary-active); }

.btn-secondary {
  background: var(--lp-secondary);
  color: #fff;
}
.btn-secondary:hover { background: color-mix(in srgb, var(--lp-secondary) 88%, #000); color: #fff; }

.btn-success {
  background: var(--lp-success);
  color: #fff;
  box-shadow: 0 2px 6px rgba(40, 199, 111, 0.35);
}
.btn-success:hover { background: color-mix(in srgb, var(--lp-success) 88%, #000); color: #fff; }

.btn-danger {
  background: var(--lp-danger);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 76, 81, 0.35);
}
.btn-danger:hover { background: color-mix(in srgb, var(--lp-danger) 88%, #000); color: #fff; }

.btn-warning { background: var(--lp-warning); color: #fff; }
.btn-warning:hover { background: color-mix(in srgb, var(--lp-warning) 88%, #000); color: #fff; }

.btn-info { background: var(--lp-info); color: #fff; }
.btn-info:hover { background: color-mix(in srgb, var(--lp-info) 88%, #000); color: #fff; }

.btn-outline-secondary {
  border-color: var(--lp-border-strong);
  color: var(--lp-body-color);
}
.btn-outline-secondary:hover {
  background: var(--lp-hover-bg);
  color: var(--lp-heading);
}

.btn-outline-primary {
  border-color: var(--lp-primary);
  color: var(--lp-primary);
}
.btn-outline-primary:hover { background: var(--lp-active-bg); }

.btn-outline-danger {
  border-color: var(--lp-danger);
  color: var(--lp-danger);
}
.btn-outline-danger:hover { background: rgba(255, 76, 81, 0.1); }

/* Sneat "text" buttons — quiet, tint on hover */
.btn-text-secondary,
.btn-text-primary,
.btn-text-danger,
.btn-text-facebook,
.btn-text-google-plus {
  color: var(--lp-body-color);
}
.btn-text-primary { color: var(--lp-primary); }
.btn-text-danger { color: var(--lp-danger); }
.btn-text-secondary:hover,
.btn-text-facebook:hover,
.btn-text-google-plus:hover {
  background: var(--lp-hover-bg);
  color: var(--lp-heading);
}
.btn-text-primary:hover { background: var(--lp-active-bg); }
.btn-text-danger:hover { background: rgba(255, 76, 81, 0.1); }

.btn-link {
  color: var(--lp-primary);
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.btn-link:hover { color: var(--lp-primary-hover); text-decoration: underline; }

.btn-icon {
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  flex-shrink: 0;
}
.btn-icon.btn-sm { width: 1.875rem; height: 1.875rem; }

/* Close button (modals, alerts) */
.btn-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.btn-close::before {
  content: "";
  position: absolute;
  inset: 0.375rem;
  background-color: var(--lp-body-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center / contain;
}
.btn-close:hover { background: var(--lp-hover-bg); }

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.form-label {
  display: inline-block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lp-heading);
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.875rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--lp-heading);
  background: var(--lp-paper);
  border: 1px solid var(--lp-border-strong);
  border-radius: var(--lp-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.form-control:focus,
.form-select:focus {
  outline: 0;
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.16);
}

.form-control::placeholder { color: var(--lp-muted); opacity: 1; }
.form-control:disabled,
.form-select:disabled { background: var(--lp-body-bg); opacity: 0.7; }

textarea.form-control { min-height: 4.5rem; resize: vertical; }

.form-select {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23a5a3ae' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.05em;
}

.form-control-sm,
.form-select-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.8125rem;
  border-radius: var(--lp-radius-sm);
}
.form-select-sm { padding-right: 2rem; }
.form-control-lg { padding: 0.6875rem 1rem; font-size: 1.0625rem; }

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.5rem;
}
.form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--lp-primary);
  cursor: pointer;
}
.form-check-label { cursor: pointer; }

.form-text { font-size: 0.8125rem; color: var(--lp-muted); }

/* Input groups */
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.input-group > .form-control,
.input-group > .form-select {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--lp-body-color);
  background: var(--lp-body-bg);
  border: 1px solid var(--lp-border-strong);
  white-space: nowrap;
}
.input-group > :not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}
.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > :first-child { border-radius: var(--lp-radius) 0 0 var(--lp-radius); }
.input-group > :last-child { border-radius: 0 var(--lp-radius) var(--lp-radius) 0; }
.input-group > :only-child { border-radius: var(--lp-radius); }
.input-group-sm > .form-control,
.input-group-sm > .input-group-text {
  padding: 0.3125rem 0.625rem;
  font-size: 0.8125rem;
}

/* "Merged" input group (e.g. password + eye toggle) */
.input-group-merge .input-group-text { background: var(--lp-paper); }
.input-group-merge > .form-control:not(:last-child) { border-right: 0; }
.input-group-merge > .form-control:focus + .input-group-text {
  border-color: var(--lp-primary);
}

/* --------------------------------------------------------------------------
   12. Tables
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  caption-side: bottom;
  color: var(--lp-body-color);
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lp-heading);
  border-bottom: 1px solid var(--lp-border);
  white-space: nowrap;
}

.table td {
  padding: 0.6875rem 1rem;
  border-bottom: 1px solid var(--lp-border);
  vertical-align: middle;
}

.table tbody tr { transition: background-color 0.12s ease; }
.table tbody tr:hover,
.table-hover tbody tr:hover { background: var(--lp-hover-bg); }

.table-sm th, .table-sm td { padding: 0.4375rem 0.625rem; }
.table-bordered th, .table-bordered td { border: 1px solid var(--lp-border); }
.table-border-bottom-0 tr:last-child td { border-bottom: 0; }
.table tbody tr:last-child td { border-bottom-color: transparent; }

/* --------------------------------------------------------------------------
   13. Alerts
   -------------------------------------------------------------------------- */
.alert {
  position: relative;
  padding: 0.875rem 1.125rem;
  margin-bottom: 1rem;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--lp-radius);
  font-weight: 500;
}
.alert-heading { color: inherit; margin-bottom: 0.375rem; }
.alert .btn-close { position: absolute; top: 0.625rem; right: 0.625rem; }

.alert-danger {
  color: var(--lp-danger);
  background: rgba(255, 76, 81, 0.12);
  border-left-color: var(--lp-danger);
}
.alert-success {
  color: #1f9d58;
  background: rgba(40, 199, 111, 0.12);
  border-left-color: var(--lp-success);
}
.alert-warning {
  color: #c97b2d;
  background: rgba(255, 159, 67, 0.14);
  border-left-color: var(--lp-warning);
}
.alert-info {
  color: #0093a5;
  background: rgba(0, 186, 209, 0.12);
  border-left-color: var(--lp-info);
}
.alert-primary {
  color: var(--lp-primary);
  background: rgba(115, 103, 240, 0.12);
  border-left-color: var(--lp-primary);
}

[data-bs-theme="dark"] .alert-success { color: #4cd287; }
[data-bs-theme="dark"] .alert-warning { color: #ffb268; }
[data-bs-theme="dark"] .alert-info { color: #35cade; }

/* --------------------------------------------------------------------------
   14. Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--lp-radius-sm);
  color: #fff;
  white-space: nowrap;
}

.bg-primary { background-color: var(--lp-primary) !important; }
.bg-secondary { background-color: var(--lp-secondary) !important; }
.bg-success { background-color: var(--lp-success) !important; }
.bg-danger { background-color: var(--lp-danger) !important; }
.bg-warning { background-color: var(--lp-warning) !important; }
.bg-info { background-color: var(--lp-info) !important; }
.bg-dark { background-color: var(--lp-dark) !important; }

.text-bg-secondary { background-color: var(--lp-secondary) !important; color: #fff !important; }

/* Tinted "label" badges */
.badge.bg-label-primary, .bg-label-primary { background: rgba(115, 103, 240, 0.16) !important; color: var(--lp-primary) !important; }
.badge.bg-label-secondary, .bg-label-secondary { background: rgba(128, 131, 144, 0.16) !important; color: var(--lp-secondary) !important; }
.badge.bg-label-success, .bg-label-success { background: rgba(40, 199, 111, 0.16) !important; color: var(--lp-success) !important; }
.badge.bg-label-danger, .bg-label-danger { background: rgba(255, 76, 81, 0.16) !important; color: var(--lp-danger) !important; }
.badge.bg-label-warning, .bg-label-warning { background: rgba(255, 159, 67, 0.16) !important; color: var(--lp-warning) !important; }
.badge.bg-label-info, .bg-label-info { background: rgba(0, 186, 209, 0.16) !important; color: var(--lp-info) !important; }

.rounded-pill { border-radius: 50rem !important; }

/* --------------------------------------------------------------------------
   15. Dropdowns
   -------------------------------------------------------------------------- */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  display: none;
  min-width: 12rem;
  margin: 0.375rem 0 0;
  padding: 0.4375rem;
  list-style: none;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow);
}
.dropdown-menu.show { display: block; animation: lp-pop 0.14s ease; }
.dropdown-menu-end { left: auto; right: 0; }
/* Positioned by JS (position:fixed) to escape clipping overflow ancestors such as a
   DataTable's .table-responsive/card; JS sets left, so neutralise .dropdown-menu-end. */
.dropdown-menu-fixed { right: auto; }

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  color: var(--lp-body-color);
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.dropdown-item:hover {
  background: var(--lp-active-bg);
  color: var(--lp-primary);
}
.dropdown-item.active { color: var(--lp-primary); }

.dropdown-divider {
  height: 0;
  margin: 0.375rem 0;
  border-top: 1px solid var(--lp-border);
}

.dropdown-toggle.hide-arrow::after { display: none; }

@keyframes lp-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   16. Modals
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}
.modal.show { display: block; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--lp-backdrop);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-backdrop.show { opacity: 1; }

.modal-dialog {
  position: relative;
  margin: 1.75rem auto;
  max-width: 500px;
  width: calc(100% - 2rem);
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transform: translateY(-14px) scale(0.985);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.modal.show .modal-dialog {
  transform: none;
  opacity: 1;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }
.modal-sm { max-width: 320px; }

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: var(--lp-paper);
  border: 0;
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 0;
}

.modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--lp-heading);
}

.modal-body { padding: 0.75rem 1.5rem 1.25rem; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  padding: 0 1.5rem 1.25rem;
  border-top: 0;
}

/* Sneat's "simple" modal — extra padding, floating close button */
.modal-simple .modal-content { padding: 1rem; }
.modal-simple .btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   17. Tabs & pills
   -------------------------------------------------------------------------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--lp-border);
  gap: 0.25rem;
}

.nav-tabs .nav-link {
  position: relative;
  padding: 0.5625rem 1rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--lp-body-color);
  font-weight: 500;
  cursor: pointer;
}
.nav-tabs .nav-link:hover { color: var(--lp-heading); }
.nav-tabs .nav-link.active {
  color: var(--lp-primary);
}
.nav-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--lp-primary);
}

.nav-fill .nav-item { flex: 1 1 auto; }
.nav-fill .nav-link { width: 100%; justify-content: center; }

.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active,
.tab-content > .tab-pane.show.active { display: block; }

/* --------------------------------------------------------------------------
   18. Collapse & accordion
   -------------------------------------------------------------------------- */
.collapse:not(.show) { display: none; }

.accordion-item {
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
}
.accordion-item + .accordion-item { margin-top: 0.5rem; }

.accordion-header { margin: 0; }

.accordion-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--lp-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.accordion-button::after {
  content: "";
  width: 1em;
  height: 1em;
  margin-left: auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.2s ease;
}
.accordion-button:not(.collapsed) { color: var(--lp-primary); }
.accordion-button:not(.collapsed)::after { transform: rotate(180deg); }

.accordion-body { padding: 0.25rem 1.125rem 1rem; }

/* --------------------------------------------------------------------------
   19. List group
   -------------------------------------------------------------------------- */
.list-group {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border-radius: var(--lp-radius);
}

.list-group-item {
  position: relative;
  display: block;
  padding: 0.75rem 1.125rem;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  color: var(--lp-body-color);
  list-style: none;
}
.list-group-item + .list-group-item { border-top: 0; }
.list-group-item:first-child { border-radius: var(--lp-radius) var(--lp-radius) 0 0; }
.list-group-item:last-child { border-radius: 0 0 var(--lp-radius) var(--lp-radius); }
.list-group-item:only-child { border-radius: var(--lp-radius); }

/* --------------------------------------------------------------------------
   20. Avatars
   -------------------------------------------------------------------------- */
.avatar {
  position: relative;
  display: inline-block;
  width: 2.375rem;
  height: 2.375rem;
  flex-shrink: 0;
}

.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-weight: 600;
}

.avatar-online::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lp-success);
  box-shadow: 0 0 0 2px var(--lp-paper);
}

/* --------------------------------------------------------------------------
   21. Progress
   -------------------------------------------------------------------------- */
.progress {
  display: flex;
  height: 0.625rem;
  overflow: hidden;
  background: var(--lp-hover-bg);
  border-radius: 50rem;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lp-primary);
  color: #fff;
  font-size: 0.6875rem;
  white-space: nowrap;
  transition: width 0.4s ease;
}

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 25%, transparent 25%,
    transparent 50%, rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 75%, transparent 75%, transparent
  );
  background-size: 0.75rem 0.75rem;
}

.progress-bar-animated {
  animation: lp-progress-stripes 0.8s linear infinite;
}

@keyframes lp-progress-stripes {
  from { background-position: 0.75rem 0; }
  to { background-position: 0 0; }
}

/* --------------------------------------------------------------------------
   22. Spinners
   -------------------------------------------------------------------------- */
.spinner-border {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
  vertical-align: -0.2em;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.15em; }

@keyframes lp-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   23. Divider (Sneat)
   -------------------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--lp-muted);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--lp-border);
}
.divider-text {
  padding: 0 0.875rem;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   24. Pagination (used by DataTables)
   -------------------------------------------------------------------------- */
.pagination,
div.dt-container .dt-paging nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-item { list-style: none; }

.page-link,
div.dt-container .dt-paging-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.125rem;
  height: 2.125rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  color: var(--lp-body-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.page-link:hover,
div.dt-container .dt-paging-button:hover {
  background: var(--lp-hover-bg);
  color: var(--lp-heading);
}

.page-item.active .page-link,
div.dt-container .dt-paging-button.current {
  background: var(--lp-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(115, 103, 240, 0.35);
}

.page-item.disabled .page-link,
div.dt-container .dt-paging-button.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   25. DataTables (v2) integration
   -------------------------------------------------------------------------- */
div.dt-container { width: 100%; }

div.dt-container .dt-layout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.625rem 0;
}
div.dt-container .dt-layout-row:has(> .dt-layout-full) { display: block; }

div.dt-container .dt-layout-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Keep end cells pinned right even when they are the only cell in the row
   (e.g. layout: { topStart: null, topEnd: 'search' }). */
div.dt-container .dt-layout-cell.dt-layout-start { margin-right: auto; }
div.dt-container .dt-layout-cell.dt-layout-end { margin-left: auto; }

div.dt-container .dt-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
div.dt-container .dt-search label,
div.dt-container .dt-length label {
  font-size: 0.875rem;
  color: var(--lp-body-color);
}
div.dt-container .dt-search input {
  width: 13rem;
}
div.dt-container .dt-length select { width: auto; }

/* Length menu placed inline after the info text (via layout
   bottomStart: ['info', 'pageLength']): render as
   "Showing x to y of z entries | 10 entries per page", matching the
   info text and keeping the select small and unobtrusive. */
div.dt-container .dt-info + .dt-length {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--lp-muted);
}
div.dt-container .dt-info + .dt-length::before { content: "|"; }
div.dt-container .dt-info + .dt-length label {
  font-size: 0.8125rem;
  color: var(--lp-muted);
}
div.dt-container .dt-info + .dt-length select {
  font-size: 0.8125rem;
  color: var(--lp-muted);
  padding: 0.0625rem 0.25rem;
  background: transparent;
  border: 1px solid var(--lp-border);
  border-radius: 0.25rem;
}

div.dt-container .dt-info {
  font-size: 0.8125rem;
  color: var(--lp-muted);
  padding: 0;
}

div.dt-container .dt-processing {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  color: var(--lp-heading);
  font-size: 0.8125rem;
}

/* The stock DataTables spinner (four bare <div>s) relies on DataTables' own
   CSS, which this theme strips out — hide it and show our loading GIF instead. */
div.dt-container .dt-processing > div {
  display: none;
}

div.dt-container .dt-processing::before {
  content: "";
  display: block;
  width: 64px;
  height: 42px;
  background: url("../img/icons/Loading_icon.gif") center / contain no-repeat;
}

div.dt-container .dt-processing::after {
  content: "Loading…";
  color: var(--lp-muted);
}

/* Sort indicators */
table.dataTable thead th { position: relative; }
table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc { cursor: pointer; user-select: none; }
table.dataTable thead th.dt-orderable-asc:hover,
table.dataTable thead th.dt-orderable-desc:hover { color: var(--lp-primary); }

table.dataTable thead th span.dt-column-order {
  position: relative;
  display: inline-block;
  width: 0.8em;
  height: 1em;
  margin-left: 0.375rem;
  vertical-align: -0.15em;
}
table.dataTable thead th span.dt-column-order::before,
table.dataTable thead th span.dt-column-order::after {
  position: absolute;
  left: 0;
  display: block;
  opacity: 0.3;
  font-size: 0.7em;
  line-height: 1;
}
table.dataTable thead th span.dt-column-order::before { content: "\25B2"; top: 0; }
table.dataTable thead th span.dt-column-order::after { content: "\25BC"; bottom: 0; }
table.dataTable thead th.dt-ordering-asc span.dt-column-order::before,
table.dataTable thead th.dt-ordering-desc span.dt-column-order::after {
  opacity: 1;
  color: var(--lp-primary);
}
table.dataTable thead th:not(.dt-orderable-asc):not(.dt-orderable-desc) span.dt-column-order { display: none; }

table.dataTable td.dt-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--lp-muted);
}

/* --------------------------------------------------------------------------
   26. Select2 theming
   -------------------------------------------------------------------------- */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 2.5rem;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border-strong);
  border-radius: var(--lp-radius);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 2.375rem;
  padding-left: 0.875rem;
  color: var(--lp-heading);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.375rem;
  right: 0.5rem;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.16);
}
.select2-dropdown {
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  color: var(--lp-body-color);
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--lp-primary);
  color: #fff;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--lp-border-strong);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-paper);
  color: var(--lp-heading);
  padding: 0.375rem 0.625rem;
}

/* --------------------------------------------------------------------------
   27. Flatpickr theming
   -------------------------------------------------------------------------- */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: var(--lp-primary);
  border-color: var(--lp-primary);
}
.flatpickr-day.today { border-color: var(--lp-primary); }
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
span.flatpickr-weekday {
  background: var(--lp-primary);
  color: #fff;
  fill: #fff;
}

/* --------------------------------------------------------------------------
   28. Grid (subset)
   -------------------------------------------------------------------------- */
.row {
  --lp-gutter-x: 1.5rem;
  --lp-gutter-y: 0rem;
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-0.5 * var(--lp-gutter-x));
  margin-right: calc(-0.5 * var(--lp-gutter-x));
  margin-top: calc(-1 * var(--lp-gutter-y));
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  padding-left: calc(0.5 * var(--lp-gutter-x));
  padding-right: calc(0.5 * var(--lp-gutter-x));
  margin-top: var(--lp-gutter-y);
}

.g-2 { --lp-gutter-x: 0.5rem; --lp-gutter-y: 0.5rem; }
.g-3 { --lp-gutter-x: 0.75rem; --lp-gutter-y: 0.75rem; }
.g-4 { --lp-gutter-x: 1.5rem; --lp-gutter-y: 1.5rem; }

.col { flex: 1 0 0%; }
.col-2 { width: 16.6667%; }
.col-3 { width: 25%; }
.col-4 { width: 33.3333%; }
.col-6 { width: 50%; }
.col-12 { width: 100%; }
.col-auto { flex: 0 0 auto; width: auto; }

@media (min-width: 768px) {
  .col-md { flex: 1 0 0%; width: auto; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-4 { width: 33.3333%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.6667%; }
  .d-md-flex { display: flex !important; }
}
@media (min-width: 992px) {
  .col-lg-4 { width: 33.3333%; }
  .col-lg-6 { width: 50%; }
}

/* --------------------------------------------------------------------------
   29. Utilities (subset actually used by templates)
   -------------------------------------------------------------------------- */
/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-inline-flex { display: inline-flex !important; }

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
}

/* Flex */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-middle { vertical-align: middle !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }

@media (min-width: 576px) {
  .align-items-sm-center { align-items: center !important; }
  .justify-content-sm-between { justify-content: space-between !important; }
}
@media (min-width: 768px) {
  .flex-md-row { flex-direction: row !important; }
  .ms-md-auto { margin-left: auto !important; }
}

/* Spacing — Vuexy scale: 1=.25 2=.5 3=.75 4=1 5=1.25 6=1.5 8=2 10=2.5 12=3 */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 0.75rem !important; }
.ms-4 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-1_5 { margin-right: 0.375rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 0.75rem !important; }
.me-4 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mx-n2 { margin-left: -0.5rem !important; margin-right: -0.5rem !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-6 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-8 { margin-top: 2rem !important; margin-bottom: 2rem !important; }

.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.ps-4 { padding-left: 1rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

@media (min-width: 1200px) {
  .me-xl-0 { margin-right: 0 !important; }
  .me-xl-6 { margin-right: 1.5rem !important; }
}

/* Sizing */
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }

/* Text */
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.text-nowrap { white-space: nowrap !important; }
.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.text-primary { color: var(--lp-primary) !important; }
.text-secondary { color: var(--lp-secondary) !important; }
.text-success { color: var(--lp-success) !important; }
.text-danger { color: var(--lp-danger) !important; }
.text-warning { color: var(--lp-warning) !important; }
.text-info { color: var(--lp-info) !important; }
.text-dark { color: var(--lp-heading) !important; }
.text-muted { color: var(--lp-muted) !important; }
.text-heading { color: var(--lp-heading) !important; }
.text-body { color: var(--lp-body-color) !important; }
.text-body-secondary { color: var(--lp-muted) !important; }
.text-large { font-size: 1.125rem !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.font-monospace { font-family: var(--lp-font-mono) !important; }

/* Border / radius */
.rounded { border-radius: var(--lp-radius) !important; }
.rounded-1 { border-radius: var(--lp-radius-sm) !important; }
.rounded-circle { border-radius: 50% !important; }
.border { border: 1px solid var(--lp-border) !important; }
.border-0 { border: 0 !important; }

/* Misc */
.overflow-hidden { overflow: hidden !important; }
.cursor-pointer { cursor: pointer !important; }
.cursor-move { cursor: move !important; }
.cursor-grab { cursor: grab !important; }
.list-inline { padding: 0; list-style: none; }
.list-inline > li { display: inline-block; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Fade helper (Bootstrap semantics, used with .show) */
.fade { transition: opacity 0.15s linear; }
.fade:not(.show) { opacity: 0; }

/* Waves/ripple classes from old theme — neutralized */
.waves-effect { position: relative; }

/* --------------------------------------------------------------------------
   30. Auth pages
   -------------------------------------------------------------------------- */
.authentication-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background:
    radial-gradient(48rem 24rem at 85% -10%, rgba(115, 103, 240, 0.14), transparent 60%),
    radial-gradient(40rem 20rem at 0% 110%, rgba(0, 186, 209, 0.1), transparent 60%),
    var(--lp-body-bg);
}

.authentication-inner {
  width: 100%;
  max-width: 25rem;
}

.authentication-inner .card {
  border: 0;
  box-shadow: var(--lp-shadow-lg);
  border-radius: 1rem;
}

.authentication-inner .card-body { padding: 2.25rem 2rem; }

/* --------------------------------------------------------------------------
   31. Scrollbars (subtle, replaces perfect-scrollbar)
   -------------------------------------------------------------------------- */
.menu-inner::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.modal::-webkit-scrollbar {
  width: 0.4rem;
  height: 0.4rem;
}
.menu-inner::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
  background: var(--lp-border-strong);
  border-radius: 50rem;
}
.menu-inner::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   32. Horizontal menu (admin area)
   -------------------------------------------------------------------------- */
.layout-menu-horizontal {
  position: sticky;
  top: var(--lp-navbar-height);
  z-index: 1020;
  width: 100%;
  background: var(--lp-paper);
  border-bottom: 1px solid var(--lp-border);
}

.layout-menu-horizontal .menu-inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0;
  overflow: visible;
}

.layout-menu-horizontal .menu-item { position: relative; }

.layout-menu-horizontal .menu-link {
  margin-bottom: 0;
  padding: 0.5rem 0.875rem;
}

.layout-menu-horizontal .menu-item.active > .menu-link {
  background: var(--lp-active-bg);
  color: var(--lp-primary);
}

/* Horizontal submenus appear as dropdowns on hover/open */
.layout-menu-horizontal .menu-sub {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 1050;
  min-width: 13rem;
  padding: 0.4375rem;
  background: var(--lp-paper);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow);
  /* Override the base .menu-sub overflow:hidden so the hover bridge below
     (which sits above the submenu's top edge) isn't clipped away. */
  overflow: visible;
  /* Hidden via visibility/opacity (not display:none) so we can hold it open
     briefly after the pointer leaves — see the close-grace delay below. */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.25rem);
  /* On CLOSE: opacity/transform fade out immediately, but visibility stays
     `visible` for 0.2s (the delayed transition) so a momentary hover loss —
     jittering on the toggle, or moving diagonally into the submenu — keeps the
     menu interactive instead of dismissing it the instant :hover drops. */
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.2s;
}
/* Invisible bridge across the top gap so hover stays continuous when the
   mouse travels from the toggle down into the submenu. */
.layout-menu-horizontal .menu-sub::before {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: 0;
  right: 0;
  height: 0.25rem;
}
/* Only :hover opens a horizontal submenu — NOT .open. The template adds
   `active open` to the parent of the current page (see menu.ftl), and .open is
   the vertical menu's "expanded" state; honoring it here would leave the
   submenu popped open on page load until the mouse moved. */
.layout-menu-horizontal .menu-item:hover > .menu-sub {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  /* On OPEN: no visibility delay — show immediately. */
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s;
}
.layout-menu-horizontal .menu-sub .menu-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}
.layout-menu-horizontal .menu-sub .menu-item.active > .menu-link {
  background: var(--lp-active-bg);
}

.layout-menu-horizontal .menu-link.menu-toggle::after {
  content: "";
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.375rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}

@media (max-width: 767.98px) {
  .layout-menu-horizontal .menu-inner {
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Admin layout: no fixed sidebar padding */
.layout-wrapper.layout-navbar-full .layout-page,
.layout-wrapper.layout-without-menu .layout-page {
  padding-left: 0;
}
.layout-wrapper.layout-navbar-full .layout-container {
  flex-direction: column;
}

/* Admin brand inside navbar */
.navbar-brand.app-brand { min-height: 0; padding: 0; }
