/* =========================================================
   AIRATERHUB — AETHER GLASSMORPHISM DESIGN SYSTEM (V4.2)
   Inspired by Reference UI: Deep Obsidian, Luminous Teal & Violet Glass
   Creator: @subhurowdy · airaterhub.com
   ========================================================= */

:root {
  color-scheme: dark;
  --bg-deep: #030712;
  --bg-card: rgba(10, 16, 28, 0.75);
  --bg-card-hover: rgba(14, 22, 38, 0.85);
  --bg-inset: rgba(4, 8, 16, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-specular: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(6, 182, 212, 0.35);

  /* Aether Reference Color Palette */
  --teal-glow: #06b6d4;
  --teal-accent: #14b8a6;
  --teal-light: #38bdf8;
  --purple-glow: #8b5cf6;
  --purple-accent: #a855f7;
  --emerald-trend: #10b981;
  --coral-accent: #f43f5e;
  --amber-accent: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --radius-full: 9999px;

  --shadow-glass: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card-hover: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.09), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.09), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04), transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal-glow);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   AETHER TOPBAR NAVIGATION (SHARED ACROSS ALL PAGES)
   ========================================================= */
.aether-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 24px;
  background: rgba(8, 13, 24, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aether-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.5px;
  color: #fff;
  flex-shrink: 0;
}

.aether-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: #020713;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.45);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aether-brand:hover .aether-brand-logo {
  transform: scale(1.06);
  box-shadow: 0 0 26px rgba(6, 182, 212, 0.7);
}

.aether-brand-logo img,
.aether-brand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9px;
}

.aether-brand-logo svg {
  width: 100%;
  height: 100%;
}

.aether-brand span {
  color: var(--teal-glow);
}

/* Nav Link Pills */
.aether-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aether-nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.aether-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.aether-nav-link.active {
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.28);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.18);
}

.aether-nav-link svg {
  width: 15px;
  height: 15px;
}

/* Search Bar Capsule (like Reference Image) */
.aether-search-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-inset);
  border: 1px solid var(--border-glass);
  min-width: 260px;
  transition: all 0.2s ease;
}

.aether-search-capsule:focus-within {
  border-color: var(--teal-glow);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18), 0 0 15px rgba(6, 182, 212, 0.2);
}

.aether-search-capsule svg {
  width: 15px;
  height: 15px;
  color: var(--text-dim);
}

.aether-search-capsule input {
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12.5px;
  color: #fff;
  width: 100%;
}

.aether-search-capsule input::placeholder {
  color: var(--text-dim);
}

.aether-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* User & Actions */
.aether-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aether-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: all 0.18s ease;
}

.aether-icon-btn:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.1);
}

.aether-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  cursor: pointer;
}

.aether-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}

.aether-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}

/* =========================================================
   AETHER GLASSMORPHISM CONTAINER & CARDS
   ========================================================= */
.aether-shell {
  width: min(1360px, calc(100% - 36px));
  margin: 28px auto 60px;
}

.aether-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-top: 1px solid var(--border-specular);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glass);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.aether-card:hover {
  border-color: rgba(6, 182, 212, 0.32);
  box-shadow: var(--shadow-card-hover);
}

/* Card Header */
.aether-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.aether-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aether-card-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Filter Dropdown Pill */
.aether-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

/* Metric Sparkline Cards (Reference UI Row 1) */
.aether-metric-tile {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-top: 1px solid var(--border-specular);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glass);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.aether-metric-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.35);
}

.aether-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.aether-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.aether-icon-pod {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.aether-icon-pod.teal {
  background: rgba(6, 182, 212, 0.14);
  color: #22d3ee;
}
.aether-icon-pod.green {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}
.aether-icon-pod.purple {
  background: rgba(139, 92, 246, 0.14);
  color: #c084fc;
}
.aether-icon-pod.coral {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
}

.aether-metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.aether-metric-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
}

.aether-trend-chip {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.aether-sparkline {
  width: 100%;
  height: 38px;
  display: block;
}

/* Buttons */
.btn-aether-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 11px;
  background: linear-gradient(135deg, #06b6d4, #2563eb 50%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 0 #1e3a8a, 0 8px 22px rgba(6, 182, 212, 0.35);
  transition: all 0.18s ease;
}

.btn-aether-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e3a8a, 0 12px 28px rgba(6, 182, 212, 0.45);
}

.btn-aether-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1e3a8a;
}

.btn-aether-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.btn-aether-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Sidebar "Upgrade to Pro" Card (Exact to Reference UI) */
.aether-upgrade-box {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(32, 20, 56, 0.75), rgba(16, 10, 28, 0.88));
  border: 1px solid rgba(139, 92, 246, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.aether-upgrade-box h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.aether-upgrade-box p {
  margin: 0 0 14px;
  font-size: 11px;
  color: #c4b5fd;
  line-height: 1.5;
}

.btn-upgrade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  border-radius: 9px;
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
  transition: all 0.18s ease;
}

.btn-upgrade-pill:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Footer */
.aether-footer {
  border-top: 1px solid var(--border-glass);
  padding: 24px 0;
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

.aether-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.aether-footer-links a {
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.aether-footer-links a:hover {
  color: var(--teal-glow);
}

/* Responsive */
@media (max-width: 850px) {
  .aether-nav-links, .aether-search-capsule { display: none; }
  .aether-shell { width: calc(100% - 24px); margin: 16px auto 40px; }
}

/* =========================================================
   AETHER GLASSMORPHISM COOKIE & ADSENSE CONSENT POPUP
   ========================================================= */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  width: calc(100% - 32px);
  max-width: 640px;
  background: rgba(10, 16, 28, 0.92);
  border: 1px solid rgba(6, 182, 212, 0.38);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 18px;
  padding: 18px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.2);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  color: #f8fafc;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cookie-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cookie-text p {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.cookie-text a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.cookie-btn-decline {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
    padding: 16px;
    gap: 14px;
  }
  .cookie-actions {
    justify-content: flex-end;
  }
  .cookie-btn-accept, .cookie-btn-decline {
    flex: 1;
    text-align: center;
  }
}
