/* ═══════════════════════════════════════════════════════════════
   Meterflow Dashboard — Premium Overlay
   Loads after dashboard.css. Refines colors, spacing, and motion
   to match the site's premium feel.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --accent: #3d7df0;
  --accent-2: #5a96ff;
  --accent-deep: #1d4ed8;
  --accent-dim: #2563c8;
  --accent-glow: rgba(61, 125, 240, 0.10);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

::selection { background: rgba(61, 125, 240, 0.32); color: #ffffff; }

/* ─── Subtle ambient backdrop ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(61, 125, 240, 0.07), transparent 60%),
    radial-gradient(700px 500px at 5% 110%, rgba(106, 123, 255, 0.05), transparent 60%);
}

.app, .main, .sidebar { position: relative; z-index: 1; }

/* ─── Sidebar polish ─── */
.sidebar {
  background:
    linear-gradient(180deg, rgba(11, 16, 26, 0.95), rgba(5, 9, 16, 0.98)) !important;
  border-right: 1px solid rgba(120, 160, 220, 0.08) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}

.sidebar-logo {
  background: linear-gradient(180deg, #ffffff 0%, #a8c6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(120, 160, 220, 0.08);
}

.sidebar-logo .brand-mark { color: var(--accent); }

.nav-item {
  border-radius: 10px;
  padding: 10px 14px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.nav-item:hover {
  background: rgba(120, 160, 220, 0.06);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(61, 125, 240, 0.14), rgba(61, 125, 240, 0.02));
  color: #ffffff;
  border-left: 2px solid var(--accent);
  box-shadow: inset 24px 0 48px -24px rgba(61, 125, 240, 0.32);
}

.nav-item.active .icon { color: var(--accent-2); }

.sidebar-social-link {
  transition: transform 0.3s var(--ease-out-expo), color 0.3s ease, background 0.3s ease;
}
.sidebar-social-link:hover {
  transform: translateY(-2px);
  color: var(--accent-2);
}

/* ─── Main content frame ─── */
.main {
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(61, 125, 240, 0.04), transparent 70%);
}

.page-title {
  letter-spacing: -0.02em;
}

.page-title .accent,
.page-title span[class*="accent"] {
  background: linear-gradient(180deg, #9ec1ff 0%, #5a96ff 45%, #3d7df0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Stat cards ─── */
.stat-card {
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.66), rgba(8, 12, 20, 0.86)) !important;
  border: 1px solid rgba(120, 160, 220, 0.08) !important;
  border-radius: 14px !important;
  transition:
    transform 0.5s var(--ease-out-expo),
    border-color 0.4s ease,
    box-shadow 0.5s var(--ease-out-expo),
    background 0.4s ease !important;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 170, 255, 0.24) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 22px 50px -18px rgba(0,0,0,0.55),
    0 0 40px -18px rgba(61, 125, 240, 0.4) !important;
}

.stat-card .stat-value {
  background: linear-gradient(180deg, #ffffff 0%, #c8d8ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card .stat-value.accent {
  background: linear-gradient(180deg, #9ec1ff 0%, #3d7df0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Buttons ─── */
.btn-primary,
button.btn-primary,
a.btn-primary {
  background: linear-gradient(180deg, #7eb2ff 0%, #3d7df0 52%, #1d4ed8 100%) !important;
  border: 1px solid rgba(170, 200, 255, 0.78) !important;
  color: #050b18 !important;
  font-weight: 700;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 0 0 1px rgba(255,255,255,0.06),
    0 10px 28px rgba(29, 78, 216, 0.35);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo), filter 0.3s ease !important;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s var(--ease-out-expo);
  pointer-events: none;
  z-index: -1;
}

.btn-primary:hover::before { transform: translateX(120%); }

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 18px 42px rgba(61, 125, 240, 0.55),
    0 0 0 1px rgba(170, 200, 255, 0.4);
}

.btn-secondary {
  background: rgba(10, 16, 28, 0.6) !important;
  border: 1px solid rgba(120, 160, 220, 0.22) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease-out-expo), border-color 0.3s ease, background 0.3s ease, color 0.3s ease !important;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 170, 255, 0.55) !important;
  background: rgba(61, 125, 240, 0.10) !important;
  color: var(--text) !important;
}

/* ─── Section labels ─── */
.section-label,
.token-utility-kicker {
  background: linear-gradient(180deg, rgba(61, 125, 240, 0.10), rgba(61, 125, 240, 0.04));
  border: 1px solid rgba(120, 160, 240, 0.22);
  letter-spacing: 3px;
  font-size: 10.5px;
  padding: 7px 14px 7px 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* ─── Generic card hover (token-utility-panel, etc.) ─── */
.token-utility-panel,
.preview-access-notice,
.media-lab-card,
.feature-card,
.dash-card {
  transition:
    transform 0.5s var(--ease-out-expo),
    border-color 0.4s ease,
    box-shadow 0.5s var(--ease-out-expo);
}

.token-utility-panel:hover,
.preview-access-notice:hover,
.media-lab-card:hover,
.feature-card:hover,
.dash-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 170, 255, 0.24);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 22px 50px -18px rgba(0,0,0,0.55),
    0 0 40px -20px rgba(61, 125, 240, 0.35);
}

/* ─── Wallet badge polish ─── */
.wallet-info {
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.8), rgba(8, 12, 20, 0.92));
  border: 1px solid rgba(120, 160, 220, 0.12);
  border-radius: 12px;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.wallet-info:hover { border-color: rgba(120, 170, 255, 0.32); }

.wallet-addr {
  color: var(--accent-2);
}

/* ─── Status banner colors stay semantic but get smoother ─── */
.status-banner { transition: opacity 0.4s ease; }

/* ─── Subtle entrance for stat cards on load ─── */
@keyframes statCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-row .stat-card {
  animation: statCardIn 0.6s var(--ease-out-expo) both;
}
.stats-row .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-row .stat-card:nth-child(2) { animation-delay: 0.12s; }
.stats-row .stat-card:nth-child(3) { animation-delay: 0.19s; }
.stats-row .stat-card:nth-child(4) { animation-delay: 0.26s; }
.stats-row .stat-card:nth-child(5) { animation-delay: 0.33s; }

/* ─── Scrollbars in dashboard match accent ─── */
* {
  scrollbar-color: rgba(120, 160, 220, 0.3) transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 220, 0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 170, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
