/* =============================================================================
   Bentomax Cockpit — Basisstyles
   ============================================================================= */

:root {
  --color-bg: #f7f5f2;
  --color-surface: #ffffff;
  --color-surface-soft: #faf8f5;
  --color-text: #1c1a17;
  --color-text-muted: #6b655c;
  --color-primary: #1c1a17;
  --color-accent: #2f6f4e;
  --color-accent-hover: #255a3f;
  --color-mint: #7fd1a5;
  --color-mint-ink: #12291e;
  --color-primary-light: #8a8378;
  --color-border: #e6e2dc;
  --color-border-strong: #ddd7cf;
  --color-ok: #2f6f4e;
  --color-warn: #d9a441;
  --color-error: #c1685a;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 4px 14px rgba(28, 26, 23, 0.08);
  --font-primary: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', sans-serif;
  --font-secondary: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: var(--font-secondary);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1.5rem;
  background: var(--color-primary);
  color: #f5f2ed;
  box-shadow: none;
  border-bottom: 1px solid #3a352e;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f5f2ed;
}

a.brand,
a.brand:hover {
  color: #f5f2ed;
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--color-mint);
  color: var(--color-mint-ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.brand-name {
  font-size: 1rem;
  font-weight: 600;
}

.project-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #c9c2b8;
  border: 1px solid #3a352e;
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-link {
  color: #c9c2b8;
  margin-right: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.topbar-link:hover {
  color: #f5f2ed;
  text-decoration: none;
}

.topbar-link.is-active {
  color: #f5f2ed;
  font-weight: 600;
  border-bottom-color: var(--color-mint);
}

.workspace-notice {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #e8f6ee;
  border: 1px solid #b7e0c6;
  color: var(--color-ok);
  font-size: 0.9rem;
}

.workspace-notice[hidden] {
  display: none;
}

.service-error-banner {
  background: #fdeeea;
  color: var(--color-error, #a3311f);
}

.topbar .btn-link {
  color: #c9c2b8;
  border: 0;
  background: transparent;
  padding: 4px 0;
  margin-right: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-primary);
}

.topbar .btn-link:hover {
  color: #f5f2ed;
  text-decoration: none;
}

.env-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #332f2a;
  color: #c9c2b8;
  font-variant-numeric: tabular-nums;
}

.env-badge.is-prod {
  background: #c1685a;
  color: #fff;
}

.env-badge.is-stage {
  background: #d9a441;
  color: #1c1a17;
}

a.env-badge {
  text-decoration: none;
}

a.env-badge:hover {
  filter: brightness(1.06);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.95rem;
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary.btn-compact {
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
}

.btn-secondary {
  border: 1px solid var(--color-border-strong);
  background: #fff;
  color: var(--color-text);
  border-radius: 8px;
  padding: 0.46rem 0.8rem;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.82rem;
}

.btn-secondary:hover {
  background: var(--color-surface-soft);
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--color-accent);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
  text-align: left;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Content */
.content {
  max-width: 1080px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hero h1 {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.lead {
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
  max-width: 70ch;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

/* ---------------------------------------------------------------------------
   Info-Hinweise auf Abruf (siehe js/infoHint.js)
   --------------------------------------------------------------------------- */
.info-hint {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.info-hint-btn {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-primary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.info-hint-btn:hover,
.info-hint-btn.is-open {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-surface);
}

.info-hint-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

/* Das Panel ist ein <span>, damit es auch in <p> und <hN> gueltig bleibt —
   die Blockdarstellung kommt von hier. */
.info-hint-pop {
  display: block;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 60;
  width: max-content;
  max-width: 26rem;
  padding: 0.65rem 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(28, 26, 23, 0.14);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--color-text);
  white-space: normal;
}

/* Muss die Klasse ueberschreiben, sonst gewinnt display:block gegen [hidden]. */
.info-hint-pop[hidden] {
  display: none;
}

.info-hint-pop.is-flipped {
  left: auto;
  right: 0;
}

.info-hint-text {
  display: block;
}

.info-hint-text + .info-hint-text {
  margin-top: 0.5rem;
}
