/* =====================================================
   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}}

/* =====================================================
   FINAL PAGE SIZE / RESPONSIVE LAYOUT FIX
   Keeps every admin/client page fitted to screen.
   ===================================================== */
html{width:100%!important;max-width:100%!important;overflow-x:hidden!important;-webkit-text-size-adjust:100%!important;}
body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
.top{width:100%!important;max-width:100%!important;flex-wrap:wrap!important;}
.wrap{width:100%!important;max-width:100vw!important;overflow-x:hidden!important;}
.main{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
.card,.box,.panel,.widget,.content-box,.quick-card,.statbox,.stat-card,.analytics-card,.form-card,.login-card,.status-box,.summary-box{width:100%!important;max-width:100%!important;overflow:hidden!important;}
.grid,.edit-grid,.client-stats,.account-box{width:100%!important;max-width:100%!important;}
.edit-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:14px!important;}
.toolbar{display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important;width:100%!important;max-width:100%!important;}
.searchbox{flex:1 1 260px!important;min-width:0!important;}
input,textarea,select{max-width:100%!important;min-width:0!important;}
img,video,iframe{max-width:100%!important;height:auto!important;}
pre,code{white-space:pre-wrap!important;word-break:break-word!important;}
.table-wrap,.table-scroll,.responsive-table{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
table,.table,.admin-table,.client-table,.plan-table,.analytics-table,.log-table{max-width:100%!important;}
th,td{word-break:break-word!important;overflow-wrap:anywhere!important;}
.apk-row{grid-template-columns:minmax(0,1fr) auto!important;max-width:100%!important;}
.inline,.action-row{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
.btn,button,input[type=submit]{max-width:100%!important;white-space:normal!important;text-align:center!important;}
@media(max-width:1100px){.wrap{grid-template-columns:220px minmax(0,1fr)!important}.main{padding:18px!important}.grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))!important}.edit-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))!important}}
@media(max-width:850px){body{overflow-x:hidden!important}.top{padding:12px!important}.wrap{display:block!important;min-height:auto!important}.side,.admin-side,.client-side{width:100%!important;max-width:100vw!important;display:flex!important;flex-direction:row!important;gap:8px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;border-right:0!important;border-bottom:1px solid #242424!important;padding:10px!important}.side a,.admin-side a,.client-side a{flex:0 0 auto!important;width:auto!important;min-width:max-content!important;padding:11px 13px!important;font-size:14px!important}.main{padding:12px!important;width:100%!important}.card,.box,.panel{padding:16px!important}.grid,.edit-grid,.client-stats,.account-box{grid-template-columns:1fr!important}.apk-row{grid-template-columns:1fr!important}.top .btn{padding:9px 12px!important}}
@media(max-width:520px){h1{font-size:24px!important}h2{font-size:20px!important}h3{font-size:18px!important}.top{font-size:14px!important}.main{padding:10px!important}.card,.box,.panel{padding:14px!important;border-radius:12px!important}input,textarea,select{font-size:16px!important;padding:11px!important}.btn,button,input[type=submit]{width:100%!important;justify-content:center!important}.inline .btn,.inline button,.action-row .btn,.action-row button{width:auto!important}table th,table td,.admin-table th,.admin-table td,.client-table th,.client-table td,.plan-table th,.plan-table td{font-size:12px!important;padding:8px!important}}
