/* ════════════════════════════════════════════════
   EC2 Control Portal — styles.css
   CloudPilot-inspired light theme
   Responsive: Desktop → Tablet (≤1024px) → Mobile (≤768px) → Small (≤480px)
════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --bg:    #f1f5fb;
  --bg2:   #e8edf8;
  --white: #ffffff;
  --s2:    #f6f8ff;
  --bd:    #dde4f2;
  --bd2:   #c8d3e9;

  /* Sidebar */
  --navy:  #122c53;
  --navy2: #0f1e38;
  --navy3: #162448;

  /* Text */
  --ink:  #0d1b3e;
  --ink2: #2d4070;
  --ink3: #4e6cb3;
  --ink4: #8fa5cc;

  /* Accents */
  --blue:   #2460e0;
  --blue2:  #3b7fff;
  --blue3:  #93bbff;
  --bdim:   rgba(37,99,235,.08);
  --bglow:  rgba(37,99,235,.2);

  --green:  #059669;
  --green2: #10b981;
  --gdim:   rgba(5,150,105,.08);
  --gglow:  rgba(5,150,105,.18);

  --red:    #dc2626;
  --red2:   #ef4444;
  --rdim:   rgba(220,38,38,.07);

  --amber:  #d97706;
  --amber2: #f59e0b;
  --adim:   rgba(217,119,6,.09);

  --cyan:   #0891b2;
  --cyan2:  #06b6d4;
  --cdim:   rgba(8,145,178,.09);

  --violet: #7c3aed;
  --vdim:   rgba(124,58,237,.08);

  /* Fonts */
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Mono', monospace;

  /* Layout */
  --sw: 256px;
  --th: 58px;

  /* Radii */
  --r:   8px;
  --rsm: 5px;
  --rlg: 12px;
  --rxl: 18px;

  /* Shadows */
  --sh:  0 1px 3px rgba(13,27,62,.06), 0 1px 2px rgba(13,27,62,.04);
  --shm: 0 4px 16px rgba(13,27,62,.10), 0 2px 4px rgba(13,27,62,.06);
  --shl: 0 12px 40px rgba(13,27,62,.13), 0 4px 8px rgba(13,27,62,.07);
  --shb: 0 4px 18px rgba(37,99,235,.2);
  --shg: 0 4px 18px rgba(5,150,105,.18);
}

/* ════════ RESET ════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: none;
}
body.ready { display: flex; }
a { cursor: pointer; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--blue);
}

/* ════════ APP SHELL ════════ */
.app { display: flex; width: 100vw; height: 100vh; overflow: hidden; }

/* ════════ SIDEBAR ════════ */
.sidebar {
  width: var(--sw);
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 30;
  box-shadow: 3px 0 24px rgba(10,22,40,.28);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 24px 24px;
}
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom,
    transparent 8%, rgba(59,127,255,.3) 35%, rgba(59,127,255,.3) 65%, transparent 92%);
}

/* Logo */
.sb-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.logo-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue2), #1e3a8a);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px var(--bglow);
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.logo-name {
  font-size: 15px; font-weight: 800;
  color: #fff; letter-spacing: -.3px; line-height: 1;
}
.logo-tag {
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(255,255,255,.4);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.sb-close-btn {
  display: none;
  margin-left: auto;
  background: none; border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer; padding: 4px;
}
.sb-close-btn svg { width: 18px; height: 18px; }

/* Fleet pulse */
.sb-fleet {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.fleet-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green2);
  box-shadow: 0 0 6px var(--green2);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; } 50% { opacity:.4; }
}
.fleet-label { font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .5px; }
.fleet-val { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.75); margin-left: auto; }

/* Nav */
.sb-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.sb-nav::-webkit-scrollbar { width: 4px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.nav-section {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,.25);
  text-transform: uppercase;
  letter-spacing: .9px;
  padding: 14px 20px 6px;
}
.nitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.55);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: background .15s, color .15s;
  position: relative;
  user-select: none;
}
.nitem svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nitem:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.nitem.on {
  background: rgba(59,127,255,.15);
  color: #fff;
}
.nitem.on::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--blue2);
  border-radius: 0 2px 2px 0;
}
.nbadge {
  margin-left: auto;
  background: var(--blue2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nbadge-gold { background: var(--amber); }

/* Sidebar footer */
.sb-foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.rbac-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(124,58,237,.2);
  border: 1px solid rgba(124,58,237,.3);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}
.rbac-badge svg { width: 11px; height: 11px; stroke: var(--violet); }
.rbac-badge span { font-size: 10px; font-weight: 700; color: #b79ef5; letter-spacing: .5px; text-transform: uppercase; }
.sb-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sb-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue2), #1e3a8a);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sb-uname { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.sb-urole { font-size: 10.5px; color: rgba(255,255,255,.35); text-transform: capitalize; }
.online-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green2);
  margin-left: auto;
  flex-shrink: 0;
}
.btn-logout {
  background: none; border: none; cursor: pointer;
  color: #fff;
  padding: 5px;
  border-radius: var(--rsm);
  transition: color .15s;
}
.btn-logout:hover { color: rgba(255,255,255,.9); }
.btn-logout svg { width: 14px; height: 14px; display: block; }

/* ════════ MAIN CONTENT AREA ════════ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ════════ TOPBAR ════════ */
.topbar {
  height: var(--th);
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  z-index: 20;
  box-shadow: var(--sh);
}
.hamburger {
  display: none;
  background: none; border: none;
  color: var(--ink3);
  cursor: pointer; padding: 4px;
  align-items: center;
}
.hamburger svg { width: 20px; height: 20px; display: block; }
.tb-brand { display: flex; align-items: center; gap: 6px; }
.tb-logo-text { font-size: 14px; font-weight: 700; color: var(--navy); }
.tb-sep { color: var(--bd2); font-size: 16px; }
.tb-page { font-size: 14px; font-weight: 500; color: var(--ink3); }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tb-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.pill-cost {
  background: var(--adim);
  color: var(--amber);
  border: 1px solid rgba(217,119,6,.2);
}
.pill-cost svg { width: 12px; height: 12px; stroke: var(--amber); fill: none; }
.pill-sess {
  background: var(--bdim);
  color: var(--blue);
  border: 1px solid rgba(37,99,235,.15);
}
.pill-sess svg { width: 12px; height: 12px; stroke: var(--blue); fill: none; }
.sess-timer { font-family: var(--mono); font-size: 11px; }
.tb-divider { width: 1px; height: 20px; background: var(--bd); }
.tb-clock { font-family: var(--mono); font-size: 12px; color: var(--ink3); }

/* ════════ PAGE CONTENT ════════ */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}
.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 3px; }

/* Page views */
.pv { display: none; }
.pv.on { display: block; }

/* Page header */
.ph { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.ph-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; }
.ph-sub { font-size: 14px; color: var(--ink3); margin-top: 3px; }
.ph-r { display: flex; align-items: center; gap: 8px; padding-top: 4px; }

/* ════════ STAT CARDS ════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.scard {
  background: var(--white);
  border-radius: var(--rlg);
  padding: 16px 18px;
  box-shadow: var(--sh);
  border: 1px solid var(--bd);
  position: relative;
  overflow: hidden;
}
.scard-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.scard-ico {
  width: 36px; height: 36px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.scard-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scard-ico.blue   { background: var(--bdim); color: var(--blue); }
.scard-ico.green  { background: var(--gdim); color: var(--green); }
.scard-ico.red    { background: var(--rdim); color: var(--red); }
.scard-ico.amber  { background: var(--adim); color: var(--amber); }
.scard-ico.violet { background: var(--vdim); color: var(--violet); }
.scard-ico.cyan   { background: var(--cdim); color: var(--cyan); }
.scard-trend { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 20px; }
.scard-val { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; line-height: 1; }
.scard-val.green  { color: var(--green); }
.scard-val.red    { color: var(--red); }
.scard-val.amber  { color: var(--amber); }
.scard-val.blue   { color: var(--blue); }
.scard-val.cyan   { color: var(--cyan); }
.scard-lbl { font-size: 13px; font-weight: 600; color: var(--ink2); margin-top: 4px; }
.scard-sub { font-size: 12px; color: var(--ink4); margin-top: 2px; }
.scard-bar { height: 3px; background: var(--bg2); border-radius: 2px; margin-top: 12px; }
.scard-fill          { height: 100%; border-radius: 2px; transition: width .4s; background: var(--blue); }
.scard-fill.green    { background: var(--green); }
.scard-fill.red      { background: var(--red); }
.scard-fill.amber    { background: var(--amber); }

/* ════════ CARDS ════════ */
.card {
  background: var(--white);
  border-radius: var(--rlg);
  border: 1px solid var(--bd);
  box-shadow: var(--sh);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-hd {
  display: flex;
  align-items: center;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--bg2);
  gap: 8px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.card-hint { font-size: 11.5px; color: var(--ink4); margin-left: auto; }
.cdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cdot.blue   { background: var(--blue2); }
.cdot.amber  { background: var(--amber); }
.cdot.green  { background: var(--green); }
.cdot.red    { background: var(--red); }
.cdot.violet { background: var(--violet); }
.cdot.cyan   { background: var(--cyan); }
.cdot.navy   { background: var(--navy); }
.card-body { padding: 14px 18px; }

/* ════════ BUTTONS ════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
  font-family: var(--sans);
  line-height: 1;
}
.btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-blue  { background: var(--blue);  color: #fff; border-color: var(--blue);  }
.btn-blue:hover  { background: var(--blue2); border-color: var(--blue2); box-shadow: var(--shb); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: #047857; box-shadow: var(--shg); }
.btn-red   { background: var(--red);   color: #fff; border-color: var(--red);   }
.btn-red:hover   { background: var(--red2); }
.btn-out   { background: transparent; color: var(--ink2); border-color: var(--bd2); }
.btn-out:hover   { background: var(--bg2); border-color: var(--ink3); }
.btn-ghost { background: transparent; color: var(--ink3); border-color: transparent; }
.btn-ghost:hover { background: var(--bg2); }
.btn-sm    { padding: 5px 11px; font-size: 13px; }
.btn-xs    { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.ml-auto { margin-left: auto; }

/* ════════ DASHBOARD GRID ════════ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
}
.dash-list-wrap { overflow-y: auto; max-height: 380px; }
.dash-list-wrap::-webkit-scrollbar { width: 4px; }
.dash-list-wrap::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px; }

/* Dash list rows */
.dl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--bg2);
  transition: background .12s;
  cursor: pointer;
}
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: var(--s2); }
.dl-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink4);
}
.dl-dot.running { background: var(--green2); box-shadow: 0 0 0 3px var(--gdim); animation: pulse-dot 2s infinite; }
.dl-dot.stopped { background: #b0bcd4; }
.dl-dot.pending { background: var(--amber2); }
.dl-info { flex: 1; min-width: 0; }
.dl-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-meta { font-size: 10.5px; color: var(--ink3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-sep  { font-size: 13px; color: var(--ink4); flex-shrink: 0; }
.dl-btns { display: flex; gap: 5px; flex-shrink: 0; }
.dl-start-btn { display: inline-flex; align-items: center; gap: 4px; }
.dl-start-btn svg { width: 10px; height: 10px; }

/* Inline detail panel row */
.dp-inline-row td { background: var(--bg); }
.dp-inline-row .dp { margin: 0; border-radius: 0; box-shadow: none; border-top: 2px solid var(--blue2); border-bottom: 2px solid var(--blue2); }
.inst-row-selected td { background: var(--bdim) !important; }
.inst-row { cursor: pointer; }

/* State badge */
.sbadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.sbadge-dot { width: 5px; height: 5px; border-radius: 50%; }
.sbadge.running  { background: var(--gdim); color: var(--green); }
.sbadge.running .sbadge-dot  { background: var(--green); animation: pulse-dot 2s infinite; }
.sbadge.stopped  { background: var(--rdim); color: var(--red); }
.sbadge.stopped .sbadge-dot  { background: var(--red); }
.sbadge.pending, .sbadge.stopping, .sbadge.starting { background: var(--adim); color: var(--amber); }
.sbadge.pending .sbadge-dot,
.sbadge.stopping .sbadge-dot,
.sbadge.starting .sbadge-dot { background: var(--amber); }

/* Activity feed */
.feed-wrap { padding: 8px 0; max-height: 380px; overflow-y: auto; }
.feed-wrap::-webkit-scrollbar { width: 3px; }
.feed-wrap::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px; }
.log-ul { list-style: none; }
.log-li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--bg2);
  font-size: 12px;
}
.log-li:last-child { border-bottom: none; }
.log-t { font-family: var(--mono); font-size: 10.5px; color: var(--ink4); flex-shrink: 0; }
.log-d { width: 5px; height: 5px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.log-d.ok   { background: var(--green); }
.log-d.err  { background: var(--red); }
.log-d.sys  { background: var(--ink4); }
.log-d.warn { background: var(--amber); }
.log-m { flex: 1; color: var(--ink2); line-height: 1.4; }
.lchip { font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; text-transform: uppercase; }
.lchip.ok   { background: var(--gdim); color: var(--green); }
.lchip.err  { background: var(--rdim); color: var(--red); }
.lchip.sys  { background: var(--bdim); color: var(--blue); }
.lchip.warn { background: var(--adim); color: var(--amber); }

/* ════════ INSTANCES PAGE ════════ */
.ag {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: var(--rlg);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--sh);
}
.ag-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--s2);
  border-bottom: 1px solid var(--bg2);
  cursor: pointer;
  user-select: none;
}
.ag-hd:hover { background: var(--bg2); }
.ag-arrow { width: 14px; height: 14px; fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex-shrink: 0; }
.ag-arrow.open { transform: rotate(90deg); }
.ag-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ag-id   { font-family: var(--mono); font-size: 10.5px; color: var(--ink4); }
.ag-count {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  background: var(--bdim); color: var(--blue);
  padding: 2px 8px; border-radius: 20px;
}
.ag-body.collapsed { display: none; }

.itbl { width: 100%; border-collapse: collapse; }
.itbl th {
  padding: 8px 14px;
  font-size: 11px; font-weight: 600;
  color: var(--ink3);
  text-align: left;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.itbl td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--bg2);
  vertical-align: middle;
}
.itbl tr:last-child td { border-bottom: none; }
.itbl tr:hover td { background: var(--s2); cursor: pointer; }
.itbl .mono { font-family: var(--mono); font-size: 11.5px; }
.itbl .inst-name { font-weight: 600; }

/* Detail panel */
#dp-wrap { margin-top: 14px; }
.dp {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: var(--rlg);
  overflow: hidden;
  box-shadow: var(--shm);
  position: relative;
}
.dp-stripe { height: 3px; background: linear-gradient(90deg, var(--blue2), var(--cyan)); }
.dp-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--bg2);
  gap: 12px;
}
.dp-name { font-size: 18px; font-weight: 800; color: var(--ink); }
.dp-id   { font-family: var(--mono); font-size: 11px; color: var(--ink3); margin-top: 2px; }
.dp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.dp-badge.running  { background: var(--gdim); color: var(--green); }
.dp-badge.stopped  { background: var(--rdim); color: var(--red); }
.dp-badge.pending, .dp-badge.stopping, .dp-badge.starting { background: var(--adim); color: var(--amber); }
.dp-sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dp-badge.running .dp-sdot { animation: pulse-dot 2s infinite; }
.dp-metrics {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bg2);
}
.dp-m { background: var(--white); padding: 12px 16px; }
.dp-ml { font-size: 10.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.dp-mv { font-size: 14px; font-weight: 600; color: var(--ink); }
.dp-mv.blue   { color: var(--blue); }
.dp-mv.amber  { color: var(--amber); }
.dp-mv.violet { color: var(--violet); }
.mono-sm { font-family: var(--mono); font-size: 11.5px; }
.dp-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--s2);
  border-bottom: 1px solid var(--bg2);
  flex-wrap: wrap;
}
.dp-ctrl-lbl { font-size: 11px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-right: 4px; }
.dp-tags { padding: 12px 16px; }
.dp-tags-lbl { font-size: 10.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--bg2); border: 1px solid var(--bd);
  padding: 2px 8px; border-radius: 4px;
  color: var(--ink2);
}

/* ════════ BILLING PAGE ════════ */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 3px; }
.filter-lbl { font-size: 10.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; }
.fsel {
  padding: 7px 10px;
  border: 1.5px solid var(--bd);
  border-radius: var(--rsm);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
  min-width: 130px;
}
.fsel:focus { border-color: var(--blue2); }
.bill-tbl { width: 100%; border-collapse: collapse; }
.bill-tbl th {
  padding: 9px 14px;
  font-size: 10.5px; font-weight: 600;
  color: var(--ink3);
  text-align: left;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.bill-tbl td { padding: 11px 14px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--bg2); vertical-align: middle; }
.bill-tbl tr:last-child td { border-bottom: none; }
.bill-tbl .mono { font-family: var(--mono); font-size: 11.5px; }
.cost-hi { font-weight: 700; color: var(--amber); }
.cost-lo { color: var(--ink3); }
.ce-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(8,145,178,.1); color: var(--cyan);
  border: 1px solid rgba(8,145,178,.25);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .3px;
}
.limited-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--adim); color: var(--amber);
  border: 1px solid rgba(217,119,6,.2);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
}
.bill-disclaimer {
  font-size: 11.5px; color: var(--ink3);
  padding: 10px 18px 14px;
  line-height: 1.6;
  border-top: 1px solid var(--bg2);
}
.bill-disclaimer strong { color: var(--ink2); }
.session-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--bg2);
}
.session-row:last-child { border-bottom: none; }
.session-name { font-weight: 600; font-size: 14px; color: var(--ink); flex: 1; min-width: 0; }
.session-type { font-family: var(--mono); font-size: 10.5px; color: var(--ink4); }
.session-cost { font-weight: 700; font-size: 14px; color: var(--amber); margin-left: auto; flex-shrink: 0; }
.session-bar-wrap { width: 80px; height: 4px; background: var(--bg2); border-radius: 2px; flex-shrink: 0; }
.session-bar-fill { height: 100%; background: var(--amber); border-radius: 2px; transition: width .4s; }

/* ════════ BILLING REPORT ════════ */

/* 4-col stat grid for billing */
.billing-stats { grid-template-columns: repeat(4, 1fr) !important; }

/* "Get Cost Update" amber button */
.btn-amber {
  background: var(--amber);
  color: #fff;
  border: none;
}
.btn-amber:hover { background: #b45309; }
.btn-amber svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; }

/* Filter note */
.bill-filter-note {
  font-size: 11px; color: var(--ink4);
  font-style: italic; padding-bottom: 2px;
  white-space: nowrap;
}

/* Prompt / loading / error states */
.bill-prompt-state, .bill-loading-state, .bill-error-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 40px 24px; text-align: center;
}
.bill-prompt-ico { font-size: 36px; opacity: .6; }
.bill-prompt-msg { font-size: 14px; color: var(--ink2); font-weight: 500; }
.bill-prompt-sub { font-size: 12px; color: var(--ink4); max-width: 420px; line-height: 1.6; }

.bill-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bd);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.bill-loading-msg { font-size: 14px; color: var(--ink2); font-weight: 500; }
.bill-loading-sub { font-size: 11.5px; color: var(--ink4); max-width: 400px; line-height: 1.5; }

.bill-error-ico  { font-size: 30px; }
.bill-error-msg  { font-size: 14px; color: var(--red); font-weight: 600; }
.bill-error-detail { font-size: 12px; color: var(--ink3); max-width: 380px; }

/* Per-account card */
.acct-report-card {
  border-bottom: 1px solid var(--bd);
  padding: 0;
}
.acct-report-card:last-of-type { border-bottom: none; }

.acct-report-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 10px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
}
.acct-report-name {
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.acct-report-id {
  font-size: 11px; color: var(--ink4);
  font-family: var(--mono);
}

/* Mini cost summary row */
.acct-cost-summary {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--bd);
  overflow-x: auto;
}
.mini-cost-box {
  flex: 1; min-width: 110px;
  padding: 12px 16px;
  border-right: 1px solid var(--bd);
}
.mini-cost-box:last-child { border-right: none; }
.mini-cost-lbl {
  font-size: 10px; color: var(--ink4);
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 4px; font-weight: 600;
}
.mini-cost-val { font-size: 16px; font-weight: 700; font-family: var(--mono); }
.cost-amber { color: var(--amber); }
.cost-cyan  { color: var(--cyan); }
.cost-blue  { color: var(--blue); }
.cost-muted { color: var(--ink3); font-size: 14px; }
.cost-zero  { color: var(--ink4); font-weight: 400; font-size: 13px; }
.cost-num   { font-family: var(--mono); font-size: 12px; color: var(--ink); }

/* Report sections */
.acct-report-sections { padding: 0; }
.report-section {
  border-bottom: 1px solid var(--bd);
  padding: 14px 18px;
}
.report-section:last-child { border-bottom: none; }
.report-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--ink3);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.report-section-hint {
  font-size: 10.5px; color: var(--ink4);
  font-weight: 400; text-transform: none; letter-spacing: 0;
}
.report-empty-msg { font-size: 12.5px; color: var(--ink4); padding: 4px 0; }

/* Service breakdown bars */
.svc-breakdown { display: flex; flex-direction: column; gap: 2px; }
.svc-bar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0;
}
.svc-bar-row:hover { background: rgba(255,255,255,.02); }
.svc-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink4); flex-shrink: 0;
}
.ec2-dot { background: var(--amber); }
.svc-bar-name {
  display: flex; align-items: center; gap: 6px;
  width: 170px; flex-shrink: 0;
  font-size: 12.5px; color: var(--ink2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.svc-bar-track {
  flex: 1; height: 7px; background: var(--bg2);
  border-radius: 4px; overflow: hidden;
  min-width: 80px;
}
.svc-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.svc-bar-pct {
  width: 38px; text-align: right; flex-shrink: 0;
  font-size: 11px; color: var(--ink4);
  font-family: var(--mono);
}
.svc-bar-cost {
  width: 80px; text-align: right; flex-shrink: 0;
}

/* EC2 usage type table */
.ut-table-wrap { overflow-x: auto; }
.ut-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.ut-table th {
  padding: 7px 12px; font-size: 10.5px; font-weight: 700;
  color: var(--ink3); text-transform: uppercase; letter-spacing: .4px;
  background: var(--bg2); border-bottom: 1px solid var(--bd); text-align: left;
}
.ut-table td { padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,.03); vertical-align: middle; }
.ut-table tr:last-child td { border-bottom: none; }
.ut-type { font-family: var(--mono); font-size: 11.5px; color: var(--ink2); }
.ut-cat  { }
.ut-qty  { font-family: var(--mono); font-size: 11.5px; color: var(--ink3); }
.ut-cost { font-family: var(--mono); font-size: 12px; color: var(--amber); font-weight: 600; text-align: right; }
.ut-badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.ut-compute { background: rgba(217,119,6,.12); color: var(--amber); }
.ut-storage { background: rgba(8,145,178,.12); color: var(--cyan); }
.ut-network { background: rgba(79,70,229,.12); color: #818cf8; }
.ut-other   { background: var(--bg2); color: var(--ink4); }

/* Daily trend */
.daily-trend-wrap { display: flex; flex-direction: column; gap: 4px; }
.daily-trend-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.daily-trend-date {
  width: 52px; flex-shrink: 0;
  font-size: 11px; color: var(--ink3); font-family: var(--mono);
}
.daily-trend-track {
  flex: 1; height: 6px; background: var(--bg2);
  border-radius: 3px; overflow: hidden;
}
.daily-trend-fill {
  height: 100%; background: var(--amber);
  border-radius: 3px; transition: width .4s;
  opacity: .75;
}
.daily-trend-cost {
  width: 80px; text-align: right; flex-shrink: 0;
}

/* Spin animation for button loading */
.spin-icon { display: inline-block; animation: spin .6s linear infinite; }

/* ════════ ANALYTICS PAGE ════════ */
.an-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
#fleet-ring { padding: 20px; display: flex; align-items: center; justify-content: center; }
.ring-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.ring-center { position: absolute; text-align: center; }
.ring-pct { font-size: 28px; font-weight: 800; color: var(--ink); }
.ring-sub { font-size: 11px; color: var(--ink3); }
.acct-bar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--bg2);
}
.acct-bar-row:last-child { border-bottom: none; }
.acct-bar-name { font-size: 12.5px; color: var(--ink2); width: 130px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-bar-track { flex: 1; height: 8px; background: var(--bg2); border-radius: 4px; }
.acct-bar-fill  { height: 100%; background: var(--amber); border-radius: 4px; transition: width .4s; }
.acct-bar-val { font-family: var(--mono); font-size: 11.5px; color: var(--amber); font-weight: 600; width: 70px; text-align: right; flex-shrink: 0; }
.type-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.type-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 8px 14px;
  background: var(--cdim); border: 1px solid rgba(8,145,178,.2);
  border-radius: var(--r); gap: 3px;
}
.type-chip-name  { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--cyan); }
.type-chip-count { font-size: 10.5px; color: var(--ink3); }
.cproj-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--bg2);
}
.cproj-row:last-child { border-bottom: none; }
.cproj-name { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cproj-type { font-family: var(--mono); font-size: 10.5px; color: var(--ink4); flex-shrink: 0; }
.cproj-cost { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--green); flex-shrink: 0; }
.an-act-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--bg2);
}
.an-act-row:last-child { border-bottom: none; }
.an-act-name { flex: 1; font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-act-count { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--blue); width: 30px; text-align: right; flex-shrink: 0; }
.an-act-bar-wrap { width: 80px; height: 4px; background: var(--bg2); border-radius: 2px; flex-shrink: 0; }
.an-act-bar-fill { height: 100%; background: var(--blue); border-radius: 2px; }

/* ════════ AUDIT PAGE ════════ */
.audit-card {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: var(--rlg);
  box-shadow: var(--sh);
  overflow: hidden;
  margin-bottom: 16px;
}
.audit-toolbar {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  border-bottom: 1px solid var(--bd);
}
.view-toggle {
  display: flex;
  background: var(--bg2);
  border-radius: var(--rsm);
  padding: 3px;
  gap: 2px;
}
.view-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: none;
  background: none; color: var(--ink3);
  font-family: var(--sans);
  transition: all .15s;
}
.view-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.view-btn.active { background: var(--white); color: var(--blue); box-shadow: var(--sh); }
.audit-filters {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--bg2);
}
.audit-input {
  padding: 7px 10px;
  border: 1.5px solid var(--bd); border-radius: var(--rsm);
  font-size: 12.5px; color: var(--ink);
  background: var(--white); font-family: var(--sans);
  outline: none; transition: border-color .15s;
  min-width: 160px;
}
.audit-input:focus { border-color: var(--blue2); }
.audit-input-wide { min-width: 240px; }
.audit-select {
  padding: 7px 10px;
  border: 1.5px solid var(--bd); border-radius: var(--rsm);
  font-size: 12.5px; color: var(--ink);
  background: var(--white); font-family: var(--sans);
  outline: none; cursor: pointer;
}
.btn-search {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--rsm);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--sans); transition: background .15s;
}
.btn-search:hover { background: var(--blue2); }
.btn-search svg { fill: none; stroke: currentColor; stroke-width: 2.2; }
.audit-table-wrap { overflow-x: auto; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.audit-table th {
  padding: 8px 14px;
  font-size: 10.5px; font-weight: 600; color: var(--ink3);
  text-align: left; background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.audit-table td {
  padding: 9px 14px; border-bottom: 1px solid var(--bg2);
  color: var(--ink); vertical-align: middle;
}
.audit-table tr:last-child td { border-bottom: none; }
.audit-cell-mono { font-family: var(--mono); font-size: 11px; }
.audit-cell-time { white-space: nowrap; color: var(--ink3); }
.audit-cell-user { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-action {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.action-start   { background: var(--gdim); color: var(--green); }
.action-stop    { background: var(--rdim); color: var(--red); }
.action-auto    { background: var(--adim); color: var(--amber); }
.action-neutral { background: var(--bdim); color: var(--blue); }
.action-linked  { background: rgba(6,182,212,.12); color: #0891b2; }
.audit-result {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 600;
}
.result-ok  { background: var(--gdim); color: var(--green); }
.result-err { background: var(--rdim); color: var(--red); }
.audit-inst-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.audit-inst-id { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); margin-top: 1px; }
.audit-more-row { padding: 12px; text-align: center; }
.btn-load-more {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 16px; background: var(--bdim); color: var(--blue);
  border: 1.5px solid rgba(37,99,235,.2); border-radius: var(--r);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.btn-load-more:hover { background: var(--blue); color: #fff; }
.audit-loading, .audit-empty, .table-empty, .table-empty-block {
  padding: 32px; text-align: center; color: var(--ink4); font-size: 13px;
}
.audit-count { font-size: 11.5px; color: var(--ink3); margin-left: 4px; }

/* Daily Summary — instance picker */
.daily-filter-bar { flex-wrap: wrap; }
.daily-inst-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 320px; }
.daily-inst-select { flex: 1; min-width: 180px; max-width: 280px; }
.daily-inst-or { font-size: 11px; color: var(--ink4); white-space: nowrap; flex-shrink: 0; }

/* Audit v2 — redesigned filter bar */
.audit-filters-v2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.audit-filter-input-wrap { position: relative; display: flex; align-items: center; }
.audit-filter-icon {
  position: absolute; left: 9px; pointer-events: none;
  fill: none; stroke: var(--ink4); stroke-width: 2; stroke-linecap: round;
}
.audit-filter-input-wrap .audit-input { padding-left: 28px; min-width: 180px; }
.btn-audit-clear {
  padding: 5px 13px; background: transparent; color: var(--ink3);
  border: 1.5px solid var(--bg3); border-radius: var(--r);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--sans);
  transition: all .15s; white-space: nowrap;
}
.btn-audit-clear:hover { background: var(--rdim); color: var(--red); border-color: var(--red); }
.audit-record-count { font-size: 12px; color: var(--ink3); margin-left: 4px; white-space: nowrap; }

/* Audit v2 — table cells */
.audit-cell-instance { min-width: 160px; }
.audit-cell-account  { min-width: 140px; }
.audit-cell-type     { font-family: var(--mono); font-size: 11.5px; color: var(--ink2); }
.audit-cell-region   { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.audit-acct-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.audit-acct-id   { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); margin-top: 1px; }
.audit-inst-id   { color: var(--blue); }
.audit-cell-center { text-align: center; }

/* Daily summary */
.daily-summary-header { padding: 14px 18px; border-bottom: 1px solid var(--bg2); }
.daily-meta-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.daily-badge {
  padding: 3px 9px; border-radius: 4px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
}
.badge-id   { background: var(--bdim); color: var(--blue); }
.badge-type { background: var(--vdim); color: var(--violet); }
.badge-rate { background: var(--adim); color: var(--amber); }
.daily-totals-row { display: flex; gap: 24px; flex-wrap: wrap; }
.daily-total-label { font-size: 10.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; }
.daily-total-val   { font-size: 18px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.running-hrs { color: var(--green); }
.cost-val    { color: var(--amber); }
.daily-table td { font-size: 12.5px; }
.daily-bar-wrap { height: 6px; background: var(--bg2); border-radius: 3px; display: inline-block; width: 80px; vertical-align: middle; margin-right: 6px; }
.daily-bar-fill { height: 100%; background: var(--green); border-radius: 3px; }
.daily-hrs { font-family: var(--mono); font-size: 11px; font-weight: 600; vertical-align: middle; }
.stopped-hrs { color: var(--ink3); }
.daily-events-count { color: var(--ink3); text-align: center; }
.audit-cell-cost { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--amber); }
.audit-cell-center { text-align: center; }
.daily-disclaimer {
  padding: 10px 14px; font-size: 11px; color: var(--ink4);
  background: var(--s2); border-top: 1px solid var(--bg2); line-height: 1.6;
}

/* ════════ ACCOUNTS PAGE ════════ */
.act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding-top: 2px;
}
.act-card {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 18px;
  box-shadow: var(--sh); transition: box-shadow .15s;
}
.act-card:hover { box-shadow: var(--shm); }
.act-card-hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.act-avatar {
  width: 40px; height: 40px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--blue2), #1e3a8a);
  display: grid; place-items: center; flex-shrink: 0;
}
.act-avatar.central { background: linear-gradient(135deg, var(--green2), #047857); }
.act-avatar svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 1.8; }
.act-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.act-id   { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); margin-top: 2px; }
.act-role-arn { font-family: var(--mono); font-size: 10px; color: var(--ink4); word-break: break-all; margin-bottom: 12px; }
.act-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.act-tag { padding: 2px 8px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
.act-tag.enabled  { background: var(--gdim); color: var(--green); }
.act-tag.disabled { background: var(--rdim); color: var(--red); }
.act-tag.central  { background: var(--bdim); color: var(--blue); }
.act-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.act-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: var(--rsm);
  font-size: 11.5px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  font-family: var(--sans); transition: all .15s;
}
.act-btn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.act-btn-test:not(:disabled)    { background: var(--bdim); color: var(--blue); border-color: rgba(37,99,235,.2); }
.act-btn-test:hover:not(:disabled)   { background: var(--blue); color: #fff; }
.act-btn-enable:not(:disabled)  { background: var(--gdim); color: var(--green); border-color: rgba(5,150,105,.2); }
.act-btn-enable:hover:not(:disabled) { background: var(--green); color: #fff; }
.act-btn-disable:not(:disabled) { background: var(--adim); color: var(--amber); border-color: rgba(217,119,6,.2); }
.act-btn-disable:hover:not(:disabled) { background: var(--amber); color: #fff; }
.act-btn-remove:not(:disabled)  { background: var(--rdim); color: var(--red); border-color: rgba(220,38,38,.2); }
.act-btn-remove:hover:not(:disabled)  { background: var(--red); color: #fff; }
.act-btn:disabled { opacity: .4; cursor: not-allowed; }
.acct-toolbar {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.acct-toolbar-left { display: flex; align-items: center; gap: 8px; }
.acct-toolbar-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.btn-icon-sm {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: none; border: 1.5px solid var(--bd);
  border-radius: var(--rsm); cursor: pointer; color: var(--ink3);
  transition: all .15s;
}
.btn-icon-sm:hover { background: var(--bg2); border-color: var(--ink3); }
.btn-icon-sm svg { fill: none; stroke: currentColor; stroke-width: 2.2; }
.btn-add-account {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--r);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); transition: background .15s;
}
.btn-add-account:hover { background: var(--blue2); }
.btn-add-account svg { fill: none; stroke: currentColor; stroke-width: 2.5; }
.add-account-form {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 18px;
  margin-bottom: 16px; box-shadow: var(--sh);
}
.add-form-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.add-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.add-form-field-wide { grid-column: 1 / -1; }
.add-form-label { font-size: 11px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; display: block; }
.add-form-input {
  width: 100%; padding: 8px 10px;
  border: 1.5px solid var(--bd); border-radius: var(--rsm);
  font-size: 13px; color: var(--ink);
  background: var(--white); font-family: var(--sans);
  outline: none; transition: border-color .15s;
}
.add-form-input.mono { font-family: var(--mono); font-size: 11.5px; }
.add-form-input:focus { border-color: var(--blue2); }
.add-form-error { font-size: 12px; color: var(--red); min-height: 16px; margin-bottom: 8px; }
.add-form-actions { display: flex; gap: 8px; }
.add-form-hint { font-size: 11.5px; color: var(--ink4); margin-top: 10px; line-height: 1.5; }
.btn-cancel-form {
  padding: 7px 14px; border: 1.5px solid var(--bd2);
  border-radius: var(--r); background: none;
  font-size: 13px; font-weight: 600; color: var(--ink3);
  cursor: pointer; font-family: var(--sans);
}
.btn-submit-form {
  padding: 7px 14px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--r);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); transition: background .15s;
}
.btn-submit-form:hover { background: var(--blue2); }
.acct-loading { padding: 24px; text-align: center; color: var(--ink4); }
.rbac-info-card {
  display: flex; gap: 14px;
  background: var(--bdim); border: 1px solid rgba(37,99,235,.15);
  border-radius: var(--r); padding: 14px 18px; margin-bottom: 16px;
}
.rbac-icon { width: 24px; flex-shrink: 0; color: var(--blue); padding-top: 2px; }
.rbac-icon svg { width: 18px; height: 18px; }
.rbac-info-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.rbac-info-text { font-size: 12px; color: var(--ink2); line-height: 1.6; }
.rbac-tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700; background: var(--navy); color: #fff;
  margin: 0 3px; text-transform: uppercase;
}

/* ════════ MODAL ════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,62,.45);
  display: none; place-items: center;
  z-index: 100; backdrop-filter: blur(2px);
}
.overlay.open { display: grid; }
.modal {
  background: var(--white); border-radius: var(--rxl);
  width: 480px; max-width: 95vw;
  box-shadow: var(--shl); overflow: hidden;
}
.modal-stripe { height: 3px; background: linear-gradient(90deg, var(--blue2), var(--cyan)); }
.modal-hd { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--bg2); }
.modal-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.modal-sub { font-size: 13px; color: var(--ink3); margin-top: 3px; line-height: 1.5; }
.modal-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--ink3); padding: 4px; border-radius: var(--rsm);
  transition: color .15s; flex-shrink: 0;
}
.modal-close:hover { color: var(--ink); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fg { padding: 14px 20px 0; }
.fl { display: block; font-size: 11px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.finp {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--bd); border-radius: var(--r);
  font-size: 14.5px; color: var(--ink);
  background: var(--white); font-family: var(--sans);
  outline: none; transition: border-color .15s;
}
.finp:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(59,127,255,.1); }
.fhint { font-size: 11px; color: var(--ink4); margin-top: 4px; }
.merr { min-height: 16px; font-size: 12px; color: var(--red); padding: 6px 20px 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 20px 20px; }

/* ════════ TOAST ════════ */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shl); z-index: 999;
  transform: translateY(100px); opacity: 0;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s;
  max-width: 360px; pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.ok   { background: var(--green); color: #fff; }
#toast.err  { background: var(--red);   color: #fff; }
#toast.info { background: var(--blue);  color: #fff; }
#toast.warn { background: var(--amber); color: #fff; }
.toast-ico { font-size: 14px; flex-shrink: 0; }

/* ════════ SIDEBAR BACKDROP ════════ */
.sb-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(13,27,62,.5); z-index: 25;
}

/* ════════ EMPTY STATES ════════ */
.empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px; gap: 8px;
}
.empty-ico { font-size: 32px; }
.empty-t { font-size: 13.5px; color: var(--ink3); text-align: center; }

/* ════════ SPINNER ════════ */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin 1s linear infinite; display: inline-block; }

/* ════════ RESPONSIVE — TABLET ≤1024px ════════ */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dp-metrics { grid-template-columns: repeat(4, 1fr); }
  .an-grid { grid-template-columns: 1fr; }
  .add-form-fields { grid-template-columns: 1fr; }
}

/* ════════ RESPONSIVE — MOBILE ≤768px ════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    z-index: 30;
  }
  .sidebar.open { transform: translateX(0); }
  .sb-close-btn { display: flex; align-items: center; }
  .sb-backdrop.open { display: block; }
  .hamburger { display: flex; }

  .content { padding: 14px; }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dp-metrics { grid-template-columns: repeat(2, 1fr); }
  .ph { flex-direction: column; gap: 10px; }
  .ph-r { align-self: flex-end; }

  .billing-stats { grid-template-columns: 1fr 1fr !important; }

  .audit-filters { flex-direction: column; align-items: stretch; }
  .audit-input, .audit-select, .audit-input-wide { min-width: unset; width: 100%; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-group { width: 100%; }
  .fsel { width: 100%; }

  .act-grid { grid-template-columns: 1fr; }

  .tb-clock { display: none; }
  .tb-divider { display: none; }

  .itbl th:nth-child(5),
  .itbl td:nth-child(5) { display: none; }
}

/* ════════ RESPONSIVE — SMALL ≤480px ════════ */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .billing-stats { grid-template-columns: 1fr !important; }
  .scard-val { font-size: 22px; }
  .pill-cost { display: none; }
  .dp-metrics { grid-template-columns: 1fr; }
  .daily-totals-row { flex-direction: column; gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════
   AUTH PAGE — Professional split-screen login/signup
   Design: Vercel/Linear/PlanetScale aesthetic
   ═══════════════════════════════════════════════════════ */

.auth-page {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

/* ── Brand Panel (left 45%) ── */
.auth-brand {
  position: relative;
  width: 45%;
  min-height: 100vh;
  background: linear-gradient(160deg, #030810 0%, #060f1e 15%, #091528 35%, #0e1e40 60%, #122c53 80%, #1a3868 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px 48px;
  flex-shrink: 0;
}
/* Subtle radial accent glow */
.auth-brand::after {
  content: '';
  position: absolute;
  top: -10%; left: -10%;
  width: 80%; height: 70%;
  background: radial-gradient(ellipse, rgba(36,96,224,.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Animated network topology SVG background */
.auth-bg-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
}
.anode {
  animation: nodePulse 3.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anode:nth-child(2n)  { animation-delay: -1.2s; }
.anode:nth-child(3n)  { animation-delay: -2.1s; }
.anode:nth-child(4n)  { animation-delay: -0.6s; }
.anode:nth-child(5n)  { animation-delay: -2.8s; }
.aline {
  stroke: #2460e0;
  stroke-width: 0.8;
  opacity: 0;
  animation: lineFade 4s ease-in-out infinite;
}
.aline:nth-child(n+16) { animation-delay: -1.5s; }
.aline:nth-child(n+20) { animation-delay: -3s; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}
@keyframes lineFade {
  0%, 100% { opacity: 0.15; }
  50%       { opacity: 0.45; }
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Logo row */
.auth-logorow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 72px;
}
.auth-logo-img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}
.auth-logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.auth-logo-by {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.3px;
  margin-top: 3px;
  text-transform: uppercase;
}

/* Headline */
.auth-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 16px;
}
.auth-lead {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.48);
  line-height: 1.75;
  margin: 0 0 48px;
  max-width: 320px;
}

/* Features list */
.auth-feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-feats li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: -0.1px;
}
.auth-feat-icon {
  width: 30px;
  height: 30px;
  background: rgba(36, 96, 224, 0.14);
  border: 1px solid rgba(36, 96, 224, 0.28);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #7aabff;
  box-shadow: 0 0 0 3px rgba(36,96,224,.06);
}
.auth-feat-icon svg { width: 13px; height: 13px; }

/* Brand footer */
.auth-brand-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.2px;
}

/* ── Form Panel (right 55%) ── */
.auth-form-side {
  flex: 1;
  background: linear-gradient(150deg, #f8faff 0%, #f1f5fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
}
.auth-form-scroller {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 40px;
  min-height: 100%;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

/* ── Auth Cards (each form state) ── */
.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 18px;
  padding: 36px 36px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  animation: authCardIn 220ms cubic-bezier(.16,1,.3,1) both;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card-hd { margin-bottom: 26px; }

.auth-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.auth-icon-badge svg { width: 20px; height: 20px; }
.auth-icon-badge--blue  { background: #eff6ff; color: var(--blue); }
.auth-icon-badge--amber { background: #fffbeb; color: #d97706; }

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin: 0 0 5px;
  line-height: 1.25;
}
.auth-sub {
  font-size: 13.5px;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}
.auth-sub strong { color: var(--ink2); }

/* ── Fields ── */
.auth-field { margin-bottom: 16px; }

.auth-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: -0.1px;
}
.auth-input {
  width: 100%;
  height: 46px;
  border: 1.5px solid #dde4f2;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #f8faff;
  transition: border-color 140ms, box-shadow 140ms, background 140ms;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36,96,224,0.1);
  background: #fff;
}
.auth-input::placeholder { color: #b0b9cc; font-size: 13px; }
.auth-input-code {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 6px;
  text-align: center;
}

/* Password field wrapper */
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 46px; }
.auth-eye {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  padding: 0;
  border-radius: 6px;
  transition: color 120ms;
}
.auth-eye:hover { color: var(--ink3); }
.auth-eye svg { width: 15px; height: 15px; }

/* Password strength bars */
.auth-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.str-bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #e5eaf5;
  transition: background 280ms ease;
}

/* ── Error / Success Messages ── */
.auth-error {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-weight: 500;
  line-height: 1.5;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}
.auth-error.auth-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

/* ── Buttons ── */
.auth-btn {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 110ms, box-shadow 110ms, background 140ms, opacity 140ms, border-color 140ms;
  letter-spacing: -0.1px;
  margin-bottom: 10px;
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.auth-btn-primary {
  background: linear-gradient(135deg, #2460e0 0%, #1a4fc4 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(36,96,224,0.2), 0 6px 16px rgba(36,96,224,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 14px;
}
.auth-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1e54d4 0%, #1540a8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(36,96,224,0.28), 0 12px 28px rgba(36,96,224,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
}
.auth-btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(36,96,224,0.2);
}
.auth-btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1.5px solid var(--bd);
}
.auth-btn-ghost:hover:not(:disabled) {
  background: #f9fafb;
  color: var(--ink);
  border-color: #c8d1e8;
  transform: translateY(-1px);
}

/* Loading spinner inside button */
.auth-btn-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 550ms linear infinite;
  flex-shrink: 0;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
.auth-btn-ghost .auth-btn-spinner {
  border-color: rgba(0,0,0,0.12);
  border-top-color: var(--ink3);
}

/* ── Links & Switch text ── */
.auth-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 110ms;
}
.auth-link:hover { color: #1a4fc4; text-decoration: underline; }
.auth-link-sm { font-size: 12px; }

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin: 6px 0 0;
}

/* ══════════════════════════════════════════════
   AUTH RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .auth-brand { width: 40%; padding: 36px 36px; }
  .auth-lead { display: none; }
  .auth-logorow { margin-bottom: 40px; }
  .auth-headline { font-size: 20px; margin-bottom: 32px; }
}
@media (max-width: 768px) {
  .auth-page { flex-direction: column; min-height: 100svh; }
  .auth-brand {
    width: 100%;
    min-height: auto;
    padding: 20px 24px 18px;
    flex-shrink: 0;
  }
  .auth-brand-inner { height: auto; }
  .auth-logorow { margin-bottom: 0; }
  .auth-headline, .auth-lead, .auth-feats, .auth-brand-footer { display: none; }
  .auth-bg-net { opacity: 0.15; }
  .auth-form-side { flex: 1; min-height: 0; align-items: flex-start; }
  .auth-form-scroller { padding: 32px 24px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .auth-form-scroller { padding: 24px 16px; }
  .auth-title { font-size: 20px; }
  .auth-form-scroller { min-height: calc(100svh - 72px); }
}

/* ════════ USERS PAGE (M8) ════════ */

/* Role badges */
.usr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.usr-badge-admins    { background: rgba(36,96,224,.15); color: var(--blue); }
.usr-badge-operators { background: rgba(5,150,105,.15);  color: var(--green); }
.usr-badge-viewers   { background: rgba(107,114,128,.15); color: var(--ink3); }
.usr-badge-none      { background: rgba(220,38,38,.12);  color: #dc2626; }

/* Role badge in sidebar */
.rbac-badge.rbac-admin    { background: rgba(36,96,224,.12); }
.rbac-badge.rbac-operator { background: rgba(5,150,105,.12); }
.rbac-badge.rbac-operator svg { stroke: var(--green); }
.rbac-badge.rbac-operator span { color: #34d399; }
.rbac-badge.rbac-viewer   { background: rgba(107,114,128,.12); }
.rbac-badge.rbac-viewer svg { stroke: var(--ink3); }
.rbac-badge.rbac-viewer span { color: var(--ink3); }

/* Users table */
.usr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.usr-table thead tr { border-bottom: 1px solid var(--bdr); }
.usr-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 8px 12px;
}
.usr-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.usr-row:hover { background: rgba(255,255,255,.03); }
.usr-disabled { opacity: .5; }
.usr-email { font-weight: 500; color: var(--ink1); font-size: 13px; }
.usr-status-ok  { font-size: 11px; color: var(--green); font-weight: 600; }
.usr-status-dis { font-size: 11px; color: #dc2626; font-weight: 600; }
.usr-accounts-cell { font-size: 12px; }

/* Account assignment chips */
.usr-assign {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--bdr);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--ink2);
  margin: 2px;
  font-family: var(--mono);
}
.usr-assign-lvl {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
}

/* User action buttons */
.usr-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--bdr);
  border-radius: 4px;
  color: var(--ink2);
  cursor: pointer;
  font-size: 12px;
  padding: 3px 8px;
  transition: background .15s;
}
.usr-btn:hover { background: rgba(255,255,255,.12); }
.usr-btn-sm { padding: 2px 5px; font-size: 11px; }
.usr-btn-grant { color: var(--blue); border-color: rgba(36,96,224,.3); }
.usr-btn-grant:hover { background: rgba(36,96,224,.1); }
.usr-btn-apply { background: var(--blue); border-color: var(--blue); color: #fff; }
.usr-btn-apply:hover { background: var(--blue2); }

.usr-role-select {
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: 5px;
  color: var(--ink1);
  font-size: 12px;
  padding: 4px 8px;
  margin-right: 6px;
  cursor: pointer;
}

.usr-actions { white-space: nowrap; }

/* Pending approval card */
.auth-icon-badge--amber { background: rgba(217,119,6,.15); }
.auth-icon-badge--amber svg { stroke: #d97706; }
.auth-pending-hint {
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
  margin: 4px 0 16px;
}

/* ═══════════════════════ BACKUP TAB ═══════════════════════ */

/* Selector */
.bk-selector-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.bk-selector-icon {
  width: 40px; height: 40px;
  background: var(--bdim);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}
.bk-selector-body { flex: 1; min-width: 0; }
.bk-label { display: block; font-size: .75rem; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.bk-select {
  width: 100%; max-width: 520px;
  padding: .55rem .85rem;
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 7px;
  color: var(--ink);
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.bk-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bglow); }

/* Loading spinner */
.bk-spinner-wrap { display: flex; align-items: center; gap: .75rem; padding: 1.5rem; color: var(--ink3); font-size: .9rem; }
.bk-spinner { width: 20px; height: 20px; border: 2px solid var(--bd); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stats strip */
.bk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.bk-stat-card {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.bk-stat-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bk-stat-icon-blue   { background: var(--bdim);  color: var(--blue);  }
.bk-stat-icon-green  { background: var(--gdim);  color: var(--green); }
.bk-stat-icon-purple { background: rgba(124,58,237,.08); color: #7c3aed; }
.bk-stat-icon-amber  { background: var(--adim);  color: var(--amber); }
.bk-stat-val { font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.bk-stat-lbl { font-size: .72rem; color: var(--ink3); margin-top: .1rem; }
.bk-stat-vault-name { font-size: .82rem; word-break: break-all; }

/* Panel */
.bk-panel { margin-bottom: 1.25rem; padding: 1.4rem 1.5rem; }
.bk-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.bk-panel-header-l { display: flex; align-items: center; gap: .85rem; }
.bk-panel-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bk-panel-icon-blue   { background: var(--bdim); color: var(--blue); }
.bk-panel-icon-purple { background: rgba(124,58,237,.08); color: #7c3aed; }
.bk-panel-title { font-size: .95rem; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.3; }
.bk-panel-sub   { font-size: .75rem; color: var(--ink3); margin: .1rem 0 0; }

/* Back Up Now button */
.bk-btn-backup {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.bk-btn-backup:hover:not(:disabled) { background: var(--blue2); }
.bk-btn-backup:active { transform: scale(.97); }
.bk-btn-backup:disabled { opacity: .6; cursor: not-allowed; }

/* Recovery point rows */
.bk-rp-list { display: flex; flex-direction: column; gap: .5rem; }
.bk-rp-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  transition: border-color .15s;
}
.bk-rp-row:hover { border-color: var(--bd2); }
.bk-rp-date { font-size: .85rem; font-weight: 600; color: var(--ink); }
.bk-rp-meta { font-size: .75rem; color: var(--ink3); margin-top: .15rem; }
.bk-rp-size { font-size: .8rem; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-rp-actions { display: flex; gap: .4rem; white-space: nowrap; }

/* Status badges */
.bk-status {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.bk-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.bk-status-completed { background: rgba(5,150,105,.12); color: #059669; }
.bk-status-running   { background: rgba(37,99,235,.12);  color: #2563eb; animation: bk-pulse 1.4s ease-in-out infinite; }
.bk-status-failed    { background: rgba(220,38,38,.12);  color: #dc2626; }
.bk-status-partial   { background: rgba(217,119,6,.12);  color: #d97706; }
.bk-status-          { background: var(--bg2); color: var(--ink3); }
@keyframes bk-pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* Schedule cards */
.bk-plans-list { display: flex; flex-direction: column; gap: .6rem; }
.bk-plan-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  transition: border-color .15s;
}
.bk-plan-card:hover { border-color: var(--bd2); }
.bk-plan-freq-icon { width: 36px; height: 36px; background: rgba(124,58,237,.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #7c3aed; flex-shrink: 0; }
.bk-plan-name  { font-size: .88rem; font-weight: 600; color: var(--ink); }
.bk-plan-meta  { font-size: .75rem; color: var(--ink3); margin-top: .15rem; }
.bk-plan-ret   { font-size: .78rem; color: var(--ink2); background: var(--bg2); border-radius: 5px; padding: .2rem .5rem; white-space: nowrap; }
.bk-plan-last  { font-size: .75rem; color: var(--ink3); white-space: nowrap; }
.bk-plan-last--next { color: var(--blue); }
.bk-plan-actions { display: flex; gap: .4rem; }

/* Empty states */
.bk-empty-state { display: flex; flex-direction: column; align-items: center; padding: 2.5rem 1rem; gap: .6rem; }
.bk-empty-title { font-size: .9rem; font-weight: 600; color: var(--ink2); margin: 0; }
.bk-empty-sub   { font-size: .8rem; color: var(--ink3); margin: 0; text-align: center; }
.bk-view-only   { font-size: .75rem; color: var(--ink3); }

/* Inline expand forms (Restore + Schedule) — appear within their respective panels */
.bk-inline-form {
  border-top: 2px solid var(--blue);
  background: linear-gradient(to bottom, var(--bdim) 0%, var(--white) 100%);
  border-radius: 0 0 10px 10px;
  padding: 1.2rem 1.5rem 1.25rem;
  margin-top: .75rem;
  animation: bk-slide-in .18s ease-out;
}
@keyframes bk-slide-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bk-inline-form-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .65rem;
}
.bk-inline-form-title {
  display: flex; align-items: center; gap: .5rem;
  font-size: .88rem; font-weight: 700; color: var(--blue);
}
.bk-inline-close {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--bd);
  background: var(--white); color: var(--ink3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s; flex-shrink: 0;
}
.bk-inline-close:hover { background: var(--bg2); color: var(--ink); }
.bk-inline-sub { font-size: .8rem; color: var(--ink3); margin: 0 0 .9rem; line-height: 1.5; }
.bk-inline-form-body { display: flex; flex-direction: column; }
.bk-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bk-fg { margin-bottom: 0; }
.bk-inline-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: .6rem;
  margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--bd);
}

/* Notice banner (used in restore inline form) */
.bk-modal-notice { display: flex; align-items: flex-start; gap: .5rem; background: var(--adim); border: 1px solid rgba(217,119,6,.2); border-radius: 7px; padding: .7rem .85rem; margin: .85rem 0; font-size: .78rem; color: var(--amber); line-height: 1.5; }
.bk-modal-notice svg { flex-shrink: 0; margin-top: .1rem; }

/* Active recovery point row (highlighted when its restore form is open) */
.bk-rp-row--active { border-color: var(--blue) !important; background: var(--bdim) !important; }

/* Time picker (hour + minute selects in schedule form) */
.bk-time-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.bk-time-select {
  padding: .45rem .55rem; border: 1px solid var(--bd); border-radius: 7px;
  background: var(--white); color: var(--ink); font-size: .85rem;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.bk-time-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bglow); }
.bk-time-sep { font-size: 1rem; font-weight: 700; color: var(--ink2); line-height: 1; }
.bk-time-unit { font-size: .78rem; color: var(--ink3); font-weight: 600; letter-spacing: .04em; }

/* Restore options */
.bk-restore-options  { display: flex; flex-direction: column; gap: .6rem; }
.bk-radio-label      { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem; border: 1.5px solid var(--bd); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.bk-radio-label:has(input:checked) { border-color: var(--blue); background: var(--bdim); }
.bk-radio-label input { margin-top: .25rem; accent-color: var(--blue); flex-shrink: 0; }
.bk-radio-label strong { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .2rem; }
.bk-radio-label p    { font-size: .78rem; color: var(--ink3); margin: 0; line-height: 1.5; }

/* Retention quick-pick */
.bk-retention-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.bk-retention-inp { width: 90px !important; }
.bk-retention-unit { font-size: .85rem; color: var(--ink3); }
.bk-retention-presets { display: flex; gap: .4rem; }
.bk-ret-chip { padding: .25rem .6rem; background: var(--s2); border: 1px solid var(--bd); border-radius: 5px; font-size: .75rem; cursor: pointer; color: var(--ink2); transition: background .12s, border-color .12s; }
.bk-ret-chip:hover { background: var(--bdim); border-color: var(--blue); color: var(--blue); }

/* Field hint */
.bk-field-hint { font-size: .73rem; color: var(--ink3); margin: .35rem 0 0; font-style: italic; }

/* Schedule form */
.form-group          { margin-bottom: 1rem; }
.form-group .inp     { width: 100%; }

/* ── Backup: In-page confirmation dialog ── */
.bk-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,62,.48);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: bk-fade-in .15s ease-out;
}
@keyframes bk-fade-in { from{opacity:0} to{opacity:1} }
.bk-confirm-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 2rem 1.6rem;
  box-shadow: 0 24px 64px rgba(13,27,62,.22), 0 4px 16px rgba(13,27,62,.08);
  max-width: 420px; width: calc(100% - 2.5rem);
  animation: bk-scale-in .18s cubic-bezier(.34,1.4,.64,1);
}
@keyframes bk-scale-in { from{transform:scale(.9);opacity:0} to{transform:scale(1);opacity:1} }
.bk-confirm-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
}
.bk-confirm-icon-danger { background: var(--rdim); color: var(--red); }
.bk-confirm-icon-warn   { background: var(--adim); color: var(--amber); }
.bk-confirm-icon-info   { background: var(--bdim); color: var(--blue); }
.bk-confirm-title {
  font-size: 1.05rem; font-weight: 700; color: var(--ink);
  margin: 0 0 .5rem; text-align: center;
}
.bk-confirm-msg {
  font-size: .875rem; color: var(--ink2); line-height: 1.6;
  margin: 0 0 1.6rem; text-align: center;
}
.bk-confirm-actions {
  display: flex; gap: .75rem; justify-content: center;
}
.bk-confirm-actions .btn { min-width: 100px; }

/* ── Backup: Action feedback banner ── */
.bk-action-banner {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .85rem 1rem; border-radius: 9px;
  font-size: .86rem; line-height: 1.55; margin-bottom: 1rem;
  animation: bk-slide-in .18s ease-out;
}
.bk-action-banner span { flex: 1; }
.bk-action-banner-ok  { background: rgba(5,150,105,.1); color: #065f46; border: 1px solid rgba(5,150,105,.25); }
.bk-action-banner-err { background: rgba(220,38,38,.08); color: var(--red); border: 1px solid rgba(220,38,38,.2); }
.bk-action-banner-info{ background: var(--bdim); color: var(--blue2); border: 1px solid rgba(37,99,235,.2); }
.bk-banner-close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  padding: .1rem; color: inherit; opacity: .6; line-height: 1;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
}
.bk-banner-close:hover { opacity: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .bk-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .bk-stats { grid-template-columns: 1fr 1fr; }
  .bk-rp-row { grid-template-columns: 1fr auto; }
  .bk-rp-size { display: none; }
  .bk-plan-card { grid-template-columns: auto 1fr; }
  .bk-plan-ret, .bk-plan-last { display: none; }
  .bk-plan-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .bk-selector-wrap { flex-direction: column; align-items: flex-start; }
  .bk-select { max-width: 100%; }
  .bk-form-row { grid-template-columns: 1fr; }
  .bk-inline-form { padding: 1rem 1.1rem 1.1rem; }
  .bk-inline-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .bk-stats { grid-template-columns: 1fr; }
  .bk-rp-row { grid-template-columns: 1fr; gap: .5rem; }
  .bk-rp-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .bk-stats { grid-template-columns: 1fr; }
}

/* ════════ CONSOLE LOGIN ════════ */

/* Console Login button — accounts card */
.act-btn-console:not(:disabled) {
  background: rgba(26,115,232,.12);
  color: #4d9eff;
  border-color: rgba(26,115,232,.25);
}
.act-btn-console:hover:not(:disabled) { background: #1a73e8; color: #fff; }

/* Console button — instance group header */
.btn-console-sm {
  background: transparent;
  color: #7eb3ff;
  border: 1px solid rgba(126,179,255,.45);
  border-radius: 4px;
  padding: 2px 9px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
  line-height: 1.6;
  transition: background .15s, border-color .15s;
}
.btn-console-sm:hover { background: rgba(126,179,255,.12); border-color: #7eb3ff; }

/* Extension install banner */
.ext-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #112240;
  color: #cfe2ff;
  padding: 9px 20px;
  font-size: 13px;
  border-bottom: 1px solid rgba(126,179,255,.15);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ext-banner.hidden { display: none; }
.ext-banner a { color: #7eb3ff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ext-banner a:hover { text-decoration: underline; }
.ext-banner button {
  margin-left: auto;
  background: none;
  border: none;
  color: #7eb3ff;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.ext-banner button:hover { color: #fff; }

/* ═══════════════════════════════════════
   M11 — Labs Module  (Light theme — matches portal design system)
   ═══════════════════════════════════════ */

/* Loading / empty states */
.lbs-loading { color: var(--blue); padding: 24px 0; font-size: 14px; }
.lbs-empty   { color: var(--ink4); padding: 40px 0; font-size: 14px; text-align: center; }
.lbs-err     { color: var(--red); padding: 10px 0; font-size: 13px; }

/* ── Filter bar ── */
.lbs-filter-bar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.lbs-pill {
  padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--white); border: 1.5px solid var(--bd2);
  color: var(--ink3); cursor: pointer; line-height: 1.3;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  box-shadow: var(--sh);
}
.lbs-pill:hover {
  background: var(--bg2); border-color: var(--blue3); color: var(--blue);
}
.lbs-pill--active {
  background: var(--blue); border-color: var(--blue); color: #ffffff;
  box-shadow: var(--shb);
}
.lbs-pill-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: middle;
}
.lbs-pill--active .lbs-pill-count { background: rgba(255,255,255,.25); color: #ffffff; }
.lbs-pill:not(.lbs-pill--active) .lbs-pill-count { background: var(--bdim); color: var(--blue); }

/* ── Labs table ── */
.lbs-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lbs-tbl-head th {
  text-align: left; padding: 10px 14px;
  background: var(--bg2); color: var(--ink3);
  font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .65px;
  border-bottom: 2px solid var(--bd2);
  white-space: nowrap;
}
.lbs-tbl-head th:first-child { width: 36px; padding-right: 0; }
.lbs-tbl-row { cursor: pointer; }
.lbs-tbl-row:hover td { background: var(--s2); }
.lbs-tbl-row--expanded td { background: var(--bdim); border-bottom-color: transparent; }
.lbs-tbl-row td {
  padding: 12px 14px; color: var(--ink2);
  border-bottom: 1px solid var(--bg2);
  vertical-align: middle; transition: background .12s;
}
.lbs-tbl-row:last-child td { border-bottom: none; }
.lbs-tbl-row td:first-child { padding-right: 0; color: var(--ink4); }
.msv2-compact-table {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: var(--rlg);
  overflow: hidden;
  box-shadow: var(--sh);
}
.msv2-compact-table .lbs-tbl-head th { background: #f7faff; }
.msv2-compact-row td { padding-top: 14px; padding-bottom: 14px; }
.msv2-row-num {
  width: 48px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink3);
}
.msv2-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msv2-row-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.msv2-row-sub {
  font-size: 12px;
  color: var(--ink4);
}
.msv2-pg-row { margin-top: 14px; }

/* ── Chevron ── */
.lbs-chevron {
  display: inline-block; font-size: 10px;
  transition: transform .2s ease, color .15s; color: var(--ink4); user-select: none;
}
.lbs-chevron--open { transform: rotate(90deg); color: var(--blue); }

/* ── Expanded detail row ── */
@keyframes lbs-panel-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lbs-detail-row td {
  padding: 0; border-bottom: 2px solid var(--bd2);
  background: var(--bg);
}
.lbs-detail-panel {
  position: relative; padding: 22px 26px 20px;
  border-top: 2px solid var(--blue);
  animation: lbs-panel-in .18s ease;
}
.lbs-detail-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--white); border: 1.5px solid var(--bd2);
  color: var(--ink3); font-size: 15px;
  cursor: pointer; line-height: 1; padding: 5px 9px; border-radius: 6px;
  transition: all .15s; box-shadow: var(--sh);
}
.lbs-detail-close:hover { color: var(--ink); background: var(--bg2); border-color: var(--blue3); }

/* ── Detail sections ── */
.lbs-detail-section { margin-bottom: 22px; }
.lbs-detail-section:last-child { margin-bottom: 0; }
.lbs-detail-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--blue); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.lbs-detail-section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--bd2), transparent);
}

/* ── Info key-value grid ── */
.lbs-detail-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 20px;
}
.lbs-detail-info-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 13px;
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: 7px; box-shadow: var(--sh);
}
.lbs-detail-info-label {
  font-size: 10px; color: var(--ink3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.lbs-detail-info-value { font-size: 13px; color: var(--ink); word-break: break-all; font-weight: 500; }
.lbs-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 900px) {
  .msv2-compact-table .lbs-tbl-head th:nth-child(5),
  .msv2-compact-table .lbs-tbl-head th:nth-child(6),
  .msv2-compact-table .lbs-tbl-row td:nth-child(5),
  .msv2-compact-table .lbs-tbl-row td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 640px) {
  .msv2-compact-table .lbs-tbl-head th:nth-child(7),
  .msv2-compact-table .lbs-tbl-row td:nth-child(7) {
    display: none;
  }
  .msv2-row-name { font-size: 13px; }
  .msv2-row-sub { font-size: 11px; }
}

/* ── Expiry colours ── */
.lbs-expiry-warn { color: var(--amber); font-weight: 600; }
.lbs-expiry-dead { color: var(--ink4); }

/* ── Status badges ── */
.lbs-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 12px; font-size: 11px;
  font-weight: 700; letter-spacing: .2px;
  border: 1px solid transparent;
}
.lbs-badge--green  { background: var(--gdim);  color: var(--green);  border-color: rgba(5,150,105,.25); }
.lbs-badge--blue   { background: var(--bdim);  color: var(--blue);   border-color: rgba(37,99,235,.22); }
.lbs-badge--yellow { background: var(--adim);  color: var(--amber);  border-color: rgba(217,119,6,.25); }
.lbs-badge--gray   { background: var(--bg2);   color: var(--ink3);   border-color: var(--bd); }
.lbs-badge--red    { background: var(--rdim);  color: var(--red);    border-color: rgba(220,38,38,.22); }

/* ── Button variants ── */
.btn-outline {
  background: var(--white); border: 1.5px solid var(--bd2); color: var(--ink2);
  box-shadow: var(--sh);
}
.btn-outline:hover { background: var(--bg2); border-color: var(--blue3); color: var(--blue); }
.btn-danger  {
  background: var(--rdim); border: 1.5px solid rgba(220,38,38,.3); color: var(--red);
}
.btn-danger:hover  { background: rgba(220,38,38,.14); border-color: var(--red); }
.btn-success {
  background: var(--gdim); border: 1.5px solid rgba(5,150,105,.3); color: var(--green);
}
.btn-success:hover { background: rgba(5,150,105,.14); border-color: var(--green); }

/* ── Wizard wrapper ── */
.lbs-wizard-wrap {
  background: var(--white);
  border: 1px solid var(--bd); border-radius: var(--rlg);
  overflow: hidden; margin: 8px 0 24px;
  box-shadow: var(--shm);
}
.lbs-wizard-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg2);
}
.lbs-wizard-title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }

/* Step indicators */
.lbs-steps { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.lbs-step {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); color: var(--ink4);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bd2);
}
.lbs-step--active { background: var(--blue); color: #fff; border-color: var(--blue2); box-shadow: var(--shb); }
.lbs-step--done   { background: var(--gdim); color: var(--green); border-color: rgba(5,150,105,.4); }

/* Wizard body / footer */
.lbs-wizard-body   { padding: 22px 26px; }
.lbs-wizard-footer { padding: 14px 26px; border-top: 1px solid var(--bd); display: flex; gap: 10px; justify-content: flex-end; background: var(--bg2); }

/* Form elements */
.lbs-form-row { margin-bottom: 18px; }
.lbs-form-row--inline { display: flex; align-items: center; gap: 10px; }
.lbs-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--ink3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 7px;
}
.lbs-select,
.lbs-input {
  width: 100%; padding: 9px 12px;
  background: var(--white); border: 1.5px solid var(--bd2);
  border-radius: 6px; color: var(--ink); font-size: 13px;
  box-sizing: border-box; transition: border-color .15s, box-shadow .15s;
}
.lbs-select:focus,
.lbs-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bdim); }
.lbs-help-text { font-size: 12px; color: var(--ink4); margin-top: 4px; display: inline-block; margin-left: 10px; }

/* Platform radio cards */
.lbs-platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lbs-platform-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--white);
  border: 1.5px solid var(--bd2); border-radius: 7px;
  cursor: pointer; font-size: 13px; color: var(--ink2);
  transition: border-color .15s, background .15s; box-shadow: var(--sh);
}
.lbs-platform-card:hover { border-color: var(--blue2); background: var(--bdim); }
.lbs-platform-card input[type="radio"] { accent-color: var(--blue); }

/* Pricing table */
.lbs-price-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
.lbs-price-table th {
  text-align: left; padding: 9px 12px;
  background: var(--bg2); color: var(--ink3);
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--bd2);
}
.lbs-price-table td { padding: 9px 12px; color: var(--ink2); border-bottom: 1px solid var(--bg2); }
.lbs-price-total td {
  font-size: 14px; font-weight: 700; color: var(--ink);
  border-top: 2px solid var(--bd2); border-bottom: none; padding-top: 12px;
}
.lbs-pricing-source { font-size: 11px; color: var(--ink4); margin: 0 0 8px; }

/* Payment step */
.lbs-payment-amount { font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 16px; text-align: center; }
.lbs-qr-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.lbs-qr-img {
  width: 200px; height: 200px; object-fit: contain;
  border-radius: 10px; border: 2px solid var(--bd2);
  background: #fff; padding: 8px; box-shadow: var(--sh);
}

/* Provisioning step indicators */
.lbs-provision-step {
  padding: 13px 18px; margin-bottom: 8px; border-radius: 7px; font-size: 14px;
  color: var(--ink4); background: var(--white); border: 1px solid var(--bd);
}
.lbs-provision-step--active {
  color: var(--blue2); background: var(--bdim); border-color: var(--blue3);
  animation: lbs-pulse .8s ease-in-out infinite alternate;
}
.lbs-provision-step--done { color: var(--green); background: var(--gdim); border-color: rgba(5,150,105,.3); }

@keyframes lbs-pulse {
  from { opacity: .65; }
  to   { opacity: 1; }
}

/* Connection Info banner */
.lbs-success-banner { font-size: 20px; font-weight: 700; color: var(--green); text-align: center; width: 100%; padding: 4px 0; }

/* Legacy connect-info (kept for compat) */
.lbs-info-grid    { margin-bottom: 16px; }
.lbs-info-row     { padding: 5px 0; font-size: 13px; color: var(--ink2); }
.lbs-info-section { margin-top: 16px; }
.lbs-info-label   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink); margin-bottom: 8px; }

/* SSH / RDP code block */
.lbs-code-block {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 12.5px; background: var(--bg2);
  padding: 12px 16px; border-radius: 7px;
  color: var(--blue2); border: 1px solid var(--bd2);
  word-break: break-all; user-select: all; line-height: 1.6;
}

/* Duration grid */
.lbs-duration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.lbs-sublabel { display: block; font-size: 0.8rem; color: var(--ink4); margin-bottom: 4px; }

/* Pricing calculator hint */
.lbs-calc-hint {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--bd2); border-radius: 8px;
  background: var(--bdim);
}
.lbs-calc-hint-title { margin: 0 0 7px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.lbs-calc-hint-list  { margin: 0 0 10px; padding-left: 18px; font-size: 12px; color: var(--ink3); }
.lbs-calc-hint-list li { margin-bottom: 3px; }

/* Request submitted banner (Step 4) */
.lbs-submitted-banner {
  text-align: center; padding: 28px 20px 24px;
  background: linear-gradient(135deg, var(--gdim), var(--bdim));
  border: 1px solid rgba(5,150,105,.22); border-radius: var(--rlg); margin-bottom: 4px;
}
.lbs-submitted-icon { font-size: 2.8rem; color: var(--green); line-height: 1; margin-bottom: 8px; }

/* ── My Servers — primary CTA button ── */
.lbs-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--rlg);
  background: var(--blue);
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1px;
  border: none; cursor: pointer;
  box-shadow: none;
  transition: transform .15s ease, background .15s ease;
  position: relative; overflow: hidden; white-space: nowrap;
}
.lbs-cta-btn:hover {
  background: var(--blue2);
  transform: translateY(-1px);
  box-shadow: none;
}
.lbs-cta-btn:active { transform: translateY(0); box-shadow: none; }

/* ── My Servers — stats dashboard row ── */
.lbs-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.lbs-stat-card {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 16px 18px;
  box-shadow: var(--sh);
}
.lbs-stat-val {
  font-size: 28px; font-weight: 800; color: var(--ink);
  font-family: var(--mono); line-height: 1;
}
.lbs-stat-lbl { font-size: 12px; color: var(--ink3); margin-top: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.lbs-stat-green { color: var(--green); }
.lbs-stat-amber { color: var(--amber); }
.lbs-stat-gray  { color: var(--ink4); }

/* ── My Servers — payment verification notice (non-admin view) ── */
.lbs-verification-notice {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--adim); border: 1px solid rgba(217,119,6,.25);
  border-radius: var(--rlg); padding: 18px 20px;
}
.lbs-verification-icon { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.lbs-verification-title {
  font-size: 14px; font-weight: 700; color: var(--amber);
  margin: 0 0 6px;
}
.lbs-verification-msg {
  font-size: 13px; color: var(--ink2); margin: 0; line-height: 1.55;
}

@media (max-width: 768px) {
  .lbs-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .lbs-stats-row { grid-template-columns: 1fr 1fr; }
  .lbs-stat-val  { font-size: 22px; }
}

/* ── Dashboard — Quick Actions grid ── */
.dash-quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; padding: 8px 12px 14px;
}
.dq-card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; padding: 18px 16px 16px; min-height: 92px;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--rlg); cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.dq-card:hover {
  background: var(--white); border-color: var(--blue3);
  box-shadow: var(--shm);
}
.dq-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dq-ico.blue   { background: var(--bdim);  color: var(--blue);  }
.dq-ico.green  { background: var(--gdim);  color: var(--green); }
.dq-ico.amber  { background: var(--adim);  color: var(--amber); }
.dq-ico.cyan   { background: var(--cdim);  color: var(--cyan);  }
.dq-ico.violet { background: var(--vdim);  color: var(--violet);}
.dq-ico.red    { background: var(--rdim);  color: var(--red);   }
.dq-label { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -.1px; }
.dq-sub   { font-size: 12px; color: var(--ink3); }

@media (max-width: 480px) {
  .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
}
}
.lbs-submitted-icon { font-size: 2.8rem; color: var(--green); line-height: 1; margin-bottom: 8px; }

/* ── My Servers — empty-state onboarding card ── */
.lbs-onboard { max-width: 760px; }
.lbs-onboard-hero {
  text-align: center; padding: 36px 24px 28px;
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); box-shadow: var(--sh); margin-bottom: 14px;
}
.lbs-onboard-icon { font-size: 2.6rem; margin-bottom: 10px; line-height: 1; }
.lbs-onboard-title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 8px; letter-spacing: -.3px; }
.lbs-onboard-desc {
  font-size: 14px; color: var(--ink3); margin: 0 auto 22px;
  line-height: 1.6; max-width: 480px;
}
/* ── My Servers — collapsible guide toggle ── */
.lbs-guide-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; margin: 10px 0 4px;
  background: var(--bdim); border: 1px solid var(--bd);
  border-radius: var(--r); cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink2);
  user-select: none; transition: background .15s;
}
.lbs-guide-toggle:hover { background: var(--bg2); }
.lbs-guide-toggle-lbl { display: flex; align-items: center; gap: 6px; }
.lbs-guide-toggle-chev { font-size: 10px; color: var(--ink4); }

.lbs-how-works {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 20px 24px; box-shadow: var(--sh);
}
.lbs-hw-heading {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--blue); margin: 0 0 16px;
}
.lbs-hw-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.lbs-hw-step  { display: flex; align-items: flex-start; gap: 12px; }
.lbs-hw-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bdim); color: var(--blue);
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(37,99,235,.22);
}
.lbs-hw-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.lbs-hw-text  { font-size: 12px; color: var(--ink3); line-height: 1.55; }

/* ── My Servers — provisioning timeline card ── */
.lbs-prov-card {
  background: var(--bdim); border: 1px solid var(--blue3);
  border-radius: var(--rlg); padding: 18px 20px;
}
.lbs-prov-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.lbs-prov-spinner {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--bdim); border-top-color: var(--blue);
  animation: lbs-spin .8s linear infinite;
}
@keyframes lbs-spin { to { transform: rotate(360deg); } }
.lbs-prov-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.lbs-prov-sub   { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.lbs-pv-timeline { display: flex; flex-direction: column; gap: 10px; padding-left: 4px; }
.lbs-pv-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink4);
}
.lbs-pv-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bd2); flex-shrink: 0; background: var(--white);
}
.lbs-pv-step.lbs-pv-done { color: var(--green); }
.lbs-pv-step.lbs-pv-done .lbs-pv-dot { background: var(--green); border-color: var(--green); }
.lbs-pv-step.lbs-pv-active { color: var(--blue2); font-weight: 600; }
.lbs-pv-step.lbs-pv-active .lbs-pv-dot {
  background: var(--blue2); border-color: var(--blue2);
  animation: lbs-pulse .9s ease-in-out infinite alternate;
}

/* ── My Servers — admin payment review card ── */
.lbs-review-card {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 16px 18px; box-shadow: var(--sh);
}
.lbs-review-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lbs-review-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--adim); color: var(--amber);
  border: 1px solid rgba(217,119,6,.25); border-radius: 20px;
  font-size: 12px; font-weight: 700; padding: 4px 12px;
}
.lbs-review-meta { font-size: 12px; color: var(--ink3); }
.lbs-review-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .lbs-hw-steps { grid-template-columns: 1fr; }
}

/* Skeleton loading rows — used while instance data loads from Lambda */
.skeleton-row {
  height: 38px;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f7fb 50%, #e8edf5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
  margin-bottom: 8px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════════════════════
   MY SERVERS v2 — Hero · Quick Launch · Card Grid · Controls
════════════════════════════════════════════════════════════════ */

/* ── Hero section ────────────────────────────────────────────── */
.msv2-hero {
  position: relative; overflow: hidden;
  border-radius: var(--rlg); margin-bottom: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 60%, #1d2d6b 100%);
  padding: 20px 28px 18px;
  min-height: 90px; display: flex; align-items: center;
}
.msv2-hero-canvas {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
}
.msv2-hero-content {
  position: relative; z-index: 2; max-width: 560px;
}
.msv2-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(59,127,255,.2); border: 1px solid rgba(59,127,255,.35);
  border-radius: 20px; padding: 3px 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--blue3); margin-bottom: 8px;
}
.msv2-hero-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue3); animation: pulse-dot 2s infinite;
}
.msv2-hero-h1 {
  font-size: 18px; font-weight: 800; color: #fff; line-height: 1.2;
  letter-spacing: -.3px; margin: 0 0 5px;
}
.msv2-hero-sub {
  font-size: 12px; color: rgba(255,255,255,.55);
  margin: 0 0 14px; line-height: 1.5;
}
.msv2-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.msv2-hero-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--rlg);
  background: var(--blue2); color: #fff; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 12px rgba(59,127,255,.4);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.msv2-hero-btn-primary:hover { background: #5090ff; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(59,127,255,.5); }
.msv2-hero-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--rlg);
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .15s;
}
.msv2-hero-btn-secondary:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.msv2-hero-stats {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  z-index: 2; display: flex; flex-direction: row; gap: 10px;
}
.msv2-hero-stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r); padding: 8px 14px; text-align: center;
  backdrop-filter: blur(8px); min-width: 80px;
}
.msv2-hero-stat-val {
  font-size: 15px; font-weight: 800; color: #fff;
  font-family: var(--mono); line-height: 1;
}
.msv2-hero-stat-lbl { font-size: 9px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .6px; margin-top: 3px; }
@media (max-width: 900px) { .msv2-hero-stats { display: none; } }
@media (max-width: 600px) {
  .msv2-hero { padding: 16px 18px 14px; min-height: 80px; }
  .msv2-hero-h1 { font-size: 16px; }
}

/* ── Live stats strip (below hero) ──────────────────────────── */
.msv2-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 24px;
}
.msv2-strip-card {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--sh); transition: box-shadow .15s;
}
.msv2-strip-card:hover { box-shadow: var(--shm); }
.msv2-strip-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.msv2-strip-ico.green  { background: var(--gdim); color: var(--green); }
.msv2-strip-ico.blue   { background: var(--bdim); color: var(--blue); }
.msv2-strip-ico.amber  { background: var(--adim); color: var(--amber); }
.msv2-strip-val { font-size: 20px; font-weight: 800; color: var(--ink); font-family: var(--mono); line-height: 1; }
.msv2-strip-lbl { font-size: 11px; color: var(--ink4); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
@media (max-width: 700px) { .msv2-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .msv2-strip { grid-template-columns: 1fr; } }

/* ── Feature columns ─────────────────────────────────────────── */
.msv2-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 28px;
}
.msv2-feat {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 20px 18px;
  box-shadow: var(--sh);
}
.msv2-feat-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.msv2-feat-ico.blue   { background: var(--bdim); }
.msv2-feat-ico.green  { background: var(--gdim); }
.msv2-feat-ico.violet { background: var(--vdim); }
.msv2-feat-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.msv2-feat-desc  { font-size: 12.5px; color: var(--ink3); line-height: 1.55; }
@media (max-width: 700px) { .msv2-features { grid-template-columns: 1fr; } }

/* ── Summary bar above server list ──────────────────────────── */
.msv2-summary-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 14px 20px;
  margin-bottom: 18px; box-shadow: var(--sh);
}
.msv2-summary-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.msv2-sum-stat { display: flex; align-items: baseline; gap: 5px; }
.msv2-sum-val  { font-size: 22px; font-weight: 800; color: var(--ink); font-family: var(--mono); }
.msv2-sum-val.green { color: var(--green); }
.msv2-sum-lbl  { font-size: 11px; color: var(--ink4); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.msv2-sum-sep  { width: 1px; background: var(--bd); align-self: stretch; }

/* ── Filter / sort / search bar ─────────────────────────────── */
.msv2-controls {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.msv2-search-wrap {
  position: relative; flex: 1; min-width: 180px;
}
.msv2-search-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ink4); pointer-events: none;
  width: 14px; height: 14px;
}
.msv2-search {
  width: 100%; padding: 8px 10px 8px 32px;
  background: var(--white); border: 1.5px solid var(--bd2);
  border-radius: var(--r); font-size: 13px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.msv2-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bdim); }
.msv2-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.msv2-pill {
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--bg2); color: var(--ink3); border: 1px solid var(--bd);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap; display: flex; align-items: center; gap: 4px;
}
.msv2-pill:hover { background: var(--bdim); border-color: var(--blue3); color: var(--blue); }
.msv2-pill.active { background: var(--blue); color: #fff; border-color: var(--blue2); }
.msv2-pill-cnt {
  background: rgba(255,255,255,.25); padding: 0 5px; border-radius: 8px;
  font-size: 10px; font-weight: 700;
}
.msv2-pill:not(.active) .msv2-pill-cnt { background: var(--bdim); color: var(--blue); }
.msv2-sort-select {
  padding: 7px 10px; border-radius: var(--r);
  background: var(--white); border: 1.5px solid var(--bd2);
  font-size: 12px; color: var(--ink2); cursor: pointer;
  transition: border-color .15s;
}
.msv2-sort-select:focus { outline: none; border-color: var(--blue); }

/* Bulk action bar */
.msv2-bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bdim);
  border: 1px solid var(--blue3); border-radius: var(--r);
  margin-bottom: 12px; font-size: 13px; color: var(--blue2);
  font-weight: 600; animation: msv2-slide-in .2s ease;
}
@keyframes msv2-slide-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.msv2-bulk-count { margin-right: auto; }

/* ── Server card grid ────────────────────────────────────────── */
.msv2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.msv2-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid #d8e3f5;
  border-radius: 18px; box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  cursor: pointer; position: relative; overflow: hidden;
  animation: msv2-card-in .25s ease both;
  min-height: 100%;
}
@keyframes msv2-card-in {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: none; }
}
.msv2-card:hover { box-shadow: 0 14px 36px rgba(15, 23, 42, .1); border-color: #aac4f8; transform: translateY(-2px); }
.msv2-card.selected { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(59,127,255,.12), 0 16px 34px rgba(15, 23, 42, .1); }

/* Card header */
.msv2-card-hd {
  padding: 18px 18px 14px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; border-bottom: 1px solid #edf2fb;
  flex-shrink: 0;
}
.msv2-card-hd-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.msv2-card-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--bd2); flex-shrink: 0;
  background: var(--white); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.msv2-card-check.checked { background: var(--blue); border-color: var(--blue2); }
.msv2-card-check.checked::after {
  content: ''; width: 8px; height: 5px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px); display: block;
}
.msv2-card-name {
  font-size: 17px; font-weight: 800; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em;
}
.msv2-card-region { font-size: 11px; color: var(--ink4); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.msv2-card-flag { font-size: 14px; }
.msv2-card-hd-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Status badge with animated dot */
.msv2-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .2px;
}
.msv2-status.running { background: var(--gdim); color: var(--green); border: 1px solid rgba(5,150,105,.22); }
.msv2-status.stopped { background: var(--bg2);  color: var(--ink4);  border: 1px solid var(--bd); }
.msv2-status.pending { background: var(--adim); color: var(--amber); border: 1px solid rgba(217,119,6,.22); }
.msv2-status-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.msv2-status.running .msv2-status-dot { background: var(--green); animation: pulse-dot 2s infinite; }
.msv2-status.stopped .msv2-status-dot { background: var(--ink4); }
.msv2-status.pending .msv2-status-dot { background: var(--amber); animation: pulse-dot 1.2s infinite; }

/* Instance type badge */
.msv2-type-badge {
  display: inline-block; padding: 2px 8px;
  background: var(--bdim); color: var(--blue2);
  border: 1px solid rgba(37,99,235,.2); border-radius: 5px;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
}

/* Three-dot menu */
.msv2-dots-btn {
  width: 26px; height: 26px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--ink4); display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.msv2-dots-btn:hover { background: var(--bg2); color: var(--ink2); }
.msv2-dots-menu {
  position: absolute; top: 44px; right: 12px; z-index: 50;
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--r); box-shadow: var(--shl);
  padding: 4px; min-width: 180px;
  animation: msv2-menu-in .15s ease;
}
@keyframes msv2-menu-in { from { opacity:0; transform: scale(.95) translateY(-4px); } to { opacity:1; transform:none; } }
.msv2-dots-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 5px; font-size: 13px; color: var(--ink2);
  cursor: pointer; transition: background .1s, color .1s; white-space: nowrap;
}
.msv2-dots-item:hover { background: var(--s2); color: var(--ink); }
.msv2-dots-item.danger { color: var(--red); }
.msv2-dots-item.danger:hover { background: var(--rdim); }
.msv2-dots-sep { height: 1px; background: var(--bd); margin: 4px 0; }

/* Card body */
.msv2-card-body {
  padding: 14px 18px 18px; flex: 1;
  display: flex; flex-direction: column; gap: 14px;
}
.msv2-card-meta-row { display: flex; align-items: center; justify-content: space-between; }
.msv2-card-meta-label { font-size: 11px; color: var(--ink4); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.msv2-card-meta-val   { font-size: 13px; color: var(--ink2); font-weight: 500; }
.msv2-card-cost {
  font-size: 28px; font-weight: 800; color: var(--ink);
  font-family: var(--mono); line-height: 1;
}
.msv2-card-cost-lbl { font-size: 10px; color: var(--ink4); text-transform: uppercase; letter-spacing: .8px; }
.msv2-card-cost-note { font-size: 11px; color: #7b869c; margin-top: 6px; }

/* Live cost ticker */
.msv2-ticker {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--green);
  font-family: var(--mono); letter-spacing: .3px;
}
.msv2-ticker-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse-dot 1s infinite; }
.msv2-ticker-val { transition: color .3s; }

/* Sparkline */
.msv2-spark-wrap { width: 100%; height: 40px; position: relative; }
.msv2-spark-wrap svg { width: 100%; height: 100%; overflow: visible; }
.msv2-spark-line { fill: none; stroke: var(--blue2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.msv2-spark-area { fill: url(#sparkGrad); opacity: .18; }
.msv2-spark-dot  { fill: var(--blue2); r: 2.5; }

/* Card footer (action buttons) */
.msv2-card-ft {
  padding: 14px 18px 18px;
  border-top: 1px solid #edf2fb;
  display: flex; gap: 8px; flex-shrink: 0;
}
.msv2-card-btn {
  flex: 1; padding: 10px 12px; border-radius: 12px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1.5px solid transparent; display: flex; align-items: center; justify-content: center;
  gap: 5px; transition: background .15s, border-color .15s, transform .1s;
}
.msv2-card-btn:active { transform: scale(.97); }
.msv2-card-btn.start { background: var(--gdim); color: var(--green); border-color: rgba(5,150,105,.25); }
.msv2-card-btn.start:hover { background: var(--green); color: #fff; border-color: var(--green); }
.msv2-card-btn.stop  { background: var(--rdim); color: var(--red);   border-color: rgba(220,38,38,.22); }
.msv2-card-btn.stop:hover  { background: var(--red);   color: #fff; border-color: var(--red); }
.msv2-card-btn.detail { background: var(--bdim); color: var(--blue2); border-color: rgba(37,99,235,.2); }
.msv2-card-btn.detail:hover { background: var(--blue2); color: #fff; border-color: var(--blue2); }
.msv2-card-btn--secondary { flex: 1; }
.msv2-card-btn--full { flex: 1 1 100%; }
.msv2-card-btn:disabled { opacity: .4; pointer-events: none; }

/* Skeleton card */
.msv2-skel-card {
  background: var(--white); border: 1.5px solid var(--bd);
  border-radius: var(--rlg); height: 220px; overflow: hidden;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f7fb 50%, #e8edf5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

/* Empty state */
.msv2-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 24px;
}
.msv2-empty-icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.msv2-empty-title { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.msv2-empty-desc  { font-size: 14px; color: var(--ink3); max-width: 400px; margin: 0 auto 24px; line-height: 1.6; }

/* ── Quick Launch Templates ───────────────────────────────────── */
.msv2-ql-section { margin-bottom: 28px; }
.msv2-ql-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.msv2-ql-title {
  font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.2px;
  display: flex; align-items: center; gap: 8px;
}
.msv2-ql-sub { font-size: 12.5px; color: var(--ink3); font-weight: 500; line-height: 1.55; margin-top: 6px; max-width: 620px; }

.msv2-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.msv2-tpl-card {
  background: var(--white); border: 1.5px solid var(--bd);
  border-radius: var(--rlg); padding: 20px 20px 16px;
  box-shadow: var(--sh); display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  position: relative; overflow: hidden; cursor: default;
}
.msv2-tpl-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.msv2-tpl-card.c-green::before  { background: var(--green2); }
.msv2-tpl-card.c-blue::before   { background: var(--blue2); }
.msv2-tpl-card.c-amber::before  { background: var(--amber2); }
.msv2-tpl-card.c-violet::before { background: var(--violet); }
.msv2-tpl-card.c-red::before    { background: var(--red2); }
.msv2-tpl-card.c-cyan::before   { background: var(--cyan2); }
.msv2-tpl-card:hover { box-shadow: var(--shm); border-color: var(--blue3); transform: translateY(-2px); }

.msv2-tpl-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.msv2-tpl-icon { font-size: 28px; line-height: 1; }
.tpl-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 800; letter-spacing: .2px; text-transform: uppercase;
}
.tpl-badge--green  { background: var(--gdim); color: var(--green);  border: 1px solid rgba(5,150,105,.22); }
.tpl-badge--blue   { background: var(--bdim); color: var(--blue2);  border: 1px solid rgba(37,99,235,.2); }
.tpl-badge--amber  { background: var(--adim); color: var(--amber);  border: 1px solid rgba(217,119,6,.22); }
.tpl-badge--violet { background: var(--vdim); color: var(--violet); border: 1px solid rgba(124,58,237,.2); }
.tpl-badge--red    { background: var(--rdim); color: var(--red);    border: 1px solid rgba(220,38,38,.2); }
.tpl-badge--cyan   { background: var(--cdim); color: var(--cyan);   border: 1px solid rgba(8,145,178,.2); }

.msv2-tpl-name  { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.msv2-tpl-desc  { font-size: 12px; color: var(--ink3); margin-bottom: 10px; line-height: 1.45; }
.msv2-tpl-specs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.msv2-tpl-spec  {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--ink3); font-family: var(--mono); font-weight: 600;
  background: var(--bg2); padding: 2px 7px; border-radius: 4px;
}
.msv2-tpl-uses { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.msv2-tpl-use  {
  font-size: 10.5px; color: var(--ink2); background: #f5f8ff;
  padding: 5px 9px; border-radius: 999px; border: 1px solid #dfe8fb;
}
.msv2-tpl-price-row {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--bg2);
}
.msv2-tpl-price-main { font-size: 16px; font-weight: 800; color: var(--ink); font-family: var(--mono); }
.msv2-tpl-price-sub  { font-size: 11px; color: var(--ink3); margin-top: 4px; line-height: 1.45; max-width: 220px; }
.msv2-tpl-launch {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 16px; border-radius: var(--r);
  background: var(--blue); color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .12s;
  box-shadow: none;
}
.msv2-tpl-launch:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: none; }

/* ── AI Advisor widget ────────────────────────────────────────── */
.msv2-advisor {
  background: var(--white); border: 1.5px solid var(--bd);
  border-radius: var(--rlg); box-shadow: var(--sh);
  margin-bottom: 24px; overflow: hidden;
}
.msv2-advisor-hd {
  padding: 16px 20px; border-bottom: 1px solid var(--bg2);
  display: flex; align-items: center; justify-content: space-between;
}
.msv2-advisor-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.msv2-advisor-badge {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 4px;
  background: linear-gradient(135deg, #7c3aed, #2460e0); color: #fff;
}
.msv2-advisor-body { padding: 16px 20px; }
.msv2-advisor-prompt-wrap { display: flex; gap: 8px; margin-bottom: 14px; }
.msv2-advisor-input {
  flex: 1; padding: 10px 14px; background: var(--bg);
  border: 1.5px solid var(--bd2); border-radius: var(--r);
  font-size: 13px; color: var(--ink); resize: none; font-family: var(--sans);
  transition: border-color .15s, box-shadow .15s; min-height: 72px;
}
.msv2-advisor-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bdim); }
.msv2-advisor-send {
  padding: 10px 16px; border-radius: var(--r);
  background: linear-gradient(135deg, #7c3aed, #2460e0); color: #fff;
  border: none; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: opacity .15s, transform .1s; align-self: flex-start;
}
.msv2-advisor-send:hover { opacity: .88; transform: translateY(-1px); }
.msv2-advisor-send:disabled { opacity: .5; pointer-events: none; }
.msv2-advisor-result {
  background: var(--s2); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 14px 16px; font-size: 13px;
  color: var(--ink2); line-height: 1.7; display: none;
}
.msv2-advisor-result.visible { display: block; animation: msv2-slide-in .2s ease; }
.msv2-advisor-result strong { color: var(--blue); }
.msv2-advisor-thinking {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink4); font-size: 12px; padding: 8px 0;
}
.msv2-advisor-thinking-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet); animation: pulse-dot 1s infinite;
}

/* ── 12-month forecast chart ──────────────────────────────────── */
.msv2-forecast {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 20px 20px 10px;
  box-shadow: var(--sh); margin-bottom: 24px;
}
.msv2-forecast-title {
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.msv2-chart-wrap { width: 100%; overflow-x: auto; }
.msv2-chart-wrap svg { display: block; }

/* ── Billing engine summary ───────────────────────────────────── */
.be-summary {
  background: var(--s2); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 12px 16px;
}
.be-summary-main { display: flex; align-items: center; gap: 10px; }
.be-summary-label { font-size: 11px; color: var(--ink4); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.be-summary-amount { font-size: 18px; font-weight: 800; color: var(--ink); font-family: var(--mono); }
.be-summary-usd { font-size: 12px; color: var(--ink3); }
.be-breakdown { margin-top: 10px; border-top: 1px solid var(--bd); padding-top: 8px; }
.be-breakdown-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink3); padding: 3px 0;
}

/* ── Admin billing config panel ──────────────────────────────── */
.billing-cfg-section {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--rlg); padding: 22px 24px;
  box-shadow: var(--sh); margin-bottom: 20px;
}
.billing-cfg-title {
  font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.billing-cfg-sub { font-size: 12px; color: var(--ink4); margin-bottom: 18px; }
.billing-cfg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.billing-cfg-field { display: flex; flex-direction: column; gap: 5px; }
.billing-cfg-label { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .5px; }
.billing-cfg-input {
  padding: 8px 12px; background: var(--bg);
  border: 1.5px solid var(--bd2); border-radius: var(--r);
  font-size: 13px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.billing-cfg-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--bdim); }
.billing-cfg-toggle {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  font-size: 13px; color: var(--ink2);
}
.billing-cfg-toggle input[type="checkbox"] { accent-color: var(--blue); width: 15px; height: 15px; }
.billing-cfg-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.billing-cfg-check input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.billing-cfg-check span {
  display: inline-block;
  color: var(--ink2);
}
.billing-cfg-save {
  margin-top: 16px; padding: 8px 18px; border-radius: var(--r);
  background: var(--blue); color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.billing-cfg-save:hover { background: var(--blue2); }
.tpl-admin-list { display: grid; gap: 14px; }
.tpl-admin-card {
  border: 1px solid var(--bd);
  border-radius: var(--rlg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 18px;
  box-shadow: var(--sh);
}
.tpl-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tpl-admin-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.tpl-admin-subtitle { font-size: 12px; color: var(--ink4); margin-top: 4px; line-height: 1.5; max-width: 560px; }
.tpl-admin-remove {
  border: 1px solid rgba(220,38,38,.18);
  background: rgba(220,38,38,.06);
  color: var(--red);
  border-radius: var(--r);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tpl-admin-grid { margin-bottom: 10px; }
.tpl-admin-wide { grid-column: span 2; }
.tpl-admin-toggles { display: flex; gap: 14px; flex-wrap: wrap; }
.tpl-admin-toggles label {
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: #fbfcff;
}
.tpl-admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tpl-admin-secondary {
  background: var(--white);
  color: var(--ink2);
  border: 1px solid var(--bd2);
}
.tpl-admin-secondary:hover { background: var(--bg2); }

/* ── Stat icons in lbs-stat-card ─────────────────────────────── */
.lbs-stat-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; flex-shrink: 0;
}
.lbs-stat-ico--blue   { background: var(--bdim); color: var(--blue); }
.lbs-stat-ico--green  { background: var(--gdim); color: var(--green); }
.lbs-stat-ico--amber  { background: var(--adim); color: var(--amber); }
.lbs-stat-ico--gray   { background: var(--bg2);  color: var(--ink4); }

@media (max-width: 768px) {
  .msv2-tpl-grid { grid-template-columns: 1fr; }
  .msv2-grid     { grid-template-columns: 1fr; }
  .tpl-admin-wide { grid-column: auto; }
}
@media (max-width: 600px) {
  .msv2-controls { flex-direction: column; align-items: stretch; }
  .msv2-summary-bar { flex-direction: column; align-items: flex-start; }
}

/* ════════════════════════════════════════════════════════════════
   MY SERVERS — DESIGN LAYER (system font, compact, clean)
════════════════════════════════════════════════════════════════ */

/* ── No custom display font — use the site's var(--sans) everywhere ── */
.msv2-hero-h1,
.msv2-ql-title,
.msv2-tpl-name,
.msv2-hero-stat-val,
.msv2-sum-val,
.msv2-card-name,
.msv2-card-cost,
.msv2-tpl-price-main,
.lbs-price-summary-amount {
  font-family: var(--sans);
}

/* ── Hero — compact, no overpowering canvas ──────────────── */
.msv2-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,0) 48%),
    linear-gradient(180deg, #17325c 0%, #122c53 100%);
  box-shadow: 0 6px 22px rgba(10,20,60,.16);
  min-height: 130px !important;
  padding: 20px 28px !important;
  position: relative;
  overflow: hidden;
}
.msv2-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .95;
}
.msv2-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 8%, rgba(59,127,255,.28) 35%, rgba(59,127,255,.28) 65%, transparent 92%);
  pointer-events: none;
}
.msv2-hero-canvas  { display: none; }   /* hide animated canvas */

.msv2-hero-content,
.msv2-hero-stats { position: relative; z-index: 1; }

/* Hero heading — normal weight, tight */
.msv2-hero-h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1.25;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}
.msv2-hero-sub { font-size: 12.5px; color: rgba(255,255,255,.6); letter-spacing: 0; }
.msv2-hero-eyebrow { font-size: 11px; margin-bottom: 6px; }

/* Eyebrow pulse — keep subtle */
.msv2-hero-eyebrow-dot { animation: none; box-shadow: none; }

/* Hero CTA buttons — compact */
.msv2-hero-btn-primary {
  background: var(--blue);
  border: none; padding: 8px 16px;
  letter-spacing: 0; font-size: 13px;
  box-shadow: none;
}
.msv2-hero-btn-primary::before { display: none; }
.msv2-hero-btn-primary:hover { background: var(--blue2); transform: none; box-shadow: none; }

.msv2-hero-btn-secondary {
  backdrop-filter: none; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2); font-size: 13px;
}
.msv2-hero-btn-secondary:hover { transform: none; }

/* Hero stat cards — flat */
.msv2-hero-stat {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 10px 16px;
}
.msv2-hero-stat-val { font-size: 18px; font-weight: 700; color: #fff; }
.msv2-hero-stat-lbl { font-size: 10px; }

/* ── Summary bar — clean strip ───────────────────────────── */
.msv2-summary-bar {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 10px 18px;
  position: relative; overflow: hidden;
}
.msv2-summary-bar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--blue);
}
.msv2-sum-val { font-size: 16px; font-weight: 700; color: var(--ink); }

/* ── Quick Launch — clean card system ───────────────────── */
.msv2-ql-title { font-size: 15px; font-weight: 700; letter-spacing: 0; }

.msv2-tpl-card {
  border-width: 1px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.msv2-tpl-card:hover { transform: translateY(-2px); box-shadow: var(--shm); }
.msv2-tpl-card::before { height: 3px; }

/* Template icon */
.msv2-tpl-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--bg2); border-radius: 10px;
  font-size: 20px; line-height: 1; border: 1px solid var(--bd);
  transition: transform .15s;
}
.msv2-tpl-card:hover .msv2-tpl-icon { transform: scale(1.06); }

/* Template name */
.msv2-tpl-name { font-size: 14px; font-weight: 700; letter-spacing: 0; margin-bottom: 3px; color: var(--ink); }

/* Price — no gradient text */
.msv2-tpl-price-main {
  font-size: 16px; font-weight: 700; color: var(--ink);
  background: none; -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--ink); background-clip: unset;
}

/* Launch button — clean */
.msv2-tpl-launch { position: relative; overflow: visible; letter-spacing: 0; }
.msv2-tpl-launch::after { display: none; }

/* ── Server cards — clean, no spring bounce ──────────────── */
.msv2-card {
  border-width: 1px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.msv2-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 3px 0 0 3px;
}
.msv2-card.status-running::before  { background: var(--green2); box-shadow: none; }
.msv2-card.status-stopped::before  { background: var(--ink4); box-shadow: none; }
.msv2-card.status-pending::before  { background: var(--amber2); box-shadow: none; animation: none; }
.msv2-card.status-provisioning::before { background: var(--blue2); box-shadow: none; animation: none; }
.msv2-card:hover { transform: none; box-shadow: var(--shm); border-color: var(--blue3); }

.msv2-card-hd { border-bottom-color: var(--bg2); }

/* Card name — site font, normal weight */
.msv2-card-name {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  letter-spacing: 0; color: var(--ink);
}

/* Cost — no gradient, plain ink */
.msv2-card-cost {
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  letter-spacing: 0; color: var(--ink);
  background: none; -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--ink); background-clip: unset;
}

/* Ticker */
.msv2-ticker {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--gdim); border: 1px solid rgba(5,150,105,.2);
  padding: 3px 8px; border-radius: 5px; display: inline-flex;
}

/* Card action buttons */
.msv2-card-btn {
  border-radius: var(--rsm); font-size: 11.5px;
  font-family: var(--sans); letter-spacing: 0;
}

/* ── AI Advisor ─────────────────────────────────────────── */
.msv2-advisor { border-width: 1px; position: relative; overflow: hidden; }
.msv2-advisor::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--blue2) 100%);
}
.msv2-advisor-hd { border-bottom-color: var(--bd); }
.msv2-advisor-badge {
  background: var(--vdim); color: var(--violet);
  border-radius: 5px; padding: 2px 8px; font-size: 10px; letter-spacing: 0;
  border: 1px solid rgba(124,58,237,.2);
}
.msv2-advisor-input { border-radius: var(--r); font-size: 13px; min-height: 72px; }
.msv2-advisor-send {
  background: var(--blue); border-radius: var(--r);
  padding: 9px 16px; letter-spacing: 0;
  box-shadow: none; font-size: 13px;
}
.msv2-advisor-send:hover { background: var(--blue2); box-shadow: none; }
.msv2-advisor-result {
  border-radius: var(--r); font-size: 13px; margin-top: 10px;
  border-color: var(--bd); background: var(--s2);
}

/* ── Forecast chart ─────────────────────────────────────── */
.msv2-forecast {
  border-width: 1px;
  position: relative; overflow: hidden;
}
.msv2-forecast::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan2) 100%);
}
.msv2-forecast-title { font-family: var(--sans); font-size: 13px; font-weight: 700; }

/* ── Feature columns ─────────────────────────────────────── */
.msv2-feat { position: relative; overflow: hidden; }
.msv2-feat::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bd), transparent);
}
.msv2-feat-ico { font-size: 20px; }
.msv2-feat-title { font-family: var(--sans); font-size: 13.5px; font-weight: 700; letter-spacing: 0; }

/* ── Strip stats ─────────────────────────────────────────── */
.msv2-strip-val { font-family: var(--sans); font-size: 18px; font-weight: 700; letter-spacing: 0; }

/* ── Empty state ─────────────────────────────────────────── */
.msv2-empty-title { font-family: var(--sans); font-weight: 700; }

/* ── Card grid stagger override — more spring-like ──────── */
.msv2-card:nth-child(1)  { animation-delay: .00s; }
.msv2-card:nth-child(2)  { animation-delay: .05s; }
.msv2-card:nth-child(3)  { animation-delay: .10s; }
.msv2-card:nth-child(4)  { animation-delay: .15s; }
.msv2-card:nth-child(5)  { animation-delay: .20s; }
.msv2-card:nth-child(6)  { animation-delay: .25s; }
@keyframes msv2-card-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ── Template grid stagger ──────────────────────────────── */
.msv2-tpl-card {
  animation: msv2-card-in .3s ease both;
}
.msv2-tpl-card:nth-child(1) { animation-delay: .00s; }
.msv2-tpl-card:nth-child(2) { animation-delay: .06s; }
.msv2-tpl-card:nth-child(3) { animation-delay: .12s; }
.msv2-tpl-card:nth-child(4) { animation-delay: .18s; }
.msv2-tpl-card:nth-child(5) { animation-delay: .24s; }
.msv2-tpl-card:nth-child(6) { animation-delay: .30s; }

/* ── Skeleton — refined pulse ───────────────────────────── */
.msv2-skel-card {
  border-radius: var(--rlg); border: 1.5px solid var(--bd);
  background: linear-gradient(
    110deg,
    #eef2f8 8%, #f5f8ff 18%, #eef2f8 33%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s linear infinite;
}

/* ── Billing config section ─────────────────────────────── */
.billing-cfg-section {
  border-width: 1.5px;
  position: relative; overflow: hidden;
}
.billing-cfg-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber2) 100%);
}
.billing-cfg-title { font-family: var(--sans); font-size: 14px; }

/* ── Dots menu micro-polish ──────────────────────────────── */
.msv2-dots-btn {
  border-radius: 7px;
  transition: background .12s, color .12s, transform .12s;
}
.msv2-dots-btn:hover { transform: scale(1.1); }
.msv2-dots-menu {
  border-radius: 10px;
  border-color: var(--bd2);
  box-shadow: 0 16px 40px rgba(13,27,62,.16), 0 4px 8px rgba(13,27,62,.08);
}
.msv2-dots-item { border-radius: 6px; font-size: 12.5px; }

/* ── Type badge ─────────────────────────────────────────── */
.msv2-type-badge { font-size: 10.5px; letter-spacing: .2px; }

/* ── Status badge ───────────────────────────────────────── */
.msv2-status { font-size: 10.5px; letter-spacing: .15px; }

/* ── Scrollbar inside msv2 content ─────────────────────── */
#pv-labs .page-body::-webkit-scrollbar { width: 5px; }
#pv-labs .page-body::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 3px; }

/* ─── Custom Combobox ─────────────────────────────────────────── */
.custom-cb-dropdown {
  position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 100%; max-height: 220px; overflow-y: auto;
  background: #fff; border: 1.5px solid var(--bd);
  border-radius: var(--rsm); box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 200; list-style: none; margin: 0; padding: 4px 0;
}
.custom-cb-option {
  padding: 7px 12px; font-size: 12.5px; color: var(--ink);
  cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-family: var(--sans);
}
.custom-cb-option:hover,
.custom-cb-option--active { background: var(--bdim); color: var(--blue); }
.custom-cb-empty {
  padding: 7px 12px; font-size: 12px; color: var(--ink4);
  cursor: default; font-family: var(--sans);
}

/* ─── Pagination Row (shared: Audit Log + Labs) ───────────────── */
.audit-pg-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 12px; border-top: 1px solid var(--bg2);
}
.btn-pg {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; background: var(--bdim); color: var(--blue);
  border: 1.5px solid rgba(37,99,235,.2); border-radius: var(--r);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.btn-pg:hover:not(:disabled) { background: var(--blue2); color: #fff; }
.btn-pg:disabled { opacity: .4; cursor: default; }
.pg-info { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════════
   ADDITIONS — Billing Engine / Tax Accounts / Cards / Templates / VPC
   ═══════════════════════════════════════════════════════════════════ */

/* ── Finance Settings extras ───────────────────────────────────── */
.fset-card--admin { margin-top: 16px; }
.fset-section-desc { font-size: 12.5px; color: var(--ink4); margin-bottom: 18px; line-height: 1.6; }
.fset-field-hint { font-size: 11px; color: var(--ink4); margin-top: 2px; }
.fset-toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--ink2); }
.fset-toggle-row input[type="checkbox"] { accent-color: var(--blue); width: 15px; height: 15px; }
.fset-save-btn { margin-top: 18px; }

/* ── Tax per-account rows ───────────────────────────────────────── */
.fset-tax-empty { font-size: 13px; color: var(--ink4); padding: 12px 0; }
.fset-tax-list { display: flex; flex-direction: column; gap: 14px; }
.fset-tax-row {
  display: grid; grid-template-columns: 180px 1fr auto;
  gap: 14px; align-items: start;
  padding: 14px 16px; background: var(--bg);
  border: 1.5px solid var(--bd); border-radius: var(--r);
  transition: border-color .15s;
}
.fset-tax-row:hover { border-color: var(--blue3); }
.fset-tax-account { display: flex; flex-direction: column; gap: 3px; }
.fset-tax-acct-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.fset-tax-acct-id { font-size: 11px; color: var(--ink4); font-family: var(--mono); }
.fset-tax-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fset-tax-field { display: flex; flex-direction: column; gap: 4px; }
.fset-tax-lbl { font-size: 10.5px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; }
.fset-tax-dflt { font-weight: 400; color: var(--ink4); text-transform: none; letter-spacing: 0; }
.fset-tax-rebate-hint { color: var(--green); }
.fset-tax-input {
  padding: 7px 10px; background: var(--white);
  border: 1.5px solid var(--bd2); border-radius: var(--rsm);
  font-size: 13px; color: var(--ink); font-family: var(--sans);
  transition: border-color .15s;
}
.fset-tax-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--bdim); }
.fset-tax-input--rebate { border-color: rgba(5,150,105,.35); }
.fset-tax-input--rebate:focus { border-color: var(--green); box-shadow: 0 0 0 2px var(--gdim); }
.fset-tax-save-btn { align-self: center; white-space: nowrap; }
@media (max-width: 900px) {
  .fset-tax-row { grid-template-columns: 1fr; }
  .fset-tax-fields { grid-template-columns: 1fr 1fr; }
}

/* ── Pricing summary card (step 2 wizard) ───────────────────────── */
.lbs-price-summary-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  border-radius: var(--rlg); padding: 28px 28px 22px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(10,25,60,.22);
  margin-bottom: 18px;
}
.lbs-price-summary-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue2), var(--violet));
}
.lbs-price-summary-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.lbs-price-summary-amount {
  font-family: var(--sans); font-size: 28px; font-weight: 700;
  color: #fff; letter-spacing: -.2px; line-height: 1; margin-bottom: 10px;
}
.lbs-price-summary-meta { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 6px; }
.lbs-price-summary-meta strong { color: #fff; font-weight: 700; }
.lbs-price-incl-note {
  display: inline-block; font-size: 11px;
  background: rgba(16,185,129,.18); border: 1px solid rgba(16,185,129,.3);
  border-radius: 20px; padding: 2px 10px; color: #6ee7b7;
}
.lbs-price-rebate-badge {
  margin-top: 10px; display: inline-block;
  font-size: 12px; font-weight: 600;
  background: rgba(251,191,36,.18); border: 1px solid rgba(251,191,36,.35);
  border-radius: 20px; padding: 3px 12px; color: #fcd34d;
}
.lbs-price-table--breakdown {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  margin: 14px 0 8px;
  overflow: hidden;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: #fff;
}
.lbs-price-table--breakdown th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink3); border-bottom: 1px solid var(--bd);
  background: #f8fbff;
}
.lbs-price-table--breakdown td { padding: 10px 14px; border-bottom: 1px solid var(--bg2); color: var(--ink2); }
.lbs-price-table--breakdown td:last-child { text-align: right; font-family: var(--mono); }
.lbs-price-discount td { color: var(--green); font-weight: 700; }

/* ── Network auto-load row ──────────────────────────────────────── */
.lbs-net-auto-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lbs-net-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink4); padding: 4px 10px;
  background: var(--bg2); border-radius: 20px; border: 1px solid var(--bd);
}
.lbs-net-spinner {
  width: 12px; height: 12px;
  border: 2px solid var(--bd2); border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Server cards — refined pro layout ─────────────────────────── */
.msv2-card-title-block { display: flex; flex-direction: column; gap: 3px; }
.msv2-card-subtitle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; margin-top: 4px; flex-wrap: wrap; }
.msv2-card-region-lbl { font-size: 11.5px; }
.msv2-card-platform-ico { display: flex; align-items: center; }
.msv2-card-specs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 0; min-height: 38px; }
.msv2-card-spec-chip {
  display: inline-flex; align-items: center;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  background: #f3f7ff; color: #274690; border: 1px solid #dce7fb;
}
.msv2-chip--eip { background: var(--gdim); color: var(--green); border-color: rgba(5,150,105,.2); }
.msv2-card-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.msv2-card-info-item {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  min-height: 68px; padding: 10px 12px; border-radius: 12px;
  background: #f9fbff; border: 1px solid #e8eef8;
}
.msv2-card-info-item--muted { background: #fbfcfe; }
.msv2-card-info-lbl { font-size: 10px; color: #7b869c; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.msv2-card-info-val  { font-size: 13px; color: var(--ink); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.msv2-card-info-mono { font-family: var(--mono); }
.msv2-card-cost-block {
  padding: 14px 16px;
  border: 1px solid #e6edf9;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}
.msv2-card-cost-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink4); margin-bottom: 2px; }
.msv2-card-cost-note { font-size: 11px; color: #7b869c; margin-top: 6px; }
.msv2-ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6fbff 0%, #eef6ff 100%);
  border: 1px solid #dbe8fb;
  color: var(--ink2);
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 10px;
}
.msv2-ticker-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse-dot 1s infinite; }
.msv2-ticker-val { transition: color .3s; font-family: var(--mono); color: var(--ink); }
.msv2-card-trend {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f9ff;
  border: 1px solid #e6edf9;
  min-height: 92px;
}
.msv2-card-trend .msv2-spark-wrap { height: 46px; }
.msv2-card-trend--empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.msv2-card-trend-empty {
  font-size: 12px;
  color: #7b869c;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .msv2-grid { grid-template-columns: 1fr; }
  .msv2-card-name { font-size: 16px; }
}

@media (max-width: 520px) {
  .msv2-card-hd,
  .msv2-card-body,
  .msv2-card-ft,
  .msv2-card-specs { padding-left: 14px; padding-right: 14px; }
  .msv2-card-info-grid { grid-template-columns: 1fr; }
  .msv2-card-ft { flex-wrap: wrap; }
  .msv2-card-btn { flex: 1 1 100%; }
}

/* ── Template cards v2 — more compelling ───────────────────────── */
.msv2-tpl-card { position: relative; overflow: hidden; }
.msv2-tpl-ribbon {
  position: absolute; top: 14px; left: -26px;
  transform: rotate(-35deg);
  padding: 3px 32px; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  pointer-events: none; z-index: 2;
}
.msv2-tpl-ribbon--popular {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(217,119,6,.4);
}
.msv2-tpl-ribbon--value {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(5,150,105,.4);
}
.msv2-tpl-card--featured {
  box-shadow: 0 8px 32px rgba(37,99,235,.22), 0 2px 8px rgba(37,99,235,.1);
  border-color: rgba(59,127,255,.35);
}
.msv2-tpl-card--featured::before { height: 4px; background: linear-gradient(90deg, #f59e0b 0%, #3b82f6 100%); }
.msv2-tpl-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid var(--bd);
  box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .2s;
}
.msv2-tpl-card:hover .msv2-tpl-icon-wrap { transform: scale(1.1) rotate(-4deg); }
.msv2-tpl-icon { font-size: 24px; line-height: 1; }
.msv2-tpl-hw-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.msv2-tpl-hw {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--ink2);
  background: var(--bg2); border-radius: 8px;
  padding: 3px 8px; border: 1px solid var(--bd);
}
.msv2-tpl-divider { height: 1px; background: var(--bd); margin: 10px 0; }
.msv2-tpl-price-block { display: flex; flex-direction: column; gap: 2px; }
.msv2-tpl-price-from { font-size: 10.5px; color: var(--ink4); text-transform: uppercase; letter-spacing: .4px; }
.msv2-tpl-price-main { font-size: 19px; }

/* ── Create CTA card ──────────────────────────────────────── */
.msv2-create-cta {
  background:
    linear-gradient(135deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #17325c 0%, #122c53 100%);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--rlg);
  padding: 20px 24px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 6px 22px rgba(10,20,60,.16);
}
.msv2-create-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.msv2-create-cta::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 8%, rgba(59,127,255,.28) 35%, rgba(59,127,255,.28) 65%, transparent 92%);
  pointer-events: none;
}
.msv2-create-cta-left { position: relative; z-index: 1; }
.msv2-create-cta-title {
  font-size: 17px; font-weight: 800; color: #fff; margin: 0 0 6px;
}
.msv2-create-cta-sub {
  font-size: 12.5px; color: rgba(255,255,255,.72); margin: 0; line-height: 1.6; max-width: 640px;
}
.msv2-create-cta-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; z-index: 1;
}
.msv2-create-cta-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: var(--rlg);
  background: var(--blue2); color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(59,127,255,.45);
  transition: background .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.msv2-create-cta-btn:hover { background: #5090ff; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(59,127,255,.55); }
.msv2-create-cta-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--rlg);
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.msv2-create-cta-link:hover { background: rgba(255,255,255,.14); }
@media (max-width: 600px) {
  .msv2-create-cta { flex-direction: column; align-items: flex-start; }
  .msv2-create-cta-actions { width: 100%; }
  .msv2-create-cta-btn { flex: 1; justify-content: center; }
}

/* ── Template trust bar ──────────────────────────────────── */
.msv2-tpl-trust {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
.msv2-tpl-trust-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--ink4); font-weight: 500;
}
.msv2-tpl-trust-item svg { flex-shrink: 0; color: var(--green2); }

/* ── Live bill preview panel (step 1) ────────────────────── */
.lbs-live-bill {
  margin: 0 0 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border: 1.5px solid var(--bd);
  border-radius: var(--rlg); overflow: hidden;
  box-shadow: var(--sh);
}
.lbs-live-bill-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: transparent;
  border-bottom: 1px solid var(--bd);
}
.lbs-live-bill-title {
  font-size: 12px; font-weight: 700; color: var(--ink2);
  text-transform: uppercase; letter-spacing: .5px;
}
.lbs-live-bill-total {
  font-size: 20px; font-weight: 800; color: var(--blue2);
  font-family: var(--sans);
}
.lbs-live-bill-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.lbs-live-bill-table td {
  padding: 9px 16px; color: var(--ink2);
}
.lbs-live-bill-table td:last-child {
  text-align: right; font-family: var(--mono); font-weight: 600; color: var(--ink);
}
.lbs-live-bill-table tr + tr td { border-top: 1px solid var(--bg2); }
.lbs-live-bill-table .lbs-lb-tax td { color: var(--ink3); }
.lbs-live-bill-table .lbs-lb-discount td { color: var(--green); font-weight: 600; }
.lbs-live-bill-note {
  padding: 10px 16px; font-size: 11px; color: var(--ink3);
  border-top: 1px solid var(--bg2); background: rgba(255,255,255,.74);
}

/* ── Bill diff banners ───────────────────────────────────── */
.lbs-diff-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; font-size: 12px; font-weight: 600;
}
.lbs-diff-banner.lbs-diff--up   { background: rgba(220,38,38,.08); color: var(--red); }
.lbs-diff-banner.lbs-diff--down { background: rgba(5,150,105,.08); color: var(--green); }
.lbs-diff-arrow { font-size: 18px; line-height: 1; }
.lbs-diff-reasons {
  margin: 0; padding: 6px 16px 8px 36px;
  font-size: 11px; color: var(--ink3); list-style: disc;
}
.lbs-diff-reasons li + li { margin-top: 3px; }

/* ── Wizard trust bar ────────────────────────────────────── */
.lbs-wizard-trust-bar {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 10px 14px; margin-bottom: 18px;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r);
}
.lbs-wizard-trust-bar span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink3); font-weight: 500;
}
.lbs-wizard-trust-bar svg { color: var(--green2); flex-shrink: 0; }
