:root{
  --brand-primary:#dc2626;
  --brand-secondary:#111827;
  --brand-primary-rgb:220,38,38;
  --brand-accent:#f59e0b;
  --admin-sidebar:#070a11;
  --admin-bg:#f4f6fa;
  --admin-text:#111827;
  --admin-muted:#64748b;
  --admin-line:#e5e7eb;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body.admin-premium{margin:0;font-family:Inter,system-ui,sans-serif;background:var(--admin-bg);color:var(--admin-text)}
.admin-shell{min-height:100vh;display:flex}.premium-sidebar{position:fixed;inset:0 auto 0 0;width:274px;background:radial-gradient(circle at 15% 5%,rgba(var(--brand-primary-rgb),.2),transparent 22%),linear-gradient(180deg,var(--admin-sidebar),#0d111b 58%,#07090e);color:#fff;z-index:60;display:flex;flex-direction:column;border-right:1px solid rgba(255,255,255,.07);transition:.22s ease}.premium-content{margin-left:274px;min-height:100vh;width:calc(100% - 274px);display:flex;flex-direction:column;transition:.22s ease}.admin-shell.sidebar-collapsed .premium-sidebar{width:86px}.admin-shell.sidebar-collapsed .premium-content{margin-left:86px;width:calc(100% - 86px)}
.premium-brand{height:84px;padding:17px 18px;display:flex;align-items:center;gap:12px;border-bottom:1px solid rgba(255,255,255,.08)}.premium-brand-logo,.premium-brand-mark{width:47px;height:47px;border-radius:16px;background:#fff;display:grid;place-items:center;overflow:hidden;flex:none;box-shadow:0 12px 30px rgba(0,0,0,.25)}.premium-brand-logo img{width:100%;height:100%;object-fit:contain;padding:5px}.premium-brand-mark{background:linear-gradient(135deg,var(--brand-primary),#8a0909);color:#fff}.brand-copy{min-width:0}.brand-name{display:block;font-size:1rem;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-role{display:block;font-size:.72rem;color:#94a3b8;margin-top:3px}.premium-sidebar-nav{padding:12px;overflow-y:auto;flex:1}.sidebar-section{font-size:.64rem;text-transform:uppercase;letter-spacing:.18em;font-weight:900;color:#64748b;margin:16px 10px 7px}.sidebar-link{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:14px;color:#cbd5e1;text-decoration:none;font-size:.88rem;font-weight:700;margin-bottom:3px;transition:.18s ease}.sidebar-link i{font-size:1rem}.sidebar-link:hover,.sidebar-link.active{background:linear-gradient(135deg,rgba(var(--brand-primary-rgb),.25),rgba(255,255,255,.06));color:#fff;box-shadow:inset 3px 0 0 var(--brand-primary)}.sidebar-footer{padding:12px;border-top:1px solid rgba(255,255,255,.08)}.admin-shell.sidebar-collapsed .brand-copy,.admin-shell.sidebar-collapsed .nav-label,.admin-shell.sidebar-collapsed .sidebar-section{display:none}.admin-shell.sidebar-collapsed .sidebar-link{justify-content:center}.admin-shell.sidebar-collapsed .premium-brand{justify-content:center;padding-inline:10px}
.premium-topbar{position:sticky;top:0;z-index:45;height:84px;background:rgba(255,255,255,.92);backdrop-filter:blur(18px);border-bottom:1px solid rgba(15,23,42,.08);display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:18px}.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px}.sidebar-toggle,.mobile-menu-toggle,.topbar-icon-btn,.topbar-quick-link{height:44px;min-width:44px;border-radius:14px;border:1px solid #e2e8f0;background:#fff;color:#334155;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-weight:800;padding:0 13px;cursor:pointer}.mobile-menu-toggle{display:none}.topbar-quick-link:hover,.sidebar-toggle:hover,.topbar-icon-btn:hover{border-color:rgba(var(--brand-primary-rgb),.3);color:var(--brand-primary);background:#fff7f7}.premium-page-eyebrow{display:block;font-size:.66rem;text-transform:uppercase;letter-spacing:.16em;color:#94a3b8;font-weight:900}.premium-page-title{font-size:1.35rem;line-height:1.2;margin:3px 0 0;font-weight:900}.premium-user-chip{display:flex;align-items:center;gap:10px;padding:6px 11px 6px 6px;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.premium-avatar{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,var(--brand-primary),#991b1b);color:#fff;display:grid;place-items:center}.premium-user-name{display:block;font-size:.82rem;font-weight:900}.premium-user-role{display:block;font-size:.68rem;color:#64748b}.topbar-dropdown{position:relative}.topbar-dropdown-menu{position:absolute;right:0;top:52px;min-width:190px;padding:8px;border-radius:16px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 20px 50px rgba(15,23,42,.14)}.topbar-dropdown-menu a{display:flex;gap:9px;align-items:center;padding:10px;border-radius:11px;text-decoration:none;color:#334155;font-size:.86rem;font-weight:700}.topbar-dropdown-menu a:hover{background:#fff1f2;color:#b91c1c}.hidden{display:none!important}
.admin-main{padding:26px;flex:1}.premium-footer{min-height:54px;padding:12px 26px;border-top:1px solid #e2e8f0;background:#fff;color:#64748b;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:.78rem}.premium-footer-links{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.premium-footer a{color:#475569;text-decoration:none}.premium-footer a:hover{color:var(--brand-primary)}.premium-footer-status{padding:.35rem .65rem;border-radius:999px;background:#f1f5f9;color:#475569;font-weight:700}
.premium-card{background:#fff;border:1px solid #e5e7eb;border-radius:24px;box-shadow:0 18px 45px rgba(15,23,42,.07);overflow:hidden}.premium-card-header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:20px 22px;border-bottom:1px solid #eef2f7}.premium-icon{width:46px;height:46px;border-radius:15px;background:linear-gradient(135deg,var(--brand-primary),#991b1b);color:#fff;display:grid;place-items:center;box-shadow:0 12px 28px rgba(var(--brand-primary-rgb),.2)}.premium-kpi{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:20px;box-shadow:0 15px 38px rgba(15,23,42,.06);overflow:hidden}.premium-kpi::before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(var(--brand-primary),#111827)}.premium-kpi-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;color:#64748b;font-weight:900}.premium-kpi-value{font-size:2rem;font-weight:900;letter-spacing:-.04em;margin-top:8px}.premium-kpi-icon{position:absolute;right:17px;bottom:13px;font-size:2.8rem;color:rgba(var(--brand-primary-rgb),.11)}.dashboard-quick-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;padding:20px}.dashboard-quick-actions a{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;border-radius:16px;padding:14px;text-decoration:none;color:#334155;font-weight:800;background:#fff}.dashboard-quick-actions a:hover{border-color:rgba(var(--brand-primary-rgb),.25);color:var(--brand-primary);transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.08)}
.premium-alert{border-radius:16px;padding:14px 16px;display:flex;gap:12px;align-items:flex-start}.premium-alert-danger{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}.premium-alert-info{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af}.premium-alert-success{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46}
.table-bordered-cells{border-collapse:separate;border-spacing:0;width:100%}.table-bordered-cells thead th{background:#0f172a;color:#fff;font-weight:800;padding:12px}.table-bordered-cells tbody td{padding:12px;border-bottom:1px solid #eef2f7}.table-bordered-cells tbody tr:hover{background:#f8fafc}.dataTables_wrapper{font-size:.88rem}.dataTables_wrapper .dataTables_length select,.dataTables_wrapper .dataTables_filter input{border:1px solid #d1d5db;border-radius:10px;padding:.45rem .65rem}.dataTables_wrapper .dataTables_paginate .paginate_button{border-radius:10px!important}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{background:var(--brand-primary)!important;color:#fff!important;border-color:var(--brand-primary)!important}
.modal-panel,.bg-white.rounded-lg.shadow-xl{border-radius:24px!important;box-shadow:0 28px 80px rgba(15,23,42,.2)!important}.select2-container--default .select2-selection--single,.select2-container--default .select2-selection--multiple{border:1px solid #d1d5db!important;border-radius:12px!important;min-height:42px!important}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:40px!important}.select2-container--default .select2-selection--single .select2-selection__arrow{height:40px!important}
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(2,6,23,.58);z-index:55}.sidebar-overlay.active{display:block}
@media(max-width:1024px){.premium-sidebar{transform:translateX(-100%)}.premium-sidebar.mobile-open{transform:translateX(0)}.premium-content,.admin-shell.sidebar-collapsed .premium-content{margin-left:0;width:100%}.mobile-menu-toggle{display:inline-flex}.sidebar-toggle{display:none}.link-label,.premium-user-copy{display:none}.admin-main{padding:18px}.premium-topbar{padding:0 16px}.premium-footer{padding:12px 18px;flex-direction:column;align-items:flex-start}}
@media(max-width:640px){.premium-page-title{font-size:1.05rem}.premium-page-eyebrow{display:none}.premium-topbar{height:72px}.topbar-right{gap:7px}.topbar-quick-link{padding:0;min-width:42px}.admin-main{padding:14px}.premium-footer-links{gap:8px}.premium-footer-status{display:none}}

/* Corrección visual profesional: cabeceras compactas y herramientas agrupadas */
.premium-brand{height:70px;padding:12px 16px}.premium-brand-logo,.premium-brand-mark{width:42px;height:42px;border-radius:13px}.premium-sidebar{width:248px}.premium-content{margin-left:248px;width:calc(100% - 248px)}.admin-shell.sidebar-collapsed .premium-sidebar{width:78px}.admin-shell.sidebar-collapsed .premium-content{margin-left:78px;width:calc(100% - 78px)}
.premium-topbar{height:68px;padding:0 20px;gap:12px}.sidebar-toggle,.mobile-menu-toggle,.topbar-icon-btn,.topbar-quick-link{height:38px;min-width:38px;border-radius:11px;padding:0 11px}.premium-page-title{font-size:1.08rem;margin:0;line-height:1.15}.premium-page-eyebrow{font-size:.59rem;margin-top:3px;letter-spacing:.13em}.premium-avatar{width:32px;height:32px;border-radius:10px}.premium-user-chip{padding:4px 9px 4px 4px;border-radius:13px}.premium-user-name{font-size:.77rem}.premium-user-role{font-size:.62rem}.admin-main{padding:18px 20px}.premium-footer{min-height:44px;padding:9px 20px}

.module-shell{width:100%;max-width:1440px;margin:0 auto;color:#1e293b}.module-stack{display:flex;flex-direction:column;gap:16px}.module-head{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:16px 18px;box-shadow:0 8px 24px rgba(15,23,42,.045)}.module-head-copy{min-width:0}.module-kicker{display:flex;align-items:center;gap:7px;color:var(--brand-primary);font-size:.68rem;text-transform:uppercase;letter-spacing:.13em;font-weight:900}.module-title{font-size:1.35rem;line-height:1.2;font-weight:900;color:#0f172a;margin:4px 0 0}.module-description{color:#64748b;font-size:.85rem;line-height:1.55;margin:5px 0 0;max-width:820px}.module-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.module-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;border-radius:11px;padding:0 14px;font-size:.82rem;font-weight:800;border:1px solid transparent;transition:.16s ease;text-decoration:none}.module-btn-primary{background:var(--brand-primary);color:#fff;box-shadow:0 8px 20px rgba(var(--brand-primary-rgb),.18)}.module-btn-primary:hover{filter:brightness(.96);transform:translateY(-1px)}.module-btn-secondary{background:#fff;border-color:#dbe2ea;color:#334155}.module-btn-secondary:hover{background:#f8fafc;border-color:#cbd5e1}.module-btn-danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}
.module-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 8px 26px rgba(15,23,42,.045)}.module-card-body{padding:16px 18px}.module-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:15px 17px;border-bottom:1px solid #edf1f5;background:#fbfcfe;border-radius:18px 18px 0 0}.module-toolbar-group{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.module-field{display:flex;flex-direction:column;gap:5px;min-width:150px}.module-field.flex-grow{flex:1;min-width:230px}.module-label{font-size:.69rem;line-height:1.2;color:#64748b;text-transform:uppercase;letter-spacing:.08em;font-weight:900}.module-help{font-size:.72rem;line-height:1.45;color:#94a3b8;margin-top:5px}.module-control{width:100%;height:40px;border:1px solid #cfd8e3;border-radius:10px;background:#fff;color:#1e293b;padding:0 11px;font-size:.84rem;outline:none;transition:.16s ease}.module-control:focus{border-color:var(--brand-primary);box-shadow:0 0 0 3px rgba(var(--brand-primary-rgb),.09)}textarea.module-control{height:auto;min-height:92px;padding-top:10px;resize:vertical}.module-search{position:relative;min-width:250px}.module-search .module-control{padding-left:35px}.module-search i{position:absolute;left:12px;bottom:12px;color:#94a3b8;font-size:.85rem}
.module-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.module-summary-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:#475569;font-size:.75rem;font-weight:700}.module-summary-chip strong{color:#0f172a}.module-summary-chip i{color:var(--brand-primary)}
.module-table-wrap{overflow:auto}.module-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.82rem}.module-table thead th{position:sticky;top:0;z-index:1;padding:11px 12px;background:#f8fafc;color:#64748b;border-bottom:1px solid #dfe6ee;text-align:left;text-transform:uppercase;letter-spacing:.065em;font-size:.66rem;font-weight:900;white-space:nowrap}.module-table tbody td{padding:11px 12px;border-bottom:1px solid #edf1f5;vertical-align:middle}.module-table tbody tr:hover{background:#fbfcfe}.module-table tbody tr:last-child td{border-bottom:0}.module-row-title{font-weight:800;color:#0f172a}.module-row-sub{display:block;font-size:.72rem;color:#64748b;margin-top:3px}.module-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:.7rem;font-weight:800;white-space:nowrap}.module-badge-success{background:#ecfdf5;color:#047857}.module-badge-danger{background:#fff1f2;color:#be123c}.module-badge-warning{background:#fffbeb;color:#b45309}.module-badge-neutral{background:#f1f5f9;color:#475569}.module-icon-btn{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:.15s ease}.module-icon-btn-edit{background:#fffbeb;color:#b45309}.module-icon-btn-edit:hover{border-color:#fde68a}.module-icon-btn-danger{background:#fff1f2;color:#be123c}.module-icon-btn-danger:hover{border-color:#fecdd3}.module-icon-btn-success{background:#ecfdf5;color:#047857}.module-icon-btn-success:hover{border-color:#a7f3d0}
.module-empty{padding:34px 20px;text-align:center;color:#64748b}.module-empty i{font-size:1.8rem;color:#cbd5e1;margin-bottom:10px}.module-empty strong{display:block;color:#334155;margin-bottom:4px}
.module-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.52);backdrop-filter:blur(5px)}.module-modal.hidden{display:none!important}.module-modal-panel{width:100%;max-width:760px;max-height:92vh;display:flex;flex-direction:column;background:#fff;border-radius:20px;box-shadow:0 28px 85px rgba(15,23,42,.25);overflow:hidden}.module-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 20px;border-bottom:1px solid #e8edf3}.module-modal-title{font-size:1.2rem;line-height:1.25;font-weight:900;color:#0f172a;margin:0}.module-modal-description{font-size:.8rem;line-height:1.5;color:#64748b;margin:5px 0 0}.module-modal-close{width:36px;height:36px;border-radius:10px;background:#f1f5f9;color:#475569;display:grid;place-items:center;font-size:1.15rem;flex:none}.module-modal-body{padding:18px 20px;overflow:auto}.module-modal-footer{display:flex;justify-content:flex-end;gap:9px;padding:14px 20px;border-top:1px solid #e8edf3;background:#fbfcfe}.module-form-section{border:1px solid #e2e8f0;border-radius:14px;padding:14px}.module-form-section+.module-form-section{margin-top:13px}.module-form-section-title{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:900;color:#0f172a;margin-bottom:12px}.module-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.module-form-grid .full{grid-column:1/-1}.module-guide{display:flex;align-items:flex-start;gap:9px;padding:11px 12px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569;font-size:.77rem;line-height:1.5}.module-guide i{color:var(--brand-primary);margin-top:2px}
.dataTables_wrapper .dataTables_length{font-size:.76rem;color:#64748b}.dataTables_wrapper .dataTables_length select{height:36px!important;padding:0 26px 0 9px!important}.dataTables_wrapper .dataTables_info{font-size:.76rem;color:#64748b;padding-top:12px!important}.dataTables_wrapper .dataTables_paginate{padding-top:8px!important}.dataTables_wrapper .dataTables_paginate .paginate_button{padding:.35rem .58rem!important;font-size:.75rem!important}
@media(max-width:1024px){.premium-content,.admin-shell.sidebar-collapsed .premium-content{margin-left:0;width:100%}.admin-main{padding:15px}.premium-topbar{padding:0 14px}.module-head{align-items:flex-start}.module-toolbar{align-items:stretch}.module-toolbar-group{width:100%}.module-search{flex:1}}
@media(max-width:700px){.module-head{flex-direction:column}.module-actions{width:100%;justify-content:flex-start}.module-toolbar{flex-direction:column;align-items:stretch}.module-toolbar-group{flex-direction:column;align-items:stretch}.module-field,.module-search{width:100%;min-width:0}.module-form-grid{grid-template-columns:1fr}.module-form-grid .full{grid-column:auto}.module-modal{padding:8px}.module-modal-panel{max-height:96vh;border-radius:16px}.premium-topbar{height:64px}.admin-main{padding:12px}}

/* ==========================================================
   Fases 6 y 7: adaptación profesional para módulos heredados
   ========================================================== */
.module-context-strip{
  display:flex;align-items:flex-start;gap:12px;margin:0 0 14px;padding:12px 14px;
  border:1px solid #e2e8f0;border-radius:15px;background:rgba(255,255,255,.86);
  box-shadow:0 6px 20px rgba(15,23,42,.035)
}
.module-context-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;background:#fff1f2;color:var(--brand-primary);border:1px solid #fecdd3}
.module-context-copy span{display:block;font-size:.64rem;line-height:1.2;text-transform:uppercase;letter-spacing:.13em;font-weight:900;color:var(--brand-primary)}
.module-context-copy p{margin:4px 0 0;color:#64748b;font-size:.8rem;line-height:1.5}
.legacy-module-root{width:100%!important;max-width:1440px!important;margin:0 auto!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important}
.legacy-module-toolbar{
  display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;
  padding:13px 14px!important;margin-bottom:14px!important;border:1px solid #e2e8f0!important;border-radius:15px!important;background:#fff!important;
  box-shadow:0 7px 22px rgba(15,23,42,.04)!important
}
.legacy-module-toolbar>div{margin-top:0!important}
.legacy-search-wrap{position:relative!important;min-width:260px!important;max-width:420px!important;flex:1 1 280px!important}
.legacy-search-wrap .module-control{height:39px!important;border-radius:10px!important;border:1px solid #cfd8e3!important;background:#fff!important;padding-left:34px!important;font-size:.82rem!important;box-shadow:none!important}
.legacy-search-wrap>div,.legacy-search-wrap>i{left:11px!important}
.legacy-professional-card{
  background:#fff!important;border:1px solid #e2e8f0!important;border-radius:17px!important;
  box-shadow:0 8px 24px rgba(15,23,42,.045)!important;padding:15px!important;margin-bottom:14px!important
}
.legacy-table-wrap{overflow:auto!important;border:1px solid #e2e8f0!important;border-radius:15px!important;background:#fff!important}
.legacy-professional-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important;font-size:.8rem!important}
.legacy-professional-table thead th{
  background:#f8fafc!important;color:#64748b!important;border-bottom:1px solid #dfe6ee!important;
  padding:10px 11px!important;text-transform:uppercase!important;letter-spacing:.06em!important;font-size:.64rem!important;font-weight:900!important;white-space:nowrap!important
}
.legacy-professional-table tbody td{padding:10px 11px!important;border-bottom:1px solid #edf1f5!important;vertical-align:middle!important}
.legacy-professional-table tbody tr:hover{background:#fbfcfe!important}.legacy-professional-table tbody tr:last-child td{border-bottom:0!important}
.legacy-filter-form{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:10px!important;align-items:end!important;
  padding:12px!important;border:1px solid #e2e8f0!important;border-radius:13px!important;background:#fbfcfe!important;margin-bottom:12px!important
}
.legacy-filter-form>div{margin:0!important;min-width:0!important}.legacy-filter-form .self-end{align-self:end!important;display:flex!important;gap:8px!important}
.legacy-label{font-size:.7rem!important;line-height:1.2!important;color:#64748b!important;text-transform:uppercase!important;letter-spacing:.055em!important;font-weight:900!important;margin-bottom:5px!important}
.legacy-control{
  width:100%!important;min-height:39px!important;border:1px solid #cfd8e3!important;border-radius:10px!important;background:#fff!important;
  color:#1e293b!important;padding:8px 10px!important;font-size:.82rem!important;outline:none!important;box-shadow:none!important
}
.legacy-control:focus{border-color:var(--brand-primary)!important;box-shadow:0 0 0 3px rgba(var(--brand-primary-rgb),.09)!important}
textarea.legacy-control{min-height:88px!important;resize:vertical!important}
.auto-field-help{font-size:.69rem;line-height:1.45;color:#94a3b8;margin:5px 0 0}
.legacy-action-primary,.legacy-action-secondary{
  min-height:38px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  border-radius:10px!important;padding:0 13px!important;font-size:.78rem!important;font-weight:800!important;text-decoration:none!important
}
.legacy-action-primary{background:var(--brand-primary)!important;color:#fff!important;border:1px solid var(--brand-primary)!important;box-shadow:0 7px 18px rgba(var(--brand-primary-rgb),.16)!important}
.legacy-action-secondary{background:#fff!important;color:#334155!important;border:1px solid #dbe2ea!important}
.legacy-modal-overlay{background:rgba(15,23,42,.5)!important;backdrop-filter:blur(5px)!important;padding:12px!important;align-items:center!important}
.legacy-modal-panel{
  width:100%!important;max-width:760px!important;max-height:92vh!important;background:#fff!important;border-radius:18px!important;
  box-shadow:0 28px 80px rgba(15,23,42,.22)!important;padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important
}
.legacy-modal-header{padding:15px 18px!important;margin:0!important;border-bottom:1px solid #e8edf3!important;align-items:flex-start!important;flex:none!important}
.legacy-modal-title-copy{min-width:0}.legacy-modal-header h2,.legacy-modal-header h3,.legacy-modal-header h4{font-size:1.1rem!important;line-height:1.25!important;color:#0f172a!important;font-weight:900!important;margin:0!important}
.legacy-modal-guide{font-size:.75rem;line-height:1.45;color:#64748b;margin:5px 0 0;max-width:620px}
.legacy-modal-form{overflow:auto!important;padding:16px 18px!important;margin:0!important;display:block!important}
.legacy-modal-form>div{margin-bottom:12px}.legacy-modal-form .grid{gap:11px!important}
.legacy-modal-form .flex.justify-end{position:sticky;bottom:-16px;margin:14px -18px -16px!important;padding:12px 18px!important;background:#fbfcfe!important;border-top:1px solid #e8edf3!important;z-index:2}
.report-section-card{padding:15px!important;margin-bottom:14px!important;border:1px solid #e2e8f0!important;border-radius:17px!important;background:#fff!important;box-shadow:0 8px 24px rgba(15,23,42,.04)!important}
.report-section-title{font-size:1rem!important;line-height:1.25!important;color:#0f172a!important;font-weight:900!important;margin-bottom:10px!important;border:0!important;padding:0!important}
.report-filter-bar{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:10px!important;align-items:end!important;margin-bottom:12px!important;padding:11px!important;border-radius:12px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important}
.report-filter-bar>div{margin:0!important;min-width:0!important}.report-filter-bar .self-end{display:flex!important;align-items:center!important;gap:7px!important}
.roles-professional-grid{gap:14px!important}.roles-professional-grid>div{border:1px solid #e2e8f0!important;border-radius:16px!important;box-shadow:0 8px 24px rgba(15,23,42,.04)!important}
.admin-modules-polished .dataTables_wrapper .dataTables_filter{display:none!important}
.admin-modules-polished .dataTables_wrapper .dataTables_length{margin:0 0 8px!important}
.admin-modules-polished .dataTables_wrapper .dataTables_paginate .paginate_button{border-radius:8px!important;padding:.3rem .5rem!important;font-size:.72rem!important}
.admin-modules-polished .bg-red-100.border-l-4,.admin-modules-polished .bg-green-100,.admin-modules-polished .bg-yellow-100{border-radius:11px!important;box-shadow:none!important}
.admin-modules-polished h2.text-2xl,.admin-modules-polished h2.text-xl,.admin-modules-polished h3.text-lg{letter-spacing:-.015em}

/* Ajustes específicos por módulo */
body[data-page="gestionar_asuntos.php"] .asuntos-pro-v4 .hero-asuntos-v4{display:none!important}
body[data-page="gestionar_asuntos.php"] .metric-card-v4{box-shadow:0 7px 20px rgba(15,23,42,.04)!important;border-radius:15px!important}
body[data-page="configurar_marca.php"] .brand-settings-layout{gap:14px!important}
body[data-page="configurar_marca.php"] .brand-settings-section{border-radius:16px!important;box-shadow:0 8px 24px rgba(15,23,42,.04)!important}
body[data-page="gestionar_reportes.php"] .legacy-module-root,body[data-page="mis_reportes.php"] .legacy-module-root{max-width:1500px!important}

@media(max-width:820px){
  .module-context-strip{padding:11px 12px}.legacy-module-toolbar{align-items:stretch!important}.legacy-search-wrap{min-width:0!important;max-width:none!important;width:100%!important}
  .legacy-filter-form,.report-filter-bar{grid-template-columns:1fr!important}.legacy-modal-overlay{padding:6px!important}.legacy-modal-panel{max-height:96vh!important;border-radius:14px!important}
}


/* AFENIXX-SIDEBAR-SCROLL-20260724 */
.premium-sidebar{
    overflow:hidden;
}

.premium-sidebar-nav{
    min-height:0;
    flex:1 1 auto;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-bottom:30px;
    scrollbar-width:thin;
    scrollbar-color:
        var(--admin-sidebar)
        var(--admin-sidebar);
}

.premium-sidebar-nav::-webkit-scrollbar{
    width:7px;
}

.premium-sidebar-nav::-webkit-scrollbar-track{
    background:var(--admin-sidebar);
}

.premium-sidebar-nav::-webkit-scrollbar-thumb{
    border:2px solid var(--admin-sidebar);
    border-radius:999px;
    background:var(--admin-sidebar);
}

.premium-sidebar-nav:hover::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.09);
}

.sidebar-footer{
    position:relative;
    z-index:3;
    flex:0 0 auto;
    margin-top:auto;
    padding:14px 12px 18px;
    border-top:1px solid rgba(255,255,255,.08);
    background:
        linear-gradient(
            180deg,
            color-mix(
                in srgb,
                var(--admin-sidebar) 96%,
                #000
            ),
            var(--admin-sidebar)
        );
    box-shadow:0 -15px 28px rgba(0,0,0,.12);
}

.sidebar-footer .sidebar-link{
    margin:0;
}
