:root {
  --p3d: #1a56db;
  --p3d-dark: #0e3fa8;
}

nav.navbar {
  background: linear-gradient(135deg, #0d1b2a 0%, #0b2545 100%) !important;
}

.navbar-brand {
  font-size: 1.75rem !important;
  font-weight: 600;
  letter-spacing: .2px;
}

.card.shadow-sm {
  border-left: 4px solid var(--p3d) !important;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.card.border-0 {
  border-left: 3px solid var(--p3d) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--p3d), var(--p3d-dark)) !important;
  border-color: transparent !important;
  letter-spacing: .3px;
}

.btn-primary:hover,
.btn-primary:focus {
  filter: brightness(1.12);
  box-shadow: 0 4px 14px rgba(26, 86, 219, .4) !important;
}

#gdpr-content {
  background: #f4f7ff;
  border: 1px solid #c8d8f5;
  border-left: 4px solid var(--p3d);
  border-radius: 0 .5rem .5rem 0;
  padding: 1rem 1.5rem;
}

#gdpr-content h1,
#gdpr-content h2,
#gdpr-content h3,
#gdpr-content h4 {
  font-size: .9rem;
  font-weight: 600;
  color: #1a3a6b;
  margin: .7rem 0 .2rem;
  padding: 0;
}

#gdpr-content p {
  font-size: .82rem;
  margin-bottom: .3rem;
}

/* ── Formula editor ─────────────────────────────────────────────── */
.formula-ta {
  font-family: "Courier New", Courier, monospace !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  resize: vertical;
  min-height: 0;
}
.formula-result {
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  min-height: 2.2rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}
.formula-result.ok      { background: #d1fae5; color: #065f46; }
.formula-result.err     { background: #fee2e2; color: #991b1b; }
.formula-result.neutral { background: #f3f4f6; color: #6b7280; }

.fv-chip {
  display: inline-flex;
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
  justify-content: flex-end;
}
.fv-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.formula-palette {
  display: grid;
  grid-template-columns: max-content max-content max-content;
  align-items: center;
  column-gap: 8px;
  row-gap: 5px;
}
.formula-palette .tv-input {
  width: auto;     /* let size= attribute control width, not Bootstrap's 100% */
  text-align: right;
  padding-left: 3px;
  padding-right: 3px;
}
.formula-palette .fv-unit {
  font-size: 0.72rem;
  color: #9ca3af;
}
