/* v180_6_24_6 - ATENEA Enterprise dark rootfix final
   Carga obligatoria al final del HEAD y antes de </body>. Corrige filas blancas residuales por Bootstrap,
   nth-child legacy, background inline y variables --bs-table-* en admin/secretaria/directivo/superadmin.
*/
:root{--ed-bg:#050b16;--ed-panel:#071426;--ed-panel-2:#0b1b31;--ed-head:#0d1a2f;--ed-row:#071426;--ed-row-alt:#0b1e35;--ed-row-hover:#12345a;--ed-line:#244767;--ed-line-soft:rgba(96,165,250,.32);--ed-text:#f8fbff;--ed-text-soft:#dbeafe;--ed-muted:#a9c6ea;--ed-blue:#3b82f6;--ed-blue-2:#2563eb}
html,body{background:#050b16!important;color:#f8fbff!important;color-scheme:dark!important}
body,.container,.page,main,.main,.content,.admin-view,.secretaria-view,.directivo-view,.superadmin-view{background:#050b16!important;color:#f8fbff!important}
.admin-view,.secretaria-view,.directivo-view,.superadmin-view,.panel-card,.card,.kpi,.notice,.hero-side,.sa-panel,.sa-card{background:#071426!important;color:#f8fbff!important;border-color:var(--ed-line-soft)!important}
/* Kill light surfaces even when legacy CSS loads later */
.bg-white,.bg-light,.table-light,.table-white,.text-bg-light,.list-group-item,.dropdown-menu,.modal,.modal-content,.offcanvas,[class*="bg-white"],[class*="bg-light"],
[style*="background:#fff"],[style*="background: #fff"],[style*="background:#ffffff"],[style*="background: #ffffff"],[style*="background:white"],[style*="background: white"],
[style*="background-color:#fff"],[style*="background-color: #fff"],[style*="background-color:#ffffff"],[style*="background-color: #ffffff"],[style*="background-color:white"],[style*="background-color: white"]{background:#071426!important;background-color:#071426!important;color:#f8fbff!important;-webkit-text-fill-color:#f8fbff!important;border-color:var(--ed-line-soft)!important}
/* Tables: set bg on CELLS, not only rows. This is what removes the visible white bands. */
.table-wrap,.table-responsive,.mobile-table-scroll,.responsive-table,.sa-table-wrap{background:#071426!important;border:1px solid var(--ed-line-soft)!important;border-radius:16px!important;overflow:auto!important}
table,.table,.sa-table,.enterprise-table{--bs-table-bg:#071426!important;--bs-table-color:#f8fbff!important;--bs-table-striped-bg:#0b1e35!important;--bs-table-striped-color:#f8fbff!important;--bs-table-active-bg:#12345a!important;--bs-table-active-color:#f8fbff!important;--bs-table-hover-bg:#12345a!important;--bs-table-hover-color:#f8fbff!important;--bs-table-border-color:#244767!important;background:#071426!important;color:#f8fbff!important;border-color:#244767!important;border-collapse:separate!important;border-spacing:0!important;width:100%}
table thead,table thead tr,.table thead,.table thead tr,.enterprise-table thead,.enterprise-table thead tr{background:#0d1a2f!important;background-color:#0d1a2f!important;color:#fff!important}
table th,.table th,.enterprise-table th{background:#0d1a2f!important;background-color:#0d1a2f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#244767!important;font-weight:900!important;text-shadow:none!important}
table tbody,.table tbody,.enterprise-table tbody{background:#071426!important;background-color:#071426!important;color:#f8fbff!important}
table tbody tr,.table tbody tr,.enterprise-table tbody tr{background:#071426!important;background-color:#071426!important;color:#f8fbff!important}
table tbody tr:nth-child(odd),.table tbody tr:nth-child(odd),.enterprise-table tbody tr:nth-child(odd){background:#071426!important;background-color:#071426!important}
table tbody tr:nth-child(even),.table tbody tr:nth-child(even),.enterprise-table tbody tr:nth-child(even){background:#0b1e35!important;background-color:#0b1e35!important}
table tbody tr:hover,.table tbody tr:hover,.enterprise-table tbody tr:hover{background:#12345a!important;background-color:#12345a!important}
table tbody tr>td,table tbody tr>th,.table tbody tr>td,.table tbody tr>th,.enterprise-table tbody tr>td,.enterprise-table tbody tr>th,
.table-striped>tbody>tr:nth-of-type(odd)>*,.table-striped>tbody>tr:nth-of-type(even)>*,.table-hover>tbody>tr:hover>*,.table>:not(caption)>*>*{background:transparent!important;background-color:transparent!important;color:#f8fbff!important;-webkit-text-fill-color:#f8fbff!important;border-color:#244767!important;box-shadow:none!important;text-shadow:none!important}
table tbody tr:nth-child(odd)>td,table tbody tr:nth-child(odd)>th,.table tbody tr:nth-child(odd)>td,.table tbody tr:nth-child(odd)>th,.enterprise-table tbody tr:nth-child(odd)>td{background:#071426!important;background-color:#071426!important}
table tbody tr:nth-child(even)>td,table tbody tr:nth-child(even)>th,.table tbody tr:nth-child(even)>td,.table tbody tr:nth-child(even)>th,.enterprise-table tbody tr:nth-child(even)>td{background:#0b1e35!important;background-color:#0b1e35!important}
table tbody tr:hover>td,table tbody tr:hover>th,.table tbody tr:hover>td,.table tbody tr:hover>th,.enterprise-table tbody tr:hover>td{background:#12345a!important;background-color:#12345a!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
td *,th *,table td *,table th *,.table td *,.table th *{color:inherit!important;-webkit-text-fill-color:inherit!important;text-shadow:none!important}
td[colspan],.table-empty,.empty-state{background:#0b1e35!important;background-color:#0b1e35!important;color:#dbeafe!important;-webkit-text-fill-color:#dbeafe!important}
/* Forms */
input,select,textarea,.form-control,.form-select,.input,.inputx,.selectx,.sa-field input,.sa-field select{background:#071426!important;background-color:#071426!important;color:#f8fbff!important;-webkit-text-fill-color:#f8fbff!important;border:1px solid #3b5f86!important;border-radius:12px!important;box-shadow:none!important;outline:none!important;accent-color:#3b82f6!important}
input::placeholder,textarea::placeholder{color:#91acd0!important;-webkit-text-fill-color:#91acd0!important;opacity:1!important} select option{background:#071426!important;color:#fff!important}
input[type="date"]::-webkit-calendar-picker-indicator,input[type="time"]::-webkit-calendar-picker-indicator{filter:invert(1) brightness(1.7)!important;opacity:.95!important}
input[type="checkbox"],input[type="radio"]{background:#071426!important;border-color:#60a5fa!important;color:#fff!important;min-width:16px;min-height:16px}
label,.muted,.small,small,.form-text,.help-text{color:#a9c6ea!important;-webkit-text-fill-color:#a9c6ea!important}.text-dark,.text-muted{color:#a9c6ea!important;-webkit-text-fill-color:#a9c6ea!important}
.btn,.btn-primary,.sa-btn,button.btn,button.btn-primary{background:linear-gradient(135deg,#3b82f6,#2563eb)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid rgba(147,197,253,.45)!important;border-radius:12px!important;font-weight:850!important;box-shadow:0 10px 24px rgba(37,99,235,.22)!important}.btn-secondary,.sa-btn.secondary,a.btn-secondary,button.btn-secondary{background:#071426!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid #3b5f86!important;border-radius:12px!important;font-weight:850!important}.btn-danger,.danger,.sa-btn.danger{background:linear-gradient(135deg,#ef4444,#dc2626)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#f87171!important}
.badge,.pill,.chip,.status,.sa-badge{background:#12345c!important;color:#dbeafe!important;-webkit-text-fill-color:#dbeafe!important;border:1px solid #3b82f6!important;border-radius:999px!important}.pill.ok,.badge.ok,.success{background:#06391f!important;color:#bbf7d0!important;-webkit-text-fill-color:#bbf7d0!important;border-color:#22c55e!important}.pill.off,.badge.off{background:#203047!important;color:#cbd5e1!important;-webkit-text-fill-color:#cbd5e1!important;border-color:#64748b!important}
*{scrollbar-color:#64748b #071426}*::-webkit-scrollbar{height:10px;width:10px}*::-webkit-scrollbar-track{background:#071426}*::-webkit-scrollbar-thumb{background:#64748b;border-radius:999px;border:2px solid #071426}
::selection{background:#60a5fa!important;color:#031225!important;-webkit-text-fill-color:#031225!important}
@media(max-width:768px){table,.table,.enterprise-table{min-width:720px}.panel-card,.card,.sa-panel{border-radius:16px!important;padding:14px!important}.grid,.filter-grid,.create-grid{grid-template-columns:1fr!important}}
