@charset "utf-8";

/* =============================================================
   ADMIN MODERN UI OVERLAY
   Pure design layer loaded after adminlte.css / style.css.
   No markup hooks are changed — selectors only restyle what
   the existing templates already render.
   ============================================================= */

:root {
  --adm-primary: #0073bb;
  --adm-primary-dark: #005c96;
  --adm-primary-soft: rgba(0, 115, 187, 0.09);
  --adm-bg: #eef2f8;
  --adm-surface: #ffffff;
  --adm-border: #e5e9f2;
  --adm-text: #1e293b;
  --adm-muted: #64748b;
  --adm-radius: 12px;
  --adm-radius-sm: 8px;
  --adm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.05);
  --adm-header-h: 60px;
  --adm-bottomnav-h: 62px;
}

body,
body.hold-transition {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--adm-bg);
  color: var(--adm-text);
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  background-color: var(--adm-bg);
}

a {
  color: var(--adm-primary);
}

/* thin scrollbars everywhere */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =============================================================
   TOP HEADER
   ============================================================= */

.main-header.navbar {
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  box-shadow: none;
  min-height: var(--adm-header-h);
  padding: 0 1rem;
}

.main-header .nav-link {
  color: var(--adm-muted);
  border-radius: var(--adm-radius-sm);
}

.main-header .nav-link:hover {
  color: var(--adm-primary);
  background: var(--adm-primary-soft);
}

.main-header .nav-bell {
  position: relative;
  font-size: 1.05rem;
}

.main-header .nav-bell .bell-dot {
  position: absolute;
  top: 7px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.main-header .user-menu > a.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  color: var(--adm-text);
  font-weight: 500;
  font-size: 0.875rem;
}

.main-header .user-menu > a.dropdown-toggle:hover {
  border-color: var(--adm-primary);
  background: var(--adm-primary-soft);
}

.main-header .user-menu .user-image {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0;
}

.main-header .user-menu .dropdown-menu {
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 0.75rem;
  min-width: 230px;
  margin-top: 0.5rem;
}

/* =============================================================
   SIDEBAR — flat white panel (per approved mockup)
   ============================================================= */

.main-sidebar,
.main-sidebar.elevation-4,
.main-sidebar.sidebar-light-primary {
  background: var(--adm-surface);
  box-shadow: none;
  border-right: 1px solid var(--adm-border);
  padding: 0;
}

/* keep the sidebar (and its pinned user card) on screen while scrolling */
@media (min-width: 992px) {
  body .main-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
  }
}

.brand-link,
.main-sidebar .brand-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--adm-header-h);
  background: transparent;
  border: none;
  border-bottom: none !important;
  border-radius: 0;
  padding: 0.6rem 1.25rem;
}

.brand-link .brand-image {
  max-height: 40px;
  width: auto;
}

.main-sidebar .sidebar {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  /* leave room for the collapse toggle + pinned user card */
  height: calc(100vh - var(--adm-header-h) - 69px - 42px);
  padding: 0.25rem 0.65rem 1.5rem;
  /* the scrollbar otherwise overlays the right-aligned chevrons/badges */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-sidebar .sidebar::-webkit-scrollbar {
  display: none;
  width: 0;
}

.nav-sidebar .nav-item > .nav-link {
  display: flex;
  align-items: center;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 12px;
  margin-bottom: 3px;
  padding: 0.6rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-sidebar .nav-item > .nav-link:hover,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link:hover {
  background: #f1f5f9;
  color: var(--adm-text);
}

/* plain flat icons */
.nav-sidebar > .nav-item > .nav-link > .nav-icon,
.nav-sidebar > .menu-open > .nav-link > .nav-icon {
  display: inline-block;
  width: 1.6rem;
  flex: 0 0 auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: #475569;
  font-size: 1rem;
  text-align: center;
  margin-right: 0.6rem;
}

/* active state — soft blue pill */
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active:hover {
  background: #e8f1fc;
  color: var(--adm-primary);
  box-shadow: none;
  font-weight: 600;
}

.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active > .nav-icon,
.nav-sidebar > .menu-open > .nav-link > .nav-icon {
  color: var(--adm-primary);
}

/* open group — outlined rounded card wrapping parent + submenu.
   closed and open items keep IDENTICAL geometry (constant transparent
   border, no inner padding, no top margin) so the row never shifts
   when a section expands */
.nav-sidebar > .nav-item {
  border: 1px solid transparent;
  border-radius: 14px;
}

.nav-sidebar > .nav-item.menu-open {
  border-color: var(--adm-border);
  background: var(--adm-surface);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  margin: 0 0 0.6rem;
}

.nav-sidebar > .nav-item.menu-open > .nav-link {
  margin-bottom: 0;
  border-radius: 13px 13px 0 0;
}

.nav-sidebar > .nav-item.menu-open > .nav-link:not(.active) {
  background: transparent;
  color: var(--adm-text);
  font-weight: 600;
}

/* submenu — inset panel with timeline dots */
.nav-sidebar .nav-treeview {
  background: #f8fafc;
  border-radius: 10px;
  margin: 0.15rem 0.35rem 0.35rem;
  padding: 0.5rem;
  position: relative;
}

.nav-sidebar .nav-treeview::before {
  content: '';
  position: absolute;
  left: 1.05rem;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 2px;
  background: #dbe4f0;
}

.nav-sidebar .nav-item > .nav-treeview .nav-link {
  position: relative;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
  padding-inline-start: 1.65rem;
  color: #475569;
  border-radius: 8px;
  margin-bottom: 1px;
}

/* timeline dot — kept inside the link box (AdminLTE clips overflow) */
.nav-sidebar .nav-treeview .nav-link::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4a90d9;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(74, 144, 217, 0.25);
}

.nav-sidebar .nav-treeview .nav-link.active::before,
.nav-sidebar .nav-treeview .nav-link:hover::before {
  background: var(--adm-primary);
}

.nav-sidebar .nav-treeview .nav-link:hover {
  background: #eef2f7;
  color: var(--adm-text);
}

/* submenu active */
.nav-sidebar .nav-treeview > .nav-item > .nav-link.active,
.nav-sidebar .nav-treeview > .nav-item > .nav-link.active:hover,
.sidebar-light-primary .nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: #e8f1fc;
  color: var(--adm-primary);
  box-shadow: none;
  font-weight: 600;
}

.nav-sidebar .nav-treeview .nav-link > .nav-icon {
  display: none; /* timeline dots replace icons */
}

/* rows must fit the panel: bootstrap .nav wraps and stretches items to the
   widest row's intrinsic width, overflowing the sidebar and clipping the
   right-aligned chevrons/badges */
.nav-sidebar.flex-column {
  flex-wrap: nowrap;
}

body.sidebar-mini .nav-sidebar > .nav-item > .nav-link {
  width: auto;
}

/* labels shrink with ellipsis so the chevron/badge always stays visible */
.nav-sidebar .nav-item > .nav-link > span:not(.pull-right-container) {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* chevron + badge pushed to the far right of the row (flex link) */
.nav-sidebar .nav-link > .pull-right-container {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-sidebar .nav-link > .pull-right-container .badge {
  float: none;
}

/* caret: chevron right when closed, up when open */
.nav-sidebar .nav-link .icon-line-awesome-angle-down {
  transition: transform 0.2s ease;
  font-size: 0.85rem;
  color: #94a3b8;
  transform: rotate(-90deg);
}

.nav-sidebar .menu-open > .nav-link .icon-line-awesome-angle-down {
  transform: rotate(-180deg);
}

.nav-sidebar .badge {
  font-size: 0.65rem;
  padding: 0.35em 0.6em;
}

/* collapse / expand toggle above the user card (desktop only) */
.sidebar-collapse-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 69px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 42px;
  padding: 0 1.1rem;
  color: var(--adm-muted);
  font-size: 0.82rem;
  font-weight: 500;
  border-top: 1px solid var(--adm-border);
  background: var(--adm-surface);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-collapse-btn:hover {
  background: #f1f5f9;
  color: var(--adm-primary);
  text-decoration: none;
}

.sidebar-collapse-btn i {
  font-size: 0.9rem;
  transition: transform 0.25s ease;
}

/* collapsed: icon-only, flipped to point right */
@media (min-width: 992px) {
  body.sidebar-collapse .sidebar-collapse-btn {
    justify-content: center;
    padding: 0;
  }

  body.sidebar-collapse .sidebar-collapse-btn span {
    display: none;
  }

  body.sidebar-collapse .sidebar-collapse-btn i {
    transform: rotate(180deg);
  }
}

/* mobile drawer: no collapse concept — hide the toggle */
@media (max-width: 991.98px) {
  .sidebar-collapse-btn {
    display: none;
  }
}

/* pinned user card at the bottom of the sidebar */
.sidebar-user {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--adm-surface);
  border-top: 1px solid var(--adm-border);
  text-decoration: none;
  transition: background 0.15s ease;
}

.sidebar-user:hover {
  background: #f8fafc;
  text-decoration: none;
}

.sidebar-user img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
  flex: 0 0 auto;
}

.sidebar-user .sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user .sidebar-user-info strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .sidebar-user-info small {
  font-size: 0.72rem;
  color: var(--adm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user > i {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* =============================================================
   CONTENT AREA
   ============================================================= */

.content-wrapper {
  background: var(--adm-bg);
}

.content-header {
  padding: 1.25rem 1rem 0.75rem;
}

.content-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--adm-text);
  margin: 0;
}

.content-header h1 small {
  font-size: 0.85rem;
  color: var(--adm-muted);
  font-weight: 400;
  margin-left: 0.5rem;
}

.breadcrumb {
  background: transparent;
  padding: 0.25rem 0 0;
  margin: 0;
  font-size: 0.8rem;
}

.breadcrumb a {
  color: var(--adm-muted);
}

.breadcrumb-item.active {
  color: var(--adm-primary);
}

.main-footer {
  background: transparent;
  border-top: 1px solid var(--adm-border);
  color: var(--adm-muted);
  font-size: 0.8rem;
  padding: 0.9rem 1rem;
}

/* =============================================================
   CARDS  (.box legacy + .card)
   ============================================================= */

.box,
.card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  margin-bottom: 1.25rem;
}

.box-header,
.card-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: transparent;
  border-bottom: 1px solid var(--adm-border);
  padding: 0.9rem 1.25rem;
  border-top-left-radius: var(--adm-radius);
  border-top-right-radius: var(--adm-radius);
}

.box-title,
.card-title {
  float: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--adm-text);
  margin: 0;
  margin-right: auto;
}

.box-header > .box-tools {
  float: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0 auto;
}

.box-tools .btn,
.card-tools .btn {
  margin: 0;
}

.btn-box-tool {
  color: var(--adm-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-box-tool:hover {
  color: var(--adm-primary);
}

.box-body {
  padding: 1.25rem;
}

.box-body.no-padding,
.box-body.table-responsive.no-padding {
  padding: 0;
}

.box .box-footer {
  background: transparent;
  border-top: 1px solid var(--adm-border);
  padding: 0.75rem 1.25rem;
  border-bottom-left-radius: var(--adm-radius);
  border-bottom-right-radius: var(--adm-radius);
}

.box.box-solid > .box-header {
  color: var(--adm-text);
}

/* =============================================================
   TABLES — one consistent list style everywhere
   ============================================================= */

.table {
  color: var(--adm-text);
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--adm-muted);
  background: #f8fafc;
  border-top: 0;
  border-bottom: 1px solid var(--adm-border);
  padding: 0.7rem 1rem;
  white-space: nowrap;
  vertical-align: middle;
}

.table td {
  padding: 0.7rem 1rem;
  border-top: 1px solid #eef2f7;
  vertical-align: middle;
}

.table tr:first-child td {
  border-top: 0;
}

.table-hover tbody tr:hover {
  background-color: #f8fafc;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* .box is a flex column — without min-width:0 its children refuse to
   shrink below the table's min-content width and the page overflows
   instead of the wrapper scrolling */
.box > .box-body,
.box > .table-responsive,
.box .box-body.table-responsive {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

/* round the last row into card corner */
.box-body.table-responsive.no-padding .table tr:last-child td {
  border-bottom: 0;
}

/* keep row actions on one line */
.table td.text-right {
  white-space: nowrap;
}

/* action icons as soft chip buttons */
.table td a > .fa,
.table td a > .fas,
.table td a > .far,
.table td a > .fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 0.8rem !important;
  transition: background 0.15s ease, transform 0.1s ease;
}

.table td a:hover > .fa,
.table td a:hover > .fas,
.table td a:hover > .far {
  transform: translateY(-1px);
}

.table td a > .fa.green,
.table td a > .fas.green {
  color: #15803d;
  background: #dcfce7;
}

.table td a > .fa.red,
.table td a > .fas.red {
  color: #b91c1c;
  background: #fee2e2;
}

.table td a > .fa.blue,
.table td a > .fas.blue {
  color: var(--adm-primary);
  background: var(--adm-primary-soft);
}

/* =============================================================
   BADGES — soft status pills
   ============================================================= */

.badge {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.4em 0.85em;
  letter-spacing: 0.01em;
}

.badge-success,
.bg-success.badge {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}

.badge-danger {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}

.badge-warning {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

.badge-info {
  background-color: #e0f2fe !important;
  color: #075985 !important;
}

.badge-primary {
  background-color: var(--adm-primary-soft) !important;
  color: var(--adm-primary) !important;
}

.badge-secondary {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

/* sidebar + bottom-nav counters stay solid for visibility */
.nav-sidebar .badge.bg-danger,
.mobile-bottom-nav .mbn-badge {
  background-color: #ef4444 !important;
  color: #fff !important;
}

/* =============================================================
   BUTTONS
   ============================================================= */

.btn {
  border-radius: var(--adm-radius-sm);
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn:focus {
  box-shadow: 0 0 0 3px var(--adm-primary-soft);
}

.btn-site {
  background-color: var(--adm-primary);
  border-color: var(--adm-primary);
  color: #fff;
}

.btn-site:hover,
.btn-site:focus {
  background-color: var(--adm-primary-dark);
  border-color: var(--adm-primary-dark);
  color: #fff;
}

.btn-default {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  color: var(--adm-text);
}

.btn-default:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-warning {
  background-color: #fbbf24;
  border-color: #fbbf24;
  color: #422006;
}

.btn-warning:hover {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #422006;
}

.btn-success {
  background-color: #16a34a;
  border-color: #16a34a;
}

.btn-success:hover {
  background-color: #15803d;
  border-color: #15803d;
}

.btn-danger {
  background-color: #dc2626;
  border-color: #dc2626;
}

/* bulk-action button group in list headers */
#global_action_btn {
  gap: 0.25rem;
}

#global_action_btn .btn {
  border-radius: var(--adm-radius-sm) !important;
}

/* =============================================================
   FORMS
   ============================================================= */

.form-control {
  border: 1px solid #d7dde8;
  border-radius: var(--adm-radius-sm);
  color: var(--adm-text);
  font-size: 0.9rem;
  min-height: calc(1.5em + 0.75rem + 4px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px var(--adm-primary-soft);
}

.form-group label,
label {
  font-weight: 500;
  color: var(--adm-text);
  font-size: 0.875rem;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-append .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.error {
  color: #dc2626;
}

.invalid {
  border-color: #dc2626 !important;
}

/* magic checkbox / radio brand color */
.magic-checkbox:checked + label:before {
  background: var(--adm-primary) !important;
  border-color: var(--adm-primary) !important;
}

.magic-radio:checked + label:before {
  border-color: var(--adm-primary) !important;
}

.magic-radio:checked + label:after {
  background: var(--adm-primary) !important;
}

/* select2 to match inputs */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid #d7dde8;
  border-radius: var(--adm-radius-sm);
  min-height: calc(1.5em + 0.75rem + 4px);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px var(--adm-primary-soft);
}

.select2-dropdown {
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
  box-shadow: var(--adm-shadow);
}

/* =============================================================
   FILTER / SEARCH PANELS  (filter-form.php)
   ============================================================= */

.advance-search-panel {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.status-filter-link {
  display: inline-block;
  text-decoration: none;
  color: var(--adm-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.status-filter-link:hover {
  background-color: #f1f5f9;
  color: var(--adm-text);
  text-decoration: none;
}

.status-filter-link.active {
  background-color: var(--adm-primary);
  color: #fff;
  font-weight: 600;
}

/* =============================================================
   PAGINATION
   ============================================================= */

.pagination {
  gap: 0.25rem;
}

.pagination li a,
.pagination li span,
.pagination .page-link {
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm) !important;
  color: var(--adm-text);
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  background: var(--adm-surface);
  display: inline-block;
  min-width: 34px;
  text-align: center;
}

.pagination li a:hover,
.pagination .page-link:hover {
  background: var(--adm-primary-soft);
  border-color: var(--adm-primary);
  color: var(--adm-primary);
}

.pagination li.active a,
.pagination li.active span,
.pagination .page-item.active .page-link,
.pagination li a strong,
.pagination strong {
  background: var(--adm-primary);
  border-color: var(--adm-primary);
  color: #fff;
}

/* CI pagination sometimes prints bare <strong> for current page */
.pagination > strong {
  border-radius: var(--adm-radius-sm);
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  min-width: 34px;
  text-align: center;
  display: inline-block;
}

/* =============================================================
   MODALS
   ============================================================= */

.modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--adm-border);
  padding: 1rem 1.5rem;
  background: var(--adm-surface);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.modal-header .close {
  outline: none;
  opacity: 0.4;
}

.modal-body {
  padding: 1.5rem 1.5rem 0;
}

/* sticky footer: submit stays visible while the form scrolls */
.modal-body .box-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 1.25rem -1.5rem 0;
  padding: 1rem 1.5rem 1.25rem;
  border: none;
  border-top: 1px solid var(--adm-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, #ffffff 40%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* brand accent bar on modal titles */
.modal-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.05em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--adm-primary) 0%, #2f9fdf 100%);
  margin-right: 0.65rem;
  vertical-align: -0.18em;
}

.modern-dialog .modal-title::before {
  display: none; /* centered dialogs use their icon instead */
}

/* soft inputs inside modals — light gray, brighten on focus */
.modal-body .form-control {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.modal-body .form-control:focus {
  background-color: #ffffff;
  border-color: var(--adm-primary);
}

.modal-body .input-group-append .btn,
.modal-body .input-group-append .input-group-text {
  background-color: #eef2f7;
  border: 1px solid #e2e8f0;
  color: var(--adm-text);
  font-weight: 500;
}

/* darker, softly blurred backdrop */
.modal-backdrop {
  background-color: #0f172a;
}

.modal-backdrop.show,
.modal-backdrop.in {
  opacity: 0.55;
}

/* =============================================================
   DASHBOARD WIDGETS
   ============================================================= */

.small-box {
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  overflow: hidden;
}

.small-box .inner {
  padding: 1.1rem 1.25rem;
}

.small-box h3 {
  font-size: 1.9rem;
  font-weight: 700;
}

.small-box p {
  font-size: 0.875rem;
  opacity: 0.95;
}

.small-box .icon {
  transition: none;
}

.small-box .icon > i {
  font-size: 3.4rem;
  opacity: 0.25;
  top: 15px;
}

.small-box:hover .icon > i,
.small-box .icon > i:hover {
  font-size: 3.4rem;
}

.small-box .small-box-footer {
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.8rem;
  padding: 5px 0;
}

.info-box {
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  min-height: 84px;
  padding: 0.75rem;
}

.info-box .info-box-icon {
  border-radius: 10px;
  width: 56px;
  font-size: 1.5rem;
}

.info-box .info-box-text {
  font-size: 0.8rem;
  color: var(--adm-muted);
  font-weight: 500;
  text-transform: none;
}

.info-box .info-box-number {
  font-size: 1.15rem;
  font-weight: 700;
}

/* colored info-boxes (notification counters) keep bg but round nicely */
.info-box[class*="bg-"] .info-box-text,
.info-box[class*="bg-"] .info-box-number {
  color: inherit;
}

a > .info-box {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a:hover > .info-box {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  text-decoration: none;
}

/* =============================================================
   LOGIN PAGE
   ============================================================= */

body.login-page {
  background: linear-gradient(160deg, #eef4fb 0%, #f6f8fc 55%, #e7f0f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.card.login-box {
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.login-box .card-body {
  padding: 2.25rem 2rem;
}

.login-logo {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-logo img {
  max-height: 52px;
  width: auto;
}

.login-box-msg {
  text-align: center;
  color: var(--adm-muted);
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 1.5rem;
}

.login-page .form-control {
  padding: 0.65rem 0.9rem;
  min-height: 44px;
}

.login-page .btn-block {
  padding: 0.6rem;
  font-weight: 600;
}

/* =============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================= */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 991.98px) {

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    height: calc(var(--adm-bottomnav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--adm-surface);
    border-top: 1px solid var(--adm-border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.07);
  }

  .mobile-bottom-nav .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--adm-muted);
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav .mbn-item i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-bottom-nav .mbn-item.active {
    color: var(--adm-primary);
  }

  .mobile-bottom-nav .mbn-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--adm-primary);
  }

  .mobile-bottom-nav .mbn-badge {
    position: absolute;
    top: 7px;
    left: calc(50% + 4px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
  }

  /* make room for the bottom nav */
  .content-wrapper {
    padding-bottom: calc(var(--adm-bottomnav-h) + 20px);
  }

  .main-footer {
    display: none;
  }

  /* header/content spacing on small screens */
  .content-header {
    padding: 1rem 0.5rem 0.5rem;
  }

  .content-header h1 {
    font-size: 1.15rem;
  }

  .content-header h1 small {
    display: block;
    margin: 0.15rem 0 0;
  }

  .content-header .breadcrumb {
    display: none;
  }

  .box-header {
    padding: 0.75rem 1rem;
  }

  .box-header > .box-tools {
    width: 100%;
    margin-left: 0;
  }

  .box-body {
    padding: 1rem;
  }

  .table th,
  .table td {
    padding: 0.6rem 0.75rem;
  }

  /* profile/detail header blocks: allow the text side to shrink and wrap
     below the avatar instead of pushing the page wider */
  .media {
    flex-wrap: wrap;
  }

  .media-body {
    min-width: 0;
  }

  .media-body .table td,
  .media-body .table th {
    white-space: normal;
    word-break: break-word;
  }

  /* some lists force overflow visible (inline style) so desktop dropdowns
     aren't clipped — on mobile that blows the page out horizontally */
  .box-body.table-responsive[style*="overflow-x: visible"] {
    overflow-x: auto !important;
  }

  /* full-width comfortable modals */
  .modal-dialog {
    margin: 0.75rem;
    max-width: none;
  }

  .box .box-footer .pagination {
    float: none !important;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }

  /* login tweaks */
  .login-box .card-body {
    padding: 1.75rem 1.25rem;
  }

  /* filter form search box goes full width */
  .content-header .input-group {
    width: 100% !important;
  }
}

/* keep desktop pagination on the right but flex for gap support */
.box .box-footer .pagination {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

/* =============================================================
   MISC POLISH
   ============================================================= */

/* sidebar overlay (adminlte mobile) above bottom nav */
#sidebar-overlay {
  z-index: 1035;
}

@media (max-width: 991.98px) {
  .main-sidebar {
    z-index: 1050;
  }
}

/* tooltips — dark pills WITH pointer arrow */
.tooltip-inner {
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  background: #1e293b;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
  border-right-color: #1e293b;
}

.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
  border-top-color: #1e293b;
}

.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
  border-bottom-color: #1e293b;
}

.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
  border-left-color: #1e293b;
}

/* loader wrapper */
.loader {
  color: var(--adm-primary);
}

/* NO_RECORD empty rows */
.table td[colspan] {
  text-align: center;
  color: var(--adm-muted);
  padding: 2.5rem 1rem;
  font-size: 0.9rem;
}

/* =============================================================
   DESKTOP MODERN POLISH
   ============================================================= */

/* sticky glass header */
.main-header.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* page header: title left, breadcrumb right on one line */
.content-header:has(> h1) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 1rem 1rem;
}

.content-header:has(> h1) .breadcrumb {
  padding: 0;
}

/* sidebar section label */
.nav-sidebar .nav-header {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.75rem 0.6rem 0.35rem;
  background: transparent;
}

.nav-sidebar .menu-open > .nav-link:not(.active) {
  background: #f1f5f9;
  color: var(--adm-text);
}

/* -------------------------------------------------------------
   ACCENT MAP for legacy AdminLTE bg-* color classes
   (used by dashboard counters — lets us render them as clean
   white cards with a tinted icon chip instead of solid blocks)
   ------------------------------------------------------------- */

.small-box,
.info-box               { --accent: var(--adm-primary); }
.bg-aqua,   .bg-info    { --accent: #0891b2; }
.bg-yellow, .bg-warning { --accent: #d97706; }
.bg-green,  .bg-success { --accent: #16a34a; }
.bg-blue,   .bg-primary { --accent: #2563eb; }
.bg-red,    .bg-danger  { --accent: #dc2626; }
.bg-black,  .bg-dark    { --accent: #334155; }
.bg-gray                { --accent: #64748b; }
.bg-purple              { --accent: #7c3aed; }
.bg-teal                { --accent: #0d9488; }
.bg-orange              { --accent: #ea580c; }
.bg-maroon              { --accent: #be185d; }
.bg-fuchsia             { --accent: #c026d3; }
.bg-navy                { --accent: #1e3a8a; }
.bg-olive               { --accent: #4d7c0f; }
.bg-lime                { --accent: #65a30d; }

/* -------------------------------------------------------------
   SMALL-BOX  →  white stat card with tinted icon chip
   ------------------------------------------------------------- */

.small-box {
  position: relative;
  background: var(--adm-surface) !important;
  color: var(--adm-text) !important;
  border: 1px solid var(--adm-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.small-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.small-box .inner {
  padding: 1.25rem 1.25rem 0.75rem;
}

.small-box h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--adm-text) !important;
  white-space: normal;
}

.small-box p {
  color: var(--adm-muted) !important;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0;
}

.small-box .icon {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  background: color-mix(in srgb, var(--accent) 12%, #ffffff);
}

.small-box .icon > i,
.small-box .icon > i.fa,
.small-box .icon > i.ion {
  position: static;
  font-size: 1.3rem !important;
  color: var(--accent);
  opacity: 1;
  top: auto;
}

.small-box:hover .icon > i {
  font-size: 1.3rem !important;
}

.small-box .small-box-footer,
.small-box > .small-box-footer {
  background: transparent;
  color: var(--accent) !important;
  text-align: left;
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-top: 1px solid var(--adm-border);
}

.small-box .small-box-footer:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, #ffffff);
}

/* -------------------------------------------------------------
   INFO-BOX  →  white card, tinted icon chip (incl. colored ones)
   ------------------------------------------------------------- */

.info-box[class*="bg-"] {
  background: var(--adm-surface) !important;
  color: var(--adm-text) !important;
}

.info-box[class*="bg-"] .info-box-text,
.info-box[class*="bg-"] .info-box-number {
  color: var(--adm-text);
}

.info-box[class*="bg-"] .progress-description {
  color: var(--adm-muted);
  font-size: 0.75rem;
}

.info-box .info-box-icon,
.info-box .info-box-icon[class*="bg-"],
.info-box[class*="bg-"] .info-box-icon {
  background: #f1f5f9 !important;
  background: color-mix(in srgb, var(--accent) 12%, #ffffff) !important;
  color: var(--accent) !important;
}

/* icon span carries its own bg-* class on some counters —
   pull its accent onto the chip */
.info-box .info-box-icon.bg-aqua,   .info-box .info-box-icon.bg-info    { color: #0891b2 !important; }
.info-box .info-box-icon.bg-yellow, .info-box .info-box-icon.bg-warning { color: #d97706 !important; }
.info-box .info-box-icon.bg-green,  .info-box .info-box-icon.bg-success { color: #16a34a !important; }
.info-box .info-box-icon.bg-blue,   .info-box .info-box-icon.bg-primary { color: #2563eb !important; }
.info-box .info-box-icon.bg-red,    .info-box .info-box-icon.bg-danger  { color: #dc2626 !important; }
.info-box .info-box-icon.bg-purple  { color: #7c3aed !important; }
.info-box .info-box-icon.bg-teal    { color: #0d9488 !important; }
.info-box .info-box-icon.bg-orange  { color: #ea580c !important; }
.info-box .info-box-icon.bg-maroon  { color: #be185d !important; }
.info-box .info-box-icon.bg-navy    { color: #1e3a8a !important; }

/* -------------------------------------------------------------
   SOFT SECONDARY BUTTONS (Export CSV / Bulk Upload etc.)
   ------------------------------------------------------------- */

.btn-warning {
  background-color: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #ffedd5;
  border-color: #fdba74;
  color: #7c2d12;
}

/* keep solid look for badge-style contexts */
.badge.bg-warning {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

/* -------------------------------------------------------------
   DESKTOP MINI SIDEBAR (collapsed)
   template uses <span> labels which stock AdminLTE doesn't hide
   ------------------------------------------------------------- */

@media (min-width: 992px) {

  .sidebar-mini.sidebar-collapse .main-sidebar .brand-link {
    overflow: hidden;
    justify-content: center;
    padding: 0.5rem;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .brand-link .brand-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > span,
  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .pull-right-container,
  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-header {
    display: none;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-item > .nav-link {
    justify-content: center;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .nav-icon {
    margin-right: 0;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .nav-treeview {
    display: none;
  }
}

/* =============================================================
   MODERN DIALOGS  (modernConfirm / modernAlert in global.js)
   ============================================================= */

.modern-dialog {
  z-index: 1090;
}

.modern-dialog .modal-content {
  border-radius: 18px;
  text-align: center;
}

.modern-dialog .md-body {
  padding: 1.75rem 1.5rem 0.5rem;
}

.modern-dialog .md-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.35rem;
}

.modern-dialog .md-icon-warn {
  background: #fee2e2;
  color: #dc2626;
}

.modern-dialog .md-icon-info {
  background: var(--adm-primary-soft);
  color: var(--adm-primary);
}

.modern-dialog .md-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 0.4rem;
}

.modern-dialog .md-message {
  color: var(--adm-muted);
  font-size: 0.9rem;
  margin: 0;
}

.modern-dialog .md-footer {
  display: flex;
  gap: 0.6rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.modern-dialog .md-footer .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

/* =============================================================
   MODAL POLISH — smooth scale-in, modern close button
   ============================================================= */

/* add/edit modals: default bootstrap 500px is cramped for forms */
@media (min-width: 768px) {
  .modal-dialog:not(.modal-sm):not(.modal-lg):not(.modal-xl) {
    max-width: 660px;
  }
}

/* long forms scroll inside the modal, header stays visible */
.modal .modal-body {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

.modal .modal-body::-webkit-scrollbar {
  width: 6px;
}

/* roomier form rhythm inside modals */
.modal-body .form-group {
  margin-bottom: 1.1rem;
}

.modal-body .form-group label {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: #475569;
}

.modal-body .box-footer .btn-block {
  padding: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* confirm/alert dialogs: modal-sm is too narrow */
.modern-dialog .modal-sm {
  max-width: 420px;
}

@media (max-width: 575.98px) {
  .modern-dialog .modal-sm {
    max-width: none;
    margin: 1rem;
  }

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

.modal.fade .modal-dialog {
  transform: translateY(24px) scale(0.97);
  transition: transform 0.22s ease;
}

.modal.show .modal-dialog,
.modal.in .modal-dialog {
  transform: none;
}

.modal-header .close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  opacity: 1;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--adm-muted);
  padding: 0;
  margin: -0.25rem -0.5rem -0.25rem auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-header .close:hover {
  background: #fee2e2;
  color: #dc2626;
  opacity: 1;
}

/* =============================================================
   JQUERY-CONFIRM (bootbox-style dialogs on a few pages)
   ============================================================= */

.jconfirm .jconfirm-box {
  border-radius: 18px !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25) !important;
  border: none !important;
  padding: 1.25rem 1.25rem 1rem;
  font-family: inherit;
}

.jconfirm .jconfirm-box .jconfirm-title-c {
  font-weight: 700;
  color: var(--adm-text);
  font-size: 1.05rem;
}

.jconfirm .jconfirm-box .jconfirm-content {
  color: var(--adm-muted);
  font-size: 0.9rem;
}

.jconfirm .jconfirm-box .jconfirm-buttons .btn {
  border-radius: var(--adm-radius-sm);
  font-weight: 600;
  text-transform: none;
  padding: 0.45rem 1.1rem;
}

.jconfirm.jconfirm-white .jconfirm-bg,
.jconfirm .jconfirm-bg {
  background-color: rgba(15, 23, 42, 0.4);
}

/* =============================================================
   FLOATING SIDEBAR — responsive states
   ============================================================= */

/* mobile drawer keeps the pinned user card visible */
@media (max-width: 991.98px) {
  .main-sidebar .sidebar {
    height: calc(100vh - var(--adm-header-h) - 69px);
    padding-bottom: 3rem;
  }
}

/* flyout submenu shown when hovering a collapsed group */
.sidebar-flyout {
  position: fixed;
  z-index: 1100;
  min-width: 200px;
  max-width: 260px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  padding: 0.45rem;
  animation: sf-in 0.14s ease;
}

/* pointer arrow toward the hovered rail icon */
.sidebar-flyout::before {
  content: '';
  position: absolute;
  left: -6.5px;
  top: var(--sf-arrow-top, 16px);
  width: 12px;
  height: 12px;
  background: var(--adm-surface);
  border-left: 1px solid var(--adm-border);
  border-bottom: 1px solid var(--adm-border);
  transform: rotate(45deg);
  border-bottom-left-radius: 3px;
}

@keyframes sf-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

.sidebar-flyout .sf-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.4rem 0.6rem 0.3rem;
}

.sidebar-flyout .sf-link {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-flyout .sf-link:hover {
  background: #f1f5f9;
  color: var(--adm-text);
}

.sidebar-flyout .sf-link.active {
  background: #e8f1fc;
  color: var(--adm-primary);
  font-weight: 600;
}

/* collapsed sidebar NEVER expands on hover — tooltips are shown instead */
@media (min-width: 992px) {
  body.sidebar-mini.sidebar-collapse .main-sidebar,
  body.sidebar-mini.sidebar-collapse .main-sidebar:hover,
  body.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused {
    width: 4.6rem !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link,
  body.sidebar-mini.sidebar-collapse .brand-link {
    width: 4.6rem !important;
  }

  /* no labels or carets in the rail — hover shows tooltip/flyout.
     badges stay, shrunk into a counter bubble on the icon.
     AdminLTE re-shows spans in its :hover/.sidebar-focused states with a
     5px shell that nudges the icon — hide them in EVERY state. */
  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > span:not(.pull-right-container),
  body.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link > span:not(.pull-right-container),
  body.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .nav-link > span:not(.pull-right-container) {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link {
    position: relative;
    /* letters can never leak in the rail, whatever state the spans are in */
    font-size: 0 !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .nav-icon {
    font-size: 1rem !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .pull-right-container {
    display: block !important;
    position: absolute;
    top: 2px;
    right: 3px;
    margin: 0;
    line-height: 1;
    pointer-events: none;
  }

  /* icon geometry is IDENTICAL in base/hover/focus states — AdminLTE's
     :hover/.sidebar-focused rules otherwise nudge icons a few px left */
  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar > .nav-item .nav-icon,
  body.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item .nav-icon,
  body.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item .nav-icon {
    margin-right: 0 !important;
    margin-left: 0 !important;
    width: 1.6rem !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar > .nav-item > .nav-link,
  body.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item > .nav-link,
  body.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item > .nav-link {
    justify-content: center;
    padding: 0.6rem !important;
    width: auto !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link .brand-image,
  body.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-link .brand-image,
  body.sidebar-mini.sidebar-collapse .main-sidebar .brand-link .brand-image {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  /* the caret arrow never shows in the rail — not even on hover */
  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .pull-right-container > i,
  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link .icon-line-awesome-angle-down {
    display: none !important;
  }

  body.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link > .pull-right-container .badge {
    display: inline-block;
    font-size: 0.55rem !important;
    padding: 0.3em 0.45em;
    min-width: 16px;
    float: none;
  }
}

/* collapsed mini sidebar: avatar only in the user card */
@media (min-width: 992px) {
  .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-user {
    justify-content: center;
    padding: 0.75rem 0.25rem;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-user .sidebar-user-info,
  .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-user > i {
    display: none;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar > .nav-item.menu-open {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0 0 2px;
  }
}

.main-sidebar .sidebar {
  overflow-y: auto;
}

/* END ADMIN MODERN */

/* =============================================================
   FIVERR-SCRIPT ADAPTATIONS
   This project's list pages render a bare #main_table
   (.table-responsive) + .box-footer directly in section.content
   with the action buttons living in the content-header row —
   style those as the card the .box pages get.
   ============================================================= */

/* the bare table wrapper becomes the card */
.content > .table-responsive,
.content > form > .table-responsive {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  min-width: 0;
  overflow-x: auto;
}

.content > .table-responsive .table tr:last-child td {
  border-bottom: 0;
}

/* lists that need visible overflow for row dropdowns (desktop) */
@media (min-width: 992px) {
  .content > .table-responsive.table_visible {
    overflow: visible;
  }
}

@media (max-width: 991.98px) {
  .content > .table-responsive.table_visible {
    overflow-x: auto !important;
  }
}

/* pagination strip under the card */
.content > .box-footer {
  background: transparent;
  border: none;
  padding: 0.9rem 0.25rem;
}

.content > .box-footer .pagination {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

@media (max-width: 991.98px) {
  .content > .box-footer .pagination {
    float: none !important;
    justify-content: center;
  }
}

/* content-header action row: keep buttons tidy and wrappable */
.content-header .row {
  align-items: center;
}

.content-header .row > .col-auto {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.content-header .row > .col-auto .btn {
  margin: 0;
}

@media (max-width: 767.98px) {
  .content-header .row > .col-auto {
    width: 100%;
    flex: 0 0 100%;
    margin-top: 0.6rem;
  }
}

/* primary action buttons follow the theme color */
.btn-primary {
  background-color: var(--adm-primary);
  border-color: var(--adm-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--adm-primary-dark);
  border-color: var(--adm-primary-dark);
}

.btn-outline-primary {
  border-color: var(--adm-primary);
  color: var(--adm-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active {
  background-color: var(--adm-primary);
  border-color: var(--adm-primary);
  color: #fff;
}

/* dashboard stat cards use <img> icons in this project */
.small-box .icon > img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* keep long money values clear of the icon chip */
.small-box .inner {
  padding-right: 4.75rem;
}

/* equal-height stat cards per row, footers pinned to the bottom */
.small-box {
  display: flex;
  flex-direction: column;
  height: calc(100% - 20px);
}

.small-box .inner {
  flex: 1 1 auto;
}

/* AdminLTE bumps h3 to 2.2rem via .col-lg-3 .small-box h3 at >=1200px —
   match that specificity so the stat value never collides with the chip */
.small-box h3,
[class*="col"] .small-box h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* mobile drawer: pin to the viewport so the bottom user card stays visible
   (without layout-fixed, AdminLTE stretches the absolute sidebar to the
   full document height and the pinned card lands offscreen) */
@media (max-width: 991.98px) {
  body .main-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    height: 100vh !important;
  }
}

/* dashboard chart panels render as bare .box-body — give them the card look */
.content > .row > [class*="col"] > .box-body {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 1.25rem;
}

/* advance-search panel: breathing room between the filter fields,
   the status pills row, and the panel edges */
.advance-search-panel .row + .row {
  margin-top: 0.85rem;
}

.advance-search-panel label {
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--adm-muted);
}

.advance-search-panel .form-control {
  min-width: 0;
}

.status-filter-link {
  margin: 0.3rem 0.35rem 0.1rem 0;
}

/* filter fields stack with spacing when the row wraps on small screens */
@media (max-width: 767.98px) {
  .advance-search-panel .row > [class*="col"] {
    margin-bottom: 0.75rem;
  }

  .advance-search-panel .row > [class*="col"]:last-child {
    margin-bottom: 0;
  }
}

/* dashboard chart card heading */
.chart-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--adm-text);
  margin: 0 0 1rem;
}

/* chart legends — colored dot + label + count */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.9rem;
}

.chart-legend .cl-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--adm-muted);
  white-space: nowrap;
}

.chart-legend .cl-item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.chart-legend .cl-item b {
  color: var(--adm-text);
  font-weight: 600;
}

/* floating chart tooltip */
.chart-tip {
  position: absolute;
  z-index: 1080;
  background: #1e293b;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.chart-tip b {
  font-weight: 700;
}

/* chart empty state */
.chart-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-muted);
  font-size: 0.85rem;
}

/* END FIVERR-SCRIPT ADAPTATIONS */
