:root {
  --marineblau: #003366;
  --marineblau-dark: #002244;
  --orange: #ff6600;
  --orange-dark: #cc5200;
  --bg-color: #f5f7fa;
  --text-color: #222;
  --input-bg: #fff;
  --input-border: #c3c9d9;
  --shadow-light: rgba(0, 0, 0, 0.05);
}

/* System-Schriften für maximale Kompatibilität */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
}

/* %- colors */
.pct-positive {
  color: #0a8f3a;   /* grün */
  font-weight: 700;
}

.pct-negative {
  color: #c81e1e;   /* rot */
  font-weight: 700;
}

.pct-neutral {
  color: #444;
  font-weight: 600;
}
/* ===========================================
   Container
=========================================== */
.container {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 2rem 2rem 3rem;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px var(--shadow-light);
  text-align: center;
  position: relative;
}

.logo { width: 220px; height: auto; margin-bottom: 0.5rem; }
.breathing-logo { animation: breathing 5s ease-in-out infinite; }
@keyframes breathing {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* Headlines & Text */
h1:not(.vdma) {
  font-weight: 700; font-size: 1.25rem; color: var(--marineblau-dark);
  margin-bottom: 0.5rem; letter-spacing: 0.01em;
}
p.subtitle {
  font-weight: 500; font-size: 0.98rem; color: var(--marineblau-dark);
  margin-top: 0; margin-bottom: 1.6rem; line-height: 1.45;
}

/* ===========================================
   Inputs
=========================================== */
.input-group { width: 100%; margin-bottom: 1.1rem; text-align: left; }
.input-group label {
  font-weight: 700; color: var(--marineblau-dark);
  display: block; margin-bottom: 0.45rem;
}

input[type="number"], input[type="range"] {
  width: 100%; max-width: 450px;
  border-radius: 10px;
  border: 1.8px solid var(--input-border);
  background: var(--input-bg);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
input[type="number"]:focus, input[type="range"]:focus {
  outline: none;
  border-color: var(--marineblau);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.12);
}
input[type="number"] { margin-bottom: 0.4rem; }
input[type="range"] {
  -webkit-appearance: none; height: 12px; background: var(--marineblau);
  cursor: pointer; margin: 0.25rem 0 0.5rem; border-radius: 8px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; background: #fff;
  border-radius: 50%; border: 3px solid var(--orange);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.35);
  cursor: pointer; transition: transform 0.15s ease; margin-top: -7px;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.06); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; background: #fff; border-radius: 50%;
  border: 3px solid var(--orange); box-shadow: 0 2px 8px rgba(255, 102, 0, 0.35);
  cursor: pointer; transition: transform 0.15s ease;
}
input[type="range"]::-moz-range-thumb:hover { transform: scale(1.06); }

#sliderValue, #sliderValuePrev, #sliderValueCurr {
  font-weight: 600; color: var(--marineblau-dark);
  margin-bottom: 0.6rem; font-size: 0.95rem; user-select: none;
}

/* Toggle Switch */
.input-mode { margin-bottom: 1.2rem; width: 100%; text-align: left; }
.mode-label { display: block; font-weight: 700; color: var(--marineblau-dark); margin-bottom: 0.5rem; }
.toggle-switch {
  display: flex; align-items: center; background: #f2f6fb; border-radius: 10px;
  box-shadow: inset 0 0 0 1.5px #d6deeb; width: 100%; max-width: 450px;
}
.toggle-btn {
  flex: 1; padding: 0.65rem 0; font-weight: 700; border: none; cursor: pointer;
  font-size: 0.95rem; color: var(--marineblau-dark); background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.toggle-btn:hover { background: rgba(0, 51, 102, 0.06); }
.toggle-btn.active { background: var(--marineblau); color: #fff; }

/* Status */
.status { margin-top: 0.9rem; font-weight: 700; color: var(--marineblau-dark); min-height: 1.1rem; user-select: none; }

/* Utility */
.hidden { display: none !important; }

/* ===========================================
   Buttons – global (Marineblau, Weiß)
=========================================== */
button {
  background: var(--marineblau);
  border: 1px solid #0a355f;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.25);
  cursor: pointer;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  margin: 0.25rem;
}
button:hover, button:focus {
  background: var(--marineblau-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 51, 102, 0.35);
  outline: none;
  border-color: #082d52;
}
button:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
button.orange {
  background: var(--orange); border-color: #e25500; color: #fff;
  box-shadow: 0 5px 15px rgba(255, 102, 0, 0.35);
}
button.orange:hover { background: var(--orange-dark); border-color: #b84900; }

/* ===========================================
   Waiting View (ohne externe Icons)
=========================================== */
.dots { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-bottom: 1.1rem; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background-color: var(--marineblau-dark); opacity: 0.3; animation: dotBlink 1.4s infinite; }
.dots span:nth-child(1){ animation-delay: 0s; }
.dots span:nth-child(2){ animation-delay: .3s; }
.dots span:nth-child(3){ animation-delay: .6s; }
@keyframes dotBlink { 0%, 80%, 100% { opacity: .3; transform: scale(1); } 40% { opacity: 1; transform: scale(1.3); } }
.waiting-text { font-size: 1rem; color: var(--marineblau-dark); font-weight: 700; }

/* ===========================================
   Admin Table Polish
=========================================== */
table { width: 100%; border-collapse: collapse; }
table th, table td { border-bottom: 1px solid #eef1f6; padding: .6rem; text-align: center; }
table th { background: #f9fbfe; color: var(--marineblau-dark); font-weight: 700; }

/* ===========================================
   Survey Card (Index)
=========================================== */
.survey-card {
  width: 100%; max-width: 520px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  padding: 1rem 1.1rem 1.2rem; text-align: left; border: 1px solid #eef1f6;
}
.helper { font-size:.9rem; color:#5a6a85; margin-top:.2rem; }

/* Klasse-Badge (Index) */
.badge {
  display: inline-block; padding: .35rem .6rem; border-radius: 999px;
  background: var(--marineblau); color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: 0 2px 8px rgba(0, 51, 102, .25);
  margin: .3rem 0 1rem;
}

/* ===========================================
   HOST-DASHBOARD – seriöses UI (ohne libs)
=========================================== */
.container.host {
  max-width: 680px;
  padding: 2.2rem 2rem 2.4rem;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(2, 24, 43, 0.08);
}
.muted { color: #50607a; font-weight: 700; font-size: .96rem; margin: .25rem 0 1.1rem; }

.category-list {
  display: flex; flex-direction: column; gap: .5rem;
  width: 100%; max-width: 520px; margin: 1rem auto 0;
}
.category-btn {
  --btn-h: 48px;
  height: var(--btn-h);
  padding: 0 16px;
  text-align: left;
  display: inline-flex; align-items: center; justify-content: space-between;

  background: #0b3a6b;
  color: #ffffff;
  border: 1px solid #0a355f;
  border-radius: 10px;

  font-weight: 700; font-size: 1rem; letter-spacing: .01em;

  box-shadow: 0 6px 14px rgba(5, 34, 61, 0.18);
  transition: background .18s ease, box-shadow .18s ease, transform .12s ease, border-color .18s ease;
}
.category-btn:hover {
  background: #08325c; border-color: #0a355f;
  box-shadow: 0 10px 20px rgba(5, 34, 61, 0.22);
  transform: translateY(-1px);
}
.category-btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.6),
    0 0 0 6px #ff7a1a,
    0 10px 22px rgba(5, 34, 61, 0.22);
}
.category-btn.active {
  border-color: #ff7a1a;
  box-shadow: 0 0 0 2px rgba(255, 122, 26, .55), 0 8px 18px rgba(5, 34, 61, 0.18);
}
.category-btn.used { opacity: .45; cursor: not-allowed; filter: grayscale(.12); background: #8ea1b8; border-color: #7b92ac; }
.actions { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* ===========================================
   RESPONSIVE
=========================================== */
@media (max-width: 768px) {
  .container { width: 92%; padding: 1.5rem; }
  .logo { width: 160px; }
  h1 { font-size: 1.1rem; }
  .subtitle { font-size: .94rem; }
  button { width: auto; font-size: 0.98rem; }
}
@media (max-width: 480px) {
  .container { padding: 1rem; }
  .logo { width: 140px; }
  .subtitle { font-size: .9rem; }
}


.status-ok {
  color: #0a8f3a;       /* grün für Erfolg */
}

.status-error {
  color: #c81e1e;       /* rot für Fehler */
}
