/* Final readability layer - loaded last. Typography only: font-size and text colour. */

/* 1) Every normal text element is at least 16px (badges 14px, icons untouched, bigger headings stay bigger). */
html body :is(p,span,div,li,a,label,small,strong,b,em,button,input:not([type=checkbox]):not([type=radio]),select,textarea,td,th,option,h5,h6):not(#_a):not(#_b):not(.badge):not([class*="badge"]):not([class*="pill"]):not([class*="chip"]):not([class*="avatar"]):not([class*="tag"]):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not(.material-icons){font-size:max(16px,1em) !important;}
html body :is(.badge,[class*="badge"],[class*="pill"],[class*="chip"]):not(#_a):not(#_b){font-size:max(14px,1em) !important;}
html body .app-container .nav-link:not(#_a):not(#_b),
html body .app-container .sidebar a span:not(#_a):not(#_b){font-size:max(17px,1em) !important;}
html body .app-container .topbar .topbar-right a.topbar-shortcut,
html body .app-container .topbar .topbar-right a.topbar-shortcut span{font-size:16px !important;}

/* 2) Tables: heading row = dark background + WHITE text, body cells = BLACK text. */
html body table:not(#_a):not(#_b) thead th:not(#_a):not(#_b),
html body table:not(#_a):not(#_b) th:not(#_a):not(#_b){background:#1e293b !important;background-image:none !important;color:#ffffff !important;font-weight:700 !important;}
html body table:not(#_a):not(#_b) th *:not(input):not(#_c){color:#ffffff !important;}
html body table:not(#_a):not(#_b) td:not(#_a):not(#_b){color:#000000 !important;}
html body table:not(#_a):not(#_b) td a:not(.btn):not([class*="badge"]):not([class*="pill"]):not(#_a):not(#_b),
html body table:not(#_a):not(#_b) td span:not(.badge):not([class*="badge"]):not([class*="pill"]):not([class*="status"]):not([class*="chip"]):not(#_a):not(#_b),
html body table:not(#_a):not(#_b) td small:not(#_a):not(#_b),
html body table:not(#_a):not(#_b) td strong:not(#_a):not(#_b),
html body table:not(#_a):not(#_b) td b:not(#_a):not(#_b),
html body table:not(#_a):not(#_b) td div:not([class*="badge"]):not([class*="status"]):not([class*="pill"]):not(#_a):not(#_b){color:#000000 !important;}

/* dark mode keeps readable contrast */
html body.dark-mode table:not(#_a):not(#_b) td:not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td a:not(.btn):not([class*="badge"]):not([class*="pill"]):not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td span:not(.badge):not([class*="badge"]):not([class*="pill"]):not([class*="status"]):not([class*="chip"]):not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td small:not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td strong:not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td b:not(#_a):not(#_b),
html body.dark-mode table:not(#_a):not(#_b) td div:not([class*="badge"]):not([class*="status"]):not([class*="pill"]):not(#_a):not(#_b){color:#f1f5f9 !important;}

/* ---- Client list / profile fixes (typography + colour + sizing only) ---- */
/* Clear Filter / Apply Filter buttons: never cut text */
html body .clients-view-container .btn.btn-sm{white-space:nowrap !important;width:auto !important;min-width:max-content !important;height:auto !important;min-height:40px !important;padding:8px 18px !important;line-height:1.3 !important;overflow:visible !important;}
/* Show N entries drop-down: number fully visible */
html body #clients-per-page{width:110px !important;min-width:110px !important;height:42px !important;padding:4px 30px 4px 12px !important;line-height:1.3 !important;}
/* Faint text -> readable (client list) */
html body .clients-view-container .client-ip-value{color:#1e293b !important;font-weight:600 !important;}
html body .clients-view-container .client-username-cell{color:#1d4ed8 !important;font-weight:700 !important;}
html body .clients-view-container #table-clients .badge{opacity:1 !important;font-weight:700 !important;}
html body .clients-view-container #table-clients .badge-indigo{color:#1e3a8a !important;background:rgba(59,130,246,.18) !important;}
html body .clients-view-container #table-clients tbody td .chk-client-row,html body .clients-view-container #table-clients input[type=checkbox]{opacity:1 !important;}
/* Faint text -> readable (profile card + tabs + sidebar sub menu) */
html body .crp-info-row > div:last-child{color:#111827 !important;font-weight:600 !important;overflow-wrap:normal !important;word-break:normal !important;white-space:nowrap !important;}
html body .crp-info-row > div:first-child{color:#111827 !important;}
html body .crp-info-row{grid-template-columns:minmax(120px,45%) 1fr !important;}
html body .app-container .nav-link-sub:not(.active),html body .app-container .nav-link-sub:not(.active) span{color:#1e293b !important;opacity:1 !important;}
html body .app-container .sidebar-release-tag{color:#334155 !important;}
html body.dark-mode .app-container .nav-link-sub:not(.active),html body.dark-mode .app-container .nav-link-sub:not(.active) span,html body.dark-mode .app-container .sidebar-release-tag{color:#e2e8f0 !important;}

/* ---- Same font size on EVERY table, taken from the Online Client Monitoring table (heading 16px, body 16px) ---- */
html body table:not(#_a):not(#_b) th:not(#_a):not(#_b){font-size:16px !important;font-weight:600 !important;}
html body table:not(#_a):not(#_b) th:not(#_a):not(#_b) *:not(i):not(svg):not(.fa):not([class*="badge"]){font-size:16px !important;}
html body table:not(#_a):not(#_b) td:not(#_a):not(#_b){font-size:16px !important;}
html body table:not(#_a):not(#_b) td:not(#_a):not(#_b) :is(span,div,a,small,strong,b,em,label,p,button,select,input,textarea):not([class*="badge"]):not([class*="pill"]):not([class*="chip"]):not(.fa):not(#_c){font-size:16px !important;}

/* ---- Online Client Monitoring > Action column: coloured icons ---- */
html body .lm-actions i:not(#_a){opacity:1 !important;}
html body .lm-actions i.fa-print:not(#_a){color:#2563eb !important;}
html body .lm-actions i.fa-chart-column:not(#_a){color:#7c3aed !important;}
html body .lm-actions i.fa-rotate:not(#_a){color:#16a34a !important;}
html body .lm-actions i.fa-satellite-dish:not(#_a){color:#ea580c !important;}

/* =====================================================================
   Neat bulk-action bar + filter boxes (layout/colour only, no logic).
   Applies to Clients and to every other page that uses a filter box.
   ===================================================================== */
/* ---- Clients: bulk action buttons (Bulk Status Change, Delete Selected, ...) ---- */
html body .clients-bulk-bar:not(#_a){display:grid !important;grid-template-columns:repeat(auto-fill,minmax(250px,1fr)) !important;gap:12px !important;padding:16px !important;align-items:stretch !important;}
html body .clients-bulk-bar .btn:not(#_a){position:static !important;width:100% !important;min-width:0 !important;height:auto !important;min-height:48px !important;margin:0 !important;padding:10px 14px !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;gap:10px !important;border:0 !important;border-radius:12px !important;color:#ffffff !important;font-weight:700 !important;line-height:1.25 !important;text-align:center !important;white-space:normal !important;box-shadow:0 5px 12px rgba(15,23,42,.18) !important;transform:none;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;}
html body .clients-bulk-bar .btn.btn-indigo:not(#_a){background:linear-gradient(135deg,#1e3a8a,#2563eb) !important;}
html body .clients-bulk-bar .btn.btn-danger:not(#_a){background:linear-gradient(135deg,#b91c1c,#ef4444) !important;}
html body .clients-bulk-bar .btn:not(#_a):hover{transform:translateY(-2px) !important;box-shadow:0 9px 18px rgba(15,23,42,.26) !important;filter:brightness(1.07);}
html body .clients-bulk-bar .btn i:not(#_a){color:#ffffff !important;font-size:17px !important;}
html body .clients-bulk-bar .btn[style*="margin-left"]:not(#_a){margin-left:0 !important;}

/* ---- Filter boxes (Clients + Reseller + Support + Users ...) ---- */
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel):not(#_a){background:rgba(255,255,255,.82) !important;border:1px solid #d6deec !important;border-radius:16px !important;box-shadow:0 6px 18px rgba(30,41,90,.10) !important;}
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel) .card-body:not(#_a){padding:18px !important;}
html body #filter-panel-fields:not(#_a),
html body :is(.rr-filter-grid,.ss-filter-grid,.sa-users-filter-grid):not(#_a){display:grid !important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr)) !important;gap:14px 16px !important;align-items:end !important;}
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel) :is(label,.form-group label):not(#_a){display:block !important;margin:0 0 6px !important;font-size:15px !important;font-weight:700 !important;letter-spacing:.03em !important;line-height:1.2 !important;color:#1e293b !important;opacity:1 !important;}
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel) :is(.form-control,select,input:not([type=checkbox]):not([type=radio])):not(#_a){height:46px !important;min-height:46px !important;padding:8px 36px 8px 14px !important;background-color:#ffffff !important;border:1px solid #c3cde0 !important;border-radius:11px !important;color:#0f172a !important;font-size:16px !important;line-height:1.3 !important;box-shadow:inset 0 1px 2px rgba(15,23,42,.05) !important;opacity:1 !important;}
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel) :is(.form-control,select,input):not(#_a):focus{border-color:#2563eb !important;box-shadow:0 0 0 3px rgba(37,99,235,.18) !important;outline:0 !important;}
html body .clients-view-container .clients-filter-head:not(#_a){margin-bottom:14px !important;padding-bottom:10px !important;border-bottom:1px solid #e1e7f2 !important;}
html body .clients-view-container .clients-filter-title strong:not(#_a){color:#0f172a !important;font-size:17px !important;}
html body .clients-view-container .clients-filter-hint:not(#_a){color:#475569 !important;font-size:15px !important;}
html body .clients-view-container .clients-filter-buttons:not(#_a){grid-column:1 / -1 !important;display:flex !important;align-items:center !important;justify-content:flex-end !important;gap:12px !important;min-height:0 !important;padding-top:6px !important;}
html body .clients-view-container .clients-filter-buttons .btn:not(#_a){height:46px !important;min-width:150px !important;padding:0 24px !important;border:0 !important;border-radius:11px !important;color:#ffffff !important;font-weight:700 !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;gap:9px !important;box-shadow:0 5px 12px rgba(15,23,42,.18) !important;}
html body .clients-view-container .clients-filter-buttons .btn.btn-danger:not(#_a){background:linear-gradient(135deg,#b91c1c,#ef4444) !important;}
html body .clients-view-container .clients-filter-buttons .btn.btn-info:not(#_a){background:linear-gradient(135deg,#1d4ed8,#3b82f6) !important;}
html body .clients-view-container .clients-filter-buttons .btn i:not(#_a){color:#ffffff !important;}
/* "Show N entries" + Search row */
html body .clients-view-container .text-muted:not(#_a){color:#334155 !important;opacity:1 !important;}
html body.dark-mode :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel):not(#_a){background:rgba(15,23,42,.85) !important;border-color:#334155 !important;}

/* =====================================================================
   v7 - Filter boxes: NORMAL font weight + one shared design on EVERY page
   (same look as the Clients List filter). Layout/colour/weight only.
   ===================================================================== */
/* shared card look for the remaining filter containers */
html body :is(.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel):not(#_a){background:rgba(255,255,255,.82) !important;border:1px solid #d6deec !important;border-radius:16px !important;box-shadow:0 6px 18px rgba(30,41,90,.10) !important;}
html body :is(.bill-filter-card .card-body,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel.open):not(#_a){padding:18px !important;}
html body :is(.bill-filter-grid,.isp-detail-filter-grid,.isp-detail-filter-grid.four):not(#_a){display:grid !important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr)) !important;gap:14px 16px !important;align-items:end !important;}
html body :is(.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel.open):not(#_a){gap:14px 16px !important;align-items:flex-end !important;flex-wrap:wrap !important;}
html body :is(.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel) :is(label,.form-group label):not(#_a){display:block !important;margin:0 0 6px !important;font-size:15px !important;letter-spacing:.03em !important;line-height:1.2 !important;color:#1e293b !important;opacity:1 !important;}
html body :is(.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel) :is(.form-control,select,input:not([type=checkbox]):not([type=radio])):not(#_a){height:46px !important;min-height:46px !important;padding:8px 36px 8px 14px !important;background-color:#ffffff !important;border:1px solid #c3cde0 !important;border-radius:11px !important;color:#0f172a !important;font-size:16px !important;line-height:1.3 !important;box-shadow:inset 0 1px 2px rgba(15,23,42,.05) !important;opacity:1 !important;}
html body :is(.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel) :is(.form-control,select,input):not(#_a):focus{border-color:#2563eb !important;box-shadow:0 0 0 3px rgba(37,99,235,.18) !important;outline:0 !important;}
html body :is(.bill-filter-card,.isp-detail-filters,.ss-filter-card,.sa-users-filter-card,.rr-filter-card) .btn:not(#_a){border-radius:11px !important;font-weight:600 !important;}
html body.dark-mode :is(.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel):not(#_a){background:rgba(15,23,42,.85) !important;border-color:#334155 !important;}

/* NORMAL (not bold) text inside every filter box */
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel,.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel) :is(label,.form-group label,.rr-label,.form-control,select,option,input,.clients-filter-hint):not(#_a){font-weight:400 !important;}
html body :is(.filter-card,.rr-filter-card,.ss-filter-card,.sa-users-filter-card,.rr-filter-panel,.bill-filter-card,.isp-detail-filters,.ss-ticket-filters,.sat-ticket-filters,.cp-filter-panel) label *:not(#_a){font-weight:400 !important;}
html body .clients-view-container .clients-filter-title strong:not(#_a){font-weight:500 !important;}
html body .clients-view-container .clients-filter-hint:not(#_a){font-weight:400 !important;}
html body .clients-view-container .clients-filter-buttons .btn:not(#_a){font-weight:600 !important;}

/* =====================================================================
   v9 - Add / Edit New Client form: ISP Digital style (scoped to
   #modal-client-create only). Colour / border / radius / size only -
   no field, id, JS, API or icon is changed.
   ===================================================================== */
html body #modal-client-create .modal-content:not(#_a){-webkit-backdrop-filter:none !important;backdrop-filter:none !important;background:#e9edf2 !important;}
html body #modal-client-create .cf-form:not(#_a){background:#ffffff !important;border:1px solid #d5dce6 !important;border-radius:14px !important;box-shadow:0 2px 8px rgba(15,23,42,.08) !important;padding-bottom:22px !important;}
/* every section bar: one identical dark bar, rounded on the right like ISP Digital */
html body #modal-client-create .cf-sec:not(#_a){background:#0f172a !important;background-image:none !important;color:#ffffff !important;border-radius:0 24px 24px 0 !important;padding:10px 20px !important;margin:22px 0 16px !important;box-shadow:none !important;border:0 !important;}
html body #modal-client-create .cf-sec:first-child:not(#_a){margin-top:0 !important;border-radius:14px 24px 24px 0 !important;}
html body #modal-client-create .cf-sec b:not(#_a),
html body #modal-client-create .cf-sec small:not(#_a),
html body #modal-client-create .cf-sec>i:not(#_a){color:#ffffff !important;opacity:1 !important;}
html body #modal-client-create .cf-sec b:not(#_a){font-size:17px !important;font-weight:600 !important;}
html body #modal-client-create .cf-sec small:not(#_a){font-size:15px !important;font-weight:400 !important;}
html body #modal-client-create .cf-sec .cf-req:not(#_a){color:#fb7185 !important;}
/* same grid, every row on one line, even spacing */
html body #modal-client-create .cf-grid:not(#_a){gap:16px 22px !important;padding:0 22px !important;align-items:start !important;}
html body #modal-client-create .cf-fg:not(#_a){gap:6px !important;}
/* labels: dark and clearly readable */
html body #modal-client-create .cf-fg>label:not(#_a){font-size:14.5px !important;font-weight:500 !important;color:#1f2937 !important;text-transform:uppercase;letter-spacing:.3px !important;opacity:1 !important;margin:0 !important;}
html body #modal-client-create .cf-fg>label .cf-req:not(#_a){color:#dc2626 !important;}
/* inputs: white, visible grey border, rounded like ISP Digital */
html body #modal-client-create .cf-form .form-control:not(#_a){height:40px !important;min-height:40px !important;padding:6px 16px !important;background:#ffffff !important;border:1px solid #b9c3d1 !important;border-radius:20px !important;color:#111827 !important;font-size:16px !important;font-weight:400 !important;box-shadow:inset 0 1px 2px rgba(15,23,42,.06) !important;opacity:1 !important;}
html body #modal-client-create .cf-form textarea.form-control:not(#_a){height:auto !important;min-height:96px !important;padding:10px 16px !important;border-radius:16px !important;}
html body #modal-client-create .cf-form .form-control:not(#_a)::placeholder{color:#6b7280 !important;opacity:1 !important;}
html body #modal-client-create .cf-form .form-control:not(#_a):focus{border-color:#0f172a !important;box-shadow:0 0 0 3px rgba(15,23,42,.12) !important;background:#ffffff !important;}
html body #modal-client-create .cf-form .form-control[readonly]:not(#_a){background:#f3f4f6 !important;color:#374151 !important;}
/* picture circles + pencil button */
html body #modal-client-create .cf-circle:not(#_a){width:110px !important;height:110px !important;background:#eef0f4 !important;border:2px solid #ffffff !important;box-shadow:0 0 0 1px #cbd3df !important;}
html body #modal-client-create .cf-circle>i:not(#_a){color:#aab2c0 !important;font-size:48px !important;}
html body #modal-client-create .cf-circle.cf-square>i:not(#_a){font-size:40px !important;}
html body #modal-client-create .cf-pen:not(#_a){width:30px !important;height:30px !important;background:#0f172a !important;border:2px solid #ffffff !important;right:-2px !important;top:0 !important;}
html body #modal-client-create .cf-pen i:not(#_a){color:#ffffff !important;font-size:13px !important;}
/* small buttons inside fields (Random / Auto) */
html body #modal-client-create .cf-mini:not(#_a){background:#0f172a !important;color:#ffffff !important;border-radius:16px !important;padding:8px 14px !important;font-weight:600 !important;opacity:1 !important;}
/* checkboxes */
html body #modal-client-create .cf-check:not(#_a){font-size:15.5px !important;font-weight:500 !important;color:#1f2937 !important;opacity:1 !important;}
html body #modal-client-create .cf-check input:not(#_a){width:18px !important;height:18px !important;opacity:1 !important;accent-color:#0f172a;}
/* bottom buttons: clearly visible */
html body #modal-client-create .cf-actions:not(#_a){background:#ffffff !important;border-top:1px solid #d5dce6 !important;}
html body #modal-client-create .cf-btn:not(#_a){border-radius:22px !important;padding:10px 24px !important;font-size:16px !important;font-weight:600 !important;opacity:1 !important;color:#ffffff !important;box-shadow:0 4px 10px rgba(15,23,42,.18) !important;}
html body #modal-client-create .cf-btn-gray:not(#_a){background:#64748b !important;}
html body #modal-client-create .cf-btn-navy:not(#_a){background:#0f172a !important;}
html body #modal-client-create .cf-btn i:not(#_a){color:#ffffff !important;}

/* v11 - Add/Edit Client form: taller (less thin) boxes, like ISP Digital */
html body #modal-client-create .cf-form .form-control:not(#_a),
html body #modal-client-create .cf-form select.form-control:not(#_a),
html body #modal-client-create .cf-form input.form-control:not(#_a){height:50px !important;min-height:50px !important;padding:10px 18px !important;font-size:17px !important;border:1.5px solid #9fb0c4 !important;border-radius:26px !important;background:#ffffff !important;line-height:1.3 !important;}
html body #modal-client-create .cf-form textarea.form-control:not(#_a){min-height:120px !important;padding:14px 18px !important;border-radius:20px !important;font-size:17px !important;border:1.5px solid #9fb0c4 !important;}
html body #modal-client-create .cf-form select.form-control:not(#_a){padding-right:36px !important;}
html body #modal-client-create .cf-inline .form-control:not(#_a){height:50px !important;}
html body #modal-client-create .cf-mini:not(#_a){height:50px !important;padding:0 20px !important;border-radius:26px !important;font-size:16px !important;}
html body #modal-client-create .cf-grid:not(#_a){gap:20px 24px !important;}
html body #modal-client-create .cf-fg>label:not(#_a){font-size:15px !important;}
html body #modal-client-create .cf-btn:not(#_a){min-height:48px !important;padding:12px 30px !important;border-radius:26px !important;}
html body #modal-client-create .cf-btn-gray:not(#_a){background:#475569 !important;color:#ffffff !important;opacity:1 !important;}
html body #modal-client-create .cf-btn-navy:not(#_a){background:#0f172a !important;color:#ffffff !important;opacity:1 !important;}
html body #modal-client-create .cf-sec:not(#_a){padding:12px 22px !important;}

/* v12 - phone/tablet: password row, dates and selects no longer squeezed or clipped */
@media (max-width:700px){
  html body #modal-client-create .cf-inline:not(#_a){flex-wrap:wrap !important;gap:8px !important;align-items:stretch !important;}
  html body #modal-client-create .cf-inline .form-control:not(#_a){flex:1 1 100% !important;min-width:100% !important;width:100% !important;}
  html body #modal-client-create .cf-inline .cf-mini:not(#_a){flex:1 1 100% !important;height:44px !important;width:100% !important;padding:0 14px !important;font-size:16px !important;}
  html body #modal-client-create .cf-form .form-control:not(#_a),
  html body #modal-client-create .cf-form select.form-control:not(#_a),
  html body #modal-client-create .cf-form input.form-control:not(#_a){height:48px !important;min-height:48px !important;padding:8px 10px 8px 14px !important;font-size:16px !important;}
  html body #modal-client-create .cf-form select.form-control:not(#_a){padding-right:28px !important;text-overflow:ellipsis;}
  html body #modal-client-create .cf-form input[type=date].form-control:not(#_a){padding-right:6px !important;font-size:15px !important;}
  html body #modal-client-create .cf-fg>label:not(#_a){font-size:14px !important;letter-spacing:.1px !important;}
  html body #modal-client-create .cf-grid:not(#_a){gap:16px 12px !important;padding:0 14px !important;}
}
