/* ==========================================================================
   Inferno VPS Manager - Premium Dark Glassmorphism Design System
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Monaco, monospace;

  /* Colors */
  --bg-app: #080b11;
  --bg-card: rgba(16, 23, 38, 0.75);
  --bg-card-hover: rgba(22, 32, 53, 0.85);
  --bg-dialog: #0e1525;
  --bg-input: rgba(10, 15, 26, 0.8);
  --bg-code: rgba(7, 11, 20, 0.95);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #f97316;
  --border-card: rgba(255, 255, 255, 0.1);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.35);

  --secondary: #3b82f6;
  --secondary-hover: #2563eb;
  --secondary-glow: rgba(59, 130, 246, 0.35);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px var(--primary-glow);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.18;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

/* ==========================================================================
   App Header
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.2);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px #f97316);
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #fff 40%, #fdba74 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Status Pill */
.status-indicator-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.status-indicator-pill.live-mode {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.status-indicator-pill.demo-mode {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Header Pills */
.header-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

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

.ip-pill .pill-label {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ip-pill code {
  color: #93c5fd;
  font-weight: 600;
}

.balance-pill {
  gap: 0.6rem;
  border-color: rgba(249, 115, 22, 0.2);
  background: rgba(249, 115, 22, 0.05);
}

.balance-info {
  display: flex;
  flex-direction: column;
}

.balance-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.balance-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fdba74;
  font-size: 0.95rem;
}

.btn-add-funds {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-add-funds:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.app-nav {
  position: sticky;
  top: 61px;
  z-index: 35;
  background: rgba(11, 16, 28, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.badge-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.badge-count.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.app-main {
  position: relative;
  z-index: 10;
  max-width: 1360px;
  margin: 0 auto;
  padding: 2rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* View Header */
.view-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.view-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

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

/* ==========================================================================
   Dashboard Widgets & Cards
   ========================================================================== */

/* Banner Box */
.banner-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(249, 115, 22, 0.25);
  margin-bottom: 2rem;
  position: relative;
}

.banner-icon {
  font-size: 1.5rem;
}

.banner-text {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
  flex: 1;
}

.banner-text a {
  color: #fdba74;
  text-decoration: underline;
}

.banner-ip {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #60a5fa;
  font-family: var(--font-mono);
  font-weight: 600;
}

.btn-close-banner {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}

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

.stat-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon-bg {
  font-size: 1.25rem;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Section Card */
.section-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

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

/* Quick Actions */
.quick-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Events Log */
.events-log-container {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.5rem;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.log-time {
  font-family: var(--font-mono);
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.log-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.log-badge.info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.log-badge.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.log-badge.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.log-badge.error { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.log-message {
  flex: 1;
  color: var(--text-main);
}

/* ==========================================================================
   VPS Instances Cards & Grid
   ========================================================================== */

.vps-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.vps-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: var(--transition-normal);
  position: relative;
}

.vps-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(249, 115, 22, 0.1);
  transform: translateY(-2px);
}

.vps-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vps-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.os-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.vps-title-box {
  display: flex;
  flex-direction: column;
}

.vps-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.vps-meta-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

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

.status-badge.stopped {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.status-badge.reinstalling, .status-badge.rebooting {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.status-badge.pending_payment, .status-badge.pending {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

/* IP & Credentials Row */
.vps-ip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.vps-ip-val {
  color: #93c5fd;
  font-weight: 600;
}

.vps-ip-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Specs Badges Row */
.vps-specs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.spec-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0.3rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.spec-badge .spec-label {
  font-size: 0.65rem;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.spec-badge .spec-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

/* Password Toggle Row */
.vps-pass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.vps-pass-val {
  font-family: var(--font-mono);
  color: #e2e8f0;
  margin-left: 0.5rem;
}

/* VPS Control Buttons */
.vps-actions-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* ==========================================================================
   Deploy Wizard (Заказ VPS)
   ========================================================================== */

.deploy-wizard-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.wizard-step-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
}

.step-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--primary-glow);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.plan-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.plan-item-card.selected {
  background: rgba(249, 115, 22, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
}

.plan-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.plan-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.plan-specs-summary {
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fdba74;
}

/* OS Selector Grid */
.os-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.os-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}

.os-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.os-card.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--secondary);
  box-shadow: 0 0 12px var(--secondary-glow);
}

.os-card-icon {
  font-size: 1.4rem;
}

.os-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Order Summary Sticky Card */
.order-summary-card {
  position: sticky;
  top: 125px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-md);
}

.summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.summary-val {
  text-align: right;
  color: var(--text-main);
}

.summary-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1.25rem 0;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.total-price {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fdba74;
}

/* ==========================================================================
   Tables (Orders & Data)
   ========================================================================== */

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

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

.data-table th {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

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

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

/* ==========================================================================
   SSH Keys Grid
   ========================================================================== */

.ssh-keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.ssh-key-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition-fast);
}

.ssh-key-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.ssh-key-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.ssh-fingerprint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #93c5fd;
  word-break: break-all;
  background: var(--bg-code);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.ssh-key-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.form-input.font-mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action .form-input {
  padding-right: 2.8rem;
}

.btn-toggle-visibility {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.btn-toggle-visibility:hover {
  opacity: 1;
}

.input-search {
  padding: 0.55rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  width: 260px;
  transition: var(--transition-fast);
}

.input-search:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }

.custom-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.custom-checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.custom-checkbox-label input[type="checkbox"]:checked + .checkbox-mark {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox-label input[type="checkbox"]:checked + .checkbox-mark::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-text {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-card);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-icon-only {
  padding: 0.6rem;
  border-radius: var(--radius-md);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-icon-subtle:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.buttons-row {
  display: flex;
  gap: 0.75rem;
}

/* ==========================================================================
   Modals & Native <dialog>
   ========================================================================== */

.app-dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  padding: 0;
  max-width: 520px;
  width: 90vw;
  margin: auto;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.app-dialog::backdrop {
  background: rgba(4, 7, 12, 0.8);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.app-dialog.modal-lg {
  max-width: 680px;
}

.dialog-content {
  background: var(--bg-dialog);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.dialog-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dialog-icon {
  font-size: 1.4rem;
}

.dialog-icon.icon-danger {
  color: var(--danger);
}

.dialog-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.dialog-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-dialog-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px;
}

.dialog-body {
  padding: 1.5rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.danger-warning-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.85rem;
  color: #fca5a5;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   SSH Details & Web Terminal
   ========================================================================== */

.code-snippet-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #93c5fd;
}

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

.cred-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.port-probe-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.probe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.web-terminal-container {
  background: #050811;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.term-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.terminal-screen {
  padding: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 130px;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.4;
  color: #a7f3d0;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.term-prompt {
  color: #34d399;
  font-size: 0.82rem;
  margin-right: 0.5rem;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ==========================================================================
   Settings & Instruction Guide
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 1.5rem;
}

.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.step-item {
  display: flex;
  gap: 1rem;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.step-desc {
  font-size: 0.85rem;
  line-height: 1.5;
}

.step-desc p {
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.step-desc a {
  color: #60a5fa;
}

.ip-copy-snippet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  background: var(--bg-code);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.ip-copy-snippet code {
  color: #60a5fa;
  font-family: var(--font-mono);
  font-weight: 700;
}

.test-result-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.test-result-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.test-result-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(14, 21, 37, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  font-size: 0.88rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
  max-width: 420px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--secondary); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty States & Spinners */
.empty-state, .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  gap: 0.75rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }
.text-danger { color: #f87171; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.82rem; }
.font-mono { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.d-block { display: block; }

/* Connection Status Banner */
.connection-status-banner {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.connection-status-banner.banner-warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(249, 115, 22, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.connection-status-banner.banner-success {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.banner-left-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.banner-big-icon {
  font-size: 1.6rem;
}

.banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.banner-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.demo-tag-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  margin-top: 3px;
}

.real-tag-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  margin-top: 3px;
}

.hidden-tag-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  margin-top: 3px;
}

.vps-card.is-hidden {
  opacity: 0.72;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.4);
}

.vps-card.is-hidden:hover {
  opacity: 1;
  border-color: rgba(255, 107, 0, 0.4);
}

.btn-filter-active {
  background: rgba(255, 107, 0, 0.18) !important;
  color: #ffaa5a !important;
  border-color: var(--accent) !important;
}


