/* SPEEDLINK Billing custom overrides — brand palette: indigo/violet, distinct from
   the teal (Lipanet) and blue (CloudTik) systems used as design references. */

/* Self-hosted (not Google Fonts CDN) so it loads instantly and reliably —
   no extra DNS/TLS handshake to a third party, works even if this server
   is ever run somewhere with restricted outbound internet. Inter: the
   standard choice for data-dense admin dashboards (Linear, Vercel, GitHub
   all use it) — excellent legibility for tables and numbers at small
   sizes, more professional/neutral than the friendlier Poppins used on
   the customer-facing hotspot portal, which is the right split: staff
   tool vs. consumer conversion page. ~120KB total, cached once by the
   browser across every admin page after the first load. */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/inter/inter-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/inter/inter-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/inter/inter-600.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/inter/inter-700.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:800;font-display:swap;src:url('../fonts/inter/inter-800.woff2') format('woff2')}

html, body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, h4, h5, h6, .card-title, .np-kpi .value, .np-stat-card strong {
    font-weight: 700;
    letter-spacing: -0.01em;
}
/* Belt-and-suspenders: Bootstrap's own reboot/forms CSS sets font-family
   directly on buttons, inputs, and tables rather than just inheriting
   from body, so those need the same override explicitly or they'd keep
   using Bootstrap's default stack. */
.btn, .form-control, .form-select, table {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    --np-accent: #6d28d9;
    --np-accent-light: #7c3aed;
    --np-accent-dark: #4c1d95;

    /* Repoint Bootstrap's "info" theme color to our brand accent — this is
       what drives btn-info, text-info, bg-info-subtle, badges, etc. across
       every module without having to touch each file individually. */
    --bs-info: #6d28d9;
    --bs-info-rgb: 109, 40, 217;
    --bs-info-text-emphasis: #4c1d95;
    --bs-info-bg-subtle: #ede9fe;
    --bs-info-border-subtle: #ddd6fe;
}

.brand-link .brand-text {
    letter-spacing: 0.5px;
}

.card {
    border-radius: 0.6rem;
}

.app-content-header {
    background: transparent;
}

.sidebar-menu .nav-link.active {
    background-color: rgba(109, 40, 217, 0.15);
    border-left: 3px solid var(--np-accent);
}

.nav-header {
    letter-spacing: 0.5px;
}

/* Sidebar scroll: layout is now handled by the flexbox rules in
   includes/sidebar.php (.app-sidebar / .sidebar-wrapper / .sidebar-footer),
   which pin the logo, theme switch, and Logout in place and let only the
   menu list scroll. The old calc(100vh - 3.5rem) rule that used to live
   here didn't account for the theme-switch bar's height and caused
   Logout to drift out of view — the scrollbar cosmetics below still apply. */

/* Thin, unobtrusive scrollbar for the sidebar */
.sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}
.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Dashboard hero banner — the one deliberately distinctive layout element
   that sets SPEEDLINK Billing apart from the flat white "Welcome back" headers on
   the reference systems. */
.np-hero {
    background: linear-gradient(135deg, var(--np-accent) 0%, var(--np-accent-light) 60%, #7e55f8 100%);
    border-radius: 0.75rem;
    color: #fff;
    padding: 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
}
.np-hero::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none; /* decorative only — was silently blocking clicks on the
                              filter dropdowns/Refresh button, which sit in this
                              same top-right corner */
}
.np-hero h4, .np-hero p {
    position: relative;
    z-index: 1;
}
.np-hero .d-flex.gap-2 {
    position: relative;
    z-index: 2;
}
.np-hero .form-select, .np-hero .btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.np-hero .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Dashboard refresh button spin feedback */
@keyframes np-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.np-spin {
    animation: np-spin 0.6s linear;
}


/* Reference workflow: compact billing/admin UI inspired by the supplied screenshots. */
.np-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.np-kpi{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:16px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.np-kpi .label{font-size:.78rem;color:#64748b}.np-kpi .value{font-size:1.45rem;font-weight:700;margin-top:5px}.np-kpi .meta{font-size:.72rem;color:#94a3b8;margin-top:4px}
.np-section-title{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin:20px 0 10px}
.np-table thead th{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:#64748b;font-weight:700;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.np-table td{font-size:.86rem;padding:.75rem .8rem}.np-avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}
@media(max-width:900px){.np-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:576px){.np-kpi-grid{grid-template-columns:1fr}}

/* Optional icon accent for np-kpi tiles — opt-in via .has-icon so the
   other pages that reuse the plain np-kpi markup are unaffected. */
.np-kpi.has-icon{display:flex;align-items:center;gap:12px;transition:box-shadow .18s ease, transform .18s ease}
.np-kpi.has-icon:hover{box-shadow:0 6px 16px rgba(15,23,42,.07);transform:translateY(-1px)}
.np-kpi-icon{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.1rem;flex:0 0 auto;background:#f1f5f9;color:var(--np-accent)}
.np-kpi-icon.blue{color:#2563eb;background:#eff6ff}
.np-kpi-icon.green{color:#15803d;background:#ecfdf3}
.np-kpi-icon.amber{color:#b45309;background:#fffbeb}
.np-kpi-icon.violet{color:var(--np-accent);background:#ede9fe}

/* Dashboard-only polish: gentle lift on hover for section cards, and a
   touch of breathing room between the header icon badges and their text. */
.dashboard-page .card.shadow-sm{transition:box-shadow .18s ease, transform .18s ease}
.dashboard-page .card.shadow-sm:hover{box-shadow:0 8px 22px rgba(15,23,42,.08);transform:translateY(-1px)}
.dash-header-icon{font-size:1rem}


/* Professional MikroTik router list */
.np-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding-bottom:14px;margin-bottom:2px;border-bottom:1px solid #edf0f4}
.np-eyebrow{font-size:.68rem;font-weight:800;letter-spacing:.11em;color:var(--np-accent);margin-bottom:6px}
.np-add-router{border-radius:9px;padding:.62rem 1.05rem;font-size:.85rem;box-shadow:0 6px 16px rgba(13,110,253,.18);transition:transform .15s ease,box-shadow .15s ease}
.np-add-router:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(13,110,253,.24)}
.np-alert{border-radius:10px;margin-top:14px;border:0;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.np-router-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}
.np-stat-card{position:relative;background:#fff;border:1px solid #e7eaf0;border-radius:13px;padding:16px 18px 16px 20px;display:flex;align-items:center;gap:13px;min-width:0;box-shadow:0 2px 10px rgba(15,23,42,.04);overflow:hidden;transition:box-shadow .18s ease,transform .18s ease}
.np-stat-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--np-accent)}
.np-stat-card:hover{box-shadow:0 10px 24px rgba(15,23,42,.09);transform:translateY(-2px)}
.np-stat-card:has(.np-stat-icon.online)::before{background:#16a34a}
.np-stat-card:has(.np-stat-icon.offline)::before{background:#dc2626}
.np-stat-card:has(.np-stat-icon.users)::before{background:#2563eb}
.np-stat-card>div:last-child{min-width:0}
.np-stat-card span{display:block;color:#64748b;font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-stat-card strong{display:block;color:#0f172a;font-size:1.55rem;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
.np-stat-icon{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:#f1f5f9;color:var(--np-accent);font-size:1.15rem;flex:0 0 auto}
.np-stat-icon.online{color:#15803d;background:#ecfdf3}.np-stat-icon.offline{color:#dc2626;background:#fef2f2}.np-stat-icon.users{color:#2563eb;background:#eff6ff}
.np-router-card{overflow:hidden;border-radius:14px;border:1px solid #e7eaf0;box-shadow:0 3px 14px rgba(15,23,42,.05)}
.np-router-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px;border-bottom:1px solid #edf0f4;background:linear-gradient(180deg,#fbfcfe,#fff)}
.np-router-search{width:330px;max-width:100%;position:relative}
.np-router-search i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#94a3b8;font-size:.8rem}
.np-router-search input{width:100%;height:39px;border:1px solid #dbe1e8;border-radius:99px;padding:0 34px 0 37px;font-size:.82rem;outline:none;background:#fff;transition:border-color .15s,box-shadow .15s}
.np-router-search input:focus{border-color:var(--np-accent-light);box-shadow:0 0 0 3px rgba(109,40,217,.1)}
.np-clear-search{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#94a3b8;text-decoration:none}
.np-router-table{min-width:1040px}
.np-router-table thead th{background:#f8fafc;color:#64748b;text-transform:uppercase;letter-spacing:.055em;font-size:.66rem;font-weight:800;border-bottom:1px solid #e7ebf0;padding:12px 14px;white-space:nowrap}
.np-router-table tbody td{padding:14px;border-bottom:1px solid #eef1f4;font-size:.82rem;vertical-align:middle}
.np-router-table tbody tr:last-child td{border-bottom:0}
.np-router-table tbody tr:hover{background:#fbfcfe}
.np-router-name{display:flex;align-items:center;gap:10px;min-width:155px}
.np-router-avatar{width:38px;height:38px;border-radius:10px;background:linear-gradient(150deg,#f1f5f9,#e7ecf3);color:var(--np-accent);display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:1.05rem;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04)}
.np-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem}
.np-customer-count{font-weight:700;color:#1f2937}
.np-metric{width:88px}.np-metric>span{display:block;font-size:.74rem;font-weight:700;margin-bottom:5px;color:#334155}
.np-progress{height:6px;border-radius:99px;background:#edf0f4;overflow:hidden}.np-progress i{display:block;height:100%;border-radius:99px;background:var(--np-accent);min-width:2px;transition:width .3s ease}
.np-progress.np-progress-warn i{background:#f59e0b}
.np-progress.np-progress-danger i{background:#dc2626}
.np-status-wrap{white-space:nowrap}
.np-status-wrap .badge{font-size:.68rem;font-weight:700;letter-spacing:.02em;padding:5px 11px;border-radius:99px;box-shadow:0 1px 3px rgba(15,23,42,.08)}
.np-status-wrap .badge i{margin-right:4px;vertical-align:1px}
.np-status-time{font-size:.64rem;margin-top:5px;color:#94a3b8}.np-status-meta{font-size:.64rem;margin-top:3px;white-space:nowrap}.np-error{font-size:.64rem;max-width:180px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}
.np-actions form{display:inline-flex}
.np-action{width:31px;height:31px;border:1px solid #dfe4ea;background:#fff;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;color:#64748b;text-decoration:none;cursor:pointer;padding:0}
.np-action:hover{border-color:#cbd5e1;color:var(--np-accent);background:#f8fafc}
.np-action:disabled{opacity:.45;cursor:not-allowed;background:#fff;color:#94a3b8}
.np-action:disabled:hover{border-color:#dfe4ea;color:#94a3b8;background:#fff}
.np-action.primary{color:var(--np-accent);border-color:#ddd6fe;background:#faf7ff}.np-action.danger:hover{color:#dc2626;border-color:#fecaca;background:#fff7f7}
.np-empty-icon{width:56px;height:56px;border-radius:16px;background:#f1f5f9;color:#94a3b8;display:inline-flex;align-items:center;justify-content:center;font-size:1.4rem}
.np-router-toolbar{flex-wrap:wrap}
.np-router-filter{height:39px;border:1px solid #dbe1e8;border-radius:99px;padding:0 30px 0 14px;font-size:.8rem;font-weight:600;background:#fff;color:#334155;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;transition:border-color .15s}
.np-router-filter:hover{border-color:#cbd5e1}
.np-router-shown{padding:10px 20px 0;font-size:.72rem;color:#94a3b8;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.np-router-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px;padding:18px 20px 22px}
.np-router-grid-empty{grid-column:1/-1}
.np-router-card-item{position:relative;border:1px solid #e7eaf0;border-left:4px solid #cbd5e1;border-radius:13px;padding:17px 17px 16px;background:#fff;display:flex;flex-direction:column;gap:11px;transition:box-shadow .18s ease,border-color .18s ease,transform .18s ease}
.np-router-card-item:hover{box-shadow:0 12px 28px rgba(15,23,42,.1);border-color:#dbe1e8;transform:translateY(-3px)}
.np-router-card-item[data-status="online"]{border-left-color:#16a34a}
.np-router-card-item[data-status="offline"]{border-left-color:#dc2626}
.np-router-card-item[data-status="unknown"]{border-left-color:#94a3b8}
.np-router-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.np-router-card-meta{font-size:.8rem;color:#475569;display:flex;flex-direction:column;gap:6px}
.np-router-card-meta i{width:16px;text-align:center;color:#94a3b8;margin-right:6px}
.np-mode-badges{display:flex;flex-wrap:wrap;gap:5px}
.np-mode-badge{font-size:.65rem;font-weight:700;letter-spacing:.02em;padding:3px 9px;border-radius:99px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}
.np-mode-badge-hotspot{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.np-mode-badge-pppoe{background:#fffbeb;color:#b45309;border-color:#fde68a}
.np-mode-badge-warn{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.np-router-card-metrics{display:flex;gap:16px}
.np-router-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #eef1f4;padding-top:12px;margin-top:auto}
.np-router-actions-row{display:flex;gap:8px}
.np-more-btn{width:33px;height:31px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:8px}
@media(max-width:1000px){.np-router-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.np-router-toolbar{align-items:flex-start;flex-direction:column}.np-router-search{width:100%}}
@media(max-width:576px){.np-router-stats{grid-template-columns:1fr}.np-page-head{align-items:flex-start;flex-direction:column}.np-add-router{width:100%}}


/* Remote Access Health Check — routers/remote.php */
.np-check-list{display:flex;flex-direction:column}
.np-check-item{display:flex;align-items:flex-start;gap:13px;padding:13px 18px;border-bottom:1px solid #f1f4f8}
.np-check-item:last-child{border-bottom:0}
.np-check-icon{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:.95rem;margin-top:1px}
.np-check-icon.ok{color:#15803d;background:#ecfdf3}
.np-check-icon.warn{color:#b45309;background:#fffbeb}
.np-check-icon.fail{color:#dc2626;background:#fef2f2}
.np-check-body{flex:1 1 auto;min-width:0}
.np-check-title{font-weight:700;font-size:.86rem;color:#1f2937}
.np-check-summary{font-size:.8rem;color:#64748b;margin-top:1px}
.np-check-badge{flex:0 0 auto;font-size:.7rem;font-weight:800;letter-spacing:.03em;padding:4px 10px;border-radius:99px;text-transform:uppercase;margin-top:2px}
.np-check-badge.ok{color:#15803d;background:#ecfdf3}
.np-check-badge.warn{color:#b45309;background:#fffbeb}
.np-check-badge.fail{color:#dc2626;background:#fef2f2}
@media(max-width:576px){.np-check-item{flex-wrap:wrap}.np-check-badge{margin-left:47px}}

/* Router Reliability / uptime dashboard */
.np-uptime-hero{padding:1.4rem 1.75rem}
.np-uptime-ring{--pct:100;width:96px;height:96px;border-radius:50%;flex:0 0 auto;position:relative;background:conic-gradient(#fff calc(var(--pct)*1%), rgba(255,255,255,.22) 0);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(0,0,0,.12)}
.np-uptime-ring-inner{width:76px;height:76px;border-radius:50%;background:var(--np-accent-dark);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}
.np-uptime-ring-inner strong{font-size:1.05rem;line-height:1.1;font-weight:800}
.np-uptime-ring-inner span{font-size:.62rem;text-transform:uppercase;letter-spacing:.06em;opacity:.8;margin-top:2px}
.np-spark{display:block;vertical-align:middle}
.np-uptime-hero-label{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;opacity:.8}
.np-uptime-hero-sub{font-size:.92rem;opacity:.92;margin:2px 0 10px}
.np-uptime-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 13px;border-radius:99px;font-size:.78rem;font-weight:700;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.3);color:#fff}
.np-uptime-chip.ok i{color:#86efac}
.np-uptime-chip.warn i{color:#fde68a}
.np-uptime-chip.bad i{color:#fca5a5}
.np-uptime-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin:18px 0}
.np-stat-icon.warn{color:#b45309;background:#fffbeb}
.np-stat-icon.danger{color:#dc2626;background:#fef2f2}
.np-uptime-pill{display:inline-flex;align-items:center;padding:4px 11px;border-radius:99px;font-size:.8rem;font-weight:700}
.np-uptime-pill.great{background:#ecfdf3;color:#15803d}
.np-uptime-pill.warn{background:#fffbeb;color:#b45309}
.np-uptime-pill.bad{background:#fef2f2;color:#dc2626}
.np-empty-icon-ok{color:#15803d;background:#ecfdf3}
@keyframes np-pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)}70%{box-shadow:0 0 0 6px rgba(255,255,255,0)}100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}}
.np-pulse-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#fff;margin-right:5px;animation:np-pulse 1.4s infinite}
@media(max-width:1100px){.np-uptime-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:576px){.np-uptime-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.np-uptime-hero{padding:1.2rem}.np-uptime-ring{width:78px;height:78px}.np-uptime-ring-inner{width:62px;height:62px}}

/* SPEEDLINK Billing sidebar organisation */
.sidebar .nav-section,
.sidebar .menu-section,
.sidebar .sidebar-section {
    margin-top: 14px;
}
.sidebar .nav-section-title,
.sidebar .menu-section-title,
.sidebar .sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .65;
    padding: 10px 16px 6px;
}
.sidebar a,
.sidebar .nav-link,
.sidebar .menu-item {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}



/* Bandwidth profile editor — compact layout matching the supplied reference. */
.np-bandwidth-card{overflow:hidden;border-radius:10px}
.np-bandwidth-form{max-width:1120px;margin-top:18px}
.np-bandwidth-panel{background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 2px 10px rgba(15,23,42,.04);overflow:hidden}
.np-bandwidth-panel-title{background:linear-gradient(90deg,#0b79c5,#137aba);color:#fff;font-size:1.05rem;font-weight:700;padding:14px 18px}
.np-bandwidth-body{padding:28px 34px 30px}
.np-bw-row{display:grid;grid-template-columns:190px minmax(0,1fr);align-items:center;gap:18px;margin-bottom:20px}
.np-bw-row>label{font-size:.9rem;font-weight:600;color:#475569;text-align:right}
.np-bw-field{min-width:0}
.np-bw-rate{display:grid;grid-template-columns:minmax(180px,1fr) 170px;gap:10px;max-width:720px}
.np-bw-rate .form-select{background:#fff}
.np-bw-burst-row{align-items:start}
.np-bw-burst-row .form-check{min-height:1.5rem}
.np-bw-disclaimer{font-size:.72rem;line-height:1.5;color:#64748b;margin-top:3px;max-width:780px}
.np-bw-disclaimer strong{color:#475569}
.np-bw-actions{margin-left:208px;display:flex;align-items:center;gap:8px}
.np-selected-bandwidth{background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;padding:10px 13px}
.np-selected-bandwidth strong{display:block;font-size:.95rem;color:#1f2937;margin-top:2px}
@media(max-width:768px){
    .np-bandwidth-body{padding:22px 18px}
    .np-bw-row{grid-template-columns:1fr;gap:7px}
    .np-bw-row>label{text-align:left}
    .np-bw-rate{grid-template-columns:1fr 130px}
    .np-bw-actions{margin-left:0}
}


/* ISP configurable sidebar: white by default, optional dark mode from Settings. */
.sidebar-theme-light .app-sidebar{background:#fff!important;border-right:1px solid #e5e7eb;color:#334155}
.sidebar-theme-light .app-sidebar .brand-link{border-bottom:1px solid #e5e7eb;color:#111827!important}
.sidebar-theme-light .app-sidebar .brand-text,.sidebar-theme-light .app-sidebar .nav-link{color:#334155!important}
.sidebar-theme-light .app-sidebar .nav-link:hover{background:#f8fafc!important;color:var(--np-accent)!important}
.sidebar-theme-light .app-sidebar .sidebar-menu .nav-link.active{background:#f3f0ff!important;color:var(--np-accent)!important}
.sidebar-theme-light .app-sidebar .nav-header{color:#94a3b8!important}
.sidebar-theme-light .sidebar-wrapper::-webkit-scrollbar-thumb{background:rgba(15,23,42,.16)}
.sidebar-theme-dark .app-sidebar{background:#111827!important;color:#e5e7eb}
.sidebar-theme-dark .app-sidebar .brand-link{border-bottom:1px solid rgba(255,255,255,.08);color:#fff!important}
.sidebar-theme-dark .app-sidebar .brand-text,.sidebar-theme-dark .app-sidebar .nav-link{color:#e5e7eb!important}
.sidebar-theme-dark .app-sidebar .nav-link:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}


/* SPEEDLINK BILLING - compact responsive sidebar */
.app-sidebar .nav-link{
    min-width:0;
    padding:8px 12px;
    font-size:.86rem;
    line-height:1.2;
}
.app-sidebar .nav-link .nav-icon{
    flex:0 0 1.35rem;
    width:1.35rem;
    margin-right:.35rem;
    text-align:center;
}
.app-sidebar .nav-link p{
    min-width:0;
    flex:1 1 auto;
    margin:0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.app-sidebar .nav-link p .right{
    flex:0 0 auto;
    margin-left:6px;
}
.app-sidebar .sidebar-section-toggle{
    margin:2px 6px;
    padding:9px 10px;
}
.app-sidebar .sidebar-section-menu .nav-link{
    padding-left:32px;
    padding-right:10px;
    font-size:.82rem;
}
.app-sidebar .sidebar-section-menu .nav-icon{
    flex-basis:1.2rem;
    width:1.2rem;
}
.app-sidebar .nav-header{
    font-size:.68rem!important;
    padding-top:8px!important;
    padding-bottom:5px!important;
}

@media (max-width: 767.98px){
    .app-sidebar{
        width:250px!important;
        max-width:82vw;
    }
    .app-sidebar .nav-link{
        min-height:36px;
        padding:7px 10px;
        font-size:.80rem;
    }
    .app-sidebar .sidebar-section-toggle{
        padding:8px 9px;
        margin:2px 5px;
    }
    .app-sidebar .sidebar-section-menu .nav-link{
        padding-left:29px;
        font-size:.77rem;
    }
    .app-sidebar .brand-link{
        padding:10px 12px!important;
    }
    .app-sidebar .brand-text{
        font-size:.88rem!important;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
}

@media (max-width: 420px){
    .app-sidebar{
        width:235px!important;
        max-width:78vw;
    }
    .app-sidebar .nav-link{font-size:.76rem}
    .app-sidebar .sidebar-section-menu .nav-link{font-size:.73rem;padding-left:27px}
    .app-sidebar .nav-link .nav-icon{flex-basis:1.2rem;width:1.2rem;margin-right:.25rem}
}

/* ============================================================
   GLOBAL UI THEME - Light / Dark
   Applies to the complete application, not only the sidebar.
   ============================================================ */
html[data-ui-theme="dark"] body,
body[data-ui-theme="dark"] {
  --bs-body-bg:#0f172a;
  --bs-body-color:#e5e7eb;
  --bs-tertiary-bg:#111827;
  --bs-secondary-bg:#1e293b;
  --bs-border-color:#334155;
  background:#0f172a!important;
  color:#e5e7eb!important;
}
html[data-ui-theme="dark"] .app-wrapper,
html[data-ui-theme="dark"] .app-main,
html[data-ui-theme="dark"] .app-content,
html[data-ui-theme="dark"] .content-wrapper,
html[data-ui-theme="dark"] main { background:#0f172a!important; color:#e5e7eb; }
html[data-ui-theme="dark"] .app-header,
html[data-ui-theme="dark"] .navbar,
html[data-ui-theme="dark"] .card,
html[data-ui-theme="dark"] .modal-content,
html[data-ui-theme="dark"] .dropdown-menu,
html[data-ui-theme="dark"] .list-group-item,
html[data-ui-theme="dark"] .table,
html[data-ui-theme="dark"] .accordion-item,
html[data-ui-theme="dark"] .offcanvas,
html[data-ui-theme="dark"] .toast,
html[data-ui-theme="dark"] .np-bandwidth-panel { background:#111827!important; color:#e5e7eb; border-color:#334155!important; }
html[data-ui-theme="dark"] .card-header,
html[data-ui-theme="dark"] .card-footer { background:#172033!important; border-color:#334155!important; }
html[data-ui-theme="dark"] .table { --bs-table-bg:#111827; --bs-table-color:#e5e7eb; --bs-table-border-color:#334155; }
html[data-ui-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* { --bs-table-accent-bg:#172033; color:#e5e7eb; }
html[data-ui-theme="dark"] .table-hover>tbody>tr:hover>* { --bs-table-accent-bg:#1e293b; color:#fff; }
html[data-ui-theme="dark"] .form-control,
html[data-ui-theme="dark"] .form-select,
html[data-ui-theme="dark"] .input-group-text,
html[data-ui-theme="dark"] textarea { background:#0f172a!important; color:#e5e7eb!important; border-color:#475569!important; }
html[data-ui-theme="dark"] .form-control::placeholder,
html[data-ui-theme="dark"] textarea::placeholder { color:#94a3b8!important; }
html[data-ui-theme="dark"] .text-dark { color:#e5e7eb!important; }
html[data-ui-theme="dark"] .text-muted { color:#94a3b8!important; }
html[data-ui-theme="dark"] .bg-white,
html[data-ui-theme="dark"] .bg-light { background:#111827!important; }
html[data-ui-theme="dark"] .border,
html[data-ui-theme="dark"] .border-bottom,
html[data-ui-theme="dark"] .border-top,
html[data-ui-theme="dark"] .border-start,
html[data-ui-theme="dark"] .border-end { border-color:#334155!important; }
html[data-ui-theme="dark"] .dropdown-item { color:#e5e7eb; }
html[data-ui-theme="dark"] .dropdown-item:hover,
html[data-ui-theme="dark"] .dropdown-item:focus { background:#1e293b; color:#fff; }
html[data-ui-theme="dark"] .dropdown-divider { border-color:#334155; }
html[data-ui-theme="dark"] .btn-outline-secondary { color:#cbd5e1; border-color:#475569; }
html[data-ui-theme="dark"] .btn-outline-secondary:hover { background:#334155; color:#fff; }
html[data-ui-theme="dark"] .np-bandwidth-panel-title { filter:brightness(.85); }
html[data-ui-theme="dark"] .np-selected-bandwidth { background:#172033; border-color:#334155; }
html[data-ui-theme="dark"] .app-footer { background:#111827!important; color:#94a3b8; border-color:#334155!important; }
html[data-ui-theme="dark"] a:not(.btn) { color:#7dd3fc; }
html[data-ui-theme="dark"] .alert { border-color:#475569; }
html[data-ui-theme="dark"] .modal-header,
html[data-ui-theme="dark"] .modal-footer { border-color:#334155; }

/* ============================================================
   GLOBAL THEME SYNC - SIDEBAR IS PART OF THE WHOLE UI
   The light/dark switch controls the complete application,
   including the navigation sidebar. These rules intentionally
   override the legacy sidebar_theme setting for the live UI.
   ============================================================ */
html[data-ui-theme="dark"] .app-sidebar,
body[data-ui-theme="dark"] .app-sidebar {
  background:#111827!important;
  color:#e5e7eb!important;
  border-right-color:#334155!important;
}
html[data-ui-theme="dark"] .app-sidebar .sidebar-brand,
body[data-ui-theme="dark"] .app-sidebar .sidebar-brand,
html[data-ui-theme="dark"] .app-sidebar .brand-link,
body[data-ui-theme="dark"] .app-sidebar .brand-link {
  background:#111827!important;
  color:#f8fafc!important;
  border-color:#334155!important;
}
html[data-ui-theme="dark"] .app-sidebar .brand-text,
body[data-ui-theme="dark"] .app-sidebar .brand-text,
html[data-ui-theme="dark"] .app-sidebar .nav-link,
body[data-ui-theme="dark"] .app-sidebar .nav-link {
  color:#e5e7eb!important;
}
html[data-ui-theme="dark"] .app-sidebar .nav-link:hover,
body[data-ui-theme="dark"] .app-sidebar .nav-link:hover {
  background:#1e293b!important;
  color:#fff!important;
}
html[data-ui-theme="dark"] .app-sidebar .nav-link.active,
body[data-ui-theme="dark"] .app-sidebar .nav-link.active {
  background:rgba(0,229,255,.14)!important;
  color:#67e8f9!important;
}
html[data-ui-theme="dark"] .app-sidebar .nav-header,
body[data-ui-theme="dark"] .app-sidebar .nav-header {
  color:#94a3b8!important;
}
html[data-ui-theme="dark"] .app-sidebar .sidebar-section-menu,
body[data-ui-theme="dark"] .app-sidebar .sidebar-section-menu {
  border-left-color:#334155!important;
}
html[data-ui-theme="dark"] .app-sidebar .sidebar-theme-switch,
body[data-ui-theme="dark"] .app-sidebar .sidebar-theme-switch {
  border-bottom-color:#334155!important;
}
html[data-ui-theme="dark"] .app-sidebar #sidebarThemeToggle,
body[data-ui-theme="dark"] .app-sidebar #sidebarThemeToggle {
  background:#1e293b!important;
  color:#e5e7eb!important;
  border-color:#475569!important;
}
html[data-ui-theme="dark"] .app-sidebar #sidebarThemeToggle:hover,
body[data-ui-theme="dark"] .app-sidebar #sidebarThemeToggle:hover {
  background:#334155!important;
}

html[data-ui-theme="light"] .app-sidebar,
body[data-ui-theme="light"] .app-sidebar {
  background:#fff!important;
  color:#334155!important;
  border-right-color:#e5e7eb!important;
}
html[data-ui-theme="light"] .app-sidebar .sidebar-brand,
body[data-ui-theme="light"] .app-sidebar .sidebar-brand,
html[data-ui-theme="light"] .app-sidebar .brand-link,
body[data-ui-theme="light"] .app-sidebar .brand-link {
  background:#fff!important;
  color:#111827!important;
  border-color:#e5e7eb!important;
}
html[data-ui-theme="light"] .app-sidebar .brand-text,
body[data-ui-theme="light"] .app-sidebar .brand-text,
html[data-ui-theme="light"] .app-sidebar .nav-link,
body[data-ui-theme="light"] .app-sidebar .nav-link {
  color:#334155!important;
}
html[data-ui-theme="light"] .app-sidebar .nav-link:hover,
body[data-ui-theme="light"] .app-sidebar .nav-link:hover {
  background:#f8fafc!important;
  color:var(--np-accent)!important;
}
html[data-ui-theme="light"] .app-sidebar .nav-link.active,
body[data-ui-theme="light"] .app-sidebar .nav-link.active {
  background:#f3f0ff!important;
  color:var(--np-accent)!important;
}
html[data-ui-theme="light"] .app-sidebar .nav-header,
body[data-ui-theme="light"] .app-sidebar .nav-header {
  color:#94a3b8!important;
}
html[data-ui-theme="light"] .app-sidebar .sidebar-section-menu,
body[data-ui-theme="light"] .app-sidebar .sidebar-section-menu {
  border-left-color:#e5e7eb!important;
}
html[data-ui-theme="light"] .app-sidebar .sidebar-theme-switch,
body[data-ui-theme="light"] .app-sidebar .sidebar-theme-switch {
  border-bottom-color:#e5e7eb!important;
}
html[data-ui-theme="light"] .app-sidebar #sidebarThemeToggle,
body[data-ui-theme="light"] .app-sidebar #sidebarThemeToggle {
  background:#fff!important;
  color:#334155!important;
  border-color:#d1d5db!important;
}

/* SPEEDLINK Billing sidebar polish */
.sidebar, .app-sidebar, aside.sidebar {
    overflow-x: hidden;
}
.sidebar .nav-link, .app-sidebar .nav-link, aside.sidebar .nav-link {
    display:flex;
    align-items:center;
    gap:.55rem;
    min-width:0;
    white-space:nowrap;
}
.sidebar .nav-link span, .app-sidebar .nav-link span, aside.sidebar .nav-link span {
    overflow:hidden;
    text-overflow:ellipsis;
}
.sidebar .submenu-toggle::after, .app-sidebar .submenu-toggle::after,
.sidebar [data-bs-toggle="collapse"]::after, .app-sidebar [data-bs-toggle="collapse"]::after {
    transform:rotate(90deg);
    transition:transform .2s ease;
}
.sidebar [aria-expanded="true"]::after, .app-sidebar [aria-expanded="true"]::after {
    transform:rotate(-90deg);
}
.sidebar-footer, .app-sidebar-footer {
    margin-top:auto;
    position:sticky;
    bottom:0;
}

/* ============================================================
   Dashboard "live network" tiles — compact, colour-coded status
   cards used for the customer/online overview grid. Replaces the
   old full-height bootstrap .card tiles (too tall, too much empty
   padding) with a tighter tile that still reads clearly at a
   glance from across the NOC/reception desk.
   ============================================================ */
.dash-tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.dash-tile{
    position:relative;
    background:#fff;
    border:1px solid #e7eaf0;
    border-radius:10px;
    padding:11px 13px 11px 15px;
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    overflow:hidden;
    box-shadow:0 1px 3px rgba(15,23,42,.04);
    transition:box-shadow .15s ease, transform .15s ease;
}
.dash-tile:hover{box-shadow:0 6px 16px rgba(15,23,42,.09);transform:translateY(-1px)}
.dash-tile::before{
    content:"";
    position:absolute;
    left:0; top:0; bottom:0;
    width:4px;
    background:var(--dash-accent,#94a3b8);
}
.dash-tile-icon{
    width:36px;height:36px;border-radius:9px;flex:0 0 auto;
    display:flex;align-items:center;justify-content:center;
    font-size:1rem;
    background:var(--dash-accent-bg,#f1f5f9);
    color:var(--dash-accent,#64748b);
}
.dash-tile-body{min-width:0;flex:1 1 auto}
.dash-tile-label{
    font-size:.68rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;
    color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    display:flex;align-items:center;gap:5px;
}
.dash-tile-value{font-size:1.32rem;font-weight:800;color:#111827;line-height:1.25;letter-spacing:-.01em}
.dash-tile-meta{font-size:.68rem;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Colour themes — set the two custom properties the tile reads from */
.dash-tile.c-blue{--dash-accent:#2563eb;--dash-accent-bg:#eff6ff}
.dash-tile.c-green{--dash-accent:#15803d;--dash-accent-bg:#ecfdf3}
.dash-tile.c-violet{--dash-accent:#6d28d9;--dash-accent-bg:#ede9fe}
.dash-tile.c-amber{--dash-accent:#b45309;--dash-accent-bg:#fffbeb}
.dash-tile.c-red{--dash-accent:#dc2626;--dash-accent-bg:#fef2f2}
.dash-tile.c-slate{--dash-accent:#475569;--dash-accent-bg:#f1f5f9}
.dash-tile.c-cyan{--dash-accent:#0891b2;--dash-accent-bg:#ecfeff}

/* Live "online" pulse dot — used next to labels for figures that come
   from a real-time session/router feed, so staff can tell at a glance
   which numbers are live vs. point-in-time account counts. */
.live-dot{
    width:7px;height:7px;border-radius:50%;flex:0 0 auto;
    background:#22c55e;
    box-shadow:0 0 0 rgba(34,197,94,.55);
    animation:live-pulse 1.8s infinite;
}
.live-dot.is-off{background:#cbd5e1;animation:none;box-shadow:none}
@keyframes live-pulse{
    0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)}
    70%{box-shadow:0 0 0 6px rgba(34,197,94,0)}
    100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}
}

@media(max-width:992px){.dash-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.dash-tile-grid{grid-template-columns:1fr}}

/* Trim the tall generic Bootstrap boxes elsewhere on the dashboard
   (Financial Overview, Service lifecycle, Data Usage) so the page reads
   as a dense operational console rather than stacked oversized cards. */
.dashboard-page .card-body{padding:1rem}
.dashboard-page .card-header{padding:.7rem 1rem}
.dashboard-page .fin-card .card-body{padding:1rem 1.1rem}
.dashboard-page .lifecycle-tile .card-body{padding:.85rem 1rem}
.dashboard-page .lifecycle-tile .fs-4{font-size:1.25rem!important}
.dashboard-page .usage-box{padding:.8rem 1rem!important}
.dashboard-page .usage-box .fs-4{font-size:1.1rem!important}

/* ============================================================
   System Health alert banner — a proper attention-grabbing strip
   instead of a plain Bootstrap .alert, so a real issue actually
   stands out against the colourful dashboard tiles above it.
   ============================================================ */
.health-alert{
    display:flex;
    align-items:center;
    gap:14px;
    padding:13px 16px;
    border-radius:12px;
    text-decoration:none;
    background:linear-gradient(135deg,#fff7ed 0%,#fffbeb 100%);
    border:1px solid #fde68a;
    box-shadow:0 2px 8px rgba(217,119,6,.06);
    transition:box-shadow .15s ease, transform .15s ease;
}
.health-alert:hover{box-shadow:0 6px 18px rgba(217,119,6,.12);transform:translateY(-1px)}
.health-alert-icon{
    width:40px;height:40px;border-radius:10px;flex:0 0 auto;
    display:flex;align-items:center;justify-content:center;
    font-size:1.2rem;color:#b45309;background:#fef3c7;
    animation:health-pulse 2s infinite;
}
@keyframes health-pulse{
    0%,100%{box-shadow:0 0 0 0 rgba(180,83,9,.25)}
    50%{box-shadow:0 0 0 6px rgba(180,83,9,0)}
}
.health-alert-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
.health-alert-title{font-weight:700;color:#78350f;font-size:.92rem}
.health-alert-sub{font-size:.78rem;color:#92661c}
.health-alert-cta{
    flex:0 0 auto;font-weight:700;font-size:.82rem;color:#b45309;
    display:flex;align-items:center;gap:5px;white-space:nowrap;
}

/* ============================================================
   Financial Overview — coloured revenue tiles instead of plain
   bordered boxes, with clearer label/amount/trend hierarchy so
   the trend badge and transaction count don't run into the text.
   ============================================================ */
.fin-card .card-header{padding:.85rem 1.1rem}
.fin-box{
    position:relative;
    border-radius:12px;
    padding:14px 16px;
    height:100%;
    background:#fff;
    border:1px solid #edf0f4;
    overflow:hidden;
}
.fin-box::after{
    content:"";
    position:absolute;
    right:-26px;top:-26px;
    width:90px;height:90px;
    border-radius:50%;
    background:var(--fin-tint,rgba(37,99,235,.06));
    pointer-events:none;
}
.fin-box-today{--fin-tint:rgba(37,99,235,.08);background:linear-gradient(160deg,#eff6ff 0%,#fff 55%)}
.fin-box-week{--fin-tint:rgba(180,83,9,.08);background:linear-gradient(160deg,#fffbeb 0%,#fff 55%)}
.fin-box-month{--fin-tint:rgba(21,128,61,.08);background:linear-gradient(160deg,#ecfdf3 0%,#fff 55%)}
.fin-box-top{display:flex;align-items:center;gap:8px;margin-bottom:10px;position:relative;z-index:1}
.fin-box-icon{
    width:28px;height:28px;border-radius:8px;flex:0 0 auto;
    display:flex;align-items:center;justify-content:center;font-size:.85rem;
    background:rgba(255,255,255,.75);color:var(--dash-accent,#2563eb);
    box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.fin-box-today .fin-box-icon{color:#2563eb}
.fin-box-week .fin-box-icon{color:#b45309}
.fin-box-month .fin-box-icon{color:#15803d}
.fin-box-label{font-size:.72rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#64748b}
.fin-box-amount{font-size:1.6rem;font-weight:800;letter-spacing:-.01em;color:#111827;position:relative;z-index:1;margin-bottom:8px}
.fin-box-foot{display:flex;align-items:center;flex-wrap:wrap;gap:8px;position:relative;z-index:1}
.fin-box-txn{font-size:.76rem;color:#94a3b8}
.revenue-amount{font-variant-numeric:tabular-nums}

/* Ticket quick status switcher (support/view.php) */
.ticket-status-switcher {
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ticket-status-switcher form {
    display: inline-flex;
}
.ticket-status-switcher .btn {
    border-radius: 0.375rem !important;
}

/* ===================================================================
   Router onboarding (routers/create.php, routers/edit.php, form.php)
   Two-column layout: form card + sticky "how it works" panel.
=================================================================== */
.np-router-onboard{align-items:flex-start}
.np-form-card{border-radius:16px;overflow:hidden}
.np-form-section{margin-bottom:26px}
.np-form-section:last-child{margin-bottom:0}
.np-form-section-title{display:flex;align-items:center;gap:9px;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#64748b;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid #eef1f4}
.np-form-section-title i{color:var(--np-accent);font-size:.85rem}
.np-field-icon-input{position:relative}
.np-field-icon-input i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#94a3b8;font-size:.92rem;pointer-events:none;transition:color .15s}
.np-field-icon-input .form-control,.np-field-icon-input .form-select{padding-left:40px}
.np-field-icon-input .form-control:focus + i,
.np-field-icon-input:focus-within i{color:var(--np-accent)}
.form-control:focus,.form-select:focus{border-color:var(--np-accent-light);box-shadow:0 0 0 .2rem rgba(109,40,217,.12)}
.np-row-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:767px){.np-row-2{grid-template-columns:1fr}}

.np-setup-panel{background:linear-gradient(165deg,var(--np-accent) 0%,var(--np-accent-light) 55%,#8452f5 100%);border-radius:16px;padding:26px 24px;color:#fff;position:relative;overflow:hidden;box-shadow:0 10px 30px rgba(109,40,217,.22)}
.np-setup-panel::after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.08);top:-90px;right:-70px}
.np-setup-panel::before{content:"";position:absolute;width:140px;height:140px;border-radius:50%;background:rgba(255,255,255,.06);bottom:-60px;left:-40px}
.np-setup-panel > *{position:relative;z-index:1}
.np-setup-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);padding:5px 12px;border-radius:99px;font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;margin-bottom:14px}
.np-setup-panel h6{font-weight:800;font-size:1.05rem;margin-bottom:6px}
.np-setup-panel p.np-setup-sub{font-size:.82rem;color:rgba(255,255,255,.85);margin-bottom:22px}
.np-setup-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:18px}
.np-setup-step{display:flex;gap:14px;align-items:flex-start}
.np-setup-step-num{flex:0 0 auto;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3);display:flex;align-items:center;justify-content:center;font-size:.78rem;font-weight:800}
.np-setup-step strong{display:block;font-size:.86rem;font-weight:700;margin-bottom:2px}
.np-setup-step span{display:block;font-size:.78rem;color:rgba(255,255,255,.82);line-height:1.4}
.np-setup-divider{height:1px;background:rgba(255,255,255,.18);margin:22px 0}
.np-setup-perks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.np-setup-perks li{display:flex;align-items:center;gap:8px;font-size:.78rem;color:rgba(255,255,255,.92)}
.np-setup-perks i{color:#4ade80;font-size:.9rem}
.np-setup-support{margin-top:22px;padding-top:18px;border-top:1px solid rgba(255,255,255,.18);font-size:.76rem;color:rgba(255,255,255,.78)}
.np-setup-support a{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:2px}

.np-catalogue-select{padding-left:40px}
.np-catalogue-empty{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px dashed #dbe1e8;border-radius:10px;background:#fbfcfe;font-size:.8rem;color:#64748b}
.np-catalogue-empty i{color:#94a3b8}

.np-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:28px;padding-top:20px;border-top:1px solid #eef1f4;flex-wrap:wrap}
.np-submit-bar .np-submit-hint{font-size:.76rem;color:#94a3b8;display:flex;align-items:center;gap:6px}
.np-submit-bar .np-submit-hint i{color:#16a34a}
.np-submit-btn{border-radius:10px;padding:.68rem 1.3rem;font-size:.88rem;font-weight:700;box-shadow:0 8px 18px rgba(109,40,217,.25);transition:transform .15s ease,box-shadow .15s ease}
.np-submit-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(109,40,217,.32)}

/* ===================================================================
   Roles Management (settings/users/jobs.php)
=================================================================== */
.np-role-avatar{width:38px;height:38px;border-radius:10px;background:linear-gradient(150deg,#f1f5f9,#e7ecf3);color:var(--np-accent);display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:1rem;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04)}
.np-role-name-cell{display:flex;align-items:center;gap:12px}

.np-perm-tip{display:flex;gap:12px;align-items:flex-start;background:#f8f7ff;border:1px solid #ece7fd;border-radius:12px;padding:14px 16px;margin-bottom:18px}
.np-perm-tip i{color:var(--np-accent);font-size:1.05rem;flex:0 0 auto;margin-top:1px}
.np-perm-tip p{margin:0;font-size:.82rem;color:#4b5568;line-height:1.5}
.np-perm-tip a{color:var(--np-accent);font-weight:600;text-decoration:none}
.np-perm-tip a:hover{text-decoration:underline}

.permission-group{border:1px solid #e9ecf2!important;border-radius:14px!important;padding:16px!important;transition:border-color .15s ease,box-shadow .15s ease}
.permission-group:hover{border-color:#dcdfe6!important;box-shadow:0 2px 10px rgba(15,23,42,.04)}
.permission-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
.permission-group-title{display:flex;align-items:center;gap:10px}
.permission-group-icon{width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#ede9fe;color:var(--np-accent);font-size:.92rem;flex:0 0 auto}
.permission-group-title .fw-semibold{font-size:.86rem}
.permission-group-count{font-size:.68rem;font-weight:700;color:#94a3b8;background:#f1f5f9;border-radius:99px;padding:1px 8px}
.action-toggle{font-size:.74rem;font-weight:700;text-decoration:none!important;color:var(--np-accent)!important}

.permission-item{cursor:pointer;background:#fbfcfe;border-color:#e9ecf2!important;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}
.permission-item:hover{background:#f5f4ff;border-color:#ddd6fe!important}
.permission-item:has(input:checked){background:#efeafd;border-color:var(--np-accent-light)!important;box-shadow:0 0 0 1px var(--np-accent-light) inset}
.permission-item:has(input:checked) span{color:var(--np-accent-dark);font-weight:600}
.permission-item .form-check-input{cursor:pointer}
.permission-item .form-check-input:checked{background-color:var(--np-accent);border-color:var(--np-accent)}
.permission-item .form-check-input:focus{box-shadow:0 0 0 .15rem rgba(109,40,217,.18)}

.np-role-form-head{display:flex;align-items:center;gap:12px}
.np-role-form-icon{width:38px;height:38px;border-radius:10px;background:#ede9fe;color:var(--np-accent);display:flex;align-items:center;justify-content:center;font-size:1.05rem;flex:0 0 auto}
.np-perm-count-badge{background:var(--np-accent);color:#fff;font-weight:700;border-radius:99px;padding:2px 10px;font-size:.72rem}

/* ===================================================================
   Notification & Automation (settings/notifications.php)
=================================================================== */
.np-notif-card{border:1px solid #e9ecf2;border-radius:14px;padding:18px 20px;margin-bottom:16px;transition:border-color .15s ease,box-shadow .15s ease;background:#fff}
.np-notif-card:hover{border-color:#dcdfe6;box-shadow:0 2px 12px rgba(15,23,42,.05)}
.np-notif-card.is-disabled{background:#fbfbfd}
.np-notif-card.is-disabled .np-notif-icon{background:#f1f5f9;color:#94a3b8}
.np-notif-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.np-notif-title{display:flex;align-items:center;gap:12px}
.np-notif-icon{width:40px;height:40px;border-radius:11px;background:#ede9fe;color:var(--np-accent);display:flex;align-items:center;justify-content:center;font-size:1.05rem;flex:0 0 auto}
.np-notif-title .fw-semibold{font-size:.92rem}
.np-notif-title code{font-size:.7rem;color:#94a3b8;background:transparent;padding:0}

.np-switch{display:flex;align-items:center;gap:8px}
.np-switch .form-check-input{width:2.4em;height:1.3em;cursor:pointer;background-color:#e2e6ec;border-color:#e2e6ec}
.np-switch .form-check-input:checked{background-color:var(--np-accent);border-color:var(--np-accent)}
.np-switch .form-check-input:focus{box-shadow:0 0 0 .15rem rgba(109,40,217,.18)}
.np-switch label{font-size:.78rem;font-weight:700;color:#64748b}

.np-channel-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.np-channel-chip{cursor:pointer;display:inline-flex;align-items:center;gap:6px;border:1px solid #e9ecf2;border-radius:99px;padding:6px 14px 6px 10px;background:#fbfcfe;font-size:.8rem;font-weight:600;color:#64748b;transition:background .12s ease,border-color .12s ease,color .12s ease}
.np-channel-chip:hover{border-color:#ddd6fe;background:#f5f4ff}
.np-channel-chip:has(input:checked){background:#efeafd;border-color:var(--np-accent-light);color:var(--np-accent-dark)}
.np-channel-chip input{cursor:pointer;margin:0}
.np-channel-chip i{font-size:.85rem}

.np-recipient-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-top:14px;border-top:1px solid #f1f3f7}
.np-recipient-row .np-field-icon-input{min-width:190px;flex:1 1 190px}
.np-recipient-row .np-field-icon-input.np-roles-input{flex:1 1 220px;min-width:220px}

/* ===================================================================
   Add/Edit User (settings/users/create.php, settings/users/edit.php)
=================================================================== */
.np-section-head{display:flex;align-items:center;gap:12px}
.np-section-icon{width:38px;height:38px;border-radius:10px;background:#ede9fe;color:var(--np-accent);display:flex;align-items:center;justify-content:center;font-size:1.05rem;flex:0 0 auto}
.np-type-help{display:flex;gap:10px;align-items:flex-start;background:#f8fafc;border:1px solid #eef1f4;border-radius:10px;padding:10px 12px;margin-top:8px;font-size:.78rem;color:#64748b;min-height:0}
.np-type-help:empty{display:none}
.np-type-help i{color:var(--np-accent);font-size:.9rem;flex:0 0 auto;margin-top:1px}

/* ===================================================================
   Automatic Notifications (sms/settings.php)
=================================================================== */
.np-toggle-card{display:flex;align-items:center;gap:14px;border:1px solid #e9ecf2;border-radius:12px;padding:16px;cursor:pointer;height:100%;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;background:#fff}
.np-toggle-card:hover{border-color:#dcdfe6;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.np-toggle-card:has(input:checked){border-color:var(--np-accent-light);background:#faf8ff}
.np-toggle-card input{width:18px;height:18px;cursor:pointer;accent-color:var(--np-accent)}
.np-toggle-card span{flex:1;display:flex;flex-direction:column}
.np-toggle-card small{color:#6b7280;margin-top:3px}
.np-toggle-card i{color:#94a3b8;transition:color .15s ease}
.np-toggle-card:has(input:checked) i{color:var(--np-accent)}

.np-notif-group-head{display:flex;align-items:center;gap:12px;margin:28px 0 14px}
.np-notif-group-head .np-section-icon{background:#ede9fe}
.np-notif-group-head h5{margin:0}

.np-event-card{border:1px solid #e9ecf2!important;border-radius:14px!important;transition:border-color .15s ease,box-shadow .15s ease}
.np-event-card:hover{border-color:#dcdfe6!important;box-shadow:0 2px 12px rgba(15,23,42,.05)}
.np-event-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.np-event-title{display:flex;align-items:flex-start;gap:12px}
.np-event-icon{width:38px;height:38px;border-radius:10px;background:#f1f5f9;color:var(--np-accent);display:flex;align-items:center;justify-content:center;font-size:1rem;flex:0 0 auto}

.np-var-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.np-var-chip{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.7rem;background:#f1f5f9;color:#475569;border-radius:6px;padding:2px 7px;border:1px solid #e5e9f0}
.np-var-note{font-size:.74rem;color:#94a3b8;margin-top:8px}

.np-reminder-days-preview{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}
.np-reminder-day-chip{background:#ede9fe;color:var(--np-accent-dark);font-size:.72rem;font-weight:700;border-radius:99px;padding:2px 10px}

/* ===================================================================
   System Health (system-health/index.php)
=================================================================== */
.np-health-stat{border:1px solid #e5e7eb;border-radius:14px;padding:22px 18px;text-align:center;background:#fff;height:100%;position:relative;overflow:hidden}
.np-health-stat .np-health-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.15rem;margin:0 auto 10px}
.np-health-stat .np-health-icon.danger{background:#fef2f2;color:#dc2626}
.np-health-stat .np-health-icon.warning{background:#fffbeb;color:#b45309}
.np-health-stat .np-health-icon.neutral{background:#f1f5f9;color:#64748b}
.np-health-stat .np-health-icon.success{background:#ecfdf3;color:#15803d}
.np-health-stat .np-health-value{font-size:1.9rem;font-weight:800;line-height:1}
.np-health-stat .np-health-label{font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#94a3b8;margin-top:6px}

.np-health-group{border:1px solid #e9ecf2!important;border-radius:14px!important;overflow:hidden}
.np-health-group-header{display:flex;align-items:center;justify-content:between;gap:10px}
.np-health-group-title{display:flex;align-items:center;gap:12px}
.np-health-group-icon{width:36px;height:36px;border-radius:10px;background:#ede9fe;color:var(--np-accent);display:flex;align-items:center;justify-content:center;font-size:.95rem;flex:0 0 auto}

.np-health-row{display:flex;align-items:flex-start;gap:14px;padding:14px 18px;text-decoration:none;color:inherit;transition:background .12s ease;border-bottom:1px solid #f1f3f7}
.np-health-row:last-child{border-bottom:none}
.np-health-row:hover{background:#f8fafc;color:inherit}
.np-health-row-icon{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:.95rem;flex:0 0 auto;margin-top:1px}
.np-health-row-icon.danger{background:#fef2f2;color:#dc2626}
.np-health-row-icon.warning{background:#fffbeb;color:#b45309}
.np-health-row-body{flex:1;min-width:0}
.np-health-row-badge{font-size:.68rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase;border-radius:99px;padding:2px 10px;flex:0 0 auto;margin-top:2px}
.np-health-row-badge.danger{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}
.np-health-row-badge.warning{background:#fffbeb;color:#b45309;border:1px solid #fde68a}
.np-health-row-chevron{color:#cbd5e1;font-size:.85rem;flex:0 0 auto;margin-top:6px}

/* ============ Settings page (redesigned) ============ */
.np-settings-nav{position:sticky;top:84px;display:flex;flex-direction:column;gap:2px}
.np-settings-nav a{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:8px;font-size:.85rem;font-weight:500;color:#5b6670;text-decoration:none;transition:background .15s,color .15s}
.np-settings-nav a i{width:16px;text-align:center;font-size:.9rem}
.np-settings-nav a.active{background:#ede9fe;color:var(--np-accent);font-weight:700}
.np-settings-nav a:hover:not(.active){background:#f8fafc;color:#111827}

.np-settings-card{background:#fff;border:1px solid #e7eaf0;border-radius:13px;box-shadow:0 2px 10px rgba(15,23,42,.04);overflow:hidden;scroll-margin-top:96px}
.np-settings-card + .np-settings-card{margin-top:18px}
.np-settings-card-head{display:flex;gap:13px;padding:18px 20px;border-bottom:1px solid #eef1f4}
.np-settings-icon{width:36px;height:36px;border-radius:9px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;background:#ede9fe;color:var(--np-accent);font-size:1rem}
.np-settings-card-head h3{font-size:.98rem;margin:0 0 2px;font-weight:700}
.np-settings-card-head p{font-size:.8rem;color:#5b6670;margin:0;line-height:1.5}
.np-settings-body{padding:20px}

.np-seg{display:inline-flex;border:1px solid #e2e6ee;border-radius:9px;padding:3px;background:#f8fafc;width:max-content}
.np-seg input{position:absolute;opacity:0;pointer-events:none}
.np-seg label{padding:7px 15px;border-radius:6px;font-size:.82rem;font-weight:600;color:#5b6670;cursor:pointer;margin:0;display:inline-block}
.np-seg input:checked + label{background:#fff;color:#111827;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.np-seg input:focus-visible + label{outline:2px solid var(--np-accent-light);outline-offset:1px}

.np-swatches{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.np-swatch{position:relative}
.np-swatch input{position:absolute;opacity:0;pointer-events:none}
.np-swatch label{display:block;width:30px;height:30px;border-radius:9px;border:2px solid transparent;cursor:pointer;margin:0}
.np-swatch input:checked + label{border-color:#111827}
.np-swatch input:checked + label::after{content:'';position:absolute;inset:0;margin:auto;width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.np-swatch input:focus-visible + label{outline:2px solid var(--np-accent-light);outline-offset:2px}
.np-swatch.is-custom label{background:conic-gradient(#6d28d9,#2563eb,#16a34a,#ea580c,#dc2626,#6d28d9);display:flex;align-items:center;justify-content:center}

.np-toggle-row{display:flex;gap:14px;align-items:flex-start;padding:18px 20px}
.np-toggle-row + .np-toggle-row{border-top:1px solid #eef1f4}
.np-toggle-row .form-switch{padding-left:0;margin-top:2px}
.np-toggle-row .form-check-input{width:2.6em;height:1.4em;margin-left:0;flex:0 0 auto;cursor:pointer}
/* elite.css pushes every switch 3.1em to the left (margin-left:-3.1em); here the switch has no label beside it, so that cut the knob off at the card edge. Higher specificity wins. */
html body .np-toggle-row .form-switch{padding-left:0;margin:2px 0 0;flex:0 0 auto;min-height:0}
html body .np-toggle-row .form-switch .form-check-input{float:none;display:block;margin:0;width:2.6em;height:1.4em;flex:0 0 auto}
.np-toggle-copy{min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.np-settings-card-head>div:last-child{min-width:0}
.np-settings-chips{display:none}
@media (max-width:991.98px){
  .np-settings-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;margin:0 -2px 6px;-webkit-overflow-scrolling:touch;scrollbar-width:none;position:sticky;top:0;z-index:5;background:var(--bs-body-bg,#f8f9fb)}
  .np-settings-chips::-webkit-scrollbar{display:none}
  .np-settings-chips a{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid #e7eaf0;border-radius:999px;background:#fff;font-size:.8rem;font-weight:600;color:#5b6670;text-decoration:none;white-space:nowrap}
  .np-settings-chips a i{font-size:.9rem}
  .np-toggle-row{padding:16px}
  .np-settings-body{padding:16px}
  .np-settings-card-head{padding:16px}
  .np-toggle-sub{max-width:none}
}
html[data-ui-theme="dark"] .np-settings-chips{background:#0f172a}
html[data-ui-theme="dark"] .np-settings-chips a{background:#111827;border-color:#334155;color:#94a3b8}
.np-toggle-row .form-check-input:checked{background-color:var(--np-accent);border-color:var(--np-accent)}
.np-toggle-copy h4{font-size:.88rem;font-weight:700;margin:0 0 4px}
.np-toggle-copy p{font-size:.8rem;color:#5b6670;margin:0;line-height:1.6}
.np-toggle-copy a{font-size:.8rem;font-weight:600;text-decoration:none;color:var(--np-accent)}
.np-toggle-copy a:hover{text-decoration:underline}
.np-toggle-sub{max-width:190px;margin-top:12px}

.np-payment-note{display:flex;gap:12px;align-items:flex-start;padding:15px 18px;border:1px solid #e2e6ee;border-radius:10px;background:#f8fafc;font-size:.82rem;color:#5b6670;line-height:1.6}
.np-payment-note i{color:var(--np-accent);font-size:1rem;margin-top:1px}
.np-payment-note strong{color:#111827}

.np-save-bar{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:14px 0 4px;margin-top:6px;background:linear-gradient(to top,#f8f9fb 65%,transparent)}

html[data-ui-theme="dark"] .np-settings-card{background:#111827!important;border-color:#334155!important}
html[data-ui-theme="dark"] .np-settings-card-head{border-bottom-color:#243044!important}
html[data-ui-theme="dark"] .np-settings-card-head p,
html[data-ui-theme="dark"] .np-toggle-copy p{color:#94a3b8}
html[data-ui-theme="dark"] .np-toggle-row + .np-toggle-row{border-color:#243044}
html[data-ui-theme="dark"] .np-seg{background:#0f172a;border-color:#334155}
html[data-ui-theme="dark"] .np-seg label{color:#94a3b8}
html[data-ui-theme="dark"] .np-seg input:checked + label{background:#1e293b;color:#e5e7eb}
html[data-ui-theme="dark"] .np-payment-note{background:#0f172a;border-color:#334155;color:#94a3b8}
html[data-ui-theme="dark"] .np-payment-note strong{color:#e5e7eb}
html[data-ui-theme="dark"] .np-settings-nav a{color:#94a3b8}
html[data-ui-theme="dark"] .np-settings-nav a:hover:not(.active){background:#1e293b;color:#e5e7eb}
html[data-ui-theme="dark"] .np-settings-nav a.active{background:#2a2350;color:#c4b5fd}
html[data-ui-theme="dark"] .np-save-bar{background:linear-gradient(to top,#0f172a 65%,transparent)}

/* ============ Reports page (redesigned + all-time revenue) ============ */
.np-reports-toolbar{background:#fff;border:1px solid #e7eaf0;border-radius:13px;box-shadow:0 2px 10px rgba(15,23,42,.04);padding:16px 20px}
.np-date-field{display:flex;flex-direction:column;gap:5px}
.np-date-field label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin:0}
.np-date-field input{border:1px solid #dbe1e8;border-radius:9px;padding:7px 11px;font-size:.85rem;background:#fff;color:#0f172a}
.np-date-field input:focus{outline:none;border-color:var(--np-accent-light);box-shadow:0 0 0 3px rgba(109,40,217,.1)}
.np-preset-pills{display:flex;gap:6px;flex-wrap:wrap}
.np-preset-pills a{font-size:.78rem;font-weight:600;padding:7px 13px;border-radius:99px;border:1px solid #e2e6ee;color:#5b6670;text-decoration:none;background:#f8fafc;white-space:nowrap;transition:background .15s,color .15s}
.np-preset-pills a:hover{background:#eef2f7;color:#111827}
.np-preset-pills a.active{background:var(--np-accent);border-color:var(--np-accent);color:#fff}

.np-report-panel{background:#fff;border:1px solid #e7eaf0;border-radius:13px;box-shadow:0 2px 10px rgba(15,23,42,.04);overflow:hidden;height:100%}
.np-report-head{display:flex;gap:12px;align-items:center;padding:15px 18px;border-bottom:1px solid #eef1f4}
.np-report-icon{width:32px;height:32px;border-radius:8px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;background:#ede9fe;color:var(--np-accent);font-size:.92rem}
.np-report-head h3{font-size:.9rem;margin:0;font-weight:700}
.np-report-head .np-report-meta{margin-left:auto;font-size:.76rem;color:#5b6670;text-decoration:none;white-space:nowrap}
.np-report-head .np-report-meta:hover{color:var(--np-accent)}

.np-return-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.np-return-cell{text-align:center;padding:14px 10px;border-radius:11px;background:#f8fafc}
.np-return-cell strong{display:block;font-size:1.5rem;font-weight:800;color:#0f172a;font-variant-numeric:tabular-nums}
.np-return-cell span{display:block;font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-top:3px}
.np-return-ring{width:60px;height:60px;border-radius:50%;margin:0 auto 8px;display:flex;align-items:center;justify-content:center;background:conic-gradient(var(--np-accent) calc(var(--rate)*1%), #e2e6ee 0)}
.np-return-ring i{width:47px;height:47px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;color:#0f172a;font-size:.8rem;font-style:normal;font-weight:800}

@media(max-width:700px){.np-return-grid{grid-template-columns:1fr}}

html[data-ui-theme="dark"] .np-reports-toolbar,
html[data-ui-theme="dark"] .np-report-panel{background:#111827!important;border-color:#334155!important}
html[data-ui-theme="dark"] .np-report-head{border-bottom-color:#243044!important}
html[data-ui-theme="dark"] .np-date-field input{background:#0f172a;border-color:#334155;color:#e5e7eb}
html[data-ui-theme="dark"] .np-date-field label{color:#94a3b8}
html[data-ui-theme="dark"] .np-preset-pills a{background:#0f172a;border-color:#334155;color:#94a3b8}
html[data-ui-theme="dark"] .np-preset-pills a:hover{background:#1e293b;color:#e5e7eb}
html[data-ui-theme="dark"] .np-return-cell{background:#0f172a}
html[data-ui-theme="dark"] .np-return-cell span{color:#94a3b8}
html[data-ui-theme="dark"] .np-return-ring i{background:#111827;color:#e5e7eb}

/* ============ Tasks page ============ */
.np-status-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:99px;font-size:.72rem;font-weight:700}
.np-status-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
.np-status-select{border:none;font-size:.75rem;font-weight:700;border-radius:8px;padding:6px 10px;cursor:pointer;appearance:auto}
.np-status-select:focus{outline:2px solid var(--np-accent-light);outline-offset:1px}

.np-avatar{width:30px;height:30px;border-radius:50%;background:var(--np-accent);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:800;flex:none}
.np-assignee{display:flex;align-items:center;gap:9px}
.np-assignee .who strong{display:block;font-size:.83rem;font-weight:600}
.np-assignee .who span{display:block;font-size:.72rem;color:#5b6670}

.np-task-title strong{font-size:.86rem}
.np-task-title .desc{font-size:.78rem;color:#5b6670;margin-top:2px}

html[data-ui-theme="dark"] .np-assignee .who span,
html[data-ui-theme="dark"] .np-task-title .desc{color:#94a3b8}

/* ============ Customer Care page ============ */
.np-stat-card .sub{font-size:.68rem;color:#94a3b8;margin-top:2px}
.np-stat-icon.danger{color:#dc2626;background:#fef2f2}
.np-stat-icon.warning{color:#c2410c;background:#fff7ed}
.np-stat-icon.success{color:#047857;background:#ecfdf5}
.np-stat-icon.info{color:#0e7490;background:#ecfeff}
.np-stat-icon.primary{color:#4338ca;background:#eef2ff}
.np-stat-card:has(.np-stat-icon.danger)::before{background:#dc2626}
.np-stat-card:has(.np-stat-icon.warning)::before{background:#c2410c}
.np-stat-card:has(.np-stat-icon.success)::before{background:#047857}
.np-stat-card:has(.np-stat-icon.info)::before{background:#0e7490}
.np-stat-card:has(.np-stat-icon.primary)::before{background:#4338ca}

/* ============ Tasks page (polish pass) ============ */
.np-seg a{padding:7px 15px;border-radius:6px;font-size:.82rem;font-weight:600;text-decoration:none;color:#5b6670;display:inline-block}
.np-seg a.active{background:#fff;color:#111827;box-shadow:0 1px 3px rgba(15,23,42,.12)}
html[data-ui-theme="dark"] .np-seg a{color:#94a3b8}
html[data-ui-theme="dark"] .np-seg a.active{background:#1e293b;color:#e5e7eb}

.np-row-overdue td:first-child{box-shadow:inset 3px 0 0 #dc2626}
.np-overdue-tag{display:inline-block;margin-left:6px;font-size:.66rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;color:#dc2626;background:#fef2f2;padding:2px 8px;border-radius:99px;vertical-align:middle}
html[data-ui-theme="dark"] .np-overdue-tag{background:#2a1414;color:#fca5a5}

/* ============ Bandwidth Plans page ============ */
.np-rate{display:inline-flex;align-items:center;gap:5px;font-size:.84rem;font-weight:600;color:#334155}
.np-rate i{font-size:.78rem}
.np-rate-down i{color:#0e7490}
.np-rate-up i{color:#c2410c}
html[data-ui-theme="dark"] .np-rate{color:#e5e7eb}


/* ===== Router cards: compact, every action visible and labelled, phone-friendly ===== */
.np-router-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:12px;padding:12px 14px 16px}
.np-router-card-item{padding:13px 13px 12px;gap:9px;border-radius:12px;border-left-width:5px;box-shadow:0 2px 10px rgba(15,23,42,.06)}
.np-router-card-item:hover{transform:none;box-shadow:0 6px 16px rgba(15,23,42,.1)}
.np-router-card-head .fw-semibold{font-size:.95rem;font-weight:800!important;color:#0f172a}
.np-router-card-head .small{font-size:.74rem}
.np-router-card-meta{gap:0;font-size:.78rem;background:#f8fafc;border:1px solid #eef1f4;border-radius:9px;padding:2px 10px}
.np-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px dashed #e5e9ef}
.np-row:last-child{border-bottom:0}
.np-lbl{flex:0 0 84px;font-size:.64rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b}
.np-val{flex:1;text-align:right;color:#1e293b;font-weight:600;min-width:0;overflow-wrap:anywhere;line-height:1.3}
.np-ok-text{color:#15803d;font-weight:800}.np-warn-text{color:#b45309;font-weight:800}
.np-inline-link{font-weight:700;color:var(--np-accent,#6d28d9);white-space:nowrap}
.np-act-title{font-size:.64rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#64748b;margin:1px 0 -3px}
.np-act-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.np-act-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.np-act-grid form{margin:0;display:contents}
.np-act{display:flex;align-items:center;justify-content:center;text-align:center;min-height:36px;padding:6px 7px;border-radius:9px;border:1.5px solid #dbe1e8;background:#fff;color:#1e293b;font-size:.74rem;font-weight:800;line-height:1.2;text-decoration:none;cursor:pointer;transition:border-color .12s ease,background .12s ease;width:100%}
.np-act:hover{border-color:var(--np-accent,#6d28d9);color:var(--np-accent,#6d28d9);background:#faf8ff}
.np-act:active{transform:scale(.97)}
.np-act-primary{background:var(--np-accent,#6d28d9);border-color:var(--np-accent,#6d28d9);color:#fff}
.np-act-primary:hover{background:var(--np-accent-dark,#4c1d95);border-color:var(--np-accent-dark,#4c1d95);color:#fff}
.np-act-refresh{background:#ecfdf5;border-color:#6ee7b7;color:#047857}
.np-act-refresh:hover{background:#d1fae5;border-color:#10b981;color:#065f46}
.np-act-warn{background:#fffbeb;border-color:#fcd34d;color:#b45309}
.np-act-warn:hover{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.np-act-danger{background:#fff;border-color:#fca5a5;color:#dc2626}
.np-act-danger:hover{background:#dc2626;border-color:#dc2626;color:#fff}
.np-act-wide{min-height:34px}
.np-act.disabled,.np-act:disabled{opacity:.45;cursor:not-allowed;pointer-events:none}
@media(max-width:576px){
  .np-router-grid{grid-template-columns:1fr;gap:10px;padding:10px 8px 14px}
  .np-router-card-item{padding:11px 10px 10px}
  .np-act{min-height:40px;font-size:.76rem}      /* comfortable thumb target on phones */
  .np-act-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .np-lbl{flex-basis:76px}
}
html[data-ui-theme="dark"] .np-router-card-item{background:#111827;border-color:#1f2937}
html[data-ui-theme="dark"] .np-router-card-head .fw-semibold,html[data-ui-theme="dark"] .np-val{color:#e5e7eb}
html[data-ui-theme="dark"] .np-router-card-meta{background:#0b1220;border-color:#1f2937}
html[data-ui-theme="dark"] .np-row{border-bottom-color:#243041}
html[data-ui-theme="dark"] .np-act{background:#0b1220;border-color:#2b3647;color:#e5e7eb}
@media(max-width:576px){
  .np-router-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .np-router-stats .np-stat-card{padding:9px 10px!important;gap:8px!important}
  .np-router-stats .np-stat-card strong{font-size:1.1rem!important}
  .np-router-stats .np-stat-card span{font-size:.68rem!important}
  .np-router-toolbar{padding:10px 10px 4px!important;gap:8px!important}
  .np-router-toolbar-row,.np-router-toolbar-row form{width:100%}
  .np-router-filter{flex:1;min-width:0}
}

/* ============================================================
   Network & Customer Overview (dashboard) - grouped, richer tiles
   ============================================================ */
.ov-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:22px 0 4px}
.ov-title{font-size:1.05rem;font-weight:800;color:#0f172a;display:flex;align-items:center;gap:8px}
.ov-title i{color:var(--np-accent,#6d28d9)}
.ov-sub{font-size:.8rem;color:#64748b;margin-top:2px}
.ov-legend{font-size:.72rem;font-weight:700;color:#475569;background:#fff;border:1px solid #e7eaf0;border-radius:999px;padding:4px 11px;display:inline-flex;align-items:center;gap:6px}
.ov-group{display:flex;align-items:center;gap:8px;margin:18px 2px 8px;font-size:.7rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#64748b}
.ov-group::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,#dbe1ea,transparent)}
.ov-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ov-tile{--ov-a:#64748b;--ov-b:#94a3b8;--ov-soft:#f1f5f9;
    position:relative;display:flex;align-items:flex-start;gap:13px;min-width:0;overflow:hidden;
    padding:16px 16px 14px;border-radius:16px;color:inherit;text-decoration:none;
    background:linear-gradient(160deg,#fff 55%,var(--ov-soft) 130%);
    border:1px solid #e7eaf0;box-shadow:0 1px 2px rgba(15,23,42,.04),0 8px 20px -16px rgba(15,23,42,.25);
    transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.ov-tile::after{content:"";position:absolute;right:-26px;top:-26px;width:96px;height:96px;border-radius:50%;background:var(--ov-a);opacity:.07;pointer-events:none}
.ov-tile:hover{transform:translateY(-2px);box-shadow:0 14px 28px -18px var(--ov-a);border-color:var(--ov-b);color:inherit}
.ov-icon{width:44px;height:44px;flex:0 0 44px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;color:#fff;
    background:linear-gradient(135deg,color-mix(in srgb,var(--ov-a) 82%,#000),color-mix(in srgb,var(--ov-a) 94%,#000));box-shadow:0 8px 16px -8px var(--ov-a)}
.ov-body{min-width:0;flex:1 1 auto}
.ov-label{font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#64748b;display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ov-value{font-size:1.85rem;font-weight:800;line-height:1.1;color:#0f172a;letter-spacing:-.02em;margin-top:3px}
.ov-meta{font-size:.72rem;color:#94a3b8;margin-top:4px;line-height:1.3}
.ov-bar{height:5px;border-radius:99px;background:rgba(100,116,139,.15);margin-top:8px;overflow:hidden}
.ov-bar span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--ov-b),var(--ov-a));min-width:0}
.ov-go{position:absolute;right:12px;bottom:11px;font-size:.9rem;color:var(--ov-a);opacity:.7}
.ov-hero{background:linear-gradient(135deg,#12863d,#0b8177);border-color:transparent;box-shadow:0 14px 28px -16px rgba(13,148,136,.7)}
.ov-hero::after{background:#fff;opacity:.12}
.ov-hero .ov-icon{background:rgba(255,255,255,.2);box-shadow:none}
.ov-hero .ov-label,.ov-hero .ov-meta{color:rgba(255,255,255,.85)}
.ov-hero .ov-value{color:#fff}
.ov-hero:hover{border-color:transparent}
.ov-tile.is-alert{border-color:var(--ov-b);box-shadow:0 0 0 3px color-mix(in srgb,var(--ov-a) 14%,transparent),0 10px 22px -14px var(--ov-a)}
.ov-tile.is-alert .ov-value{color:var(--ov-a)}
.ov-blue  {--ov-a:#2563eb;--ov-b:#60a5fa;--ov-soft:#eff6ff}
.ov-green {--ov-a:#15803d;--ov-b:#4ade80;--ov-soft:#ecfdf3}
.ov-teal  {--ov-a:#0f766e;--ov-b:#2dd4bf;--ov-soft:#f0fdfa}
.ov-violet{--ov-a:#6d28d9;--ov-b:#a78bfa;--ov-soft:#f5f3ff}
.ov-amber {--ov-a:#b45309;--ov-b:#fbbf24;--ov-soft:#fffbeb}
.ov-red   {--ov-a:#dc2626;--ov-b:#f87171;--ov-soft:#fef2f2}
.ov-slate {--ov-a:#475569;--ov-b:#94a3b8;--ov-soft:#f1f5f9}
.ov-cyan  {--ov-a:#0891b2;--ov-b:#22d3ee;--ov-soft:#ecfeff}
html[data-ui-theme="dark"] .ov-title,html[data-ui-theme="dark"] .ov-value{color:#f1f5f9}
html[data-ui-theme="dark"] .ov-sub,html[data-ui-theme="dark"] .ov-label,html[data-ui-theme="dark"] .ov-group{color:#94a3b8}
html[data-ui-theme="dark"] .ov-legend{background:#1e293b;border-color:#334155;color:#cbd5e1}
html[data-ui-theme="dark"] .ov-tile{background:linear-gradient(160deg,#1e293b 55%,#0f172a 130%);border-color:#334155}
html[data-ui-theme="dark"] .ov-hero{background:linear-gradient(135deg,#15803d,#0f766e)}
html[data-ui-theme="dark"] .ov-hero .ov-value{color:#fff}
@media(max-width:1100px){.ov-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.ov-grid{grid-template-columns:1fr}.ov-value{font-size:1.6rem}}


/* ============================================================
   Overview - calm pass (2026-10-08): one accent colour, flat tiles.
   Colour is reserved for meaning: green = live, amber/red = needs attention.
   ============================================================ */
.ov-tile,.ov-blue,.ov-green,.ov-teal,.ov-violet,.ov-slate,.ov-cyan{--ov-a:var(--np-accent,#4f46e5);--ov-b:var(--np-accent,#4f46e5);--ov-soft:#f5f6fa}
.ov-amber{--ov-a:#b45309;--ov-b:#f59e0b}
.ov-red{--ov-a:#dc2626;--ov-b:#f87171}
.ov-amber:not(.is-alert),.ov-red:not(.is-alert){--ov-a:var(--np-accent,#4f46e5);--ov-b:var(--np-accent,#4f46e5)}
.ov-tile{background:#fff;box-shadow:none;border:1px solid #e7eaf0;border-radius:14px;padding:16px;gap:14px}
.ov-tile::after{display:none}
.ov-tile:hover{transform:none;box-shadow:0 6px 18px -14px rgba(15,23,42,.35);border-color:#cfd5e1}
.ov-icon{width:38px;height:38px;flex:0 0 38px;border-radius:10px;font-size:1.05rem;background:var(--ov-soft);color:var(--ov-a);box-shadow:none}
.ov-tile.is-alert .ov-icon{background:color-mix(in srgb,var(--ov-a) 12%,#fff);color:var(--ov-a)}
.ov-bar{height:4px;background:#eef0f5}
.ov-bar span{background:var(--ov-a)}
.ov-label{color:#64748b;font-weight:700}
.ov-meta{color:#8a94a6}
.ov-tile.is-alert{box-shadow:none;border-color:var(--ov-b)}
.ov-hero{background:#0f766e;border-color:#0f766e;box-shadow:none}
.ov-hero .ov-icon{background:rgba(255,255,255,.16);color:#fff}
.ov-hero:hover{border-color:#0f766e;box-shadow:none}
.ov-group{color:#475569}
.ov-group i{display:none}
.ov-title i{color:#64748b}
html[data-ui-theme="dark"] .ov-tile{background:#1e293b;border-color:#334155}
html[data-ui-theme="dark"] .ov-tile,html[data-ui-theme="dark"] .ov-blue,html[data-ui-theme="dark"] .ov-green,html[data-ui-theme="dark"] .ov-teal,html[data-ui-theme="dark"] .ov-violet,html[data-ui-theme="dark"] .ov-slate,html[data-ui-theme="dark"] .ov-cyan{--ov-soft:#273449}
html[data-ui-theme="dark"] .ov-bar{background:#334155}
html[data-ui-theme="dark"] .ov-hero{background:#0f766e;border-color:#0f766e}
html[data-ui-theme="dark"] .ov-group{color:#94a3b8}

/* ============================================================
   Stat cards: fit on phones and desktops (2026-10-28)
   Fixes clipped values such as "KES 452.00" and cut-off labels ("TOTAL ...") on every page that uses .np-stat-card.
   The number scales to the card width; on phones, cards in a 2-column grid stack icon / label / value.
   ============================================================ */
.np-stat-card>div:last-child{flex:1 1 0;min-width:0;container-type:inline-size}
.np-stat-card strong{font-size:clamp(1.05rem,12cqw,1.55rem);overflow-wrap:anywhere;word-break:break-word}
@media(max-width:576px){
  .row>[class*="col"]>.np-stat-card,.row>.np-stat-card{flex-direction:column;align-items:flex-start;gap:8px;padding:12px 12px 12px 14px;height:100%}
  .row>[class*="col"]>.np-stat-card .np-stat-icon{width:34px;height:34px;flex-basis:34px;font-size:1rem;border-radius:10px}
  .row>[class*="col"]>.np-stat-card>div:last-child{width:100%;flex:0 0 auto}
  .np-stat-card span{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;font-size:.64rem}
  .np-stat-card strong{font-size:clamp(1.05rem,9cqw,1.35rem)}
}
@media(max-width:340px){.row>[class*="col-6"]{flex:0 0 100%;max-width:100%}}
.np-kpi .value,.np-kpi .label,.np-kpi .meta{overflow-wrap:anywhere;min-width:0}
@media(max-width:576px){.np-kpi .value{font-size:1.25rem}}

/* Online / offline status: green = online, red = offline, grey = unknown */
.sl-status{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:99px;font-size:.72rem;font-weight:800;letter-spacing:.02em;border:1px solid transparent;white-space:nowrap}
.sl-status .sl-dot{width:8px;height:8px;border-radius:50%;background:currentColor;flex:0 0 auto}
.sl-status-online{color:#15803d;background:#dcfce7;border-color:#86efac}
.sl-status-offline{color:#b91c1c;background:#fee2e2;border-color:#fca5a5}
.sl-status-unknown{color:#64748b;background:#f1f5f9;border-color:#e2e8f0}
.sl-status-online .sl-dot{box-shadow:0 0 0 0 rgba(22,163,74,.55);animation:slPulse 2s infinite}
@keyframes slPulse{70%{box-shadow:0 0 0 6px rgba(22,163,74,0)}100%{box-shadow:0 0 0 0 rgba(22,163,74,0)}}
tr.sl-row-online>td:first-child{box-shadow:inset 3px 0 0 #16a34a}
tr.sl-row-offline>td:first-child{box-shadow:inset 3px 0 0 #dc2626}
.sl-ring-online{box-shadow:0 0 0 2px #fff,0 0 0 4px #16a34a !important}
.sl-ring-offline{box-shadow:0 0 0 2px #fff,0 0 0 4px #dc2626 !important}

/* SPEEDLINK global guard (v1.1.3): elite.css moves every switch/checkbox left (margin-left:-3.1em / -1.7em) assuming a label with
   left padding. Wherever a page removes that padding (p-0, ps-0) or lays the box out with flex, the control was pushed outside its
   container and clipped. These rules keep the control inside, everywhere in the app. */
html body .form-switch.p-0 .form-check-input,
html body .form-switch.ps-0 .form-check-input,
html body .form-check.p-0 .form-check-input,
html body .form-check.ps-0 .form-check-input,
html body .form-check.d-flex .form-check-input,
html body .form-check.d-inline-flex .form-check-input{margin-left:0;float:none;flex:0 0 auto}
html body .form-switch.p-0 .form-check-input,
html body .form-switch.ps-0 .form-check-input{margin-top:0;display:block}
