/* ===================================================================
   BASE — Reset, Variables, Layout, Navigation, Cards, Footer
   Shared across all pages. Loaded first.
   =================================================================== */

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

/* ===== DESIGN TOKENS ===== */
:root {
  font-size: 17px;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}


/* ===== FONT SCALE TOGGLE ===== */.font-scale-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  letter-spacing: 0.02em;
}.font-scale-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== BODY ===== */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== TOP NAV ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.top-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.top-nav-logo:hover {
  color: var(--accent);
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.top-nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.top-nav-link.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}



/* ===== PAGE LAYOUT ===== */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

/* ===== HEADER ===== */
.page-header {
  margin-bottom: 3rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent-hover);
}

/* ===== MAIN LAYOUT ===== */
main {
  display: block;
  width: 100%;
}



/* ===== SECTIONS ===== */
.card-grid {
  margin-bottom: 0;
}

.card-grid h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ===== CARDS ===== */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
}

.card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-wide {
  grid-column: 1 / -1;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .page-container {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 600px) {

  .top-nav-inner {
    padding: 0 1rem;
    height: 56px;
  }

  .top-nav-logo {
    font-size: 1rem;
  }

  .top-nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .page-container {
    padding: 1.5rem 1rem;
  }

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

/* ===== DASHBOARD LAYOUT ===== */.dashboard-section {
  margin-bottom: 2rem;
}.dashboard-section-title {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

@media (max-width: 600px) {.dashboard-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== UNIVERSAL CANVAS CHART CONTAINER ===== */.canvas-chart {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 350px;
  background-color: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}.canvas-chart canvas {
  display: block;
  width: 100%;
  height: 100%;
}.canvas-chart--sm {
  max-width: 600px;
  margin: 1rem auto;
}
