:root {
  --accent: #2f6fed;
  --ink-900: #12213d;
  --ink-700: #32496c;
  --surface-1: #f3f7fb;
  --surface-2: #e8f0fb;
  --mint: #72d5c6;
  --line: #d8e2f0;
}

body {
  font-family: 'DM Sans', 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(1200px 700px at 90% -10%, rgba(114, 213, 198, 0.2), transparent 60%),
    radial-gradient(1100px 700px at -10% -10%, rgba(47, 111, 237, 0.15), transparent 55%),
    var(--surface-1);
  min-height: 100vh;
  padding-bottom: 64px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
}

.app-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1030;
}

.app-nav .container {
  max-width: 1480px;
}

.manage-endpoints-btn {
  color: #382060;
  border: 1px solid #8f73c8;
  background: #efe8ff;
  font-weight: 700;
}

.manage-endpoints-btn:hover,
.manage-endpoints-btn:focus {
  color: #2d174f;
  border-color: #785ab8;
  background: #e4d9ff;
}

.leave-feedback-btn {
  color: #ffffff;
  background: #1f6e3f;
  border-color: #1f6e3f;
  font-weight: 700;
}

.leave-feedback-btn:hover,
.leave-feedback-btn:focus {
  color: #ffffff;
  background: #185b34;
  border-color: #185b34;
}

.footer-legal-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1030;
  min-height: 54px;
}

.footer-legal-nav .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.footer-legal-actions .btn {
  font-weight: 700;
}

.footer-privacy-btn {
  color: #9b5f2d;
  border-color: #d6a97e;
  background-color: #f7ebde;
  font-weight: 700;
}

.footer-privacy-btn:hover,
.footer-privacy-btn:focus {
  color: #844d1f;
  border-color: #c9925e;
  background-color: #f3e2d1;
}

.footer-release-btn,
.footer-feedback-btn {
  color: #ffffff;
  border-color: #3d235f;
  background-color: #3d235f;
  font-weight: 700;
}

.footer-release-btn:hover,
.footer-release-btn:focus,
.footer-feedback-btn:hover,
.footer-feedback-btn:focus {
  color: #ffffff;
  border-color: #2f184d;
  background-color: #2f184d;
}

.cookie-consent-banner {
  position: fixed;
  right: 14px;
  left: 14px;
  bottom: 62px;
  z-index: 1040;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.cookie-consent-card {
  width: min(100%, 520px);
  border: 1px solid #d9e4f3;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(26, 50, 102, 0.16);
  pointer-events: auto;
}

.app-brand {
  color: var(--ink-900);
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(145deg, var(--accent), #5db6ff 52%, var(--mint));
  box-shadow: 0 2px 10px rgba(47, 111, 237, 0.4);
}

.py-lg-6 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

.landing-page {
  position: relative;
  overflow: hidden;
}

.landing-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 300px at 90% 20%, rgba(114, 213, 198, 0.24), transparent 70%),
    radial-gradient(600px 360px at 8% 12%, rgba(74, 130, 255, 0.2), transparent 70%);
  pointer-events: none;
}

.landing-hero,
.landing-section {
  position: relative;
  z-index: 1;
}

.hero-shell {
  width: min(980px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 3.2rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 255, 0.92));
  box-shadow: 0 24px 56px rgba(20, 40, 94, 0.12);
  animation: rise-in 500ms ease-out both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.12);
  color: #295fd0;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-title {
  max-width: 19ch;
  margin-left: auto;
  margin-right: auto;
  font-weight: 800;
  line-height: 1.05;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
}

.hero-tagline {
  font-size: clamp(1rem, 2.1vw, 1.3rem);
  color: var(--ink-700);
  font-weight: 600;
}

.hero-copy {
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  color: #455b7e;
}

.hero-actions {
  margin-top: 0.2rem;
}

.hero-cta {
  min-width: min(100%, 360px);
  padding: 0.9rem 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.explainer-shell {
  position: relative;
  border: 1px solid #d8e6f7;
  border-radius: 24px;
  padding: clamp(1.2rem, 2.6vw, 2rem);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.9));
  box-shadow: 0 16px 36px rgba(30, 55, 110, 0.1);
  overflow: hidden;
}

.explainer-shell::before {
  content: '';
  position: absolute;
  left: 7%;
  right: 7%;
  top: calc(50% + 6px);
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.12), rgba(47, 111, 237, 0.45), rgba(47, 111, 237, 0.12));
  z-index: 0;
}

.explainer-head {
  position: relative;
  z-index: 1;
}

.explainer-kicker {
  color: #2a61d7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.explainer-step {
  position: relative;
  z-index: 1;
  border: 1px solid #d6e4f7;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 1.1rem;
  box-shadow: 0 8px 20px rgba(40, 62, 120, 0.08);
}

.explainer-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  margin-bottom: 0.65rem;
  background: linear-gradient(145deg, #2f6fed, #5ba8ff);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: 0 4px 14px rgba(47, 111, 237, 0.35);
}

.feature-card {
  height: 100%;
  border-radius: 18px;
  border: 1px solid #dce8f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  padding: 1.3rem;
  box-shadow: 0 10px 24px rgba(40, 62, 120, 0.08);
  animation: rise-in 500ms ease-out both;
}

.landing-section .col-md-4:nth-child(2) .feature-card {
  animation-delay: 90ms;
}

.landing-section .col-md-4:nth-child(3) .feature-card {
  animation-delay: 180ms;
}

.pricing-hero-shell {
  width: min(920px, 100%);
}

.pricing-page .hero-title {
  max-width: 16ch;
}

.pricing-card {
  border-radius: 20px;
  border: 1px solid #d3e3f8;
  background:
    radial-gradient(420px 180px at 90% -18%, rgba(114, 213, 198, 0.16), transparent 72%),
    linear-gradient(180deg, #ffffff, #f3f9ff 92%);
}

.pricing-value {
  font-weight: 800;
  color: #1f4ea9;
}

.pricing-contact-link {
  font-weight: 700;
  color: #2a61d7;
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 97, 215, 0.35);
}

.pricing-contact-link:hover,
.pricing-contact-link:focus {
  color: #1e4ea7;
  border-bottom-color: rgba(30, 78, 167, 0.45);
}

.beta-panel {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #ffffff, #eef7ff 72%);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-shadow: 0 16px 36px rgba(30, 54, 108, 0.1);
  animation: rise-in 520ms ease-out both;
}

.beta-label {
  color: #1f7f70;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.feedback-logbook {
  margin-top: 0.2rem;
  padding: 1rem;
  border: 1px solid #d7e5f5;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.feedback-thanks {
  margin-top: 0.9rem;
  color: #1b735f;
  font-weight: 700;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-title {
  max-width: min(95%, 440px);
}

.page-shell .card {
  border: none;
}

.page-shell .card.shadow-sm {
  box-shadow: 0 10px 40px rgba(17, 38, 146, 0.08);
}

.dashboard-page .dashboard-container {
  max-width: 1480px;
}

.font-monospace {
  font-family: 'Fira Code', 'Cascadia Mono', Consolas, 'Liberation Mono', Menlo, monospace;
}

.chart-card {
  border: 1px solid #d8e4f3;
  border-radius: 1rem;
  background:
    linear-gradient(150deg, rgba(243, 249, 255, 0.75), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #ffffff, #f9fcff 90%);
  box-shadow: 0 14px 34px rgba(23, 49, 101, 0.09);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(23, 49, 101, 0.13);
}

.chart-label {
  background: #e8f1ff;
  color: #2556bb;
  border: 1px solid #c6daf9;
}

.chart-toolbar .btn {
  border-radius: 999px;
}

.chart-surface {
  min-height: 280px;
}

.chart-controls {
  border-color: #dfe8f6 !important;
}

.chart-frame {
  border-color: #dce7f6 !important;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.chart-chat-shell {
  border-radius: 0.9rem;
  border: 1px solid #d8e4f3;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f9ff 100%);
}

.chart-chat-feed {
  max-height: 220px;
  min-height: 150px;
  overflow: auto;
  border-color: #d5e2f2 !important;
  background: rgba(255, 255, 255, 0.86);
}

.chart-chat-message {
  max-width: 92%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #dfe8f6;
  box-shadow: 0 4px 12px rgba(23, 49, 101, 0.06);
  margin-bottom: 0.6rem;
}

.chart-chat-message:last-child {
  margin-bottom: 0;
}

.chart-chat-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a6d91;
  font-weight: 700;
}

.chart-chat-user {
  margin-left: auto;
  background: #e8f1ff;
  border-color: #c7daf8;
}

.chart-chat-assistant {
  margin-right: auto;
  background: #ffffff;
}

.chart-chat-message.is-pending {
  opacity: 0.78;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.data-preview {
  max-height: 180px;
  overflow: auto;
  font-size: 13px;
  border-color: #dfe8f6 !important;
  background: rgba(248, 252, 255, 0.86);
}

.dashboard-tour-popover {
  position: absolute;
  z-index: 1085;
  width: min(360px, calc(100vw - 24px));
  padding: 0.85rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid #c5d8f6;
  background: linear-gradient(175deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 20px 40px rgba(17, 45, 92, 0.2);
}

.dashboard-tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.dashboard-tour-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

.dashboard-tour-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f2957;
}

.dashboard-tour-body {
  color: #365174;
  font-size: 0.92rem;
  line-height: 1.35;
}

.dashboard-tour-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.dashboard-tour-skip {
  font-size: 0.78rem;
  text-decoration: none;
}

.dashboard-tour-target {
  position: relative;
  z-index: 1080 !important;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.35);
  border-radius: 0.45rem;
}

.feedback-log-comment {
  white-space: pre-wrap;
  min-width: 280px;
}

.designer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1055;
  padding: 24px;
}

.designer-panel {
  background: #fff;
  border-radius: 12px;
  width: min(1100px, 95vw);
  height: min(720px, 90vh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.designer-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.designer-table {
  flex: 1;
  overflow: auto;
  border: 1px solid #e7e9f1;
  border-radius: 8px;
}

.designer-table table {
  width: 100%;
  font-size: 13px;
}

.chart-setup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1055;
}

.chart-setup-panel {
  background: #fff;
  border-radius: 12px;
  width: min(900px, 96vw);
  height: min(680px, 92vh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.chart-setup-body {
  flex: 1;
  overflow: auto;
}

.chart-setup-preview {
  max-height: 260px;
  overflow: auto;
}

.chart-fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1050;
}

.chart-fullscreen-inner {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  width: min(1400px, 97vw);
  height: min(900px, 94vh);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.chart-fullscreen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.chart-fullscreen-actions .btn-group {
  flex-wrap: wrap;
}

.chart-fullscreen-inner .chart-surface.fullscreen {
  flex: 1;
  min-height: 500px;
  overflow-x: auto;
  overflow-y: hidden;
}

.chart-fullscreen-inner .chart-surface.fullscreen .c3-axis-x text,
.chart-fullscreen-inner .chart-surface.fullscreen .c3-axis-y text {
  font-size: 12.5px;
}

@media (min-width: 1600px) {
  .dashboard-page .dashboard-container {
    max-width: 1720px;
  }

  .app-nav .container {
    max-width: 1720px;
  }

  .dashboard-page .chart-surface {
    min-height: 330px;
  }
}

@media (min-width: 2000px) {
  .dashboard-page .dashboard-container {
    max-width: 1880px;
  }

  .app-nav .container {
    max-width: 1880px;
  }

  .dashboard-page .chart-surface {
    min-height: 360px;
  }
}

@media (max-width: 991px) {
  body {
    padding-bottom: 70px;
  }

  .cookie-consent-banner {
    bottom: 70px;
    right: 10px;
    left: 10px;
  }

  .py-lg-6 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .chart-toolbar {
    width: 100%;
  }

  .chart-chat-message {
    max-width: 100%;
  }

  .chart-surface {
    min-height: 240px;
  }

  .explainer-shell::before {
    display: none;
  }
}
