/* Xtreme'x ISP Manager v2.3 - Final Dark Glass UI */
:root {
  --primary: #2583ff;
  --primary-hover: #146fe8;
  --secondary: #55d7ff;
  --bg-dark: #07111f;
  --card-dark: rgba(12, 27, 48, 0.92);
  --border-dark: rgba(135, 178, 225, 0.16);
  --text-white: #edf6ff;
  --text-muted: #91a7bf;
  --success: #1fd49a;
  --danger: #ff5e70;
  --warning: #ffb547;
  --info: #47c7ff;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-premium: 0 18px 50px rgba(0, 0, 0, .28);
}

html { background: #06101d; }
body,
body.dark-mode {
  background:
    radial-gradient(circle at 78% 0%, rgba(29, 116, 255, .13), transparent 28%),
    radial-gradient(circle at 28% 100%, rgba(0, 196, 255, .07), transparent 32%),
    #07111f !important;
  color: var(--text-white) !important;
}

.app-container { min-height: 100vh; }
.sidebar {
  width: 248px;
  background: linear-gradient(180deg, rgba(8, 22, 40, .985), rgba(5, 15, 29, .985)) !important;
  border-right: 1px solid var(--border-dark) !important;
  box-shadow: 14px 0 45px rgba(0,0,0,.18);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1200;
}
.sidebar-header {
  min-height: 76px;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--border-dark) !important;
  background: linear-gradient(135deg, rgba(31,122,255,.08), rgba(0,191,255,.03));
}
.sidebar-brand { display:flex; align-items:center; gap:10px; min-width:0; }
.sidebar-brand-mark {
  width:38px; height:38px; border-radius:11px; display:grid; place-items:center;
  background: linear-gradient(135deg, #2f91ff, #65dcff);
  color:#04111f; font-weight:900; font-size:21px; box-shadow:0 8px 24px rgba(37,131,255,.28);
}
.sidebar-brand-copy { min-width:0; line-height:1.05; }
.sidebar-brand-copy strong { display:block; font-size:17px; color:#fff; white-space:nowrap; }
.sidebar-brand-copy small { display:block; margin-top:4px; color:#7fa6c9; font-size:10px; letter-spacing:.35px; }
.sidebar-header h2 { display:none !important; }

.menu-search-container { border-bottom: 1px solid var(--border-dark) !important; }
.menu-search-container input {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(132,177,222,.16) !important;
  color: #dcebfa !important;
}
.menu-search-container input::placeholder { color:#7189a2; }
.sidebar-user { border-bottom:1px solid var(--border-dark) !important; }
.sidebar-user:hover { background: rgba(37,131,255,.08); }
.sidebar-user .user-details h4 { color:#fff !important; }
.sidebar-user .avatar { border-color:#2f91ff !important; box-shadow:0 0 0 4px rgba(47,145,255,.08); }

.sidebar-nav { padding: 12px 9px 18px !important; overflow-y:auto !important; overflow-x:hidden !important; overscroll-behavior:contain; scrollbar-gutter:stable; min-height:0; }
.sidebar-nav ul { gap:3px !important; }
.nav-link {
  min-height: 43px;
  color: #94abc3 !important;
  border:1px solid transparent;
  border-left: 0 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  gap:12px !important;
  font-size:13.5px;
  font-weight:550;
}
.nav-link i { color:#7292b3; }
.nav-link:hover,
.nav-link.active {
  color:#fff !important;
  background: linear-gradient(135deg, rgba(37,131,255,.22), rgba(54,180,255,.08)) !important;
  border-color:rgba(73,150,255,.18) !important;
  box-shadow: inset 3px 0 0 #2f91ff;
}
.nav-link:hover i,
.nav-link.active i { color:#5db6ff !important; }
.sidebar-nav .sidebar-submenu {
  background: rgba(0,0,0,.13) !important;
  border-left:1px solid rgba(92,157,220,.18) !important;
  margin:4px 8px 7px 19px !important;
  padding:5px 6px 5px 11px !important;
}
.nav-link-sub {
  color:#819ab4 !important;
  font-size:12.5px;
  padding:8px 9px !important;
}
.nav-link-sub:hover { color:#fff !important; background:rgba(37,131,255,.1) !important; }
.sidebar-release-tag { background:rgba(0,0,0,.12) !important; border-color:var(--border-dark) !important; }

.main-content { background: transparent !important; margin-left:248px; width:calc(100% - 248px); min-height:100vh; transition:margin-left .3s cubic-bezier(.4,0,.2,1),width .3s cubic-bezier(.4,0,.2,1); }
.sidebar.collapsed ~ .main-content{margin-left:78px;width:calc(100% - 78px)}
.topbar {
  height:72px !important;
  background: rgba(7, 17, 31, .9) !important;
  backdrop-filter: blur(18px);
  border-bottom:1px solid var(--border-dark) !important;
  box-shadow:none !important;
  padding:0 24px !important;
  position:sticky; top:0; z-index:900;
}
.topbar-left h3 { color:#f2f8ff !important; letter-spacing:.1px; }
.topbar-right .nav-link {
  background:rgba(255,255,255,.035) !important;
  border:1px solid var(--border-dark) !important;
  box-shadow:none !important;
}
.btn-icon { color:#8ea9c5 !important; }
.btn-icon:hover { background:rgba(46,139,255,.12) !important; color:#68bdff !important; }
.marquee-section {
  background: linear-gradient(90deg, rgba(16,53,89,.95), rgba(12,42,73,.95)) !important;
  border-bottom:1px solid var(--border-dark) !important;
}
.content-area { padding:22px 24px 34px !important; }

.glass,
.card,
.stat-card,
.modal-content {
  background: linear-gradient(180deg, rgba(12, 28, 49, .94), rgba(8, 21, 38, .94)) !important;
  border:1px solid var(--border-dark) !important;
  box-shadow: var(--shadow-premium) !important;
}
.card { margin-bottom:18px !important; }
.card-header {
  background:rgba(255,255,255,.018) !important;
  border-bottom:1px solid var(--border-dark) !important;
  color:#eaf5ff !important;
}
.card-body { color:#d7e6f5; }

.stats-grid { gap:12px !important; margin-bottom:16px !important; }
.stat-card {
  min-height:104px;
  padding:17px 18px !important;
  border-radius:13px !important;
  box-shadow:0 10px 30px rgba(0,0,0,.18) !important;
}
.stat-card h3 { color:#fff !important; font-size:23px !important; }
.stat-card p { color:#8fa7c0 !important; }
.stat-icon { border-radius:12px !important; }

.form-control,
input.form-control,
select.form-control,
textarea.form-control {
  background: rgba(255,255,255,.035) !important;
  border:1px solid rgba(139,181,225,.18) !important;
  color:#e7f2fd !important;
  border-radius:9px !important;
  min-height:40px;
  box-shadow:none !important;
}
select.form-control option { background:#0a192b; color:#e7f2fd; }
.form-control:focus {
  border-color:rgba(68,158,255,.72) !important;
  background:rgba(40,121,218,.07) !important;
  box-shadow:0 0 0 3px rgba(37,131,255,.10) !important;
}
.form-group label { color:#a8bed4 !important; font-size:12px; font-weight:600; }
.text-gradient {
  background: linear-gradient(135deg, #6ec3ff, #a9eaff) !important;
  -webkit-background-clip:text !important; background-clip:text !important; color:transparent !important;
}

.btn { border-radius:9px !important; min-height:39px; }
.btn-primary,
.btn-indigo {
  background: linear-gradient(135deg, #2284ff, #1d72e9) !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(27,111,224,.22);
}
.btn-primary:hover,
.btn-indigo:hover { transform:translateY(-1px); filter:brightness(1.08); }
.btn-outline { background:rgba(255,255,255,.025) !important; color:#c6d8e9 !important; border:1px solid var(--border-dark) !important; }

.table { color:#dbe9f7 !important; }
.table thead th,
.table th {
  background: rgba(19, 43, 70, .72) !important;
  color:#9eb7d0 !important;
  border-bottom:1px solid var(--border-dark) !important;
  font-size:11px !important;
  letter-spacing:.25px;
  text-transform:uppercase;
}
.table td { border-bottom:1px solid rgba(135,178,225,.09) !important; }
.table tbody tr:hover { background:rgba(39,126,225,.055) !important; }

.badge { border-radius:999px !important; }

/* Modal must float above the complete app, not under the sidebar */
.modal-overlay {
  z-index:5000 !important;
  padding:22px !important;
  background:rgba(1,7,14,.76) !important;
  backdrop-filter:blur(12px) !important;
}
.modal-content {
  width:min(1180px, calc(100vw - 44px)) !important;
  max-width:min(1180px, calc(100vw - 44px)) !important;
  max-height:calc(100vh - 44px) !important;
  border-radius:16px !important;
  overflow:auto !important;
}
#modal-client-edit .modal-content { width:min(760px, calc(100vw - 44px)) !important; max-width:760px !important; }
.modal-header {
  position:sticky; top:0; z-index:5;
  background:rgba(8,22,39,.97) !important;
  border-bottom:1px solid var(--border-dark) !important;
  padding:16px 19px !important;
}
.modal-header h3 { color:#fff !important; font-size:17px !important; }
.modal-body { padding:17px 18px 20px !important; }
.modal-body .card { background:rgba(255,255,255,.018) !important; box-shadow:none !important; margin-bottom:12px !important; }
.modal-body .form-grid { grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px !important; }
.modal-close { color:#9db5cc !important; }
.modal-close:hover { color:#fff !important; }

/* Clients page */
.clients-view-container .filter-card { position:relative; overflow:hidden; }
.clients-view-container .filter-card::before {
  content:''; position:absolute; inset:0 auto 0 0; width:3px; background:#2f91ff;
}
#table-clients td, #table-clients th { white-space:nowrap; }

/* Better scrollbars */
* { scrollbar-width:thin; scrollbar-color:#284d70 #081625; }
*::-webkit-scrollbar { width:8px; height:8px; }
*::-webkit-scrollbar-track { background:#081625; }
*::-webkit-scrollbar-thumb { background:#284d70; border-radius:20px; }

@media (max-width:1100px) {
  .modal-body .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .topbar-right .nav-link span { display:none; }
}
@media (max-width:760px) {
  .sidebar { position:fixed; left:-260px; top:0; bottom:0; }
  .sidebar.mobile-open, .sidebar.open { left:0; }
  .content-area { padding:14px !important; }
  .topbar { padding:0 14px !important; }
  .modal-overlay { padding:8px !important; }
  .modal-content { width:calc(100vw - 16px) !important; max-width:calc(100vw - 16px) !important; max-height:calc(100vh - 16px) !important; }
  .modal-body .form-grid { grid-template-columns:1fr !important; }
  .topbar-right { gap:7px !important; }
}

/* v2.2 final operational dashboard / billing polish */
.dashboard-kpi-grid .stat-card { min-width:0; }
.billing-summary-grid { grid-template-columns:repeat(3,minmax(190px,1fr)) !important; }
.receipt-v22 { color:#eaf4ff; line-height:1.65; }
.receipt-v22 h2 { margin:0 0 3px; font-size:20px; }
.receipt-v22 .receipt-lines { margin-top:16px; border-top:1px dashed rgba(150,190,225,.28); border-bottom:1px dashed rgba(150,190,225,.28); padding:13px 0; }
#billing-payment-pane .table td,#billing-payment-pane .table th { white-space:nowrap; }
#billing-qr-pane .table td,#billing-extension-pane .table td { vertical-align:middle; }

@media (max-width:1450px) {
  .dashboard-kpi-grid { grid-template-columns:repeat(4,minmax(160px,1fr)) !important; }
  .second-row { grid-template-columns:repeat(3,minmax(170px,1fr)) !important; }
}
@media (max-width:1120px) {
  .dashboard-kpi-grid { grid-template-columns:repeat(3,minmax(160px,1fr)) !important; }
  .billing-summary-grid { grid-template-columns:repeat(3,minmax(150px,1fr)) !important; }
}
@media (max-width:860px) {
  .dashboard-kpi-grid,.second-row { grid-template-columns:repeat(2,minmax(145px,1fr)) !important; }
  .billing-summary-grid { grid-template-columns:1fr !important; }
}
@media (max-width:520px) {
  .dashboard-kpi-grid,.second-row { grid-template-columns:1fr !important; }
}

@media print {
  body * { visibility:hidden !important; }
  #receipt-print-area,#receipt-print-area * { visibility:visible !important; }
  #receipt-print-area { position:absolute;left:0;top:0;width:100%;padding:18px;color:#000 !important;background:#fff !important; }
  #receipt-print-area * { color:#000 !important; }
}
.marquee-section { overflow:hidden; }
.marquee-section marquee { flex:1; min-width:0; display:block; }

/* ===== Xtreme'x ISP Manager v2.3 alignment layer ===== */
/* Direct Add/Edit Client page mode: never hide beneath sidebar/topbar. */
#modal-client-create.page-mode,
#modal-client-edit.page-mode {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: auto !important;
  display: block !important;
}
#modal-client-create.page-mode .modal-content,
#modal-client-edit.page-mode .modal-content {
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  box-shadow: none !important;
  border-radius: 14px !important;
}
#modal-client-create.page-mode .modal-header,
#modal-client-edit.page-mode .modal-header {
  position: relative !important;
  top: auto !important;
  padding: 18px 20px !important;
}
#modal-client-create.page-mode .modal-close,
#modal-client-edit.page-mode .modal-close { display:none !important; }
#modal-client-create.page-mode .modal-body,
#modal-client-edit.page-mode .modal-body { padding: 18px !important; }
#modal-client-create.page-mode .form-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
.client-page-create-active .clients-view-container { display:none !important; }
.client-page-create-active .content-area { overflow:visible !important; }

/* Compact dashboard cards closer to approved reference density. */
.dashboard-kpi-grid { grid-template-columns:repeat(4,minmax(160px,1fr)) !important; gap:10px !important; }
.dashboard-kpi-grid .stat-card { min-height:86px !important; padding:13px 14px !important; }
.dashboard-kpi-grid .stat-card h3 { font-size:21px !important; }
.dashboard-kpi-grid .stat-card p { font-size:11px !important; line-height:1.2; }
.dashboard-kpi-grid .stat-icon { width:42px !important; height:42px !important; }
.second-row { grid-template-columns:repeat(4,minmax(170px,1fr)) !important; }
.second-row .stat-card { min-height:82px !important; }

/* Area-wise reporting */
.area-report-filters {
  display:grid;
  grid-template-columns:repeat(5,minmax(145px,1fr));
  gap:11px;
  align-items:end;
}
.area-summary-grid { grid-template-columns:repeat(7,minmax(135px,1fr)) !important; gap:10px !important; }
.area-summary-grid .stat-card { min-height:86px !important; padding:13px !important; }
.area-report-table-wrap { border:1px solid var(--border-dark); border-radius:12px; overflow:auto; }
.area-report-table-wrap .table { min-width:1180px; margin:0; }
.area-report-shell .card-header { gap:12px; }

/* Billing/reference tables: denser, clear numeric columns. */
.billing-view-container .table th,
.billing-view-container .table td,
.area-report-table-wrap .table th,
.area-report-table-wrap .table td { padding:9px 10px !important; }
.billing-view-container .table td:nth-child(n+4),
.area-report-table-wrap .table td:nth-child(n+4) { font-variant-numeric: tabular-nums; }

/* Make long forms and tables safely scroll without clipping. */
.content-area { min-width:0 !important; overflow-x:hidden; }
.main-content { min-width:0 !important; }
.table-responsive { max-width:100%; }

@media (max-width:1400px) {
  .dashboard-kpi-grid { grid-template-columns:repeat(4,minmax(150px,1fr)) !important; }
  .area-report-filters { grid-template-columns:repeat(3,minmax(160px,1fr)); }
  .area-summary-grid { grid-template-columns:repeat(4,minmax(150px,1fr)) !important; }
  #modal-client-create.page-mode .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:1050px) {
  .dashboard-kpi-grid,.second-row { grid-template-columns:repeat(2,minmax(160px,1fr)) !important; }
  .area-report-filters { grid-template-columns:repeat(2,minmax(150px,1fr)); }
  .area-summary-grid { grid-template-columns:repeat(2,minmax(150px,1fr)) !important; }
  #modal-client-create.page-mode .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:650px) {
  .area-report-filters,.area-summary-grid,.dashboard-kpi-grid,.second-row { grid-template-columns:1fr !important; }
  #modal-client-create.page-mode .form-grid { grid-template-columns:1fr !important; }
}
.client-create-actionbar { position:sticky; bottom:0; z-index:4; display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin:18px -18px -18px; padding:12px 18px; background:rgba(7,19,34,.96); border-top:1px solid var(--border-dark); backdrop-filter:blur(14px); }
#modal-client-create.page-mode .client-create-actionbar { margin:18px 0 0; border-radius:0 0 12px 12px; }
.timeline-item-v23{position:relative;display:grid;grid-template-columns:14px 1fr;gap:10px;padding:8px 0;border-bottom:1px solid rgba(135,178,225,.08)}
.timeline-dot-v23{width:9px;height:9px;border-radius:50%;background:#2f91ff;box-shadow:0 0 0 4px rgba(47,145,255,.12);margin-top:5px}
.timeline-item-v23{position:relative;display:grid;grid-template-columns:14px 1fr;gap:10px;padding:8px 0;border-bottom:1px solid rgba(135,178,225,.08)}
.timeline-dot-v23{width:9px;height:9px;border-radius:50%;background:#2f91ff;box-shadow:0 0 0 4px rgba(47,145,255,.12);margin-top:5px}

/* v2.3 ISP reference dashboard lower widgets */
.dashboard-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.dashboard-reference-grid .dashboard-top-unpaid-card{grid-column:1/-1}
.dashboard-top-unpaid-card .card-body{max-height:420px;overflow:auto}
.dashboard-top-unpaid-card table{min-width:650px}
@media(max-width:900px){.dashboard-reference-grid{grid-template-columns:1fr}.dashboard-reference-grid .dashboard-top-unpaid-card{grid-column:auto}}

/* v2.3 operational network topology */
.network-topology-v23{display:flex;flex-direction:column;gap:16px}
.topology-olt-v23{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:22px;align-items:start;padding:14px;border:1px solid rgba(76,145,215,.18);border-radius:14px;background:rgba(9,26,45,.42)}
.topology-node-v23{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:12px;border:1px solid rgba(110,170,230,.18);background:rgba(11,31,54,.72)}
.topology-node-v23>i{font-size:20px;margin-top:2px;color:#56b9ff}
.topology-node-olt{border-color:rgba(47,145,255,.4);box-shadow:inset 0 0 24px rgba(47,145,255,.06)}
.topology-links-v23{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:10px}
.topology-branch-v23{position:relative}.topology-line-v23{position:absolute;left:-14px;top:26px;width:14px;border-top:1px dashed rgba(68,166,255,.45)}
.topology-node-box>i{color:#37d6b2}.topology-node-unassigned{border-color:rgba(255,175,54,.36)}.topology-node-unassigned>i{color:#ffb33b}
.topology-unassigned-v23{padding:14px;border:1px dashed rgba(255,175,54,.3);border-radius:14px;background:rgba(78,49,7,.08)}
.topology-unassigned-v23 h4{margin:0 0 10px;color:#ffc15a}
@media(max-width:1000px){.topology-olt-v23{grid-template-columns:1fr}.topology-links-v23{grid-template-columns:1fr}.topology-line-v23{display:none}}
.billing-reference-filters{row-gap:8px}.billing-reference-filters .form-control{min-width:130px}

/* v2.3 Client Add/Edit visual alignment */
#modal-client-edit .modal-content{width:min(1120px,calc(100vw - 44px)) !important;max-width:1120px !important}
#modal-client-edit .modal-body .form-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
#modal-client-create.page-mode{overflow:visible !important}
.client-page-create-active #content-area{padding-left:28px !important;padding-right:28px !important;overflow:visible !important}
#modal-client-create.page-mode .modal-content{border:1px solid rgba(94,160,225,.2) !important}
#modal-client-create.page-mode .modal-body>.card{padding:18px !important}
#modal-client-create.page-mode .modal-body>.card h4{font-size:15px;letter-spacing:.1px}
@media(max-width:1000px){#modal-client-edit .modal-body .form-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media(max-width:650px){#modal-client-edit .modal-body .form-grid{grid-template-columns:1fr !important}.client-page-create-active #content-area{padding-left:12px !important;padding-right:12px !important}}

/* =========================================================
   Xtreme'x ISP Manager v2.4 — locked reference UI + dual theme
   Dark: premium navy operations dashboard.
   Light: clean white/blue customer-form workspace.
   ========================================================= */

/* Reference header/search */
.reference-topbar-left{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
.reference-mobile-menu{display:none!important;background:transparent!important;border:0!important;font-size:18px;padding:8px!important}
.global-search-shell{height:40px;min-width:320px;max-width:520px;flex:1;display:flex;align-items:center;gap:10px;padding:0 14px;border-radius:11px;border:1px solid rgba(124,174,226,.22);background:rgba(255,255,255,.045);color:#87a4c0}
.global-search-shell.compact{min-width:240px;max-width:460px}
.global-search-shell input{width:100%;border:0!important;outline:0!important;background:transparent!important;color:inherit!important;font:inherit;padding:0!important;box-shadow:none!important}
.global-search-shell input::placeholder{color:#6f89a4}
.reference-page-title{margin:0;font-size:16px;font-weight:600;color:#e9f4ff;white-space:nowrap}
.reference-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:12px 14px;border:1px solid var(--border-dark);border-radius:13px;background:rgba(12,28,49,.88)}
.reference-table-card{border:1px solid var(--border-dark);border-radius:14px;overflow:hidden;background:rgba(12,28,49,.9);box-shadow:var(--shadow-premium)}
.reference-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 16px}
.reference-page-head h2{margin:2px 0 3px;font-size:23px}.reference-page-head p{margin:0;color:var(--text-muted)}.reference-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:10px;color:#5db6ff;font-weight:700}

/* Sidebar is intentionally dark in both themes, matching the approved references. */
body.light-mode .sidebar{background:linear-gradient(180deg,#0a1b30,#071523)!important;border-color:#15314d!important;color:#edf6ff!important}
body.light-mode .sidebar-header{background:linear-gradient(135deg,rgba(31,122,255,.09),rgba(0,191,255,.025))!important;border-color:#15314d!important}
body.light-mode .sidebar-brand-copy strong,body.light-mode .sidebar-user .user-details h4{color:#fff!important}
body.light-mode .sidebar-brand-copy small,body.light-mode .sidebar-user .user-details span{color:#7fa6c9!important}
body.light-mode .menu-search-container{border-color:#15314d!important}
body.light-mode .menu-search-container input{background:rgba(255,255,255,.035)!important;border-color:rgba(132,177,222,.16)!important;color:#dcebfa!important}
body.light-mode .nav-link{color:#9bb0c6!important}
body.light-mode .nav-link:hover,body.light-mode .nav-link.active{color:#fff!important;background:linear-gradient(135deg,rgba(37,131,255,.26),rgba(54,180,255,.09))!important;border-color:rgba(73,150,255,.2)!important;box-shadow:inset 3px 0 0 #2f91ff}
body.light-mode .nav-link i{color:#7e9cbb!important}body.light-mode .nav-link:hover i,body.light-mode .nav-link.active i{color:#65baff!important}
body.light-mode .sidebar-nav .sidebar-submenu{background:rgba(0,0,0,.16)!important;border-left-color:#173a5c!important}
body.light-mode .nav-link-sub{color:#89a2bb!important}body.light-mode .nav-link-sub:hover,body.light-mode .nav-link-sub.active{color:#fff!important;background:rgba(37,131,255,.12)!important}
body.light-mode .sidebar-release-tag{background:rgba(0,0,0,.14)!important;border-color:#15314d!important}

/* Light mode main surface */
body.light-mode{--bg-dark:#eef4fa;--card-dark:#fff;--border-dark:#d9e4ef;--text-white:#15263a;--text-muted:#64788f;--shadow-premium:0 8px 28px rgba(21,50,82,.08);background:#eef4fa!important;color:#15263a!important}
body.light-mode .main-content{background:linear-gradient(180deg,#f7fbff 0,#eef4fa 60%,#e9f1f8 100%)!important}
body.light-mode .topbar{background:#0b2038!important;border-color:#173a5b!important;color:#edf6ff!important;box-shadow:0 2px 10px rgba(13,39,69,.16)!important}
body.light-mode .reference-page-title{color:#eaf5ff!important}
body.light-mode .global-search-shell{background:#122b48;border-color:#2a4b6d;color:#d7e7f7}
body.light-mode .global-search-shell input::placeholder{color:#9db1c6}
body.light-mode .topbar .btn-icon,body.light-mode .topbar .nav-link{color:#d9e9f8!important}
body.light-mode .marquee-section{background:linear-gradient(90deg,#174d80,#133e69)!important;border-color:#255b87!important;color:#fff!important}
body.light-mode .content-area{color:#15263a}
body.light-mode .glass,body.light-mode .card,body.light-mode .stat-card,body.light-mode .modal-content,body.light-mode .reference-filter-bar,body.light-mode .reference-table-card{background:#fff!important;border-color:#dce6f0!important;box-shadow:0 8px 28px rgba(28,60,94,.07)!important;color:#15263a!important}
body.light-mode .card-header,body.light-mode .modal-header{background:#f8fbfe!important;border-color:#e1e9f1!important;color:#15263a!important}
body.light-mode .card-body{color:#273a50!important}
body.light-mode .stat-card h3,body.light-mode .modal-header h3{color:#14263b!important}
body.light-mode .stat-card p,body.light-mode .text-muted{color:#6f8296!important}
body.light-mode .form-control,body.light-mode input.form-control,body.light-mode select.form-control,body.light-mode textarea.form-control{background:#fff!important;border-color:#cedbe7!important;color:#1b2d42!important;box-shadow:0 1px 2px rgba(20,48,77,.03)!important}
body.light-mode .form-control::placeholder,body.light-mode textarea.form-control::placeholder{color:#9aaabc!important}
body.light-mode select.form-control option{background:#fff!important;color:#1b2d42!important}
body.light-mode .form-control:focus{background:#fff!important;border-color:#338dff!important;box-shadow:0 0 0 3px rgba(37,131,255,.10)!important}
body.light-mode .form-group label{color:#344a62!important}
body.light-mode .btn-outline{background:#fff!important;color:#36516d!important;border-color:#cddbe8!important}
body.light-mode .table{color:#22384f!important}body.light-mode .table thead th,body.light-mode .table th{background:#f3f7fb!important;color:#526b84!important;border-color:#dce5ef!important}body.light-mode .table td{border-color:#e8eef4!important}body.light-mode .table tbody tr:hover{background:#f6faff!important}
body.light-mode *{scrollbar-color:#a9bbcd #eef4fa}body.light-mode *::-webkit-scrollbar-track{background:#eef4fa}body.light-mode *::-webkit-scrollbar-thumb{background:#a9bbcd}
body.light-mode .text-gradient{background:linear-gradient(135deg,#176ee7,#139ad4)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}

/* Reference Add New Customer layout */
.reference-customer-form{max-width:none!important;width:100%!important;overflow:visible!important;border-radius:14px!important}
.reference-form-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:15px 18px!important}
.reference-title-stack{display:flex;align-items:center;gap:13px;min-width:0}.reference-title-stack h3{margin:0;font-size:19px!important}.reference-title-stack p{margin:3px 0 0;color:var(--text-muted);font-size:12px}.reference-title-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#227cff,#1769dc);color:#fff;font-size:18px;box-shadow:0 9px 20px rgba(30,111,224,.22)}
.reference-back-btn{margin-left:auto}.reference-customer-layout{display:block}.reference-form-main{min-width:0;width:100%}.reference-form-aside{display:none!important}
.reference-form-section{border:1px solid rgba(121,172,222,.17);border-radius:13px;background:rgba(255,255,255,.018);padding:14px;margin-bottom:12px}.reference-section-heading{display:flex;align-items:flex-start;gap:10px;margin-bottom:13px}.reference-section-heading>span{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#2187ff,#1768df);color:#fff;font-weight:800;box-shadow:0 6px 14px rgba(37,131,255,.2)}.reference-section-heading h4{margin:0;color:#eaf5ff;font-size:15px}.reference-section-heading h4 i{color:#55b6ff;margin-right:5px}.reference-section-heading p{margin:2px 0 0;color:#829ab3;font-size:11px}
.reference-personal-grid{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px}.reference-fields-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 11px}.reference-fields-grid.four-col{grid-template-columns:repeat(4,minmax(0,1fr))}.reference-fields-grid.five-col{grid-template-columns:repeat(5,minmax(0,1fr))}.reference-fields-grid .span-2{grid-column:span 2}.reference-fields-grid .form-group{min-width:0;margin:0}.reference-fields-grid .form-group label{display:block;margin-bottom:5px;line-height:1.2}.reference-fields-grid .form-control{width:100%;min-width:0}
.reference-upload-tile>label{display:block;margin-bottom:5px;font-size:12px;font-weight:600;color:#a8bed4}.upload-drop-zone{height:140px;border:1px dashed rgba(116,178,235,.42);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;background:rgba(28,90,148,.06);text-align:center}.upload-drop-zone>i{font-size:28px;color:#7b9dbd}.upload-drop-zone strong{font-size:12px}.upload-drop-zone small{font-size:10px;color:#7d94ab}.upload-drop-zone .btn{margin-top:5px}.file-picker{height:40px;display:flex!important;align-items:center;gap:8px;padding:0 11px;border:1px solid rgba(139,181,225,.18);border-radius:9px;background:rgba(255,255,255,.035);cursor:pointer;font-size:11px!important;color:#9ec1df!important}.file-picker i{color:#64b9ff}
.input-with-icon{position:relative}.input-with-icon>i{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:11px;color:#7a98b5;z-index:2}.input-with-icon .form-control{padding-left:30px!important}.coordinate-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.inline-check{display:inline-flex!important;align-items:center;gap:5px;margin-left:8px;font-weight:500!important;font-size:10px!important;color:#8198af!important}.reference-map-preview{margin-top:10px;border:1px dashed rgba(85,170,255,.25);border-radius:10px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,rgba(21,96,160,.08),rgba(21,157,191,.04))}.reference-map-preview>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.reference-map-preview i{color:#ff5367}.reference-map-preview small{color:#7d96af}
.reference-toggle-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.reference-toggle-row label{position:relative;cursor:pointer}.reference-toggle-row input{position:absolute;opacity:0}.reference-toggle-row span{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid rgba(127,173,217,.18);border-radius:9px;background:rgba(255,255,255,.025);color:#93abc2;font-size:11px}.reference-toggle-row input:checked+span{background:rgba(33,135,255,.12);border-color:rgba(33,135,255,.45);color:#e8f5ff}.reference-toggle-row input:checked+span i{color:#58b7ff}
.reference-side-card{padding:13px;border:1px solid rgba(121,172,222,.18);border-radius:12px;background:linear-gradient(180deg,rgba(16,37,62,.9),rgba(10,27,47,.9));box-shadow:0 10px 26px rgba(0,0,0,.14)}.reference-side-card h4{margin:0 0 10px;font-size:13px;color:#eaf5ff}.reference-side-card h4 i{color:#55b6ff;margin-right:5px}.reference-side-card ul{margin:0;padding-left:18px;color:#91a8bf;font-size:11px;line-height:1.65}.profile-preview{height:135px;border-radius:10px;background:rgba(255,255,255,.04);display:grid;place-items:center;margin-bottom:9px;overflow:hidden}.profile-preview>i{font-size:70px;color:#8198af}.profile-preview img{width:100%;height:100%;object-fit:cover}.document-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.document-preview-grid>div{min-height:90px;border:1px dashed rgba(116,178,235,.32);border-radius:9px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;text-align:center;color:#88a2bc;font-size:10px}.document-preview-grid i{font-size:24px;color:#68baff}.sms-preview-card{background:linear-gradient(180deg,rgba(6,91,66,.2),rgba(7,55,53,.22));border-color:rgba(36,205,155,.24)}.sms-preview-card h4 i{color:#2bd8a2}.sms-preview-card p{font-size:10.5px;line-height:1.5;color:#b6cbdc;margin:0 0 8px}.sms-preview-card strong{font-size:11px;color:#eafff7}.sms-preview-card small{display:block;margin-top:3px;color:#8db8a9;font-size:9.5px}
.reference-actionbar{margin-top:12px!important}.actionbar-spacer{flex:1}

/* Light customer-form appearance exactly follows approved white/blue reference while sidebar/topbar stay navy. */
body.light-mode .reference-customer-form{background:transparent!important;border:0!important;box-shadow:none!important}
body.light-mode .reference-form-header{background:#fff!important;border:1px solid #dce7f1!important;border-radius:13px!important;margin-bottom:10px!important;box-shadow:0 5px 18px rgba(37,71,106,.05)!important}
body.light-mode .reference-title-stack h3{color:#162a42!important}.reference-title-stack p{color:#71869b!important}
body.light-mode .reference-form-section{background:#fff;border-color:#dce7f1;box-shadow:0 5px 18px rgba(37,71,106,.045)}
body.light-mode .reference-section-heading h4{color:#17304c}body.light-mode .reference-section-heading p{color:#7c90a5}
body.light-mode .reference-upload-tile>label{color:#344a62}.reference-upload-tile .upload-drop-zone{background:#f7fbff;border-color:#b8cee2}.reference-upload-tile .upload-drop-zone strong{color:#344b63}.reference-upload-tile .upload-drop-zone small{color:#8799aa}
body.light-mode .file-picker{background:#fff;border-color:#cedbe7;color:#4b6782!important}
body.light-mode .reference-map-preview{background:linear-gradient(135deg,#f5fbff,#f1f8fd);border-color:#c7dced}.reference-map-preview small{color:#7b8fa3}
body.light-mode .reference-toggle-row span{background:#fff;border-color:#d6e2ec;color:#526b83}.reference-toggle-row input:checked+span{background:#eef6ff;border-color:#65aaff;color:#1f5f9f}
body.light-mode .reference-side-card{background:#fff;border-color:#dce7f1;box-shadow:0 5px 18px rgba(37,71,106,.05)}body.light-mode .reference-side-card h4{color:#19334f}.reference-side-card ul{color:#617990}
body.light-mode .profile-preview{background:#f3f7fb}.profile-preview>i{color:#c2cbd4}
body.light-mode .document-preview-grid>div{border-color:#c8d9e8;color:#6b8298;background:#fbfdff}
body.light-mode .sms-preview-card{background:linear-gradient(180deg,#ebfff6,#f5fffb);border-color:#bfead7}.sms-preview-card p{color:#3f5f56}.sms-preview-card strong{color:#184d3b}.sms-preview-card small{color:#678d7f}
body.light-mode .reference-actionbar{background:rgba(246,250,253,.97)!important;border-color:#d9e5ee!important}

@media(max-width:1380px){.reference-fields-grid.five-col{grid-template-columns:repeat(4,minmax(0,1fr))}.reference-fields-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1100px){.reference-fields-grid,.reference-fields-grid.four-col,.reference-fields-grid.five-col{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-personal-grid{grid-template-columns:135px 1fr}.reference-page-title{display:none}}
@media(max-width:760px){.reference-mobile-menu{display:inline-flex!important}.global-search-shell{min-width:0}.reference-form-header{align-items:flex-start!important}.reference-back-btn{display:none}.reference-personal-grid{grid-template-columns:1fr}.reference-upload-tile{max-width:220px}.reference-fields-grid,.reference-fields-grid.four-col,.reference-fields-grid.five-col{grid-template-columns:1fr}.reference-fields-grid .span-2{grid-column:auto}.coordinate-pair{grid-template-columns:1fr}.reference-map-preview{align-items:flex-start;flex-direction:column}.reference-actionbar{position:relative!important;bottom:auto!important}.actionbar-spacer{display:none}.reference-actionbar .btn{flex:1 1 45%}}

/* v2.4 locked dashboard reference */
.reference-dashboard{min-width:0}.reference-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:15px}.reference-dashboard-head h2{margin:0;font-size:24px;color:#eff7ff}.reference-dashboard-head h2 i{color:#58b7ff;margin-right:7px}.reference-dashboard-head p{margin:3px 0 0;color:#7f98b1;font-size:12px}.dashboard-quote{color:#c6d8e9;font-family:Georgia,serif;font-style:italic;text-align:right;font-size:13px}.dashboard-quote small{display:block;margin-top:5px;color:#6286aa;font-family:inherit}
.reference-kpi-row{display:grid;grid-template-columns:repeat(7,minmax(145px,1fr));gap:11px;margin-bottom:12px}.reference-kpi{min-height:94px;padding:13px 14px;border-radius:12px;border:1px solid rgba(135,178,225,.13);display:flex;align-items:center;gap:11px;box-shadow:0 10px 26px rgba(0,0,0,.15);overflow:hidden;position:relative}.reference-kpi:after{content:'';position:absolute;inset:auto 0 0;height:3px;background:currentColor;opacity:.7}.reference-kpi>i{width:43px;height:43px;border-radius:11px;display:grid;place-items:center;font-size:17px;background:rgba(255,255,255,.09)}.reference-kpi div{min-width:0}.reference-kpi span{display:block;color:#bdd0e1;font-size:10.5px}.reference-kpi strong{display:block;margin:3px 0 1px;color:#fff;font-size:20px;line-height:1.05;white-space:nowrap}.reference-kpi small{display:block;color:#7f97af;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reference-kpi.blue{color:#328dff;background:linear-gradient(135deg,rgba(18,74,147,.92),rgba(13,47,87,.92))}.reference-kpi.green{color:#14d999;background:linear-gradient(135deg,rgba(4,99,76,.86),rgba(12,56,55,.9))}.reference-kpi.red{color:#ff5067;background:linear-gradient(135deg,rgba(120,35,53,.85),rgba(72,26,41,.9))}.reference-kpi.amber{color:#ffad17;background:linear-gradient(135deg,rgba(112,67,13,.88),rgba(67,46,24,.9))}.reference-kpi.purple{color:#9c5cff;background:linear-gradient(135deg,rgba(69,41,123,.9),rgba(38,33,75,.9))}.reference-kpi.teal{color:#20d6a0;background:linear-gradient(135deg,rgba(4,98,81,.88),rgba(14,55,54,.9))}.reference-kpi.rose{color:#ff4d73;background:linear-gradient(135deg,rgba(124,32,60,.88),rgba(67,25,44,.9))}
.reference-dashboard-grid{display:grid;gap:12px;margin-bottom:12px}.reference-dashboard-grid.top-grid{grid-template-columns:minmax(0,1.9fr) minmax(310px,1.15fr) minmax(260px,.9fr)}.reference-dashboard-grid.mid-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.reference-dashboard-grid.bottom-grid{grid-template-columns:minmax(0,1.25fr) minmax(0,1.2fr) minmax(300px,.9fr)}
.reference-panel{background:linear-gradient(180deg,rgba(12,28,49,.96),rgba(7,20,36,.96));border:1px solid rgba(135,178,225,.15);border-radius:12px;box-shadow:0 12px 28px rgba(0,0,0,.16);min-width:0;overflow:hidden}.reference-panel-head{min-height:43px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid rgba(135,178,225,.11)}.reference-panel-head h3{margin:0;color:#ecf6ff;font-size:13px}.reference-panel-head h3 span{font-weight:400;color:#758fa9}.mini-action{border:1px solid rgba(76,152,229,.25);background:rgba(33,127,229,.10);color:#8ec7ff;border-radius:7px;padding:5px 8px;font-size:9.5px;cursor:pointer}.mini-action:hover{background:rgba(33,127,229,.2);color:#fff}.reference-chart-wrap{height:245px;padding:10px 12px}.billing-donut-layout{height:245px;padding:12px;display:grid;grid-template-columns:1fr .8fr;align-items:center;gap:12px}.donut-box{height:185px;position:relative}.donut-center{position:absolute;inset:0;display:grid;place-content:center;text-align:center;pointer-events:none}.donut-center strong{font-size:21px;color:#fff}.donut-center span{font-size:10px;color:#8da6bf}.billing-legend{display:flex;flex-direction:column;gap:12px}.billing-legend>div{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;font-size:10.5px;color:#9fb3c7}.billing-legend i{width:9px;height:9px;border-radius:3px}.billing-legend i.paid{background:#13d58f}.billing-legend i.partial{background:#ffb52e}.billing-legend i.unpaid{background:#ff4f66}.billing-legend strong{color:#e9f4ff}.network-status-list{padding:6px 12px}.network-status-list>div{display:grid;grid-template-columns:25px 1fr auto;align-items:center;gap:8px;min-height:44px;border-bottom:1px solid rgba(135,178,225,.08);font-size:10.5px}.network-status-list>div:last-child{border-bottom:0}.network-status-list i{color:#74b9ff}.network-status-list span{color:#a9bdd1}.network-status-list b{color:#57e0ad;font-weight:600}
.device-card{min-height:160px}.device-summary{display:grid;grid-template-columns:45px 1fr auto;align-items:center;gap:10px;padding:12px}.device-icon{width:42px;height:42px;border-radius:9px;display:grid;place-items:center;background:#031321;color:#45a9ff;font-size:18px}.device-icon.olt{color:#84c8ff}.device-summary strong{display:block;color:#eaf5ff;font-size:11.5px}.device-summary span{display:block;color:#8199b0;font-size:9.5px;margin-top:3px}.status-pill{padding:5px 7px;border-radius:999px;font-size:9px}.status-pill.online{background:rgba(20,213,143,.16);color:#3ce7aa}.device-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0 12px 12px}.device-actions button{border:1px solid rgba(135,178,225,.15);background:rgba(255,255,255,.02);color:#8fa9c2;border-radius:7px;padding:7px 6px;font-size:9.5px;cursor:pointer}.device-actions button:hover{color:#fff;background:rgba(37,131,255,.09)}.alert-list{padding:7px 11px}.alert-row{display:grid;grid-template-columns:18px 1fr auto;gap:7px;align-items:center;min-height:31px;border-bottom:1px solid rgba(135,178,225,.07);font-size:9.5px}.alert-row:last-child{border-bottom:0}.alert-row span{color:#9cb3c9}.alert-row time{color:#6b86a1}.alert-row.danger i{color:#ff5369}.alert-row.warning i{color:#ffb42c}.alert-row.info i{color:#4eb8ff}.alert-row.success i{color:#27d99e}
.reference-map-visual{height:272px;position:relative;overflow:hidden;background:radial-gradient(circle at 30% 30%,rgba(55,142,91,.35),transparent 25%),radial-gradient(circle at 70% 60%,rgba(34,89,147,.3),transparent 25%),linear-gradient(135deg,#142c2a,#1e3445 45%,#132735)}.map-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:28px 28px;transform:rotate(8deg) scale(1.2)}.map-pin{position:absolute;font-size:22px;filter:drop-shadow(0 4px 5px rgba(0,0,0,.4))}.map-pin.online{color:#1fda8f}.map-pin.offline{color:#ff5067}.map-pin.warning{color:#ffad25}.map-pin.p1{left:22%;top:27%}.map-pin.p2{left:65%;top:42%}.map-pin.p3{left:50%;top:70%}.map-pin.p4{left:78%;top:24%}.map-popup{position:absolute;left:34%;top:33%;min-width:170px;padding:10px;border-radius:9px;background:rgba(6,22,35,.92);border:1px solid rgba(103,173,235,.22);box-shadow:0 12px 24px rgba(0,0,0,.25)}.map-popup strong{display:block;color:#fff;font-size:10px}.map-popup span{display:block;color:#87a0b7;font-size:9px;margin:3px 0 7px}.map-popup button{border:0;border-radius:6px;background:#1f80ef;color:#fff;padding:5px 8px;font-size:9px;cursor:pointer}
.mini-topology{min-height:272px;display:flex;align-items:center;flex-direction:column;padding:15px;color:#91abc4}.topo-node{min-width:95px;padding:8px 11px;border:1px solid rgba(91,164,232,.25);border-radius:8px;background:rgba(4,20,34,.78);display:flex;align-items:center;justify-content:center;gap:7px;font-size:9.5px}.topo-node i{color:#59b7ff}.topo-node.cloud{border:0;background:transparent;flex-direction:column}.topo-node.cloud i{font-size:27px}.topo-node.core{border-color:#3a91df}.topo-line.v{height:22px;border-left:1px solid #2f80c7}.topo-split{position:relative;margin-top:28px;width:78%;display:grid;grid-template-columns:1fr 1fr;gap:30px}.topo-split:before{content:'';position:absolute;top:-15px;left:25%;right:25%;border-top:1px solid #2f80c7}.topo-split>div{position:relative}.topo-split>div>span{position:absolute;top:-15px;left:50%;height:15px;border-left:1px solid #2f80c7}.topo-customers{margin-top:30px;display:flex;gap:28px}.topo-customers i{font-size:17px}.topo-customers i.online{color:#20dc9c}.topo-customers i.warning{color:#ffac20}.topo-customers i.offline{color:#ff5369}.right-stack{display:grid;grid-template-rows:1fr 1fr;gap:12px}.compact-table table{width:100%;border-collapse:collapse}.compact-table th,.compact-table td{padding:7px 9px;border-bottom:1px solid rgba(135,178,225,.08);font-size:9px;text-align:left}.compact-table th{color:#708aa4;font-weight:600}.compact-table td{color:#9db4ca}.compact-table td strong{display:block;color:#dbe9f7;font-size:9.5px}.compact-table td small{display:block;color:#6d86a0;font-size:8px}.due-text{color:#ff6477!important;font-weight:700}

/* Light mode keeps dashboard readable but intentionally less glassy. */
body.light-mode .reference-dashboard-head h2{color:#17304b}.reference-dashboard-head p{color:#70859a}body.light-mode .dashboard-quote{color:#506d89}body.light-mode .reference-panel{background:#fff;border-color:#dbe6f0;box-shadow:0 8px 25px rgba(25,58,92,.06)}body.light-mode .reference-panel-head{border-color:#e5edf4}body.light-mode .reference-panel-head h3{color:#17304a}.reference-panel-head h3 span{color:#7c90a4}body.light-mode .network-status-list>div,body.light-mode .alert-row,body.light-mode .compact-table th,body.light-mode .compact-table td{border-color:#e8eef4}body.light-mode .network-status-list span,body.light-mode .compact-table td{color:#5d748b}body.light-mode .network-status-list b{color:#128a68}body.light-mode .billing-legend>div{color:#5c7288}body.light-mode .billing-legend strong,body.light-mode .donut-center strong{color:#17304b}body.light-mode .donut-center span{color:#72869a}body.light-mode .device-summary strong{color:#17304b}body.light-mode .device-summary span{color:#72879c}body.light-mode .device-icon{background:#f1f7fc}body.light-mode .device-actions button{background:#f8fbfe;border-color:#dae5ef;color:#55708b}body.light-mode .alert-row span{color:#5f768d}body.light-mode .alert-row time{color:#8da0b3}body.light-mode .compact-table th{color:#667e95}body.light-mode .compact-table td strong{color:#1b334d}

@media(max-width:1500px){.reference-kpi-row{grid-template-columns:repeat(4,minmax(150px,1fr))}.reference-dashboard-grid.top-grid{grid-template-columns:1.5fr 1fr}.reference-dashboard-grid.top-grid .network-status-panel{grid-column:1/-1}.reference-dashboard-grid.bottom-grid{grid-template-columns:1fr 1fr}.reference-dashboard-grid.bottom-grid .right-stack{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:auto}}
@media(max-width:1050px){.reference-kpi-row{grid-template-columns:repeat(2,minmax(150px,1fr))}.reference-dashboard-grid.top-grid,.reference-dashboard-grid.mid-grid,.reference-dashboard-grid.bottom-grid{grid-template-columns:1fr}.reference-dashboard-grid.top-grid .network-status-panel,.reference-dashboard-grid.bottom-grid .right-stack{grid-column:auto}.reference-dashboard-grid.bottom-grid .right-stack{grid-template-columns:1fr}.dashboard-quote{display:none}}
@media(max-width:600px){.reference-kpi-row{grid-template-columns:1fr}.reference-dashboard-head h2{font-size:20px}.billing-donut-layout{grid-template-columns:1fr;height:auto}.donut-box{height:180px}.reference-chart-wrap{height:210px}}
body.light-mode .sidebar.collapsed .menu-item-has-child:hover .sidebar-submenu{background:#0b2038!important;border-color:#244766!important;box-shadow:0 12px 30px rgba(5,20,36,.28)!important}
body.light-mode .sidebar.collapsed .sidebar-submenu .nav-link-sub{color:#9bb2c8!important}
body.light-mode .sidebar.collapsed .sidebar-submenu .nav-link-sub:hover,body.light-mode .sidebar.collapsed .sidebar-submenu .nav-link-sub.active{color:#fff!important;background:rgba(37,131,255,.14)!important}

/* v2.5.3 UX hotfix: independent fixed sidebar and full-width Add Client form */
@media(min-width:993px){
  #sidebar.sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;height:100vh!important;overflow:hidden!important}
  #sidebar .sidebar-nav{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;min-height:0!important}
  #sidebar .sidebar-header,#sidebar .menu-search-container,#sidebar .sidebar-user,#sidebar .sidebar-release-tag{flex:0 0 auto}
  #sidebar + .main-content{margin-left:248px!important;width:calc(100% - 248px)!important}
  #sidebar.collapsed + .main-content{margin-left:78px!important;width:calc(100% - 78px)!important}
}
@media(max-width:992px){#sidebar + .main-content,#sidebar.collapsed + .main-content{margin-left:0!important;width:100%!important}}
.reference-customer-layout{display:block!important}.reference-form-main{width:100%!important}.reference-form-aside{display:none!important}
.reference-customer-form .reference-fields-grid.five-col{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1450px){.reference-customer-form .reference-fields-grid.five-col{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* ============================================================
   v2.6 Consolidated UI: top profile, configuration, account page,
   combined operations dashboard and final sidebar polish
   ============================================================ */
.sidebar-release-tag{display:none!important}
.sidebar-brand-copy small{font-size:10px!important;letter-spacing:.55px!important}
.sidebar-nav{padding-bottom:22px!important}
.nav-link i,.nav-link-sub i{min-width:18px;text-align:center}
.xtreme-top-actions{display:flex;align-items:center;gap:10px!important;flex-shrink:0}
.top-action-button{display:flex;align-items:center;gap:8px;min-height:38px;padding:0 13px;border:1px solid rgba(121,166,214,.2);border-radius:8px;color:#e7f3ff;text-decoration:none;background:rgba(255,255,255,.035);font-size:12.5px;font-weight:600;white-space:nowrap}
.top-action-button:hover{background:rgba(37,131,255,.13);color:#fff}.top-action-button.monitoring i{color:#21dda5}.top-action-button>i{color:#62bdff}

/* v3.0.4 read-only MikroTik reconciliation */
.mikrotik-reconcile-summary{display:grid;grid-template-columns:repeat(8,minmax(82px,1fr));gap:7px}
.mikrotik-reconcile-summary>.reconcile-summary-card{appearance:none;text-align:left;font:inherit;border:1px solid rgba(255,255,255,.28);background:#445566;border-radius:8px;padding:9px 10px;min-width:0;cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.mikrotik-reconcile-summary>.reconcile-summary-card:hover{transform:translateY(-1px);border-color:#5aaeff;box-shadow:0 5px 14px rgba(26,105,181,.18)}
.mikrotik-reconcile-summary>.reconcile-summary-card.active{border-color:#37a1ff;background:#174e76;box-shadow:0 0 0 2px rgba(55,161,255,.18)}
.mikrotik-reconcile-summary span{display:block;color:#fff;font-size:10.5px;font-weight:800;line-height:1.2;text-transform:uppercase;letter-spacing:.15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.28)}
.mikrotik-reconcile-summary strong{display:block;margin-top:4px;font-size:19px;line-height:1;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3)}
.mikrotik-reconcile-summary .success{background:#28735e;border-color:#3ca989}
.mikrotik-reconcile-summary .warning{background:#8a6119;border-color:#d9a83b}
.mikrotik-reconcile-summary .danger{background:#87414d;border-color:#cf6677}
.mikrotik-reconcile-summary .indigo{background:#344f9b;border-color:#6280d8}
.mikrotik-reconcile-summary .orange{background:#9a4f16;border-color:#e58a3a}
.mikrotik-reconcile-summary .slate{background:#536574;border-color:#7e929f}
.reconcile-findings{display:flex;flex-wrap:wrap;gap:3px;min-width:170px}
.reconcile-chip{display:inline-flex;align-items:center;padding:2px 5px;border-radius:4px;background:#e5e7eb;color:#334155;font-size:9px;font-weight:700;line-height:1.25}
.reconcile-chip.matched{background:#dcfce7;color:#166534}.reconcile-chip.profile_mismatch,.reconcile-chip.package_missing{background:#fef3c7;color:#92400e}
.reconcile-chip.router_disabled,.reconcile-chip.system_disabled,.reconcile-chip.missing_secret,.reconcile-chip.duplicate_username{background:#fee2e2;color:#991b1b}
.reconcile-chip.new_client{background:#e0e7ff;color:#3730a3}
.reconcile-chip.imported_regular{background:#ffedd5;color:#9a3412}
.mikrotik-reconcile-filter-note{min-height:16px;color:var(--text-muted);font-size:10px;text-align:right;margin-top:-7px}
body.light-mode .mikrotik-reconcile-summary>.reconcile-summary-card.active,body.dark-mode .mikrotik-reconcile-summary>.reconcile-summary-card.active{background:#075b8e;border-color:#62c3ff;box-shadow:0 0 0 2px rgba(51,174,246,.28)}
#modal-clients-sync .modal-body>p{font-size:11px!important;line-height:1.55;color:#52697d!important}body.dark-mode #modal-clients-sync .modal-body>p{color:#b8cad9!important}
@media(max-width:1100px){.mikrotik-reconcile-summary{grid-template-columns:repeat(4,minmax(90px,1fr))}}
@media(max-width:640px){.mikrotik-reconcile-summary{grid-template-columns:repeat(2,minmax(90px,1fr))}}

/* v3.0.4 billing reconciliation */
.billing-audit-modal{width:min(1080px,calc(100vw - 34px))!important;max-width:1080px!important}
.billing-audit-summary{display:grid;grid-template-columns:repeat(4,minmax(115px,1fr));gap:8px;margin-bottom:12px}
.billing-audit-summary>div{border:1px solid var(--border-dark);border-radius:8px;padding:8px 10px;background:var(--card-bg)}
.billing-audit-summary span{display:block;color:var(--text-muted);font-size:9px;text-transform:uppercase}.billing-audit-summary strong{display:block;color:var(--text-primary);font-size:17px;margin-top:3px}
.billing-audit-summary .audit-money{grid-column:span 4}.billing-audit-summary .audit-money strong{font-size:13px}
.billing-audit-table-wrap{max-height:52vh;overflow:auto;border:1px solid var(--border-dark);border-radius:8px}.billing-audit-table-wrap table{margin:0;min-width:760px}
.billing-audit-table-wrap thead th{position:sticky;top:0;z-index:2}.billing-audit-chip{display:inline-flex;padding:3px 6px;border-radius:5px;background:#fee2e2;color:#991b1b;font-size:9px;font-weight:700;white-space:nowrap}
.billing-audit-chip.missing_bill,.billing-audit-chip.missing_package,.billing-audit-chip.zero_amount{background:#fef3c7;color:#92400e}
body.dark-mode .billing-audit-summary>div{background:#0c2238;border-color:#1a3a55}
@media(max-width:760px){.billing-audit-summary{grid-template-columns:repeat(2,minmax(100px,1fr))}.billing-audit-summary .audit-money{grid-column:span 2}}
.top-counter-wrap{position:relative}.top-counter-wrap .btn-icon{width:38px;height:38px}.top-counter{position:absolute;right:-2px;top:-3px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#e7eef6;color:#10253c;border:2px solid #07111f;font-size:9px;font-weight:800;display:grid;place-items:center}.top-counter.danger{background:#ff5268;color:#fff}
.top-profile-wrap{position:relative}.top-profile-button{border:0;background:transparent;color:#eaf5ff;display:flex;align-items:center;gap:9px;padding:5px 7px;border-radius:9px;cursor:pointer}.top-profile-button:hover{background:rgba(255,255,255,.055)}.top-profile-button img{width:34px;height:34px;border-radius:50%;border:2px solid #3a9bff}.top-profile-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1}.top-profile-copy strong{font-size:12.5px}.top-profile-copy small{font-size:9.5px;color:#7f9ab6;margin-top:3px}.top-profile-menu{display:none;position:absolute;right:0;top:48px;width:190px;padding:7px;background:#0c1d31;border:1px solid rgba(132,177,222,.18);border-radius:10px;box-shadow:0 18px 40px rgba(0,0,0,.32);z-index:1600}.top-profile-menu.open{display:block}.top-profile-menu-head{padding:10px 11px;border-bottom:1px solid rgba(132,177,222,.13);color:#eaf5ff;display:flex;align-items:center;gap:9px;font-size:12px}.top-profile-menu a,.top-profile-menu button{width:100%;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#9cb2c8;padding:10px 11px;border-radius:7px;text-decoration:none;font:inherit;font-size:12px;cursor:pointer;text-align:left}.top-profile-menu a:hover,.top-profile-menu button:hover{background:rgba(37,131,255,.1);color:#fff}
body.light-mode .top-profile-menu{background:#fff;border-color:#dbe6f0;box-shadow:0 18px 40px rgba(32,70,108,.16)}body.light-mode .top-profile-menu-head{color:#1c3752;border-color:#e5edf4}body.light-mode .top-profile-menu a,body.light-mode .top-profile-menu button{color:#60788f}

/* Configuration */
.configuration-page{max-width:1500px;margin:0 auto}.configuration-hero{margin-bottom:16px}.configuration-hero .card-header p{margin:4px 0 0}.configuration-grid{display:grid;grid-template-columns:270px minmax(0,1fr);gap:16px}.configuration-menu-card{padding:10px}.configuration-menu-title{font-size:11px;font-weight:800;text-transform:uppercase;color:#6988a8;padding:10px 10px 8px;letter-spacing:.6px}.configuration-menu-link{display:flex;align-items:center;gap:11px;padding:11px 12px;margin:2px 0;border-radius:8px;color:#8fa8c1;text-decoration:none;font-size:13px;border:1px solid transparent}.configuration-menu-link>i:last-child{margin-left:auto;font-size:10px}.configuration-menu-link:hover,.configuration-menu-link.active{color:#fff;background:linear-gradient(135deg,rgba(37,131,255,.18),rgba(47,145,255,.07));border-color:rgba(54,149,255,.18)}.configuration-menu-link.active>i:first-child{color:#58b8ff}.configuration-content-card{padding:22px;min-height:420px}.configuration-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px}.configuration-section-head .eyebrow{display:block;color:#4ea8ff;font-size:10px;font-weight:800;letter-spacing:.8px;margin-bottom:5px}.configuration-section-head h3{margin:0;color:#edf6ff;font-size:21px}.configuration-section-head p{margin:6px 0 0;color:#7f97af;font-size:12px}.config-definition-list{display:grid;gap:9px}.config-definition-row{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.025);border:1px solid rgba(129,174,218,.11);padding:13px 14px;border-radius:9px}.config-definition-row strong{flex:1;color:#e5f1fc}.config-number{width:27px;height:27px;border-radius:7px;background:rgba(37,131,255,.14);color:#63b8ff;display:grid;place-items:center;font-weight:800;font-size:11px}.config-note{margin-top:18px;padding:13px 15px;background:rgba(48,148,255,.07);border:1px solid rgba(60,159,255,.15);border-radius:9px;color:#90abc5;font-size:12px;display:flex;align-items:flex-start;gap:9px}.config-note i{color:#55b8ff;margin-top:2px}.config-geography-flow{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.config-geography-flow>div{min-width:128px;padding:20px 16px;border-radius:11px;background:rgba(255,255,255,.025);border:1px solid rgba(129,174,218,.12);display:flex;flex-direction:column;align-items:center;gap:9px;color:#91aac3}.config-geography-flow>div.selected{border-color:#2f91ff;background:rgba(47,145,255,.12);color:#fff}.config-geography-flow>div i{font-size:22px;color:#57b5ff}.config-geography-flow>span{color:#466887}
body.light-mode .configuration-content-card,body.light-mode .configuration-menu-card{background:#fff}.light-mode .configuration-section-head h3,.light-mode .config-definition-row strong{color:#1c3854}.light-mode .config-definition-row,.light-mode .config-geography-flow>div{background:#f8fbfe;border-color:#dfe9f2}.light-mode .configuration-menu-link{color:#627b93}.light-mode .configuration-menu-link:hover,.light-mode .configuration-menu-link.active{color:#0d5baa;background:#edf6ff}

/* ISP Digital-style account profile */
.account-manage-page{max-width:1500px;margin:0 auto}.account-manage-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.account-manage-heading h2{margin:0;color:#eff7ff;font-size:23px}.account-manage-heading>div:first-child span{color:#718ba5;font-size:11px;margin-left:5px}.account-breadcrumb{font-size:11px;color:#718ba5;display:flex;align-items:center;gap:7px}.account-manage-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:22px}.account-profile-card{overflow:hidden;border:1px solid rgba(126,169,211,.15);border-radius:11px;background:linear-gradient(180deg,#0f2944 0,#10263d 82px,rgba(11,26,43,.93) 82px);box-shadow:0 14px 35px rgba(0,0,0,.16);min-height:560px}.account-profile-title{height:74px;display:grid;place-items:center;color:#fff;font-size:24px;font-weight:700}.account-avatar-wrap{position:relative;width:140px;height:140px;margin:0 auto 10px}.account-avatar-wrap img{width:140px;height:140px;border-radius:50%;border:4px dashed #65bfff;background:#0b1725}.account-status-dot{position:absolute;right:10px;bottom:12px;width:16px;height:16px;border-radius:50%;background:#19d293;border:3px solid #0d2238}.account-role-line{display:flex;justify-content:center;gap:8px;margin-bottom:22px}.account-summary-list{padding:4px 24px 24px;display:grid;gap:12px}.account-summary-list>div{display:grid;grid-template-columns:18px auto 1fr;gap:7px;align-items:start;font-size:12px}.account-summary-list i{color:#58b8ff}.account-summary-list span{color:#819ab3}.account-summary-list strong{color:#e8f3fe;font-weight:600;overflow-wrap:anywhere}.account-settings-panel{background:rgba(12,27,48,.88);border:1px solid rgba(126,169,211,.15);border-radius:11px;padding:14px 14px 24px;min-height:560px}.account-tabs{display:flex;flex-wrap:wrap;gap:0;border-bottom:1px solid rgba(126,169,211,.15);margin-bottom:26px}.account-tabs button{border:0;background:transparent;color:#8ca4bc;padding:13px 15px;font-weight:600;font-size:12px;border-bottom:2px solid transparent;cursor:pointer}.account-tabs button.active{color:#fff;border-color:#2483ff}.account-tab-body{display:none;padding:0 12px}.account-tab-body.active{display:block}.account-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 24px}.account-info-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.account-info-strip>div{padding:12px;background:rgba(255,255,255,.025);border:1px solid rgba(126,169,211,.1);border-radius:8px}.account-info-strip span{display:block;color:#718ba5;font-size:10px;margin-bottom:4px}.account-info-strip strong{color:#dfeefa;font-size:12px}.account-save-btn{min-width:170px}.single-account-form{max-width:600px}.single-account-form.compact{max-width:520px}.account-inline-input{display:grid;grid-template-columns:1fr 44px;gap:10px;align-items:center}.account-inline-input>i{height:40px;border-radius:7px;background:rgba(37,131,255,.1);color:#39a0ff;display:grid;place-items:center}.account-log-list{display:grid;gap:8px}.account-log-row{display:grid;grid-template-columns:35px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid rgba(126,169,211,.1);border-radius:8px;background:rgba(255,255,255,.02)}.account-log-icon{width:31px;height:31px;border-radius:8px;background:rgba(37,131,255,.12);display:grid;place-items:center;color:#58b8ff}.account-log-row strong{font-size:11px;color:#eaf5ff}.account-log-row p{margin:3px 0 0;color:#7d96af;font-size:11px}.account-log-meta{display:flex;flex-direction:column;align-items:flex-end;gap:3px;color:#708ba6;font-size:10px}.empty-state{padding:35px;text-align:center;color:#738ba2}
body.light-mode .account-manage-heading h2{color:#173653}.light-mode .account-profile-card{background:linear-gradient(180deg,#214b6a 0,#214b6a 74px,#eefbfb 74px);border-color:#d6e4ef}.light-mode .account-summary-list span{color:#56728d}.light-mode .account-summary-list strong{color:#173653}.light-mode .account-summary-list i{color:#173653}.light-mode .account-settings-panel{background:#fff;border-color:#dbe6f0}.light-mode .account-tabs{border-color:#dfe7ef}.light-mode .account-tabs button{color:#7b8793}.light-mode .account-tabs button.active{color:#111;border-color:#2583ff}.light-mode .account-info-strip>div,.light-mode .account-log-row{background:#f8fbfe;border-color:#e0e9f1}.light-mode .account-info-strip strong,.light-mode .account-log-row strong{color:#18354f}.light-mode .account-log-row p{color:#667f96}

/* Final combined dashboard */
.final-ops-dashboard{min-width:0}.final-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.final-dashboard-head h2{margin:0;font-size:25px;color:#eff7ff}.final-dashboard-head h2 i{color:#58b7ff;margin-right:8px}.final-dashboard-head p{margin:4px 0 0;color:#7f98b1;font-size:12px}.final-kpi-grid{display:grid;grid-template-columns:repeat(8,minmax(130px,1fr));gap:10px;margin-bottom:11px}.final-kpi{min-height:84px;border-radius:10px;padding:12px 12px;display:flex;gap:10px;align-items:center;border:1px solid rgba(135,178,225,.14);overflow:hidden;position:relative}.final-kpi:after{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.04),transparent 55%);pointer-events:none}.final-kpi>i{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:rgba(0,0,0,.18);font-size:16px}.final-kpi div{min-width:0}.final-kpi span{display:block;color:#c6daec;font-size:10px;white-space:nowrap}.final-kpi strong{display:block;color:#fff;font-size:20px;line-height:1.15;margin:3px 0}.final-kpi small{display:block;color:#93c3dd;font-size:9px;white-space:nowrap}.final-kpi.blue{background:linear-gradient(135deg,#0b3f7c,#0b2850)}.final-kpi.green{background:linear-gradient(135deg,#08664f,#08372d)}.final-kpi.purple{background:linear-gradient(135deg,#5430a6,#291b58)}.final-kpi.amber{background:linear-gradient(135deg,#9a5b0d,#513309)}.final-kpi.teal{background:linear-gradient(135deg,#087665,#0a3e38)}.final-kpi.red{background:linear-gradient(135deg,#8d253d,#471626)}.final-kpi.violet{background:linear-gradient(135deg,#583b9e,#30245f)}.final-kpi.orange{background:linear-gradient(135deg,#996208,#513c09)}
.dashboard-clickable{cursor:pointer;outline:none;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,filter .16s ease}.dashboard-clickable:hover{transform:translateY(-2px);filter:brightness(1.08);border-color:rgba(88,184,255,.58);box-shadow:0 9px 22px rgba(0,0,0,.2)}.dashboard-clickable:focus-visible{outline:2px solid #58b8ff;outline-offset:2px}.dashboard-clickable:active{transform:translateY(0)}
.final-dashboard-grid{display:grid;gap:10px;margin-bottom:10px}.hero-grid{grid-template-columns:1.45fr 1.15fr 1fr}.summary-grid{grid-template-columns:1fr 1.45fr 1fr}.operations-grid{grid-template-columns:1.15fr 1.15fr 1fr .95fr}.final-panel{background:rgba(11,26,45,.94);border:1px solid rgba(128,173,218,.15);border-radius:10px;min-width:0;overflow:hidden}.final-panel-head{min-height:40px;padding:9px 11px;border-bottom:1px solid rgba(128,173,218,.12);display:flex;align-items:center;justify-content:space-between;gap:8px}.final-panel-head h3{margin:0;color:#edf6ff;font-size:13px}.final-panel-head h3 span{color:#6f8ba6;font-weight:500;font-size:10px}.final-panel-head .form-control{width:auto;min-width:105px;height:28px;font-size:10px;padding:4px 8px}.final-chart{height:190px;padding:10px 11px}.compact-summary{padding-bottom:10px}.summary-chip-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:9px}.summary-chip-grid>div{background:#0d2948;border:1px solid rgba(103,161,218,.12);border-radius:7px;padding:9px 8px;min-width:0}.summary-chip-grid span{display:block;color:#7d9ab7;font-size:9px;white-space:nowrap}.summary-chip-grid strong{display:block;color:#58b9ff;font-size:16px;margin-top:3px;white-space:nowrap}.summary-chip-grid .green strong{color:#1ed49a}.summary-chip-grid .red strong{color:#ff6174}.summary-chip-grid .violet strong{color:#b77cff}.summary-chip-grid .orange strong{color:#ffbd54}.summary-chip-grid.financial strong{font-size:13px}.ops-middle-stack,.ops-right-stack{display:grid;gap:10px;grid-template-rows:auto 1fr}.billing-progress-body{display:grid;grid-template-columns:90px 1fr;gap:12px;align-items:center;padding:12px}.billing-progress-ring{width:76px;height:76px;border-radius:50%;background:conic-gradient(#20d69b 0 72%,#16324f 72% 100%);display:grid;place-items:center;position:relative}.billing-progress-ring:after{content:"";position:absolute;width:57px;height:57px;background:#0d2239;border-radius:50%}.billing-progress-ring strong{z-index:1;color:#e9f6ff;font-size:15px}.billing-progress-copy strong{display:block;color:#eaf6ff;font-size:17px}.billing-progress-copy span{display:block;color:#758fa9;font-size:10px;margin-top:3px}.billing-progress-track{height:7px;border-radius:5px;background:#142f49;margin-top:10px;overflow:hidden}.billing-progress-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#20d69b,#46edc0);border-radius:5px}.billing-progress-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:0 10px 10px}.billing-progress-metrics>div,.invoice-status-grid>div{border-radius:7px;background:#0c2d4e;padding:8px}.billing-progress-metrics span,.invoice-status-grid span{display:block;color:#7897b3;font-size:9px}.billing-progress-metrics strong,.invoice-status-grid strong{display:block;color:#58b9ff;font-size:12px;margin-top:2px}.billing-progress-metrics .green strong,.invoice-status-grid .green strong{color:#21d89e}.billing-progress-metrics .red strong,.invoice-status-grid .red strong{color:#ff6475}.billing-progress-metrics .violet strong,.invoice-status-grid .violet strong{color:#b579ff}.invoice-status-grid .amber strong{color:#ffbd50}.invoice-status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:10px}.attention-list{display:grid}.attention-list>div{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 11px;border-bottom:1px solid rgba(128,173,218,.09)}.attention-list>div:last-child{border-bottom:0}.attention-list>div>i{width:27px;height:27px;border-radius:7px;background:rgba(255,91,111,.1);color:#ff6a79;display:grid;place-items:center}.attention-list span strong{display:block;color:#dceaf7;font-size:10.5px}.attention-list span small{display:block;color:#6f899f;font-size:9px;margin-top:2px}.attention-list b{min-width:25px;text-align:center;padding:4px 6px;border-radius:5px;background:#663043;color:#fff;font-size:9px}.operations-grid .alerts-card .alert-list{max-height:320px;overflow:auto}.operations-grid .map-panel .reference-map-visual{height:315px}
body.light-mode .final-dashboard-head h2{color:#17344e}.light-mode .final-panel{background:#fff;border-color:#dce7f0;box-shadow:0 7px 20px rgba(26,57,88,.05)}.light-mode .final-panel-head{border-color:#e5edf4}.light-mode .final-panel-head h3{color:#17344e}.light-mode .summary-chip-grid>div,.light-mode .billing-progress-metrics>div,.light-mode .invoice-status-grid>div{background:#f5f9fc;border-color:#e2ebf2}.light-mode .summary-chip-grid span,.light-mode .billing-progress-metrics span,.light-mode .invoice-status-grid span{color:#71869a}.light-mode .attention-list>div{border-color:#e8eef4}.light-mode .attention-list span strong{color:#203950}.light-mode .billing-progress-ring:after{background:#fff}

@media(max-width:1500px){.final-kpi-grid{grid-template-columns:repeat(4,minmax(140px,1fr))}.hero-grid{grid-template-columns:1.4fr 1fr}.hero-grid>section:last-child{grid-column:1/-1}.summary-grid{grid-template-columns:1fr 1fr}.summary-grid>section:last-child{grid-column:1/-1}.operations-grid{grid-template-columns:1fr 1fr}.operations-grid>.alerts-card{grid-column:1/-1}.summary-chip-grid{grid-template-columns:repeat(5,minmax(105px,1fr))}}
@media(max-width:1050px){.configuration-grid,.account-manage-layout{grid-template-columns:1fr}.account-profile-card{min-height:auto}.hero-grid,.summary-grid,.operations-grid{grid-template-columns:1fr}.hero-grid>section:last-child,.summary-grid>section:last-child,.operations-grid>.alerts-card{grid-column:auto}.summary-chip-grid{grid-template-columns:repeat(2,1fr)}.final-dashboard-head .dashboard-quote{display:none}.account-form-grid{grid-template-columns:1fr}}
@media(max-width:760px){.xtreme-top-actions .top-action-button span,.top-profile-copy{display:none}.top-action-button{width:38px;padding:0;justify-content:center}.final-kpi-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.summary-chip-grid,.billing-progress-metrics,.invoice-status-grid{grid-template-columns:repeat(2,1fr)}.account-manage-heading{align-items:flex-start;gap:8px}.account-breadcrumb{display:none}}
.account-photo-action{display:flex;justify-content:center;margin:0 0 15px}.account-photo-action .btn{font-size:10px;padding:6px 10px}
.billing-legend i.overdue{background:#6f63ff!important}


/* ===== v2.6.1 compact shell + final dashboard alignment ===== */
@media(min-width:993px){
  #sidebar.sidebar{width:230px!important}
  #sidebar + .main-content{margin-left:230px!important;width:calc(100% - 230px)!important}
  #sidebar.collapsed + .main-content{margin-left:72px!important;width:calc(100% - 72px)!important}
}
.sidebar-header{height:58px!important;padding:0 14px!important}
.menu-search-container{padding:8px 12px!important}
.sidebar-user{display:none!important}
.sidebar-release-tag{display:none!important}
.sidebar-nav{padding-top:4px!important;padding-bottom:18px!important}
.nav-link{min-height:40px!important;padding:9px 13px!important}
.nav-link-sub{padding:7px 8px!important;font-size:12px!important}
.topbar{height:58px!important;min-height:58px!important;padding:0 14px!important;gap:10px!important}
.topbar-left{gap:10px!important;min-width:0!important;flex:1 1 auto!important}
.reference-page-title{display:none!important}
.global-search-shell{height:36px!important;max-width:330px!important;min-width:220px!important}
.global-search-shell input{height:36px!important;font-size:12px!important}
.xtreme-top-actions{gap:7px!important}
.top-action-button{min-height:34px!important;height:34px!important;padding:0 10px!important;font-size:11.5px!important;border-radius:7px!important}
.top-counter-wrap .btn-icon,#theme-toggle{width:34px!important;height:34px!important}
.top-profile-button{padding:3px 5px!important;gap:7px!important}
.top-profile-button img{width:30px!important;height:30px!important}
.top-profile-copy strong{font-size:11.5px!important}.top-profile-copy small{font-size:8.5px!important}
.top-profile-menu{top:42px!important}
.marquee-section{min-height:30px!important;height:30px!important;padding:4px 14px!important;font-size:11px!important}
.marquee-section>span{padding:3px 8px!important;margin-right:10px!important;font-size:10px!important}
.content-area{padding:16px 16px 28px!important}

/* Keep the approved combined dashboard compact on common 1366/1440 desktops. */
.final-dashboard-head{margin-bottom:10px!important}
.final-dashboard-head h2{font-size:23px!important}.final-dashboard-head p{font-size:11px!important}
.final-kpi-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:7px!important;margin-bottom:9px!important}
.final-kpi{min-height:72px!important;padding:9px 8px!important;gap:7px!important;border-radius:9px!important}
.final-kpi>i{width:31px!important;height:31px!important;font-size:13px!important;border-radius:8px!important}
.final-kpi span{font-size:8.8px!important}.final-kpi strong{font-size:16px!important;margin:2px 0!important}.final-kpi small{font-size:7.8px!important}
.hero-grid{grid-template-columns:1.35fr 1fr .9fr!important}
.hero-grid>section:last-child{grid-column:auto!important}
.summary-grid{grid-template-columns:1fr 1.35fr 1fr!important}
.summary-grid>section:last-child{grid-column:auto!important}
.operations-grid{grid-template-columns:1.15fr 1.15fr 1fr .95fr!important}
.operations-grid>.alerts-card{grid-column:auto!important}
.final-chart{height:165px!important;padding:8px 9px!important}
.final-panel-head{min-height:36px!important;padding:7px 9px!important}.final-panel-head h3{font-size:12px!important}
.summary-chip-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important;padding:7px!important}
.summary-chip-grid>div{padding:7px 6px!important}.summary-chip-grid span{font-size:8px!important}.summary-chip-grid strong{font-size:14px!important}
.operations-grid .map-panel .reference-map-visual{height:270px!important}
.operations-grid .alerts-card .alert-list{max-height:270px!important}

@media(max-width:1180px){
  .final-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .hero-grid{grid-template-columns:1.35fr 1fr!important}.hero-grid>section:last-child{grid-column:1/-1!important}
  .summary-grid{grid-template-columns:1fr 1fr!important}.summary-grid>section:last-child{grid-column:1/-1!important}
  .operations-grid{grid-template-columns:1fr 1fr!important}.operations-grid>.alerts-card{grid-column:1/-1!important}
}
@media(max-width:760px){
  .global-search-shell{min-width:0!important;max-width:none!important}
  .final-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ===== v2.6.1 release/version sidebar item (ISP Digital style) ===== */
.release-item{margin-top:7px!important;border-top:1px solid rgba(126,174,218,.10);padding-top:7px!important}
.release-nav-link{color:#8fa7bd!important;background:transparent!important;border-color:transparent!important;font-size:11.5px!important}
.release-nav-link i{color:#66b8ff!important}
.release-nav-link:hover{color:#fff!important;background:rgba(37,131,255,.10)!important;border-color:rgba(75,158,242,.12)!important}
.sidebar.collapsed .release-nav-link span{display:none!important}
.release-notes-modal{position:fixed;inset:0;background:rgba(1,9,17,.62);display:none;align-items:center;justify-content:center;padding:20px;z-index:6000;backdrop-filter:blur(5px)}
.release-notes-modal.open{display:flex}
.release-notes-card{width:min(520px,94vw);background:linear-gradient(180deg,#0d2239,#09182a);border:1px solid rgba(101,164,226,.22);border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.45);overflow:hidden}
.release-notes-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(121,169,213,.13)}
.release-notes-head>div{display:flex;align-items:center;gap:10px}.release-notes-head>div>i{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:rgba(37,131,255,.14);color:#63b5ff}
.release-notes-head span{display:block}.release-notes-head strong{display:block;color:#edf7ff;font-size:14px}.release-notes-head small{display:block;color:#7895af;font-size:10px;margin-top:2px}
.release-notes-body{padding:14px 16px;display:grid;gap:9px}.release-notes-body>div{display:grid;grid-template-columns:22px 1fr;gap:8px;align-items:start;color:#a9bed0;font-size:11.5px;line-height:1.45}.release-notes-body i{color:#20d59a;margin-top:2px}
body.light-mode .release-notes-card{background:#fff;border-color:#d9e6f0;box-shadow:0 24px 70px rgba(24,58,91,.20)}
body.light-mode .release-notes-head{border-color:#e6eef5}body.light-mode .release-notes-head strong{color:#17344e}body.light-mode .release-notes-head small{color:#7890a5}body.light-mode .release-notes-body>div{color:#536b82}


/* =========================================================
   Xtreme'x ISP Manager v2.7.0 FINAL CONSOLIDATED UI
   ========================================================= */
:root{--v27-topbar:54px;--v27-sidebar:248px}
#sidebar.sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;height:100vh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;width:var(--v27-sidebar)!important;z-index:1200!important}
#sidebar .sidebar-header,#sidebar .menu-search-container{flex:0 0 auto!important}
#sidebar .sidebar-nav{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-width:thin!important}
.main-content{margin-left:var(--v27-sidebar)!important;width:calc(100% - var(--v27-sidebar))!important;min-width:0!important}
.sidebar.collapsed{width:74px!important}.sidebar.collapsed~.main-content{margin-left:74px!important;width:calc(100% - 74px)!important}
.topbar{height:var(--v27-topbar)!important;min-height:var(--v27-topbar)!important;padding:0 12px!important;gap:8px!important}
.global-search-shell{height:36px!important;max-width:370px!important}.global-search-shell input{font-size:12px!important}.top-action-button{height:34px!important;padding:0 10px!important;font-size:10.5px!important;border-radius:7px!important}.topbar .btn-icon{width:32px!important;height:32px!important}.top-profile-button img{width:29px!important;height:29px!important}.top-profile-button{height:38px!important;padding:2px 4px!important}.marquee-section{min-height:34px!important;padding:5px 14px!important;font-size:11px!important}.marquee-section>span{padding:3px 8px!important;margin-right:10px!important;font-size:10.5px!important}
.release-item{margin-top:8px!important;border-top:1px solid rgba(130,176,220,.12);padding-top:8px!important}.release-nav-link{color:#7f99b5!important}.release-nav-link:hover{color:#fff!important;background:rgba(37,131,255,.09)!important}
/* billing reference */
.reference-billing-page{max-width:1800px;margin:0 auto}.bulk-action-panel,.reference-filter-card{border:1px solid var(--border-dark);border-radius:12px;background:var(--card-bg);box-shadow:var(--shadow-premium);margin-bottom:12px}.bulk-action-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border-dark);font-size:12px}.bulk-action-grid{display:grid;grid-template-columns:repeat(8,minmax(125px,1fr));gap:8px;padding:10px}.bulk-action-grid.collapsed{display:none}.bulk-action-grid button,.bulk-action-grid a{min-height:34px;border-radius:18px;border:1px solid rgba(121,169,215,.18);background:#173b59;color:#fff;padding:6px 10px;display:flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;font:inherit;font-size:10px;cursor:pointer}.bulk-action-grid button:hover,.bulk-action-grid a:hover{background:#1e527c}.billing-reference-summary{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:10px;margin-bottom:12px}.billing-reference-summary.daily{grid-template-columns:repeat(4,minmax(150px,1fr))}.bill-ref-card{border-radius:9px;overflow:hidden;padding:12px 14px 10px;color:#fff;box-shadow:0 6px 16px rgba(7,20,35,.11)}.bill-ref-card span{display:block;font-size:11px}.bill-ref-card strong{display:block;font-size:20px;margin:2px 0}.bill-ref-card small{display:block;font-size:9px;opacity:.85}.bill-ref-card.cyan{background:linear-gradient(135deg,#0da7d2,#0b82b5)}.bill-ref-card.teal{background:linear-gradient(135deg,#27b8b6,#1b9897)}.bill-ref-card.violet{background:linear-gradient(135deg,#8068da,#6851c1)}.bill-ref-card.slate{background:linear-gradient(135deg,#5d6771,#434b53)}.bill-ref-card.green{background:linear-gradient(135deg,#17a875,#0b7c58)}.billing-advanced-filters{display:grid;grid-template-columns:repeat(6,minmax(135px,1fr));gap:10px;padding:13px}.billing-advanced-filters label,.daily-collection-filters label{display:block;font-size:9px;font-weight:700;text-transform:uppercase;color:var(--text-muted);margin-bottom:5px}.filter-apply-cell{display:flex;align-items:flex-end}.reference-table-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border-dark);font-size:10px;color:var(--text-muted)}.reference-table-toolbar label{display:flex;align-items:center;gap:6px}.form-control.mini{width:76px;height:32px;padding:4px 8px}.config-search{max-width:210px}.billing-wide-table{overflow:hidden}.billing-wide-table .table-responsive{overflow:auto;max-height:620px}.billing-wide-table table{min-width:1680px}.billing-wide-table thead th{position:sticky;top:0;z-index:3}.billing-wide-table th:nth-child(2),.billing-wide-table td:nth-child(2){position:sticky;left:0;z-index:2}.billing-wide-table th:nth-child(3),.billing-wide-table td:nth-child(3){position:sticky;left:78px;z-index:2}.billing-wide-table th:nth-child(4),.billing-wide-table td:nth-child(4){position:sticky;left:180px;z-index:2}.billing-wide-table td:nth-child(2),.billing-wide-table td:nth-child(3),.billing-wide-table td:nth-child(4){background:var(--card-bg)}.daily-action-row{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:12px 0}.daily-action-row>div{display:flex;gap:8px;flex-wrap:wrap}.daily-collection-filters{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px;padding:13px}.collector-mini-summary{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:8px;margin:10px 0}.collector-mini-summary>div{padding:10px 12px;border-radius:9px;border:1px solid var(--border-dark);background:var(--card-bg)}.collector-mini-summary span,.collector-mini-summary small{display:block;color:var(--text-muted);font-size:9px}.collector-mini-summary strong{display:block;color:var(--text-white);font-size:15px;margin:3px 0}
/* configuration table */
.reference-config-page{max-width:1450px;margin:0 auto}.compact-head{align-items:center}.reference-data-table th{background:#214866!important;color:#fff!important;font-size:11px!important}.reference-data-table td{font-size:11px!important}.reference-table-footer{padding:10px 12px;color:var(--text-muted);font-size:10px}.config-edit{color:#16c774!important}.config-delete{color:#ff4d5e!important}
/* SMS */
.sms-service-page{max-width:1450px;margin:0 auto}.sms-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.sms-template-row,.sms-group-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;border:1px solid var(--border-dark);border-radius:9px;margin-bottom:8px;background:rgba(127,166,205,.035)}.sms-template-row small,.sms-group-row small{display:block;color:var(--text-muted);font-size:9px;margin-top:2px}.sms-template-row p{margin:5px 0 0;font-size:10px;color:var(--text-muted)}.sms-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}.sms-filter-grid label{display:block;font-size:9px;color:var(--text-muted);font-weight:700;text-transform:uppercase;margin-bottom:5px}.gateway-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.gateway-card{padding:14px;border:1px solid var(--border-dark);border-radius:10px;background:rgba(127,166,205,.035)}.gateway-card span{display:block;color:var(--text-muted);font-size:10px}.gateway-card strong{display:block;color:var(--text-white);margin-top:4px;font-size:13px}
/* user editor */
.user-editor-modal{width:min(1080px,calc(100vw - 36px))!important;max-width:1080px!important;max-height:92vh!important;display:flex!important;flex-direction:column!important}.user-editor-body{overflow:auto!important;max-height:calc(92vh - 64px)!important;padding-bottom:0!important}.user-form-section{border:1px solid var(--border-dark);border-radius:11px;margin-bottom:12px;overflow:hidden}.user-form-section-head{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border-dark);background:rgba(37,131,255,.045)}.user-form-section-head>i{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:rgba(37,131,255,.13);color:#4ca8ff}.user-form-section-head strong{display:block;font-size:12px}.user-form-section-head small{display:block;color:var(--text-muted);font-size:9px;margin-top:2px}.user-form-section>.user-form-grid,.user-form-section>.form-group{margin:12px}.user-form-grid{display:grid;gap:12px}.user-form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.user-form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.permission-grid-v27{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;padding:12px}.permission-grid-v27 .permission-card{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px;border:1px solid var(--border-dark);border-radius:8px;background:rgba(127,166,205,.035);font-size:10px}.permission-grid-v27 .permission-card span{display:flex;align-items:center;gap:7px}.permission-grid-v27 .permission-card i{color:#4ca8ff}.user-editor-actions{position:sticky;bottom:0;z-index:4;display:flex;justify-content:flex-end;gap:8px;padding:12px 0;background:var(--card-bg);border-top:1px solid var(--border-dark)}
@media(max-width:1350px){.bulk-action-grid{grid-template-columns:repeat(4,1fr)}.billing-reference-summary{grid-template-columns:repeat(4,1fr)}.billing-advanced-filters{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){:root{--v27-sidebar:0px}#sidebar.sidebar{transform:translateX(-100%);width:248px!important}.sidebar.mobile-open{transform:translateX(0)!important}.main-content{margin-left:0!important;width:100%!important}.sms-two-col{grid-template-columns:1fr}.sms-filter-grid,.billing-advanced-filters,.daily-collection-filters,.gateway-summary-grid,.collector-mini-summary{grid-template-columns:repeat(2,1fr)}.user-form-grid.three,.permission-grid-v27{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.bulk-action-grid,.billing-reference-summary,.billing-reference-summary.daily,.sms-filter-grid,.billing-advanced-filters,.daily-collection-filters,.gateway-summary-grid,.collector-mini-summary,.user-form-grid.three,.user-form-grid.two,.permission-grid-v27{grid-template-columns:1fr}.top-action-button{display:none!important}.marquee-section{display:none!important}}


/* =========================================================
   Xtreme'x ISP Manager v2.8.0 FINAL UI STABILIZATION
   ISP Digital clean structure + premium SaaS finish
   ========================================================= */
:root{
  --v28-sidebar:230px;
  --v28-sidebar-collapsed:70px;
  --v28-topbar:52px;
  --v28-navy:#0b1f33;
  --v28-navy-2:#17324d;
  --v28-blue:#1f6feb;
  --v28-blue-soft:#eaf3ff;
  --v28-bg:#f4f7fa;
  --v28-card:#ffffff;
  --v28-border:#dce5ee;
  --v28-text:#1f2937;
  --v28-muted:#6b7280;
  --v28-success:#22c55e;
  --v28-warning:#f59e0b;
  --v28-danger:#ef4444;
  --v28-finance:#6366f1;
}

/* Shell: fixed sidebar, truly compact collapse, independent scrolling */
#sidebar.sidebar{
  width:var(--v28-sidebar)!important;
  background:linear-gradient(180deg,#0b1f33 0%,#081929 100%)!important;
  border-right:1px solid #173a56!important;
  box-shadow:none!important;
  transition:width .22s ease!important;
}
#sidebar.sidebar.collapsed{width:var(--v28-sidebar-collapsed)!important;}
#sidebar.sidebar + .main-content{margin-left:var(--v28-sidebar)!important;width:calc(100% - var(--v28-sidebar))!important;transition:margin-left .22s ease,width .22s ease!important;}
#sidebar.sidebar.collapsed + .main-content{margin-left:var(--v28-sidebar-collapsed)!important;width:calc(100% - var(--v28-sidebar-collapsed))!important;}
#sidebar .sidebar-header{height:54px!important;min-height:54px!important;padding:0 12px!important;}
#sidebar .menu-search-container{padding:7px 10px!important;}
#sidebar .sidebar-nav{padding:5px 8px 12px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;}
#sidebar-menu-list{min-height:100%;}
#sidebar .nav-link{min-height:38px!important;padding:8px 10px!important;border-radius:7px!important;font-size:12px!important;gap:10px!important;box-shadow:none!important;}
#sidebar .nav-link:hover,#sidebar .nav-link.active{background:#123653!important;border-color:#1d4c72!important;box-shadow:inset 3px 0 0 #2e9bff!important;}
#sidebar .nav-link i{width:18px;text-align:center;color:#8fb3d9!important;}
#sidebar .nav-link:hover i,#sidebar .nav-link.active i{color:#55b8ff!important;}
#sidebar .sidebar-submenu{margin:3px 4px 6px 18px!important;padding:4px 4px 4px 9px!important;background:rgba(0,0,0,.12)!important;border-left:1px solid #214766!important;}
#sidebar .nav-link-sub{padding:6px 7px!important;font-size:11px!important;border-radius:6px!important;}
#sidebar .release-item{margin-top:auto!important;border-top:1px solid rgba(143,179,217,.12)!important;padding-top:7px!important;}
#sidebar .release-nav-link{font-size:11px!important;color:#8fa7bd!important;}
#sidebar.sidebar.collapsed .sidebar-brand-copy,#sidebar.sidebar.collapsed .menu-search-container{display:none!important;}
#sidebar.sidebar.collapsed .sidebar-header{justify-content:center!important;padding:0 8px!important;}
#sidebar.sidebar.collapsed .sidebar-brand{display:none!important;}
#sidebar.sidebar.collapsed #toggle-sidebar{margin:0 auto!important;}
#sidebar.sidebar.collapsed .sidebar-nav{padding-left:8px!important;padding-right:8px!important;}
#sidebar.sidebar.collapsed .sidebar-nav .nav-link{width:46px!important;min-width:46px!important;height:38px!important;min-height:38px!important;margin:2px auto!important;padding:0!important;justify-content:center!important;border-radius:8px!important;box-shadow:none!important;}
#sidebar.sidebar.collapsed .sidebar-nav .nav-link.active{box-shadow:inset 3px 0 0 #2e9bff!important;}
#sidebar.sidebar.collapsed .sidebar-nav .nav-link span,#sidebar.sidebar.collapsed .sidebar-nav .dropdown-arrow{display:none!important;}
#sidebar.sidebar.collapsed .sidebar-nav .nav-link i{margin:0!important;width:auto!important;font-size:16px!important;}
#sidebar.sidebar.collapsed .menu-item-has-child:hover .sidebar-submenu{left:58px!important;top:0!important;min-width:205px!important;background:#0d2740!important;border:1px solid #244d6d!important;box-shadow:0 14px 34px rgba(0,0,0,.28)!important;}
#sidebar.sidebar.collapsed .sidebar-submenu .nav-link-sub{color:#b6c8d9!important;}
#sidebar.sidebar.collapsed .release-item{margin-top:8px!important;}

/* Compact ISP Digital-style topbar */
.topbar{height:var(--v28-topbar)!important;min-height:var(--v28-topbar)!important;padding:0 10px!important;background:#17324d!important;border-bottom:1px solid #24445f!important;gap:7px!important;box-shadow:none!important;}
.global-search-shell{height:34px!important;max-width:340px!important;min-width:220px!important;background:#102b45!important;border:1px solid #294b67!important;border-radius:8px!important;}
.global-search-shell input{height:32px!important;font-size:11px!important;color:#eef6ff!important;}
.global-search-shell input::placeholder{color:#9db2c5!important;}
.xtreme-top-actions{gap:6px!important;}
.top-action-button{height:32px!important;min-height:32px!important;padding:0 9px!important;border-radius:7px!important;font-size:10px!important;background:#1a3c5a!important;border-color:#31536e!important;box-shadow:none!important;}
.top-action-button:hover{background:#214c70!important;}
.topbar .btn-icon,#theme-toggle{width:31px!important;height:31px!important;}
.top-profile-button{height:34px!important;padding:2px 3px!important;gap:6px!important;}
.top-profile-button img{width:28px!important;height:28px!important;}
.top-profile-copy strong{font-size:10.8px!important}.top-profile-copy small{font-size:8px!important;margin-top:1px!important}
.top-profile-menu{top:38px!important;}
.marquee-section{min-height:28px!important;height:28px!important;padding:3px 10px!important;background:#204d73!important;font-size:10px!important;}
.marquee-section>span{padding:2px 7px!important;margin-right:8px!important;font-size:9.5px!important;}
.content-area{padding:14px 16px 28px!important;}

/* Dashboard header: only title + dynamic login role */
.final-dashboard-head{margin-bottom:10px!important;align-items:center!important;}
.final-dashboard-head h2{font-size:22px!important;display:flex;align-items:center;gap:7px;}
.final-dashboard-head p,.final-dashboard-head .dashboard-quote{display:none!important;}
.dashboard-role-label{display:inline-flex;align-items:center;min-height:20px;padding:3px 7px;border-radius:4px;background:#eaf3ff;color:#1f6feb;font-size:9px;font-weight:700;letter-spacing:.2px;border:1px solid #d5e7fb;vertical-align:middle;}
body.dark-mode .dashboard-role-label{background:rgba(46,139,255,.12);border-color:rgba(91,164,232,.18);color:#70bdff;}

/* Light dashboard: one neutral card system, semantic accent only */
body.light-mode{background:var(--v28-bg)!important;color:var(--v28-text)!important;}
body.light-mode .main-content{background:var(--v28-bg)!important;}
body.light-mode .final-ops-dashboard{color:var(--v28-text)!important;}
body.light-mode .final-kpi{
  background:#fff!important;
  border:1px solid var(--v28-border)!important;
  box-shadow:0 5px 14px rgba(22,55,84,.055)!important;
  color:var(--v28-text)!important;
}
body.light-mode .final-kpi:after{display:none!important;}
body.light-mode .final-kpi span{color:#60758a!important;}
body.light-mode .final-kpi strong{color:#1f2937!important;}
body.light-mode .final-kpi small{color:#7d8da0!important;}
body.light-mode .final-kpi>i{background:#edf5ff!important;color:#1f6feb!important;}
body.light-mode .final-kpi.green>i,body.light-mode .final-kpi.teal>i,body.light-mode .final-kpi.purple>i{background:#edf9f2!important;color:var(--v28-success)!important;}
body.light-mode .final-kpi.amber>i,body.light-mode .final-kpi.orange>i{background:#fff7e8!important;color:var(--v28-warning)!important;}
body.light-mode .final-kpi.red>i{background:#fff0f1!important;color:var(--v28-danger)!important;}
body.light-mode .final-kpi.violet>i{background:#f3f4f6!important;color:#64748b!important;}
body.light-mode .final-kpi.blue{border-top:3px solid #1f6feb!important;}
body.light-mode .final-kpi.green,body.light-mode .final-kpi.teal,body.light-mode .final-kpi.purple{border-top:3px solid var(--v28-success)!important;}
body.light-mode .final-kpi.amber,body.light-mode .final-kpi.orange{border-top:3px solid var(--v28-warning)!important;}
body.light-mode .final-kpi.red{border-top:3px solid var(--v28-danger)!important;}
body.light-mode .final-kpi.violet{border-top:3px solid #94a3b8!important;}
body.light-mode .final-panel{background:#fff!important;border:1px solid var(--v28-border)!important;box-shadow:0 5px 14px rgba(22,55,84,.045)!important;}
body.light-mode .final-panel-head{border-color:#e5edf4!important;background:#fff!important;}
body.light-mode .final-panel-head h3{color:#24384c!important;}
body.light-mode .summary-chip-grid>div,body.light-mode .billing-progress-metrics>div,body.light-mode .invoice-status-grid>div,body.light-mode .collector-mini-summary>div,body.light-mode .gateway-card{background:#f7fafc!important;border-color:#e2eaf2!important;}
body.light-mode .summary-chip-grid strong,body.light-mode .billing-progress-metrics strong,body.light-mode .invoice-status-grid strong{color:#1f6feb!important;}
body.light-mode .summary-chip-grid .green strong,body.light-mode .billing-progress-metrics .green strong,body.light-mode .invoice-status-grid .green strong{color:var(--v28-success)!important;}
body.light-mode .summary-chip-grid .red strong,body.light-mode .billing-progress-metrics .red strong,body.light-mode .invoice-status-grid .red strong{color:var(--v28-danger)!important;}
body.light-mode .summary-chip-grid .orange strong,body.light-mode .invoice-status-grid .amber strong{color:var(--v28-warning)!important;}
body.light-mode .summary-chip-grid .violet strong,body.light-mode .billing-progress-metrics .violet strong,body.light-mode .invoice-status-grid .violet strong{color:var(--v28-finance)!important;}
body.light-mode .billing-progress-ring:after{background:#fff!important;}
body.light-mode .billing-progress-copy strong{color:#25394d!important;}
body.light-mode .billing-progress-track{background:#e8eef4!important;}
body.light-mode .attention-list span strong{color:#25394d!important;}
body.light-mode .network-status-list>div{border-color:#edf2f6!important;}
body.light-mode .compact-table table{color:#31485e!important;}

/* Dark dashboard: same neutral card system, semantic accents only */
body.dark-mode .final-kpi{background:#0d253d!important;border:1px solid #1b3c58!important;box-shadow:none!important;}
body.dark-mode .final-kpi:after{display:none!important;}
body.dark-mode .final-kpi>i{background:#123653!important;color:#58b8ff!important;}
body.dark-mode .final-kpi.green>i,body.dark-mode .final-kpi.teal>i,body.dark-mode .final-kpi.purple>i{background:rgba(34,197,94,.10)!important;color:#37d477!important;}
body.dark-mode .final-kpi.amber>i,body.dark-mode .final-kpi.orange>i{background:rgba(245,158,11,.10)!important;color:#f6b84a!important;}
body.dark-mode .final-kpi.red>i{background:rgba(239,68,68,.11)!important;color:#ff6873!important;}
body.dark-mode .final-kpi.violet>i{background:rgba(148,163,184,.10)!important;color:#a6b2c0!important;}
body.dark-mode .final-kpi strong{color:#f4f8fb!important;}
body.dark-mode .final-kpi span{color:#b4c7d8!important;}
body.dark-mode .final-kpi small{color:#7f9ab2!important;}
body.dark-mode .final-panel{background:#0c2238!important;border-color:#1a3a55!important;box-shadow:none!important;}
body.dark-mode .final-panel-head{background:#0e2740!important;border-color:#1a3a55!important;}
body.dark-mode .summary-chip-grid>div,body.dark-mode .billing-progress-metrics>div,body.dark-mode .invoice-status-grid>div{background:#102b45!important;border-color:#1a3a55!important;}

/* Softer ISP Digital-style billing cards instead of heavy gradients */
body.light-mode .bill-ref-card{background:#fff!important;color:#24384c!important;border:1px solid var(--v28-border)!important;box-shadow:0 4px 12px rgba(25,55,82,.04)!important;border-left:4px solid #1f6feb!important;}
body.light-mode .bill-ref-card span,body.light-mode .bill-ref-card small{color:#6b7a90!important;}
body.light-mode .bill-ref-card strong{color:#24384c!important;}
body.light-mode .bill-ref-card.teal,body.light-mode .bill-ref-card.green{border-left-color:var(--v28-success)!important;}
body.light-mode .bill-ref-card.violet{border-left-color:var(--v28-finance)!important;}
body.light-mode .bill-ref-card.slate{border-left-color:#64748b!important;}
body.dark-mode .bill-ref-card{background:#102b45!important;border:1px solid #1c405e!important;box-shadow:none!important;}

/* Tables: compact, ISP Digital-like */
body.light-mode .table thead th,body.light-mode .table th,body.light-mode .reference-data-table th{background:#214866!important;color:#fff!important;border-color:#214866!important;}
body.light-mode .table td{color:#2f4356!important;border-color:#e6edf3!important;background:#fff!important;}
body.light-mode .table tbody tr:hover td{background:#f5f9fc!important;}
body.light-mode .billing-wide-table td:nth-child(2),body.light-mode .billing-wide-table td:nth-child(3),body.light-mode .billing-wide-table td:nth-child(4){background:#fff!important;}

/* Import/editor modals stay inside main work area and never hide beneath sidebar */
@media(min-width:993px){
  .main-content .modal-overlay{left:var(--v28-sidebar)!important;width:calc(100vw - var(--v28-sidebar))!important;right:auto!important;padding:18px!important;}
  #sidebar.sidebar.collapsed + .main-content .modal-overlay{left:var(--v28-sidebar-collapsed)!important;width:calc(100vw - var(--v28-sidebar-collapsed))!important;}
}
.modal-content{max-width:min(1180px,calc(100vw - 52px))!important;}

/* Better common desktop density: four cards per row on 1366/1440, eight only on wide screens */
.final-kpi-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:9px!important;}
@media(max-width:1550px){
  .final-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .final-kpi{min-height:74px!important;}
  .hero-grid{grid-template-columns:1.35fr 1fr .9fr!important;}
}
@media(max-width:1180px){
  .hero-grid,.summary-grid,.operations-grid{grid-template-columns:1fr 1fr!important;}
  .hero-grid>section:last-child,.summary-grid>section:last-child,.operations-grid>.alerts-card{grid-column:1/-1!important;}
}
@media(max-width:900px){
  #sidebar.sidebar{width:230px!important;transform:translateX(-100%)!important;}
  #sidebar.sidebar.mobile-open,#sidebar.sidebar.open{transform:translateX(0)!important;}
  #sidebar.sidebar + .main-content,#sidebar.sidebar.collapsed + .main-content{margin-left:0!important;width:100%!important;}
  .main-content .modal-overlay,#sidebar.sidebar.collapsed + .main-content .modal-overlay{left:0!important;width:100vw!important;}
  .hero-grid,.summary-grid,.operations-grid{grid-template-columns:1fr!important;}
  .hero-grid>section:last-child,.summary-grid>section:last-child,.operations-grid>.alerts-card{grid-column:auto!important;}
}
@media(max-width:620px){
  .final-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* v2.8 compatibility variables used by consolidated billing/SMS/editor components */
body.light-mode{--card-bg:#ffffff;}
body.dark-mode{--card-bg:#0c2238;}

/* v2.9 MikroTik phase 1 */
.inline-check{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-muted);margin:6px 0}.inline-check input{width:16px;height:16px}.mikrotik-diagnostics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.diag-card{border:1px solid var(--border-color,#dce5ee);border-radius:12px;padding:14px;background:var(--card-bg,#fff);display:flex;flex-direction:column;gap:5px}.diag-card span{font-size:11px;color:var(--text-muted)}.diag-card strong{font-size:16px;color:var(--text-primary)}@media(max-width:800px){.mikrotik-diagnostics-grid{grid-template-columns:1fr 1fr}}

/* v2.9.3 ISP Digital-style Client Profile */
.client-profile-overlay{align-items:flex-start!important;overflow:auto!important;background:rgba(7,20,33,.48)!important;backdrop-filter:blur(3px)}
.client-profile-modal{width:min(1500px,100%)!important;max-width:min(1500px,100%)!important;min-height:calc(100vh - 36px)!important;max-height:none!important;padding:0!important;overflow:hidden!important;border-radius:14px!important;background:#f4f7fa!important;border:1px solid #d7e2ec!important;box-shadow:0 24px 70px rgba(8,29,48,.24)!important}
.client-profile-page-head{min-height:62px;padding:10px 18px;display:flex;justify-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #dce6ef}
.client-profile-title-row{display:flex;align-items:baseline;gap:7px;color:#183651}.client-profile-title-row>i{font-size:19px;color:#153f5f}.client-profile-title-row h2{margin:0;font-size:20px;color:#1e3b55}.client-profile-title-row span{font-size:10px;color:#8193a5}
.client-profile-breadcrumb{display:flex;gap:6px;align-items:center;margin-top:4px;color:#8291a0;font-size:10px}.client-profile-breadcrumb strong{color:#46627b}.client-profile-close{width:34px;height:34px;border:1px solid #d6e1eb;border-radius:9px;background:#fff;color:#557189;display:grid;place-items:center;cursor:pointer}.client-profile-close:hover{background:#edf5fb;color:#183651}
.client-profile-layout{display:grid;grid-template-columns:275px minmax(0,1fr);gap:20px;padding:18px;background:#f4f7fa;min-height:calc(100vh - 100px)}
.client-profile-sidebar{position:relative;background:#fff;border:1px solid #d9e4ed;border-radius:4px;overflow:hidden;box-shadow:0 3px 12px rgba(35,68,98,.06);align-self:start}.client-profile-cover{height:70px;background:#214866}.client-avatar-shell{width:116px;height:116px;margin:-45px auto 0;position:relative}.client-avatar{width:116px;height:116px;border-radius:50%;background:#eef2f6;border:5px solid #fff;box-shadow:0 0 0 1px #b8c7d5;display:grid;place-items:center;overflow:hidden;color:#a9b3bd;font-size:62px}.client-avatar img{width:100%;height:100%;object-fit:cover}.client-avatar-live-dot{position:absolute;right:7px;bottom:10px;width:16px;height:16px;border-radius:50%;background:#18c98c;border:3px solid #fff}.client-avatar-live-dot.offline{background:#ef5a67}
.client-profile-sidebar h3{text-align:center;color:#1a2e40;margin:10px 12px 2px;font-size:17px;font-weight:600}.client-profile-mini-id{text-align:center;color:#7c8da0;font-size:11px;margin-bottom:18px}.client-profile-summary-list{border-top:1px solid #e2e9ef;border-bottom:1px solid #e2e9ef;padding:11px 12px}.client-profile-summary-list>div{display:grid;grid-template-columns:18px 90px minmax(0,1fr);gap:5px;align-items:center;min-height:29px;font-size:10px}.client-profile-summary-list i{color:#214866;text-align:center}.client-profile-summary-list span{color:#677a8d}.client-profile-summary-list strong{color:#183651;text-align:right;overflow-wrap:anywhere}.client-profile-actions{padding:11px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.client-profile-actions button{border:0;border-radius:3px;padding:8px 7px;background:#214866;color:#fff;font-size:10px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;min-height:33px}.client-profile-actions button:hover{background:#173c58}.client-profile-actions button:nth-child(3){background:#1b846f}.client-profile-actions button:nth-child(4){background:#416c8b}.client-profile-actions button:nth-child(5){grid-column:1/-1;background:#214866}.client-profile-actions button.secondary{grid-column:1/-1;background:#2d526f}
.client-profile-main{background:#fff;border:1px solid #d9e4ed;border-radius:4px;box-shadow:0 3px 12px rgba(35,68,98,.06);padding:12px 14px 16px;min-width:0;align-self:start}.client-profile-tabs{display:flex;flex-wrap:wrap;gap:0;border-bottom:1px solid #d9e4ed;margin-bottom:14px}.client-profile-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;color:#7b6d64;font-size:10px;padding:9px 10px;cursor:pointer;white-space:nowrap}.client-profile-tabs button:hover{color:#214866}.client-profile-tabs button.active{color:#111f2d;border-bottom-color:#f0a11e;font-weight:700}
.client-profile-tab-pane{margin:0!important}.client-profile-section{margin-bottom:14px;border:1px solid #dce5ed;background:#fff}.client-profile-section-title{background:#214866;color:#fff;font-size:11px;font-weight:700;padding:7px 9px;border-radius:3px 3px 0 0}.client-service-grid{display:grid;grid-template-columns:1fr 1fr}.client-service-grid>div{display:grid;grid-template-columns:minmax(110px,38%) minmax(0,1fr);min-height:30px;align-items:center;border-bottom:1px solid #dce5ed;background:#f0f3f5;font-size:10px}.client-service-grid>div:nth-child(4n+3),.client-service-grid>div:nth-child(4n+4){background:#fff}.client-service-grid>div:nth-child(odd){border-right:1px solid #dce5ed}.client-service-grid>div.wide{grid-column:1/-1}.client-service-grid span{padding:6px 10px;text-align:right;color:#354f66}.client-service-grid span:after{content:'  :';float:right;margin-left:8px;color:#738597}.client-service-grid b{padding:6px 10px;color:#3f4f5d;font-weight:500;overflow-wrap:anywhere}.profile-inline-icon{border:0;background:transparent;color:#214866;cursor:pointer;padding:0 3px}.client-live-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}.client-live-grid>div{padding:9px 10px;border-right:1px solid #e0e8ef;border-bottom:1px solid #e0e8ef}.client-live-grid>div:nth-child(4n){border-right:0}.client-live-grid span{display:block;color:#7890a5;font-size:9px;margin-bottom:3px}.client-live-grid strong{color:#29485f;font-size:10px}.profile-admin-controls{padding:12px;display:grid;grid-template-columns:auto auto auto 150px 110px minmax(180px,1fr) auto;gap:8px;align-items:center}.profile-admin-controls .form-control{min-height:34px!important;font-size:10px!important}
.client-payment-summary{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:9px 10px;background:#f7fafc;border-bottom:1px solid #e0e8ef;color:#718397;font-size:10px}.client-payment-summary strong{font-size:15px;color:#16936f}.client-profile-empty{min-height:250px;border:1px dashed #cbd8e3;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#8193a5;padding:30px}.client-profile-empty.compact{min-height:100px}.client-profile-empty i{font-size:28px;color:#99adbe;margin-bottom:8px}.client-profile-empty h4{margin:0 0 5px;color:#3b556c}.client-profile-empty p{margin:0;font-size:11px}.profile-history-list{display:grid}.profile-history-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:start;padding:10px 12px;border-bottom:1px solid #e4ebf1;font-size:10px}.profile-history-row:last-child{border-bottom:0}.profile-history-row>i{width:25px;height:25px;border-radius:50%;background:#e8f1f8;color:#214866;display:grid;place-items:center}.profile-history-row strong{color:#29475f}.profile-history-row p{margin:3px 0 0;color:#607588}.profile-history-row time{color:#8999a8;white-space:nowrap}.client-profile-danger{margin-top:16px;border-top:1px solid #e4eaf0;padding:13px 2px 0;display:flex;justify-content:space-between;gap:12px;align-items:center}.client-profile-danger>div{display:flex;flex-direction:column}.client-profile-danger strong{color:#d14752;font-size:11px}.client-profile-danger span{color:#8092a3;font-size:9px}
body.dark-mode .client-profile-modal,body.dark-mode .client-profile-layout{background:#071a2c!important;border-color:#1d3a52!important}.dark-mode .client-profile-page-head,.dark-mode .client-profile-sidebar,.dark-mode .client-profile-main,.dark-mode .client-profile-section{background:#0c2238!important;border-color:#1a3c56!important}.dark-mode .client-profile-page-head{border-bottom-color:#1a3c56!important}.dark-mode .client-profile-title-row h2,.dark-mode .client-profile-sidebar h3,.dark-mode .client-profile-summary-list strong,.dark-mode .client-service-grid b,.dark-mode .client-live-grid strong,.dark-mode .profile-history-row strong{color:#eaf4fc!important}.dark-mode .client-profile-title-row span,.dark-mode .client-profile-breadcrumb,.dark-mode .client-profile-mini-id,.dark-mode .client-profile-summary-list span,.dark-mode .client-service-grid span,.dark-mode .client-live-grid span,.dark-mode .profile-history-row p,.dark-mode .profile-history-row time{color:#8ea7bb!important}.dark-mode .client-profile-cover,.dark-mode .client-profile-section-title{background:#173d5b!important}.dark-mode .client-profile-summary-list,.dark-mode .client-profile-tabs,.dark-mode .client-profile-section,.dark-mode .client-service-grid>div,.dark-mode .profile-history-row{border-color:#1c405b!important}.dark-mode .client-service-grid>div,.dark-mode .client-service-grid>div:nth-child(4n+3),.dark-mode .client-service-grid>div:nth-child(4n+4){background:#0f2a43!important}.dark-mode .client-service-grid>div:nth-child(4n+3),.dark-mode .client-service-grid>div:nth-child(4n+4){background:#0b243a!important}.dark-mode .client-profile-tabs button{color:#91a6b9!important}.dark-mode .client-profile-tabs button.active{color:#fff!important}.dark-mode .client-profile-empty,.dark-mode .client-payment-summary{background:#0e2941!important;border-color:#21445f!important}.dark-mode .client-profile-close{background:#0e2941;border-color:#21445f;color:#b8c9d7}.dark-mode .client-avatar{background:#102d47;border-color:#0c2238;box-shadow:0 0 0 1px #34566f}
@media(max-width:1220px){.client-profile-layout{grid-template-columns:235px minmax(0,1fr);gap:12px;padding:12px}.client-profile-actions{grid-template-columns:1fr}.client-profile-actions button,.client-profile-actions button:nth-child(5),.client-profile-actions button.secondary{grid-column:auto}.client-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-admin-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.client-profile-modal{min-height:calc(100vh - 16px)!important;border-radius:8px!important}.client-profile-layout{grid-template-columns:1fr}.client-profile-sidebar{position:static}.client-profile-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.client-profile-actions button:nth-child(5),.client-profile-actions button.secondary{grid-column:auto}.client-profile-tabs{overflow-x:auto;flex-wrap:nowrap}.client-profile-tabs button{flex:0 0 auto}.client-profile-main{padding:10px}.client-service-grid{grid-template-columns:1fr}.client-service-grid>div,.client-service-grid>div:nth-child(odd){border-right:0}.client-service-grid>div.wide{grid-column:auto}.profile-admin-controls{grid-template-columns:1fr 1fr}.client-profile-page-head{padding:9px 10px}}
@media(max-width:560px){.client-profile-page-head{align-items:flex-start}.client-profile-breadcrumb{display:none}.client-profile-title-row h2{font-size:17px}.client-profile-layout{padding:8px}.client-profile-actions{grid-template-columns:1fr}.client-live-grid{grid-template-columns:1fr}.profile-admin-controls{grid-template-columns:1fr}.client-service-grid>div{grid-template-columns:42% 58%}.client-profile-danger{align-items:flex-start;flex-direction:column}.client-profile-danger button{width:100%}}


/* ==========================================================================\n   v2.9.4 - ISP Digital-style light sidebar + stable MikroTik menu icon\n   ========================================================================== */
body.light-mode #sidebar.sidebar{
  background:#f3f4f5!important;
  border-right:1px solid #d4d9de!important;
  color:#17354d!important;
  box-shadow:1px 0 0 rgba(26,55,78,.04)!important;
}
body.light-mode #sidebar .sidebar-header{
  background:#123b58!important;
  border-bottom:1px solid #244f6c!important;
  color:#fff!important;
}
body.light-mode #sidebar .sidebar-brand-mark{
  background:#fff!important;
  color:#123b58!important;
  box-shadow:none!important;
}
body.light-mode #sidebar .sidebar-brand-copy strong{color:#fff!important;}
body.light-mode #sidebar .sidebar-brand-copy small{color:#d2e2ee!important;}
body.light-mode #sidebar #toggle-sidebar{color:#e7f1f7!important;}
body.light-mode #sidebar #toggle-sidebar:hover{background:rgba(255,255,255,.10)!important;color:#fff!important;}

body.light-mode #sidebar .menu-search-container{
  background:#f3f4f5!important;
  border-bottom:1px solid #d4d9de!important;
}
body.light-mode #sidebar .menu-search-container input{
  background:#fff!important;
  border:1px solid #8da4b5!important;
  color:#1b3448!important;
  border-radius:3px!important;
  box-shadow:none!important;
}
body.light-mode #sidebar .menu-search-container input::placeholder{color:#718596!important;}
body.light-mode #sidebar .menu-search-container i{color:#244966!important;}

body.light-mode #sidebar .sidebar-nav{background:#f3f4f5!important;}
body.light-mode #sidebar .nav-link{
  color:#18354b!important;
  background:transparent!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  font-weight:600!important;
}
body.light-mode #sidebar .nav-link i{
  color:#163f5b!important;
  opacity:1!important;
}
body.light-mode #sidebar .nav-link .dropdown-arrow{color:#31566f!important;}
body.light-mode #sidebar .nav-link:hover,
body.light-mode #sidebar .nav-link.active{
  color:#102f45!important;
  background:#e3e8ec!important;
  border-color:#d7dde2!important;
  box-shadow:inset 3px 0 0 #194a68!important;
}
body.light-mode #sidebar .nav-link:hover i,
body.light-mode #sidebar .nav-link.active i{color:#0f3955!important;}

body.light-mode #sidebar .sidebar-submenu{
  background:#eceff1!important;
  border-left:1px solid #c9d0d6!important;
}
body.light-mode #sidebar .nav-link-sub{
  color:#344e61!important;
  background:transparent!important;
  font-weight:500!important;
}
body.light-mode #sidebar .nav-link-sub i{color:#31566f!important;}
body.light-mode #sidebar .nav-link-sub:hover,
body.light-mode #sidebar .nav-link-sub.active{
  color:#12364f!important;
  background:#dce4e9!important;
}
body.light-mode #sidebar .nav-link-sub:hover i,
body.light-mode #sidebar .nav-link-sub.active i{color:#12364f!important;}

body.light-mode #sidebar .release-item{
  border-top-color:#d7dde2!important;
}
body.light-mode #sidebar .release-nav-link{color:#526b7e!important;}
body.light-mode #sidebar .release-nav-link i{color:#31566f!important;}

/* Collapsed sidebar dropdowns stay in the same ISP Digital light palette. */
body.light-mode #sidebar.sidebar.collapsed .menu-item-has-child:hover .sidebar-submenu{
  background:#f7f8f9!important;
  border:1px solid #cfd7de!important;
  box-shadow:0 12px 30px rgba(24,53,75,.16)!important;
}
body.light-mode #sidebar.sidebar.collapsed .sidebar-submenu .nav-link-sub{color:#344e61!important;}
body.light-mode #sidebar.sidebar.collapsed .sidebar-submenu .nav-link-sub:hover,
body.light-mode #sidebar.sidebar.collapsed .sidebar-submenu .nav-link-sub.active{
  color:#12364f!important;
  background:#e3e9ed!important;
}

/* Font Awesome `fa-router` was not consistently available. This Free icon is stable. */
#sidebar .mikrotik-sidebar-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  min-width:18px!important;
  font-size:15px!important;
  visibility:visible!important;
  opacity:1!important;
}
body.light-mode #sidebar .mikrotik-sidebar-icon{color:#163f5b!important;}
body.dark-mode #sidebar .mikrotik-sidebar-icon{color:#8fb3d9!important;}


/* ==========================================================================\n   v2.9.6 - Profile viewport, Billing List controls & Online Client Monitoring\n   ========================================================================== */
.client-profile-overlay{
  top:var(--client-profile-top,86px)!important;
  height:calc(100vh - var(--client-profile-top,86px))!important;
  min-height:0!important;
  z-index:850!important;
  padding:12px 18px 18px!important;
}
.client-profile-modal{
  min-height:calc(100vh - var(--client-profile-top,86px) - 30px)!important;
  max-height:calc(100vh - var(--client-profile-top,86px) - 24px)!important;
  overflow:auto!important;
}
.client-profile-page-head{position:sticky;top:0;z-index:12}
@media(max-width:900px){.client-profile-overlay{left:0!important;width:100vw!important;padding:8px!important}.client-profile-modal{min-height:calc(100vh - var(--client-profile-top,86px) - 12px)!important;max-height:calc(100vh - var(--client-profile-top,86px) - 8px)!important}}

.reference-filter-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-bottom:1px solid var(--border-dark);font-size:11px}.reference-filter-head strong{display:flex;align-items:center;gap:7px}.billing-advanced-filters.collapsed,.monitor-filter-grid.collapsed{display:none!important}.reference-filter-card:has(.billing-advanced-filters.collapsed) .reference-filter-head,.reference-filter-card:has(.monitor-filter-grid.collapsed) .reference-filter-head{border-bottom:0}.billing-pdf-modal{width:min(720px,calc(100vw - 40px))!important;max-width:720px!important}.billing-pdf-select-all{display:block;padding:0 0 10px}.billing-pdf-field-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;border-top:1px solid var(--border-dark);padding:14px 0}.billing-pdf-field-grid label{display:flex;align-items:center;gap:7px;font-size:11px}.billing-pdf-field-grid input,.billing-pdf-select-all input{width:15px;height:15px}.billing-pdf-note{display:flex;gap:8px;align-items:flex-start;padding:10px;border-radius:8px;background:rgba(37,131,255,.08);color:var(--text-muted);font-size:10px;margin-bottom:12px}.modal-actions{display:flex;justify-content:flex-end;gap:8px}.reference-table-toolbar #billing-entry-status{font-size:9px;margin-left:4px}

.monitor-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.monitor-kpi{display:flex;align-items:center;gap:11px;padding:12px 14px;border:1px solid var(--v28-border,#dce5ee);border-radius:10px;background:var(--card-bg,#fff)}.monitor-kpi>i{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#eaf3fb;color:#1f6feb;font-size:16px}.monitor-kpi span{display:block;color:var(--text-muted);font-size:10px}.monitor-kpi strong{display:block;color:var(--text-primary);font-size:18px;margin-top:2px}.monitor-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;padding:12px}.monitor-filter-grid label{display:block;font-size:9px;font-weight:700;text-transform:uppercase;color:var(--text-muted);margin-bottom:5px}.monitor-toolbar-right{display:flex;align-items:center;gap:8px}.monitor-table-wrap{max-height:650px;overflow:auto}.monitor-table{min-width:2250px}.monitor-table thead th{position:sticky;top:0;z-index:3}.monitor-table td{font-size:10px;vertical-align:middle}.monitor-live-rate,.monitor-session-usage{display:grid;gap:2px;white-space:nowrap;text-align:left}.monitor-live-rate b:first-child,.monitor-session-usage b:first-child{color:#1672d4}.monitor-live-rate b:last-child,.monitor-session-usage b:nth-child(2){color:#16a06a}.monitor-session-usage small{color:var(--text-muted);font-size:8px}.monitor-actions{display:flex;gap:4px;align-items:center}.monitor-actions button{width:28px;height:28px;border:1px solid #d8e3eb;border-radius:7px;background:#fff;color:#159b4d;display:grid;place-items:center;cursor:pointer}.monitor-actions button:hover{background:#eef7f2;border-color:#9bd6b4}.link-button{border:0;background:transparent;color:#1672d4;padding:0;cursor:pointer;font:inherit}.link-button:hover{text-decoration:underline}.live-traffic-modal{width:min(1180px,calc(100vw - 40px))!important;max-width:1180px!important}.traffic-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.traffic-info-grid>div,.traffic-kpi-row>div{border:1px solid var(--border-dark);border-radius:8px;padding:9px 10px;background:var(--card-bg)}.traffic-info-grid span,.traffic-kpi-row span{display:block;color:var(--text-muted);font-size:9px;margin-bottom:3px}.traffic-info-grid strong,.traffic-kpi-row strong{font-size:11px;color:var(--text-primary);overflow-wrap:anywhere}.traffic-kpi-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px}.traffic-kpi-row strong{font-size:16px}.traffic-chart-card{border:1px solid var(--border-dark);border-radius:8px;overflow:hidden}.traffic-canvas-wrap{height:360px;padding:14px;background:var(--card-bg)}
body.dark-mode .monitor-kpi,body.dark-mode .monitor-actions button,body.dark-mode .traffic-info-grid>div,body.dark-mode .traffic-kpi-row>div{background:#0c2238;border-color:#1a3a55}body.dark-mode .monitor-kpi>i{background:#102f4b;color:#50a8ff}body.dark-mode .monitor-actions button{color:#46d083}.dark-mode .traffic-canvas-wrap{background:#0c2238}
@media(max-width:1100px){.monitor-kpi-grid{grid-template-columns:repeat(2,1fr)}.monitor-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.billing-pdf-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.traffic-info-grid,.traffic-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.monitor-kpi-grid,.monitor-filter-grid,.traffic-info-grid,.traffic-kpi-row{grid-template-columns:1fr}.billing-pdf-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.monitor-toolbar-right{width:100%;flex-wrap:wrap}.reference-table-toolbar{align-items:flex-start;flex-direction:column}.config-search{max-width:none!important;width:100%!important}}


/* v2.9.7 ISP Digital-style Client List */
.client-reference-mode{padding:0 0 18px}.client-reference-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin:8px 12px 14px}.client-reference-actions button{border:0;border-radius:18px;background:#173f5d;color:#fff;padding:8px 12px;font:600 12px/1 Outfit,sans-serif;box-shadow:0 2px 5px rgba(20,55,80,.18);cursor:pointer}.client-reference-actions button:hover{background:#0f324d}.client-reference-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin:0 12px 12px}.client-ref-card{min-height:64px;border-radius:4px;color:#fff;display:flex;align-items:center;gap:12px;padding:10px 14px;box-shadow:0 3px 7px rgba(25,54,75,.16)}.client-ref-card>i{font-size:30px}.client-ref-card span{display:block;font-size:13px}.client-ref-card strong{font-size:22px;line-height:1}.client-ref-card small{display:block;font-size:9px;margin-top:4px}.client-ref-card.cyan{background:#15acd0}.client-ref-card.teal{background:#2fb8b3}.client-ref-card.violet{background:#8073d4}.client-ref-card.slate{background:#58616a}.client-filter-toggle-row{text-align:center;border-bottom:1px solid #dce5ee;padding:4px 0 12px}.client-filter-toggle-row button{border:0;border-radius:18px;background:#183f5c;color:#fff;padding:8px 18px;font-weight:600}.client-reference-filter-panel{display:grid;grid-template-columns:repeat(6,minmax(135px,1fr));gap:14px 22px;padding:16px 12px;border-bottom:1px solid #dce5ee;overflow:hidden;transition:.2s}.client-reference-filter-panel.collapsed{display:none}.client-reference-filter-panel label{display:block;font-size:11px;font-weight:600;color:#445b6f;margin-bottom:5px}.client-reference-table-card{background:#fff;margin:14px 12px 0;border-radius:4px}.client-reference-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 0 14px;font-size:11px;color:#435b6d}.client-reference-table-toolbar label{display:flex;align-items:center;gap:7px}.client-reference-table-toolbar .mini{width:68px}.client-reference-search input{width:140px;height:30px}.client-reference-data-table{font-size:11px;min-width:1300px}.client-reference-data-table th{background:#214b69!important;color:#fff!important;text-align:center;padding:9px 5px!important;white-space:nowrap}.client-reference-data-table td{text-align:center;padding:9px 5px!important;border-color:#dce5ee!important;vertical-align:middle}.client-reference-data-table tbody tr:nth-child(even){background:#eef3f6}.client-reference-data-table .link-button{border:0;background:transparent;color:#223d55;cursor:pointer}.client-idip-state{font-size:9px;margin-top:4px;color:#14a8df}.client-live-dot{display:inline-block;width:9px;height:9px;border-radius:50%;vertical-align:middle}.client-live-dot.on{background:#35c66b}.client-live-dot.off{background:#9aa7b2}.client-pass-cell{display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}.client-pass-cell .pass-masked{letter-spacing:2px}.client-mstatus{display:inline-flex;min-width:38px;justify-content:center;border-radius:14px;padding:4px 6px;font-weight:700;color:white}.client-mstatus.online{background:#2ea8ff}.client-mstatus.offline{background:#9aa7b2}.client-row-actions{display:flex;justify-content:center;gap:5px}.client-row-actions button{border:0;background:#eef2f5;border-radius:6px;width:28px;height:28px;cursor:pointer;color:#163d59}.client-reference-pagination{display:flex;justify-content:space-between;align-items:center;padding:12px 0;font-size:11px}.client-pdf-modal{max-width:700px}.client-pdf-all{display:block;margin-bottom:12px}.client-pdf-field-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 18px}.client-pdf-field-grid label{font-size:13px;color:#52606b}.client-pdf-field-grid input{margin-right:5px}
@media(max-width:1100px){.client-reference-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.client-reference-filter-panel{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.client-reference-summary{grid-template-columns:1fr}.client-reference-filter-panel{grid-template-columns:1fr 1fr}.client-reference-actions{justify-content:flex-start}.client-pdf-field-grid{grid-template-columns:1fr 1fr}}


/* ==========================================================================
   v2.9.8 - ISP Digital style Billing List
   ========================================================================== */
.ispd-billing-pane{padding:0 0 18px}.ispd-billing-bulkbar{margin:2px 12px 10px}.ispd-bulk-toggle{border:0;border-radius:18px;background:#173f5d;color:#fff;padding:8px 16px;font:600 11px/1 Outfit,sans-serif;display:inline-flex;align-items:center;gap:7px;cursor:pointer;box-shadow:0 2px 5px rgba(20,55,80,.18)}.ispd-billing-bulkbar .bulk-action-grid{margin-top:8px;border:1px solid #dce5ee;border-radius:5px;background:#fff}.ispd-billing-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin:0 12px 12px}.ispd-bill-card{border-radius:3px;color:#fff;overflow:hidden;box-shadow:0 3px 7px rgba(25,54,75,.16);min-height:88px}.ispd-bill-card-main{min-height:64px;display:flex;align-items:center;gap:14px;padding:10px 14px}.ispd-bill-card-main>i{font-size:33px;line-height:1}.ispd-bill-card span{display:block;font-size:13px}.ispd-bill-card strong{display:block;font-size:21px;line-height:1.05;margin-top:3px}.ispd-bill-card small{display:block;text-align:center;font-size:9px;padding:5px 8px;background:rgba(0,0,0,.09)}.ispd-bill-card.cyan{background:#18acd1}.ispd-bill-card.teal{background:#31b8b3}.ispd-bill-card.violet{background:#8074d6}.ispd-bill-card.slate{background:#596169}.ispd-filter-toggle-row{text-align:center;border-bottom:1px solid #d9e1e7;padding:5px 0 11px;margin:0 0 7px}.ispd-filter-toggle-row button{border:0;border-radius:18px;background:#173f5d;color:#fff;padding:8px 19px;font:600 11px/1 Outfit,sans-serif;cursor:pointer;box-shadow:0 2px 5px rgba(20,55,80,.18)}.ispd-billing-filter-panel{display:grid;grid-template-columns:repeat(6,minmax(135px,1fr));gap:14px 22px;padding:10px 12px 16px;border-bottom:1px solid #d9e1e7}.ispd-billing-filter-panel.collapsed{display:none}.ispd-billing-filter-panel label{display:block;font-size:10px;font-weight:600;color:#42586b;margin-bottom:5px}.ispd-billing-filter-panel .form-control{height:31px;border-radius:2px;background:#fff;color:#283d50}.ispd-billing-table-card{background:#fff;margin:0 12px;border-radius:3px}.ispd-billing-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:10px 0 14px;color:#435b6d;font-size:10px}.ispd-billing-table-toolbar label{display:flex;align-items:center;gap:7px}.ispd-billing-table-toolbar .mini{width:58px;height:28px;border-radius:2px}.ispd-billing-search input{width:140px;height:28px;border-radius:2px}.ispd-billing-table-card .table-responsive{overflow:auto;max-height:620px}.ispd-billing-table{min-width:1910px;font-size:10px;border-collapse:collapse}.ispd-billing-table th{position:sticky;top:0;z-index:3;background:#214b69!important;color:#fff!important;text-align:center!important;vertical-align:middle;padding:9px 5px!important;white-space:nowrap;border-color:#dce5ee!important}.ispd-billing-table td{text-align:center!important;vertical-align:middle!important;padding:9px 6px!important;border-color:#dce5ee!important;white-space:nowrap}.ispd-billing-table tbody tr:nth-child(even){background:#dfe8ee}.ispd-billing-table tbody tr:hover{background:#edf5fa}.ispd-id-state{color:#00aede;font-size:10px;margin-top:4px}.ispd-live-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-left:3px}.ispd-live-dot.on{background:#38c66b}.ispd-live-dot.off{background:#a1adb7}.ispd-expire-cell{display:flex;flex-direction:column;align-items:center;gap:4px}.ispd-expire-cell i{display:grid;place-items:center;width:22px;height:22px;border-radius:3px;background:#f0f0f0;color:#1d3142;box-shadow:0 2px 4px rgba(0,0,0,.15)}.ispd-server-cell{white-space:normal!important;line-height:1.1;max-width:110px}.ispd-mstatus{display:inline-flex;align-items:center;width:38px;height:20px;padding:2px;border-radius:14px;background:#a7b0b8;justify-content:flex-start}.ispd-mstatus span{width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2)}.ispd-mstatus.on{background:#2da8f3;justify-content:flex-end}.ispd-bstatus{display:flex;justify-content:center;gap:4px;align-items:center}.ispd-status-btn,.ispd-status-badge{border:0;border-radius:2px;padding:4px 6px;font:600 9px/1 Arial,sans-serif;white-space:nowrap}.ispd-status-btn{cursor:pointer}.ispd-status-btn.pay{background:#555;color:#fff}.ispd-status-btn.bill{background:#2682c5;color:#fff}.ispd-status-badge.due{background:#e82943;color:#fff}.ispd-status-badge.paid{background:#20a83a;color:#fff}.ispd-status-badge.neutral{background:#7a8792;color:#fff}.ispd-more-btn{border:0;background:transparent;color:#111;font-size:18px;padding:4px 8px;cursor:pointer}.ispd-more-btn:hover{color:#1672d4}.reference-billing-page #billing-invoice-pane+.hidden{display:none}
body.light-mode .ispd-bill-card{color:#fff!important;border:0!important}body.light-mode .ispd-bill-card span,body.light-mode .ispd-bill-card small,body.light-mode .ispd-bill-card strong{color:#fff!important}.dark-mode .ispd-billing-table-card,.dark-mode .ispd-billing-bulkbar .bulk-action-grid{background:#0f263b}.dark-mode .ispd-billing-filter-panel .form-control,.dark-mode .ispd-billing-search input{background:#0f263b;color:#e6eef5;border-color:#29465d}.dark-mode .ispd-billing-table tbody tr:nth-child(even){background:#132e46}.dark-mode .ispd-billing-table tbody tr:hover{background:#173850}.dark-mode .ispd-filter-toggle-row,.dark-mode .ispd-billing-filter-panel{border-color:#29465d}.dark-mode .ispd-billing-filter-panel label{color:#b7c7d5}
@media(max-width:1180px){.ispd-billing-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ispd-billing-filter-panel{grid-template-columns:repeat(3,minmax(135px,1fr))}}@media(max-width:700px){.ispd-billing-summary{grid-template-columns:1fr;gap:10px}.ispd-billing-filter-panel{grid-template-columns:1fr 1fr}.ispd-billing-table-toolbar{align-items:flex-start;flex-direction:column;gap:8px}.ispd-billing-search{width:100%}.ispd-billing-search input{width:100%}.ispd-billing-bulkbar{margin-left:0;margin-right:0}.ispd-billing-summary,.ispd-billing-table-card{margin-left:0;margin-right:0}}

/* v3.0.4.4 ISP Digital-style Bill Receive modal */
.bill-receive-modal{width:min(760px,calc(100vw - 44px))!important;max-width:760px!important;max-height:calc(100vh - 34px)!important;overflow:hidden!important;border-radius:4px!important;background:#fff!important;color:#324b60!important}
.bill-receive-head{min-height:44px!important;padding:8px 18px!important;justify-content:center!important;background:#214b69!important;border:0!important;position:relative}.bill-receive-head h3{margin:0!important;color:#fff!important;font:700 18px/1.2 Outfit,Arial,sans-serif!important}.bill-receive-head h3 i{margin-right:7px}.bill-receive-head .modal-close{position:absolute;right:11px;top:8px;color:#91a7b8!important}
.bill-receive-body{padding:14px 18px 12px!important;overflow:auto!important;background:#fff!important}.bill-receive-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 24px;padding-bottom:14px;border-bottom:1px solid #e2e8ee}.bill-receive-info-grid>label{display:grid;grid-template-columns:145px minmax(0,1fr);align-items:start;gap:8px;margin:0;font-size:10px;font-weight:700;text-transform:uppercase;color:#5b7183}.bill-receive-info-grid>label>span{padding-top:8px}.bill-receive-info-grid>label>span b{color:#dc3545}.bill-receive-info-grid .form-control{height:30px!important;min-height:30px!important;border-radius:2px!important;border:1px solid #c8d1d9!important;padding:5px 9px!important;background:#fff!important;color:#465966!important;font-size:11px!important}.bill-receive-info-grid input[readonly]{background:#e9edef!important;color:#62717b!important}.bill-receive-info-grid small{grid-column:2;display:block;margin-top:2px;color:#81909d;font-size:8px;font-weight:500;text-transform:none}.bill-receive-info-grid small i{margin-right:3px;color:#8ca1b4}
.bill-receive-amount-table{margin-top:14px;border-bottom:1px solid #e3e8ec}.bill-receive-table-head,.bill-receive-amount-table>div:not(.bill-receive-table-head){display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:34px}.bill-receive-table-head{min-height:34px!important;background:#214b69;color:#fff;text-align:center}.bill-receive-table-head strong{font-size:11px}.bill-receive-table-head strong+strong{border-left:1px solid rgba(255,255,255,.75)}.bill-receive-amount-table>div:not(.bill-receive-table-head){text-align:center;color:#6b747b;font-size:10px;border-bottom:1px solid #edf0f2}.bill-receive-amount-table>div:nth-child(even){background:#e9eef1}.bill-receive-amount-table>div:last-child{border-bottom:0}.bill-receive-amount-table>div>span:first-child{padding:7px 10px}.bill-receive-amount-table output{font-weight:600;color:#54636d}.bill-receive-amount-table input:not([type=checkbox]){justify-self:center;width:min(92%,305px);height:25px;border:1px solid #cbd4dc;border-radius:2px;background:#fff;color:#425567;padding:3px 8px;text-align:center;font:500 10px Outfit,Arial,sans-serif}.bill-receive-amount-table input.input-error{border-color:#e23b4e!important;background:#fff5f6!important}.bill-receive-amount-table .emphasis{background:#e5ebef!important}.bill-receive-amount-table .emphasis output{font-weight:800;color:#214b69}.bill-receive-vat{display:flex;align-items:center;justify-content:center;gap:8px}.bill-receive-vat>input[type=number]{width:150px!important}.bill-receive-check{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.bill-receive-check input{width:14px;height:14px}
.bill-receive-options{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 9px;font-size:11px;color:#214b69}.bill-receive-options label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.bill-receive-options input[type=checkbox]{width:17px;height:17px;accent-color:#1878e8}.bill-receive-options input[type=date]{width:145px;height:28px!important;min-height:28px!important;font-size:10px!important}.bill-receive-actions{display:flex;justify-content:space-between;gap:18px}.bill-receive-actions .btn{width:31%;min-height:29px;border-radius:18px!important;padding:6px 14px!important;font-size:10px!important;background:#fff!important}.bill-receive-cancel{border:1px solid #ff3b30!important;color:#f04438!important}.bill-receive-submit{border:1px solid #173f5d!important;color:#173f5d!important;box-shadow:0 2px 5px rgba(20,55,80,.18)}.bill-receive-submit:hover{background:#173f5d!important;color:#fff!important}.bill-receive-submit:disabled{opacity:.65;cursor:not-allowed}
.dark-mode .bill-receive-modal,.dark-mode .bill-receive-body{background:#0d2438!important;color:#dbe7ef!important}.dark-mode .bill-receive-info-grid{border-color:#29465d}.dark-mode .bill-receive-info-grid>label{color:#b7c7d5}.dark-mode .bill-receive-info-grid .form-control,.dark-mode .bill-receive-amount-table input:not([type=checkbox]){background:#102b42!important;border-color:#35536a!important;color:#e4eef5!important}.dark-mode .bill-receive-info-grid input[readonly]{background:#18344a!important;color:#b8c8d4!important}.dark-mode .bill-receive-amount-table{border-color:#29465d}.dark-mode .bill-receive-amount-table>div:not(.bill-receive-table-head){color:#c0ced8;border-color:#1d3a51}.dark-mode .bill-receive-amount-table>div:nth-child(even),.dark-mode .bill-receive-amount-table .emphasis{background:#153149!important}.dark-mode .bill-receive-amount-table output,.dark-mode .bill-receive-amount-table .emphasis output{color:#eaf4fb}.dark-mode .bill-receive-options{color:#d2e2ed}
@media(max-width:760px){.bill-receive-modal{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important}.bill-receive-info-grid{grid-template-columns:1fr;gap:8px}.bill-receive-info-grid>label{grid-template-columns:120px minmax(0,1fr)}.bill-receive-options{flex-wrap:wrap}.bill-receive-actions .btn{width:45%}}
@media(max-width:470px){.bill-receive-info-grid>label{grid-template-columns:1fr;gap:3px}.bill-receive-info-grid>label>span{padding-top:0}.bill-receive-info-grid small{grid-column:1}.bill-receive-amount-table input:not([type=checkbox]){width:95%}.bill-receive-vat{flex-wrap:wrap}.bill-receive-vat>input[type=number]{width:90px!important}.bill-receive-options{justify-content:flex-start}.bill-receive-actions .btn{width:50%}}

/* v3.0.4.6 billing adjustment and previous-month overdue clarity */
.bill-note-required{display:none;color:#dc3545;font-weight:800}.bill-note-required.active{display:inline}.bill-receive-amount-table #bill-pay-advance{color:#1672d4;font-weight:800}.ispd-bstatus{flex-wrap:wrap;max-width:135px;margin:auto}.ispd-overdue-meta{flex-basis:100%;display:block;color:#9d2638;font-size:8px;line-height:1.2;white-space:normal;margin-top:2px}.dark-mode .ispd-overdue-meta{color:#ff9aab}

/* v3.0.4.5 Bill Receive viewport, scroll and close hotfix */
.bill-receive-overlay{
  align-items:flex-start!important;
  overflow:hidden!important;
  padding-top:12px!important;
  padding-bottom:12px!important;
}
.bill-receive-modal{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  max-height:calc(100vh - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
  margin:0 auto!important;
  overflow:hidden!important;
}
.bill-receive-head{
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
  z-index:8!important;
}
.bill-receive-head .modal-close{
  display:grid!important;
  place-items:center!important;
  width:32px!important;
  height:32px!important;
  padding:0!important;
  opacity:1!important;
  cursor:pointer!important;
}
.bill-receive-body{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  -webkit-overflow-scrolling:touch;
}
.bill-receive-body::-webkit-scrollbar{width:9px}
.bill-receive-body::-webkit-scrollbar-track{background:#eef2f5}
.bill-receive-body::-webkit-scrollbar-thumb{background:#7890a3;border:2px solid #eef2f5;border-radius:8px}
.bill-receive-body::-webkit-scrollbar-thumb:hover{background:#526b7f}
.dark-mode .bill-receive-body::-webkit-scrollbar-track{background:#10263a}
.dark-mode .bill-receive-body::-webkit-scrollbar-thumb{background:#54728a;border-color:#10263a}
@media(max-width:760px){
  .bill-receive-overlay{padding:8px!important}
  .bill-receive-modal{max-height:calc(100vh - 16px)!important;max-height:calc(100dvh - 16px)!important}
}

/* v3.0.5.0 Bill Receive total-due, due-month and digital-account fields */
.bill-receive-info-grid .bill-due-months-field{grid-column:1/-1}
.bill-receive-info-grid textarea.form-control{height:auto!important;min-height:68px!important;line-height:1.35!important;resize:vertical!important;white-space:pre-wrap}
.bill-receive-info-grid #bill-pay-account-wrap small,.bill-receive-info-grid .bill-due-months-field small{font-size:9px!important;line-height:1.35}
.accounting-v3050 .account-balance-preview{font-size:12px;line-height:1.6}
.accounting-v3050 #bank-accounts .card{box-shadow:none}
@media(max-width:760px){.bill-receive-info-grid .bill-due-months-field{grid-column:1}.bill-receive-info-grid textarea.form-control{min-height:76px!important}}

/* ============================================================
   R6.4 FINAL APPROVED LIST DESIGN
   - Client List: summary cards only redesigned
   - Billing List: ISP Digital compact layout
   - Daily / Payment / Receipts: compact no-side-scroll tables
   - Filter panels: explicit Show / Hide control
   ============================================================ */

/* Client List: keep all existing layout, filters and table unchanged; only polish summary cards. */
.client-reference-summary{gap:16px!important;margin-bottom:12px!important}
.client-ref-card{position:relative;overflow:hidden;min-height:78px!important;border-radius:8px!important;padding:12px 16px!important;box-shadow:0 5px 14px rgba(23,61,88,.16)!important;border:1px solid rgba(255,255,255,.18)}
.client-ref-card:after{content:"";position:absolute;right:-20px;bottom:-28px;width:110px;height:110px;border-radius:50%;background:rgba(255,255,255,.10)}
.client-ref-card>i{font-size:34px!important;position:relative;z-index:1}
.client-ref-card>div{position:relative;z-index:1}
.client-ref-card span{font-size:13px!important;font-weight:600}
.client-ref-card strong{font-size:24px!important;line-height:1!important;margin-top:3px;display:block}
.client-ref-card small{font-size:9px!important;opacity:.92;margin-top:7px!important}
.client-ref-card.cyan{background:linear-gradient(135deg,#16b5d9 0%,#0792cf 100%)!important}
.client-ref-card.teal{background:linear-gradient(135deg,#20c7bd 0%,#159c94 100%)!important}
.client-ref-card.violet{background:linear-gradient(135deg,#8b73e6 0%,#6d55c8 100%)!important}
.client-ref-card.slate{background:linear-gradient(135deg,#67727c 0%,#454f58 100%)!important}

/* Billing List bulk action row - visible and compact like ISP Digital. */
.ispd-billing-bulkbar-fixed{margin:4px 12px 12px!important}
.ispd-billing-actions-grid{display:grid;grid-template-columns:repeat(7,minmax(125px,1fr));gap:8px}
.ispd-billing-actions-grid button,.ispd-billing-actions-grid a{min-height:32px;border:0;border-radius:17px;background:#173f5d;color:#fff;padding:6px 9px;display:flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;font:600 10px/1.15 Outfit,Arial,sans-serif;box-shadow:0 2px 5px rgba(20,55,80,.18);cursor:pointer;white-space:nowrap}
.ispd-billing-actions-grid button:hover,.ispd-billing-actions-grid a:hover{background:#0e3350}

/* Billing list: fit all ISP Digital columns without page-level horizontal scroll. */
.ispd-billing-table-card .table-responsive{overflow-x:hidden!important;overflow-y:auto!important;max-height:620px}
.ispd-billing-table{width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:9.1px!important}
.ispd-billing-table th{font-size:8.8px!important;padding:7px 2px!important;white-space:normal!important;line-height:1.05!important;word-break:normal;overflow-wrap:normal}
.ispd-billing-table td{font-size:9.1px!important;padding:6px 2px!important;white-space:normal!important;line-height:1.12!important;overflow-wrap:anywhere}
.ispd-billing-table th:nth-child(1),.ispd-billing-table td:nth-child(1){width:22px}
.ispd-billing-table th:nth-child(2),.ispd-billing-table td:nth-child(2){width:44px}
.ispd-billing-table th:nth-child(3),.ispd-billing-table td:nth-child(3){width:72px}
.ispd-billing-table th:nth-child(4),.ispd-billing-table td:nth-child(4){width:69px}
.ispd-billing-table th:nth-child(5),.ispd-billing-table td:nth-child(5){width:74px}
.ispd-billing-table th:nth-child(6),.ispd-billing-table td:nth-child(6){width:58px}
.ispd-billing-table th:nth-child(7),.ispd-billing-table td:nth-child(7){width:44px}
.ispd-billing-table th:nth-child(8),.ispd-billing-table td:nth-child(8){width:47px}
.ispd-billing-table th:nth-child(9),.ispd-billing-table td:nth-child(9){width:58px}
.ispd-billing-table th:nth-child(10),.ispd-billing-table td:nth-child(10){width:45px}
.ispd-billing-table th:nth-child(11),.ispd-billing-table td:nth-child(11){width:42px}
.ispd-billing-table th:nth-child(12),.ispd-billing-table td:nth-child(12),
.ispd-billing-table th:nth-child(13),.ispd-billing-table td:nth-child(13),
.ispd-billing-table th:nth-child(14),.ispd-billing-table td:nth-child(14),
.ispd-billing-table th:nth-child(15),.ispd-billing-table td:nth-child(15),
.ispd-billing-table th:nth-child(16),.ispd-billing-table td:nth-child(16){width:48px}
.ispd-billing-table th:nth-child(17),.ispd-billing-table td:nth-child(17){width:68px}
.ispd-billing-table th:nth-child(18),.ispd-billing-table td:nth-child(18){width:76px}
.ispd-billing-table th:nth-child(19),.ispd-billing-table td:nth-child(19){width:48px}
.ispd-billing-table th:nth-child(20),.ispd-billing-table td:nth-child(20){width:58px}
.ispd-billing-table th:nth-child(21),.ispd-billing-table td:nth-child(21){width:34px}
.ispd-server-cell{max-width:none!important;word-break:break-word}
.ispd-expire-cell{gap:2px!important}.ispd-expire-cell i{width:19px!important;height:19px!important;font-size:9px}
.ispd-bstatus{gap:2px!important;flex-wrap:wrap}.ispd-status-btn,.ispd-status-badge{padding:3px 4px!important;font-size:8px!important}
.ispd-overdue-meta{display:block;width:100%;font-size:7.5px;line-height:1.05}

/* Native compact three-dot dropdown used by Billing/Payment/Receipt tables. */
.ispd-action-dropdown{position:relative;display:inline-block;text-align:left}
.ispd-action-dropdown>summary{list-style:none;width:26px;height:26px;display:grid;place-items:center;border-radius:4px;cursor:pointer;color:#111;font-size:16px}
.ispd-action-dropdown>summary::-webkit-details-marker{display:none}
.ispd-action-dropdown>summary:hover,.ispd-action-dropdown[open]>summary{background:#eef3f6}
.ispd-action-dropdown-menu{position:absolute;right:24px;top:-4px;z-index:80;min-width:155px;padding:5px;background:#fff;border:1px solid #d9e3eb;border-radius:6px;box-shadow:0 8px 24px rgba(23,61,88,.20)}
.ispd-action-dropdown-menu button,.ispd-action-dropdown-menu a{width:100%;min-height:30px;border:0;background:#fff;color:#203d53;display:flex;align-items:center;gap:8px;padding:6px 9px;text-align:left;font:500 10px/1.15 Outfit,Arial,sans-serif;cursor:pointer;text-decoration:none;border-radius:4px;white-space:nowrap}
.ispd-action-dropdown-menu button:hover,.ispd-action-dropdown-menu a:hover{background:#eef5f9}
.ispd-action-dropdown-menu i{width:14px;text-align:center;color:#173f5d}

/* Payment / Daily / Receipt filter show-hide. */
.payment-filter-card{overflow:hidden}
.payment-filter-toggle{border:0;border-radius:18px;background:#173f5d;color:#fff;padding:7px 14px;font:600 10px/1 Outfit,Arial,sans-serif;cursor:pointer}
.daily-collection-filters.collapsed{display:none!important}
.payment-filter-card:has(.daily-collection-filters.collapsed) .reference-filter-head{border-bottom:0}
.daily-collection-filters{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px 14px!important;padding:11px 12px!important}
.daily-collection-filters .form-control{height:34px!important;font-size:10px!important}
.daily-collection-filters label{font-size:9px!important;margin-bottom:4px!important}
.daily-action-row{margin:9px 0!important}
.daily-action-row .btn{min-height:34px;padding:6px 11px;font-size:10px}

/* Compact table layouts; no side scrolling on standard desktop widths. */
.billing-compact-table{overflow:visible!important}
.billing-compact-table .table-responsive{overflow-x:hidden!important;overflow-y:visible!important;max-height:none!important}
.payment-reference-table{width:100%!important;min-width:0!important;table-layout:auto!important;font-size:9.8px!important}
.payment-reference-table th{font-size:9px!important;padding:7px 4px!important;white-space:nowrap!important;line-height:1.05!important}
.payment-reference-table td{font-size:9.6px!important;padding:6px 4px!important;white-space:normal!important;line-height:1.15!important;vertical-align:middle!important}
.payment-reference-table .payment-date-cell{white-space:nowrap!important;min-width:88px}
.payment-date-cell .date-main{display:block;font-weight:700;color:#24415a}
.payment-date-cell .date-time{display:block;color:#71859a;font-size:8.5px;margin-top:2px}
.invoice-number-cell{color:#0874d1;font-weight:600;word-break:break-word}
.payment-amount-positive{color:#0ea54a!important}.payment-due-positive{color:#ef283e!important}
.payment-method-badge,.payment-status-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:6px;font-size:9px;font-weight:700;white-space:nowrap}
.payment-method-badge{background:#dcefff;color:#0a6eae}.payment-method-badge.method-bkash{background:#fbe2ee;color:#d91a6a}.payment-method-badge.method-nagad{background:#ffe9d8;color:#e56a13}.payment-method-badge.method-bank{background:#e6e4ff;color:#5048d5}.payment-method-badge.method-bangla_qr{background:#e0f6ef;color:#16805f}
.payment-status-badge.approved{background:#d9f8e8;color:#14864d}.payment-status-badge.pending{background:#fff0c9;color:#8a6110}.payment-status-badge.due{background:#ffdfe3;color:#d5243f}

/* Collector summary as a single compact strip. */
.compact-collector-summary{display:block!important;margin:8px 0!important}
.collector-summary-strip{display:grid;grid-template-columns:minmax(190px,1.5fr) repeat(4,minmax(95px,.7fr));align-items:center;gap:0;border:1px solid #dce5ee;border-radius:8px;background:#fff;overflow:hidden}
.collector-summary-strip>div{padding:9px 13px;border-right:1px solid #e3e9ee;background:#fff!important;border-radius:0!important}
.collector-summary-strip>div:last-child{border-right:0}
.collector-summary-strip strong,.collector-summary-strip small{display:block}.collector-summary-strip strong{font-size:13px;color:#173f5d}.collector-summary-strip small{font-size:8.5px;color:#708295;margin-top:2px}
.collector-summary-title{display:flex;align-items:center;gap:9px}.collector-summary-title>i{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#2386e9;color:#fff;font-size:15px}.collector-summary-title b{display:block;font-size:11px;color:#173f5d}
.collector-summary-empty{padding:9px 12px;border:1px solid #dce5ee;border-radius:7px;background:#fff;color:#6d8091;font-size:9px}

/* Keep summary cards close to the approved ISP Digital sizing. */
.payment-summary-cards{gap:14px!important;margin:0 0 10px!important}.payment-summary-cards .bill-ref-card{min-height:76px;padding:10px 13px 8px!important}.payment-summary-cards .bill-ref-card strong{font-size:18px!important}

body.light-mode .collector-summary-strip,body.light-mode .collector-summary-strip>div,body.light-mode .collector-summary-empty{background:#fff!important;color:#203d53!important}
.dark-mode .collector-summary-strip,.dark-mode .collector-summary-strip>div,.dark-mode .collector-summary-empty,.dark-mode .ispd-action-dropdown-menu{background:#0f263b!important;border-color:#29465d!important;color:#e6eef5!important}.dark-mode .ispd-action-dropdown-menu button,.dark-mode .ispd-action-dropdown-menu a{background:#0f263b;color:#e6eef5}.dark-mode .ispd-action-dropdown-menu button:hover,.dark-mode .ispd-action-dropdown-menu a:hover{background:#173850}

@media(max-width:1450px){.ispd-billing-actions-grid{grid-template-columns:repeat(6,minmax(115px,1fr))}.ispd-billing-table{font-size:8.6px!important}.ispd-billing-table th{font-size:8.2px!important}.ispd-billing-table td{font-size:8.6px!important;padding-left:1px!important;padding-right:1px!important}}
@media(max-width:1180px){.ispd-billing-actions-grid{grid-template-columns:repeat(4,minmax(115px,1fr))}.billing-compact-table .table-responsive,.ispd-billing-table-card .table-responsive{overflow-x:auto!important}.ispd-billing-table{min-width:1180px!important}.payment-reference-table{min-width:980px!important}.collector-summary-strip{grid-template-columns:1fr 1fr 1fr}.daily-collection-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){.ispd-billing-actions-grid{grid-template-columns:1fr 1fr}.daily-collection-filters{grid-template-columns:1fr!important}.collector-summary-strip{grid-template-columns:1fr}.collector-summary-strip>div{border-right:0;border-bottom:1px solid #e3e9ee}.collector-summary-strip>div:last-child{border-bottom:0}}


/* R6.6.1 Billing UI compactness + transaction-flow fix */
.client-reference-data-table{table-layout:fixed!important;width:100%!important;min-width:1040px!important}
.client-reference-data-table thead th{white-space:nowrap!important;font-size:10px!important;padding:7px 6px!important}
.client-reference-data-table tbody tr.client-reference-row{height:48px!important;min-height:48px!important}
.client-reference-data-table tbody td{height:48px!important;min-height:48px!important;padding:5px 6px!important;vertical-align:middle!important;white-space:nowrap!important;font-size:10.5px!important;line-height:1.15!important}
.client-reference-data-table th:nth-child(1),.client-reference-data-table td:nth-child(1){width:30px!important;text-align:center}
.client-reference-data-table th:nth-child(2),.client-reference-data-table td:nth-child(2){width:55px!important}
.client-reference-data-table th:nth-child(3),.client-reference-data-table td:nth-child(3){width:120px!important}
.client-reference-data-table th:nth-child(4),.client-reference-data-table td:nth-child(4){width:130px!important}
.client-reference-data-table th:nth-child(5),.client-reference-data-table td:nth-child(5){width:95px!important}
.client-reference-data-table th:nth-child(6),.client-reference-data-table td:nth-child(6){width:85px!important}
.client-reference-data-table th:nth-child(7),.client-reference-data-table td:nth-child(7){width:78px!important}
.client-reference-data-table th:nth-child(8),.client-reference-data-table td:nth-child(8){width:125px!important}
.client-reference-data-table th:nth-child(9),.client-reference-data-table td:nth-child(9){width:62px!important;text-align:right}
.client-reference-data-table th:nth-child(10),.client-reference-data-table td:nth-child(10){width:78px!important;text-align:center}
.client-reference-data-table th:nth-child(11),.client-reference-data-table td:nth-child(11){width:62px!important;text-align:center}
.client-reference-data-table th:nth-child(12),.client-reference-data-table td:nth-child(12){width:48px!important;text-align:center}
.client-reference-data-table .client-name-cell,.client-reference-data-table .client-zone-cell,.client-reference-data-table .client-package-cell,.client-reference-data-table .client-username-link{overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%;display:block}
.client-reference-data-table .client-idip-state{margin-top:2px!important;white-space:nowrap!important;font-size:9px!important;line-height:1!important}
.client-reference-data-table .client-idip-state small{display:inline-block;max-width:72px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
.client-reference-data-table .client-action-cell{overflow:visible!important}
.client-reference-data-table .client-action-dropdown{display:inline-block!important;position:relative!important}
.client-reference-data-table .client-action-dropdown>summary{width:28px!important;height:28px!important;display:inline-grid!important;place-items:center!important;border:1px solid #d4e0ea!important;border-radius:7px!important;background:#fff!important;color:#123f61!important;cursor:pointer!important;list-style:none!important}
.client-reference-data-table .client-action-dropdown>summary::-webkit-details-marker{display:none}
.client-reference-data-table .client-action-dropdown[open]{z-index:45!important}
.client-reference-data-table .client-action-dropdown .ispd-action-dropdown-menu{right:0!important;left:auto!important;min-width:190px!important;z-index:80!important}
.client-reference-data-table .client-action-dropdown .danger{color:#dc3545!important}

.billing-col-hidden{display:none!important}
.ispd-billing-toolbar-right{display:flex;align-items:center;gap:10px;min-width:0}
.billing-columns-picker{position:relative;display:inline-block}
.billing-columns-picker>summary{height:32px;display:flex;align-items:center;gap:6px;padding:0 11px;border:1px solid #cbd9e6;border-radius:7px;background:#fff;color:#174567;font-size:10px;font-weight:700;cursor:pointer;list-style:none;white-space:nowrap}
.billing-columns-picker>summary::-webkit-details-marker{display:none}
.billing-columns-picker[open]{z-index:70}
.billing-columns-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:90;min-width:185px;padding:10px;background:#fff;border:1px solid #d5e1eb;border-radius:9px;box-shadow:0 12px 28px rgba(15,47,71,.18);display:grid;gap:6px}
.billing-columns-menu strong{font-size:10px;color:#153e5c;padding-bottom:5px;border-bottom:1px solid #edf2f6}
.billing-columns-menu label{display:flex;align-items:center;gap:7px;font-size:10px;color:#23445c;cursor:pointer;white-space:nowrap}
.billing-columns-menu button{border:0;border-top:1px solid #edf2f6;background:transparent;color:#1460a0;text-align:left;padding:7px 0 0;font-size:10px;font-weight:700;cursor:pointer}
.billing-compact-main-table{table-layout:fixed!important;width:100%!important;min-width:1120px!important}
.billing-compact-main-table th,.billing-compact-main-table td{white-space:nowrap!important;vertical-align:middle!important;line-height:1.15!important}
.billing-compact-main-table thead th{font-size:9.5px!important;padding:7px 5px!important}
.billing-compact-main-table tbody tr.billing-data-row{height:47px!important}
.billing-compact-main-table tbody td{height:47px!important;padding:5px!important;font-size:10px!important}
.billing-compact-main-table [data-billing-col="select"]{width:28px!important;text-align:center}
.billing-compact-main-table [data-billing-col="code"]{width:55px!important}
.billing-compact-main-table [data-billing-col="idip"]{width:110px!important}
.billing-compact-main-table [data-billing-col="name"]{width:105px!important}
.billing-compact-main-table [data-billing-col="mobile"]{width:92px!important}
.billing-compact-main-table [data-billing-col="zone"]{width:85px!important}
.billing-compact-main-table [data-billing-col="clienttype"]{width:70px!important}
.billing-compact-main-table [data-billing-col="connection"]{width:72px!important}
.billing-compact-main-table [data-billing-col="package"]{width:125px!important}
.billing-compact-main-table [data-billing-col="expire"]{width:55px!important;text-align:center}
.billing-compact-main-table [data-billing-col="monthly"],.billing-compact-main-table [data-billing-col="received"],.billing-compact-main-table [data-billing-col="vat"],.billing-compact-main-table [data-billing-col="due"],.billing-compact-main-table [data-billing-col="advance"]{width:68px!important;text-align:right}
.billing-compact-main-table [data-billing-col="paymentdate"]{width:92px!important}
.billing-compact-main-table [data-billing-col="server"]{width:80px!important}
.billing-compact-main-table [data-billing-col="mstatus"]{width:56px!important;text-align:center}
.billing-compact-main-table [data-billing-col="bstatus"]{width:90px!important;text-align:center;white-space:normal!important}
.billing-compact-main-table [data-billing-col="action"]{width:42px!important;text-align:center;overflow:visible!important}
.billing-compact-main-table .billing-idip-cell,.billing-compact-main-table .billing-name-cell,.billing-compact-main-table .billing-mobile-cell,.billing-compact-main-table .billing-zone-cell,.billing-compact-main-table .billing-package-cell,.billing-compact-main-table .ispd-server-cell{overflow:hidden!important;text-overflow:ellipsis!important}
.billing-compact-main-table .billing-idip-cell>b,.billing-compact-main-table .billing-name-cell>b,.billing-compact-main-table .billing-package-cell>span{display:block;overflow:hidden;text-overflow:ellipsis}
.billing-compact-main-table .ispd-id-state{margin-top:2px!important;line-height:1!important}
.billing-compact-main-table .ispd-overdue-meta{font-size:8px!important;line-height:1.05!important}
.billing-compact-main-table .ispd-action-dropdown-menu{right:0!important;left:auto!important;min-width:180px!important;z-index:95!important}

.payment-view-context{margin:0 0 9px;padding:8px 11px;display:flex;align-items:center;gap:9px;border:1px solid #cae0f2;border-radius:8px;background:#f6fbff;color:#174866;font-size:10.5px}
.payment-view-context.hidden{display:none!important}
.payment-view-context>i{font-size:16px;color:#2379bd}
.payment-view-context div{display:flex;flex-direction:column;gap:2px}
.payment-view-context strong{font-size:11px;color:#113f60}
.payment-view-context span{color:#607b90}
.payment-reference-table{table-layout:fixed!important;width:max-content!important;min-width:1180px!important}
.payment-reference-table thead th{white-space:nowrap!important;font-size:9.5px!important;padding:7px 6px!important}
.payment-reference-table tbody td{white-space:nowrap!important;font-size:10px!important;padding:6px!important;vertical-align:middle!important}
.payment-reference-table .payment-data-row{height:45px!important}
.payment-reference-table .payment-account-cell{max-width:125px!important;overflow:hidden!important;text-overflow:ellipsis!important}
.payment-reference-table .ispd-action-dropdown-menu{right:0!important;left:auto!important;z-index:95!important}

html[data-theme="dark"] .client-reference-data-table .client-action-dropdown>summary,
html[data-theme="dark"] .billing-columns-picker>summary,
html[data-theme="dark"] .billing-columns-menu{background:#122b3e!important;border-color:#31516a!important;color:#dfeef9!important}
html[data-theme="dark"] .billing-columns-menu strong,html[data-theme="dark"] .billing-columns-menu label{color:#dbeaf5!important;border-color:#27465e!important}
html[data-theme="dark"] .payment-view-context{background:#102a3e;border-color:#2e516d;color:#dcebf6}
html[data-theme="dark"] .payment-view-context strong{color:#eef8ff}html[data-theme="dark"] .payment-view-context span{color:#a9c2d4}
@media(max-width:900px){.ispd-billing-table-toolbar{align-items:flex-start!important;gap:7px!important;flex-wrap:wrap!important}.ispd-billing-toolbar-right{width:100%;justify-content:flex-end;flex-wrap:wrap}.billing-compact-main-table{min-width:1030px!important}.client-reference-data-table{min-width:990px!important}}

/* R6.6.2 Client List ID/IP alignment hotfix
   Keep the current username + sync/dot/IP format, but make both lines share
   the exact same left origin inside the ID/IP cell. */
.client-reference-data-table .client-idip-cell{
  text-align:left!important;
}
.client-reference-data-table .client-idip-cell .client-username-link{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
  line-height:1.15!important;
}
.client-reference-data-table .client-idip-cell .client-idip-state{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:2px!important;
  width:100%!important;
  margin:2px 0 0!important;
  padding:0!important;
  text-align:left!important;
}
.client-reference-data-table .client-idip-cell .client-idip-state i{
  flex:0 0 auto!important;
  width:10px!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
}
.client-reference-data-table .client-idip-cell .client-live-dot{
  flex:0 0 auto!important;
  margin:0!important;
}
.client-reference-data-table .client-idip-cell .client-idip-state small{
  margin:0!important;
  padding:0!important;
  line-height:1!important;
}

/* R6.6.4 Client List top action toolbar final alignment
   Align the toolbar to the same left/right content boundary as summary cards/table.
   Keep desktop actions on a single line without changing button function. */
.client-reference-mode .client-reference-actions{
  justify-content:flex-start!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:5px!important;
  margin:8px 12px 14px!important;
  padding:0!important;
  width:auto!important;
  max-width:none!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
.client-reference-mode .client-reference-actions button{
  flex:0 0 auto!important;
  white-space:nowrap!important;
  padding:7px 8px!important;
  font-size:9.5px!important;
  line-height:1!important;
}
@media(max-width:1180px){
  .client-reference-mode .client-reference-actions{
    flex-wrap:wrap!important;
    overflow-x:visible!important;
  }
}

/* R6.6.33 - ISP Digital style SMS / Push template tables + gateway summary */
.template-reference-card .card-body{padding-top:10px}.template-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 14px;font-size:9px;color:var(--text-muted);text-transform:uppercase}.template-show-control,.template-search-control{display:flex;align-items:center;gap:6px}.template-show-control .form-control{width:72px;min-width:72px;height:30px;padding:3px 7px}.template-search-control .form-control{width:190px;height:30px;padding:3px 8px}.sms-template-table{min-width:840px}.sms-template-table th{font-size:9px;text-align:center}.sms-template-table td{font-size:10px;vertical-align:middle}.sms-template-table th:nth-child(1),.sms-template-table td:nth-child(1){width:58px;text-align:center}.sms-template-table th:nth-child(2),.sms-template-table td:nth-child(2){width:190px;text-align:center}.sms-template-table th:nth-child(3),.sms-template-table td:nth-child(3){width:120px;text-align:center}.sms-template-table th:nth-child(5),.sms-template-table td:nth-child(5){width:72px;text-align:center}.template-event-key{display:block;margin-top:4px;font-size:8px;color:var(--text-muted);font-weight:400}.template-type-badge{display:inline-block;border-radius:12px;padding:4px 8px;background:#65a9bd;color:#fff;font-size:9px;text-transform:capitalize}.template-type-badge.custom{background:#6f7f90}.template-body-cell{line-height:1.55;white-space:normal;min-width:320px}.template-edit-icon{border:0;background:transparent;color:#17a34a;cursor:pointer;font-size:15px;padding:7px}.template-edit-icon:hover{transform:scale(1.08)}.template-count{font-size:10px;padding-top:8px}.gateway-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:18px}.gateway-metric{display:flex;align-items:center;gap:16px;border-radius:4px;padding:18px 20px;color:#fff;min-height:88px;box-shadow:0 8px 22px rgba(0,0,0,.12)}.gateway-metric>i{font-size:38px;opacity:.95}.gateway-metric span{display:block;font-size:10px;font-weight:700}.gateway-metric strong{display:block;font-size:24px;line-height:1.15;margin:2px 0}.gateway-metric small{display:block;font-size:8px;opacity:.85}.gateway-metric.balance{background:#46ad52}.gateway-metric.today{background:#12b4c5}.gateway-metric.month{background:#f79a08}.gateway-metric.failed{background:#fa514a}.push-template-handoff{display:flex;gap:10px;align-items:flex-start;margin:12px 0;padding:12px;border:1px solid var(--border-dark);border-radius:9px;background:rgba(127,166,205,.045)}.push-template-handoff i{margin-top:3px}.push-template-handoff p{margin:3px 0 0;font-size:10px;color:var(--text-muted)}.push-template-handoff code{font-size:9px}
@media(max-width:1000px){.gateway-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.template-list-toolbar{align-items:flex-start;flex-direction:column}.template-search-control{width:100%}.template-search-control .form-control{width:100%}.gateway-metric-grid{grid-template-columns:1fr;gap:10px}.gateway-metric{min-height:78px;padding:14px 16px}.gateway-metric>i{font-size:32px}.gateway-metric strong{font-size:21px}}

/* R6.6.34 Telegram notification controls */
.telegram-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:8px 0 4px}
.telegram-event-grid label{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--border-color,#d8dee8);border-radius:9px;background:rgba(127,127,127,.045);font-size:13px;font-weight:600}
.telegram-event-grid input[type="checkbox"]{width:16px;height:16px;flex:0 0 auto}
@media(max-width:760px){.telegram-event-grid{grid-template-columns:1fr}.gateway-metric-grid#telegram-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.gateway-metric-grid#telegram-stats{grid-template-columns:1fr}}
/* R6.6.35 - screenshot-matched SMS template catalogue */
.sms-reference-exact .card-body{padding:0 10px 12px}.sms-reference-exact{overflow:hidden}.sms-reference-exact .template-list-toolbar{padding:2px 0 0;margin:0 0 10px}.sms-reference-exact .sms-template-table{border-collapse:collapse;width:100%;min-width:980px}.sms-reference-exact .sms-template-table thead th{background:#244b67!important;color:#fff!important;border:1px solid #d4dce2!important;font-weight:700;padding:10px 6px}.sms-reference-exact .sms-template-table tbody td{background:#fff;border:1px solid #dfe3e6!important;color:#2c3540;padding:8px 7px}.dark .sms-reference-exact .sms-template-table tbody td{background:var(--card-bg);color:var(--text-primary)}.sms-reference-exact .sms-template-table td:nth-child(4){text-align:center;font-size:10px}.sms-reference-exact .sms-template-table td:nth-child(2){font-weight:500}.sms-reference-exact .template-type-badge{background:#66a9bc;border-radius:14px;text-transform:none;font-size:9px}.template-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:7px}.template-pages{display:flex;align-items:center;gap:2px}.template-pages button{border:0;background:transparent;color:var(--text-muted);font-size:10px;min-width:28px;height:28px;padding:0 7px;cursor:pointer}.template-pages button.active{background:#2584c4;color:#fff}.template-pages button:disabled{opacity:.45;cursor:default}
/* R6.6.35 Network Link & Tunnel Monitor */
.netmon-settings{display:grid;gap:14px}.netmon-master{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.netmon-master label,.netmon-category-grid label{display:flex;align-items:center;gap:6px;font-size:11px}.netmon-master .form-control{width:170px}.netmon-category-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;padding:12px;border:1px solid var(--border-dark);border-radius:8px}.netmon-flap-grid{display:grid;grid-template-columns:repeat(3,minmax(140px,220px));gap:10px}.netmon-flap-grid label{font-size:10px;color:var(--text-muted)}.netmon-unread td{font-weight:600;background:rgba(250,187,28,.07)!important}@media(max-width:850px){.netmon-category-grid{grid-template-columns:repeat(2,1fr)}.netmon-flap-grid{grid-template-columns:1fr}}

/* R6.6.56 CLIENT TABLE ALIGNMENT
   One stable column geometry for Billing / Free-No-Bill / Left client lists. */
.client-reference-table-card .table-responsive{
    width:100%;
    overflow-x:hidden!important;
}
.client-reference-data-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
}
.client-reference-data-table thead th,
.client-reference-data-table tbody td{
    box-sizing:border-box!important;
    vertical-align:middle!important;
}

/* Header and cell widths use the same 100% grid. */
.client-reference-data-table th:nth-child(1),.client-reference-data-table td:nth-child(1){width:3%!important;text-align:center!important}
.client-reference-data-table th:nth-child(2),.client-reference-data-table td:nth-child(2){width:5%!important;text-align:center!important}
.client-reference-data-table th:nth-child(3),.client-reference-data-table td:nth-child(3){width:13%!important;text-align:left!important}
.client-reference-data-table th:nth-child(4),.client-reference-data-table td:nth-child(4){width:13%!important;text-align:left!important}
.client-reference-data-table th:nth-child(5),.client-reference-data-table td:nth-child(5){width:10%!important;text-align:center!important}
.client-reference-data-table th:nth-child(6),.client-reference-data-table td:nth-child(6){width:9%!important;text-align:left!important}
.client-reference-data-table th:nth-child(7),.client-reference-data-table td:nth-child(7){width:8%!important;text-align:center!important}
.client-reference-data-table th:nth-child(8),.client-reference-data-table td:nth-child(8){width:14%!important;text-align:left!important}
.client-reference-data-table th:nth-child(9),.client-reference-data-table td:nth-child(9){width:7%!important;text-align:right!important;font-variant-numeric:tabular-nums}
.client-reference-data-table th:nth-child(10),.client-reference-data-table td:nth-child(10){width:8%!important;text-align:center!important}
.client-reference-data-table th:nth-child(11),.client-reference-data-table td:nth-child(11){width:6%!important;text-align:center!important}
.client-reference-data-table th:nth-child(12),.client-reference-data-table td:nth-child(12){width:4%!important;text-align:center!important}

.client-reference-data-table thead th{
    height:34px!important;
    padding:7px 6px!important;
    white-space:nowrap!important;
    line-height:1.1!important;
}
.client-reference-data-table tbody tr.client-reference-row{
    height:48px!important;
}
.client-reference-data-table tbody td{
    height:48px!important;
    padding:5px 7px!important;
    line-height:1.16!important;
    white-space:nowrap!important;
}
.client-reference-data-table .client-idip-cell,
.client-reference-data-table .client-name-cell,
.client-reference-data-table .client-zone-cell,
.client-reference-data-table .client-package-cell{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}
.client-reference-data-table .client-username-link,
.client-reference-data-table .client-name-cell>b,
.client-reference-data-table .client-zone-cell,
.client-reference-data-table .client-package-cell{
    display:block!important;
    width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.client-reference-data-table .client-idip-state{
    display:block!important;
    margin-top:3px!important;
    text-align:left!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.client-reference-data-table .client-idip-state small{
    max-width:82px!important;
}
.client-reference-data-table .client-money-cell{
    padding-right:10px!important;
    font-weight:600;
}
.client-reference-data-table .badge,
.client-reference-data-table .ispd-mstatus,
.client-reference-data-table .client-action-dropdown{
    margin-left:auto!important;
    margin-right:auto!important;
}
.client-reference-data-table .client-action-cell{
    overflow:visible!important;
}

/* Whole-row zebra background: avoid the checkerboard/cell-by-cell look. */
body.light-mode .client-reference-data-table tbody tr:nth-child(odd)>td{background:#fff!important}
body.light-mode .client-reference-data-table tbody tr:nth-child(even)>td{background:#f2f6f9!important}
body.light-mode .client-reference-data-table tbody tr:hover>td{background:#eaf4fa!important}
body.dark-mode .client-reference-data-table tbody tr:nth-child(odd)>td{background:#0d2438!important}
body.dark-mode .client-reference-data-table tbody tr:nth-child(even)>td{background:#112d44!important}
body.dark-mode .client-reference-data-table tbody tr:hover>td{background:#173850!important}

/* Keep the last action cell aligned with its row even when the list UI makes it sticky. */
body.xtx-list-ui-enabled .client-reference-data-table td:last-child,
body.xtx-list-ui-enabled .client-reference-data-table td.xtx-action-cell{
    width:4%!important;
    min-width:44px!important;
}

/* On smaller screens preserve the same geometry and use horizontal scroll rather than squeeze text. */
@media(max-width:900px){
    .client-reference-table-card .table-responsive{overflow-x:auto!important}
    .client-reference-data-table{min-width:1080px!important}
}

/* R6.6.57 RESPONSIVE RIGHT EDGE + DASHBOARD LEGEND
   Fix the R6.6.56 table-cell display regression, keep Action visible on narrow/desktop-site mobile,
   and stop Dashboard Billing Status legend/counts from clipping. */
.client-reference-table-card .table-responsive{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch;
}
.client-reference-data-table{
  width:100%!important;
  min-width:1120px!important;
  table-layout:fixed!important;
}
/* Zone/Package are TD elements. Never turn table cells into block elements. */
.client-reference-data-table td.client-zone-cell,
.client-reference-data-table td.client-package-cell{
  display:table-cell!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.client-reference-data-table td.client-name-cell,
.client-reference-data-table td.client-mobile-cell,
.client-reference-data-table td.client-idip-cell,
.client-reference-data-table td.client-money-cell,
.client-reference-data-table tbody td{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
.client-reference-data-table .client-name-cell>b,
.client-reference-data-table .client-username-link{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
/* The far-right action must remain reachable even in Android Chrome "Desktop site" mode. */
.client-reference-data-table thead th:last-child,
.client-reference-data-table tbody td:last-child{
  position:sticky!important;
  right:0!important;
}
.client-reference-data-table thead th:last-child{
  z-index:7!important;
  background:#214b69!important;
  box-shadow:-5px 0 9px rgba(26,55,76,.10);
}
.client-reference-data-table tbody td:last-child{
  z-index:5!important;
  box-shadow:-5px 0 9px rgba(26,55,76,.08);
}
body.light-mode .client-reference-data-table tbody tr:nth-child(odd)>td:last-child{background:#fff!important}
body.light-mode .client-reference-data-table tbody tr:nth-child(even)>td:last-child{background:#f2f6f9!important}
body.light-mode .client-reference-data-table tbody tr:hover>td:last-child{background:#eaf4fa!important}
body.dark-mode .client-reference-data-table tbody tr:nth-child(odd)>td:last-child{background:#0d2438!important}
body.dark-mode .client-reference-data-table tbody tr:nth-child(even)>td:last-child{background:#112d44!important}
body.dark-mode .client-reference-data-table tbody tr:hover>td:last-child{background:#173850!important}

/* Dashboard Billing Status: compact donut + guaranteed legend/count width. */
.final-ops-dashboard .billing-donut-layout{
  height:165px!important;
  padding:7px 8px!important;
  grid-template-columns:minmax(122px,1fr) minmax(104px,.78fr)!important;
  gap:7px!important;
  overflow:visible!important;
}
.final-ops-dashboard .donut-box{
  height:150px!important;
  min-width:0!important;
}
.final-ops-dashboard .billing-legend{
  min-width:0!important;
  gap:8px!important;
  overflow:visible!important;
}
.final-ops-dashboard .billing-legend>div{
  min-width:0!important;
  grid-template-columns:8px minmax(42px,1fr) minmax(20px,auto)!important;
  gap:4px!important;
  font-size:9.5px!important;
}
.final-ops-dashboard .billing-legend>div span{
  min-width:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.final-ops-dashboard .billing-legend>div strong{
  min-width:20px!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.final-ops-dashboard .billing-legend i{width:8px!important;height:8px!important}

/* Common smaller desktop / tablet widths. */
@media(max-width:1180px){
  .client-reference-data-table{min-width:1120px!important}
  .final-ops-dashboard .billing-donut-layout{
    grid-template-columns:minmax(145px,1fr) minmax(110px,.68fr)!important;
  }
}
@media(max-width:760px){
  .final-ops-dashboard .billing-donut-layout{
    grid-template-columns:1fr!important;
    height:auto!important;
    padding:10px!important;
  }
  .final-ops-dashboard .donut-box{height:165px!important}
  .final-ops-dashboard .billing-legend{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px 10px!important;
  }
}

/* R6.6.58 CUSTOMER NAME TABLE-CELL FIX
   An older rule made the TD itself display:block, so names collapsed to M./c... .
   Keep the TD as a real table cell; only the inner <b> may ellipsize. */
.client-reference-data-table td.client-name-cell{
  display:table-cell!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  vertical-align:middle!important;
}
.client-reference-data-table td.client-name-cell>b{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
/* Give Customer Name comfortable room without breaking the 12-column grid. */
.client-reference-data-table th:nth-child(4),
.client-reference-data-table td:nth-child(4){
  width:13%!important;
  text-align:left!important;
}
