/* ==========================================================================
   Bodenanalyse – Web
   Aufbau und Formen angelehnt an PCBWay (weiße Kopfzeile, dunkle Menüleiste,
   flache Karten, kantige Felder), Farben aus dem Qt-Theme "Wurzelwerk"
   (Logo-Farben: Waldgrün, Sand, Weiß).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  /* Palette aus style.qss der Qt-App */
  --forest-dark: #17351c;    /* Waldgrün dunkel */
  --forest: #244e2a;         /* Waldgrün – Hauptfarbe */
  --forest-mid: #2f6437;     /* Auswahl */
  --forest-light: #3d7a46;   /* Waldgrün hell – Hover, Fokus */
  --green-pale: #dfeadd;     /* Hover-Fläche */
  --green-zebra: #eff4ed;    /* Tabellenzeilen */
  --sand-logo: #d8cdbb;      /* Kreisfläche im Logo */
  --sand: #ede7dc;           /* Dialoggrund */
  --sand-light: #f4f0e7;     /* helle Flächen */
  --cream: #f7f2e2;          /* Tooltip-Creme */
  --sand-border: #b9ac97;
  --sand-line: #cfc5b4;
  --ink: #1f2a20;            /* Text */
  --ink-muted: #5c5648;      /* Nebentext */
  --radius: 2px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: #ffffff;
}

a { color: var(--forest-light); }
a:hover { color: var(--forest); }

::selection { background: var(--forest-mid); color: #ffffff; }

/* ---------- Kopfbereich: weiße Zeile + dunkle Menüleiste ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 max(24px, calc((100% - 1100px) / 2));
  background: #ffffff;
  border-top: 6px solid var(--forest-light);
  border-image: linear-gradient(90deg, var(--forest-light), var(--forest), var(--forest-dark)) 1;
}

.brand {
  order: 1;
  flex: 1;
  display: flex;
  align-items: center;
  height: 72px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--forest);
  text-decoration: none;
}
.brand:hover { color: var(--forest-light); }

.user {
  order: 2;
  color: var(--ink-muted);
  font-size: 13px;
}

/* Menü bricht in eine eigene Zeile um. Der dunkle Hintergrund wird per
   Schatten bis an den Fensterrand verlängert, die Links bleiben aber
   auf der Breite des Inhalts ausgerichtet. */
.topbar nav {
  order: 3;
  flex-basis: 100%;
  display: flex;
  gap: 28px;
  height: 40px;
  background: var(--forest);
  box-shadow: 0 0 0 100vmax var(--forest);
  clip-path: inset(0 -100vmax);
}

.topbar nav a,
.topbar nav .soon {
  display: flex;
  align-items: center;
  height: 40px;
  padding-top: 4px;
  border-bottom: 4px solid transparent;
  color: #ffffff;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.topbar nav a:hover { color: #ffffff; border-bottom-color: rgba(216, 205, 187, 0.45); }
.topbar nav a.active { border-bottom-color: var(--sand-logo); }
.topbar nav .soon { color: #93ad97; cursor: default; }

/* ---------- Inhalt ---------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

h1, h2, h3 { color: var(--forest); line-height: 1.25; }
h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }

.lead { margin: 0 0 22px; color: var(--ink-muted); font-size: 13px; }

/* Kennzahl-Karten: Sandfläche, grüne Leiste links */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.card {
  padding: 14px 18px;
  background: var(--sand-light);
  border-left: 4px solid var(--forest-light);
  border-radius: var(--radius);
}
.card .label { color: var(--ink-muted); font-size: 13px; }
.card .value { color: var(--forest); font-size: 30px; font-weight: 700; line-height: 1.2; }

/* Panel: weiß mit Sandrahmen, Überschrift auf Sand mit grüner Unterlinie */
.panel {
  margin-top: 22px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--sand-line);
  border-radius: var(--radius);
}
.panel h2 {
  margin: -16px -20px 14px;
  padding: 10px 20px;
  background: var(--sand-light);
  border-bottom: 2px solid var(--forest);
  font-size: 15px;
}
.panel ul { margin: 0; padding-left: 18px; }
.panel li { margin: 4px 0; }

/* ---------- Bausteine für die nächsten Seiten ---------- */

/* Hauptaktion: volles Waldgrün (entspricht accent="true" in der Qt-App) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 20px;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--forest-light); border-color: var(--forest-light); color: #ffffff; }
.btn:active { background: var(--forest-dark); border-color: var(--forest-dark); }

/* Zweitaktion: helles Grün mit grünem Rahmen */
.btn-green { background: var(--green-pale); border-color: var(--forest-light); color: var(--forest); }
.btn-green:hover { background: #cfe2cc; border-color: var(--forest); color: var(--forest); }

/* Neutral: Sand mit Sandrahmen */
.btn-plain { background: var(--sand-light); color: var(--ink); border-color: var(--sand-border); font-weight: 400; font-size: 13px; }
.btn-plain:hover { background: var(--green-pale); border-color: var(--forest-light); color: var(--ink); }

label { display: block; margin-bottom: 4px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
select, textarea {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--sand-border);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}
textarea { height: auto; padding: 6px 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest-light); box-shadow: 0 0 0 2px rgba(61, 122, 70, 0.18); }

table { width: 100%; border-collapse: collapse; background: #ffffff; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--sand-line); text-align: left; }
th { background: var(--sand); color: var(--ink); font-weight: 700; }
tbody tr:nth-child(even) td { background: var(--green-zebra); }
tr:hover td { background: var(--green-pale); }

.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius); background: var(--sand); font-size: 12px; }
.tag.ok   { background: var(--green-pale); color: var(--forest); }
.tag.warn { background: var(--cream); color: #7a5a12; border: 1px solid #e3d3a4; }
.tag.err  { background: #f6e3df; color: #8c2a1c; }

/* ---------- Fußzeile ---------- */

.footer {
  padding: 18px 24px;
  background: var(--forest-dark);
  color: var(--sand-logo);
  font-size: 12px;
  text-align: center;
}

/* ---------- schmale Bildschirme ---------- */

@media (max-width: 700px) {
  .brand { font-size: 20px; height: 56px; }
  .topbar nav { gap: 18px; overflow-x: auto; scrollbar-width: none; }
}