*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:#f4f6f9;color:#17202a}.sidebar{position:fixed;overflow-y:auto;overflow-x:hidden;inset:0 auto 0 0;width:220px;background:#18212f;color:#fff;padding:22px 14px;display:flex;flex-direction:column}.brand{font-weight:800;font-size:18px;padding:5px 10px 25px}.brand small{font-size:11px;opacity:.65}.sidebar nav{display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:0;padding-bottom:10px}.sidebar nav::-webkit-scrollbar{width:6px}.sidebar nav::-webkit-scrollbar-thumb{background:#475569;border-radius:8px}.stat-link{display:flex;color:inherit;text-decoration:none;align-items:flex-start}.stat-link:hover{transform:translateY(-1px)}.stat-link small{display:block;color:#64748b;margin-top:4px}.sidebar a{color:#cbd5e1;text-decoration:none;padding:11px 12px;border-radius:8px}.sidebar a:hover,.sidebar a.active{background:#2b394d;color:#fff}.logout{margin-top:auto}.main{margin-left:220px;padding:28px;max-width:1500px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}h1{margin:0;font-size:28px}h2{margin-top:0}.muted{color:#718096;margin:4px 0}.cards{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:15px}.card,.panel{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:20px;box-shadow:0 2px 7px #00000008}.card span{display:block;color:#718096;font-size:13px}.card b{display:block;font-size:24px;margin-top:8px}.toolbar{display:flex;justify-content:flex-end;margin-bottom:12px}button{border:0;background:#2563eb;color:#fff;padding:10px 15px;border-radius:8px;cursor:pointer;font-weight:600}button.small{padding:6px 9px;font-size:12px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:12px;border-bottom:1px solid #edf0f3;font-size:14px}th{background:#f8fafc;color:#64748b}.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:11px}.text-bg-success{background:#dcfce7;color:#166534}.text-bg-warning{background:#fef3c7;color:#92400e}.text-bg-danger{background:#fee2e2;color:#991b1b}.text-bg-secondary{background:#e2e8f0;color:#475569}.modal{display:none;position:fixed;z-index:5;inset:0;background:#0008;align-items:center;justify-content:center;padding:20px}.modalbox{background:#fff;border-radius:14px;width:min(620px,100%);max-height:90vh;overflow:auto;padding:25px;position:relative}.close{position:absolute;right:18px;top:12px;font-size:27px;cursor:pointer;color:#64748b}label{display:block;font-weight:600;font-size:13px;margin:11px 0}input,select,textarea{width:100%;margin-top:6px;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}textarea{min-height:75px;resize:vertical}.login{display:grid;place-items:center;min-height:100vh;background:#eef2f7}.loginbox{background:#fff;padding:30px;border-radius:15px;width:min(390px,92%);box-shadow:0 10px 30px #0002}.loginbox h1{font-size:24px}.loginbox button{width:100%;margin-top:10px}.loginbox small{display:block;margin-top:14px;color:#64748b}.alert{background:#fee2e2;color:#991b1b;padding:10px;border-radius:8px}@media(max-width:800px){.sidebar{position:static;width:auto;height:auto}.sidebar nav{flex-direction:row;overflow:auto}.logout{display:none}.main{margin:0;padding:16px}.cards{grid-template-columns:repeat(2,1fr)}.cards .card:last-child{grid-column:1/-1}}\nbutton.secondary{background:#64748b}button.danger{background:#dc2626}
.searchbar{justify-content:space-between;gap:12px;align-items:center}.searchbar form{display:flex;gap:8px;flex:1;max-width:820px}.searchbar input{margin:0}.clear{padding:10px 12px;text-decoration:none;color:#475569;background:#e2e8f0;border-radius:8px}.resultinfo{padding:0 0 12px;color:#64748b;font-size:13px}.actions{white-space:nowrap}.alert-success{background:#dcfce7;color:#166534;margin-bottom:14px}.alert-error{background:#fee2e2;color:#991b1b;margin-bottom:14px}.alert.info{background:#eff6ff;color:#1e40af}.syncbox{margin-bottom:12px}.settings-panel{max-width:760px;margin-bottom:18px}code{background:#f1f5f9;padding:3px 6px;border-radius:5px}.check{display:flex;align-items:center;gap:8px}.check input{width:auto;margin:0}@media(max-width:800px){.searchbar{flex-direction:column;align-items:stretch}.searchbar form{max-width:none}.toolbar{gap:8px;flex-wrap:wrap}}
/* V3.3 status menus */
.sidebar nav a{line-height:1.2}

/* V3.4 icon enhancement */
.ui-icon{width:20px;height:20px;display:inline-block;flex:0 0 20px;vertical-align:middle}
.sidebar nav a{display:flex;align-items:center;gap:12px}
.sidebar nav a .ui-icon{opacity:.88}
.sidebar nav a.active .ui-icon{opacity:1}
.stat-card{display:flex;align-items:center;gap:14px;min-height:104px}
.stat-icon{width:46px;height:46px;border-radius:12px;background:#eff6ff;color:#2563eb;display:grid;place-items:center;flex:0 0 46px}
.stat-icon .ui-icon{width:24px;height:24px}
.stat-card span{margin:0}.stat-card b{margin-top:5px}
@media(max-width:800px){.sidebar nav a{padding:9px 10px;white-space:nowrap}.sidebar nav a .ui-icon{width:18px;height:18px}.stat-card{min-height:92px;padding:14px}.stat-icon{width:40px;height:40px;flex-basis:40px}}


/* V3.6 responsive table/layout fix
   Tabel memiliki scroll horizontal sendiri agar halaman utama tidak melebar.
*/
html,body{max-width:100%;overflow-x:hidden}
.main{width:calc(100% - 220px);max-width:none;min-width:0;margin-left:220px;padding:28px}
.panel.tablewrap{width:100%;max-width:100%;min-width:0;overflow:visible}
.table-scroll{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:auto;scrollbar-color:#94a3b8 #e2e8f0;border:1px solid #eef2f7;border-radius:9px}
.table-scroll::-webkit-scrollbar{height:12px}
.table-scroll::-webkit-scrollbar-track{background:#e2e8f0;border-radius:8px}
.table-scroll::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:8px;border:2px solid #e2e8f0}
.table-scroll table{width:max-content!important;min-width:1100px!important;border-collapse:separate;border-spacing:0}
.table-scroll th,.table-scroll td{white-space:nowrap;padding:12px 14px}
.table-scroll th:nth-child(2),.table-scroll td:nth-child(2){white-space:normal;min-width:170px}
.table-scroll th:last-child,.table-scroll td:last-child{position:sticky;right:0;z-index:4;background:#fff;box-shadow:-6px 0 10px rgba(0,0,0,.08)}
.table-scroll th:last-child{background:#f8fafc;z-index:5}
.table-scroll .actions{min-width:185px;white-space:nowrap}
.table-scroll .actions button{margin:2px}
.table-scroll::after{content:"Geser ke kanan untuk melihat tombol Aksi";display:block;position:sticky;left:0;width:max-content;padding:5px 8px;color:#64748b;font-size:11px;background:#f8fafc}
@media(max-width:800px){
 .main{width:100%;margin-left:0;padding:16px}
 .panel.tablewrap{overflow:visible}
 .table-scroll{overflow-x:auto}
 .table-scroll table{min-width:1100px!important}
 .table-scroll th:last-child,.table-scroll td:last-child{position:sticky;right:0}
 .table-scroll .actions{min-width:175px}
}

/* V3.9 - native top scrollbar, synced with the table scrollbar */
.main{padding:22px}
.panel.tablewrap{padding:14px}
.table-scroll-top{
    display:block;
    width:100%;
    height:16px;
    margin:0 0 7px 0;
    overflow-x:auto;
    overflow-y:hidden;
    border:1px solid #cbd5e1;
    border-radius:7px;
    background:#e2e8f0;
    cursor:default;
    -webkit-overflow-scrolling:touch;
}
.table-scroll-top>div{
    height:1px;
    min-width:100%;
}
.table-scroll-top::-webkit-scrollbar{height:12px}
.table-scroll-top::-webkit-scrollbar-track{background:#e2e8f0;border-radius:6px}
.table-scroll-top::-webkit-scrollbar-thumb{background:#64748b;border-radius:6px;border:2px solid #e2e8f0}
.table-scroll-top{scrollbar-width:auto;scrollbar-color:#64748b #e2e8f0}
.table-scroll{border:1px solid #eef2f7;border-radius:8px}
.table-scroll table{min-width:960px!important}
.table-scroll th,.table-scroll td{padding:8px 10px;font-size:13px}
.table-scroll th:nth-child(2),.table-scroll td:nth-child(2){min-width:145px}
.table-scroll .actions{min-width:170px}
.table-scroll .actions button{margin:1px}
.table-scroll::-webkit-scrollbar{height:10px}
.table-scroll::-webkit-scrollbar-track{background:#e2e8f0;border-radius:6px}
.table-scroll::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:6px;border:2px solid #e2e8f0}
@media(max-width:800px){
 .main{padding:12px}
 .panel.tablewrap{padding:10px}
 .table-scroll table{min-width:900px!important}
 .table-scroll th,.table-scroll td{padding:7px 9px;font-size:12.5px}
 .table-scroll-top{height:15px;margin-bottom:6px}
}


/* Sidebar scroll fix: menu remains reachable on short/small-height screens. */
html, body { min-height: 100%; }
body { overflow: hidden; }
.sidebar {
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.sidebar nav {
  min-height: 0;
}
.main {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* V4.4 - compact customer actions */
.customer-action-select{
  width:118px;
  min-width:118px;
  margin:0;
  padding:7px 8px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  font:inherit;
  font-size:13px;
  cursor:pointer;
}
.customer-name-link{
  color:#172033;
  text-decoration:none;
  cursor:pointer;
}
.customer-name-link:hover{
  color:#2563eb;
  text-decoration:underline;
}
.table-scroll .actions{min-width:135px!important}

/* V4.13 compact customer action icons */
.customer-actions{white-space:nowrap;text-align:center}
.icon-action{
  width:32px;height:32px;padding:0;margin:0 2px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #dbe2ea;border-radius:7px;
  background:#fff;color:#334155;cursor:pointer;
  vertical-align:middle;box-sizing:border-box;
}
.icon-action:hover{background:#f1f5f9}
.icon-action.warning{color:#b45309}
.icon-action.success{color:#15803d}
.icon-action.danger{color:#b91c1c}
.icon-action .ico{font-size:17px;font-weight:600;line-height:1}
.icon-action .ico.info{
  width:18px;height:18px;border:2px solid currentColor;border-radius:50%;
  font-family:Arial,sans-serif;font-size:12px;display:inline-flex;
  align-items:center;justify-content:center;box-sizing:border-box;
}
.pppoe-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 16px}.pppoe-status-grid>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:12px}.pppoe-status-grid .detail-label{display:block;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:5px}.pppoe-status-grid b{display:block;font-size:14px;word-break:break-word}.pppoe-status-grid .last-logout-card{background:#fff7ed;border:2px solid #f59e0b;min-height:74px}.pppoe-status-grid .last-logout-card b{font-size:15px;color:#9a3412}.pppoe-status-grid .last-logout-card small{display:block;color:#78716c;margin-top:4px;font-size:11px}@media(max-width:520px){.pppoe-status-grid{grid-template-columns:1fr}}
/* Area client count link */
.area-client-count{font-weight:700;text-decoration:none;white-space:nowrap}
.area-client-count:hover{text-decoration:underline}

/* Action icons: SVG agar konsisten dan tidak berubah menjadi karakter Unicode */
.icon-action .action-svg{width:17px;height:17px;display:block}
.icon-action.info{color:#2563eb}
.icon-action.edit{color:#16a34a}
.icon-action.danger{color:#dc2626;background:#fff;border-color:#fca5a5}
.icon-action.danger:hover{background:#fef2f2}

.customer-header-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.customer-status-tabs{display:flex;gap:8px;flex-wrap:wrap}.customer-status-tab{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #dbe2ea;border-radius:9px;background:#fff;color:#475569;text-decoration:none;font-weight:700;font-size:13px}.customer-status-tab span{padding:2px 7px;border-radius:999px;background:#e2e8f0;font-size:11px}.customer-status-tab.online.active,.customer-status-tab.online:hover{background:#ecfdf5;border-color:#86efac;color:#166534}.customer-status-tab.online.active span{background:#bbf7d0;color:#166534}.customer-status-tab.offline.active,.customer-status-tab.offline:hover{background:#fff7ed;border-color:#fdba74;color:#9a3412}.customer-status-tab.offline.active span{background:#fed7aa;color:#9a3412}@media(max-width:800px){.customer-header-tabs{width:100%}.customer-status-tab{flex:1;justify-content:center}}
.customer-name-with-health{display:flex;align-items:center;gap:8px;min-width:0}.connection-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 10px;border:1px solid rgba(0,0,0,.08)}.connection-dot.green{background:#22c55e}.connection-dot.yellow{background:#eab308}.connection-dot.red{background:#ef4444}.connection-history{font-size:13px}.connection-summary{background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;padding:9px 10px;margin-bottom:8px}.connection-history-list{max-height:260px;overflow:auto;border:1px solid #e5e7eb;border-radius:8px}.connection-history-row{display:grid;grid-template-columns:72px 1fr 1fr;gap:8px;padding:8px 10px;border-bottom:1px solid #eef2f7;align-items:center}.connection-history-row:last-child{border-bottom:0}.history-badge{font-size:10px;font-weight:800;padding:3px 6px;border-radius:999px;text-align:center}.connection-history-row.offline .history-badge{background:#fee2e2;color:#b91c1c}.connection-history-row.online .history-badge{background:#dcfce7;color:#15803d}@media(max-width:520px){.connection-history-row{grid-template-columns:70px 1fr}.connection-history-row span:last-child{grid-column:2}}

.optical-grid{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:10px;margin-top:10px}.optical-grid>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:9px;padding:10px}.optical-grid b{display:block;margin-top:4px}.optical-result{min-height:40px}@media(max-width:700px){.optical-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}}
/* Smart Billing NMS / multi-management */
.brand{display:flex!important;flex-direction:column;align-items:flex-start;gap:3px}
.brand .brand-mark{display:block;width:38px;height:38px;margin-bottom:3px;color:#60a5fa}
.brand .brand-mark svg{width:100%;height:100%;display:block}
.brand>span:not(.brand-mark){font-size:17px;font-weight:800;letter-spacing:.2px;color:#fff;line-height:1.15}
.brand small{display:block;color:#a8b3c5!important;font-size:11px!important;font-weight:600;margin-top:2px}
.subnet-switch{display:inline-block;margin-top:7px;font-size:12px;color:#2563eb;text-decoration:none;font-weight:700}
.subnet-switch:hover{text-decoration:underline}
.subnet-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:18px}
.subnet-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;box-shadow:0 4px 14px rgba(15,23,42,.05);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.subnet-card:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(15,23,42,.09);border-color:#bfdbfe}
.subnet-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.subnet-card-head>div:first-child{display:flex;align-items:center;gap:11px}
.subnet-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eff6ff;color:#2563eb;font-size:26px;font-weight:700}
.subnet-card h3{margin:0;font-size:18px}.subnet-card small{color:#64748b;font-weight:700;letter-spacing:.05em}
.subnet-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}
.subnet-stats>div{background:#f8fafc;border:1px solid #edf0f4;border-radius:10px;padding:10px;text-align:center}
.subnet-stats b{display:block;font-size:19px;color:#172033}.subnet-stats span{font-size:11px;color:#64748b}
.subnet-open{width:100%;display:flex;justify-content:space-between;align-items:center;padding:11px 13px;border:1px solid #bfdbfe;border-radius:9px;background:#eff6ff;color:#1d4ed8;font-weight:800;cursor:pointer}
.subnet-open:hover{background:#dbeafe}
@media(max-width:600px){.subnet-grid{grid-template-columns:1fr}.subnet-card{padding:15px}}

/* Realtime MikroTik traffic dashboard */
.traffic-monitor{margin-top:18px;overflow:hidden}.traffic-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:10px}.traffic-head h2{margin:0 0 4px}.traffic-controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.traffic-controls label{font-size:12px;font-weight:700;color:#475569;display:flex;flex-direction:column;gap:5px}.traffic-controls select{min-width:180px;padding:9px 34px 9px 10px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#172033;font:inherit;font-size:13px}.traffic-status{display:flex;align-items:center;gap:8px;font-size:12px;color:#64748b;margin:8px 0 12px}.traffic-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8;display:inline-block}.traffic-dot.live{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.12)}.traffic-dot.error{background:#ef4444}.traffic-updated{margin-left:auto}.traffic-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.traffic-metric{border:1px solid #e5e7eb;border-radius:10px;background:#f8fafc;padding:12px 14px;min-width:0}.traffic-metric span{display:block;font-size:11px;color:#64748b;font-weight:700;margin-bottom:5px}.traffic-metric b{display:block;font-size:22px;line-height:1.15;color:#172033;white-space:nowrap}.traffic-metric small{display:block;margin-top:5px;color:#94a3b8;font-size:10px}.traffic-chart-wrap{position:relative;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:10px 10px 5px 58px}.traffic-chart-wrap svg{width:100%;height:300px;display:block}.traffic-y-axis{position:absolute;left:8px;top:10px;bottom:27px;width:43px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;color:#94a3b8;font-size:10px;line-height:1;pointer-events:none}.traffic-grid line{stroke:#e2e8f0;stroke-width:1}.traffic-area{opacity:.12}.traffic-area.rx{fill:#2563eb}.traffic-area.tx{fill:#ec4899}.traffic-line{fill:none;stroke-width:3;vector-effect:non-scaling-stroke}.traffic-line.rx{stroke:#2563eb}.traffic-line.tx{stroke:#ec4899}.traffic-axis{display:flex;justify-content:space-between;color:#94a3b8;font-size:10px;padding:2px 2px 0}.traffic-legend{display:flex;gap:18px;margin-top:9px;font-size:11px;color:#64748b}.traffic-legend span{display:flex;align-items:center;gap:6px}.traffic-legend i{width:18px;height:3px;border-radius:3px;display:inline-block}.traffic-legend i.rx{background:#2563eb}.traffic-legend i.tx{background:#ec4899}@media(max-width:900px){.traffic-head{flex-direction:column}.traffic-controls{justify-content:flex-start;width:100%}.traffic-controls label{flex:1}.traffic-controls select{width:100%}.traffic-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.traffic-chart-wrap{padding-left:48px}.traffic-y-axis{width:36px;font-size:9px}.traffic-metrics{grid-template-columns:1fr 1fr}.traffic-metric b{font-size:17px}.traffic-chart-wrap svg{height:220px}.traffic-updated{display:none}}

.ip-ping-wrap{display:flex;align-items:center;gap:7px;min-width:150px}.ip-ping-wrap .realtime-ip{min-width:92px}.ping-inline{padding:5px 8px;font-size:11px;background:#0f766e}.ping-inline:hover{background:#115e59}.ping-modal-box{width:min(560px,100%)}.ping-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:15px 0}.ping-summary>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:11px}.ping-summary span{display:block;color:#64748b;font-size:11px}.ping-summary b{display:block;font-size:16px;margin-top:4px}.ping-replies{margin-top:12px;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden}.ping-reply{display:flex;justify-content:space-between;padding:9px 12px;border-bottom:1px solid #edf0f3;font-size:13px}.ping-reply:last-child{border-bottom:0}.ping-ok{color:#166534}.ping-loss{color:#991b1b}.customer-traffic-box{margin:14px 0 16px;padding:14px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px}.customer-traffic-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.customer-traffic-head h3{margin:0}.customer-traffic-status{font-size:12px;color:#64748b}.customer-traffic-status.live{color:#15803d}.customer-traffic-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}.customer-traffic-metrics>div{background:#fff;border:1px solid #e5e7eb;border-radius:9px;padding:9px}.customer-traffic-metrics span{display:block;color:#64748b;font-size:10px}.customer-traffic-metrics b{display:block;font-size:14px;margin-top:4px}.customer-traffic-chart{height:180px;background:#fff;border:1px solid #e5e7eb;border-radius:9px;overflow:hidden}.customer-traffic-chart svg{width:100%;height:100%;display:block}.customer-traffic-grid line{stroke:#e2e8f0;stroke-width:1}.customer-traffic-axis{display:flex;justify-content:space-between;color:#94a3b8;font-size:10px;margin-top:5px}@media(max-width:520px){.ping-summary,.customer-traffic-metrics{grid-template-columns:repeat(2,1fr)}.ip-ping-wrap{min-width:130px}.ping-inline{padding:4px 6px}}
.detail-ip-row{display:flex;align-items:center;gap:7px}.detail-ip-row b{flex:1;min-width:0}

.ping-inline .action-svg{width:16px;height:16px;display:block}.ping-live-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.ping-live-dot{font-size:10px;font-weight:800;color:#15803d;background:#dcfce7;border-radius:999px;padding:5px 8px}.ping-reply.ping-loss{color:#991b1b;background:#fff7f7}.ping-reply.ping-ok{color:#166534}

/* V7: ping is an icon-only transmitter button; no colored background. */
.icon-action.ping-action{background:transparent!important;border:1px solid transparent!important;color:#0f766e!important;padding:7px!important;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;cursor:pointer}.icon-action.ping-action:hover{background:#ecfdf5!important;border-color:#99f6e4!important}.icon-action.ping-action .action-svg{width:21px;height:21px;display:block}.ping-inline{background:transparent!important;border:1px solid #dbe3ec!important;color:#0f766e!important}.ping-inline:hover{background:#ecfdf5!important;border-color:#99f6e4!important}

/* Dedicated customer ping */
.ping-choice-box{width:min(620px,100%)}
.ping-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.ping-choice-card{background:#f8fafc;color:#172033;border:1px solid #dbe3ec;text-align:left;padding:18px;border-radius:12px;display:flex;flex-direction:column;gap:7px}
.ping-choice-card:hover{background:#eff6ff;border-color:#93c5fd}
.ping-choice-card.billing:hover{background:#ecfdf5;border-color:#99f6e4}
.ping-choice-card b{font-size:15px}.ping-choice-card span{font-size:12px;color:#64748b;font-weight:400}
@media(max-width:600px){.ping-choice-grid{grid-template-columns:1fr}}
.ping-page{max-width:980px;margin:0 auto;padding:28px}.ping-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.ping-page-head h1{margin:0}.ping-page-actions{display:flex;gap:8px;flex-wrap:wrap}.ping-page-panel{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:20px;box-shadow:0 2px 7px #00000008}.ping-page-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.ping-page-summary>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:12px}.ping-page-summary span{display:block;color:#64748b;font-size:11px}.ping-page-summary b{display:block;font-size:18px;margin-top:5px}.ping-page-replies{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-top:14px}.ping-page-reply{display:flex;justify-content:space-between;padding:10px 13px;border-bottom:1px solid #edf0f3}.ping-page-reply:last-child{border-bottom:0}.ping-page-reply.ok{color:#166534}.ping-page-reply.loss{color:#991b1b;background:#fff7f7}.ping-live-status{padding:11px 13px;border-radius:9px;background:#eff6ff;color:#1d4ed8}.ping-live-status.live{background:#f0fdf4;color:#166534}.ping-stop{background:#dc2626}.ping-stop:hover{background:#b91c1c}.ping-live-badge{display:inline-block;font-size:11px;font-weight:800;color:#15803d;background:#dcfce7;border-radius:999px;padding:5px 9px}.ping-page-note{font-size:12px;color:#64748b;margin-top:14px}.ping-page-error{background:#fee2e2;color:#991b1b;padding:11px;border-radius:9px}.ping-back{display:inline-block;text-decoration:none;color:#2563eb;margin-bottom:12px;font-weight:700}@media(max-width:600px){.ping-page{padding:16px}.ping-page-head{flex-direction:column}.ping-page-summary{grid-template-columns:1fr 1fr}}

/* === MOBILE RESPONSIVE PATCH v1 === */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  body { font-size: 14px; }
  .container, .container-fluid, .main-content, .content, main { max-width: 100%; }
  .sidebar { width: 100%; min-width: 0; height: auto; position: relative; overflow-x: auto; }
  .sidebar ul, .sidebar .nav, .sidebar nav { display: flex; flex-wrap: nowrap; width: max-content; min-width: 100%; }
  .sidebar li { flex: 0 0 auto; }
  .sidebar a { white-space: nowrap; padding: 10px 12px; }
  .main-content, .content-wrapper { margin-left: 0 !important; width: 100% !important; padding: 12px !important; }
  .header, .topbar { flex-wrap: wrap; gap: 8px; }
  .cards, .stats, .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .card { min-width: 0; }
  input, select, textarea, button, .btn { min-height: 40px; }
  .form-row, .row { gap: 8px; }
  .table-responsive, .table-wrap, .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 650px; }
  .modal-content, .modal-dialog { width: calc(100% - 20px) !important; max-width: calc(100% - 20px) !important; margin: 10px auto !important; }
  .modal-body { max-height: 75vh; overflow-y: auto; }
  .actions, .button-group { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 480px) {
  .cards, .stats, .dashboard-cards { grid-template-columns: 1fr !important; }
  .main-content, .content-wrapper { padding: 8px !important; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.2rem; }
  .card { padding: 12px !important; }
  .btn { padding: 9px 10px !important; }
}

/* Remote detail IP: keep address readable and never collapse into vertical characters */
.detail-ip-row{display:block;min-width:0}.detail-ip-row b{display:block!important;min-width:0!important;width:100%;overflow:visible!important;word-break:normal!important;overflow-wrap:normal!important}.detail-ip-row b a{display:inline-block;white-space:nowrap;word-break:normal!important;overflow-wrap:normal!important;font-size:16px;line-height:1.35}.detail-ip-hint{display:block!important;margin-top:6px;white-space:normal!important}

/* === MOBILE MENU WRAP: no horizontal scrolling === */
@media (max-width: 800px) {
  .sidebar { overflow-x: hidden !important; }
  .sidebar nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    gap: 6px !important;
    padding: 0 0 8px !important;
  }
  .sidebar nav a {
    flex: 1 1 150px;
    min-width: 0;
    white-space: normal !important;
    justify-content: flex-start;
    overflow-wrap: anywhere;
  }
  .sidebar .brand { padding-bottom: 14px; }
  .logout { display: block; margin-top: 6px; }
}
@media (max-width: 480px) {
  .sidebar nav a { flex-basis: calc(50% - 3px); padding: 9px 10px; font-size: 12px; gap: 7px; }
  .sidebar nav a .ui-icon { flex: 0 0 17px; width: 17px; height: 17px; }
}


/* === CUSTOMER LIST V4.14: ID menyatu dengan informasi pelanggan, layout HP ringkas === */
.customer-meta{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:5px;color:#64748b;font-size:12px;line-height:1.35}
.customer-meta span+span{border-left:1px solid #dbe2ea;padding-left:10px}
.customer-mobile-status{display:none}
.mobile-more,.customer-more-menu{display:none}
@media(max-width:800px){
  .table-scroll:has(.customer-table){overflow:visible!important;border:0}
  .table-scroll:has(.customer-table)::after{display:none}
  .table-scroll:has(.customer-table)+*{clear:both}
  .table-scroll .customer-table{display:block;width:100%!important;min-width:0!important;border:0}
  .customer-table tr:first-child{display:none}
  .customer-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;border:1px solid #e5e7eb;border-radius:12px;background:#fff;margin:0 0 10px;padding:12px;box-shadow:0 1px 4px #00000008}
  .customer-table td{display:none!important;border:0!important;padding:0!important;min-width:0!important;background:transparent!important;box-shadow:none!important;position:static!important}
  .customer-table td.customer-main-cell,.customer-table td.customer-actions{display:block!important}
  .customer-table .customer-main-cell{grid-column:1;min-width:0}
  .customer-table .customer-actions{grid-column:2;grid-row:1;min-width:0!important;width:auto!important;display:flex!important;align-items:center;gap:5px;white-space:nowrap}
  .customer-table .icon-action{width:36px;height:36px;margin:0}
  .customer-table .customer-actions>.warning,.customer-table .customer-actions>.success,.customer-table .customer-actions>.danger{display:none!important}
  .customer-table .mobile-more{display:inline-flex!important;font-size:22px;line-height:1}
  .customer-table .customer-more-menu{display:none;position:fixed;z-index:1000;min-width:190px;padding:6px;background:#fff;border:1px solid #dbe2ea;border-radius:10px;box-shadow:0 12px 28px rgba(15,23,42,.18)}
  .customer-table .customer-more-menu.open{display:block}
  .customer-table .more-action{display:block;width:100%;padding:10px 12px;margin:0;border:0;border-radius:7px;background:#fff;color:#334155;text-align:left;font-size:13px}
  .customer-table .more-action:hover{background:#f8fafc}
  .customer-table .more-action.warning{color:#b45309}
  .customer-table .more-action.danger{color:#b91c1c}
  .customer-mobile-status{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
  .customer-meta{font-size:12px;gap:3px 8px}
  .customer-meta span+span{padding-left:8px}
  .table-scroll-top:has(+.table-scroll .customer-table){display:none!important}
}
@media(max-width:420px){
  .customer-table tr{padding:10px;gap:7px}
  .customer-table .icon-action{width:34px;height:34px}
  .customer-name-link b{font-size:16px}
  .customer-meta{font-size:11px}
}


/* === CUSTOMER MOBILE V4.15: tampilkan IP realtime di bawah nomor HP === */
.customer-mobile-ip{display:none}
@media(max-width:800px){
  .customer-mobile-ip{display:block;margin-top:6px;color:#64748b;font-size:12px;line-height:1.4;white-space:nowrap}
  .customer-mobile-ip .realtime-ip{font-weight:600}
  .customer-mobile-ip .realtime-ip a{color:#2563eb;text-decoration:none}
  .customer-mobile-ip .realtime-ip a:hover{text-decoration:underline}
}
@media(max-width:420px){
  .customer-mobile-ip{font-size:11px}
}

/* Mobile customer IP + direct Ping link */
.customer-mobile-ip .customer-mobile-ping{display:inline-block;margin-left:8px;color:#0f766e;font-weight:700;text-decoration:none;font-size:12px}
.customer-mobile-ip .customer-mobile-ping:hover{text-decoration:underline}

/* Billing live ping: keep newest replies visible without scrolling the whole page */
.ping-billing-body{height:100vh;overflow:hidden}
.ping-billing-page{height:100vh;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden}
.ping-billing-page .ping-page-panel{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.ping-billing-page .ping-page-replies{flex:1;min-height:120px;overflow-y:auto;overscroll-behavior:contain}
@media(max-width:600px){
  .ping-billing-page{padding:12px}
  .ping-billing-page .ping-page-panel{padding:14px}
  .ping-billing-page .ping-page-replies{margin-top:10px}
}

/* === BILLING PING MOBILE: prioritize 10 visible reply rows === */
@media (max-width: 600px) {
  .ping-billing-page { padding: 10px; }
  .ping-billing-page .ping-back { margin-bottom: 6px; }
  .ping-billing-page .ping-page-head { margin-bottom: 8px; gap: 6px; }
  .ping-billing-page .ping-page-head h1 { font-size: 1.55rem; }
  .ping-billing-page .ping-page-head .muted { margin: 2px 0; font-size: .95rem; }
  .ping-billing-page .ping-page-actions { gap: 7px; }
  .ping-billing-page .ping-page-panel { padding: 12px; }
  .ping-billing-page .ping-page-panel h2 { margin: 0 0 6px; font-size: 1.25rem; }
  .ping-billing-page .ping-page-panel > .muted { margin: 0 0 8px; font-size: .9rem; line-height: 1.35; }
  .ping-billing-page .ping-page-actions button,
  .ping-billing-page .ping-page-actions .clear { min-height: 44px; padding: 9px 12px; }
  .ping-billing-page .ping-live-status { margin-top: 10px !important; padding: 9px 11px; }
  .ping-billing-page .ping-page-summary { gap: 7px; margin: 10px 0; }
  .ping-billing-page .ping-page-summary > div { padding: 8px 10px; }
  .ping-billing-page .ping-page-summary b { font-size: 16px; margin-top: 2px; }
  .ping-billing-page .ping-page-replies { margin-top: 8px; min-height: 0; }
  .ping-billing-page .ping-page-reply { min-height: 36px; padding: 7px 12px; font-size: 13px; align-items: center; }
  .ping-billing-page .ping-page-note { display: none; }
}
