/*
* demo.css
* App-specific overrides — layout fixes + brand theme colors
******************************************************************************/

.light-style .menu .app-brand.demo { height: 64px; }
.dark-style  .menu .app-brand.demo { height: 64px; }

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  width: 34px;
  height: 24px;
}
.app-brand-logo.demo svg { width: 35px; height: 24px; }
.app-brand-text.demo { font-size: 1.375rem; }

/* Navbar padding fix */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}
.content-wrapper .navbar { z-index: auto; }

/* Demo spacing helpers */
.demo-blocks > * { display: block !important; }
.demo-inline-spacing > * { margin: 1rem 0.375rem 0 0 !important; }
.demo-vertical-spacing > * { margin-top: 1rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing.demo-only-element > :first-child { margin-top: 0 !important; }
.demo-vertical-spacing-lg > * { margin-top: 1.875rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing-lg.demo-only-element > :first-child { margin-top: 0 !important; }
.demo-vertical-spacing-xl > * { margin-top: 5rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing-xl.demo-only-element > :first-child { margin-top: 0 !important; }
.rtl-only { display: none !important; text-align: left !important; direction: ltr !important; }
[dir='rtl'] .rtl-only { display: block !important; }

.layout-demo-wrapper {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img { width: 900px; }
.layout-demo-info { text-align: center; margin-top: 1rem; }


/* ═══════════════════════════════════════════════════════════════════
 * BRAND THEME OVERRIDE
 * Primary #1a56db (blue) · Accent #f59e0b (amber)
 * Replaces vendor default purple (#7367f0) throughout the dashboard
 * ═══════════════════════════════════════════════════════════════════ */

/* ─── Base ─── */
a                     { color: #1a56db !important; }
a:hover               { color: #1240a8 !important; }
.text-primary         { color: #1a56db !important; }
.bg-primary           { background-color: #1a56db !important; }
.bg-label-primary     { background-color: #dce8fa !important; color: #1a56db !important; }
html:not([dir=rtl]) .border-primary,
html[dir=rtl]         .border-primary { border-color: #1a56db !important; }
.fill-primary         { fill: #1a56db !important; }
.svg-illustration svg { fill: #1a56db !important; }

/* ─── Buttons ─── */
.btn-primary {
  background-color: #1a56db !important;
  border-color: #1a56db !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-check:focus + .btn-primary,
.btn-primary.focus {
  background-color: #1240a8 !important;
  border-color: #1240a8 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary,
.btn-primary:active,
.btn-primary.active,
.btn-primary.show.dropdown-toggle,
.show > .btn-primary.dropdown-toggle {
  background-color: #1240a8 !important;
  border-color: #1240a8 !important;
  color: #fff !important;
}
.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #1a56db !important;
  border-color: #1a56db !important;
  color: #fff !important;
  box-shadow: none !important;
}
.btn-group .btn-primary,
.input-group .btn-primary {
  border-right: 1px solid #1240a8 !important;
  border-left:  1px solid #1240a8 !important;
}

.btn-label-primary {
  color: #1a56db !important;
  background: #dce8fa !important;
  border-color: transparent !important;
}
.btn-label-primary:hover {
  background: #c5d8f7 !important;
  color: #1a56db !important;
  border-color: transparent !important;
}
.btn-label-primary:focus, .btn-label-primary.focus {
  background: #c5d8f7 !important;
  color: #1a56db !important;
  box-shadow: none !important;
}
.btn-label-primary:active, .btn-label-primary.active,
.show > .btn-label-primary.dropdown-toggle {
  background: #b3caef !important;
  color: #1a56db !important;
}
.btn-label-primary.disabled, .btn-label-primary:disabled {
  background: #dce8fa !important;
  color: #1a56db !important;
}

.btn-outline-primary {
  color: #1a56db !important;
  border-color: #1a56db !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background-color: #eef3fd !important;
  border-color: #1a56db !important;
  color: #1a56db !important;
}
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: #dce8fa !important;
  border-color: #1a56db !important;
  color: #1a56db !important;
}

/* ─── Forms ─── */
.form-control:focus,
.form-select:focus {
  border-color: #1a56db !important;
  box-shadow: 0 0 0 .2rem rgba(26,86,219,.15) !important;
}
.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text { border-color: #1a56db !important; }
.form-check-input:focus { border-color: #1a56db !important; }
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
  background-color: #1a56db !important;
  border-color: #1a56db !important;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label,
.form-floating > .form-control:-webkit-autofill ~ label { color: #1a56db !important; }
.form-control:focus ~ .form-label { border-color: #1a56db !important; }
.switch-input:checked ~ .switch-toggle-slider { background: #1a56db !important; }
.switch-input:focus  ~ .switch-toggle-slider {
  border: 1px solid #1a56db !important;
  box-shadow: 0 0 .25rem .05rem rgba(26,86,219,.1) !important;
}

/* ─── Navigation ─── */
.nav-pills .nav-link.active,
.nav-pills .nav-link.active:hover,
.nav-pills .nav-link.active:focus {
  background-color: #1a56db !important;
  color: #fff !important;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link.active:hover,
.nav-tabs .nav-link.active:focus { box-shadow: 0 -2px 0 #1a56db inset !important; }

/* ─── Pagination ─── */
.page-item.active .page-link,
.pagination li.active > a:not(.page-link) {
  background-color: #1a56db !important;
  border-color:     #1a56db !important;
  color: #fff !important;
}
.page-item > .page-link.active { background-color: #1a56db !important; border-color: #1a56db !important; }

/* ─── Progress ─── */
.progress-bar { background-color: #1a56db !important; }

/* ─── Dropdown ─── */
.dropdown-item:not(.disabled).active,
.dropdown-item:not(.disabled):active {
  background-color: #1a56db !important;
  color: #fff !important;
}

/* ─── List group ─── */
.list-group-item-primary { background-color: #dce8fa !important; border-color: #dce8fa !important; color: #1a56db !important; }
.list-group-item-action.active,
.list-group-item-action.active:hover,
.list-group-item-action.active:focus {
  background-color: #1a56db !important;
  border-color:     #1a56db !important;
}
.list-group.list-group-timeline .list-group-timeline-primary::before { background-color: #1a56db !important; }

/* ─── Alerts ─── */
.alert-primary {
  background-color: #dce8fa !important;
  border-color:     #dce8fa !important;
  color: #1a56db !important;
}
.alert-primary .alert-link { color: #1a56db !important; }

/* ─── Sidebar / Menu ─── */
.bg-menu-theme.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
  background: linear-gradient(72.47deg, #1a56db 22.16%, rgba(26,86,219,.7) 76.47%) !important;
  box-shadow: 0 2px 6px rgba(26,86,219,.4) !important;
  color: #fff !important;
}
.bg-menu-theme .menu-inner .menu-item.open  > .menu-link.menu-toggle,
.bg-menu-theme .menu-inner .menu-item.active > .menu-link.menu-toggle { background: #eef3fd !important; }

/* ─── Select2 ─── */
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open  .select2-selection { border-color: #1a56db !important; }
.select2-primary .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: rgba(26,86,219,.12) !important;
  color: #1a56db !important;
}

/* ─── DataTable control dot ─── */
table.dataTable.dtr-column > tbody > tr > td.control::before,
table.dataTable.dtr-column > tbody > tr > th.control::before {
  background-color: #1a56db !important;
}

/* ─── Timeline ─── */
.timeline .timeline-point-primary     { background-color: #1a56db !important; box-shadow: 0 0 0 .1875rem rgba(26,86,219,.16) !important; }
.timeline .timeline-indicator-primary i { color: #1a56db !important; }
.timeline .timeline-item-primary .timeline-event { background-color: rgba(26,86,219,.08) !important; }

/* ─── Divider ─── */
.divider.divider-primary .divider-text::before,
.divider.divider-primary .divider-text::after { border-color: #1a56db !important; }

/* ─── Flatpickr ─── */
.flatpickr-day.today { border-color: #1a56db !important; }
.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange {
  color: #1a56db !important;
  background: #dce8fa !important;
  border-color: #dce8fa !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange,
.flatpickr-day.endRange:hover {
  background: #1a56db !important;
  border-color: #1a56db !important;
  color: #fff !important;
}

/* ─── Date range picker ─── */
.daterangepicker td.active:not(.off) { background: #1a56db !important; color: #fff !important; }
.daterangepicker .start-date:not(.end-date):not(.off),
.daterangepicker .end-date:not(.start-date):not(.off) { background-color: #1a56db !important; color: #fff !important; }
.daterangepicker td.in-range:not(.start-date):not(.end-date):not(.off) {
  color: #1a56db !important;
  background-color: #dce8fa !important;
}
.ranges li.active { background-color: #1a56db !important; color: #fff !important; }

/* ─── Swiper pagination ─── */
.swiper-pagination-bullet.swiper-pagination-bullet-active,
.swiper-pagination.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { background: #1a56db !important; }

/* ─── BS Stepper ─── */
.bs-stepper .step.active .bs-stepper-circle { background-color: #1a56db !important; color: #fff !important; }
.bs-stepper .step.active .bs-stepper-icon svg { fill: #1a56db !important; }
.bs-stepper .step.active .bs-stepper-icon i,
.bs-stepper .step.active .bs-stepper-label { color: #1a56db !important; }

/* ─── Spinners ─── */
.sk-primary.sk-plane,
.sk-primary .sk-chase-dot::before,
.sk-primary .sk-bounce-dot,
.sk-primary .sk-wave-rect,
.sk-primary.sk-pulse { background-color: #1a56db !important; }

/* ─── Tooltip ─── */
.tooltip-primary .tooltip-inner { background: #1a56db !important; color: #fff !important; }

/* ─── Custom option ─── */
.custom-option.checked { border: 1px solid #1a56db !important; }


/* ══════════════════════════════════════════
 * ACCENT: amber #f59e0b overrides
 * ══════════════════════════════════════════ */
.btn-warning {
  background-color: #f59e0b !important;
  border-color:     #f59e0b !important;
  color: #0f172a !important;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
  background-color: #d97706 !important;
  border-color:     #d97706 !important;
  color: #0f172a !important;
}
.text-warning        { color: #f59e0b !important; }
.bg-warning          { background-color: #f59e0b !important; }
.bg-label-warning    { background-color: #fef3c7 !important; color: #d97706 !important; }
.border-warning      { border-color: #f59e0b !important; }
.btn-label-warning   { color: #d97706 !important; background: #fef3c7 !important; }
.btn-label-warning:hover { background: #fde68a !important; color: #d97706 !important; }
.btn-outline-warning { color: #f59e0b !important; border-color: #f59e0b !important; }
.btn-outline-warning:hover { background: #fef3c7 !important; }
.stars, .star-rating  { color: #f59e0b !important; }


/* ══════════════════════════════════════════════════════════════════
 * CONTENT LAYOUT — global page polish
 * Targets every page automatically; no per-template edits needed.
 * ══════════════════════════════════════════════════════════════════ */

/* ─── Page title bar ─── */
.container-xxl > h4,
.container-xxl > .row > h4 {
  position: relative;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #0d1f3c !important;
  letter-spacing: .2px;
  padding-left: 1rem !important;
  padding-top: .3rem !important;
  padding-bottom: .3rem !important;
  margin-bottom: 1.4rem !important;
}
.container-xxl > h4::before,
.container-xxl > .row > h4::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 4px;
  background: linear-gradient(180deg, #1a56db, #f59e0b);
  border-radius: 4px;
}
/* centered dashboard title — no left bar */
.container-xxl > h4.text-center { padding-left: 0 !important; }
.container-xxl > h4.text-center::before { display: none !important; }
/* muted sub-text inside page title */
.container-xxl > h4 .fw-light,
.container-xxl > h4 .text-muted { color: #9ca3af !important; font-weight: 400 !important; }

/* ─── Cards — base ─── */
.card {
  border: 1px solid #eaecf0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 6px rgba(13,31,60,.06) !important;
}
.card:hover {
  box-shadow: 0 4px 18px rgba(13,31,60,.09) !important;
  transition: box-shadow .25s;
}

/* ─── Card header ─── */
.card-header {
  background: #fff !important;
  border-bottom: 1px solid #f0f2f5 !important;
  padding: 1.1rem 1.4rem !important;
  border-radius: 12px 12px 0 0 !important;
}
.card-header .card-title,
.card-header h5.card-title {
  font-size: .93rem !important;
  font-weight: 700 !important;
  color: #0d1f3c !important;
  letter-spacing: .1px;
}
.card-header small.text-muted,
.card-header .card-subtitle {
  font-size: .77rem !important;
  color: #9ca3af !important;
}

/* ─── Card body ─── */
.card-body { padding: 1.25rem 1.4rem !important; }

/* ─── DataTable — table head ─── */
.table > thead > tr > th {
  background: #f8fafd !important;
  color: #374151 !important;
  font-size: .77rem !important;
  font-weight: 700 !important;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-bottom: 2px solid #e9ecef !important;
  white-space: nowrap;
}
.table > thead > tr > th:first-child { border-radius: 0 !important; }

/* ─── DataTable — rows ─── */
.table > tbody > tr > td {
  font-size: .855rem !important;
  color: #374151 !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f3f4f6 !important;
  padding-top: .75rem !important;
  padding-bottom: .75rem !important;
}
.table > tbody > tr:hover > td {
  background-color: #f5f8ff !important;
}
.table.border-top { border-top: none !important; }

/* ─── DataTable — action column buttons ─── */
.btn-group .btn-icon.btn-warning,
.btn-group .btn-icon.btn-primary,
.btn-group .btn-icon.btn-danger,
.btn-group .btn-icon.btn-info,
.btn-group .btn-icon.btn-secondary {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: .82rem !important;
  box-shadow: none !important;
}
.dropdown-menu .dropdown-item {
  font-size: .845rem !important;
  padding: .5rem .9rem !important;
  border-radius: 6px !important;
  color: #374151 !important;
}
.dropdown-menu .dropdown-item:hover {
  background: #f0f5ff !important;
  color: #1a56db !important;
}
.dropdown-menu .dropdown-item i { color: #6b7280; margin-right: .4rem; }
.dropdown-menu .dropdown-item:hover i { color: #1a56db; }
.dropdown-menu {
  border: 1px solid #e9ecef !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(13,31,60,.1) !important;
  padding: .4rem !important;
}

/* ─── Badges ─── */
.badge {
  font-weight: 600 !important;
  font-size: .73rem !important;
  letter-spacing: .2px;
  padding: .38em .72em !important;
  border-radius: 6px !important;
}
.bg-label-success { background-color: #d1fae5 !important; color: #065f46 !important; }
.bg-label-danger  { background-color: #fee2e2 !important; color: #b91c1c !important; }
.bg-label-info    { background-color: #dbeafe !important; color: #1e40af !important; }
.bg-label-warning { background-color: #fef3c7 !important; color: #92400e !important; }
.bg-label-secondary { background-color: #f1f5f9 !important; color: #475569 !important; }

/* ─── Offcanvas forms ─── */
.offcanvas {
  border-left: none !important;
  box-shadow: -8px 0 40px rgba(13,31,60,.12) !important;
}
.offcanvas-header {
  background: linear-gradient(135deg, #0d1f3c 0%, #1240a8 100%);
  padding: 1.1rem 1.4rem !important;
  border-bottom: none !important;
}
.offcanvas-header .offcanvas-title {
  color: #fff !important;
  font-size: .95rem !important;
  font-weight: 700 !important;
}
.offcanvas-header .btn-close {
  filter: brightness(0) invert(1) !important;
  opacity: .6 !important;
}
.offcanvas-header .btn-close:hover { opacity: 1 !important; }
.offcanvas-body { padding: 1.4rem !important; }

/* ─── Modals ─── */
.modal-content {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(13,31,60,.18) !important;
}
.modal-header {
  background: linear-gradient(135deg, #0d1f3c 0%, #1240a8 100%);
  border-radius: 14px 14px 0 0 !important;
  border-bottom: none !important;
  padding: 1.1rem 1.4rem !important;
}
.modal-header .modal-title {
  color: #fff !important;
  font-size: .95rem !important;
  font-weight: 700 !important;
}
.modal-header .btn-close {
  filter: brightness(0) invert(1) !important;
  opacity: .6 !important;
}
.modal-header .btn-close:hover { opacity: 1 !important; }
.modal-body { padding: 1.4rem !important; }
.modal-footer {
  border-top: 1px solid #f0f2f5 !important;
  padding: .9rem 1.4rem !important;
  border-radius: 0 0 14px 14px !important;
}

/* ─── Form labels ─── */
.form-label {
  font-size: .81rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: .35rem !important;
}

/* ─── Card-header filter rows (date pickers, selects) ─── */
.card-header.border-bottom {
  background: #fafbfd !important;
  border-bottom: 1px solid #eaecf0 !important;
}

/* ─── Dashboard KPI stat items ─── */
.card-info h5 { font-size: .95rem !important; font-weight: 700 !important; color: #0d1f3c !important; }
.card-info small { font-size: .74rem !important; color: #6b7280 !important; }
.badge.rounded.p-2 {
  width: 40px !important; height: 40px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
}
.badge.rounded.p-2 i { font-size: 1.15rem !important; }

/* ─── Dashboard swiper card ─── */
.swiper-card-advance-bg {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a56db 100%) !important;
  border-radius: 12px !important;
}
.swiper-card-advance-bg .website-analytics-text-bg {
  background: rgba(255,255,255,.15) !important;
  color: #f59e0b !important;
  border-radius: 6px;
  padding: .15rem .55rem;
  font-size: .9rem;
}

/* ─── Footer ─── */
.content-footer {
  background: #fff !important;
  border-top: 1px solid #f0f2f5 !important;
  font-size: .8rem !important;
  color: #9ca3af !important;
}
.content-footer a { color: #1a56db !important; font-weight: 600; }

/* ─── Toasts ─── */
.bs-toast.toast {
  border-radius: 10px !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(13,31,60,.14) !important;
}
.toast-header {
  border-bottom: 1px solid rgba(0,0,0,.05) !important;
  font-size: .83rem !important;
  font-weight: 600 !important;
}
.toast-body { font-size: .84rem !important; background: #fff !important; color: #374151 !important; }

/* ─── Perfect-scrollbar inside sidebar ─── */
.ps__thumb-y { background-color: rgba(26,86,219,.3) !important; }
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y { background-color: #1a56db !important; }

/* ─── Select2 ─── */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: #d1d5db !important;
  border-radius: 8px !important;
  min-height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px !important;
  color: #374151 !important;
  font-size: .88rem !important;
}
.select2-dropdown {
  border-color: #e5e7eb !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(13,31,60,.1) !important;
}
.select2-results__option {
  font-size: .855rem !important;
  padding: .45rem .8rem !important;
  border-radius: 6px !important;
}
.select2-results__option--highlighted {
  background-color: #eff4ff !important;
  color: #1a56db !important;
}
.select2-results__option[aria-selected=true] {
  background-color: #dce8fa !important;
  color: #1a56db !important;
}

/* ─── Pagination (DataTable) ─── */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  font-size: .82rem !important;
  padding: .35rem .7rem !important;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  font-size: .82rem !important;
  color: #6b7280 !important;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px !important;
  border: 1.5px solid #e5e7eb !important;
  padding: .35rem .75rem !important;
  font-size: .85rem !important;
  color: #374151 !important;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #1a56db !important;
  box-shadow: 0 0 0 3px rgba(26,86,219,.1) !important;
  outline: none !important;
}

/* ─── Card inside modal (p-3 p-md-5) clean padding ─── */
.modal-content.p-3,
.modal-content.p-5,
.modal-content.p-md-5 {
  padding: 0 !important;
}
.modal-content.p-3 .modal-header,
.modal-content.p-5 .modal-header {
  border-radius: 14px 14px 0 0 !important;
}

/* ─── Divider ─── */
.divider-text { font-size: .75rem !important; color: #9ca3af !important; }

/* ─── Detail / profile page ─── */
/* section label (e.g. "DETAILS" separator) */
p.small.text-uppercase.text-muted {
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  color: #9ca3af !important;
  padding-bottom: .5rem;
  border-bottom: 1px solid #f0f2f5;
  margin-top: 1.25rem !important;
}
/* info list rows */
.info-container .list-unstyled li {
  border-bottom: 1px solid #f8f9fa;
  padding: .45rem 0 !important;
  font-size: .855rem;
  color: #374151;
}
.info-container .list-unstyled li:last-child { border-bottom: none; }
.info-container .fw-semibold { color: #0d1f3c !important; font-size: .82rem; }

/* locataire code badge style */
.user-info h2.text-danger {
  display: inline-block;
  background: #fff1f1;
  color: #dc2626 !important;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: .85rem !important;
  padding: .3rem .8rem;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ─── Inline section headings inside cards (h5 + <hr>) ─── */
.card-body h5:not(.card-title):not(.offcanvas-title):not(.modal-title) {
  font-size: .82rem !important;
  font-weight: 700 !important;
  color: #1a56db !important;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: .5rem !important;
  margin-top: .5rem !important;
}
.card-body hr { border-color: #f0f2f5 !important; margin-bottom: 1rem !important; }

/* ─── Form inside card (create/edit pages) ─── */
.card-body .form-control,
.card-body .form-select {
  border-radius: 8px !important;
  border: 1.5px solid #e5e7eb !important;
  font-size: .875rem !important;
  color: #374151 !important;
  background: #f9fafb !important;
}
.card-body .form-control:focus,
.card-body .form-select:focus {
  background: #fff !important;
  border-color: #1a56db !important;
  box-shadow: 0 0 0 3px rgba(26,86,219,.08) !important;
}

/* ─── Tab navigation inside detail pages ─── */
.nav-tabs .nav-link {
  font-size: .84rem !important;
  font-weight: 500 !important;
  color: #6b7280 !important;
  border: none !important;
  padding: .6rem 1rem !important;
  border-radius: 0 !important;
}
.nav-tabs .nav-link:hover { color: #1a56db !important; }
.nav-tabs { border-bottom: 2px solid #e9ecef !important; }

/* ─── Print / invoice pages — keep white ─── */
@media print {
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ─── Number/amount emphasis ─── */
h3.card-title.fs-4,
h4.card-title { font-weight: 800 !important; color: #0d1f3c !important; }

/* ─── Swiper pagination dots ─── */
.swiper-pagination-bullet { background: rgba(255,255,255,.4) !important; }
.swiper-pagination-bullet-active { background: #f59e0b !important; }

/* ─── Card inside offcanvas ─── */
.offcanvas .card {
  border: 1px solid #eaecf0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

/* ─── Alert / validation errors ─── */
span.text-danger { font-size: .78rem !important; font-weight: 500 !important; }

/* ─── Page header (used on all list pages) ─── */
.hn-page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem;
}
.hn-page-header-left { display: flex; align-items: center; gap: 1rem; }
.hn-page-header-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #1a56db, #1240a8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem; flex-shrink: 0;
}
.hn-page-header-title { font-size: 1.05rem; font-weight: 800; color: #0d1f3c; line-height: 1.2; }
.hn-page-header-sub   { font-size: .77rem; color: #9ca3af; margin-top: 2px; }
.hn-btn-add {
  background: #f59e0b !important; border: none; color: #0f172a !important;
  font-weight: 700; font-size: .855rem; border-radius: 10px; padding: .55rem 1.1rem;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: background .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
/* ─── Buttons — primary / submit ─── */
.btn-primary,
button.btn-primary,
input[type=submit].btn-primary {
  background: linear-gradient(135deg,#1a56db,#1240a8) !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  letter-spacing: .2px;
  box-shadow: 0 3px 10px rgba(26,86,219,.25) !important;
  transition: box-shadow .2s, transform .15s;
}
.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(26,86,219,.38) !important;
  transform: translateY(-1px);
}
.btn-success {
  background: linear-gradient(135deg,#059669,#047857) !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}
.btn-danger {
  background: linear-gradient(135deg,#dc2626,#b91c1c) !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}
.btn-warning {
  background: linear-gradient(135deg,#f59e0b,#d97706) !important;
  border: none !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}
.btn-label-secondary {
  background: #f3f4f6 !important;
  border: 1.5px solid #e5e7eb !important;
  color: #4b5563 !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}
.btn-label-secondary:hover { background: #e9ecf1 !important; color: #1f2937 !important; }

/* ─── Nav pills (tabs inside pages) ─── */
.nav-pills .nav-link {
  border-radius: 9px !important;
  font-size: .835rem !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  padding: .45rem 1rem !important;
  transition: background .15s, color .15s;
}
.nav-pills .nav-link:hover { background: #f0f5ff !important; color: #1a56db !important; }
.nav-pills .nav-link.active {
  background: linear-gradient(135deg,#1a56db,#1240a8) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(26,86,219,.3) !important;
}

/* ─── DataTable toolbar (search / length) ─── */
.dataTables_wrapper .dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
  border-radius: 8px !important;
  border: 1.5px solid #e5e7eb !important;
  font-size: .84rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(135deg,#1a56db,#1240a8) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: #f0f5ff !important;
  color: #1a56db !important;
  border: none !important;
}

/* ─── Inline stat block (KPI inside card body) ─── */
.hn-stat-box {
  background: var(--bg,#eff4ff);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: center;
}
.hn-stat-box .val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--col,#1a56db);
  line-height: 1.1;
}
.hn-stat-box .lbl {
  font-size: .72rem;
  color: #9ca3af;
  font-weight: 600;
  margin-top: 4px;
}
.hn-stat-box a { text-decoration: none !important; color: inherit !important; }

/* ─── Metric card (dashboard-synthese) ─── */
.hn-metric {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  box-shadow: 0 1px 6px rgba(13,31,60,.05);
  height: 100%;
}
.hn-metric-title {
  font-size: .73rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .3rem;
}
.hn-metric-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0d1f3c;
  line-height: 1.1;
}
.hn-metric-divider {
  border-top: 1px solid #f0f2f5;
  margin-top: .85rem;
  padding-top: .85rem;
}
.hn-metric-row { display: flex; justify-content: space-between; margin-top: .35rem; }
.hn-metric-row small { font-size: .77rem; color: #6b7280; }
.hn-metric-row span { font-size: .84rem; font-weight: 700; }

/* ─── Taux ring ─── */
.hn-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.hn-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(#1a56db calc(var(--pct,0) * 1%), #eef2ff 0);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.hn-ring::after {
  content: '';
  position: absolute;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #fff;
}
.hn-ring-label {
  position: relative; z-index: 1;
  font-size: .82rem;
  font-weight: 800;
  color: #0d1f3c;
}

/* ─── Dashboard hero banner ─── */
.hn-dash-hero {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a56db 65%, #1240a8 100%);
  border-radius: 16px;
  padding: 1.6rem 2rem;
  margin-bottom: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hn-dash-hero::before {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.hn-dash-hero::after {
  content: '';
  position: absolute;
  right: 80px; top: -60px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(245,158,11,.12);
  pointer-events: none;
}
.hn-dash-hero-title { font-size: 1.15rem; font-weight: 800; }
.hn-dash-hero-sub   { font-size: .8rem; opacity: .72; margin-top: 3px; }
.hn-dash-hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── KPI card (compact, with bottom accent) ─── */
.hn-kpi2 {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 1px 6px rgba(13,31,60,.05);
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none !important;
  display: block;
}
.hn-kpi2:hover {
  box-shadow: 0 6px 22px rgba(13,31,60,.1);
  transform: translateY(-2px);
}
.hn-kpi2-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.hn-kpi2-value { font-size: 1.5rem; font-weight: 800; color: #0d1f3c; line-height: 1.1; }
.hn-kpi2-label { font-size: .73rem; color: #9ca3af; font-weight: 500; margin-top: 3px; }
.hn-kpi2-accent {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}

.hn-btn-add:hover {
  background: #d97706 !important;
  box-shadow: 0 6px 18px rgba(245,158,11,.4) !important;
  transform: translateY(-1px);
}

/* ─── KPI card with link (main dashboard) ─── */
.hn-kpi-card {
  border-radius: 14px !important;
  border: 1px solid #eaecf0 !important;
  background: #fff;
  box-shadow: 0 1px 6px rgba(13,31,60,.05) !important;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none !important;
}
.hn-kpi-card:hover {
  box-shadow: 0 6px 22px rgba(13,31,60,.1) !important;
  transform: translateY(-2px);
}
.hn-kpi-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.hn-kpi-icon.blue   { background: #eff4ff; color: #1a56db; }
.hn-kpi-icon.amber  { background: #fef9ec; color: #d97706; }
.hn-kpi-icon.green  { background: #ecfdf5; color: #059669; }
.hn-kpi-icon.red    { background: #fff1f1; color: #dc2626; }
.hn-kpi-icon.teal   { background: #f0fdfa; color: #0d9488; }
.hn-kpi-icon.indigo { background: #eef2ff; color: #4f46e5; }
/* BEM aliases */
.hn-kpi-icon--blue   { background: #eff4ff; color: #1a56db; }
.hn-kpi-icon--amber  { background: #fef9ec; color: #d97706; }
.hn-kpi-icon--green  { background: #ecfdf5; color: #059669; }
.hn-kpi-icon--red    { background: #fff1f1; color: #dc2626; }
.hn-kpi-icon--teal   { background: #f0fdfa; color: #0d9488; }
.hn-kpi-icon--indigo { background: #eef2ff; color: #4f46e5; }
.hn-kpi-value { font-size: 1.45rem; font-weight: 800; color: #0d1f3c; line-height: 1.15; }
.hn-kpi-label { font-size: .74rem; color: #9ca3af; font-weight: 500; margin-top: 2px; }
.hn-kpi-sub   { font-size: .72rem; color: #b0b7c3; margin-top: 2px; }
.hn-kpi-clickable { cursor: pointer; }
.hn-kpi-clickable:hover { box-shadow: 0 6px 22px rgba(13,31,60,.12) !important; transform: translateY(-2px); }

/* ─── Financial card (main dashboard) ─── */
.hn-fin-card {
  border-radius: 14px !important;
  border: 1px solid #eaecf0 !important;
  background: #fff;
  box-shadow: 0 1px 6px rgba(13,31,60,.05) !important;
  padding: 1.15rem 1.3rem;
  height: 100%;
}
.hn-fin-card--alert { border-left: 4px solid #dc2626 !important; }
.hn-fin-card--ok    { border-left: 4px solid #28c76f !important; }
.hn-fin-label { font-size: .74rem; font-weight: 600; letter-spacing: .3px; margin-bottom: .4rem; }
.hn-fin-value { font-size: 1.25rem; font-weight: 800; color: #0d1f3c; }
.hn-fin-sub   { font-size: .76rem; color: #6b7280; margin-top: .2rem; }
.hn-fin-row   { display: flex; justify-content: space-between; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid #f0f2f5; }
.hn-fin-row-item { text-align: center; }
.hn-fin-row-item .val { font-size: .9rem; font-weight: 700; color: #0d1f3c; }
.hn-fin-row-item .lbl { font-size: .7rem; color: #9ca3af; }
.hn-fin-row-item a { text-decoration: none !important; color: inherit !important; }

/* ═══════════════════════════════════════════════════════════
   LIST PAGES — TABLE, BADGE & CARD REFINEMENTS
   ═══════════════════════════════════════════════════════════ */

/* ─── Status badges (bg-label-*) ─── */
.badge.bg-label-success {
  background: #ecfdf5 !important; color: #059669 !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
  letter-spacing: .2px;
}
.badge.bg-label-danger {
  background: #fef2f2 !important; color: #dc2626 !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
}
.badge.bg-label-warning {
  background: #fef9ec !important; color: #d97706 !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
}
.badge.bg-label-primary {
  background: #eff4ff !important; color: #1a56db !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
}
.badge.bg-label-info {
  background: #eff6ff !important; color: #2563eb !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
}
.badge.bg-label-secondary {
  background: #f3f4f6 !important; color: #6b7280 !important;
  font-weight: 700 !important; font-size: .72rem !important;
  border-radius: 20px !important; padding: .3rem .7rem !important;
}

/* ─── DataTable — thead ─── */
.card-datatable table thead tr th,
.table thead tr th {
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  color: #9ca3af !important;
  background: #f9fafb !important;
  border-bottom: 2px solid #eaecf0 !important;
  padding: .75rem 1rem !important;
  white-space: nowrap;
}

/* ─── DataTable — tbody rows ─── */
.card-datatable table tbody tr td,
.table tbody tr td {
  font-size: .84rem !important;
  color: #374151 !important;
  padding: .65rem 1rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
.card-datatable table tbody tr:hover td,
.table tbody tr:hover td {
  background: #f8faff !important;
}

/* ─── Inline action buttons in tables ─── */
.btn-icon.btn-sm,
.btn.btn-sm.btn-icon {
  border-radius: 8px !important;
  width: 30px; height: 30px;
  padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── Card header on list pages ─── */
.card > .card-header {
  background: #fff !important;
  border-bottom: 2px solid #f0f2f5 !important;
  padding: 1rem 1.25rem !important;
}
.card-header .card-title {
  font-size: .92rem !important;
  font-weight: 800 !important;
  color: #0d1f3c !important;
}

/* ─── Select2 overrides ─── */
.select2-container--default .select2-selection--single {
  border-radius: 8px !important;
  border: 1.5px solid #e5e7eb !important;
  height: 36px !important;
  font-size: .875rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px !important;
  color: #374151 !important;
  padding-left: .75rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 34px !important;
}
.select2-dropdown {
  border: 1.5px solid #e5e7eb !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 30px rgba(13,31,60,.12) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #1a56db !important;
}
.select2-container--open { z-index: 9999 !important; }

/* ─── Modal header ─── */
.modal-header {
  background: linear-gradient(135deg,#0d1f3c,#1a56db) !important;
  color: #fff !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 1.1rem 1.4rem !important;
}
.modal-header .modal-title { font-weight: 800 !important; font-size: 1rem !important; color: #fff !important; }
.modal-header .btn-close { filter: invert(1) !important; opacity: .7 !important; }
.modal-content { border-radius: 14px !important; border: none !important; box-shadow: 0 20px 60px rgba(13,31,60,.2) !important; }

/* ─── Offcanvas header ─── */
.offcanvas-header {
  background: linear-gradient(135deg,#0d1f3c,#1a56db) !important;
  color: #fff !important;
}
.offcanvas-header .offcanvas-title { font-weight: 800 !important; font-size: .96rem !important; color: #fff !important; }
.offcanvas-header .btn-close { filter: invert(1) !important; opacity: .7 !important; }
