/* ==========================================================================
   CryptoVault Modern Dark Theme - Web3 Fintech Aesthetic
   ========================================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: #0e1424;
  --bg-card: #131b2e;
  --bg-card-hover: #18223a;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-focus: #06b6d4;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Card Styling */
.vault-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

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

.vault-glass {
  background: rgba(14, 20, 36, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

/* Form Controls */
.vault-input {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background-color: #0b1120;
  border: 1px solid #1e293b;
  border-radius: 0.6rem;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s ease;
}

.vault-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

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

/* Primary Button with Neon Glow */
.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.btn-secondary {
  background-color: #131c31;
  color: #e2e8f0;
  border: 1px solid #24304f;
  font-weight: 500;
  border-radius: 0.6rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background-color: #1a2642;
  border-color: #3b4b72;
  color: #fff;
}

/* Tab Navigation */
.nav-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.5rem 0.5rem 0 0;
}

.nav-tab.active {
  color: #38bdf8;
  font-weight: 600;
  border-bottom: 2px solid #38bdf8;
}

/* Chain Badges */
.chain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.chain-btc { background: rgba(247, 147, 26, 0.15); color: #f7931a; border: 1px solid rgba(247, 147, 26, 0.3); }
.chain-eth { background: rgba(98, 126, 234, 0.15); color: #818cf8; border: 1px solid rgba(98, 126, 234, 0.3); }
.chain-sol { background: rgba(20, 241, 149, 0.15); color: #14f195; border: 1px solid rgba(20, 241, 149, 0.3); }
.chain-tron { background: rgba(235, 0, 41, 0.15); color: #ff4d4f; border: 1px solid rgba(235, 0, 41, 0.3); }
.chain-base { background: rgba(0, 82, 255, 0.15); color: #60a5fa; border: 1px solid rgba(0, 82, 255, 0.3); }
.chain-arb { background: rgba(40, 160, 240, 0.15); color: #38bdf8; border: 1px solid rgba(40, 160, 240, 0.3); }
.chain-bsc { background: rgba(240, 185, 11, 0.15); color: #fbbf24; border: 1px solid rgba(240, 185, 11, 0.3); }
.chain-matic { background: rgba(130, 71, 229, 0.15); color: #a78bfa; border: 1px solid rgba(130, 71, 229, 0.3); }
.chain-op { background: rgba(255, 4, 32, 0.15); color: #fb7185; border: 1px solid rgba(255, 4, 32, 0.3); }
.chain-generic { background: rgba(100, 116, 139, 0.15); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }

/* Amount Highlighting */
.amount-incoming {
  color: #34d399;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}

/* Toast Notifications */
#toastNotification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #fff;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#toastNotification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Table */
.vault-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

.vault-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background-color: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.vault-table tbody tr {
  transition: background-color 0.15s ease;
}

.vault-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

/* Shimmer scan progress bar */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.progress-shimmer {
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #06b6d4 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Fintech Floating Tooltip
   ========================================================================== */
#vaultTooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  max-width: 330px;
  background: rgba(11, 16, 29, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.8), 0 0 15px -2px rgba(6, 182, 212, 0.25);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  color: #f1f5f9;
}

#vaultTooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#vaultTooltip .tooltip-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#vaultTooltip .tooltip-desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
}

#vaultTooltip .tooltip-footer {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.6875rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

