/* WNNET DASHBOARD PREMIUM R1
   Presentation only: existing dashboard data and actions are preserved.
*/

.wnex-dashboard {
  --wnd-red:#df202f;
  --wnd-red-dark:#a80e1b;
  --wnd-blue:#3478e5;
  --wnd-green:#119965;
  --wnd-orange:#ed871d;
  --wnd-purple:#7950d9;
  --wnd-border:#dce4ef;
  --wnd-shadow:0 7px 22px rgba(25,43,69,.075);
  color:#253449!important;
}

/* Dashboard header */
.wnex-dashboard .wnex-dashboard-head {
  position:relative!important;
  align-items:center!important;
  padding:17px 18px!important;
  margin-bottom:14px!important;
  border:1px solid #efd5d8!important;
  border-top:4px solid var(--wnd-red)!important;
  border-radius:15px!important;
  background:linear-gradient(125deg,#fff 0%,#fff8f8 68%,#fff0f1 100%)!important;
  box-shadow:var(--wnd-shadow)!important;
}

.wnex-dashboard .wnex-dashboard-title h1 {
  color:#18263a!important;
  font-size:25px!important;
  font-weight:800!important;
  letter-spacing:-.6px!important;
}

.wnex-dashboard .wnex-dashboard-title p {
  color:#718097!important;
  line-height:1.6!important;
}

.wnex-dashboard .wnex-date-card {
  border:1px solid #f0d0d4!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#fff,#fff5f5)!important;
  box-shadow:0 4px 12px rgba(169,22,39,.06)!important;
  color:#53637a!important;
}

.wnex-dashboard .wnex-date-card > i {
  display:grid!important;
  place-items:center!important;
  width:32px!important;
  height:32px!important;
  border-radius:10px!important;
  background:linear-gradient(140deg,#ed4451,#b81627)!important;
  color:#fff!important;
  box-shadow:0 3px 8px rgba(184,22,39,.18)!important;
}

.wnex-dashboard .wnex-date-card b {
  border-left-color:#f0d9dc!important;
  color:#a91b2a!important;
}

/* Premium statistic cards */
.wnex-dashboard .wnex-kpis {
  gap:12px!important;
  margin-bottom:15px!important;
}

.wnex-dashboard .wnex-kpi {
  position:relative!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  min-height:105px!important;
  padding:13px 12px!important;
  border:1px solid var(--wnd-border)!important;
  border-top:3px solid #64748b!important;
  border-radius:15px!important;
  background:linear-gradient(145deg,#fff 0%,#f8fafc 100%)!important;
  box-shadow:var(--wnd-shadow)!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
}

.wnex-dashboard .wnex-kpi.blue {
  border-color:#d1e0f7!important;
  border-top-color:var(--wnd-blue)!important;
  background:linear-gradient(145deg,#fff 0%,#f1f6ff 100%)!important;
}

.wnex-dashboard .wnex-kpi.green {
  border-color:#ccebdc!important;
  border-top-color:var(--wnd-green)!important;
  background:linear-gradient(145deg,#fff 0%,#effbf5 100%)!important;
}

.wnex-dashboard .wnex-kpi.orange {
  border-color:#f5dfc9!important;
  border-top-color:var(--wnd-orange)!important;
  background:linear-gradient(145deg,#fff 0%,#fff7ed 100%)!important;
}

.wnex-dashboard .wnex-kpi.purple {
  border-color:#e0d7fa!important;
  border-top-color:var(--wnd-purple)!important;
  background:linear-gradient(145deg,#fff 0%,#f6f2ff 100%)!important;
}

.wnex-dashboard .wnex-kpi.red {
  border-color:#f2cfd4!important;
  border-top-color:var(--wnd-red)!important;
  background:linear-gradient(145deg,#fff 0%,#fff2f3 100%)!important;
}

.wnex-dashboard .wnex-kpi.slate {
  border-color:#d7e0eb!important;
  border-top-color:#526980!important;
  background:linear-gradient(145deg,#fff 0%,#f1f5f9 100%)!important;
}

.wnex-dashboard .wnex-kpi:hover {
  transform:translateY(-3px)!important;
  box-shadow:0 12px 25px rgba(25,43,69,.12)!important;
}

.wnex-dashboard .wnex-kpi-icon {
  width:46px!important;
  height:46px!important;
  border:1px solid rgba(255,255,255,.55)!important;
  border-radius:13px!important;
  box-shadow:0 5px 12px rgba(34,55,82,.13)!important;
  color:#fff!important;
}

.wnex-dashboard .wnex-kpi.blue .wnex-kpi-icon {
  background:linear-gradient(140deg,#60a5fa,#245bd2)!important;
}

.wnex-dashboard .wnex-kpi.green .wnex-kpi-icon {
  background:linear-gradient(140deg,#34d399,#078456)!important;
}

.wnex-dashboard .wnex-kpi.orange .wnex-kpi-icon {
  background:linear-gradient(140deg,#ffb454,#d96b10)!important;
}

.wnex-dashboard .wnex-kpi.purple .wnex-kpi-icon {
  background:linear-gradient(140deg,#a78bfa,#6035c5)!important;
}

.wnex-dashboard .wnex-kpi.red .wnex-kpi-icon {
  background:linear-gradient(140deg,#f04452,#bd1525)!important;
}

.wnex-dashboard .wnex-kpi.slate .wnex-kpi-icon {
  background:linear-gradient(140deg,#8496ad,#40556d)!important;
}

.wnex-dashboard .wnex-kpi-label {
  color:#56677f!important;
  font-weight:650!important;
  line-height:1.4!important;
}

.wnex-dashboard .wnex-kpi-value {
  color:#17263b!important;
  font-weight:800!important;
  letter-spacing:-.3px!important;
}

.wnex-dashboard .wnex-kpi-sub {
  color:#8290a2!important;
  line-height:1.4!important;
}

/* Main panels, customer details and tables */
.wnex-dashboard .wnex-panel {
  border:1px solid var(--wnd-border)!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:var(--wnd-shadow)!important;
}

.wnex-dashboard .wnex-panel-head {
  background:linear-gradient(120deg,#fff,#f7f9fd)!important;
  border-bottom:1px solid #e3e9f2!important;
}

.wnex-dashboard .wnex-panel-title > i {
  display:grid!important;
  place-items:center!important;
  flex:0 0 37px!important;
  width:37px!important;
  height:37px!important;
  border:1px solid #f1d0d4!important;
  border-radius:11px!important;
  background:linear-gradient(140deg,#fff0f1,#ffe2e5)!important;
  color:var(--wnd-red)!important;
  font-size:17px!important;
}

.wnex-dashboard .wnex-panel-title h3,
.wnex-dashboard .wnex-detail-head h3 {
  color:#19283d!important;
  font-weight:800!important;
}

.wnex-dashboard .wnex-toolbar-search input,
.wnex-dashboard .wnex-mini-btn {
  border-color:#d9e2ee!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#304258!important;
}

.wnex-dashboard .wnex-mini-btn.primary {
  border-color:var(--wnd-red)!important;
  background:linear-gradient(135deg,#ed303b,#b51120)!important;
  color:#fff!important;
  box-shadow:0 4px 10px rgba(181,17,32,.14)!important;
}

.wnex-dashboard .wnex-table th {
  background:linear-gradient(180deg,#f8fafc,#edf2f8)!important;
  color:#43546a!important;
  border-bottom:1px solid #dce5ef!important;
  font-weight:750!important;
}

.wnex-dashboard .wnex-table td {
  border-bottom:1px solid #edf1f6!important;
}

.wnex-dashboard .wnex-table tbody tr:hover td {
  background:#f5f8ff!important;
}

.wnex-dashboard .wnex-table tbody tr.selected td {
  background:#fff0f1!important;
}

.wnex-dashboard .wnex-check {
  border-color:#c8d4e3!important;
  border-radius:5px!important;
}

.wnex-dashboard .wnex-row-action {
  border:1px solid #f1cbd0!important;
  border-radius:8px!important;
  background:#fff2f3!important;
  color:var(--wnd-red)!important;
}

/* Customer profile card */
.wnex-dashboard .wnex-detail-head {
  background:linear-gradient(120deg,#fff,#fff6f6)!important;
  border-bottom:1px solid #f0dfe1!important;
}

.wnex-dashboard .wnex-detail-head h3 > i {
  color:var(--wnd-red)!important;
}

.wnex-dashboard .wnex-detail-profile {
  border-bottom:1px solid #edf1f6!important;
  background:linear-gradient(145deg,#fff,#f8faff)!important;
}

.wnex-dashboard .wnex-detail-avatar {
  border:2px solid #fff!important;
  background:linear-gradient(140deg,#60a5fa,#245bd2)!important;
  color:#fff!important;
  box-shadow:0 4px 11px rgba(36,91,210,.2)!important;
}

.wnex-dashboard .wnex-detail-name {
  color:#17263b!important;
  font-weight:800!important;
}

.wnex-dashboard .wnex-detail-kv {
  row-gap:8px!important;
  color:#718097!important;
}

.wnex-dashboard .wnex-detail-kv > span:nth-child(even) {
  color:#26384e!important;
  font-weight:600!important;
}

.wnex-dashboard .wnex-detail-actions a {
  min-height:37px!important;
  border-radius:10px!important;
  box-shadow:0 2px 5px rgba(25,43,69,.035)!important;
  transition:transform .15s ease,box-shadow .15s ease!important;
}

.wnex-dashboard .wnex-detail-actions a:hover {
  transform:translateY(-1px)!important;
  box-shadow:0 5px 12px rgba(25,43,69,.09)!important;
}

/* Distribution map, activity and billing */
.wnex-dashboard .wnex-tabs {
  background:linear-gradient(120deg,#fff,#f7f9fd)!important;
  border-bottom:1px solid #e3e9f2!important;
}

.wnex-dashboard .wnex-tabs a.active {
  border-bottom-color:var(--wnd-red)!important;
  color:var(--wnd-red)!important;
  font-weight:800!important;
}

.wnex-dashboard .wnex-map {
  border-top:1px solid #e2e8f0!important;
  background:linear-gradient(135deg,#e9f2fa,#f9fbff 50%,#e5f5ee)!important;
}

.wnex-dashboard .wnex-map-legend {
  border-color:#dce5ef!important;
  border-radius:11px!important;
  box-shadow:0 5px 15px rgba(30,59,88,.12)!important;
}

.wnex-dashboard .wnex-map-link {
  border:1px solid #d8e3f0!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#bd1828!important;
  box-shadow:0 3px 9px rgba(25,43,69,.08)!important;
}

.wnex-dashboard .wnex-activity-head,
.wnex-dashboard .wnex-billing-head {
  background:linear-gradient(120deg,#fff,#f7f9fd)!important;
  border-bottom:1px solid #e3e9f2!important;
  color:#24354b!important;
}

.wnex-dashboard .wnex-activity-head > span > i,
.wnex-dashboard .wnex-billing-head > span > i {
  color:var(--wnd-red)!important;
}

.wnex-dashboard .wnex-activity-list td {
  border-bottom:1px solid #edf1f6!important;
}

.wnex-dashboard .wnex-billing-row {
  border-bottom:1px solid #f0f3f7!important;
}

.wnex-dashboard .wnex-billing-row b {
  color:#1d3047!important;
  font-weight:800!important;
}

.wnex-dashboard .wnex-health-mini {
  display:inline-block!important;
  padding:7px 9px!important;
  border:1px solid #d4ecde!important;
  border-radius:9px!important;
  background:#f0fbf5!important;
}

/* Responsive polish */
@media(max-width:860px) {
  .wnex-dashboard .wnex-dashboard-head {
    padding:13px!important;
    border-radius:13px!important;
  }

  .wnex-dashboard .wnex-kpis {
    gap:9px!important;
  }

  .wnex-dashboard .wnex-kpi {
    min-height:91px!important;
    padding:10px!important;
  }

  .wnex-dashboard .wnex-panel {
    border-radius:13px!important;
  }
}

@media(max-width:520px) {
  .wnex-dashboard .wnex-dashboard-head {
    gap:8px!important;
    padding:12px!important;
    margin-bottom:10px!important;
  }

  .wnex-dashboard .wnex-dashboard-title h1 {
    font-size:21px!important;
    line-height:1.2!important;
  }

  .wnex-dashboard .wnex-dashboard-title p {
    font-size:10px!important;
  }

  /* Dua kartu statistik per baris di layar HP kecil */
  .wnex-dashboard .wnex-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }

  .wnex-dashboard .wnex-kpi {
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:7px!important;
    min-height:86px!important;
    padding:9px 7px!important;
    border-radius:12px!important;
  }

  .wnex-dashboard .wnex-kpi-icon {
    width:34px!important;
    height:34px!important;
    border-radius:10px!important;
    font-size:15px!important;
  }

  .wnex-dashboard .wnex-kpi-label {
    white-space:normal!important;
    font-size:9px!important;
    line-height:1.25!important;
  }

  .wnex-dashboard .wnex-kpi-value {
    font-size:17px!important;
    line-height:1.3!important;
  }

  .wnex-dashboard .wnex-kpi-sub {
    font-size:8px!important;
    line-height:1.3!important;
  }

  .wnex-dashboard .wnex-date-card {
    gap:5px!important;
    padding:5px 7px!important;
    font-size:9px!important;
  }

  .wnex-dashboard .wnex-date-card > i {
    width:27px!important;
    height:27px!important;
    font-size:12px!important;
  }

  .wnex-dashboard .wnex-date-card b {
    padding-left:5px!important;
  }

  .wnex-dashboard .wnex-panel-head {
    gap:7px!important;
    border-radius:12px 12px 0 0!important;
  }

  .wnex-dashboard .wnex-panel-title {
    gap:7px!important;
    min-width:0!important;
  }

  .wnex-dashboard .wnex-panel-title > i {
    flex-basis:31px!important;
    width:31px!important;
    height:31px!important;
    font-size:14px!important;
  }

  .wnex-dashboard .wnex-detail-actions a {
    min-height:35px!important;
    font-size:9px!important;
  }

  .wnex-dashboard .wnex-tabs {
    gap:3px!important;
    padding:0 5px!important;
  }

  .wnex-dashboard .wnex-tabs a {
    justify-content:center!important;
    gap:4px!important;
    padding:0 5px!important;
    font-size:9px!important;
  }
}

@media(prefers-reduced-motion:reduce) {
  .wnex-dashboard .wnex-kpi,
  .wnex-dashboard .wnex-detail-actions a {
    transition:none!important;
  }
}

/* WNNET DASHBOARD COMPACT VIEW R2 */

/* Daftar Pelanggan dan Detail Pelanggan */
.wnex-dashboard .wnex-main-grid {
  display:none!important;
}

/* Log Aktivitas Terbaru */
.wnex-dashboard .wnex-activity {
  display:none!important;
}

/* Susun ulang bagian bawah: Peta dan Billing */
.wnex-dashboard .wnex-lower-grid {
  grid-template-columns:minmax(0,1fr) minmax(260px,330px)!important;
  align-items:start!important;
  gap:14px!important;
}

.wnex-dashboard .wnex-lower-panel {
  min-width:0!important;
}

.wnex-dashboard .wnex-billing-panel {
  grid-column:auto!important;
  display:block!important;
  min-width:0!important;
  padding-bottom:8px!important;
}

.wnex-dashboard .wnex-billing-head {
  min-height:42px!important;
}

.wnex-dashboard .wnex-billing-row {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  align-items:center!important;
  gap:8px!important;
  padding:9px 12px!important;
  border-right:0!important;
  border-bottom:1px solid #edf1f6!important;
}

.wnex-dashboard .wnex-billing-row > span {
  min-width:0!important;
  overflow-wrap:anywhere!important;
}

.wnex-dashboard .wnex-billing-row > b {
  text-align:right!important;
  overflow-wrap:anywhere!important;
}

.wnex-dashboard .wnex-billing-panel > div:last-child {
  display:block!important;
  padding:10px 12px 3px!important;
}

/* HP dan tablet kecil: tampilkan Peta lalu Billing */
@media(max-width:860px) {
  .wnex-dashboard .wnex-lower-grid {
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }

  .wnex-dashboard .wnex-lower-panel {
    width:100%!important;
  }

  .wnex-dashboard .wnex-billing-panel {
    grid-column:auto!important;
    display:block!important;
  }

  .wnex-dashboard .wnex-billing-row {
    grid-template-columns:minmax(0,1fr) auto auto!important;
    padding:9px 12px!important;
  }
}

/* WNNET DASHBOARD RESPONSIVE REFINEMENT R3 */

/* Laptop kecil dan tablet landscape */
@media (max-width:1100px) {
  .wnex-dashboard .wnex-kpis {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
  }

  .wnex-dashboard .wnex-kpi {
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .wnex-dashboard .wnex-lower-grid {
    grid-template-columns:minmax(0,1fr) minmax(250px,.8fr)!important;
    gap:10px!important;
  }

  .wnex-dashboard .wnex-lower-panel {
    min-width:0!important;
  }
}

/* Tablet portrait dan HP */
@media (max-width:860px) {
  .wnex-dashboard,
  .wnex-dashboard * {
    box-sizing:border-box;
  }

  .wnex-dashboard {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .wnex-dashboard .wnex-dashboard-head {
    flex-wrap:wrap!important;
    align-items:flex-start!important;
    gap:10px!important;
  }

  .wnex-dashboard .wnex-dashboard-title {
    min-width:0!important;
    max-width:100%!important;
  }

  .wnex-dashboard .wnex-date-card {
    flex-wrap:wrap!important;
    max-width:100%!important;
    white-space:normal!important;
  }

  .wnex-dashboard .wnex-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }

  .wnex-dashboard .wnex-lower-grid {
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }

  .wnex-dashboard .wnex-lower-panel,
  .wnex-dashboard .wnex-billing-panel {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .wnex-dashboard .wnex-map {
    max-width:100%!important;
  }
}

/* HP: mencegah overflow dan menjaga area sentuh */
@media (max-width:520px) {
  .wnex-dashboard .wnex-dashboard-head {
    flex-direction:column!important;
    align-items:stretch!important;
    padding:11px!important;
  }

  .wnex-dashboard .wnex-dashboard-title h1 {
    overflow-wrap:anywhere!important;
  }

  .wnex-dashboard .wnex-date-card {
    align-self:flex-start!important;
    width:max-content!important;
    max-width:100%!important;
  }

  .wnex-dashboard .wnex-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  .wnex-dashboard .wnex-kpi {
    grid-template-columns:32px minmax(0,1fr)!important;
    min-width:0!important;
    padding:9px 7px!important;
    gap:7px!important;
  }

  .wnex-dashboard .wnex-kpi-label,
  .wnex-dashboard .wnex-kpi-value,
  .wnex-dashboard .wnex-kpi-sub {
    min-width:0!important;
    max-width:100%!important;
    overflow-wrap:anywhere!important;
  }

  .wnex-dashboard .wnex-kpi-value {
    white-space:normal!important;
  }

  .wnex-dashboard .wnex-lower-grid {
    width:100%!important;
    min-width:0!important;
    gap:10px!important;
  }

  .wnex-dashboard .wnex-tabs {
    height:auto!important;
    min-height:38px!important;
    flex-wrap:wrap!important;
    align-items:stretch!important;
    gap:4px!important;
    padding:5px!important;
  }

  .wnex-dashboard .wnex-tabs a {
    flex:1 1 calc(33.333% - 4px)!important;
    min-width:0!important;
    height:auto!important;
    min-height:34px!important;
    justify-content:center!important;
    padding:5px 3px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
  }

  .wnex-dashboard .wnex-billing-row {
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:6px!important;
    padding:9px 10px!important;
  }

  .wnex-dashboard .wnex-billing-row > b {
    max-width:48vw!important;
    overflow-wrap:anywhere!important;
  }
}

/* Interaksi sentuh tanpa animasi hover berlebihan */
@media (hover:none) {
  .wnex-dashboard .wnex-kpi:hover,
  .wnex-dashboard .wnex-detail-actions a:hover {
    transform:none!important;
  }

  .wnex-dashboard .wnex-kpi:active {
    transform:scale(.985)!important;
  }
}

@media (prefers-reduced-motion:reduce) {
  .wnex-dashboard .wnex-kpi {
    transition:none!important;
  }
}


/* Status pemasangan bukan gangguan PPPoE */
.wnex-dashboard .wnex-badge.waiting {
  background:#fff7ed!important;
  color:#b45309!important;
  border-color:#fed7aa!important;
}
