
pre.highlight,
.highlight pre {
  max-height: 30rem;
  margin: 1.5rem 0;
  overflow: auto;
  border-radius: var(--sui-border-radius);
}
pre.highlight,
.highlight pre {
  scrollbar-color: rgba(var(--sui-scrollbar-color, var(--sui-body-color-rgb)), 0.16) transparent;
}
pre.highlight::-webkit-scrollbar,
.highlight pre::-webkit-scrollbar {
  width: 1rem;
  height: 1rem;
  -webkit-transition: background 0.3s;
  transition: background 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  pre.highlight::-webkit-scrollbar,
  .highlight pre::-webkit-scrollbar {
    -webkit-transition: none;
    transition: none;
  }
}
pre.highlight::-webkit-scrollbar-thumb,
.highlight pre::-webkit-scrollbar-thumb {
  border-radius: 1rem;
  border: 5px solid transparent;
  box-shadow: inset 0 0 0 1rem rgba(var(--sui-scrollbar-color, var(--sui-body-color-rgb)), 0.16);
}
pre.highlight::-webkit-scrollbar-track,
.highlight pre::-webkit-scrollbar-track {
  background: transparent;
}
pre.highlight:hover::-webkit-scrollbar-thumb,
.highlight pre:hover::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0 1rem rgba(var(--sui-scrollbar-color, var(--sui-body-color-rgb)), 0.32);
}
pre.highlight::-webkit-scrollbar-corner,
.highlight pre::-webkit-scrollbar-corner {
  background: transparent;
}

.highlight {
  margin: 0;
}
.highlight code > * {
  margin: 0 !important;
  padding: 0 !important;
}
.highlight .c, .highlight .c1 {
  color: #a0aec0;
}
.highlight .nt, .highlight .nc, .highlight .nx {
  color: #ff8383;
}
.highlight .na, .highlight .p {
  color: #ffe484;
}
.highlight .s, .highlight .dl, .highlight .s2 {
  color: #b5f4a5;
}
.highlight .k {
  color: #93ddfd;
}
.highlight .s1, .highlight .mi {
  color: #d9a9ff;
}

.example {
  padding: 2rem;
  margin: 1rem 0 2rem;
  border: var(--sui-border-width) var(--sui-border-style) var(--sui-border-color);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 12rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.example-centered {
  justify-content: center;
}
.example-centered .example-content {
  flex: 0 auto;
}

.example-content {
  font-size: 0.875rem;
  line-height: 1.4285714286;
  color: var(--sui-body-color);
  flex: 1;
  max-width: 100%;
}
.example-content .page-header {
  margin-bottom: 0;
}

.example-bg {
  background: #fbfaf6;
}

.example-code {
  margin: 2rem 0;
  border: var(--sui-border-width) var(--sui-border-style) var(--sui-border-color);
  border-top: none;
}
.example-code pre {
  margin: 0;
  border: 0;
  border-radius: 0 0 3px 3px;
}
.example + .example-code {
  margin-top: -2rem;
}

.example-column {
  margin: 0 auto;
}
.example-column > .card:last-of-type {
  margin-bottom: 0;
}

.example-column-1 {
  max-width: 26rem;
}

.example-column-2 {
  max-width: 52rem;
}

.example-modal-backdrop {
  background: #182433;
  opacity: 0.24;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px 2px 0 0;
}

.card-Function Y {
  background: var(--sui-primary-lt) no-repeat center/100% 100%;
  border-color: var(--sui-primary);
  min-height: 316px;
}

.dropdown-menu-demo {
  display: inline-block;
  width: 100%;
  position: relative;
  top: 0;
  margin-bottom: 1rem !important;
}

.demo-icon-preview {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
.demo-icon-preview svg,
.demo-icon-preview i {
  width: 15rem;
  height: 15rem;
  font-size: 15rem;
  stroke-width: 1.5;
  margin: 0 auto;
  display: block;
}
@media (max-width: 575.98px) {
  .demo-icon-preview svg,
  .demo-icon-preview i {
    width: 10rem;
    height: 10rem;
    font-size: 10rem;
  }
}

.demo-icon-preview-icon pre {
  margin: 0;
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}

.demo-dividers > p {
  opacity: 0.2;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.demo-icons-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 -2px -1px 0;
  list-style: none;
}
.demo-icons-list > * {
  flex: 1 0 4rem;
}

.demo-icons-list-wrap {
  overflow: hidden;
}

.demo-icons-list-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  text-align: center;
  padding: 0.5rem;
  border-right: var(--sui-border-width) var(--sui-border-style) var(--sui-border-color);
  border-bottom: var(--sui-border-width) var(--sui-border-style) var(--sui-border-color);
  color: inherit;
  cursor: pointer;
}
.demo-icons-list-item .icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
}
.demo-icons-list-item:hover {
  text-decoration: none;
}

.settings-btn {
  position: fixed;
  right: -1px;
  top: 10rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: rgba(var(--sui-body-color-rgb), 0.04) 0 2px 4px 0;
}

.settings-scheme {
  display: inline-block;
  border-radius: 50%;
  height: 3rem;
  width: 3rem;
  position: relative;
  border: var(--sui-border-width) var(--sui-border-style) var(--sui-border-color);
  box-shadow: rgba(var(--sui-body-color-rgb), 0.04) 0 2px 4px 0;
}
.settings-scheme-light {
  background: linear-gradient(135deg, #ffffff 50%, #fcfdfe 50%);
}
.settings-scheme-mixed {
  background-image: linear-gradient(135deg, #182433 50%, #fff 50%);
}
.settings-scheme-transparent {
  background: #fcfdfe;
}
.settings-scheme-dark {
  background: #182433;
}
.settings-scheme-colored {
  background-image: linear-gradient(135deg, var(--sui-primary) 50%, #fcfdfe 50%);
}

/* ==========================================
   PROGRESS OVERLAY - FULL PAGE
   ========================================== */

#progress-ft {
  display: none;
}

#progress-ft .page-center {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#progress-ft .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

#progress-ft .progress-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: none;
  margin: 0;
}

#progress-ft .progress-icon {
  width: 80px;
  height: 80px;
  background: transparent;
  border: 3px solid rgba(202, 181, 121, 0.3);
  border-top-color: var(--app-brand-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: spin 1s linear infinite;
}

#progress-ft .progress-icon svg {
  display: none;
}

.text-progress-ft {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-progress-ft-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 400;
}

#progress-ft .progress {
  display: none;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.dropdown-menu.dropdown-menu-end form{
  margin-bottom: 0;
}

.dropdown-menu.dropdown-menu-end .dropdown-item:hover{
  background-color: rgba(0, 0, 0, 0.1);
}

.dropdown-menu.dropdown-menu-end .dropdown-item.bg-red:hover{
  background-color: rgba(179, 48, 52, 1)!important;
}

.dropdown-menu.dropdown-menu-end .dropdown-item.bg-success:hover{
  background-color: rgba(34, 129, 49, 1)!important;
}

.dropdown-menu.dropdown-menu-end .dropdown-item.bg-info:hover{
  background-color: rgba(48, 121, 179, 1)!important;
}

ul.pagination{
  margin-bottom: 0px !important;
}

.text-truncate,
.text-truncate > p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.page-wrapper{
  padding-left:calc(var(--tblr-page-padding) * 2) !important;
  padding-right:calc(var(--tblr-page-padding) * 2) !important;
}

.form-select .ts-control .item {
  white-space: nowrap;     
  overflow: hidden;      
  text-overflow: ellipsis; 
  max-width: 100%;          
}

.ts-dropdown.dropupside {
  bottom: 100%!important;
  top: auto!important;
  border-top:1px solid #d0d0d0!important;
}

.text-max-width-350 {
  max-width: 350px;
}

.text-truncate-props {
  max-width: 600px;
  padding-bottom: 5px;
}

/* Responsive text-truncate for mobile */
@media (max-width: 767.98px) {
  .text-max-width-350 {
    max-width: 200px;
  }

  .text-truncate-props {
    max-width: 250px;
  }

  .text-truncate,
  .text-truncate > p {
    max-width: 180px;
  }
}

@media (max-width: 575.98px) {
  .text-max-width-350 {
    max-width: 150px;
  }

  .text-truncate-props {
    max-width: 180px;
  }

  .text-truncate,
  .text-truncate > p {
    max-width: 120px;
  }
}

.tooltip {
  z-index: 99999 !important;
}

.modal-dialog-fullscreen {
  max-width: 80%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.modal-content-fullscreen {
  height: 90vh;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body-fullscreen {
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal-body-fullscreen .scroll-container{
  max-height: 40vh;
  overflow-y: auto; 
  padding-right: 15px;
}

.modal-body-fullscreen .scroll-container .table th, .modal-body-fullscreen .scroll-container .table td {
  vertical-align: middle;
  text-align: center;
}

.modal-body-fullscreen .scroll-container .table th {
  background-color: #f8f9fa;
}

/* ==========================================
   BRAND COLORS & STYLES
   ========================================== */

:root {
  --app-brand-color: #CAB579;
  --app-brand-color-hover: #b8a36a;
  --app-brand-color-rgb: 202, 181, 121;
}

/* Brand button style */
.btn-brand {
  background-color: var(--app-brand-color) !important;
  border-color: var(--app-brand-color) !important;
  color: #1a1a1a !important;
}
.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--app-brand-color-hover) !important;
  border-color: var(--app-brand-color-hover) !important;
  color: #1a1a1a !important;
}
.btn-brand:active {
  background-color: #a6935f !important;
  border-color: #a6935f !important;
  color: #1a1a1a !important;
}

/* Sidebar logo size */
.navbar-vertical .navbar-brand-image {
  height: 64px !important;
  max-height: none !important;
}

/* Active nav-link in dark sidebar (simple menu items like Home) */
.navbar-vertical .nav-item.active > .nav-link {
  background-color: rgba(var(--app-brand-color-rgb), 0.2) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Brand color bar for active nav-item */
.navbar-vertical .nav-item.active::after,
.navbar-vertical .nav-item.active:after {
  border-color: #CAB579 !important;
}

/* Dropdown items in dark sidebar (submenu items) */
.navbar-vertical .dropdown-menu .dropdown-item {
  border-radius: var(--tblr-border-radius) !important;
}

/* Active dropdown item in dark sidebar (submenu items) */
.navbar-vertical .dropdown-menu .dropdown-item.active {
  background-color: rgba(var(--app-brand-color-rgb), 0.3) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-left: 3px solid var(--app-brand-color) !important;
  margin-left: -3px !important;
}

/* ==========================================
   FORM INPUTS - BRAND STYLING
   ========================================== */

/* Text inputs, textareas, selects - Focus state */
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
.input-group > .form-control:focus,
.input-group > input[type="password"]:focus,
.input-group > input[type="text"]:focus,
.input-group input.form-control:focus {
  border-color: var(--app-brand-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
  outline: 0 !important;
}

/* Checkbox - Checked state */
.form-check-input:checked {
  background-color: var(--app-brand-color) !important;
  border-color: var(--app-brand-color) !important;
}

/* Checkbox - Focus state */
.form-check-input:focus {
  border-color: var(--app-brand-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}

/* Radio - Checked state */
input[type="radio"]:checked,
.form-check-input[type="radio"]:checked {
  background-color: var(--app-brand-color) !important;
  border-color: var(--app-brand-color) !important;
}

/* Selectgroup (radio cards) - Checked state */
.form-selectgroup-input:checked + .form-selectgroup-label {
  border-color: var(--app-brand-color) !important;
  color: var(--app-brand-color) !important;
  z-index: 1;
}

.form-selectgroup-input:checked + .form-selectgroup-label .form-selectgroup-check {
  background-color: var(--app-brand-color) !important;
  border-color: var(--app-brand-color) !important;
}

/* Selectgroup focus */
.form-selectgroup-input:focus + .form-selectgroup-label {
  border-color: var(--app-brand-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}

/* TomSelect - Focus state */
.ts-wrapper.focus .ts-control,
.ts-control:focus {
  border-color: var(--app-brand-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}

/* TomSelect - Active item */
.ts-dropdown .active {
  background-color: rgba(var(--app-brand-color-rgb), 0.15) !important;
  color: #1a1a1a !important;
}

/* TomSelect - Option hover */
.ts-dropdown .option:hover {
  background-color: rgba(var(--app-brand-color-rgb), 0.1) !important;
}

/* Switch/Toggle - Checked state */
.form-switch .form-check-input:checked {
  background-color: var(--app-brand-color) !important;
  border-color: var(--app-brand-color) !important;
}

/* Range input - Brand color */
.form-range::-webkit-slider-thumb {
  background-color: var(--app-brand-color) !important;
}
.form-range::-moz-range-thumb {
  background-color: var(--app-brand-color) !important;
}
.form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}
.form-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}

/* Input group - Focus state */
.input-group:focus-within .input-group-text {
  border-color: var(--app-brand-color) !important;
}

/* Input group flat - Focus state (override Tabler blue) */
.input-group-flat:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(var(--app-brand-color-rgb), 0.25) !important;
}

.input-group-flat:focus-within .form-control,
.input-group-flat:focus-within .input-group-text {
  border-color: var(--app-brand-color) !important;
}

.input-group-flat input[type="password"]:focus {
  box-shadow: none !important;
}

/* Form floating label - Focus state */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-select:focus ~ label {
  color: var(--app-brand-color) !important;
}

/* Page pre-title - Brand color */
.page-pretitle,
.page-pretitle a {
  color: var(--app-brand-color) !important;
}
.page-pretitle a:hover {
  color: var(--app-brand-color-hover) !important;
}

/* Selectgroup title - Brand color when checked */
.form-selectgroup-input:checked + .form-selectgroup-label .form-selectgroup-title {
  color: var(--app-brand-color) !important;
}

/* Fix page-title text alignment with special characters */
h2.page-title,
.page-title {
  display: block !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

h2.page-title.d-inline-block {
  display: inline-block !important;
  vertical-align: top;
}

/* ==========================================
   PAGE HEADER - RESPONSIVE
   ========================================== */

/* Page title truncate - use full available width */
.page-title.text-truncate,
.page-title.text-truncate-props {
  max-width: 100%;
  display: block;
}

/* Mobile: stack title and buttons vertically */
@media (max-width: 767.98px) {
  .page-header .row {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .page-header .col {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .page-header .col-auto.ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  .page-header .btn-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
  }

  .page-header .btn-list > * {
    flex: 1 1 0;
  }

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

  .page-header .btn-list form {
    flex: 1 1 0;
    display: flex;
  }

  .page-header .btn-list form .btn {
    flex: 1;
  }
}

@media (max-width: 575.98px) {
  .page-header .btn-list {
    flex-direction: column;
  }

  .page-header .btn-list > *,
  .page-header .btn-list form {
    width: 100%;
  }
}

/* ==========================================
   PAGINATION - BRAND STYLING
   ========================================== */

.pagination .page-item.active .page-link {
  background-color: var(--app-brand-color);
  border-color: var(--app-brand-color);
  color: #1a1a1a;
}

.pagination .page-link {
  color: var(--app-brand-color);
}

.pagination .page-link:hover {
  background-color: rgba(var(--app-brand-color-rgb), 0.1);
  border-color: var(--app-brand-color);
  color: var(--app-brand-color);
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
}

/* Space for filters button at bottom */
.page-body {
  padding-bottom: 4rem;
}

/* Fix dropdown clipping in table-responsive containers */
.table-responsive {
  overflow: visible;
}

.table-responsive .dropdown-menu {
  z-index: 1050;
}

/* Dropdown divider - minimal margin */
.dropdown-divider {
  margin: 1px 0 !important;
}