@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --ink: #0f2627;
  --ink-2: #1f3a3b;
  --slate: #5a6a6f;
  --mint: #d6f1ea;
  --teal: #0e8f86;
  --teal-dark: #0b6d68;
  --amber: #f4b06a;
  --sand: #fbf6ef;
  --card: #ffffff;
  --border: #e4ecec;
  --shadow: 0 18px 40px rgba(10, 35, 35, 0.12);
  --shadow-soft: 0 12px 26px rgba(10, 35, 35, 0.08);
}

/* Basic layout */
html, body, #_dash-app-content {
  height: 100%;
}
body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(14, 143, 134, 0.18), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(244, 176, 106, 0.22), transparent 45%),
    linear-gradient(180deg, #f7faf9 0%, #eef4f2 60%, #ecf2f0 100%);
}

#main-content {
  min-height: 100vh;
  background: transparent;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f2f6f4 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.bg-sidebar-header,
.bg-sidebar-footer {
  background: transparent;
}
.sidebar-nav .nav-link {
  color: var(--ink-2);
  border-radius: 14px;
  margin: 6px 10px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  font-weight: 600;
}
.sidebar-nav .nav-link:hover {
  background: #e8f2f1;
  color: var(--teal-dark);
  transform: translateX(2px);
}
.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, #e1f4f0, #c7ede6);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px #b5e3dc;
}
.sidebar-link {
  border-radius: 14px;
}

/* Topbar */
.topbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.navbar-text {
  color: var(--slate);
}

/* Cards */
.card,
.section-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  background: var(--card);
}
.card {
  padding: 6px;
}
.section-card {
  overflow: hidden;
}
.section-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.section-title--spaced {
  margin-top: 18px;
}

/* Overview hero */
.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  margin-bottom: 20px;
}
.overview-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--slate);
  font-weight: 700;
}
.overview-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 2.2rem;
  margin: 6px 0 10px;
  color: var(--ink);
}
.overview-subrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.overview-sub {
  font-size: 0.95rem;
  color: var(--slate);
}
.overview-range {
  font-weight: 700;
  color: var(--teal-dark);
  background: #e7f6f4;
  border: 1px solid #bfe8e3;
  padding: 4px 10px;
  border-radius: 999px;
}
.overview-hero-card {
  background: linear-gradient(140deg, #ffffff 0%, #f3fbf9 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.overview-hero-label {
  color: var(--slate);
  font-weight: 600;
}
.overview-hero-value {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  margin-top: 6px;
}
.overview-hero-sub {
  color: var(--slate);
  font-size: 0.95rem;
}

/* KPI cards */
.kpi-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--card);
  height: 100%;
}
.kpi-card--big {
  background: linear-gradient(160deg, #ffffff 0%, #f2fbf8 100%);
}
.kpi-label {
  color: var(--slate);
  font-weight: 600;
  font-size: 0.9rem;
}
.kpi-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kpi-value {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}
.kpi-sub {
  color: var(--slate);
  font-size: 0.9rem;
  margin-top: 6px;
}
.kpi-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f2;
  color: var(--slate);
}
.kpi-chip--pos {
  background: #d7f2e6;
  color: #157f60;
}
.kpi-chip--neg {
  background: #ffe2df;
  color: #c2453b;
}
.kpi-accent-teal {
  box-shadow: inset 0 0 0 1px rgba(14, 143, 134, 0.25);
}
.kpi-accent-amber {
  box-shadow: inset 0 0 0 1px rgba(244, 176, 106, 0.35);
}
.kpi-accent-mint {
  box-shadow: inset 0 0 0 1px rgba(132, 200, 190, 0.35);
}
.kpi-accent-slate {
  box-shadow: inset 0 0 0 1px rgba(90, 106, 111, 0.25);
}
.kpi-accent-copper {
  box-shadow: inset 0 0 0 1px rgba(201, 116, 84, 0.25);
}

/* Forms and blocks */
.param-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fdfefe;
  box-shadow: var(--shadow-soft);
}
.nice-button,
.btn-primary,
.btn-secondary {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--teal);
  border: 1px solid var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
.btn-secondary {
  background: #f0f3f3;
  border: 1px solid #d9e3e1;
  color: var(--ink);
}
.btn-secondary:hover {
  background: #e6eded;
}

/* Login */
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 143, 134, 0.2), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(244, 176, 106, 0.24), transparent 50%);
  z-index: -1;
}
.login-card {
  background: rgba(255, 255, 255, 0.92);
  padding: 2.2rem;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.brand-elevated {
  backdrop-filter: blur(8px);
}

/* Animations */
.reveal {
  animation: revealUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}
@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .overview-hero {
    grid-template-columns: 1fr;
  }
  #main-content {
    margin-left: 0 !important;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
}
