/* ---------------------------------------------------------
   QUANTUM CORE (Variables + Resets)
   --------------------------------------------------------- */
:root {
  --bg-0: #010409;
  --bg-1: #0A0F1A;
  --bg-2: #111827;
  --glass: rgba(255,255,255,0.06);

  --accent-1: #3B82F6;
  --accent-2: #60A5FA;
  --accent-3: #93C5FD;

  --text-1: #F8FAFC;
  --text-2: #CBD5E1;
  --text-3: #64748B;

  --border: rgba(148,163,184,0.18);
  --shadow-1: 0 20px 60px rgba(0,0,0,0.55);

  --radius: 18px;
  --transition: 0.25s ease;
}

/* GLOBAL RESET */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

/* ---------------------------------------------------------
   PAGE BACKGROUND
   --------------------------------------------------------- */
body.dashboard-body {
  background: var(--bg-0);
  color: var(--text-1);
}

/* ---------------------------------------------------------
   MAIN CONTENT WRAPPER
   --------------------------------------------------------- */
.main-content {
  margin-left: 0;
  padding: 40px;
}

/* ---------------------------------------------------------
   DASHBOARD PAGE WRAPPER
   --------------------------------------------------------- */
.dashboard-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px;
  padding-top: 110px; /* space under top-nav */
}

/* ---------------------------------------------------------
   HERO SECTION
   --------------------------------------------------------- */
.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 40px;
  animation: fade-in 0.6s ease;
}

.dash-hero h1 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-hero p {
  font-size: 17px;
  color: var(--text-2);
  margin-top: 6px;
}

/* Stats */
.hero-stats {
  display: flex;
  gap: 18px;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 12px 16px;
  backdrop-filter: blur(18px);
  min-width: 120px;
}

.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.stat-card .value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

.stat-card .hint {
  font-size: 12px;
  color: var(--text-2);
}

/* ---------------------------------------------------------
   SECTIONS
   --------------------------------------------------------- */
.dash-section {
  margin-bottom: 40px;
}

.dash-section-header h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.dash-section-header p {
  font-size: 14px;
  color: var(--text-3);
}

/* ---------------------------------------------------------
   GRID LAYOUTS
   --------------------------------------------------------- */
.dash-grid {
  display: grid;
  gap: 24px;
}

.dash-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dash-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---------------------------------------------------------
   CARDS
   --------------------------------------------------------- */
.dash-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: var(--text-1);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-card .icon {
  font-size: 26px;
}

.dash-card h3 {
  font-size: 19px;
  margin: 0;
}

.dash-card p {
  font-size: 14px;
  color: var(--text-2);
}

.dash-card.primary {
  border-color: var(--accent-1);
  box-shadow: 0 0 26px rgba(59,130,246,0.42);
}

.dash-card.subtle {
  background: rgba(15,23,42,0.9);
}

/* Hover */
.dash-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
}

/* Pills */
.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.pill-chat { background: rgba(59,130,246,0.18); color: var(--accent-2); }
.pill-docs { background: rgba(16,185,129,0.18); color: #6EE7B7; }
.pill-code { background: rgba(244,114,182,0.18); color: #F9A8D4; }

/* Ghost Button */
.ghost-btn {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.ghost-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-2);
}

/* ---------------------------------------------------------
   ANIMATIONS
   --------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   MOBILE RESPONSIVENESS (EXACT MATCH TO CHAT.CSS)
   --------------------------------------------------------- */
@media (max-width: 768px) {

  .dashboard-page {
    padding-top: 90px;
  }

  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-hero h1 {
    font-size: 32px;
  }

  .dash-card {
    padding: 20px;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {

  .dash-hero h1 {
    font-size: 28px;
  }

  .dash-card {
    padding: 18px 16px;
  }

  .stat-card {
    min-width: 100px;
  }
}

/* ---------------------------------------------------------
   NAVIGATION (EXACT SAME RESPONSIVENESS AS CHAT.CSS)
   --------------------------------------------------------- */
.top-nav {
  width: 100%;
  height: 64px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(148,163,184,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-3);
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--accent-1);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 2000;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 3px;
}

/* Mobile Menu */
.mobile-top-menu {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 12px;
  margin: 10px 20px;
}

.mobile-top-menu.show {
  display: flex !important;
}

.mobile-top-menu a {
  padding: 12px 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: 16px;
  transition: var(--transition);
}

.mobile-top-menu a:hover {
  color: white;
}

/* Responsive Nav */
@media (max-width: 900px) {
  .nav-right {
    display: none;
  }

  #hamburger-menu {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .nav-title {
    font-size: 1.2rem;
  }

  .nav-avatar {
    width: 32px;
    height: 32px;
  }
}
