/* ==========================================================================
   Cloudbot Hosting Console - Modern Obsidian & Neon Theme
   Hyper-clean, responsive, enterprise-grade cloud management interface
   ========================================================================== */

:root {
  /* Surface & Canvas Hierarchy */
  --bg-canvas: #07080b;
  --bg-sidebar: #0b0d14;
  --bg-surface: #10131d;
  --bg-surface-elevated: #151824;
  --bg-surface-hover: #1c2030;
  --bg-surface-active: #22273b;
  --bg-input: #0b0d14;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  /* Accent & Brand Colors */
  --accent-primary: #6366f1;
  --primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-subtle: rgba(99, 102, 241, 0.12);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);

  /* Cloud Provider Signature Accents */
  --hetzner-red: #ef4444;
  --hetzner-bg: rgba(239, 68, 68, 0.10);
  --hetzner-border: rgba(239, 68, 68, 0.25);

  --vultr-blue: #0ea5e9;
  --vultr-bg: rgba(14, 165, 233, 0.10);
  --vultr-border: rgba(14, 165, 233, 0.25);

  --linode-green: #10b981;
  --linode-bg: rgba(16, 185, 129, 0.10);
  --linode-border: rgba(16, 185, 129, 0.25);

  --cloudflare-orange: #f97316;
  --cloudflare-bg: rgba(249, 115, 22, 0.10);
  --cloudflare-border: rgba(249, 115, 22, 0.25);

  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.12);

  /* Radii & Elevation */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 40px -4px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);

  /* Layout dimensions */
  --sidebar-width: 260px;
  --header-height: 68px;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

img, svg, video {
  max-width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

code, .font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 0.875em;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==================== APP LAYOUT ==================== */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-icon-wrap {
  width: 34px;
  height: 34px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.brand-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0 0.75rem 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

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

.nav-item.active {
  background: var(--accent-primary-subtle);
  color: #818cf8;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-count-badge {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-surface-active);
  color: var(--text-tertiary);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  transition: all 0.15s ease;
}

.nav-item:hover .nav-count-badge {
  color: var(--text-secondary);
}

.nav-item.active .nav-count-badge {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-provider-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.nav-counter {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
}

.nav-item.active .nav-counter {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.system-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.user-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--bg-surface-active);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-icon-xs {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all 0.15s ease;
}
.btn-icon-xs:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

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

/* ==================== HEADER BAR ==================== */
.app-header {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 13, 20, 0.7);
  backdrop-filter: blur(16px);
  z-index: 30;
}

.sync-status-strip {
  min-height: 42px;
  padding: 0.55rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(16, 19, 29, 0.88);
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.sync-status-main,
.sync-status-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.sync-status-label {
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
}

.sync-status-detail {
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.sync-status-strip[data-state="syncing"] .sync-status-dot {
  background: var(--accent-primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
  animation: sync-pulse 1.2s ease-in-out infinite;
}

.sync-status-strip[data-state="synced"] .sync-status-dot { background: var(--color-success); }
.sync-status-strip[data-state="attention"] .sync-status-dot,
.sync-status-strip[data-state="stale"] .sync-status-dot { background: var(--color-warning); }

.sync-attention-badge {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes sync-pulse {
  50% { opacity: 0.45; }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-title-block h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-search {
  position: relative;
  width: 360px;
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 2;
}

.header-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 3.5rem 0.5rem 2.25rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.header-search-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface-elevated);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 2.1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  display: none;
  line-height: 1;
  z-index: 2;
  transition: color 0.15s, background 0.15s;
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.search-clear-btn.visible {
  display: block;
}

.kbd-shortcut {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 2;
}

/* ==================== REAL FLOATING SEARCH DROPDOWN ==================== */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 540px;
  max-width: 90vw;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(24px);
  z-index: 1000;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: searchDropdownAnim 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropdownAnim {
  from { opacity: 0; transform: translateY(-4px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-dropdown.open {
  display: flex;
}

.search-dropdown-header {
  padding: 0.65rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
}

.search-dropdown-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.4rem;
}

.search-dropdown-results::-webkit-scrollbar {
  width: 6px;
}
.search-dropdown-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.search-category-group {
  margin-bottom: 0.5rem;
}

.search-category-group:last-child {
  margin-bottom: 0;
}

.search-category-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0.4rem 0.6rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.12s ease;
  margin-bottom: 2px;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
}

.search-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.search-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.search-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.search-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-item-title mark,
.search-item-sub mark {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.search-item-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2px;
}

.search-item-sub code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--accent-primary, #818cf8);
}

.search-item-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.search-empty-state {
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.search-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.search-dropdown-footer {
  padding: 0.5rem 0.95rem;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-dropdown-footer kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-secondary);
  margin-right: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 16px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  color: #ffffff;
}

.btn-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: var(--color-danger);
  color: #ffffff;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-warning:hover {
  background: #f59e0b;
  color: #ffffff;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 0.55rem;
  width: 36px;
  height: 36px;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.w-full,
.btn-block {
  width: 100% !important;
}

/* ==================== BUTTON LOADING & SPINNER ==================== */
.btn:disabled,
.btn.disabled,
.btn.btn-loading,
.btn-icon-subtle.btn-loading,
.btn-icon-xs.btn-loading,
.btn-icon-sm.btn-loading {
  opacity: 0.75 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

.btn-spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  vertical-align: -0.12em;
  flex-shrink: 0;
}

@keyframes btn-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#btn-refresh-all.loading,
.btn-icon-xs.loading,
.btn-icon-subtle.loading,
.btn.loading {
  animation: btn-spin 0.65s linear infinite !important;
  pointer-events: none !important;
  opacity: 0.75;
}


/* ==================== MAIN CONTENT BODY ==================== */
.content-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.75rem;
  min-width: 0;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.tab-pane.active {
  display: block;
}

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

/* ==================== STATS CARDS RIBBON ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

.stat-card-subtext {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ==================== PROVIDER HERO HUBS (OVERVIEW) ==================== */
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.provider-hubs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.provider-hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
}

.provider-hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.provider-hub-card.hetzner:hover { border-color: var(--hetzner-red); }
.provider-hub-card.vultr:hover { border-color: var(--vultr-blue); }
.provider-hub-card.linode:hover { border-color: var(--linode-green); }
.provider-hub-card.upcloud:hover { border-color: #f97316; }

.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hub-brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hub-provider-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.hub-provider-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.hub-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.provider-hub-card:hover .hub-arrow-btn {
  background: var(--text-primary);
  color: #000000;
}

.hub-metrics-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.hub-metric {
  flex: 1;
}

.hub-metric-num {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hub-metric-title {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.hub-account-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

.hub-account-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ==================== PROVIDER SECTION HUBS (HETZNER, VULTR, LINODE) ==================== */
.provider-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.provider-banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1 1 260px;
  min-width: 0;
}

.provider-banner-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.provider-banner-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.provider-banner-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.provider-banner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  flex: 1 1 auto;
}

/* Provider Accounts Grid */
.accounts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.account-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.account-card:hover {
  border-color: var(--border-medium);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.account-card-header > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.account-card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-info-table {
  width: 100%;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.account-card-info-table tr td {
  padding: 0.3rem 0;
}
.account-card-info-table tr td:first-child {
  color: var(--text-tertiary);
  width: 40%;
}
.account-card-info-table tr td:last-child {
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
}

.account-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}

.account-card-footer > .btn-primary,
.account-card-footer > .account-card-view-btn {
  width: 100%;
  justify-content: center;
}

.account-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  width: 100%;
}

.account-card.account-card-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-card.account-card-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.account-drilldown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.account-drilldown-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
}

/* ==================== ACCOUNT MANAGEMENT & BILLING MASTER STYLES ==================== */
.banner-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.pill-filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pill-filter {
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.pill-filter.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.pill-filter:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.input-search-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  min-width: 240px;
  transition: all 0.2s;
}

.input-search-sm:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ==================== CLEAN EXECUTIVE ACCOUNTS VIEW ==================== */
.accounts-clean-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.account-clean-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) auto minmax(180px, 1.2fr) auto auto;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.75) 0%, rgba(14, 16, 24, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.account-clean-row:hover {
  border-color: var(--border-medium);
  background: linear-gradient(180deg, rgba(24, 28, 42, 0.85) 0%, rgba(16, 19, 28, 0.95) 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.account-clean-row.hetzner-row:hover { border-color: rgba(239, 68, 68, 0.35); }
.account-clean-row.vultr-row:hover { border-color: rgba(14, 165, 233, 0.35); }
.account-clean-row.linode-row:hover { border-color: rgba(16, 185, 129, 0.35); }

.account-clean-primary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  overflow: hidden;
}

.account-clean-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.account-clean-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.account-clean-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
}

.account-clean-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.account-clean-sub {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online {
  background-color: var(--color-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.status-dot.offline {
  background-color: var(--color-danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

.status-dot.idle {
  background-color: var(--text-tertiary);
  opacity: 0.5;
}

.account-clean-region {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.region-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.region-badge-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.account-clean-proxy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.badge-proxy-pool,
.badge-proxy-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  max-width: 220px;
  min-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

.badge-proxy-custom {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-proxy-direct {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.account-clean-billing {
  display: flex;
  flex-direction: column;
  min-width: max-content;
  white-space: nowrap;
}

.billing-amount-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.billing-amount-text {
  white-space: nowrap;
  font-weight: 700;
}

.btn-icon-subtle {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-icon-subtle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(30deg);
}

.account-clean-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .account-clean-row {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }
  .account-clean-primary {
    grid-column: 1;
  }
  .account-clean-region {
    grid-column: 2;
    justify-content: flex-end;
  }
  .account-clean-proxy {
    grid-column: 1;
  }
  .account-clean-billing {
    grid-column: 2;
    align-items: flex-end;
    text-align: right;
  }
  .account-clean-actions {
    grid-column: span 2;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.65rem;
    margin-top: 0.25rem;
  }
}

@media (max-width: 640px) {
  .account-clean-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .account-clean-region {
    grid-column: 1;
    justify-content: flex-start;
  }
  .account-clean-billing {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }
  .account-clean-actions {
    grid-column: 1;
    justify-content: flex-start;
  }
}

.accounts-master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.account-master-card {
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.7) 0%, rgba(14, 16, 24, 0.9) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.account-master-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.6);
}

.account-master-card.hetzner-card:hover { border-color: rgba(239, 68, 68, 0.4); }
.account-master-card.vultr-card:hover { border-color: rgba(14, 165, 233, 0.4); }
.account-master-card.linode-card:hover { border-color: rgba(16, 185, 129, 0.4); }

.account-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-master-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.account-master-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.account-master-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.account-master-id {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.account-sub-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.account-sub-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.account-sub-box-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.account-billing-amount {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.account-sub-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.account-sub-metric-item {
  display: flex;
  flex-direction: column;
}

.account-sub-metric-label {
  color: var(--text-tertiary);
  font-size: 0.68rem;
}

.account-sub-metric-val {
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.account-proxy-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.latency-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.latency-tag.fast {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.latency-tag.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.latency-tag.slow {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.latency-tag.muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.account-master-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== PROXY POOL PROVIDERS STYLES ==================== */
.proxy-providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
}

.proxy-provider-card {
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.85) 0%, rgba(14, 16, 24, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  min-width: 0;
  overflow: hidden;
}

.proxy-provider-card:hover {
  border-color: var(--border-medium);
}

.proxy-provider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proxy-provider-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.proxy-capacity-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.proxy-capacity-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.proxy-capacity-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
  transition: width 0.3s ease;
}

.proxy-bound-accounts-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.proxy-bound-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 140px;
  overflow-y: auto;
}

.proxy-bound-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.proxy-bound-chip:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.proxy-session-tag {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.7rem;
}

/* Proxy Model & Protocol Controls */
.proxy-type-pill-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
}

.proxy-type-pill {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.proxy-type-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.proxy-type-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.proxy-mode-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
}

.proxy-mode-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.proxy-mode-tab:hover {
  color: var(--text-primary);
}

.proxy-mode-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.token-insert-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.token-insert-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #ffffff;
}

/* Session Management Modal & Table */
.modal-box.modal-xl {
  max-width: 900px;
}

.session-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.session-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.proxy-sessions-list-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-surface);
}

.proxy-sessions-table {
  width: 100%;
  border-collapse: collapse;
}

.proxy-sessions-table th {
  position: sticky;
  top: 0;
  background: #181d28;
  z-index: 2;
  padding: 0.6rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.proxy-sessions-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.proxy-sessions-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-icon-xs {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-icon-xs:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-icon-warning:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

.btn-icon-success:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 0.8s linear infinite !important;
  display: inline-block;
}

/* ==================== DATA TABLES ==================== */
.data-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.table-toolbar {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.85rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table td:last-child > .flex {
  flex-wrap: wrap;
  gap: 0.35rem;
}

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

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

/* ==================== BADGES & STATUS ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  vertical-align: middle;
}

.badge img {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
}

.badge-hetzner {
  background: var(--hetzner-bg);
  color: #fca5a5;
  border: 1px solid var(--hetzner-border);
}

.badge-upcloud {
  color: #fdba74;
  background: rgba(249, 115, 22, 0.13);
  border: 1px solid rgba(249, 115, 22, 0.38);
}

.upcloud-interface-card {
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  min-width: 0;
}

.upcloud-interface-ips { display: grid; gap: 0.5rem; margin-top: 0.5rem; overflow-wrap: anywhere; }

.badge-vultr {
  background: var(--vultr-bg);
  color: #7dd3fc;
  border: 1px solid var(--vultr-border);
}

.badge-linode {
  background: var(--linode-bg);
  color: #6ee7b7;
  border: 1px solid var(--linode-border);
}

.badge-status-running {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-off {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.border-danger {
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.border-danger:hover {
  border-color: rgba(239, 68, 68, 0.7) !important;
}

.ip-copyable {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s;
}
.ip-copyable:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 100;
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

@supports (align-items: safe center) {
  .modal-backdrop.open {
    align-items: safe center;
  }
}

.modal-box {
  margin: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScale 0.15s ease-out;
  flex-shrink: 0;
}

.modal-box.modal-lg {
  max-width: 760px;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 1.2rem;
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--border-focus);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

.text-input, .select-input, .textarea-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

.select-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(11, 13, 20, 0.4);
}

.text-input:focus, .select-input:focus, .textarea-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Deploy Context Banner */
.deploy-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}
.deploy-context-banner:hover {
  border-color: rgba(99, 102, 241, 0.38);
}

.modal-header-text {
  display: flex;
  flex-direction: column;
}
.modal-icon-badge {
  font-size: 1.25rem;
  line-height: 1;
}
.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.85rem 0;
}
.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.form-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.form-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.form-field-hint {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  line-height: 1.35;
}
.batch-preview-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}

/* Visual Provider Picker Grid inside Deployment Modal */
.provider-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.provider-picker-btn {
  background: rgba(16, 19, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.provider-picker-btn:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.provider-picker-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.provider-picker-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.provider-picker-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.provider-picker-count {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.provider-picker-btn.active .provider-picker-count {
  color: #a5b4fc;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-info { border-left: 4px solid var(--accent-primary); }

/* Telegram Auth Box */
.btn-telegram {
  background: #229ed9;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.25);
}
.btn-telegram:hover {
  background: #1e8ec5;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.35);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}
.auth-divider span {
  padding: 0 0.75rem;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-nav-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

/* Responsive */
@media (max-width: 1024px) {
  .provider-hubs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .provider-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .sidebar-content {
    display: none;
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 1.25rem;
  }
  .sidebar-content.mobile-open {
    display: block;
  }
  .sidebar-footer {
    display: none;
  }
  .main-viewport {
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
    min-width: 0;
    width: 100%;
  }
  .content-body {
    padding: 1rem 0.75rem;
    overflow-x: hidden;
    min-width: 0;
    width: 100%;
  }
  .app-header {
    padding: 0 1.25rem;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .sync-status-strip {
    padding: 0.6rem 1rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
  .sync-status-detail { max-width: 62vw; }
  .header-search {
    display: none;
  }
  .provider-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .provider-banner-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ==================== CORE UTILITY CLASSES ==================== */
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.w-1\.5 { width: 0.375rem !important; }
.h-1\.5 { height: 0.375rem !important; }
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }

.rounded-full { border-radius: var(--radius-full) !important; }
.object-contain { object-fit: contain !important; }

.bg-success { background-color: var(--color-success) !important; }
.bg-muted { background-color: var(--text-tertiary) !important; }
.bg-danger { background-color: var(--color-danger) !important; }

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-tertiary) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-success { color: var(--color-success) !important; }

.font-bold { font-weight: 700 !important; }
.font-medium { font-weight: 500 !important; }
.font-normal { font-weight: 400 !important; }

.text-xs { font-size: 0.75rem !important; line-height: 1rem; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem; }
.uppercase { text-transform: uppercase !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-8 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.mt-0\.5 { margin-top: 0.125rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }

/* ==================== SERVER DETAILS & MANAGEMENT MODAL ==================== */
.server-detail-modal-box {
  max-width: 860px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.server-detail-modal-box .modal-body {
  overflow-y: auto;
  flex: 1;
}

.server-detail-provider-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.server-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 860px) {
  .server-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .server-stats-grid {
    grid-template-columns: 1fr;
  }
}

.server-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.server-stat-card:hover {
  border-color: var(--border-medium);
}

.server-title-link {
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.server-title-link:hover {
  color: var(--color-primary-light, #818cf8) !important;
  text-decoration: underline;
}

.attached-fip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: border-color 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.attached-fip-card:hover {
  border-color: var(--border-medium);
}

.attached-fip-card.selected {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.5);
}

.checkbox-input {
  accent-color: var(--primary, #6366f1);
  width: 18px;
  height: 18px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

#srvmodal-account-pill {
  cursor: pointer;
  transition: all 0.15s ease;
}

#srvmodal-account-pill:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}

/* Floating & Primary IP Management UI */
.fip-modal-state {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fip-filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fip-filter-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.fip-filter-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary-light, #818cf8);
  font-weight: 600;
}

.badge-unassigned {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  font-weight: 600;
}

/* Account Sub-navigation Tabs (Compute Instances vs IP Management) */
.account-subtabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.account-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.account-subtab-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.account-subtab-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

.account-subtab-btn .badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  line-height: 1.3;
}

/* Account IP Management View Styling */
.account-ip-management-view {
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.account-ip-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.account-ip-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.account-ip-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.account-ip-metric-card.highlight-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-surface) 100%);
}

.account-ip-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.account-ip-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-ip-metric-icon {
  font-size: 1rem;
}

.account-ip-metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: var(--text-primary);
  line-height: 1.2;
}

.account-ip-metric-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.account-ip-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ==================== BULK ACTIONS TOOLBAR ==================== */
.bulk-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.15s ease-out;
}

.bulk-actions-toolbar .bulk-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ==================== IP ACCOUNT FILTER PILLS ==================== */
.ips-account-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ips-account-pill {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.ips-account-pill:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.ips-account-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.ips-account-pill .pill-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.ips-account-pill:not(.active) .pill-badge {
  background: var(--bg-card);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

/* Hetzner Separation Cards */
.hetzner-ip-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hetzner-ip-section-card:hover {
  border-color: var(--border-medium);
}

/* ==================== LOGS & SYSTEM ACTIVITY ==================== */
.pulse-dot-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
  padding-left: 1.15rem;
}
.pulse-dot-badge::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-dot-anim 1.8s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: translateY(-50%) scale(1.15); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}
.live-status-pill.paused {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}
.live-status-pill.paused .pulse-indicator {
  background: #94a3b8;
  box-shadow: none;
  animation: none;
}
.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot-anim 1.8s infinite;
}

.logs-subtab-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.25rem;
}
.subtab-buttons {
  display: flex;
  gap: 0.5rem;
}
.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.subtab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.subtab-btn.active {
  color: #818cf8;
  border-bottom-color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
}
.subtab-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}
.subtab-btn.active .subtab-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

.terminal-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}
.toolbar-group {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
}
.toolbar-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.toolbar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.select-sm, .text-input-sm {
  font-size: 0.8125rem;
  padding: 0.45rem 0.65rem;
  height: 2.15rem;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  accent-color: #6366f1;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.log-stream-terminal {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.terminal-header {
  background: #0d1424;
  border-bottom: 1px solid #1e293b;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.terminal-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-body {
  height: 520px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #cbd5e1;
  background: #090d16;
  scroll-behavior: smooth;
}
.terminal-body::-webkit-scrollbar {
  width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
  background: #090d16;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.terminal-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.2rem 0.35rem;
  border-radius: 3px;
  word-break: break-all;
  white-space: pre-wrap;
  transition: background 0.15s;
}
.terminal-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.term-ts {
  color: #64748b;
  flex-shrink: 0;
  font-size: 0.75rem;
}
.term-proc {
  color: #38bdf8;
  flex-shrink: 0;
  font-size: 0.75rem;
}
.term-lvl {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}
.term-lvl-error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.term-lvl-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.term-lvl-info {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.term-lvl-debug {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}
.term-msg {
  flex: 1;
  color: #e2e8f0;
}
.term-msg .method-post {
  color: #818cf8;
  font-weight: 700;
}
.term-msg .method-get {
  color: #34d399;
  font-weight: 700;
}
.term-msg .status-200 {
  color: #34d399;
  font-weight: 700;
}
.term-msg .status-err {
  color: #f87171;
  font-weight: 700;
}

/* Activity Audit Badges */
.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.act-create { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.act-delete { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.act-power { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.act-ip { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.act-account { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }
.act-system { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* ==================== RESPONSIVE REFINEMENTS ==================== */
@media (max-width: 1200px) {
  .content-body {
    padding: 1.25rem 1.25rem;
  }
  .data-table th, .data-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8125rem;
  }
  .app-header {
    padding: 0 1.25rem;
  }
}

@media (max-width: 768px) {
  .data-table th, .data-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.775rem;
  }
  .hetzner-ip-section-card {
    padding: 0.85rem;
  }
  .bulk-actions-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}




/* Inline account note: always visible, click to add/edit */
.account-clean-note {
  display: flex; align-items: flex-start; gap: 4px; max-width: 100%; margin-top: 4px;
  padding: 0; border: 0; background: none; color: var(--text-secondary, #9aa4b2);
  font-size: 12px; text-align: left; cursor: pointer;
}
.account-clean-note span { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.account-clean-note:hover { color: var(--text-primary, #e6e9ef); }
.account-clean-note.empty { opacity: .55; }
.account-clean-note.empty:hover { opacity: 1; }
.account-clean-note svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 2px; }

.api-code{background:var(--bg-surface,#111);border:1px solid var(--border-subtle,#333);border-radius:8px;padding:.75rem;overflow-x:auto;font-size:.8rem;white-space:pre}
#tab-api .api-card{background:var(--bg-surface,#161616);border:1px solid var(--border-subtle,#333);border-radius:10px;padding:1rem;margin-bottom:1rem}#tab-api h3{margin:0 0 .5rem}#tab-api p{margin:.4rem 0}#tab-api code{font-size:.85em}
.api-ai-tabs{display:flex;gap:.5rem;margin:.25rem 0 .75rem}.api-ai-tab{background:transparent;color:inherit;border:1px solid var(--border-subtle,#333);border-radius:8px;padding:.35rem .9rem;cursor:pointer;font:inherit}.api-ai-tab.active{background:var(--accent,#2f6feb);border-color:var(--accent,#2f6feb);color:#fff}#tab-api [hidden]{display:none}
.api-snip{position:relative}.api-snip .api-code{padding-right:5rem;white-space:pre-wrap;word-break:break-all}.api-copy{position:absolute;top:.5rem;right:.5rem;background:var(--accent,#2f6feb);color:#fff;border:0;border-radius:6px;padding:.25rem .7rem;cursor:pointer;font:inherit;font-size:.8rem}#tab-api .api-status{color:var(--text-secondary,#999);font-size:.85rem}

/* Account traffic: total plus a muted "synced" stamp */
.traffic-cell, .account-traffic { display: inline-flex; align-items: baseline; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.traffic-value { font-family: var(--font-mono, ui-monospace, monospace); font-weight: 600; color: var(--text-primary, inherit); }
.traffic-synced { font-size: 11px; font-weight: 400; color: var(--text-muted, #7d8590); }
