/* Vispra Portal + Report. Gleiche Design-Sprache wie styles.css (Landing). */
:root {
  --bg: #0d1117;
  --bg-raised: #161c24;
  --border: #2a3340;
  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --accent: #3ddc97;
  --accent-ink: #06281a;
  --rot: #e5484d;
  --gelb: #d4a72c;
  --gruen: #3ddc97;
  --radius: 10px;
  --space: 1.25rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 1.0625rem;
}

.container { max-width: 68rem; margin: 0 auto; padding: 0 var(--space); }

a { color: var(--accent); }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }

.dim { color: var(--text-dim); font-size: 0.92rem; }

/* --- Topbar / Footer (Portal) --------------------------------------------- */
.topbar { border-bottom: 1px solid var(--border); padding: 0.7rem 0; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.logo span { color: var(--accent); }
.useremail { color: var(--text-dim); font-size: 0.9rem; word-break: break-all; }
.dimlink { color: var(--text-dim); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.dimlink:hover { color: var(--text); }

main.container { padding-top: 2rem; padding-bottom: 3rem; }

.site-foot { border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--text-dim); font-size: 0.9rem; }
.site-foot .container { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-foot a { color: var(--text-dim); min-height: 44px; display: inline-flex; align-items: center; }

/* --- Buttons, Formulare ----------------------------------------------------- */
.btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn[disabled] { background: var(--border); color: var(--text-dim); cursor: not-allowed; }
.btn-ghost { background: none; color: var(--accent); border: 1px solid var(--accent); }

input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  width: 100%;
  max-width: 24rem;
  display: block;
  margin: 0.3rem 0 0.9rem;
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
label { color: var(--text-dim); font-size: 0.9rem; font-weight: 600; }
form.inline { display: inline; }

.msg {
  border-left: 4px solid var(--accent);
  padding: 0.6rem 1rem;
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 1rem;
}

/* --- Drift-Alerts ------------------------------------------------------------ */
.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 1rem;
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 1rem;
}
.alert-rot { border-left: 4px solid var(--rot); }
.alert-gruen { border-left: 4px solid var(--gruen); }

/* --- Onboarding-Checkliste ---------------------------------------------------- */
.onboarding-steps { margin: 0; padding-left: 0; list-style: none; }
.onboarding-steps li { margin: 0 0 0.8rem; }
.step-status { font-weight: 700; margin-right: 0.4rem; }
.step-done .step-status { color: var(--gruen); }
.step-open .step-status { color: var(--text-dim); }

/* --- Karten / Panels -------------------------------------------------------- */
.card, .panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.panel { margin: 0 0 var(--space); }
.inset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0 0;
  background: var(--bg);
}

.panels { display: grid; gap: var(--space); }
@media (min-width: 900px) {
  .panels { grid-template-columns: 1fr 1fr; }
  .panel-wide { grid-column: 1 / -1; }
}

/* --- Tabellen ---------------------------------------------------------------- */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
th { color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:nth-child(even), table tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }

/* --- Status-Badges ------------------------------------------------------------ */
.status { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.st-active { background: rgba(61, 220, 151, 0.15); color: var(--gruen); }
.st-past_due { background: rgba(212, 167, 44, 0.15); color: var(--gelb); }
.st-canceled { background: rgba(229, 72, 77, 0.15); color: var(--rot); }

/* --- Login -------------------------------------------------------------------- */
.login-wrap { display: flex; justify-content: center; padding: 3rem 0 2rem; }
.login-card { width: 100%; max-width: 26rem; }
.login-card h1 { text-align: center; }
.login-card .logo { display: flex; justify-content: center; font-size: 1.6rem; margin-bottom: 0.5rem; }
.login-card form { margin-top: 1rem; }
.login-card input { max-width: none; }
.login-card .btn { width: 100%; }
.login-foot { text-align: center; margin-top: 1.25rem; }

/* --- Report --------------------------------------------------------------------- */
body.report main.container { max-width: 52rem; }
.report-head { text-align: center; padding: 2.5rem 0 1rem; }
.report-head .meta { color: var(--text-dim); margin-bottom: 1.25rem; }
.score-badge {
  display: inline-block;
  padding: 0.5rem 1.6rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
}
.score-badge.small { font-size: 1.1rem; padding: 0.25rem 1rem; }
.score-rot { background: var(--rot); }
.score-gelb { background: var(--gelb); color: #2b2203; }
.score-gruen { background: var(--gruen); color: var(--accent-ink); }

.problem-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gelb);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 0.9rem;
}
.problem-card h3 { margin: 0 0 0.4rem; }
.problem-card p { margin: 0; color: var(--text-dim); }

.check-ok { color: var(--gruen); font-weight: 700; }
.check-fail { color: var(--rot); font-weight: 700; }

.report-foot { margin-top: 3rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.9rem; }

/* --- White-Label: Kundenlogo im Report-Kopf, Vispra-Hinweis klein --------------- */
.customer-logo { max-height: 48px; max-width: 220px; display: block; }
.made-with { color: var(--text-dim); font-size: 0.8rem; margin-top: 2rem; }

/* --- Druck: Report hell, keine Navigation ---------------------------------------- */
@media print {
  body.report { background: #fff; color: #1a202c; font-size: 11pt; }
  body.report a { color: #1a5c40; }
  body.report .dim, body.report .meta, body.report .problem-card p { color: #4a5568; }
  body.report .card, body.report .panel, body.report .problem-card { background: #fff; border-color: #cbd5e0; }
  body.report th, body.report td { border-color: #cbd5e0; }
  body.report th { color: #4a5568; }
  body.report tbody tr:nth-child(even), body.report table tr:nth-child(even) { background: #f7fafc; }
  body.report .check-ok { color: #2f855a; }
  body.report .check-fail { color: #c53030; }
  body.report .score-gelb { color: #2b2203; }
  .topbar, .site-foot, .report-foot { display: none; }
  /* White-Label: Kundenlogo bleibt auch im PDF/Druck sichtbar */
  body.report .topbar:has(.customer-logo) { display: block; background: #fff; border: 0; }
  main.container { padding-top: 0; }
}

/* Honeypot: fuer Menschen unsichtbar, Bots fuellen es aus */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
