body{margin:0;background:#080808;color:#fff;font-family:Arial,sans-serif}.top{background:#111;padding:18px 24px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e50914}.wrap{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.side{background:#0f0f0f;padding:24px;border-right:1px solid #222}.side a{display:block;color:#ddd;text-decoration:none;padding:12px;border-radius:10px;margin-bottom:8px}.side a:hover,.side a.active{background:#e50914;color:white}.main{padding:24px}.card{background:#151515;border:1px solid #292929;border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:0 10px 30px #0008}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}input,textarea,select{width:100%;padding:12px;margin:6px 0 14px;border:1px solid #333;border-radius:10px;background:#090909;color:#fff;box-sizing:border-box}label{font-weight:bold;color:#ddd}button,.btn{background:#e50914;color:white;border:0;border-radius:10px;padding:12px 18px;cursor:pointer;text-decoration:none;display:inline-block}.alert{background:#10b981;padding:12px;border-radius:10px;margin-bottom:15px}.danger{background:#811}.login{display:grid;place-items:center;min-height:100vh}.login-card{width:min(420px,92vw)}@media(max-width:800px){.wrap{grid-template-columns:1fr}.side{display:flex;overflow:auto;gap:8px}.side a{white-space:nowrap}}
.msg-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.badge{font-size:12px;background:#10b981;color:#fff;border-radius:999px;padding:4px 8px;vertical-align:middle}.newmsg{border-color:#10b981}.inline{display:flex;gap:10px;flex-wrap:wrap}.inline input{display:none}.card a{color:#7dd3fc}
.muted{color:#9ca3af;font-size:14px;line-height:1.5}
.card h2{margin-top:8px}

/* Visitor Analytics */
.admin-table{width:100%;border-collapse:collapse;margin-top:12px;background:#fff;border-radius:10px;overflow:hidden}
.admin-table th,.admin-table td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:14px;vertical-align:top}
.admin-table th{background:#f8fafc;font-weight:700;color:#111827}
.table-scroll{overflow-x:auto;width:100%}
.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.two-col{grid-template-columns:1fr}.admin-table th,.admin-table td{font-size:12px;padding:8px}}
/* Fix analytics table visibility */
.admin-table{background:#ffffff;color:#111827}
.admin-table td{color:#111827;background:#ffffff}
.admin-table tr:nth-child(even) td{background:#f9fafb}
.admin-table a{color:#0369a1}


/* Global dark panel contrast fixes */
.card, .main, .side, .top { color:#ffffff; }
.card p, .card span, .card small, .card div { color:inherit; }
input, textarea, select { background:#070707 !important; color:#ffffff !important; border-color:#3a3a3a !important; }
input::placeholder, textarea::placeholder { color:#9ca3af !important; opacity:1; }
label { color:#e5e7eb !important; }
.account-box .mini, .status-box, .stat-box, .summary-box { background:#1b1b1b !important; color:#ffffff !important; border-color:#333 !important; }
.account-box .mini span { color:#bdbdbd !important; }
.account-box .mini b { color:#ffffff !important; }
.whatsapp-box { background:#10251a !important; color:#ffffff !important; border-color:#2f6b47 !important; }
.whatsapp-box * { color:inherit; }
.whatsapp-box .wa-title { color:#25d366 !important; }
.delete-row { background:#241113 !important; color:#fecdd3 !important; border-color:#7f1d1d !important; }
/* Normal tables inside dark cards */
table:not(.admin-table):not(.client-table):not(.plan-table) { width:100%; border-collapse:collapse; color:#fff; }
table:not(.admin-table):not(.client-table):not(.plan-table) th, table:not(.admin-table):not(.client-table):not(.plan-table) td { padding:10px; border-bottom:1px solid #333; color:#fff; text-align:left; }
table:not(.admin-table):not(.client-table):not(.plan-table) th { background:#1f1f1f; }


/* Final analytics fix: dark readable tables and data fitted inside boxes */
.analytics-page .analytics-card{overflow:hidden;}
.analytics-page .table-scroll{width:100%;overflow-x:auto;border-radius:12px;border:1px solid #303030;background:#101010;}
.analytics-page table.admin-table,
.analytics-page .admin-table,
.analytics-page .analytics-table{width:100%;min-width:520px;border-collapse:collapse;background:#101010 !important;color:#ffffff !important;margin-top:0;border-radius:12px;overflow:hidden;}
.analytics-page .analytics-table th{background:#202020 !important;color:#ffffff !important;border-bottom:1px solid #333 !important;padding:12px;text-align:left;font-weight:800;white-space:nowrap;}
.analytics-page .analytics-table td{background:#121212 !important;color:#f5f5f5 !important;border-bottom:1px solid #2c2c2c !important;padding:12px;text-align:left;vertical-align:top;}
.analytics-page .analytics-table tr:nth-child(even) td{background:#181818 !important;color:#ffffff !important;}
.analytics-page .analytics-table .data-label{font-weight:700;color:#ffffff !important;word-break:break-word;}
.analytics-page .analytics-table .data-count{font-weight:800;text-align:center;color:#22c55e !important;white-space:nowrap;}
.analytics-page .analytics-table .url-cell{max-width:340px;word-break:break-word;color:#93c5fd !important;}
.analytics-page .analytics-table .empty-cell{color:#facc15 !important;text-align:center;font-weight:700;padding:18px !important;}
.analytics-page .log-table{min-width:900px;}
.analytics-page .card h2,.analytics-page .card p{color:#fff !important;}
@media(max-width:700px){.analytics-page .main{padding:14px}.analytics-page .analytics-table th,.analytics-page .analytics-table td{font-size:12px;padding:9px}.analytics-page .analytics-table{min-width:460px}.analytics-page .log-table{min-width:760px}}

/* MASTER TABLE DARK FIX - all admin/client tables black with white text */
.table-wrap,
.table-scroll {
  background:#0b0b0b !important;
  border:1px solid #333 !important;
  border-radius:14px !important;
  overflow:auto !important;
}
.main table,
.card table,
table,
.admin-table,
.client-table,
.plan-table,
.analytics-table,
.log-table {
  width:100% !important;
  border-collapse:collapse !important;
  border-spacing:0 !important;
  background:#0b0b0b !important;
  color:#ffffff !important;
  border:1px solid #333 !important;
}
.main table thead,
.card table thead,
table thead,
.admin-table thead,
.client-table thead,
.plan-table thead {
  background:#111111 !important;
  color:#ffffff !important;
}
.main table th,
.main table td,
.card table th,
.card 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:#0f0f0f !important;
  color:#ffffff !important;
  border:1px solid #333333 !important;
  border-bottom:1px solid #333333 !important;
  padding:11px !important;
  text-align:left !important;
  vertical-align:top !important;
}
.main table th,
.card table th,
table th,
.admin-table th,
.client-table th,
.plan-table th,
.analytics-table th,
.log-table th {
  background:#181818 !important;
  color:#ffffff !important;
  font-weight:800 !important;
}
.main table tr:nth-child(even) td,
.card 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:#151515 !important;
  color:#ffffff !important;
}
.main table tr:hover td,
.card 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:#202020 !important;
  color:#ffffff !important;
}
.main table a,
.card table a,
table a,
.admin-table a,
.client-table a,
.plan-table a {
  color:#7dd3fc !important;
}
.main table small,
.card table small,
table small,
.client-table small,
.plan-table small {
  color:#cbd5e1 !important;
}
.client-name,
.client-slug,
.mini-link,
.data-label,
.url-cell {
  color:#ffffff !important;
}
.empty-cell,
td[colspan] {
  color:#facc15 !important;
  font-weight:700 !important;
  text-align:center !important;
}
.badge.active,.badge.done{background:#14532d !important;color:#dcfce7 !important;}
.badge.expired,.badge.new,.badge.off{background:#7f1d1d !important;color:#fee2e2 !important;}
.badge.unlimited{background:#1e3a8a !important;color:#dbeafe !important;}
.badge.soon{background:#713f12 !important;color:#fef3c7 !important;}
.statbox,.quick-card{background:#151515 !important;color:#ffffff !important;border-color:#333 !important;}
.statbox span,.statbox b{color:#ffffff !important;}
.actions input,.actions select{background:#050505 !important;color:#ffffff !important;border-color:#444 !important;}
.copy-btn{background:#262626 !important;color:#ffffff !important;border:1px solid #444 !important;}
@media(max-width:760px){.table-wrap,.table-scroll{overflow-x:auto !important;} table{min-width:700px;}}

/* FINAL UNIVERSAL TABLE FIX: every admin/client table black with white writing */
:root { color-scheme: dark; }
.table-scroll, .table-wrap, .responsive-table {
  width: 100% !important;
  overflow-x: auto !important;
  background: #0b0b0b !important;
  border: 1px solid #333 !important;
  border-radius: 12px !important;
}
table, table.admin-table, table.client-table, table.plan-table, table.analytics-table, table.log-table,
.admin-table, .client-table, .plan-table, .analytics-table, .log-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #0b0b0b !important;
  color: #ffffff !important;
  border: 1px solid #333 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
table thead, table tbody, table tr,
.admin-table thead, .admin-table tbody, .admin-table tr,
.client-table thead, .client-table tbody, .client-table tr,
.plan-table thead, .plan-table tbody, .plan-table tr,
.analytics-table thead, .analytics-table tbody, .analytics-table tr,
.log-table thead, .log-table tbody, .log-table tr {
  background: #0b0b0b !important;
  color: #ffffff !important;
}
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: #111111 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
  padding: 12px !important;
  text-align: left !important;
  vertical-align: top !important;
}
table th, .admin-table th, .client-table th, .plan-table th, .analytics-table th, .log-table th {
  background: #1f1f1f !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}
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: #161616 !important;
  color: #ffffff !important;
}
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: #242424 !important;
  color: #ffffff !important;
}
table *, .admin-table *, .client-table *, .plan-table *, .analytics-table *, .log-table * {
  color: inherit;
}
table a, .admin-table a, .client-table a, .plan-table a, .analytics-table a, .log-table a {
  color: #7dd3fc !important;
}
table small, .admin-table small, .client-table small, .plan-table small, .analytics-table small, .log-table small {
  color: #d1d5db !important;
}
table input, table select, table textarea,
.admin-table input, .admin-table select, .admin-table textarea,
.client-table input, .client-table select, .client-table textarea,
.plan-table input, .plan-table select, .plan-table textarea,
.analytics-table input, .analytics-table select, .analytics-table textarea,
.log-table input, .log-table select, .log-table textarea {
  background: #050505 !important;
  color: #ffffff !important;
  border: 1px solid #444 !important;
}
.empty-cell, td[colspan] {
  color: #facc15 !important;
  background: #111111 !important;
  font-weight: 800 !important;
}
@media (max-width: 760px) {
  table, .admin-table, .client-table, .plan-table, .analytics-table, .log-table { min-width: 720px !important; }
}


/* =========================================================
   GLOBAL DARK TABLE FIX - all tables/boxes black with white writing
   Added by ChatGPT: keeps every panel table readable on admin/client/storefront.
   ========================================================= */
html, body {
  background: #0b0b0b !important;
  color: #ffffff !important;
}

.table-wrap, .table-responsive, .responsive-table {
  width: 100% !important;
  overflow-x: auto !important;
  background: #0b0b0b !important;
  border-radius: 12px !important;
}

table, .table, table.table {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
}

table thead, table tbody, table tfoot,
.table thead, .table tbody, .table tfoot {
  background: #000000 !important;
  color: #ffffff !important;
}

table tr, .table tr,
table tr:nth-child(odd), table tr:nth-child(even),
.table tr:nth-child(odd), .table tr:nth-child(even) {
  background: #000000 !important;
  color: #ffffff !important;
}

table th, table td,
.table th, .table td,
thead th, tbody td, tfoot td {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
  padding: 10px 12px !important;
  vertical-align: middle !important;
}

table th, .table th, thead th {
  background: #111111 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

table td *, table th *, .table td *, .table th * {
  color: #ffffff !important;
}

table a, .table a {
  color: #ff4b4b !important;
  font-weight: 700 !important;
}

table input, table select, table textarea,
.table input, .table select, .table textarea {
  background: #111111 !important;
  color: #ffffff !important;
  border: 1px solid #444444 !important;
}

table tr:hover, .table tr:hover {
  background: #171717 !important;
}

/* Remove white Bootstrap/common utility/card/table backgrounds everywhere */
.bg-white, .table-light, .table-striped, .table-hover, .list-group-item,
.card, .box, .panel, .widget, .analytics-card, .stat-card, .content-box,
.white, .light, .card-body, .modal-content {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #333333 !important;
}

.card *, .box *, .panel *, .widget *, .analytics-card *, .stat-card *, .content-box *,
.card-body *, .modal-content *, .list-group-item * {
  color: #ffffff !important;
}

/* Force common inline/utility table cell classes dark */
[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"] {
  background: #000000 !important;
  color: #ffffff !important;
}

[style*="color: #000"], [style*="color:#000"],
[style*="color: black"], [style*="color:black"] {
  color: #ffffff !important;
}

/* Empty table messages */
.no-data, .empty, .empty-state {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
}

/* FINAL EXTRA NO WHITE TABLES */


/* FINAL OVERRIDE: no white boxes/tables anywhere */
html, body, main, .main { background:#050505 !important; color:#fff !important; }
.card, .box, .panel, .widget, .content-box, .quick-card, .statbox, .analytics-card, .stat-card, .table-wrap, .table-responsive, .responsive-table, form, fieldset {
  background:#111111 !important; color:#ffffff !important; border-color:#333333 !important;
}
.card *, .box *, .panel *, .widget *, .content-box *, .quick-card *, .statbox *, .analytics-card *, .stat-card *, form *, fieldset * { color:#ffffff !important; }
table, .table, table.table, .client-table, .admin-table, .plan-table, .analytics-table, .log-table {
  background:#000000 !important; color:#ffffff !important; border:1px solid #333333 !important; border-collapse:collapse !important;
}
thead, tbody, tfoot, tr, th, td,
table thead, table tbody, table tfoot, table tr, table th, table td,
.table thead, .table tbody, .table tfoot, .table tr, .table th, .table td,
.client-table thead, .client-table tbody, .client-table tr, .client-table th, .client-table td,
.admin-table thead, .admin-table tbody, .admin-table tr, .admin-table th, .admin-table td,
.plan-table thead, .plan-table tbody, .plan-table tr, .plan-table th, .plan-table td,
.analytics-table thead, .analytics-table tbody, .analytics-table tr, .analytics-table th, .analytics-table td,
.log-table thead, .log-table tbody, .log-table tr, .log-table th, .log-table td {
  background:#000000 !important; color:#ffffff !important; border-color:#333333 !important;
}
table th, .table th, thead th, .client-table th, .admin-table th, .plan-table th, .analytics-table th, .log-table th { background:#111827 !important; color:#ffffff !important; }
table td, .table td, tbody td, .client-table td, .admin-table td, .plan-table td, .analytics-table td, .log-table td { background:#050505 !important; color:#ffffff !important; }
table tr:nth-child(even) td, .table tr:nth-child(even) td, .client-table tr:nth-child(even) td, .admin-table tr:nth-child(even) td, .plan-table tr:nth-child(even) td { background:#111111 !important; color:#ffffff !important; }
table tr:hover td, .table tr:hover td, .client-table tr:hover td, .admin-table tr:hover td, .plan-table tr:hover td { background:#1a1a1a !important; color:#ffffff !important; }
table *, .table *, .client-table *, .admin-table *, .plan-table *, .analytics-table *, .log-table * { color:#ffffff !important; }
table a, .table a, .client-table a, .admin-table a, .plan-table a, .analytics-table a, .log-table a { color:#7dd3fc !important; }
input, select, textarea, .searchbox { background:#000000 !important; color:#ffffff !important; border:1px solid #444444 !important; }
input::placeholder, textarea::placeholder { color:#9ca3af !important; }
button, .btn { color:#ffffff !important; }
.badge.active,.badge.done{background:#14532d !important;color:#dcfce7 !important;}.badge.expired,.badge.new,.badge.off{background:#7f1d1d !important;color:#fee2e2 !important;}.badge.unlimited{background:#1e3a8a !important;color:#dbeafe !important;}.badge.soon{background:#713f12 !important;color:#fef3c7 !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"] { background:#000000 !important; color:#ffffff !important; }
[style*="color:#000"], [style*="color: #000"], [style*="color:black"], [style*="color: black"], [style*="color:#555"], [style*="color: #555"], [style*="color:#6b7280"], [style*="color: #6b7280"] { color:#ffffff !important; }



/* FINAL GLOBAL TABLE + BOX CONTRAST FIX */
html,body{background:#050505 !important;color:#fff !important;}
.card,.box,.panel,.widget,.content-box,.quick-card,.statbox,.analytics-card,.stat-card,.table-wrap,.table-responsive,.responsive-table,form,fieldset{background:#111 !important;color:#fff !important;border-color:#333 !important;}
.card *,.box *,.panel *,.widget *,.content-box *,.quick-card *,.statbox *,.analytics-card *,.stat-card *{color:#fff !important;}
table,.table,.client-table,.admin-table,.plan-table,.analytics-table,.log-table{background:#000 !important;color:#fff !important;border:1px solid #333 !important;border-collapse:collapse !important;}
thead,tbody,tfoot,tr,th,td,table tr,table th,table td,.table tr,.table th,.table td,.client-table tr,.client-table th,.client-table td{background:#050505 !important;color:#fff !important;border-color:#333 !important;}
table th,.table th,thead th,.client-table th,.admin-table th,.plan-table th,.analytics-table th,.log-table th{background:#111827 !important;color:#fff !important;}
table td,.table td,tbody td,.client-table td,.admin-table td,.plan-table td,.analytics-table td,.log-table td{background:#050505 !important;color:#fff !important;}
table tr:nth-child(even) td,.table tr:nth-child(even) td,.client-table tr:nth-child(even) td{background:#111 !important;color:#fff !important;}
table tr:hover td,.table tr:hover td,.client-table tr:hover td{background:#1a1a1a !important;color:#fff !important;}
table a,.table a,.client-table a{color:#7dd3fc !important;}
input,select,textarea,.searchbox{background:#000 !important;color:#fff !important;border:1px solid #444 !important;}
input::placeholder,textarea::placeholder{color:#9ca3af !important;}
.badge.active,.status-pill.active{background:#16a34a !important;color:#fff !important;}
.badge.expired,.status-pill.expired{background:#dc2626 !important;color:#fff !important;}
.badge.unlimited,.status-pill.unlimited{background:#2563eb !important;color:#fff !important;}
.badge.soon,.status-pill.soon{background:#d97706 !important;color:#fff !important;}


/* FINAL STATUS BADGE READABILITY FIX */
.badge, .status-pill {
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  min-width:64px !important; padding:7px 12px !important; border-radius:999px !important;
  font-weight:900 !important; font-size:13px !important; line-height:1.1 !important;
  color:#ffffff !important; text-shadow:none !important; border:1px solid rgba(255,255,255,.25) !important;
}
.badge.active, .status-pill.active, .badge:not(.off):not(.expired):not(.new):not(.soon):not(.unlimited):not(.done) {
  background:#16a34a !important; color:#ffffff !important; border-color:#22c55e !important;
}
.badge.off, .badge.expired, .status-pill.expired { background:#dc2626 !important; color:#ffffff !important; border-color:#ef4444 !important; }
.badge.new { background:#dc2626 !important; color:#ffffff !important; border-color:#ef4444 !important; }
.badge.done { background:#16a34a !important; color:#ffffff !important; border-color:#22c55e !important; }
.badge.soon, .status-pill.soon { background:#d97706 !important; color:#ffffff !important; border-color:#fbbf24 !important; }
.badge.unlimited, .status-pill.unlimited { background:#2563eb !important; color:#ffffff !important; border-color:#60a5fa !important; }



/* =====================================================
   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
   Makes every admin sidebar link a matching black button.
   Red is used only for the active/current page.
   This overrides global link/table dark fixes.
   ===================================================== */
.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:#111111 !important;
  color:#ffffff !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:#ffffff !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:#ffffff !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;}
}


/* SIDEBAR ALL PAGES FINAL FIX */
.wrap{display:grid !important;grid-template-columns:240px minmax(0,1fr) !important;min-height:calc(100vh - 65px) !important;background:#080808 !important;}
.side{background:#0b0b0b !important;border-right:1px solid #242424 !important;padding:18px 14px !important;display:flex !important;flex-direction:column !important;gap:8px !important;overflow-y:auto !important;}
.side a{display:block !important;width:100% !important;box-sizing:border-box !important;margin:0 !important;padding:13px 16px !important;border-radius:12px !important;background:#111111 !important;color:#ffffff !important;text-decoration:none !important;font-weight:700 !important;line-height:1.25 !important;border:1px solid #242424 !important;transition:all .18s ease !important;box-shadow:none !important;}
.side a:hover{background:#2a0b0d !important;border-color:#e50914 !important;color:#ffffff !important;transform:translateX(2px) !important;}
.side a.active{background:#e50914 !important;border-color:#ff2730 !important;color:#ffffff !important;box-shadow:0 0 14px rgba(229,9,20,.28) !important;}
.main{min-width:0 !important;padding:24px !important;background:#080808 !important;color:#ffffff !important;}
.top{min-height:64px !important;box-sizing:border-box !important;}
@media(max-width:850px){.wrap{grid-template-columns:1fr !important}.side{position:relative !important;flex-direction:row !important;overflow-x:auto !important;overflow-y:hidden !important;white-space:nowrap !important;border-right:0 !important;border-bottom:1px solid #242424 !important;padding:12px !important}.side a{width:auto !important;min-width:max-content !important}.main{padding:16px !important}}

/* NO WHITE BOXES FINAL OVERRIDE */
.card,.box,.panel,.summary-box,.statbox,.quick-card,.form-card,form.card{background:#151515 !important;color:#ffffff !important;border:1px solid #2e2e2e !important;}
.card *:not(input):not(textarea):not(select):not(option):not(button):not(.btn){color:inherit;}
input,textarea,select{background:#050505 !important;color:#ffffff !important;border:1px solid #3a3a3a !important;}
input::placeholder,textarea::placeholder{color:#a7a7a7 !important;opacity:1 !important;}
label{color:#f3f4f6 !important;}
table,.admin-table,.client-table,.plan-table,.analytics-table,.log-table{background:#0b0b0b !important;color:#ffffff !important;border:1px solid #333 !important;border-collapse:collapse !important;}
th,td,table th,table td,.admin-table th,.admin-table td,.client-table th,.client-table td,.plan-table th,.plan-table td{background:#0f0f0f !important;color:#ffffff !important;border:1px solid #333 !important;}
th,table th,.admin-table th,.client-table th,.plan-table th{background:#181818 !important;color:#ffffff !important;font-weight:800 !important;}
tr:nth-child(even) td{background:#151515 !important;color:#ffffff !important;}
.table-scroll,.table-wrap{background:#0b0b0b !important;border:1px solid #333 !important;}
.badge,.status-badge,.status-active{background:#15803d !important;color:#ffffff !important;font-weight:800 !important;border:1px solid #22c55e !important;}
.status-expired,.status-disabled{background:#991b1b !important;color:#ffffff !important;border-color:#ef4444 !important;}


/* =====================================================
   PANEL UNIFIED FINAL CSS
   Fixes sidebar, boxes, tables, status badges, inputs
   Black backgrounds + white writing across admin/client.
   ===================================================== */
:root{color-scheme:dark;--bg:#060606;--panel:#111;--panel2:#151515;--line:#2d2d2d;--text:#fff;--muted:#d1d5db;--red:#e50914;--red2:#ff1a25;}
html,body{background:var(--bg)!important;color:var(--text)!important;margin:0!important;}
body{font-family:Arial,Helvetica,sans-serif!important;}
*,*::before,*::after{box-sizing:border-box!important;}
.top{background:#101010!important;color:#fff!important;border-bottom:1px solid var(--red)!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:16px 22px!important;min-height:64px!important;}
.top *{color:#fff!important;}
.wrap{display:grid!important;grid-template-columns:250px minmax(0,1fr)!important;min-height:calc(100vh - 64px)!important;background:#070707!important;}
.main{min-width:0!important;padding:24px!important;background:#070707!important;color:#fff!important;}
/* Sidebar: every link looks like one clean menu button */
.side,.admin-side,.client-side{background:#0b0b0b!important;border-right:1px solid #242424!important;padding:18px 14px!important;display:flex!important;flex-direction:column!important;gap:9px!important;overflow-y:auto!important;}
.side a,.admin-side a,.client-side a,.side a:link,.side a:visited{display:block!important;width:100%!important;margin:0!important;padding:14px 16px!important;border-radius:13px!important;background:#111!important;color:#fff!important;text-decoration:none!important;font-weight:800!important;line-height:1.25!important;border:1px solid #252525!important;box-shadow:none!important;transition:background .18s ease,border-color .18s ease,transform .18s ease!important;}
.side a:hover,.side a:focus{background:#2b0b0e!important;color:#fff!important;border-color:var(--red)!important;transform:translateX(2px)!important;}
.side a.active,.side a.active:hover,.side a.active:focus{background:var(--red)!important;color:#fff!important;border-color:var(--red2)!important;box-shadow:0 0 16px rgba(229,9,20,.28)!important;}
/* Cards / boxes */
.card,.box,.panel,.widget,.content-box,.quick-card,.statbox,.stat-card,.analytics-card,.form-card,.login-card,.account-box .mini,.mini,.status-box,.summary-box,fieldset,form.card{background:#151515!important;color:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;box-shadow:0 10px 28px rgba(0,0,0,.35)!important;}
.card,.box,.panel,.widget,.content-box,.quick-card,.statbox,.stat-card,.analytics-card,.form-card,.login-card,.status-box,.summary-box{padding:22px!important;margin-bottom:20px!important;}
.card *:not(input):not(textarea):not(select):not(option):not(button):not(.btn),.box *:not(input):not(textarea):not(select):not(option):not(button):not(.btn),.panel *:not(input):not(textarea):not(select):not(option):not(button):not(.btn),.summary-box *:not(input):not(textarea):not(select):not(option):not(button):not(.btn){color:inherit!important;}
h1,h2,h3,h4,h5,h6,p,label,span,div,small,strong,b,li{color:inherit!important;}
.muted,small,.help,.hint{color:var(--muted)!important;}
.grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;gap:16px!important;}
/* Forms */
input,textarea,select{background:#050505!important;color:#fff!important;border:1px solid #3f3f3f!important;border-radius:10px!important;padding:12px!important;box-shadow:none!important;outline:none!important;}
input:focus,textarea:focus,select:focus{border-color:var(--red)!important;box-shadow:0 0 0 3px rgba(229,9,20,.18)!important;}
input::placeholder,textarea::placeholder{color:#a8a8a8!important;opacity:1!important;}
select option{background:#050505!important;color:#fff!important;}
label{color:#f3f4f6!important;font-weight:800!important;}
button,.btn,input[type=submit]{background:var(--red)!important;color:#fff!important;border:0!important;border-radius:10px!important;padding:11px 16px!important;text-decoration:none!important;font-weight:800!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;cursor:pointer!important;}
button:hover,.btn:hover,input[type=submit]:hover{background:#b90710!important;color:#fff!important;}
.btn.secondary,.copy-btn{background:#262626!important;color:#fff!important;border:1px solid #444!important;}
a{color:#7dd3fc!important;}
/* Tables: no white background anywhere */
.table-scroll,.table-wrap,.responsive-table{width:100%!important;overflow-x:auto!important;background:#050505!important;border:1px solid #333!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 #333!important;border-radius:12px!important;overflow:hidden!important;}
table thead,table tbody,table tr,.table thead,.table tbody,.table tr,.admin-table thead,.admin-table tbody,.admin-table tr,.client-table thead,.client-table tbody,.client-table tr,.plan-table thead,.plan-table tbody,.plan-table tr,.analytics-table thead,.analytics-table tbody,.analytics-table tr,.log-table thead,.log-table tbody,.log-table tr{background:#050505!important;color:#fff!important;}
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:#0f0f0f!important;color:#fff!important;border:1px solid #333!important;border-bottom:1px solid #333!important;padding:12px!important;text-align:left!important;vertical-align:top!important;}
table th,.table th,.admin-table th,.client-table th,.plan-table th,.analytics-table th,.log-table th{background:#151515!important;color:#fff!important;font-weight:900!important;}
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:#141414!important;color:#fff!important;}
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:#202020!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;}
table small,.table small,.admin-table small,.client-table small,.plan-table small,.analytics-table small,.log-table small{color:#d1d5db!important;}
td[colspan],.empty-cell{color:#facc15!important;text-align:center!important;font-weight:900!important;}
/* Status badges readable */
.badge,.status-badge,.status-pill,.status-active,.status-expired,.status-disabled{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:70px!important;padding:7px 12px!important;border-radius:999px!important;font-weight:900!important;font-size:12px!important;line-height:1!important;color:#fff!important;border:1px solid rgba(255,255,255,.25)!important;text-shadow:none!important;}
.badge.active,.badge.done,.status-pill.active,.status-active{background:#15803d!important;color:#fff!important;border-color:#22c55e!important;}
.badge.expired,.badge.off,.badge.new,.status-pill.expired,.status-expired{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 white classes and common inline white styles */
.bg-white,.table-light,.card.bg-white,.box.bg-white,.panel.bg-white,.light,.white-box{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:#f8"],[style*="background: #f8"],[style*="background:#f9"],[style*="background: #f9"],[style*="background:#faf"],[style*="background: #faf"],[style*="background:#ffffff"],[style*="background: #ffffff"]{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;}
.alert{background:#10b981!important;color:#fff!important;border-radius:10px!important;padding:12px!important;margin-bottom:15px!important;}
.alert a{color:#fff!important;text-decoration:underline!important;}
@media(max-width:850px){.wrap{grid-template-columns:1fr!important}.side,.admin-side,.client-side{position:relative!important;flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;border-right:0!important;border-bottom:1px solid #242424!important;padding:12px!important}.side a{width:auto!important;min-width:max-content!important}.main{padding:16px!important}table,.admin-table,.client-table,.plan-table,.analytics-table,.log-table{min-width:760px!important}}

/* ANALYTICS MOBILE OVERFLOW FINAL FIX
   Keep the small analytics tables inside the cards and always show Visits count. */
.analytics-page .grid.two-col{
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap:18px !important;
}
.analytics-page .analytics-card{overflow:hidden !important;}
.analytics-page .analytics-card .table-scroll{
  overflow-x: visible !important;
  max-width:100% !important;
}
.analytics-page .mini-analytics-table{
  min-width:0 !important;
  width:100% !important;
  table-layout:fixed !important;
}
.analytics-page .mini-analytics-table th:first-child,
.analytics-page .mini-analytics-table td:first-child{
  width:auto !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}
.analytics-page .mini-analytics-table th:last-child,
.analytics-page .mini-analytics-table td:last-child{
  width:82px !important;
  min-width:82px !important;
  text-align:center !important;
  white-space:nowrap !important;
  color:#22c55e !important;
  font-weight:900 !important;
}
.analytics-page .analytics-table th,
.analytics-page .analytics-table td{
  overflow-wrap:anywhere !important;
}
@media(max-width:850px){
  .analytics-page .mini-analytics-table{
    min-width:0 !important;
    width:100% !important;
  }
  .analytics-page .mini-analytics-table th,
  .analytics-page .mini-analytics-table td{
    padding:10px !important;
    font-size:13px !important;
  }
  .analytics-page .mini-analytics-table th:last-child,
  .analytics-page .mini-analytics-table td:last-child{
    width:72px !important;
    min-width:72px !important;
  }
}


/* =====================================================
   FINAL CLIENT PAGE MOBILE/TABLET REPAIR
   Fixes admin/clients.php table being cut off on phones/tablets.
   Shows clean client cards on smaller screens and keeps desktop table only on wide screens.
   ===================================================== */
body{overflow-x:hidden!important;}
.wrap{max-width:100vw!important;overflow-x:hidden!important;}
.main{width:100%!important;max-width:100vw!important;overflow-x:hidden!important;}
.card{max-width:100%!important;overflow:hidden!important;}
.table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
.table-wrap table{min-width:max-content!important;}
.actions{max-width:100%!important;}
.actions form{max-width:100%!important;}
.actions input,.actions select{max-width:100%!important;}
@media(max-width:1200px){
  .client-table-desktop{display:none!important;}
  .client-cards{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:14px!important;margin-top:14px!important;}
  .client-card{background:#111!important;color:#fff!important;border:1px solid #333!important;border-radius:16px!important;padding:16px!important;overflow:hidden!important;}
  .client-card *{color:#fff!important;}
  .client-card a{color:#7dd3fc!important;word-break:break-all!important;}
  .client-card form{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;align-items:center!important;margin-top:8px!important;}
  .client-card form input,.client-card form select{min-width:0!important;width:100%!important;}
  .client-card form button{white-space:nowrap!important;}
}
@media(max-width:850px){
  .top{position:sticky!important;top:0!important;z-index:20!important;}
  .wrap{display:block!important;}
  .side{display:flex!important;flex-direction:row!important;overflow-x:auto!important;gap:8px!important;white-space:nowrap!important;padding:10px!important;border-right:0!important;border-bottom:1px solid #222!important;}
  .side a{width:auto!important;min-width:max-content!important;padding:10px 13px!important;font-size:13px!important;border-radius:10px!important;}
  .main{padding:14px!important;}
  .client-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .edit-grid{grid-template-columns:1fr!important;}
  .searchbox{width:100%!important;min-width:0!important;}
  .toolbar{align-items:stretch!important;}
  .toolbar .btn{width:100%!important;}
}
@media(max-width:520px){
  .client-stats{grid-template-columns:1fr!important;}
  .client-cards{grid-template-columns:1fr!important;}
  .client-card .row{grid-template-columns:1fr!important;gap:3px!important;}
  .client-card .card-actions{grid-template-columns:1fr!important;}
  .client-card form{grid-template-columns:1fr!important;}
  .top{padding:10px!important;gap:8px!important;}
  .top strong{font-size:13px!important;}
}
