/* RESP_V1 dashboard */
html,body{max-width:100%;overflow-x:hidden}
.main{min-width:0;max-width:100%}
.main table{max-width:100%}
.hpMenuBtn{display:none}
@media(min-width:1800px){.main>*:not(.topbar){max-width:1500px;margin-left:auto;margin-right:auto;width:100%}}
@media(max-width:1100px){
  .main table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:900px){
  .sidebar{position:fixed!important;top:0;left:0;bottom:0;height:100vh!important;z-index:9998;transform:translateX(-105%);transition:transform .25s ease;box-shadow:0 0 40px rgba(20,20,60,.3);width:272px!important;min-width:272px!important}
  body.hp-nav-open .sidebar{transform:none}
  .hpOverlay{position:fixed;inset:0;background:rgba(15,20,50,.45);backdrop-filter:blur(2px);z-index:9997;display:none}
  body.hp-nav-open .hpOverlay{display:block}
  .hpMenuBtn{display:grid;place-items:center;width:42px;height:42px;border:1px solid #e3e6f3;border-radius:12px;background:#fff;color:#3a2ee8;cursor:pointer;margin-right:auto;flex:none}
  .topbar{padding:10px 14px!important;gap:10px!important}
  .topbar .balance{padding:8px 12px!important;font-size:13px!important}
  .topbar .newOrderBtn{padding:10px 14px!important;font-size:14px!important}
  .main{width:100%;padding-left:0;padding-right:0}
}
@media(max-width:560px){
  .topbar .balance svg{display:none}
  .topbar .newOrderBtn{font-size:13px!important;padding:9px 11px!important}
  .main{overflow-x:hidden}
}
/* HPRESP_DASH_V1 - Windows VPS list: mobile cards + stat boxes */
@media (max-width:900px){
  #svc-windows-rdp{padding:14px 12px!important}
  #svc-windows-rdp .wrdp2-header{flex-wrap:wrap!important;gap:14px!important;padding:16px!important}
  #svc-windows-rdp .wrdp2-header-art{display:none!important}
  #svc-windows-rdp .wrdp2-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;width:100%!important;margin:0!important}
  #svc-windows-rdp .wrdp2-stat{padding:10px 8px!important;gap:6px!important;min-width:0!important;flex-direction:column!important;align-items:flex-start!important}
  #svc-windows-rdp .wrdp2-stat span{white-space:normal!important;font-size:11px!important}
  #svc-windows-rdp .toolbarRow{flex-wrap:wrap!important;gap:8px!important}
  #svc-windows-rdp .toolbarRow .searchWrap{flex:1 1 100%!important;min-width:0!important}
  #svc-windows-rdp .wrdp2-kbd{display:none!important}
  #svc-windows-rdp .wrdp2-table-wrap{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
  #svc-windows-rdp .wrdp2-table{display:block!important;width:100%!important;min-width:0!important;overflow:visible!important}
  #svc-windows-rdp .wrdp2-table thead{display:none!important}
  #svc-windows-rdp .wrdp2-table tbody{display:block!important}
  #svc-windows-rdp .wrdp2-table tr.rdpRow{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px;position:relative;padding:14px!important;margin:0 0 12px!important;background:#fff;border:1px solid #e3e6f3;border-radius:16px;box-shadow:0 4px 14px rgba(40,50,120,.06)}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td{display:block!important;border:0!important;padding:0!important;min-width:0;width:auto!important;text-align:left!important;overflow-wrap:anywhere}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(1){position:absolute;top:10px;right:10px;z-index:2}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(2){grid-column:1/-1;padding-right:28px!important}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(n+3):nth-child(-n+6)::before{display:block;font-size:10.5px;font-weight:700;letter-spacing:.06em;color:#8a93ad;margin-bottom:3px}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(3)::before{content:"USERNAME"}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(4)::before{content:"PASSWORD"}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(5)::before{content:"EXPIRE DATE"}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(6)::before{content:"STATUS"}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td.wrdp2-actions{grid-column:1/-1;display:flex!important;gap:8px;flex-wrap:wrap}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td.wrdp2-actions>button{flex:1 1 130px;justify-content:center;margin:0!important;width:auto!important}
  #svc-windows-rdp .wrdp2-table tr.rdpRow[style*="display: none"]{display:none!important}
  #svc-windows-rdp .wrdp2-footer{flex-wrap:wrap;gap:8px}
}
@media (min-width:901px) and (max-width:1100px){
  #svc-windows-rdp .wrdp2-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}
/* HPRESP_DASH_V2 - details modal + card cleanup (mobile) */
@media (max-width:520px){
  #detailsModal .dm-row{flex-wrap:wrap!important;row-gap:6px!important;padding:12px!important}
  #detailsModal .dm-l{width:100%!important}
  #detailsModal .dm-v{flex:1 1 120px!important;min-width:0!important;word-break:normal!important;overflow-wrap:anywhere!important}
  #detailsModal #d-password{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
@media (max-width:900px){
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(1){display:none!important}
  #svc-windows-rdp .wrdp2-table tr.rdpRow>td:nth-child(2){padding-right:0!important}
  #svc-windows-rdp .wrdp2-table tr.rdpRow::before{display:none!important}
}
/* HPRESP_DASH_V3 - other dashboard tables -> cards on mobile (labels come from hp-mtables.js) */
@media (max-width:900px){
  .hp-mt-wrap{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
  table.hp-mt{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important;table-layout:auto!important;border:0!important}
  table.hp-mt thead{display:none!important}
  table.hp-mt tbody{display:block!important}
  table.hp-mt tr{display:block!important;position:relative;padding:12px 14px!important;margin:0 0 12px!important;background:#fff;border:1px solid #e3e6f3!important;border-radius:16px;box-shadow:0 4px 14px rgba(40,50,120,.06)}
  table.hp-mt tr[style*="display: none"]{display:none!important}
  table.hp-mt td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:0!important;padding:6px 0!important;width:auto!important;min-width:0!important;text-align:right!important;overflow-wrap:anywhere}
  table.hp-mt td[data-label]::before{content:attr(data-label);flex:none;max-width:42%;text-align:left;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8a93ad}
  table.hp-mt td.hp-mt-chk{display:none!important}
  table.hp-mt td.hp-mt-act{justify-content:stretch!important;gap:8px;padding-top:10px!important;text-align:left!important}
  table.hp-mt td.hp-mt-act>*{flex:1 1 120px;justify-content:center;margin:0!important}
  table.hp-mt td.hp-mt-span{display:block!important;text-align:center!important}
}
/* HPRESP_DASH_V4 - polish: GPU/Linux stat boxes, card cell padding, space above chat bubble */
@media (max-width:900px){
  .gpu2-header-art{display:none!important}
  .gpu2-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;width:100%!important;margin:0!important}
  .gpu2-stat{min-width:0!important;padding:10px 8px!important;gap:6px!important;flex-direction:column!important;align-items:flex-start!important}
  .gpu2-stat span{white-space:normal!important;font-size:11px!important}
  table.hp-mt td:nth-child(n){padding:6px 0!important}
  table.hp-mt td.hp-mt-act:nth-child(n){padding-top:10px!important}
  main.main{padding-bottom:96px!important}
}
/* HPRESP_DASH_V5 - GPU + Linux lists: same card layout as Windows VPS */
@media (max-width:900px){
  table.gpu2-table.hp-mt tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px;padding:14px!important}
  table.gpu2-table.hp-mt tr td:nth-child(n){display:block!important;text-align:left!important;padding:0!important;min-width:0}
  table.gpu2-table.hp-mt tr td[data-label]::before{display:block!important;margin-bottom:3px;max-width:none}
  table.gpu2-table.hp-mt tr td:nth-child(2){grid-column:1/-1}
  table.gpu2-table.hp-mt tr td:nth-child(2)::before{display:none!important}
  table.gpu2-table.hp-mt tr td.hp-mt-act{grid-column:1/-1;display:flex!important;gap:8px;flex-wrap:wrap}
  table.gpu2-table.hp-mt tr td.hp-mt-span{grid-column:1/-1;text-align:center!important}
  table.gpu2-table.hp-mt tr td.hp-mt-act .gx-actbox{display:flex!important;width:100%;gap:8px}
  table.gpu2-table.hp-mt tr td.hp-mt-act .gx-actbox>button{flex:1 1 0;justify-content:center;margin:0!important}
}
/* HPRESP_DASH_V6 - tidy stat boxes (GPU/Linux/Windows) + hide duplicate IP line on mobile */
@media (max-width:900px){
  .gpu2-stat,.wrdp2-stat{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:12px 6px!important;gap:0!important;border-top:3px solid #6366f1!important}
  .gpu2-stat-ico,.gpu2-stat-dot,.wrdp2-stat-ico,.wrdp2-stat-dot{display:none!important}
  .gpu2-stat>div,.wrdp2-stat>div{width:100%!important;text-align:center!important}
  .gpu2-stat>div b,.wrdp2-stat>div b{font-size:24px!important}
  .gpu2-stat:has(.gpu2-stat-dot.green),.wrdp2-stat:has(.wrdp2-stat-dot.green){border-top-color:#22c55e!important}
  .gpu2-stat:has(.gpu2-stat-dot.red),.wrdp2-stat:has(.wrdp2-stat-dot.red){border-top-color:#ef4444!important}
  .hp-dup{display:none!important}
}
/* HPRESP_DASH_V7 - details modal rows (GPU, Linux, any module): no broken password/host text on phones */
@media (max-width:520px){
  .dm-rows .dm-row{flex-wrap:wrap!important;row-gap:6px!important;padding:12px!important}
  .dm-rows .dm-row .dm-l{width:100%!important}
  .dm-rows .dm-row .dm-v{flex:1 1 120px!important;min-width:0!important;word-break:normal!important;overflow-wrap:anywhere!important}
  .dm-rows .dm-row #d-password{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
/* HPRESP_DASH_V8 - details modal: Specifications in two columns on phones */
@media (max-width:520px){
  .dm-specs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:12px!important}
  .dm-spec{gap:8px!important;padding:10px!important;min-width:0!important}
  .dm-spec>.dm-ico{width:30px!important;height:30px!important;min-width:30px!important;flex:none!important}
  .dm-spec>div{min-width:0!important}
  .dm-spec small{font-size:11px!important}
  .dm-spec b{font-size:13px!important;overflow-wrap:break-word!important;word-break:normal!important}
}
@media (max-width:380px){
  .dm-spec>.dm-ico{display:none!important}
}
/* HPRESP_DASH_V9 - details modal on phones/tablets: "Time remaining" card first */
@media (max-width:900px){
  .dm-grid{display:flex!important;flex-direction:column!important;gap:18px!important}
  .dm-grid>.dm-col{display:contents!important}
  .dm-grid>.dm-col:nth-child(2)>.dm-card:first-child{order:-1}
  .dm-grid>.dm-col>.dm-card{width:100%!important;box-sizing:border-box!important;align-self:stretch!important}
}
/* HPRESP_DASH_V10 - search boxes are type=search: browsers stop offering saved logins/addresses there */
.searchWrap input[type="search"]{-webkit-appearance:none;appearance:none;background:none}
.searchWrap input[type="search"]::-webkit-search-cancel-button,.searchWrap input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;appearance:none;display:none}
/* HPRESP_DASH_V11 : তিন সার্ভিস টেবিলের কলাম সমান */
@media(min-width:1101px){
  table.wrdp2-table,table.gpu2-table{table-layout:fixed!important;width:100%!important}
  table.wrdp2-table thead th:nth-child(1),table.gpu2-table thead th:nth-child(1){width:56px!important}
  table.wrdp2-table thead th:nth-child(2),table.gpu2-table thead th:nth-child(2){width:25%!important}
  table.wrdp2-table thead th:nth-child(3),table.gpu2-table thead th:nth-child(3){width:16%!important}
  table.wrdp2-table thead th:nth-child(4),table.gpu2-table thead th:nth-child(4){width:12%!important}
  table.wrdp2-table thead th:nth-child(5),table.gpu2-table thead th:nth-child(5){width:15%!important}
  table.wrdp2-table thead th:nth-child(6),table.gpu2-table thead th:nth-child(6){width:11%!important}
  table.wrdp2-table td,table.gpu2-table td{overflow:hidden;text-overflow:ellipsis}
  table.wrdp2-table td:last-child,table.gpu2-table td:last-child{overflow:visible}
}
