
/* =====================================================
   FINAL DARK FIX - All pages, all boxes, all tables
   Black background + white writing, no white panels.
   ===================================================== */
:root{color-scheme:dark;--bg:#050505;--panel:#111;--panel2:#151515;--row:#0b0b0b;--row2:#111;--line:#333;--text:#fff;--muted:#d1d5db;--red:#e50914;}
html,body{background:var(--bg)!important;color:var(--text)!important;}
body *, body *::before, body *::after{box-sizing:border-box;}
.main,.content,.page,.wrap,main,section{color:var(--text)!important;}
.card,.box,.panel,.widget,.content-box,.quick-card,.statbox,.stat-card,.analytics-card,.form-card,.login-card,.account-box,.mini,.status-box,.summary-box,fieldset,form:not(.inline):not(.actions form){background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;}
.card *,.box *,.panel *,.widget *,.content-box *,.quick-card *,.statbox *,.stat-card *,.analytics-card *,.form-card *,.login-card *,.account-box *,.mini *,.status-box *,.summary-box *,fieldset *,form *{color:inherit;}
p,span,div,label,small,strong,b,h1,h2,h3,h4,h5,h6,li{color:inherit;}
.muted,small,.help,.hint,.client-slug{color:var(--muted)!important;}
input,select,textarea,.searchbox{background:#000!important;color:#fff!important;border:1px solid #444!important;box-shadow:none!important;}
input::placeholder,textarea::placeholder{color:#9ca3af!important;opacity:1!important;}
select option{background:#000!important;color:#fff!important;}
button,.btn,input[type=submit]{color:#fff!important;border-color:#333!important;}
a{color:#7dd3fc!important;}
/* tables */
.table-scroll,.table-wrap,.responsive-table{width:100%!important;overflow-x:auto!important;background:#050505!important;border:1px solid var(--line)!important;border-radius:14px!important;}
table,.table,.admin-table,.client-table,.plan-table,.analytics-table,.log-table{width:100%!important;border-collapse:collapse!important;border-spacing:0!important;background:#050505!important;color:#fff!important;border:1px solid var(--line)!important;}
thead,tbody,tr{background:#050505!important;color:#fff!important;}
th,td,table th,table td,.table th,.table td,.admin-table th,.admin-table td,.client-table th,.client-table td,.plan-table th,.plan-table td,.analytics-table th,.analytics-table td,.log-table th,.log-table td{background:#0b0b0b!important;color:#fff!important;border:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;padding:11px!important;text-align:left!important;vertical-align:top!important;}
th,table th,.table th,.admin-table th,.client-table th,.plan-table th,.analytics-table th,.log-table th{background:#111827!important;color:#fff!important;font-weight:800!important;}
tr:nth-child(even) td,table tr:nth-child(even) td,.table tr:nth-child(even) td,.admin-table tr:nth-child(even) td,.client-table tr:nth-child(even) td,.plan-table tr:nth-child(even) td,.analytics-table tr:nth-child(even) td,.log-table tr:nth-child(even) td{background:#111!important;color:#fff!important;}
tr:hover td,table tr:hover td,.table tr:hover td,.admin-table tr:hover td,.client-table tr:hover td,.plan-table tr:hover td,.analytics-table tr:hover td,.log-table tr:hover td{background:#1a1a1a!important;color:#fff!important;}
table *, .table *, .admin-table *, .client-table *, .plan-table *, .analytics-table *, .log-table *{color:#fff!important;}
table a,.table a,.admin-table a,.client-table a,.plan-table a,.analytics-table a,.log-table a{color:#7dd3fc!important;}
td[colspan],.empty-cell{color:#facc15!important;text-align:center!important;font-weight:800!important;}
/* status badges */
.badge,.status-pill,.status-active,.status-expired,.status-disabled{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;border-radius:999px!important;padding:6px 12px!important;font-weight:900!important;font-size:12px!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;min-width:62px!important;}
.badge.active,.status-pill.active,.status-active,.badge.done{background:#16a34a!important;color:#fff!important;border-color:#22c55e!important;}
.badge.expired,.status-pill.expired,.status-expired,.badge.off,.badge.new{background:#dc2626!important;color:#fff!important;border-color:#ef4444!important;}
.badge.disabled,.status-disabled{background:#4b5563!important;color:#fff!important;border-color:#9ca3af!important;}
.badge.unlimited,.status-pill.unlimited{background:#2563eb!important;color:#fff!important;border-color:#60a5fa!important;}
.badge.soon,.status-pill.soon{background:#d97706!important;color:#fff!important;border-color:#fbbf24!important;}
/* kill any white inline classes/styles */
.bg-white,.table-light,.card.bg-white,.box.bg-white,.panel.bg-white{background:#111!important;color:#fff!important;}
[style*="background:#fff"],[style*="background: #fff"],[style*="background:white"],[style*="background: white"],[style*="background-color:#fff"],[style*="background-color: #fff"],[style*="background-color:white"],[style*="background-color: white"],[style*="background:#f"],[style*="background: #f"]{background:#111!important;color:#fff!important;}
[style*="color:#000"],[style*="color: #000"],[style*="color:black"],[style*="color: black"],[style*="color:#111"],[style*="color: #111"],[style*="color:#555"],[style*="color: #555"],[style*="color:#6b7280"],[style*="color: #6b7280"]{color:#fff!important;}
.copy-btn{background:#262626!important;color:#fff!important;border:1px solid #444!important;}
.actions{color:#fff!important;}
.actions form{background:transparent!important;border:0!important;padding:0!important;margin:0!important;}
@media(max-width:760px){table,.client-table,.admin-table,.plan-table,.analytics-table,.log-table{min-width:720px!important}.table-scroll,.table-wrap{overflow-x:auto!important}}

/* FINAL SIDEBAR MENU FIX - overrides global a color */
.side{background:#0b0b0b!important;padding:22px 18px!important;border-right:1px solid #262626!important;}
.side a,.side a:link,.side a:visited{display:block!important;width:100%!important;padding:14px 18px!important;margin:0 0 10px 0!important;border-radius:12px!important;background:#111!important;color:#fff!important;text-decoration:none!important;font-weight:700!important;line-height:1.25!important;border:1px solid #242424!important;box-shadow:none!important;}
.side a:hover,.side a:focus{background:#241113!important;color:#fff!important;border-color:#e50914!important;}
.side a.active,.side a.active:link,.side a.active:visited,.side a.active:hover,.side a.active:focus{background:#e50914!important;color:#fff!important;border-color:#ff2631!important;font-weight:900!important;}
@media(max-width:800px){.side{display:flex!important;overflow-x:auto!important;gap:8px!important;padding:12px!important}.side a{width:auto!important;min-width:max-content!important;margin:0!important;white-space:nowrap!important}}

/* Page size safety */
html,body{max-width:100%!important;overflow-x:hidden!important;}
.wrap,.main,.card,.box,.panel{max-width:100%!important;overflow-x:hidden!important;}
.table-wrap,.table-scroll{max-width:100%!important;overflow-x:auto!important;}
img,video,iframe{max-width:100%!important;height:auto!important;}
@media(max-width:850px){.wrap{display:block!important}.main{padding:12px!important}.side{display:flex!important;overflow-x:auto!important;white-space:nowrap!important}.grid,.edit-grid,.client-stats,.account-box{grid-template-columns:1fr!important}}
