/* ==========================================================================
   Prism Proxy — Dashboard Styles (Slate Light & Console Dark Themes)
   ========================================================================== */

:root {
  --bg: oklch(98.4% 0.004 264);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(97.2% 0.005 264);
  --surface-3: oklch(96.6% 0.006 264);
  --input-bg: oklch(100% 0 0);
  --seg-bg: oklch(96.2% 0.005 264);
  --sidebar-bg: oklch(100% 0 0);
  --sidebar-border: oklch(91.8% 0.006 264);
  --sidebar-active-bg: oklch(94.8% 0.028 264);
  --sidebar-active-text: oklch(48% 0.16 264);
  --topbar-bg: oklch(100% 0 0);

  --border: oklch(91.8% 0.006 264);
  --border-2: oklch(86% 0.008 264);

  --text: oklch(25% 0.02 264);
  --text-2: oklch(46% 0.015 264);
  --text-3: oklch(62% 0.012 264);

  --accent: oklch(55% 0.16 264);
  --accent-2: oklch(49% 0.17 264);
  --accent-fg: oklch(99% 0 0);
  --accent-soft: oklch(95.5% 0.025 264);
  --accent-border: oklch(82% 0.07 264);
  --accent-text: oklch(50% 0.16 264);

  --ok: oklch(62% 0.13 158);
  --ok-soft: oklch(95% 0.04 158);
  --ok-text: oklch(48% 0.12 158);
  --warn: oklch(74% 0.13 75);
  --warn-soft: oklch(95.5% 0.05 80);
  --warn-text: oklch(53% 0.11 65);
  --danger: oklch(60% 0.19 25);
  --danger-soft: oklch(95.5% 0.035 25);
  --danger-text: oklch(53% 0.18 25);
  --neutral: oklch(70% 0.012 264);
  --neutral-soft: oklch(95% 0.005 264);
  --neutral-text: oklch(54% 0.012 264);

  --cr-verizon: oklch(58% 0.2 25);
  --cr-att: oklch(52% 0.15 250);
  --cr-tmo: oklch(60% 0.22 350);

  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.05), 0 1px 3px rgba(20, 22, 40, 0.04);
  --shadow-lg: 0 12px 34px rgba(20, 22, 45, 0.14);
}

/* Console Dark Theme */
[data-theme="console"] {
  --bg: oklch(18.5% 0.014 252);
  --surface: oklch(21.5% 0.016 252);
  --surface-2: oklch(24.5% 0.017 252);
  --surface-3: oklch(27% 0.018 252);
  --input-bg: oklch(17% 0.013 252);
  --seg-bg: oklch(18% 0.014 252);
  --sidebar-bg: oklch(15.5% 0.013 252);
  --sidebar-border: oklch(28% 0.018 252);
  --sidebar-active-bg: oklch(26% 0.035 205);
  --sidebar-active-text: oklch(78% 0.12 200);
  --topbar-bg: oklch(15.5% 0.013 252);

  --border: oklch(29% 0.018 252);
  --border-2: oklch(36% 0.02 252);

  --text: oklch(93% 0.008 252);
  --text-2: oklch(74% 0.012 252);
  --text-3: oklch(58% 0.014 252);

  --accent: oklch(70% 0.13 200);
  --accent-2: oklch(64% 0.14 200);
  --accent-fg: oklch(16% 0.015 252);
  --accent-soft: oklch(25% 0.035 205);
  --accent-border: oklch(42% 0.08 200);
  --accent-text: oklch(76% 0.13 200);

  --ok-soft: oklch(26% 0.045 158);
  --ok-text: oklch(74% 0.13 158);
  --warn-soft: oklch(27% 0.045 78);
  --warn-text: oklch(80% 0.12 78);
  --danger-soft: oklch(26% 0.05 25);
  --danger-text: oklch(74% 0.15 25);
  --neutral-soft: oklch(26% 0.015 252);
  --neutral-text: oklch(72% 0.012 252);

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 5px;
  --radius-sm: 4px;
  --radius-pill: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

.mono {
  font-family: var(--mono);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

@keyframes pp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.75); opacity: 0.45; }
}

@keyframes pp-spin {
  to { transform: rotate(360deg); }
}

@keyframes pp-fade {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.spin-once {
  animation: pp-spin 0.6s linear;
}

/* ==========================================================================
   Shell Geometry
   ========================================================================== */
.dash-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

/* Sidebar */
.dash-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.dash-sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .dash-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    flex-shrink: 0;
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 30, 0.45);
  z-index: 55;
  display: none;
}

.sidebar-backdrop.open {
  display: block;
}

.sidebar-brand {
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 800;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px -2px oklch(55% 0.16 264 / 0.45);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-wordmark {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-wordmark span {
  font-weight: 700;
  color: var(--accent-text);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-top: 2px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-group-label {
  padding: 4px 10px 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.nav-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-item svg {
  opacity: 0.85;
  flex-shrink: 0;
}

.nav-item.active svg {
  opacity: 1;
}

/* Sidebar Feedback Poll */
.poll-card {
  margin-top: auto;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.poll-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.poll-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 9px;
}

.poll-btn {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.14s ease;
}

.poll-btn:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.poll-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.poll-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: 6px;
}

.poll-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.poll-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
}

/* Sidebar Sticky Footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.quick-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.14s ease;
}

.quick-tile:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.quick-tile.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.quick-tile.primary:hover {
  background: var(--accent-2);
}

.balance-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.balance-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.balance-amount {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 2px;
}

.balance-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

.btn-outline:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}

.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Main Column & Top Header
   ========================================================================== */
.dash-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  padding: 0 22px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-root {
  color: var(--text-3);
  font-weight: 500;
}

.breadcrumb-sep {
  color: var(--text-3);
}

.breadcrumb-cur {
  color: var(--text);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Segmented Theme Toggle */
.pp-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--seg-bg);
  border: 1px solid var(--border);
}

.pp-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.14s ease;
}

.pp-seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.topbar-pill {
  display: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

@media (min-width: 820px) {
  .topbar-pill {
    display: inline-flex;
  }
}

.topbar-pill:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}

.topbar-icon-btn:hover,
.topbar-icon-btn.active {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.live-status-pill {
  display: none;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--text-2);
}

@media (min-width: 1160px) {
  .live-status-pill {
    display: inline-flex;
  }
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
  animation: pp-pulse 2s infinite;
  flex-shrink: 0;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  color: var(--ok-text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
}

.balance-pill:hover {
  filter: brightness(0.97);
}

/* Avatar & Profile Menu */
.avatar-wrap {
  position: relative;
}

.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px 2px 2px;
  border-radius: var(--radius-pill);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-chevron {
  color: var(--text-2);
  transition: transform 0.16s ease;
}

.avatar-btn[aria-expanded="true"] .avatar-chevron {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 218px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 14px 18px 16px;
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 80;
}

.profile-menu.open {
  display: flex;
}

.profile-menu-email-only {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-3);
}

.profile-menu-signout {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  display: block;
  transition: color 0.14s ease;
}

.profile-menu-signout:hover {
  color: var(--accent-text);
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
}

.profile-menu-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ==========================================================================
   Main Content Area & Compact Density
   ========================================================================== */
.dash-content {
  flex: 1;
  padding: 24px 22px 84px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[data-density="compact"] .dash-content {
  padding: 16px 18px 72px;
  gap: 12px;
}

[data-density="compact"] .proxy-card,
[data-density="compact"] .stat-card,
[data-density="compact"] .card-box {
  padding: 13px 14px;
}

.dash-view {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: pp-fade 0.16s ease;
}

.dash-view.active {
  display: flex;
}

/* Announcement & Promo Banners */
.banner-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
}

.banner-left strong {
  color: var(--text);
}

.banner-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.banner-dismiss {
  color: var(--text-3);
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}

.banner-dismiss:hover {
  background: var(--surface);
  color: var(--text);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.15;
}

.page-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text-2);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reseller-banner {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.reseller-banner h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.reseller-banner p {
  font-size: 13px;
  color: var(--text-2);
}

.referral-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.ref-code {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-text);
}

/* KPI Stat Cards */
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 960px) {
  .stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 680px) {
  .stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.stat-icon {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.neutral { background: var(--neutral-soft); color: var(--neutral-text); }
.stat-icon.ok { background: var(--ok-soft); color: var(--ok-text); }
.stat-icon.warn { background: var(--warn-soft); color: var(--warn-text); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger-text); }
.stat-icon.accent { background: var(--accent-soft); color: var(--accent-text); }

.stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-value {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.stat-sub {
  font-size: 12px;
  color: var(--text-3);
}

.stat-sub.ok { color: var(--ok-text); font-weight: 600; }
.stat-sub.warn { color: var(--warn-text); font-weight: 600; }

/* Card Box & Filter Toolbar */
.card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 145px;
}

.field-group.grow {
  flex: 1;
  min-width: 220px;
}

.field-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.input-control {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
}

.input-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(55% 0.16 264 / 0.14);
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-wrap .input-control {
  padding-left: 34px;
}

/* ==========================================================================
   Proxy Cards Grid (Signature My Proxies Cards)
   ========================================================================== */
.proxies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 820px) {
  .proxies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.proxy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.proxy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.proxy-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.icon-mini-btn {
  color: var(--text-3);
  padding: 4px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-mini-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.status-pill.running { color: var(--ok-text); }
.status-pill.inactive { color: var(--danger-text); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-dot.running {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.status-dot.inactive {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

/* Location + Carrier + Exit IP Row */
.proxy-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.city-select-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  max-width: 190px;
}

.city-select-pill select {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 12.5px;
  outline: none;
  max-width: 145px;
  cursor: pointer;
}

.carrier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.carrier-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dot-verizon { background: var(--cr-verizon); }
.dot-att { background: var(--cr-att); }
.dot-tmo { background: var(--cr-tmo); }

.exit-ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
}

.exit-ip-age {
  color: var(--text-3);
  font-size: 11px;
}

/* Quick Rotate Buttons */
.proxy-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Endpoints */
.endpoint-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.endpoint-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.endpoint-copy-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.endpoint-copy-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.endpoint-copy-btn svg {
  color: var(--accent-text);
  flex-shrink: 0;
}

/* Credentials */
.creds-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 2px;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
}

.new-pass-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  width: fit-content;
}

.new-pass-pill:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* Rotation Dropdowns */
.rotation-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.rot-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rot-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.rot-label svg {
  color: var(--accent-text);
}

.rot-hint {
  font-size: 11px;
  color: var(--text-3);
}

/* Billing Footer on Card */
.proxy-billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.billing-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.billing-right {
  text-align: right;
}

.billing-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.billing-exp {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--warn-text);
}

.billing-exp.expired {
  color: var(--danger-text);
}

.more-actions-wrap {
  position: relative;
}

.more-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  display: none;
  z-index: 25;
}

.more-menu.open {
  display: block;
}

/* List Footer & Bottom Settings Cards */
.list-footer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

.setting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.setting-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.setting-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.state-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--neutral-soft);
  color: var(--neutral-text);
}

.state-pill.on {
  background: var(--ok-soft);
  color: var(--ok-text);
}

.setting-desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 680px;
}

/* ==========================================================================
   Tables, Legend, Checkout, Billing, Docs, Referrals
   ========================================================================== */
.legend-bar {
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dash-table th {
  text-align: left;
  padding: 11px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dash-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.dash-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-table tbody tr:hover {
  background: var(--surface-2);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.pill-ok { background: var(--ok-soft); color: var(--ok-text); }
.pill-warn { background: var(--warn-soft); color: var(--warn-text); }
.pill-danger { background: var(--danger-soft); color: var(--danger-text); }
.pill-neutral { background: var(--neutral-soft); color: var(--neutral-text); }

/* Proxy Locations Exact Table & Controls */
.loc-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  flex-shrink: 0;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.loc-refresh-btn:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.loc-browse-table th {
  height: 46px;
  background: var(--surface);
}

.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th span,
.sortable-th .sort-chevron {
  vertical-align: middle;
}

.sort-chevron {
  margin-left: 4px;
  opacity: 0.35;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.sortable-th.sorted .sort-chevron {
  opacity: 0.9;
  color: var(--accent-text);
}

.sortable-th.sorted.desc .sort-chevron {
  transform: rotate(180deg);
}

.loc-carrier-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.avail-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.avail-ok { color: var(--ok-text); }
.avail-ok .avail-dot { background: var(--ok); }
.avail-warn { color: var(--warn-text); }
.avail-warn .avail-dot { background: var(--warn); }
.avail-full { color: var(--danger-text); }
.avail-full .avail-dot { background: var(--danger); }

.loc-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color 0.14s ease;
}

.loc-connect-btn:hover {
  background: var(--accent-2);
}

.loc-full-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.my-nodes-table th {
  height: 46px;
  background: var(--surface);
}

.node-manage-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.node-btn-random {
  color: var(--accent-text);
}

.node-btn-random:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* 2-Column Billing & Buy Checkout */
.two-col-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 860px) {
  .two-col-split {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

@media (min-width: 560px) {
  .preset-row {
    grid-template-columns: repeat(6, 1fr);
  }
}

.preset-btn {
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.preset-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.pay-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.pay-method-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.pay-method-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.buy-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 580px) {
  .buy-plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.buy-plan-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: all 0.14s ease;
}

.buy-plan-card:hover {
  border-color: var(--border-2);
}

.buy-plan-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.summary-balance-box {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ok);
  background: var(--ok-soft);
  color: var(--ok-text);
  font-size: 12.5px;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.qty-btn:hover {
  background: var(--surface-2);
}

/* Docs 2-col */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .docs-grid {
    grid-template-columns: 230px 1fr;
  }
}

.doc-nav-item {
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.doc-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Floating Support FAB */
.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 26px -6px oklch(55% 0.16 264 / 0.7);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.support-fab:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 16, 30, 0.52);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pp-fade 0.16s ease;
}

.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(14px);
  z-index: 120;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: oklch(20% 0.02 264);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
