:root {
  --surface: #ffffff;
  --surface-muted: #f5f7fa;
  --ink: #1f2937;
  --muted: #657084;
  --line: #d9e0e8;
  --accent: #146c94;
  --accent-quiet: #e7f1f5;
}

body {
  background: #eef3f6;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.navbar {
  min-height: 58px;
  background: #ffffff !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(34, 48, 68, 0.06);
}

.navbar .container-fluid {
  gap: 1rem;
}

.navbar-brand {
  margin-right: 1.2rem;
  color: var(--ink) !important;
}

.navbar-nav .nav-link {
  color: #485465 !important;
  font-weight: 650;
  padding: 0.85rem 0.7rem;
  border-bottom: 3px solid transparent;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent);
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: #ffffff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 780;
}

.brand-name {
  font-size: 1.08rem;
}

.bslib-sidebar-layout > .sidebar {
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.sidebar-title {
  font-weight: 720;
}

.sidebar-note {
  margin-top: 1rem;
  padding: 0.85rem 0.9rem;
  color: var(--muted);
  background: #edf4f7;
  border: 1px solid #d4e4ea;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.run-query {
  width: 100%;
  font-weight: 700;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(34, 48, 68, 0.07);
}

.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-weight: 720;
}

.value-box {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(34, 48, 68, 0.07);
}

.value-box .bi {
  opacity: 0.8;
}

.plain-panel {
  padding: 1rem 1.1rem;
  color: var(--muted);
  line-height: 1.45;
}

.plain-panel p {
  margin: 0 0 0.8rem;
}

.plain-panel p:last-child {
  margin-bottom: 0;
}

.pipeline-steps {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.pipeline-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pipeline-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.pipeline-step p {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}

.walkthrough-controls {
  padding: 1rem;
  background: var(--surface-muted);
  border-right: 1px solid var(--line);
  min-height: 430px;
}

.walkthrough-controls .form-group,
.walkthrough-controls .shiny-input-container {
  width: 100%;
}

.walkthrough-controls .radio {
  margin: 0.45rem 0;
}

.walkthrough-controls input[type="radio"] {
  margin-top: 0.38rem;
}

.walkthrough-note {
  margin: 0 1rem 1rem;
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.4;
}

.selectize-input,
.form-control,
.irs--shiny .irs-bar,
.irs--shiny .irs-single {
  border-radius: 7px;
}

.dataTables_wrapper {
  font-size: 0.9rem;
}

.plotly.html-widget {
  width: 100%;
}
