/*!
 * VPSNerds Customer Panel — app.css
 * © Copyright 2026 Group44 Pty Ltd ABN: 24 703 434 664 ACN: 703 434 664
 * Parent Company GIGA Pty Ltd ABN: 68 079 638 547 · 079 638 547
 */
:root {
  --primary: #5b2be0;
  --primary-600: #4c1fd0;
  --primary-50: #f1ecff;
  --primary-100: #e4dbff;
  --accent: #2f6bff;
  --in: #3b6cf6;
  --out: #14b8a6;
  --ok: #16a34a; --ok-bg: #e9f9ef;
  --warn: #d97706; --warn-bg: #fff6e5;
  --bad: #dc2626; --bad-bg: #fdecec;
  --info: #2563eb; --info-bg: #eaf1ff;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e7eaf0; --line-2: #f1f3f7;
  --bg: #f5f6fb; --card: #ffffff; --soft: #f7f8fc;
  --side-1: #0d0a2e; --side-2: #1a1060;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 45px -12px rgba(30, 20, 90, .25);
  --sb-w: 264px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bs-body-font-family: var(--font);
  --bs-primary: var(--primary);
  --bs-primary-rgb: 91, 43, 224;
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: 91, 43, 224;
  --bs-link-hover-color: var(--primary-600);
}
[data-bs-theme=dark] {
  --ink: #e8eaf3; --ink-2: #c7cbe0; --muted: #949bb8; --faint: #6b7291;
  --line: #262a44; --line-2: #1f2238; --bg: #0b0d1c; --card: #131629; --soft: #181c33;
  --primary-50: #221a4d; --primary-100: #2d2266;
  --ok-bg: #0f2a1c; --warn-bg: #2d2210; --bad-bg: #2f1515; --info-bg: #13213f;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --bs-body-bg: var(--bg); --bs-body-color: var(--ink);
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 14.5px; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); }
a:hover { color: var(--primary-600); }
.mono { font-family: var(--mono); font-size: .93em; }
.nowrap { white-space: nowrap; }
.min-w-0 { min-width: 0; }
.ic { width: 20px; height: 20px; flex-shrink: 0; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic-lg { width: 28px; height: 28px; }
[data-bs-theme=dark] .only-light, :root:not([data-bs-theme=dark]) .only-dark { display: none !important; }

.btn-light:hover { background: var(--soft); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-grid; place-items: center; position: relative; transition: .15s; cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--primary); }
.icon-btn.sm { width: 34px; height: 34px; } .icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn.xs { width: 26px; height: 26px; border-radius: 7px; border-color: transparent; background: transparent; vertical-align: middle; } .icon-btn.xs .ic { width: 15px; height: 15px; }
.icon-btn.has-dot::after { content: ''; position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; border: 2px solid var(--card); }
.link { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 3px; }

/* ======================================================================
   AUTH (login / register / forgot)
   ====================================================================== */
body.auth { background: #fff; }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-left { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 28px; background: radial-gradient(1200px 500px at 0 0, #f6f3ff 0, #fff 55%); }
.auth-mobile-logo { display: none; margin-bottom: 24px; } .auth-mobile-logo img { height: 46px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 6px; padding: 44px 44px 0; box-shadow: 0 30px 70px -25px rgba(41, 22, 120, .22), 0 0 0 1px rgba(15, 23, 42, .03); }
.auth-title { font-weight: 400; font-size: 40px; letter-spacing: -.5px; color: var(--primary); margin: 0 0 4px; }
.auth-sub { color: var(--muted); margin-bottom: 22px; }
.auth-alert { display: flex; gap: 8px; align-items: flex-start; padding: 16px 18px; margin-bottom: 22px; border-left: 3px solid; background: #fff; box-shadow: 0 8px 24px -10px rgba(15, 23, 42, .15); font-size: 14px; }
.auth-alert.ok { border-color: #4caf50; color: #3d9a41; }
.auth-alert.bad { border-color: var(--bad); color: var(--bad); }
.auth-alert .ic { width: 18px; height: 18px; margin-top: 1px; }
.auth-form { display: grid; gap: 22px; }
.field { display: flex; align-items: center; gap: 12px; background: #eff5fe; border: 1px solid transparent; padding: 0 16px; height: 56px; transition: .15s; margin: 0; cursor: text; }
.field:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-50); }
.field > .ic { color: var(--primary); width: 22px; height: 22px; }
.field input { border: 0; background: transparent; outline: 0; flex: 1; font-size: 15px; color: var(--ink); min-width: 0; height: 100%; }
.field input::placeholder { color: #8391a7; }
.field-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; display: grid; }
.field-btn:hover { color: var(--primary); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-top: -8px; font-size: 14px; }
.check { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; margin-top: 2px; }
.muted-link { color: #5f6b7c; } .muted-link:hover { color: var(--primary); }
.btn-auth { height: 56px; border: 0; background: var(--primary); color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; transition: .15s; box-shadow: 0 12px 24px -12px rgba(91, 43, 224, .7); }
.btn-auth:hover { background: var(--primary-600); } .btn-auth .ic { width: 26px; height: 26px; stroke-width: 1.5; transition: transform .2s; }
.btn-auth:hover .ic { transform: translateX(4px); }
.auth-help { text-align: center; font-size: 12.5px; color: var(--ink-2); margin: -12px 0 0; }
.auth-or { text-align: center; margin: 30px 0 22px; color: var(--ink-2); font-size: 15px; }
.social-row { display: flex; justify-content: center; gap: 60px; }
.social-btn { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.social-btn span { width: 50px; height: 50px; border: 1px solid #dfe3ea; display: grid; place-items: center; transition: .15s; }
.social-btn:hover span { border-color: var(--primary); color: var(--primary); box-shadow: 0 6px 14px -6px rgba(91, 43, 224, .45); }
.auth-demo { margin: 26px 0 0; font-size: 12.5px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.auth-demo code { color: var(--primary); }
.auth-foot { margin: 26px -44px 0; padding: 22px; border-top: 1px solid #eef0f4; text-align: center; color: var(--ink-2); font-size: 15px; }
.back-link { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.pw-meter { height: 4px; background: var(--line-2); border-radius: 4px; margin-top: -14px; overflow: hidden; } .pw-meter i { display: block; height: 100%; width: 0; transition: .3s; border-radius: 4px; }
.auth-copy { margin-top: 28px; text-align: center; font-size: 12px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.auth-right { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background:
  radial-gradient(900px 500px at 85% 0%, rgba(124, 58, 237, .45), transparent 60%),
  radial-gradient(700px 500px at 0% 100%, rgba(37, 99, 235, .35), transparent 60%),
  linear-gradient(160deg, #0b0a33 0%, #160d55 55%, #0a0b2a 100%); }
.auth-right::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px); pointer-events: none; }
.btn-sales { position: absolute; top: 8px; right: 8px; border: 1px solid rgba(255,255,255,.85); color: #fff; padding: 14px 16px; font-size: 18px; transition: .15s; z-index: 2; }
.btn-sales:hover { background: #fff; color: var(--side-2); }
.auth-globe { position: absolute; width: 760px; max-width: 120%; opacity: .9; top: 50%; left: 50%; transform: translate(-50%, -58%); }
.auth-globe .nodes circle { fill: #c4b5fd; filter: drop-shadow(0 0 6px #a78bfa); animation: pulse 2.6s ease-in-out infinite; }
.auth-globe .nodes circle:nth-child(2n) { animation-delay: 1.2s; }
.auth-globe .links path { animation: dash 14s linear infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes dash { to { stroke-dashoffset: -200; } }
.auth-brand { position: relative; text-align: center; z-index: 1; margin-top: -40px; }
.auth-brand img { width: min(420px, 80%); filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); }
.auth-brand p { margin: 18px 0 26px; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.6; }
.auth-points { list-style: none; padding: 0; margin: 0 auto; display: inline-grid; gap: 12px; text-align: left; }
.auth-points li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 9px 16px; border-radius: 999px; backdrop-filter: blur(6px); font-size: 14px; }
.auth-points .ic { color: #c4b5fd; }
.auth-links { position: absolute; bottom: 9%; display: flex; gap: 64px; z-index: 1; }
.auth-links a { color: #fff; font-size: 18px; } .auth-links a:hover { color: #c4b5fd; }

/* Group44 credit chip */
.g44 { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-align: left; line-height: 1.15; }
.g44:hover { color: var(--ink); }
.g44 > span:last-child { display: flex; flex-direction: column; }
.g44 small { color: var(--muted); font-size: 11.5px; }
.g44-mark { white-space: nowrap; width: 36px; height: 36px; border-radius: 9px; background: #0f172a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; letter-spacing: -.6px; }
.g44-mark b { color: #60a5fa; }
.g44.sm .g44-mark { width: 30px; height: 30px; font-size: 10px; }
.sf-legal { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ======================================================================
   APP SHELL
   ====================================================================== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sb-w); position: fixed; inset: 0 auto 0 0; z-index: 1040; color: #dfe3ff; display: flex; flex-direction: column; transition: width .2s, transform .25s;
  background: repeating-linear-gradient(118deg, rgba(255,255,255,.028) 0 1px, transparent 1px 26px), linear-gradient(180deg, var(--side-1), var(--side-2) 60%, #120d45); }
.sb-brand { height: 68px; display: flex; align-items: center; padding: 0 14px 0 20px; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-logo img { height: 40px; } .sb-logo-mark { display: none; } .sb-logo-mark img { height: 34px; }
.sb-collapse { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.06); border: 0; color: #b8bde6; display: grid; place-items: center; }
.sb-collapse .ic { width: 17px; height: 17px; } .sb-collapse:hover { background: rgba(255,255,255,.12); color: #fff; }
.sb-nav { padding: 14px 12px; flex: 1; overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c9cdf2; font-weight: 500; font-size: 15px; width: 100%; background: none; border: 0; text-align: left; transition: .15s; white-space: nowrap; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link.active { background: linear-gradient(90deg, rgba(124, 92, 255, .35), rgba(124, 92, 255, .12)); color: #fff; box-shadow: inset 3px 0 0 #a78bfa; }
.sb-link .ic { width: 21px; height: 21px; opacity: .9; }
.sb-caret { margin-left: auto; width: 16px !important; height: 16px !important; transition: transform .2s; }
.sb-group.open .sb-caret { transform: rotate(90deg); }
.sb-sub { display: none; padding-left: 18px; } .sb-group.open .sb-sub { display: grid; gap: 2px; }
.sb-sub .sb-link { font-size: 14px; padding: 8px 12px; }
.sb-count, .sb-badge { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #dfe3ff; }
.sb-badge { background: #f43f5e; color: #fff; }
.sb-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a8fc2; padding: 18px 12px 6px; font-weight: 600; }
.sb-bottom { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: 2px; }
.sb-deploy { margin-top: 8px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, #6d3cf5, #3b6cf6); color: #fff; font-weight: 600; box-shadow: 0 10px 24px -10px rgba(109, 60, 245, .8); }
.sb-deploy:hover { color: #fff; filter: brightness(1.08); }
.sb-deploy kbd { margin-left: auto; font-size: 11px; background: rgba(0,0,0,.25); color: #e0e7ff; }
html.sb-collapsed { --sb-w: 76px; }
html.sb-collapsed .sb-text, html.sb-collapsed .sb-logo, html.sb-collapsed .sb-caret, html.sb-collapsed .sb-label, html.sb-collapsed .sb-count, html.sb-collapsed .sb-sub { display: none !important; }
html.sb-collapsed .sb-logo-mark { display: block; }
html.sb-collapsed .sb-brand { flex-direction: column; justify-content: center; height: auto; padding: 14px 0; gap: 10px; }
html.sb-collapsed .sb-collapse { margin: 0; }
html.sb-collapsed .sb-link, html.sb-collapsed .sb-deploy { justify-content: center; position: relative; }
html.sb-collapsed .sb-badge { position: absolute; top: 3px; right: 6px; padding: 0 5px; font-size: 10px; }
.sb-backdrop { display: none; }

.main { margin-left: var(--sb-w); flex: 1; min-width: 0; width: calc(100% - var(--sb-w)); max-width: none; display: flex; flex-direction: column; transition: margin .2s; box-sizing: border-box; }
.topbar { height: 68px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 1030; }
.top-search { display: flex; align-items: center; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; height: 42px; width: 440px; flex: 0 1 440px; min-width: 0; color: var(--muted); }
.top-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.top-search input { border: 0; background: transparent; outline: 0; flex: 1; color: var(--ink); min-width: 0; }
.top-search kbd { background: var(--card); color: var(--muted); border: 1px solid var(--line); font-size: 11px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.top-chip { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 10px; }
.top-chip:hover { background: var(--soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; } .avatar.xl { width: 64px; height: 64px; font-size: 20px; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; background: var(--card); min-width: 220px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.dropdown-item:hover { background: var(--soft); }
.dropdown-item.active, .dropdown-item:active { background: var(--primary-50); color: var(--primary); }
.dm-user { display: flex; gap: 10px; align-items: center; padding: 8px 10px; } .dm-user small { display: block; color: var(--muted); }
.dm-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-weight: 700; }
.notif-menu { width: 340px; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13.5px; } .notif:hover { background: var(--soft); }
.notif small { color: var(--muted); }
.notif-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; } .notif-ic .ic { width: 17px; height: 17px; }
.content { padding: 28px 12px 28px 28px; flex: 1; width: 100%; max-width: none; box-sizing: border-box; }

/* Footer */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 22px 28px; border-top: 1px solid var(--line); background: var(--card); font-size: 12.5px; color: var(--muted); }
.sf-left { display: flex; align-items: center; gap: 16px; }
.sf-logo { height: 40px; }
.sf-copy a { color: var(--muted); } .sf-copy a:hover { color: var(--primary); }
.sf-dev { display: flex; align-items: center; gap: 16px; text-align: right; }


/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) { .auth-links { gap: 34px; } }
@media (max-width: 991.98px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); } .auth-right { display: none; } .auth-mobile-logo { display: block; }
  .sidebar { transform: translateX(-100%); width: 264px; } html.sb-collapsed { --sb-w: 264px; }
  body.sb-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 6, 20, .5); z-index: 1035; }
  .sb-collapse { display: none; }
  .main { margin-left: 0; width: 100%; } .topbar { padding: 0 16px; } .content { padding: 18px 16px; }
  .site-footer { padding: 20px 16px; } .sf-dev { text-align: left; }
}
@media (max-width: 575.98px) {
  .auth-card { padding: 30px 22px 0; } .auth-foot { margin: 22px -22px 0; } .auth-title { font-size: 32px; }
  .social-row { gap: 28px; } .auth-left { padding: 28px 14px 22px; } .auth-card { min-width: 0; } .field input { width: 100%; } .auth-demo code { word-break: break-all; } .kv dt { width: 110px; } .bill-grid { grid-template-columns: 1fr; }
  .srv-actions { width: 100%; } .btn-group-x { flex: 1; } .btn-x { flex: 1; justify-content: center; padding: 10px 8px; } .btn-x span { display: none; }
  .top-search kbd { display: none; } .topbar { gap: 8px; } .top-actions { gap: 4px; } .top-chip { padding: 4px; } .top-chip > .ic-sm { display: none; } .top-actions .icon-btn[data-action=toggle-theme] { display: none; } .traffic-sum { gap: 12px 24px; } .traffic-sum b { font-size: 19px; }
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- VPSNerds cloud: v2 shell on top of legacy app.css ---------- */
body.auth, body.auth *, body.auth *::before, body.auth *::after { box-sizing: border-box; }
body.auth { margin: 0; font-family: var(--font); }
body.auth .auth-title, body.auth p { margin-top: 0; }
body.auth .btn-auth { width: 100%; cursor: pointer; font-family: inherit; }
body.auth .field-btn { cursor: pointer; }
body.auth .auth-alert { margin-bottom: 22px; }
body.auth .auth-card { padding-bottom: 36px; }

body.v2 { --red: var(--primary); --side: var(--side-1); margin: 0; font-family: var(--font); }
body.v2 .app { display: block; min-height: 100vh; }
body.v2 .app-shell { display: flex; min-height: 100vh; }
body.v2 .main { margin-left: var(--sb-w); width: calc(100% - var(--sb-w)); max-width: none; box-sizing: border-box; }
body.v2 main.content { margin-left: 0; width: 100%; max-width: none; padding: 28px 12px 28px 28px; box-sizing: border-box; }
body.v2 .content > section { display: block; width: 100%; max-width: none; box-sizing: border-box; }
body.v2 header.topbar { margin: 0; align-items: center; flex-wrap: nowrap; }
body.v2 header.topbar span, body.v2 header.topbar b { color: inherit; font-size: inherit; font-weight: inherit; }
body.v2 .topbar .top-title { font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.v2 .topbar .avatar { color: #fff; font-size: 12px; font-weight: 700; }
body.v2 .topbar .user-name { font-weight: 600; }
body.v2 button.icon-btn, body.v2 button.sb-collapse { padding: 0; min-height: 0; }
body.v2 .icon-btn.out { color: var(--ink-2); }
body.v2 .sb-link { text-decoration: none; }
body.v2 .sb-deploy { text-decoration: none; }
body.v2 .sb-logo img { height: 40px; width: auto; }
body.v2 .sf-logo { height: 40px; width: auto; }
body.v2 .site-footer a { text-decoration: none; }
body.v2 .sb-open-btn { display: none; }
body.v2 .sidebar, body.v2 .sidebar *, body.v2 .topbar, body.v2 .topbar *, body.v2 .site-footer, body.v2 .site-footer *, body.v2 .list-card, body.v2 .list-card * { box-sizing: border-box; }
body.v2 .sidebar a.sb-link.active, body.v2 .sidebar a.sb-link:hover { color: #fff; }
body.v2 .top-actions .top-chip { cursor: default; }
body.v2 .top-actions .top-chip:hover { background: none; }

/* ---------- Cloud server listing (v3) ---------- */
body.v2 .card-x { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: block; color: inherit; }
body.v2 .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
body.v2 .page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 0; }
body.v2 .page-head p { color: var(--muted); margin: 4px 0 0; }
body.v2 .page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.v2 .v3-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 10px; font-weight: 600; font-size: 14px; padding: .55rem 1rem; background: var(--primary); border: 1px solid var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(91, 43, 224, .55); text-decoration: none; }
body.v2 .v3-btn:hover { background: var(--primary-600); color: #fff; }
body.v2 .v3-btn[aria-disabled=true] { opacity: .55; pointer-events: none; }
body.v2 .v3-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; font-style: normal; }
body.v2 .v3-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
body.v2 .v3-pill.ok { background: var(--ok-bg); color: var(--ok); } body.v2 .v3-pill.warn { background: var(--warn-bg); color: var(--warn); }
body.v2 .v3-pill.bad { background: var(--bad-bg); color: var(--bad); } body.v2 .v3-pill.off { background: var(--line-2); color: var(--muted); }
body.v2 .v3-pill.ok i { box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
body.v2 .os-badge { --os: #475569; width: 36px; height: 36px; border-radius: 10px; background: var(--os); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.3px; flex-shrink: 0; box-shadow: inset 0 -8px 16px rgba(0,0,0,.12), 0 4px 10px -4px var(--os); }
body.v2 .os-badge.sm { width: 22px; height: 22px; border-radius: 50%; font-size: 9.5px; box-shadow: none; }
body.v2 .os-badge.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
body.v2 .welcome-line { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
body.v2 .welcome-line span { color: #e11d48; }
body.v2 .cap-line { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
body.v2 .list-card { padding: 18px 18px 12px; }
body.v2 .list-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
body.v2 .list-search { display: flex; align-items: center; gap: 10px; width: 420px; max-width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); margin: 0; }
body.v2 .list-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
body.v2 .list-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; width: auto; padding: 0; color: var(--ink); font-size: 15px; }
body.v2 .seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; margin-left: auto; }
body.v2 .seg > button { border: 0; background: none; padding: 6px 13px; min-height: 0; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
body.v2 .seg > button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
body.v2 .seg span { font-size: 11px; background: var(--line); border-radius: 999px; padding: 0 6px; }
body.v2 .list-scroll { width: 100%; overflow-x: auto; }
body.v2 .list-table { width: 100%; border-collapse: separate; border-spacing: 0; }
body.v2 .list-table th { text-align: left; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 7px; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; user-select: none; }
body.v2 .list-table th:hover { color: var(--primary); }
body.v2 .list-table th::after { content: '\2195'; opacity: .3; margin-left: 5px; font-size: 11px; }
body.v2 .list-table th.asc::after { content: '\2191'; opacity: 1; color: var(--primary); }
body.v2 .list-table th.desc::after { content: '\2193'; opacity: 1; color: var(--primary); }
body.v2 .list-table td { padding: 14px 7px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
body.v2 .list-table tbody tr[data-href] { cursor: pointer; }
body.v2 .list-table tbody tr:hover td { background: var(--soft); }
body.v2 .list-name { font-weight: 700; font-size: 16px; color: #1d4ed8; white-space: nowrap; }
body.v2 .list-name:hover { color: var(--primary); }
body.v2 .uuid { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: nowrap; font-family: var(--mono); }
body.v2 .list-os { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
body.v2 .list-table .flag { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; vertical-align: -4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); margin-right: 4px; }
body.v2 .list-table small.sub { display: block; color: var(--muted); font-size: 12px; }
body.v2 .list-table .mono { font-family: var(--mono); font-size: .93em; }
body.v2 .list-table .icon-btn.xs { width: 22px; height: 22px; border: 0; background: transparent; color: var(--muted); vertical-align: middle; }
body.v2 .list-table .icon-btn.xs:hover { color: var(--primary); }
body.v2 .list-table .icon-btn.xs .ic { width: 15px; height: 15px; }
body.v2 .list-empty td { text-align: center; color: var(--muted); padding: 34px 10px; }
body.v2 .list-foot { text-align: right; color: var(--muted); font-size: 13px; padding: 12px 4px 2px; }
body.v2 .list-foot b { color: var(--ink-2); font-weight: 600; }

body.v2 .v3-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 4px; }
body.v2 .v3-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 12px; align-items: start; }
body.v2 .v3-split.settings-split { grid-template-columns: 240px minmax(0, 1fr); }
body.v2 .v3-stack { display: grid; gap: 12px; }
body.v2 .mt-3 { margin-top: 16px; }
body.v2 .mt-2 { margin-top: 10px; }
body.v2 .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
body.v2 .card-head h2 { font-size: 18px; font-weight: 700; margin: 0; }
body.v2 .card-head .link, body.v2 a.link { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 3px; }
body.v2 .stat { padding: 20px 22px; }
body.v2 .stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-weight: 600; font-size: 15px; }
body.v2 .stat-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
body.v2 .stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-top: 10px; line-height: 1.15; word-break: break-word; }
body.v2 .stat-val.big { font-size: 32px; }
body.v2 .stat-val.long { font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.2px; }
body.v2 .stat-val small { font-size: 15px; font-weight: 500; color: var(--muted); }
body.v2 .stat-foot { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.35; overflow-wrap: anywhere; }
body.v2 .bw-charts { gap: 14px; }
body.v2 .bw-chart { width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 10px; }
body.v2 .bw-chart img { display: block; width: 100%; max-width: 100%; height: auto; }
body.v2 .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 5px 1px 0; }
body.v2 .dot.ok { background: var(--ok); } body.v2 .dot.off { background: var(--faint); }
body.v2 .table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
body.v2 .table-x th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--soft); text-align: left; }
body.v2 .table-x td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
body.v2 .srv-cell { display: flex; align-items: center; gap: 12px; }
body.v2 .srv-cell small { display: block; color: var(--muted); font-size: 12.5px; }
body.v2 .srv-name { font-weight: 700; color: var(--ink); }
body.v2 .srv-name:hover { color: var(--primary); }
body.v2 .qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
body.v2 .qa-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; text-align: center; text-decoration: none; }
body.v2 .qa-grid a .ic { color: var(--primary); width: 22px; height: 22px; }
body.v2 .qa-grid a:hover { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary); }
body.v2 .promo { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, var(--primary-50), var(--card) 70%); }
body.v2 .promo h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
body.v2 .promo p { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; }
body.v2 .v3-btn-light { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
body.v2 .v3-btn-light:hover { background: var(--soft); color: var(--primary); }
body.v2 .v3-btn-danger { background: var(--bad); border-color: var(--bad); }
body.v2 .v3-inline { display: inline; margin: 0; }
body.v2 .srv-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 18px; }
body.v2 .back-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; text-decoration: none; }
body.v2 .back-btn:hover { background: var(--primary); color: #fff; }
body.v2 .srv-title { flex: 1; min-width: 220px; }
body.v2 .srv-title h1 { font-size: 28px; font-weight: 500; letter-spacing: -.3px; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.v2 .srv-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 13.5px; }
body.v2 .srv-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }
body.v2 .srv-actions-compact .btn-group-x { flex: 0 1 auto; max-width: 100%; }
body.v2 .btn-group-x { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
body.v2 .btn-group-x .btn-x { white-space: nowrap; }
body.v2 .btn-x { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--ink); font-size: 14px; min-height: 0; border-radius: 0; }
body.v2 .btn-x + .btn-x, body.v2 .v3-inline + .v3-inline .btn-x { border-left: 1px solid var(--line); }
body.v2 .btn-x:hover:not(:disabled) { background: var(--soft); } body.v2 .btn-x:disabled { color: var(--faint); cursor: not-allowed; }
body.v2 .btn-x.danger { color: var(--bad); background: none; }
body.v2 .tabs-x { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
body.v2 .tabs-x a { padding: 12px 14px; color: var(--ink-2); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; text-decoration: none; }
body.v2 .tabs-x a:hover { color: var(--primary); } body.v2 .tabs-x a.active { color: var(--ink); border-color: var(--primary); font-weight: 600; }
body.v2 .ssh-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #0f1229; color: #e6e8f5; border-radius: 12px; padding: 12px 12px 12px 18px; margin-bottom: 8px; }
body.v2 .ssh-copy { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; border-radius: 9px; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
body.v2 .dns-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
body.v2 .dns-box .h-sec { font-size: 15px; margin-bottom: 8px; }
body.v2 .dns-box .kv > div:last-child { border-bottom: 0; }
body.v2 .dns-help { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 10px 0 0; }
body.v2 .kv dd small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
body.v2 .kv { margin: 0; }
body.v2 .kv > div { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line-2); min-height: 52px; }
body.v2 .kv dt { width: 160px; flex-shrink: 0; font-weight: 400; color: var(--muted); }
body.v2 .kv dd { margin: 0; flex: 1; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
body.v2 .prot-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
body.v2 .prot-row > div { flex: 1; min-width: 0; } body.v2 .prot-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
body.v2 .prot-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-2); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
body.v2 .bill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
body.v2 .bill-grid small { display: block; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; font-size: 12px; margin-bottom: 2px; }
body.v2 .bill-grid b { font-size: 16px; }
body.v2 .subnav { padding: 10px; display: grid; gap: 2px; }
body.v2 .subnav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
body.v2 .subnav a:hover { background: var(--soft); color: var(--primary); }
body.v2 .h-sec { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
body.v2 .banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
body.v2 .banner.bad { background: var(--bad-bg); color: #7f1d1d; border: 1px solid #fbcaca; }
body.v2 .danger-zone { border-color: #fbcaca; }
body.v2 .ddos-card { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; padding: 32px; }
body.v2 .ddos-card h2 { display: flex; gap: 10px; align-items: center; font-size: 22px; font-weight: 700; margin: 0 0 8px; }
body.v2 .empty { text-align: center; padding: 30px 10px; color: var(--muted); }
body.v2 .empty h4 { font-size: 17px; font-weight: 700; margin: 10px 0 6px; color: var(--ink); }
body.v2 .text-ok { color: var(--ok); font-weight: 600; } body.v2 .text-bad { color: var(--bad); font-weight: 600; }
body.v2 .v3-field { display: grid; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
body.v2 .v3-field input, body.v2 .v3-field select, body.v2 .v3-field textarea, body.v2 .fw-grid input, body.v2 .fw-grid select { width: 100%; }
body.v2 .v3-btn-light.text-bad { color: var(--bad); }
body.v2 .fw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
body.v2 .fw-add { margin-top: 14px; }
body.v2 .text-secondary { color: var(--muted); }

@media (max-width: 991.98px) {
  body.v2 .sb-open-btn { display: inline-grid; }
  body.v2 .main { margin-left: 0; width: 100%; }
  body.v2 main.content { padding: 18px 16px; }
  body.v2 .topbar .user-name { display: none; }
  body.v2 .seg { margin-left: 0; }
  body.v2 .v3-split, body.v2 .v3-split.settings-split { grid-template-columns: 1fr; }
  body.v2 .qa-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======================================================================
   MOBILE & TABLET (added 2026-11 responsive pass)
   ====================================================================== */
html { scroll-padding-top: 84px; }                       /* anchors land below the sticky topbar */
@supports (min-height: 100dvh) { .app-shell, .auth-wrap { min-height: 100dvh; } }

/* Grid/flex children must be allowed to shrink, or wide tables/keys push the page sideways */
.d-grid > *, .srv-card > *, .row > *, .kv dd, .srv-cell > div, .list-os { min-width: 0; }
.ssh-box .mono { min-width: 0; }
.card-head { flex-wrap: wrap; }
.tabs-x { position: relative; -webkit-overflow-scrolling: touch; }
.tabs-x::-webkit-scrollbar { display: none; }
.chart-box canvas { touch-action: pan-y; }
.chart-tip { max-width: calc(100% - 8px); }
.notif-menu { width: min(340px, calc(100vw - 24px)); }
.deploy-bar { display: none; }

/* Stacked tables: app.js adds .is-stack + data-label to every .table-x.
   Selectors use table.is-stack.is-stack so they also win over the LIVE panel's body.v2 rules. */
@media (max-width: 767.98px) {
  table.is-stack.is-stack, table.is-stack.is-stack > tbody, table.is-stack.is-stack > tbody > tr, table.is-stack.is-stack > tbody > tr > td { display: block; width: 100%; }
  table.is-stack.is-stack > thead { display: none; }
  table.is-stack.is-stack, table.is-stack.is-stack * { box-sizing: border-box; }
  table.is-stack.is-stack > tbody > tr[hidden] { display: none; }
  table.is-stack.is-stack > tbody > tr { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 10px; }
  table.is-stack.is-stack > tbody > tr:last-child { margin-bottom: 0; }
  table.is-stack.is-stack > tbody > tr > td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; text-align: right; border-bottom: 1px dashed var(--line); background: none !important; font-size: 14px; white-space: normal; }
  table.is-stack.is-stack > tbody > tr > td:last-child { border-bottom: 0; }
  table.is-stack.is-stack > tbody > tr > td::before { content: attr(data-label); flex-shrink: 0; text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
  table.is-stack.is-stack > tbody > tr > td.td-head { display: block; text-align: left; padding: 12px 0 10px; }
  table.is-stack.is-stack > tbody > tr > td.td-head::before, table.is-stack.is-stack > tbody > tr > td.td-nolabel::before { display: none; }
  table.is-stack.is-stack > tbody > tr > td.td-nolabel { justify-content: flex-end; flex-wrap: wrap; }
  table.is-stack.is-stack > tbody > tr > td.td-menu { position: absolute; top: 8px; right: 8px; width: auto; padding: 0; border: 0; }
  table.is-stack.is-stack > tbody > tr.has-menu > td.td-head { padding-right: 44px; }
  table.is-stack.is-stack > tbody > tr.list-empty > td { display: block; text-align: center; }
  table.is-stack.is-stack .td-val { min-width: 0; overflow-wrap: anywhere; }
  table.is-stack.is-stack .td-val:has(input, select) { flex: 1; }
  table.is-stack.is-stack .nowrap, table.is-stack.is-stack .list-name, table.is-stack.is-stack .uuid { white-space: normal; overflow-wrap: anywhere; }
  table.is-stack.is-stack .srv-cell { text-align: left; }
  .table-responsive:has(> table.is-stack) { overflow: visible; }
  .card-x.p-0 > .table-responsive > table.is-stack { padding: 12px; }
  .list-card { padding: 14px; }
  .list-tools .seg { margin-left: 0; }
  .list-search { width: 100%; }
}

/* Tablets: the 7-column cloud server list becomes a 2-up card grid */
@media (min-width: 768px) and (max-width: 1199.98px) {
  table.list-table.is-stack.is-stack, table.list-table.is-stack.is-stack > tbody > tr > td { display: block; width: 100%; }
  table.list-table.is-stack.is-stack > thead { display: none; }
  table.list-table.is-stack.is-stack, table.list-table.is-stack.is-stack * { box-sizing: border-box; }
  table.list-table.is-stack.is-stack > tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  table.list-table.is-stack.is-stack > tbody > tr { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; }
  table.list-table.is-stack.is-stack > tbody > tr[hidden] { display: none; }
  table.list-table.is-stack.is-stack > tbody > tr.list-empty { grid-column: 1 / -1; }
  table.list-table.is-stack.is-stack > tbody > tr > td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; text-align: right; border-bottom: 1px dashed var(--line); background: none !important; white-space: normal; }
  table.list-table.is-stack.is-stack > tbody > tr > td:last-child { border-bottom: 0; }
  table.list-table.is-stack.is-stack > tbody > tr > td::before { content: attr(data-label); flex-shrink: 0; text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
  table.list-table.is-stack.is-stack > tbody > tr > td.td-head { display: block; text-align: left; padding: 12px 0 10px; }
  table.list-table.is-stack.is-stack > tbody > tr > td.td-head::before { display: none; }
  table.list-table.is-stack.is-stack > tbody > tr.list-empty > td { display: block; text-align: center; }
  table.list-table.is-stack.is-stack .col-created { display: flex; }
  table.list-table.is-stack.is-stack .uuid { max-width: none; }
  table.list-table.is-stack.is-stack .td-val { min-width: 0; overflow-wrap: anywhere; }
  .table-responsive:has(> table.list-table.is-stack) { overflow: visible; }
}

/* Phones + small tablets (sidebar becomes a drawer) */
@media (max-width: 991.98px) {
  /* iOS zooms the page when a focused field is < 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea, .form-control, .form-select, .field input, .top-search input, .list-search input, .tb-search input { font-size: 16px !important; }
  .sidebar { width: min(264px, 86vw); overflow-y: auto; overscroll-behavior: contain; }
  .sb-nav { overflow: visible; flex: 0 0 auto; }
  body.sb-open { overflow: hidden; }
  .tabs-x { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 28px; }
  .tabs-x.at-end { -webkit-mask-image: none; mask-image: none; }
  .console-screen { height: min(420px, 60vh); }
  .console-line { display: flex; } .console-line input { flex: 1; width: auto; min-width: 0; }
  .summary.sticky-xl { position: static; }
}

/* Tablets & small laptops (sidebar may still be open at 992–1199) */
@media (max-width: 1199.98px) {
  /* Settings / Account section menu → swipeable chip row instead of a squeezed side column */
  .subnav { display: flex; gap: 8px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
  /* Cloud server list: drop the Created column and trim UUIDs so Status/Charges stay visible */
  .list-table .col-created { display: none; }
  .list-table .uuid { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .list-table td, .list-table th { padding-left: 6px; padding-right: 6px; }
}

/* Deploy: sticky total + Deploy button until the side summary is beside the form (xl) */
@media (max-width: 1199.98px) {
  .deploy-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: var(--sb-w); right: 0; bottom: 0; z-index: 1025; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -12px rgba(15, 23, 42, .18); }
  .deploy-bar small { display: block; color: var(--muted); font-size: 12px; line-height: 1.1; }
  .deploy-bar b { font-size: 22px; letter-spacing: -.4px; color: var(--primary); }
  .deploy-bar span { color: var(--muted); font-size: 13px; }
  .content:has(.deploy-bar) { padding-bottom: 100px; }
}
@media (max-width: 991.98px) { .deploy-bar { left: 0; } }

/* Phones */
@media (max-width: 575.98px) {
  .content { padding: 14px 12px; }
  .card-x { padding: 16px; }
  .page-head { margin-bottom: 16px; align-items: stretch; }
  .page-head h1 { font-size: 22px; }
  .page-actions { width: 100%; } .page-actions > .btn { flex: 1; }
  .stat-val { font-size: 23px; } .stat-val.big { font-size: 29px; }
  .srv-head { padding: 16px; gap: 12px; }
  .srv-title { flex-basis: 100%; min-width: 0; }
  .srv-title h1 { font-size: 23px; word-break: break-word; overflow-wrap: anywhere; }
  .back-btn { width: 40px; height: 40px; }
  .btn-console { flex: 1 1 100%; }
  .tabs-x { margin-bottom: 16px; } .tabs-x a { padding: 12px 11px; font-size: 14.5px; }
  .banner { flex-wrap: wrap; } .banner > div { flex: 1 1 200px; }
  .promo.big, .help-hero { flex-wrap: wrap; } .promo.big > img, .help-hero > img { width: 72px; }
  .ddos-card { padding: 20px; gap: 16px; } .ddos-card > img { width: 80px; }
  .help-hero { padding: 18px; } .help-hero h2 { font-size: 20px; }
  .kv > div { flex-wrap: wrap; min-height: 0; } .kv dt { width: 100%; font-size: 13px; margin-bottom: -6px; } .kv dd { flex: 1 1 0; }
  .ssh-box { padding: 10px 10px 10px 14px; } .ssh-copy { padding: 7px 10px; }
  .donut-wrap { justify-content: center; } .donut-legend { flex-basis: 100%; }
  .traffic-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; } .traffic-sum > div:first-child { grid-column: 1 / -1; }
  .step { font-size: 17px; }
  .type-grid { grid-template-columns: 1fr; } .type-grid .pick > span { padding: 14px; }
  .loc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .os-opt b { font-size: 13px; overflow-wrap: anywhere; }
  .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .plan-card > span { padding: 14px 12px; } .pc-price { font-size: 21px; }
  .plan-opt > span { padding: 12px; } .plan-opt small { flex-basis: 100%; order: 3; }
  .feat-grid { grid-template-columns: 1fr; }
  .reco h3 { font-size: 19px; }
  .section-title.underline { font-size: 18px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); }
  .sf-left, .sf-dev { flex-wrap: wrap; gap: 10px 14px; }
  .modal-dialog { margin: .75rem; }
  .modal-footer > .btn { flex: 1; }
  #toasts { left: 0; right: 0; padding: 12px !important; } #toasts .toast { width: 100%; }
  .auth-points li { font-size: 13px; }
  .social-row { gap: 18px; }
  .auth-row { flex-wrap: wrap; gap: 10px; }
}

/* Touch screens: 32–40px minimum hit areas */
@media (pointer: coarse) {
  .icon-btn.xs, .list-table .icon-btn.xs { width: 32px; height: 32px; }
  .icon-btn.sm { width: 38px; height: 38px; }
  .seg > a, .seg > button { min-height: 36px; padding: 7px 14px; }
  .tag button { width: 28px; height: 28px; }
  .tag.add, .link, .muted-link, .back-link { min-height: 32px; display: inline-flex; align-items: center; }
  .card-head .link { min-height: 36px; }
  .nav-pills-x button { padding: 9px 16px; }
  .btn-sm { padding: .5rem .8rem; }
  .form-switch .form-check-input { width: 2.6em; height: 1.4em; }
  .form-check-input { width: 1.25em; height: 1.25em; }
  .check input { width: 20px; height: 20px; margin-top: 0; }
  .dropdown-item { padding: 11px 12px; }
  .sb-link { padding: 12px; }
  .subnav a { min-height: 40px; }
}
/* No sticky hover effects on touch */
@media (hover: none) {
  .table-x tbody tr:hover td { background: transparent; }
  .qa-grid a:hover { transform: none; }
}

/* ---------- LIVE v2/v3 shell: phone & tablet overrides (body.v2 rules above outrank the generic ones) ---------- */
body.v2 .v3-stats { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
body.v2 .v3-split > *, body.v2 .v3-stack > *, body.v2 .v3-stats > * { min-width: 0; }
body.v2 .btn-group-x > .v3-inline { display: flex; }
body.v2 .list-scroll { -webkit-overflow-scrolling: touch; }
body.v2 .card-head { flex-wrap: wrap; }
@media (max-width: 1199.98px) {
  body.v2 .v3-split.settings-split { grid-template-columns: minmax(0, 1fr); }
  body.v2 .subnav { display: flex; gap: 8px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  body.v2 .subnav a { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
}
@media (max-width: 991.98px) {
  body.v2 .tabs-x { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 28px; }
  body.v2 .tabs-x.at-end { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 767.98px) {
  body.v2 .list-search { width: 100%; }
  body.v2 .list-card { padding: 14px; }
  body.v2 .list-scroll:has(> table.is-stack) { overflow: visible; }
}
@media (max-width: 575.98px) {
  body.v2 main.content { padding: 14px 12px; }
  body.v2 .card-x { padding: 16px; }
  body.v2 .page-head h1 { font-size: 22px; }
  body.v2 .page-actions { width: 100%; } body.v2 .page-actions > .v3-btn { flex: 1; }
  body.v2 .stat-val { font-size: 23px; } body.v2 .stat-val.big { font-size: 27px; }
  body.v2 .srv-head { padding: 16px; gap: 12px; }
  body.v2 .srv-title { flex-basis: 100%; min-width: 0; }
  body.v2 .srv-title h1 { font-size: 23px; overflow-wrap: anywhere; }
  body.v2 .back-btn { width: 40px; height: 40px; }
  body.v2 .srv-actions { width: 100%; }
  body.v2 .btn-group-x { flex: 1 1 100%; }
  body.v2 .btn-group-x > .v3-inline { flex: 1; }
  body.v2 .btn-x { flex: 1; justify-content: center; padding: 10px 8px; }
  body.v2 .btn-x span { display: none; }
  body.v2 .btn-console { flex: 1 1 100%; }
  body.v2 .tabs-x { margin-bottom: 16px; } body.v2 .tabs-x a { padding: 12px 11px; font-size: 14.5px; }
  body.v2 .kv > div { flex-wrap: wrap; min-height: 0; } body.v2 .kv dt { width: 100%; font-size: 13px; margin-bottom: -6px; } body.v2 .kv dd { flex: 1 1 0; }
  body.v2 .bill-grid { grid-template-columns: 1fr; }
  body.v2 .ddos-card { padding: 20px; gap: 16px; } body.v2 .ddos-card > img { width: 80px; }
  body.v2 .qa-grid { grid-template-columns: repeat(2, 1fr); }
  body.v2 .fw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.v2 .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (pointer: coarse) {
  body.v2 .list-table .icon-btn.xs { width: 32px; height: 32px; }
  body.v2 .seg > button { min-height: 36px; padding: 7px 14px; }
  body.v2 .subnav a { min-height: 40px; }
}

/* Native confirm dialogs (cancel service, etc.) */
body.v2 dialog.v3-dialog,
body.v2 dialog.v3-dialog.sheet,
body.v2 dialog {
  border: 0;
  border-radius: 14px;
  padding: 20px;
  max-width: 420px;
  width: min(420px, calc(100vw - 32px));
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
body.v2 dialog.v3-dialog.sheet,
body.v2 dialog.sheet {
  /* Override legacy app.css dialog.sheet { overflow: visible } which let inputs spill out. */
  overflow-x: hidden;
  overflow-y: auto;
  max-width: min(520px, calc(100vw - 32px));
  width: min(520px, calc(100vw - 32px));
}
body.v2 dialog::backdrop {
  background: rgba(16, 23, 43, .45);
}
body.v2 dialog h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
body.v2 dialog p {
  margin: 0 0 8px;
  line-height: 1.45;
}
body.v2 dialog form,
body.v2 dialog .v3-field,
body.v2 dialog .bill-grid {
  min-width: 0;
  max-width: 100%;
}
body.v2 dialog .bill-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
body.v2 dialog .bill-grid > div {
  min-width: 0;
}
body.v2 dialog .bill-grid b,
body.v2 dialog .mono {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.v2 dialog .v3-field input,
body.v2 dialog .v3-field select,
body.v2 dialog .v3-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.v2 .dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
/* Hold overlay must stay a full-screen dim, not a tall white dialog column. */
body.v2 dialog.deploy-hold {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
body.v2 dialog.deploy-hold:not([open]) {
  display: none;
}
body.v2 dialog.deploy-hold .deploy-hold-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 24px 70px #0004;
}
body.v2 dialog.deploy-hold .deploy-hold-card p {
  margin: 0;
}
