/* AutorizApp Tailwind migration v1
   Presentation layer migrated away from Bootstrap CSS.
   Bootstrap JS is retained only where existing behavior depends on it (modal/tooltip/dropdown). */

:root{--aa-primary:#28256d;--aa-primary-dark:#201e57;--aa-accent:#0f766e;--aa-bg:#f5f7fa;--aa-border:#e2e8f0;--aa-text:#1e293b;--aa-muted:#64748b}
html{background:#f5f7fa}body{margin:0;background:#f5f7fa;color:var(--aa-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}a{text-decoration:none}img{max-width:100%}
/* app shell helpers retained because they are project-specific, not Bootstrap */
.soft-card,.card-soft,.metric-card,.kpi-card,.chart-card,.table-card,.mini-kpi{border:1px solid #e2e8f0;background:#fff;border-radius:1rem;box-shadow:0 4px 18px rgba(15,23,42,.05)}
.soft-card:hover,.metric-card:hover,.kpi-card:hover{box-shadow:0 8px 28px rgba(15,23,42,.08)}
.mini-label,.metric-label,.section-kicker{font-size:.72rem;line-height:1rem;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:#64748b}.metric-value,.amount{font-size:1.5rem;line-height:2rem;font-weight:750;color:#0f172a}.metric-foot,.small-muted,.text-muted-2{font-size:.8rem;color:#64748b}
.truncate-1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.number-cell{text-align:right;font-variant-numeric:tabular-nums}.div-espaciado{margin-bottom:1rem}
/* Buttons */
.aa-btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.6rem;padding:.55rem .9rem;font-size:.875rem;font-weight:650;line-height:1.15rem;transition:.15s ease;border:1px solid transparent;cursor:pointer}.aa-btn:focus{outline:2px solid rgba(40,81,99,.25);outline-offset:2px}.aa-btn:disabled{opacity:.55;cursor:not-allowed}.aa-btn-sm{padding:.38rem .65rem;font-size:.8rem}.aa-btn-icon{width:2.35rem;height:2.35rem;padding:0}
/* Forms */
.aa-input,.aa-select{display:block;width:100%;border:1px solid #cbd5e1;border-radius:.65rem;background:#fff;padding:.58rem .72rem;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.03);transition:.15s}.aa-input:focus,.aa-select:focus{border-color:#28256d;outline:0;box-shadow:0 0 0 3px rgba(40,81,99,.12)}.aa-label{display:block;margin-bottom:.38rem;font-size:.82rem;font-weight:650;color:#334155}
/* Tables */
.aa-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.84rem}.aa-table thead th{background:#f8fafc;color:#475569;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;font-weight:750;padding:.7rem .75rem;border-bottom:1px solid #e2e8f0}.aa-table tbody td{padding:.72rem .75rem;border-bottom:1px solid #eef2f7;vertical-align:middle}.aa-table tbody tr:hover{background:#f8fafc}.aa-table tbody tr:last-child td{border-bottom:0}
/* Alerts */
.aa-alert{position:relative;border-radius:.75rem;border:1px solid;padding:.8rem 1rem;font-size:.875rem}.aa-alert-danger{background:#fff1f2;border-color:#fecdd3;color:#9f1239}.aa-alert-success{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}.aa-alert-warning{background:#fffbeb;border-color:#fde68a;color:#92400e}.aa-alert-info{background:#f0f9ff;border-color:#bae6fd;color:#075985}
/* Bootstrap JS compatibility: visual implementation without Bootstrap CSS */
.modal{position:fixed;inset:0;z-index:1055;display:none;overflow-x:hidden;overflow-y:auto;background:rgba(15,23,42,.52);padding:1.5rem}.modal.show{display:block}.modal-dialog{position:relative;width:auto;margin:1.75rem auto;max-width:500px}.modal-lg{max-width:800px}.modal-xl{max-width:1140px}.modal-dialog-centered{min-height:calc(100% - 3.5rem);display:flex;align-items:center}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;background:#fff;border:1px solid #e2e8f0;border-radius:1rem;box-shadow:0 24px 70px rgba(15,23,42,.22);overflow:hidden}.modal-header,.modal-footer{display:flex;align-items:center;padding:1rem 1.25rem}.modal-header{border-bottom:1px solid #e2e8f0}.modal-footer{justify-content:flex-end;gap:.5rem;border-top:1px solid #e2e8f0}.modal-body{position:relative;flex:1 1 auto;padding:1.25rem}.modal-title{font-size:1.05rem;font-weight:700;color:#0f172a}.btn-close{margin-left:auto;width:2rem;height:2rem;border:0;background:transparent;position:relative;cursor:pointer}.btn-close:before,.btn-close:after{content:"";position:absolute;left:1rem;top:.42rem;width:1px;height:1.05rem;background:#64748b;transform:rotate(45deg)}.btn-close:after{transform:rotate(-45deg)}.fade{transition:opacity .15s linear}.modal-backdrop{position:fixed;inset:0;z-index:1050;background:#0f172a}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}
.dropdown-menu{display:none;position:absolute;z-index:1000;min-width:12rem;padding:.4rem;background:#fff;border:1px solid #e2e8f0;border-radius:.65rem;box-shadow:0 12px 30px rgba(15,23,42,.12)}.dropdown-menu.show{display:block}.dropdown-item{display:block;width:100%;padding:.5rem .7rem;border-radius:.45rem;color:#334155}.dropdown-item:hover{background:#f1f5f9}.tooltip{z-index:1080;position:absolute;font-size:.75rem}.tooltip-inner{max-width:220px;padding:.35rem .55rem;color:#fff;background:#0f172a;border-radius:.4rem}
.nav{display:flex;flex-wrap:wrap}.nav-tabs{border-bottom:1px solid #e2e8f0;gap:.25rem}.nav-link{display:block;padding:.65rem .9rem;color:#64748b;border-radius:.55rem .55rem 0 0}.nav-link:hover{color:#28256d;background:#f8fafc}.nav-link.active{color:#28256d;background:#fff;border:1px solid #e2e8f0;border-bottom-color:#fff;font-weight:650}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}
.input-group{display:flex;width:100%;align-items:stretch}.input-group>.aa-input,.input-group>.aa-select{min-width:0;flex:1 1 auto;border-radius:0}.input-group>*:first-child{border-radius:.65rem 0 0 .65rem}.input-group>*:last-child{border-radius:0 .65rem .65rem 0}.input-group-text{display:flex;align-items:center;padding:.58rem .7rem;background:#f8fafc;border:1px solid #cbd5e1;color:#64748b}
.progress{display:flex;overflow:hidden;background:#e2e8f0;border-radius:999px}.progress-bar{display:flex;justify-content:center;overflow:hidden;background:#28256d;color:#fff;white-space:nowrap;transition:width .4s ease}
@media (max-width:1023px){.modal{padding:.75rem}.modal-dialog{margin:.75rem auto}}
@media print{.no-print{display:none!important}}

/* Legacy project-specific layout retained during visual migration */
.page-wrapper {
  margin: 0;
}
.page-wrapper.pinned .main-container {
  padding-left: 80px;
}

@media screen and (max-width: 991.98px) {
  .page-wrapper .sidebar-wrapper {
    left: -255px;
  }
  .page-wrapper.toggled .sidebar-wrapper {
    left: 0;
  }
  .page-wrapper.toggled .toggle-sidebar {
    position: fixed;
    left: 190px;
    top: 15px;
    z-index: 10;
    background: #d63384;
    color: #ffffff;
  }
  .page-wrapper .main-container {
    padding-left: 0;
  }
  .page-wrapper.pinned .main-container {
    padding-left: 0;
  }
}
@media (min-width: 992px) {
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper {
    width: 80px;
  }
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-menu .menu-text,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-menu .treeview.active .treeview-menu,
  .page-wrapper.pinned:not(.sidebar-hovered) .sidebar-wrapper .sidebar-menu li.treeview:after {
    display: none !important;
  }
}
.main-container {
  padding: 0 0 0 250px;
  -webkit-transition: padding-left 0.1s ease;
  transition: padding-left 0.1s ease;
}

.sidebar-wrapper {
  background-color: #28256d;
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  -webkit-transition: left 0.3s ease, width 0.3s ease;
  transition: left 0.3s ease, width 0.3s ease;
}

.app-brand {
  min-height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.app-brand .logo {
  max-width: 180px;
  max-height: 40px;
  transition: width 1s ease;
}

.app-brand-sm {
  margin: 0 0 0 1rem;
}
.app-brand-sm .logo {
  max-width: 180px;
  max-height: 40px;
}

#toggle-sidebar {
  display: none;
}

#pin-sidebar {
  display: block;
}

@media (max-width: 767.99px) {
  #toggle-sidebar {
    display: block;
  }
}
@media (max-width: 768px) {
  #pin-sidebar {
    display: none;
  }
}
ul.profile-actions {
  list-style-type: none;
  background: url(../images/curve-line-2.svg) repeat-x;
  background-position: bottom;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 1rem 1rem 1rem;
  padding: 0 0 1rem 0;
}
ul.profile-actions > li {
  border-right: 1px solid #423f95;
  border-bottom: 1px solid #423f95;
  padding: 0.5rem 0rem;
}
ul.profile-actions > li a {
  position: relative;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 60px;
  color: #c2c1e8;
}
ul.profile-actions > li:nth-child(3n+3) {
  border-right: 0;
}
ul.profile-actions > li:nth-child(4) {
  border-bottom: 0;
}
ul.profile-actions > li:nth-child(5) {
  border-bottom: 0;
}
ul.profile-actions > li:last-child {
  border-right: 0;
  border-bottom: 0;
}

.count-label {
  position: absolute;
  top: 1px;
  right: 16px;
  width: 20px;
  height: 20px;
  background: #dc3545;
  border-radius: 18px;
  animation: glow 1s ease-out;
  -moz-animation: glow 1s ease-out;
  -moz-animation-iteration-count: infinite;
  -o-animation: glow 1s ease-out;
  -o-animation-iteration-count: infinite;
  -webkit-animation: glow 1s ease-out;
  -ms-animation: glow 1s ease-out;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
}

@-webkit-keyframes glow {
  0% {
    -webkit-transform: scale(0);
  }
  10% {
    -webkit-transform: scale(0.25);
  }
  20% {
    -webkit-transform: scale(0.5);
  }
  30% {
    -webkit-transform: scale(0.75);
  }
  50% {
    -webkit-transform: scale(1);
  }
  70% {
    -webkit-transform: scale(0.75);
  }
  90% {
    -webkit-transform: scale(0.5);
  }
  100% {
    -webkit-transform: scale(0);
  }
}
.sidebar-menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.sidebar-menu > li {
  position: relative;
}
.sidebar-menu > li.treeview > a {
  position: relative;
  z-index: 1;
}
.sidebar-menu > li.treeview > a:after {
  font-family: "bootstrap-icons" !important;
  font-weight: 700;
  font-size: 0.85rem;
  content: "\f285";
  display: inline-block;
  position: absolute;
  right: 15px;
  top: 18px;
  color: #c2c1e8;
  transition: all 0.5s;
}
.sidebar-menu > li.treeview.active > a:after {
  transform: rotate(-90deg);
  color: #ffffff;
}
.sidebar-menu > li > a {
  padding: 10px 25px 10px 25px;
  display: flex;
  align-items: center;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: #c2c1e8;
  text-decoration: none;
  font-size: 0.875rem;
}
.sidebar-menu > li > a > i {
  width: 38px;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.sidebar-menu > li:hover > a {
  color: #c2c1e8;
  background: #343084;
  border-left-color: #d63384;
}
.sidebar-menu > li > .treeview-menu {
  padding: 5px 0 5px 0;
}
.sidebar-menu > li.active > a {
  color: #ffffff;
  background: #201e57;
  border-left-color: #198754;
}
.sidebar-menu li.active > .treeview-menu {
  display: block;
}
.sidebar-menu > li.current-page > a {
  color: #ffffff;
  background: #383588;
  border-left-color: #d63384;
}
.sidebar-menu > li.current-page > a:hover {
  color: #ffffff;
  background: #383588;
  border-left-color: #d63384;
}
.sidebar-menu > li.current-page > a:before {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  background: url(../images/menu-arrow.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  width: 16px;
  height: 40px;
}
.sidebar-menu .treeview-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0 5px;
}
.sidebar-menu .treeview-menu .treeview-menu {
  padding-left: 20px;
}
.sidebar-menu .treeview-menu > li {
  margin: 0;
}
.sidebar-menu .treeview-menu > li > a {
  padding: 10px 25px 10px 25px;
  margin-left: 40px;
  border-left: 1px solid #423f95;
  display: block;
  color: #c2c1e8;
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-menu .treeview-menu > li > a .bi-chevron-right {
  float: right;
  transition: all 0.5s;
  transform: rotate(0deg);
}
.sidebar-menu .treeview-menu > li > a:hover {
  background-color: #343084;
  color: #ffffff;
  -webkit-border-radius: 30px 0 0 30px;
  -moz-border-radius: 30px 0 0 30px;
  border-radius: 30px 0 0 30px;
}
.sidebar-menu .treeview-menu > li > a.active-sub {
  color: #ffffff;
}
.sidebar-menu .treeview-menu > li > a.active-sub:hover {
  color: #ffffff;
  background: transparent;
}
.sidebar-menu .treeview-menu > li.active > a .bi-chevron-right {
  transform: rotate(-90deg);
}

.app-container {
  padding: 0;
  background: #f1f5f9;
  -webkit-border-radius: 30px 0 0 30px;
  -moz-border-radius: 30px 0 0 30px;
  border-radius: 30px 0 0 30px;
}

@media screen and (max-width: 991.98px) {
  .app-container {
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    border-radius: 0px;
  }
}
.app-header {
  padding: 0 1.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0 auto;
}
.header-actions .dropdown-toggle::after {
  display: none;
}

.search-container {
  position: relative;
}
.search-container .form-control {
  min-width: 280px;
  transition: all ease 0.5s;
}
.search-container .form-control:focus {
  min-width: 310px;
}
.search-container i {
  position: absolute;
  right: 15px;
  top: 5px;
  font-size: 1rem;
}

.app-hero-header {
  background-color: #dae1ea;
  min-height: 145px;
  padding: 1rem 1.5rem;
  -webkit-border-radius: 0 0 50px 50px;
  -moz-border-radius: 0 0 50px 50px;
  border-radius: 0 0 50px 50px;
}

.app-body {
  padding: 1.25rem 1.5rem;
  height: calc(100vh - 176px);
  overflow: auto;
  margin-top: -4.5rem;
}

.app-footer {
  font-size: 0.8rem;
  padding: 0.6rem 1.5rem;
}

/********************
 ********************
// Components CSS
 ********************
********************/
.activity-log {
  padding-left: 2.5rem;
  padding-bottom: 2rem;
  position: relative;
}
.activity-log:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0px;
  background: #ffffff;
  border: 4px solid #dc3545;
  width: 21px;
  height: 21px;
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  border-radius: 50px;
  z-index: 1;
}
.activity-log:after {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  background: #cad4e0;
  height: 100%;
  width: 3px;
}
.activity-log:last-child {
  padding-bottom: 0;
}

.stacked-images {
  display: flex;
}
.stacked-images.center {
  justify-content: center;
}
.stacked-images img {
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  border-radius: 50px;
  width: 48px;
  height: 48px;
  margin-right: -10px;
}
.stacked-images .plus {
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  border-radius: 50px;
  color: #ffffff;
  width: 48px;
  height: 48px;
}

.activity-list {
  border-bottom: 1px dotted #dfe5ea;
}
.activity-list .activity-time {
  border-right: 1px solid #dfe5ea;
}
.activity-list .activity-time .badge {
  -webkit-border-radius: 4px 0 0 4px;
  -moz-border-radius: 4px 0 0 4px;
  border-radius: 4px 0 0 4px;
  min-width: 70px;
  text-align: left;
  margin: 5px 0 15px 5px;
}

.activity-block:before {
  content: "";
  background: url(../images/curve-line.svg) repeat-y;
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  z-index: 0;
  min-height: 140px;
  width: 7px;
}
.activity-block img.activity-user {
  z-index: 1;
}

/********************
 ********************
// Plugins CSS
 ********************
********************/
.sidebarMenuScroll {
  height: calc(100vh - 250px);
  overflow: hidden;
}
.sidebarMenuScroll .os-scrollbar-vertical {
  left: 0;
  right: initial;
}

@media (max-width: 991.99px) {
  .sidebarMenuScroll {
    height: calc(100vh - 110px);
  }
}
.scroll200 {
  height: 200px;
  overflow: hidden;
}

.scroll350 {
  height: 350px;
  overflow: hidden;
}

.scroll300 {
  height: 300px;
  overflow: hidden;
}

.rating-stars {
  width: 120px !important;
  line-height: 100%;
}
.rating-stars img {
  width: 18px;
  height: 18px;
}

.jvectormap-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  -ms-touch-action: none;
  touch-action: none;
}

.jvectormap-tip {
  position: absolute;
  display: none;
  -webkit-border-radius: 0px;
  -moz-border-radius: 0px;
  border-radius: 0px;
  background: #03070b;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 6px 12px;
}

@-webkit-keyframes showHideDot {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes showHideDot {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.auto-align-graph .apexcharts-canvas {
  margin: auto;
}

/********************
 ********************
// Pages CSS
 ********************
********************/
.error-screen {
  background: url(../images/dots.svg) no-repeat;
  background-position: center center;
  background-size: cover;
}
.error-screen h1.error-title, .error-screen .error-title.h1 {
  font-size: 20vw;
  text-shadow: 1px 0px 1px #ccc, 0px 1px 1px #eee, 2px 1px 1px #ccc, 1px 2px 1px #eee, 3px 2px 1px #ccc, 2px 3px 1px #eee, 4px 3px 1px #ccc, 3px 4px 1px #eee, 5px 4px 1px #ccc, 4px 5px 1px #eee, 6px 5px 1px #ccc, 5px 6px 1px #eee, 7px 6px 1px #ccc, 6px 7px 1px #eee, 8px 7px 1px #ccc, 7px 8px 1px #eee, 9px 8px 1px #ccc, 8px 9px 1px #eee;
}

img.login-logo {
  width: 150px;
}

.sidebar .active {
  background-color: #5c6bc0;
  color: white;
}

.sidebar-menu li.active > a,
.sidebar-menu a.active {
  background-color: #5c6bc0;
  color: white;
}

.sidebar-menu li.current-page > a {
  font-weight: bold;
}
.aa-table-striped tbody tr:nth-child(even){background:#f8fafc}.aa-table-hover tbody tr:hover{background:#f1f5f9}

/* =========================================================
   AutorizApp Tailwind v2 - Ajustes visuales de compatibilidad
   Objetivo: conservar la presentación funcional de la versión
   Bootstrap sin reintroducir Bootstrap CSS.
   ========================================================= */

/* Shell: sidebar recto y encabezado superior compacto */
.app-container{
  border-radius:0 !important;
  -webkit-border-radius:0 !important;
  -moz-border-radius:0 !important;
  min-height:100vh;
}
.app-header{
  min-height:80px;
  height:80px;
  padding:0 1.5rem;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
  overflow:visible;
}
.app-header .aa-btn{min-width:48px;min-height:48px}
.header-actions{height:100%}
.header-actions #userSettings{height:80px;color:#415b79;text-decoration:none}

/* Utilidades heredadas que todavía usa el HTML. Son locales, no Bootstrap. */
.img-fluid{max-width:100%;height:auto}
.img-1x{width:1rem;height:1rem}.img-1xx{width:1.5rem;height:1.5rem}
.img-2x{width:2rem;height:2rem}.img-2xx{width:2.5rem;height:2.5rem}
.img-3x{width:3rem;height:3rem;object-fit:cover}.img-3xx{width:3.5rem;height:3.5rem;object-fit:cover}
.img-4x{width:4rem;height:4rem}.img-4xx{width:4.5rem;height:4.5rem}
.img-5x{width:5rem;height:5rem}.img-5xx{width:5.5rem;height:5.5rem}
.img-6x{width:6rem;height:6rem;object-fit:contain}
.rounded-2{border-radius:.375rem!important}.rounded-4{border-radius:.75rem!important}.rounded-5{border-radius:1rem!important}
.border-start{border-left:1px solid #dfe5ea!important}.border-top{border-top:1px solid #dfe5ea!important}
.lh-1{line-height:1!important}.lh-2{line-height:2!important}
.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}
.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-auto{margin-left:auto!important}
.ps-3{padding-left:1rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pb-3{padding-bottom:1rem!important}
.text-decoration-underline{text-decoration:underline!important}.text-decoration-none{text-decoration:none!important}
.text-blue{color:#4542ab!important}.fw-light{font-weight:300!important}.fs-7{font-size:.8rem!important}

/* Responsive display helpers still referenced by the shared menus */
@media (min-width:576px){.d-sm-block{display:block!important}}
@media (min-width:768px){.d-md-block{display:block!important}.d-md-none{display:none!important}}
@media (max-width:767.98px){.app-header{min-height:64px;height:64px;padding:0 .75rem}.header-actions #userSettings{height:64px}.app-brand-sm .logo{max-height:34px;max-width:150px}}

/* Breadcrumbs: vuelve a dar separación visual y jerarquía */
.breadcrumb{list-style:none;padding:0;margin:0;gap:.1rem;color:#334155;font-size:.9rem}
.breadcrumb-item{display:flex;align-items:center;white-space:nowrap}
.breadcrumb-item a{color:#526f94;text-decoration:none}
.breadcrumb-item a:hover{color:#28256d}
.breadcrumb-item + .breadcrumb-item::before{content:"›";display:inline-block;padding:0 .75rem;color:#64748b;font-size:1.55rem;line-height:1}

/* Empresas: evita que los logotipos crezcan más que en la versión original */
.app-body .img-6x{display:block;width:6rem;height:6rem;max-width:6rem;max-height:6rem;object-fit:contain}

/* =========================================================
   DataTables - controles y exportación
   ========================================================= */
.botones-paraexportar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  flex-wrap:wrap;
  margin-bottom:.75rem;
}
.botones-paraexportar .left,.botones-paraexportar .right{
  display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;
}
.dt-buttons{display:flex!important;align-items:center;gap:.5rem;flex-wrap:wrap;margin:0!important}
.dt-buttons .btn,.dt-buttons .dt-button,#dt-export-buttons .btn,#dt-export-buttons .dt-button,#dt-export-tbdos .btn,#dt-export-tbdos .dt-button{
  appearance:none;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  min-height:42px;
  margin:0!important;
  padding:.55rem .9rem!important;
  border:1px solid #28256d!important;
  border-radius:.55rem!important;
  background:#28256d!important;
  color:#fff!important;
  font-size:.875rem!important;
  font-weight:650!important;
  line-height:1.15rem!important;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
  text-decoration:none!important;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.dt-buttons .btn:hover,.dt-buttons .dt-button:hover,#dt-export-buttons .btn:hover,#dt-export-buttons .dt-button:hover,#dt-export-tbdos .btn:hover,#dt-export-tbdos .dt-button:hover{
  background:#201e57!important;border-color:#201e57!important;box-shadow:0 4px 10px rgba(40,81,99,.16);transform:translateY(-1px)
}
.dt-buttons .btn i,.dt-buttons .dt-button i{font-size:1rem;line-height:1}

/* DataTables: selector, buscador, información y paginación */
div.dataTables_wrapper{width:100%;color:#1e293b}
div.dataTables_wrapper::after{content:"";display:block;clear:both}
div.dataTables_wrapper div.dataTables_length{float:left;margin:.25rem 0 .75rem;display:flex;align-items:center;gap:.4rem}
div.dataTables_wrapper div.dataTables_filter{float:right;margin:.25rem 0 .75rem;text-align:right}
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label{display:flex;align-items:center;gap:.5rem;margin:0;color:#475569;font-size:.875rem;font-weight:500}
div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input{
  height:38px;
  border:1px solid #cbd5e1!important;
  border-radius:.5rem!important;
  background:#fff!important;
  color:#0f172a!important;
  padding:.4rem .65rem!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
  outline:none!important;
  transition:border-color .15s ease,box-shadow .15s ease;
}
div.dataTables_wrapper div.dataTables_length select{min-width:70px;padding-right:1.75rem!important}
div.dataTables_wrapper div.dataTables_filter input{min-width:210px;margin-left:0!important}
div.dataTables_wrapper div.dataTables_filter input:focus,
div.dataTables_wrapper div.dataTables_length select:focus{border-color:#28256d!important;box-shadow:0 0 0 3px rgba(40,81,99,.12)!important}
div.dataTables_wrapper div.dataTables_info{float:left;padding-top:.85rem;color:#64748b;font-size:.82rem}
div.dataTables_wrapper div.dataTables_paginate{float:right;padding-top:.65rem;display:flex;align-items:center;gap:.25rem}
div.dataTables_wrapper div.dataTables_paginate .paginate_button{
  min-width:34px;height:34px;display:inline-flex!important;align-items:center;justify-content:center;
  padding:.3rem .6rem!important;margin:0 .1rem!important;border:1px solid #e2e8f0!important;border-radius:.45rem!important;
  background:#fff!important;color:#475569!important;cursor:pointer;text-decoration:none!important
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button:hover{background:#f1f5f9!important;border-color:#cbd5e1!important;color:#28256d!important}
div.dataTables_wrapper div.dataTables_paginate .paginate_button.current{background:#28256d!important;border-color:#28256d!important;color:#fff!important}
div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled{opacity:.45;cursor:not-allowed}

/* Tabla: el proyecto usa tanto TH como TD dentro de THEAD */
.aa-table thead th,.aa-table thead td{
  background:#4542ab!important;
  color:#fff!important;
  font-size:.78rem;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
  padding:.72rem .65rem;
  border-bottom:0!important;
  white-space:nowrap;
}
.aa-table thead th:first-child,.aa-table thead td:first-child{border-top-left-radius:.35rem}
.aa-table thead th:last-child,.aa-table thead td:last-child{border-top-right-radius:.35rem}
.aa-table tbody td{padding:.75rem .65rem;border-bottom:1px solid #dbe4ee;vertical-align:middle}
.aa-table tbody tr:hover{background:#f8fafc}

/* Título del módulo */
.titulo-modulo{font-size:1.05rem;font-weight:650;color:#28256d;margin-bottom:.45rem}

/* Botones Bootstrap-residuales creados por plugins o HTML heredado */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid transparent;border-radius:.55rem;padding:.5rem .85rem;font-size:.875rem;font-weight:650;line-height:1.2;cursor:pointer;text-decoration:none;transition:.15s ease}
.btn-primary{background:#28256d!important;border-color:#28256d!important;color:#fff!important}.btn-primary:hover{background:#201e57!important;border-color:#201e57!important}
.btn-secondary{background:#627892!important;border-color:#627892!important;color:#fff!important}.btn-dark{background:#1a2b4a!important;border-color:#1a2b4a!important;color:#fff!important}
.btn-lg{min-height:46px;padding:.7rem 1rem;font-size:1rem}.btn-group{display:inline-flex}.btn-group>.btn:not(:first-child){margin-left:-1px}

/* Formularios heredados que aún son generados por plugins */
.form-control,.form-select{
  display:block;width:100%;border:1px solid #cbd5e1;border-radius:.55rem;background:#fff;
  padding:.55rem .7rem;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.03);outline:none
}
.form-control:focus,.form-select:focus{border-color:#28256d;box-shadow:0 0 0 3px rgba(40,81,99,.12)}
.form-check{display:flex;align-items:center;gap:.45rem}.form-check-input{width:1rem;height:1rem;accent-color:#28256d}.form-check-label{color:#334155}

@media (max-width:767.98px){
  div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,
  div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{float:none;text-align:left;width:100%}
  div.dataTables_wrapper div.dataTables_filter label{justify-content:flex-start}
  div.dataTables_wrapper div.dataTables_filter input{min-width:0;flex:1}
  .dt-buttons{width:100%}
}

/* =========================================================
   AutorizApp Tailwind v3
   - Un solo scroll vertical en el contenido de la aplicación
   - Logo horizontal al expandir / icono cuadrado al comprimir
   ========================================================= */

/*
 * El shell ocupa exactamente el viewport. El documento ya no crece por
 * encima de 100vh, por lo que desaparece la segunda barra del navegador.
 * .app-body sigue siendo el único contenedor con desplazamiento vertical.
 */
.page-wrapper{
  height:100vh;
  min-height:100vh;
  overflow:hidden;
}
.page-wrapper .main-container{
  height:100vh;
  min-height:0;
  overflow:hidden;
}
.page-wrapper .app-container{
  height:100vh;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.page-wrapper .app-header,
.page-wrapper .app-hero-header,
.page-wrapper .app-footer{
  flex:0 0 auto;
}
.page-wrapper .app-body{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
}

/* Marca del sidebar: dos recursos independientes para facilitar reemplazo. */
.app-brand > a{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.app-brand .logo-full{
  display:block;
  max-width:180px;
  max-height:40px;
  object-fit:contain;
}
.app-brand .logo-collapsed{
  display:none;
  width:46px;
  height:46px;
  max-width:46px;
  max-height:46px;
  border-radius:12px;
  object-fit:cover;
}

@media (min-width:992px){
  .page-wrapper.pinned:not(.sidebar-hovered) .app-brand{
    padding:1rem 0!important;
    justify-content:center;
  }
  .page-wrapper.pinned:not(.sidebar-hovered) .app-brand > a{
    justify-content:center;
  }
  .page-wrapper.pinned:not(.sidebar-hovered) .app-brand .logo-full{
    display:none!important;
  }
  .page-wrapper.pinned:not(.sidebar-hovered) .app-brand .logo-collapsed{
    display:block!important;
  }
}

/* En móvil se conserva el logo pequeño del header; no se usa el icono colapsado. */
@media (max-width:991.98px){
  .app-brand .logo-collapsed{display:none!important}
  .app-brand .logo-full{display:block!important}
}


/* =========================================================
   AutorizApp Tailwind v4
   - Responsive seguro para reportes y dashboards
   - Header superior más compacto
   - Botones homologados al color corporativo del sidebar
   - Tablas contenidas dentro de su tarjeta
   ========================================================= */
:root{
  --aa-sidebar:#28256d;
  --aa-sidebar-hover:#201e57;
  --aa-sidebar-soft:#343084;
}

/* Header más compacto, manteniendo controles centrados. */
.app-header{
  min-height:68px!important;
  height:68px!important;
  padding:0 1.25rem!important;
}
.header-actions #userSettings{height:68px!important}
.app-header .aa-btn{min-width:44px;min-height:44px}

/* Evita que los hijos de grids puedan forzar el ancho de la cuadrícula. */
.grid{min-width:0}
.grid > *{min-width:0;max-width:100%}

/* Tarjetas y reportes siempre limitados al ancho disponible. */
.soft-card,.card-soft,.metric-card,.kpi-card,.chart-card,.table-card,.mini-kpi,
.rounded-xl.border.bg-white,.rounded-xl.border.border-slate-200.bg-white{
  min-width:0;
  max-width:100%;
}
.chart-card canvas,.chart-card svg,.chart-card .apexcharts-canvas,
.chart-card .apexcharts-svg{max-width:100%!important}

/* Contención horizontal de tablas: scroll dentro del reporte, no del layout. */
.table-responsive,.overflow-x-auto,.aa-table-wrap,
.dataTables_wrapper,.dataTables_scroll,.dataTables_scrollBody{
  max-width:100%!important;
  min-width:0!important;
}
.overflow-x-auto,.table-responsive,.aa-table-wrap,.dataTables_scrollBody{
  overflow-x:auto!important;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
.aa-table{
  width:100%!important;
  max-width:none;
}
.dataTables_wrapper table.dataTable{width:100%!important}

/* Los controles DataTables se acomodan antes de invadir la tabla. */
.botones-paraexportar,.dt-buttons{max-width:100%}
@media (max-width:1199.98px){
  .botones-paraexportar{align-items:flex-start}
  div.dataTables_wrapper div.dataTables_length,
  div.dataTables_wrapper div.dataTables_filter{float:none!important;display:flex!important;width:auto;margin-right:1rem}
  div.dataTables_wrapper div.dataTables_filter{justify-content:flex-start;text-align:left}
}
@media (max-width:767.98px){
  .app-header{min-height:60px!important;height:60px!important;padding:0 .75rem!important}
  .header-actions #userSettings{height:60px!important}
}

/* Botonería primaria/exportación con la misma identidad del sidebar. */
.dt-buttons .btn,.dt-buttons .dt-button,
#dt-export-buttons .btn,#dt-export-buttons .dt-button,
#dt-export-tbdos .btn,#dt-export-tbdos .dt-button,
.btn-primary{
  background:var(--aa-sidebar)!important;
  border-color:var(--aa-sidebar)!important;
  color:#fff!important;
}
.dt-buttons .btn:hover,.dt-buttons .dt-button:hover,
#dt-export-buttons .btn:hover,#dt-export-buttons .dt-button:hover,
#dt-export-tbdos .btn:hover,#dt-export-tbdos .dt-button:hover,
.btn-primary:hover{
  background:var(--aa-sidebar-hover)!important;
  border-color:var(--aa-sidebar-hover)!important;
}

/* En pantallas intermedias, barras de herramientas y filtros pueden saltar línea sin comprimirse. */
.toolbar-wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.toolbar-wrap > *{min-width:0}
@media (max-width:1199.98px){
  .toolbar-wrap{align-items:flex-start}
}

/* Ajustes de contenido denso en reportes ejecutivos. */
@media (max-width:1199.98px){
  .bar-row{grid-template-columns:minmax(120px,150px) minmax(90px,1fr) minmax(72px,92px)!important}
  .chart-card,.table-card,.filter-card{overflow:hidden}
}
@media (max-width:639.98px){
  .bar-row{grid-template-columns:1fr!important}
  .bar-value{text-align:left!important}
}


/* AutorizApp Tailwind V5 - modales más limpios y ligeros */
.modal-content{border:1px solid #dfe5ee!important;box-shadow:0 10px 28px rgba(15,23,42,.12)!important;border-radius:.9rem!important}
.modal-backdrop.show{opacity:.42!important}
.modal-content .card,.modal-content .soft-card,.modal-content .card-soft{box-shadow:none!important}
.modal-header{padding:.9rem 1.2rem!important}
.modal-body{padding:1.1rem 1.2rem 1.2rem!important}
.modal-footer{padding:.85rem 1.2rem!important}

/* =========================================================
   AutorizApp Tailwind v7 - Captura compacta y acciones ISH
   ========================================================= */
.create-invoice-wrapper .div-espaciado{margin-bottom:.65rem}
.create-invoice-wrapper .grid{column-gap:.8rem;row-gap:.65rem}
.create-invoice-wrapper .aa-label{margin-bottom:.25rem;font-size:.78rem;line-height:1rem}
.create-invoice-wrapper .aa-input,
.create-invoice-wrapper .aa-select{min-height:40px;padding:.45rem .65rem;border-radius:.55rem}
.create-invoice-wrapper .input-group-text{padding:.45rem .6rem}
.create-invoice-wrapper .factura-actions{padding-top:.05rem;align-self:end}
.create-invoice-wrapper .factura-actions .aa-btn{min-height:40px;white-space:nowrap}
@media (max-width:639.98px){
  .create-invoice-wrapper .factura-actions{justify-content:flex-start!important;flex-wrap:wrap}
}

/* =========================================================
   AutorizApp Tailwind V9 - densidad, fichas y tablas
   ========================================================= */
:root{--aa-sidebar:#28256d;--aa-sidebar-hover:#201e57;--aa-head:#37328f}
/* Menos aire entre título/toolbar y tabla */
.botones-paraexportar{margin-top:.2rem!important;margin-bottom:.65rem!important;min-height:0!important;padding-top:0!important}
.titulo-modulo{font-size:1.05rem!important;line-height:1.3!important;font-weight:700!important;color:#29266d!important;margin:0 0 .55rem!important}
/* Hero/títulos de fichas más discretos */
.profile-hero,.provider-hero,.bank-hero{padding:1rem 1.15rem!important;border-radius:.8rem!important;box-shadow:0 4px 14px rgba(15,23,42,.08)!important;background:linear-gradient(135deg,#28256d 0%,#35318b 100%)!important}
.profile-hero:after,.provider-hero:after{display:none!important}
.profile-hero h1,.profile-hero h2,.profile-hero h3,.provider-hero h1,.provider-hero h2,.provider-hero h3,.bank-hero h1,.bank-hero h2,.bank-hero h3{font-size:1.35rem!important;line-height:1.25!important;margin-bottom:.2rem!important}
/* Tablas corporativas y compactas */
.aa-table thead th,.aa-table thead td{background:var(--aa-sidebar)!important;color:#fff!important;padding:.58rem .62rem!important}
.aa-table tbody td{padding:.58rem .62rem!important}
.aa-table-compact tbody td{padding:.46rem .58rem!important;line-height:1.25!important}
#tb_grupos tbody td,#tb_proveedores tbody td{padding:.48rem .58rem!important}
.acciones-inline,.factura-acciones{display:inline-flex!important;align-items:center!important;gap:.35rem!important;flex-wrap:nowrap!important}
/* Formulario superior de consulta/edición más compacto */
.create-invoice-wrapper{padding-top:.15rem!important}
.create-invoice-wrapper .div-espaciado{margin-bottom:.65rem!important}
.create-invoice-wrapper .aa-label{margin-bottom:.25rem!important;font-size:.78rem!important}
.create-invoice-wrapper .aa-input,.create-invoice-wrapper .aa-select{min-height:38px!important;height:38px!important;padding-top:.42rem!important;padding-bottom:.42rem!important}
/* El botón de factura automática queda cercano al selector */
.factura-auto-actions{margin-top:0!important;align-self:end!important}
/* Cabeceras de tarjetas/fichas */
.section-title,.card-title{color:var(--aa-sidebar)!important}
/* DataTables controles compactos */
.dataTables_wrapper .row:first-child{margin-bottom:.45rem!important}
.dataTables_filter,.dataTables_length{margin-bottom:.35rem!important}
@media(max-width:1024px){.profile-hero,.provider-hero,.bank-hero{padding:.85rem 1rem!important}.titulo-modulo{font-size:1rem!important}}

/* V9: ficha Mi Perfil más sobria y compacta */
.profile-hero .avatar-preview{width:108px!important;height:108px!important;border-radius:18px!important;border-width:3px!important;box-shadow:0 4px 12px rgba(0,0,0,.12)!important}
.profile-hero .profile-name{font-size:1.2rem!important}
.profile-hero .profile-sub{font-size:.84rem!important}
.profile-hero.mb-4{margin-bottom:.8rem!important}
.kpi-card .p-5{padding:.8rem 1rem!important}
.kpi-card .kpi-icon{width:38px!important;height:38px!important;border-radius:10px!important;font-size:1.1rem!important}
.kpi-card .kpi-value{font-size:1.05rem!important}
/* V9: encabezados DataTables más cercanos al contenido */
.rounded-xl>.p-5>.botones-paraexportar:first-child{margin-top:0!important}

/* V9: tarjetas de listados con toolbar más cercana al borde superior */
.p-5:has(> .botones-paraexportar){padding-top:.85rem!important}
.p-5:has(> .titulo-modulo + .botones-paraexportar){padding-top:.9rem!important}


/* =========================================================
   ENCABEZADOS PARA FICHAS Y DASHBOARDS
   AutorizApp Tailwind V10
   ---------------------------------------------------------
   Cambia SOLO estas variables para modificar a futuro el
   color de todos los encabezados principales del sistema.
   ========================================================= */
:root{
  --aa-ficha-bg:#3b4075;        /* Color principal del encabezado */
  --aa-ficha-bg-alt:#46537b;    /* Segundo tono, muy suave */
  --aa-ficha-text:#f8fafc;      /* Texto principal */
  --aa-ficha-muted:#d8ddeb;     /* Texto secundario */
  --aa-ficha-border:rgba(255,255,255,.12);
}

/* Una sola identidad visual para fichas y dashboards. */
.profile-hero,
.provider-hero,
.bank-hero,
.product-hero,
.expense-hero,
.dash-hero,
.cxp-hero,
.bi-hero{
  background:linear-gradient(120deg,var(--aa-ficha-bg) 0%,var(--aa-ficha-bg-alt) 100%)!important;
  color:var(--aa-ficha-text)!important;
  border:1px solid var(--aa-ficha-border)!important;
  box-shadow:0 5px 14px rgba(15,23,42,.08)!important;
}

.profile-hero *,
.provider-hero *,
.bank-hero *,
.product-hero *,
.expense-hero *,
.dash-hero *,
.cxp-hero *,
.bi-hero *{border-color:var(--aa-ficha-border)}

.profile-hero .text-muted,.profile-hero small,.profile-hero .profile-sub,
.provider-hero .text-muted,.provider-hero small,.provider-hero .hero-muted,
.bank-hero .text-muted,.bank-hero small,
.product-hero .text-muted,.product-hero small,
.expense-hero .text-muted,.expense-hero small,
.dash-hero p,.cxp-hero p,.bi-hero p{
  color:var(--aa-ficha-muted)!important;
}

/* Encabezados ejecutivos menos altos y menos protagonistas. */
.dash-hero,.cxp-hero,.bi-hero{padding:18px 20px!important;border-radius:18px!important}
.dash-hero h1,.cxp-hero h1,.bi-hero h1{font-size:1.45rem!important;line-height:1.2!important}
.dash-hero p,.cxp-hero p,.bi-hero p{margin-top:.35rem!important;font-size:.9rem!important}

/* Fichas de catálogo compactas. */
.product-hero,.expense-hero,.bank-hero,.provider-hero,.profile-hero{
  padding:14px 16px!important;
  border-radius:14px!important;
}


/* =========================================================
   IDENTIDAD VISUAL CENTRAL - AUTORIZAPP V11
   ---------------------------------------------------------
   Cambia SOLO estas variables para modificar en un solo lugar:
   - Encabezados de fichas y dashboards
   - Encabezados/títulos de tablas
   - Botones de exportación
   - Botones de consulta/acciones primarias que usan .aa-brand
   ========================================================= */
:root{
  --aa-brand-bg:#3b4075;          /* COLOR PRINCIPAL UNIFICADO */
  --aa-brand-hover:#323766;       /* Hover de botones */
  --aa-brand-text:#ffffff;        /* Texto sobre color principal */
  --aa-brand-muted:#d8ddeb;       /* Texto secundario en fichas */
  --aa-brand-border:rgba(255,255,255,.14);
}

/* Una sola clase visual para cualquier superficie corporativa. */
.aa-brand{
  background:var(--aa-brand-bg)!important;
  color:var(--aa-brand-text)!important;
  border-color:var(--aa-brand-bg)!important;
}
button.aa-brand:hover,a.aa-brand:hover,.btn.aa-brand:hover,.dt-button.aa-brand:hover{
  background:var(--aa-brand-hover)!important;
  border-color:var(--aa-brand-hover)!important;
  color:var(--aa-brand-text)!important;
}

/* Fichas y dashboards: misma clase/color que tablas y botones. */
.profile-hero.aa-brand,.provider-hero.aa-brand,.bank-hero.aa-brand,
.product-hero.aa-brand,.expense-hero.aa-brand,.dash-hero.aa-brand,
.cxp-hero.aa-brand,.bi-hero.aa-brand{
  background:var(--aa-brand-bg)!important;
  color:var(--aa-brand-text)!important;
  border:1px solid var(--aa-brand-border)!important;
}
.profile-hero.aa-brand small,.provider-hero.aa-brand small,.bank-hero.aa-brand small,
.product-hero.aa-brand small,.expense-hero.aa-brand small,
.dash-hero.aa-brand p,.cxp-hero.aa-brand p,.bi-hero.aa-brand p{
  color:var(--aa-brand-muted)!important;
}

/* Títulos/encabezados de tablas con la MISMA clase .aa-brand. */
thead.aa-brand th,thead.aa-brand td,
.aa-table thead.aa-brand th,.aa-table thead.aa-brand td{
  background:var(--aa-brand-bg)!important;
  color:var(--aa-brand-text)!important;
  border-color:var(--aa-brand-bg)!important;
}
/* Compatibilidad: incluso una tabla heredada sin thead marcado conserva la paleta. */
.aa-table thead th,.aa-table thead td,
.table thead th,.table thead td{
  background:var(--aa-brand-bg)!important;
  color:var(--aa-brand-text)!important;
}

/* DataTables/Bootstrap heredado: misma fuente de color central. */
.dt-buttons .btn,.dt-buttons .dt-button,
#dt-export-buttons .btn,#dt-export-buttons .dt-button,
#dt-export-tbdos .btn,#dt-export-tbdos .dt-button,
.btn-primary{
  background:var(--aa-brand-bg)!important;
  border-color:var(--aa-brand-bg)!important;
  color:var(--aa-brand-text)!important;
}
.dt-buttons .btn:hover,.dt-buttons .dt-button:hover,
#dt-export-buttons .btn:hover,#dt-export-buttons .dt-button:hover,
#dt-export-tbdos .btn:hover,#dt-export-tbdos .dt-button:hover,
.btn-primary:hover{
  background:var(--aa-brand-hover)!important;
  border-color:var(--aa-brand-hover)!important;
}

/* =========================================================
   AUTORIZAPP V12 - COMPONENTES DE EXPERIENCIA
   ---------------------------------------------------------
   1) Estados/badges unificados
   2) Columna de acciones sticky en tablas
   3) Switch profesional de tema en sidebar
   4) Vista previa de factura automática
   ========================================================= */

/* Estados: la clase se asigna automáticamente desde los menús compartidos. */
.aa-status-badge{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:.35rem!important;padding:.28rem .62rem!important;border-radius:999px!important;
  font-size:.72rem!important;line-height:1rem!important;font-weight:750!important;
  border:1px solid transparent!important;white-space:nowrap!important;
  background:#eef2ff!important;color:#3730a3!important;
}
.aa-status-pending{background:#fff7ed!important;color:#9a3412!important;border-color:#fed7aa!important}
.aa-status-process{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
.aa-status-success{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important}
.aa-status-danger{background:#fff1f2!important;color:#be123c!important;border-color:#fecdd3!important}
.aa-status-info{background:#f0f9ff!important;color:#0369a1!important;border-color:#bae6fd!important}
.aa-status-neutral{background:#f1f5f9!important;color:#475569!important;border-color:#cbd5e1!important}

/* Tablas con acciones: el JS compartido agrega .aa-table-sticky-actions cuando
   la última columna es Acciones, Documentos o Permisos. */
.aa-table-sticky-actions{border-collapse:separate!important;border-spacing:0!important}
.aa-table-sticky-actions thead th:last-child,
.aa-table-sticky-actions thead td:last-child{
  position:sticky!important;right:0!important;z-index:6!important;
  background:var(--aa-brand-bg)!important;color:var(--aa-brand-text)!important;
  box-shadow:-7px 0 10px -10px rgba(15,23,42,.55)!important;
}
.aa-table-sticky-actions tbody td:last-child{
  position:sticky!important;right:0!important;z-index:4!important;background:#fff!important;
  box-shadow:-7px 0 10px -10px rgba(15,23,42,.28)!important;
}
.aa-table-sticky-actions tbody tr:hover td:last-child{background:#f8fafc!important}

/* Switch claro / oscuro del sidebar */
.aa-theme-switch-wrap{display:flex;justify-content:center;padding:0 .9rem .85rem}
.aa-theme-toggle{
  width:100%;max-width:196px;min-height:38px;padding:.4rem .65rem;border-radius:999px;
  display:flex;align-items:center;justify-content:space-between;gap:.55rem;cursor:pointer;
  border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.07);color:#e8e7ff;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.aa-theme-toggle:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.24)}
.aa-theme-toggle .aa-theme-icon{
  width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  background:#fff;color:#28256d;box-shadow:0 2px 7px rgba(0,0,0,.14);flex:0 0 auto
}
.aa-theme-toggle .aa-theme-label{font-size:.78rem;font-weight:650;white-space:nowrap}
.aa-theme-toggle .aa-theme-track{width:31px;height:17px;border-radius:999px;background:#7775ad;position:relative;flex:0 0 auto}
.aa-theme-toggle .aa-theme-track:after{content:"";position:absolute;width:11px;height:11px;left:3px;top:3px;border-radius:50%;background:#fff;transition:transform .18s ease}
html.aa-dark .aa-theme-toggle .aa-theme-track{background:#34d399}
html.aa-dark .aa-theme-toggle .aa-theme-track:after{transform:translateX(14px)}
html.aa-dark .aa-theme-toggle .aa-theme-icon{background:#182136;color:#facc15}
@media (min-width:992px){
  .page-wrapper.pinned:not(.sidebar-hovered) .aa-theme-switch-wrap{padding:.1rem 0 .85rem}
  .page-wrapper.pinned:not(.sidebar-hovered) .aa-theme-toggle{width:44px;height:44px;min-height:44px;padding:0;justify-content:center}
  .page-wrapper.pinned:not(.sidebar-hovered) .aa-theme-toggle .aa-theme-label,
  .page-wrapper.pinned:not(.sidebar-hovered) .aa-theme-toggle .aa-theme-track{display:none}
}

/* Vista previa CFDI antes de crear la provisión */
.aa-cfdi-preview{border:1px solid #dbe4ee;border-radius:14px;background:#fff;overflow:hidden}
.aa-cfdi-preview-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.aa-cfdi-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;padding:1rem}
.aa-cfdi-kpi{border:1px solid #e2e8f0;border-radius:10px;padding:.65rem .75rem;background:#fff}
.aa-cfdi-kpi span{display:block;font-size:.68rem;letter-spacing:.045em;text-transform:uppercase;color:#64748b;font-weight:700}
.aa-cfdi-kpi strong{display:block;margin-top:.15rem;color:#0f172a;font-size:.93rem}
.aa-cfdi-preview table{font-size:.79rem}
.aa-cfdi-preview-actions{display:flex;align-items:center;justify-content:flex-end;gap:.65rem;padding:.85rem 1rem;border-top:1px solid #e2e8f0;background:#f8fafc}
@media(max-width:1023.98px){.aa-cfdi-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639.98px){.aa-cfdi-preview-grid{grid-template-columns:1fr}.aa-cfdi-preview-actions{flex-direction:column;align-items:stretch}}
