/**
 * HidenMigrate - Complete Elegant Redesign
 * Modern dark theme with glass morphism effects
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #0f1419;
  --bg-card: #141a22;
  --bg-elevated: #1a2332;
  --bg-glass: rgba(20, 26, 34, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.15);

  --text-primary: #f0f4f8;
  --text-secondary: #8b9cb3;
  --text-muted: #5c6b7f;

  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  --gradient-blue: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --gradient-purple: linear-gradient(135deg, #8b5cf6, #6366f1);
  --gradient-cyan: linear-gradient(135deg, #06b6d4, #0891b2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.3);

  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

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

svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ============================================
   App Layout
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--gradient-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  display: block;
  padding: 0 24px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.nav-list {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue-light);
}

.nav-item.active .nav-icon {
  color: var(--accent-blue);
}

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

.nav-icon svg {
  width: 20px;
  height: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-purple);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.logout-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

.logout-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Main Wrapper
   ============================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
  height: var(--header-height);
  padding: 0 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.connection-indicator.online {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.connection-indicator.offline {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 28px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  animation: slideIn 0.3s ease;
}

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

.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-green);
}

.toast-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--accent-red);
}

.toast-close {
  margin-left: auto;
  padding: 4px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}

.toast-close:hover {
  opacity: 1;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  flex: 1;
  padding: 28px;
  overflow-x: hidden;
}

/* ============================================
   Dashboard Page
   ============================================ */
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.stat-servers .stat-icon-wrap {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.stat-nodes .stat-icon-wrap {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.stat-users .stat-icon-wrap {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

.stat-locations .stat-icon-wrap {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -10px;
  opacity: 0.04;
}

.stat-bg-icon svg {
  width: 80px;
  height: 80px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-badge {
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
}

.card-body {
  padding: 22px;
}

/* Connection Status Box */
.connection-status-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
}

.connection-status-box.connected {
  background: rgba(16, 185, 129, 0.08);
}

.connection-status-box.disconnected {
  background: rgba(239, 68, 68, 0.08);
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-icon svg {
  width: 26px;
  height: 26px;
}

.connected .status-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.disconnected .status-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.connection-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Quick Links */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.quick-link:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
}

.quick-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-icon svg {
  width: 22px;
  height: 22px;
}

.quick-icon.servers {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.quick-icon.nodes {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.quick-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.quick-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* ============================================
   Servers & Nodes Pages
   ============================================ */
.servers-page,
.nodes-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.search-container svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-container input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.search-container input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-container input::placeholder {
  color: var(--text-muted);
}

.total-badge {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Grid Cards */
.servers-grid,
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.server-card,
.node-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.server-card:hover,
.node-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow-blue);
}

.server-card-header,
.node-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.server-status,
.node-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.server-status.active,
.node-status.online {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.server-status.suspended,
.node-status.maintenance {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.server-id,
.node-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.server-card-body,
.node-card-body {
  padding: 20px;
  flex: 1;
}

.server-name,
.node-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.server-identifier,
.node-fqdn {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.server-card-stats,
.node-card-resources {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

.server-card-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.server-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.server-stat svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Node Resources */
.node-card-resources {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.resource-label {
  color: var(--text-muted);
}

.resource-value {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.mini-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.mini-fill.memory {
  background: var(--gradient-blue);
}

.mini-fill.disk {
  background: var(--gradient-cyan);
}

.server-card-footer,
.node-card-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  color: var(--accent-blue-light);
  font-size: 13px;
  font-weight: 600;
}

.server-card-footer svg,
.node-card-footer svg {
  width: 16px;
  height: 16px;
}

/* Empty State */
.empty-box {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.empty-icon {
  margin-bottom: 20px;
}

.empty-icon svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-box h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-box p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto;
}

/* Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 24px;
}

.page-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.page-btn svg {
  width: 16px;
  height: 16px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Detail Pages
   ============================================ */
.server-detail-page,
.node-detail-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-nav {
  margin-bottom: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.back-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* Detail Hero */
.detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-status.active,
.hero-status.online {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.hero-status.suspended,
.hero-status.maintenance {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-orange);
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.meta-item.identifier {
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* Resource Overview */
.resource-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.resource-card-big {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.resource-card-big .resource-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resource-card-big .resource-icon svg {
  width: 28px;
  height: 28px;
}

.resource-card-big.memory .resource-icon {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.resource-card-big.disk .resource-icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.resource-data {
  flex: 1;
  min-width: 0;
}

.resource-title {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.resource-numbers {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.resource-numbers .allocated {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.resource-numbers .separator,
.resource-numbers .total {
  font-size: 14px;
  color: var(--text-muted);
}

.big-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.big-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient-blue);
  transition: width 0.5s ease;
}

.percent-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.info-card.full-width {
  grid-column: 1 / -1;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.info-card-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
}

.info-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.info-card-body {
  padding: 20px 22px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row.full {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.info-value.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
}

/* Resource Items in Cards */
.info-card-body .resource-item {
  margin-bottom: 16px;
}

.info-card-body .resource-item:last-of-type {
  margin-bottom: 20px;
}

.resource-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.resource-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.resource-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.resource-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.resource-fill.memory { background: var(--accent-blue); }
.resource-fill.disk { background: var(--accent-cyan); }
.resource-fill.cpu { background: var(--accent-green); }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-item {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
}

.feature-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.feature-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* Startup Command */
.startup-cmd {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  white-space: pre-wrap;
}

/* Overallocation */
.overalloc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.overalloc-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
}

.overalloc-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.overalloc-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Allocations */
.allocations-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.alloc-count {
  font-size: 12px;
  color: var(--text-muted);
}

.allocations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.allocation-chip {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.allocation-chip.assigned {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.alloc-ip {
  color: var(--text-primary);
}

.alloc-port {
  color: var(--accent-blue);
}

.alloc-alias {
  color: var(--text-muted);
  margin-left: 6px;
}

.more-allocs {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Auth / Login Page
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 20px;
}

.auth-container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-card {
  flex: 1;
  padding: 48px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-background {
  flex: 1;
  background: linear-gradient(135deg, #1e3a5f 0%, #0a0e14 100%);
  position: relative;
  min-height: 500px;
}

.auth-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--gradient-blue);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow-blue);
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
}

.login-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--accent-red);
}

.login-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-container {
  position: relative;
}

.input-container .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-container input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-container input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-container input::placeholder {
  color: var(--text-muted);
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-password:hover {
  color: var(--text-secondary);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-blue);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
}

.login-btn svg {
  width: 18px;
  height: 18px;
}

.login-footer {
  text-align: center;
  margin-top: 32px;
}

.login-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .resource-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .auth-background {
    display: none;
  }

  .auth-container {
    max-width: 440px;
  }
}

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

  .main-content {
    padding: 20px;
  }

  .page-header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    width: 100%;
  }

  .servers-grid,
  .nodes-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-title {
    font-size: 22px;
  }

  .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 0 16px;
  }

  .page-title {
    font-size: 18px;
  }

  .connection-indicator .indicator-text {
    display: none;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-number {
    font-size: 24px;
  }
}

/* ===== Migration Page ===== */
.migration-page {
  max-width: 1000px;
  margin: 0 auto;
}

.page-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  margin-bottom: 32px;
}

.intro-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.intro-icon svg {
  width: 30px;
  height: 30px;
  color: white;
}

.intro-text h2 {
  font-size: 20px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 4px 0;
}

.intro-text p {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
}

.empty-box {
  text-align: center;
  padding: 60px 24px;
  background: #0f1419;
  border: 1px solid #1e293b;
  border-radius: 16px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 50%;
}

.empty-icon svg {
  width: 40px;
  height: 40px;
  color: #fbbf24;
}

.empty-box h3 {
  font-size: 18px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 8px 0;
}

.empty-box p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.migration-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.migration-card {
  background: #0f1419;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
}

.migration-card .card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #1e293b;
}

.header-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.header-icon.source {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  color: #818cf8;
}

.header-icon.destination {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  color: #34d399;
}

.header-icon svg {
  width: 24px;
  height: 24px;
}

.header-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 4px 0;
}

.header-text p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.migration-card .card-body {
  padding: 20px;
}

.select-wrapper {
  margin-bottom: 16px;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  background: #141a22;
  border: 1px solid #1e293b;
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: all 0.2s ease;
}

.form-select:hover {
  border-color: #334155;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-select option {
  background: #141a22;
  color: #f1f5f9;
}

.server-info,
.node-info {
  padding: 16px;
  background: #141a22;
  border: 1px solid #1e293b;
  border-radius: 10px;
}

.server-info.hidden,
.node-info.hidden {
  display: none;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.info-item:not(:last-child) {
  border-bottom: 1px solid #1e293b;
}

.info-item .info-label {
  font-size: 13px;
  color: #64748b;
}

.info-item .info-value {
  font-size: 13px;
  color: #f1f5f9;
  font-weight: 500;
}

.info-item .info-value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.resource-bars {
  margin-top: 12px;
}

.resource-bar-item {
  margin-bottom: 12px;
}

.resource-bar-item:last-child {
  margin-bottom: 0;
}

.resource-bar-item .resource-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.progress-bar {
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.memory {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.progress-fill.disk {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.migration-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
}

.arrow-line {
  width: 2px;
  height: 30px;
  background: linear-gradient(180deg, transparent, #3b82f6);
}

.arrow-line:last-child {
  background: linear-gradient(180deg, #3b82f6, transparent);
}

.arrow-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.arrow-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.migration-options {
  background: #0f1419;
  border: 1px solid #1e293b;
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}

.options-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
}

.options-header svg {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.options-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.options-body {
  padding: 16px 20px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: #141a22;
  border: 1px solid #1e293b;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.option-item:last-child {
  margin-bottom: 0;
}

.option-item:hover {
  border-color: #334155;
}

.option-item input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #334155;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.option-item input[type="checkbox"]:checked + .checkbox-custom {
  background: #3b82f6;
  border-color: #3b82f6;
}

.option-item input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.option-text {
  flex: 1;
}

.option-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.option-desc {
  display: block;
  font-size: 13px;
  color: #64748b;
}

.migration-action {
  text-align: center;
  padding: 20px 0;
}

.btn-migrate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-migrate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-migrate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-migrate svg {
  width: 20px;
  height: 20px;
}

.action-hint {
  font-size: 13px;
  color: #64748b;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .migration-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .migration-arrow {
    flex-direction: row;
    padding-top: 0;
    justify-content: center;
    gap: 0;
  }

  .arrow-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6);
  }

  .arrow-line:last-child {
    background: linear-gradient(90deg, #3b82f6, transparent);
  }
}

/* ============================================
   Migration Form Extended Styles
   ============================================ */
.migration-form {
  width: 100%;
}

.source-card .header-icon.source {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(234, 88, 12, 0.1));
  color: #fb923c;
}

.dest-card .header-icon.destination {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
  color: #22c55e;
}

.node-info-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row .info-label {
  font-size: 13px;
  color: #64748b;
}

.info-row .info-value {
  font-size: 13px;
  color: #f1f5f9;
  font-weight: 500;
}

.ssh-credentials {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

.credentials-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.credentials-header svg {
  width: 18px;
  height: 18px;
  color: #f59e0b;
}

.credentials-header span {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: #475569;
}

.btn-test-ssh {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-test-ssh:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.btn-test-ssh svg {
  width: 16px;
  height: 16px;
}

.test-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.test-result.loading {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.test-result.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

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

.warning-box {
  display: flex;
  gap: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.warning-box svg {
  width: 24px;
  height: 24px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-content strong {
  display: block;
  font-size: 14px;
  color: #fbbf24;
  margin-bottom: 6px;
}

.warning-content p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

.option-item.info-item {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 14px 16px;
  cursor: default;
}

.option-item.info-item svg {
  width: 20px;
  height: 20px;
  color: #60a5fa;
  margin-right: 12px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: right;
}

.progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

#migrationStatus {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
}

#migrationStatus.success {
  color: #22c55e;
}

#migrationStatus.error {
  color: #ef4444;
}

.migration-logs {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
}

.log-line {
  padding: 4px 0;
  display: flex;
  gap: 10px;
}

.log-time {
  color: #64748b;
  white-space: nowrap;
}

.log-level {
  font-weight: 600;
  white-space: nowrap;
}

.log-line.log-info .log-level { color: #60a5fa; }
.log-line.log-ok .log-level { color: #22c55e; }
.log-line.log-warn .log-level { color: #f59e0b; }
.log-line.log-error .log-level { color: #ef4444; }

.log-msg {
  color: #94a3b8;
  word-break: break-word;
}

.btn-close-modal {
  padding: 10px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: var(--bg-glass);
  border-color: var(--border-hover);
}

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.alert-error span {
  color: #fca5a5;
  font-size: 14px;
}
