/* Farben, Schrift und Formen der Website zusammenbesser.team.
   Abgenommen an der laufenden Seite, nicht aus einer Vorlage:
     o-color-1 #C0927F  Clay    Akzent, "BESSER" im Logo
     o-color-2 #6B786F  Salbei  Seitengrund der Website, "ZUSAMMEN" im Logo
     o-color-3 #F0F2F1  hell    Inhaltsflächen
     o-color-5 #181210  dunkel  Schrift
   Knöpfe sind dort Pillen (border-radius 100px) - das auffälligste Formmerkmal
   der Seite, hier übernommen.
   Montserrat liegt lokal, nichts kommt von Google (siehe A001). */

@font-face {
  font-family: "Montserrat";
  src: url("/statisch/schriften/montserrat-latin-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("/statisch/schriften/montserrat-latin-ext-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  --clay:       #C0927F;
  --salbei:     #6B786F;

  --grund:      #F0F2F1;
  --flaeche:    #FFFFFF;
  --kante:      #D8DEDA;
  --ink:        #181210;
  --ink-2:      #5A6560;
  --ink-3:      #8A938E;

  --band:       #6B786F;
  --band-ink:   #F0F2F1;
  --band-ink-2: #C6CFC9;
  --band-kante: #5B675F;

  --mark:       #A56A50;
  --mark-leise: #D9C0B3;
  --warn:       #8C4A2F;

  --schrift: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --pille: 100px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --grund: #181210; --flaeche: #221A16; --kante: #362B25;
    --ink: #F0F2F1; --ink-2: #ADA49E; --ink-3: #857A73;
    /* Das Band bleibt Salbei, auch im Dunkelmodus: Das Logo traegt dunkle
       Schrift und ist fuer genau diesen Grund gezeichnet. Auf Schwarz reisst
       es aus. Der Dunkelmodus gilt der Inhaltsflaeche, nicht der Marke. */
    --band: #6B786F; --band-ink: #F0F2F1; --band-ink-2: #D3DAD5; --band-kante: #5B675F;
    --mark: #C68A6C; --mark-leise: #5E4234; --warn: #E0A183;
    --clay: #D3A793; --salbei: #93A197;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --grund: #181210; --flaeche: #221A16; --kante: #362B25;
  --ink: #F0F2F1; --ink-2: #ADA49E; --ink-3: #857A73;
  --band: #6B786F; --band-ink: #F0F2F1; --band-ink-2: #D3DAD5; --band-kante: #5B675F;
  --mark: #C68A6C; --mark-leise: #5E4234; --warn: #E0A183;
  --clay: #D3A793; --salbei: #93A197;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--ink);
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Kopfband --- */

.kopf { background: var(--band); color: var(--band-ink); }

.kopf-innen {
  max-width: 76rem; margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 0.9rem;
  display: flex; flex-wrap: wrap; gap: 0.9rem 1.5rem; align-items: center;
}

.kopf-logo { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
/* Helle Platte unter dem Logo: "ZUSAMMEN" ist salbeifarben und verschwindet
   sonst auf dem salbeifarbenen Band. So steht die Marke in beiden Themes auf
   dem Grund, fuer den sie gezeichnet ist. */
.kopf-logo img {
  height: 44px; width: auto; display: block;
  background: #F0F2F1; padding: 8px 14px; border-radius: 8px;
}
.kopf-logo span {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--band-ink-2);
  padding-left: 0.9rem; border-left: 1px solid var(--band-kante);
}

.kopf-rechts {
  margin-left: auto; display: flex; gap: 1.1rem; align-items: center;
  font-size: 0.8rem; color: var(--band-ink-2);
}
.kopf-rechts a { color: var(--band-ink-2); text-decoration: none; }
.kopf-rechts a:hover { color: var(--band-ink); }
.kopf-rechts .wer { color: var(--band-ink); font-weight: 600; }

.navi { background: var(--band); border-top: 1px solid var(--band-kante); }
.navi-innen {
  max-width: 76rem; margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex; gap: 0.3rem; overflow-x: auto;
}
.navi a {
  padding: 0.75rem 1rem; text-decoration: none; font-size: 0.85rem;
  font-weight: 600; color: var(--band-ink-2); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.navi a:hover { color: var(--band-ink); }
.navi a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--clay); }

.zeitwahl {
  max-width: 76rem; margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 0;
  display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center;
}
.zeitwahl > span {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-right: 0.3rem;
}
.zeitwahl a {
  font-size: 0.78rem; font-weight: 600; text-decoration: none;
  padding: 0.36rem 0.95rem; border: 1px solid var(--kante);
  border-radius: var(--pille); color: var(--ink-2); background: var(--flaeche);
}
.zeitwahl a:hover { border-color: var(--salbei); color: var(--ink); }
.zeitwahl a[aria-current="true"] {
  background: var(--salbei); border-color: var(--salbei); color: #F0F2F1;
}

/* --- Inhalt --- */

main { max-width: 76rem; margin: 0 auto; padding: 1.6rem clamp(1rem, 4vw, 2.5rem) 5rem; }

h1 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 0.25rem; text-wrap: balance;
}
.unterzeile { color: var(--ink-2); margin: 0 0 2rem; font-size: 0.9rem; }

h2 {
  font-size: 1rem; font-weight: 700; letter-spacing: 0.01em;
  margin: 2.6rem 0 1rem; padding-top: 1.1rem;
  border-top: 2px solid var(--kante);
}
h2:first-of-type { margin-top: 0.8rem; }
.hinweis { font-size: 0.82rem; color: var(--ink-3); margin: 0.8rem 0 0; max-width: 46rem; }

/* --- Kennzahlen --- */

.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px; background: var(--kante); border: 1px solid var(--kante);
  border-radius: 6px; overflow: hidden; margin: 0 0 1rem;
}
.kpi { background: var(--flaeche); padding: 1.15rem 1.15rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.25rem; }
.kpi b {
  font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.kpi span {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--salbei);
}
.kpi em { font-style: normal; font-size: 0.8rem; color: var(--ink-2); }

/* --- Verlauf --- */

.verlauf {
  display: flex; align-items: stretch; gap: 4px;
  padding: 1.3rem 1rem 0.9rem; background: var(--flaeche);
  border: 1px solid var(--kante); border-radius: 6px; overflow-x: auto;
}
.saeule {
  flex: 1 1 0; min-width: 48px;
  display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; gap: 0.35rem;
}
.saeule-wert {
  font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
/* Die Spur gibt die feste Hoehe, gegen die sich die Prozentwerte der Balken
   aufloesen. Ohne sie kollabieren alle Balken auf ihre Mindesthoehe - ein
   Prozentwert braucht eine Elternhoehe, die feststeht. */
.saeule-spur {
  display: flex; align-items: flex-end;
  width: 100%; height: 110px;
}
.saeule-balken {
  display: block; width: 100%; min-height: 3px;
  background: var(--mark-leise); border-radius: 4px 4px 0 0;
}
.saeule.jetzt .saeule-balken { background: var(--mark); }
.saeule.jetzt .saeule-wert { color: var(--ink); }
.saeule-monat {
  font-size: 0.7rem; color: var(--ink-3); white-space: nowrap;
  padding-top: 0.35rem; border-top: 1px solid var(--kante);
  width: 100%; text-align: center;
}
.saeule-monat small { font-size: 0.62rem; opacity: 0.75; margin-left: 1px; }
.saeule.jetzt .saeule-monat { color: var(--ink); font-weight: 700; }

/* --- Balken --- */

.bars { display: grid; gap: 2px; max-width: 48rem; }
.bar {
  display: grid; grid-template-columns: minmax(7rem, 15rem) 1fr auto;
  align-items: center; gap: 0.85rem; padding: 0.22rem 0.4rem; border-radius: 4px;
}
.bar:hover { background: var(--flaeche); }
.bar-name { font-size: 0.82rem; line-height: 1.3; overflow-wrap: anywhere; }
.bar-name small { display: block; color: var(--ink-3); font-size: 0.72rem; }
.bar-spur { height: 14px; }
.bar-fuell {
  display: block; height: 100%; background: var(--mark);
  border-radius: 0 var(--pille) var(--pille) 0; min-width: 3px;
}
.bar-fuell.leise { background: var(--mark-leise); }
.bar-wert {
  font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 3.6rem; text-align: right;
}
.bar-wert small { display: block; font-weight: 500; font-size: 0.7rem; color: var(--ink-3); }

/* --- Tabelle --- */

.tabelle-rahmen {
  overflow-x: auto; background: var(--flaeche);
  border: 1px solid var(--kante); border-radius: 6px;
}
table { border-collapse: collapse; width: 100%; min-width: 26rem; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--kante); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th {
  font-size: 0.68rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--salbei); font-weight: 700; border-bottom: 2px solid var(--kante);
}
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
td.warn { color: var(--warn); font-weight: 700; }

/* --- Meldungen --- */

.meldung {
  padding: 0.95rem 1.2rem; background: var(--flaeche);
  border-left: 4px solid var(--clay); border-radius: 0 6px 6px 0;
  margin: 0 0 1.5rem; font-size: 0.88rem;
}
.meldung.schlimm { border-left-color: var(--warn); }
.meldung p { margin: 0.35rem 0 0; }
.meldung p:first-child { margin-top: 0; }

.leer { color: var(--ink-3); font-size: 0.88rem; }

/* --- Anmeldung ---
   Bewusst EIN Aussehen in beiden Themes, mit festen Markenfarben statt Tokens:
   Salbeigrund wie die Website, heller Kasten. Das Logo trägt dunkle Schrift
   (Salbei und Clay) - auf dunklem Grund verschwindet es. */

.anmelde-seite {
  min-height: 100dvh; display: grid; place-items: center;
  padding: 2rem 1rem; background: #6B786F;
}
.anmelde-kasten {
  width: min(25rem, 100%); background: #F0F2F1; color: #181210;
  border-radius: 10px; padding: 2.4rem 2rem 2.1rem;
  box-shadow: 0 18px 50px rgba(24, 18, 16, 0.25);
}
.anmelde-logo { display: block; width: 200px; max-width: 72%; height: auto; margin: 0 0 1.9rem; }
.anmelde-kasten h1 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.35rem; color: #181210; }
.anmelde-kasten p.wozu { color: #5A6560; font-size: 0.88rem; margin: 0 0 1.7rem; }
.anmelde-kasten .meldung {
  background: #FFFFFF; border-left-color: #8C4A2F; color: #181210;
  margin-bottom: 1.4rem;
}

.feld { display: block; margin: 0 0 1.1rem; }
.feld span {
  display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: #6B786F; margin-bottom: 0.35rem;
}
.feld input {
  width: 100%; padding: 0.7rem 1.1rem; font: inherit; font-size: 0.92rem;
  color: #181210; background: #FFFFFF;
  border: 1px solid #C8D0CB; border-radius: var(--pille);
}
.feld input:focus { border-color: #6B786F; outline-color: #6B786F; }

button.knopf {
  width: 100%; padding: 0.8rem 1.4rem; font: inherit; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.03em;
  /* Dunkle Schrift auf Clay: 7,4:1. Weiß auf Clay wären 2,3:1 gewesen. */
  color: #181210; background: #C0927F;
  border: 0; border-radius: var(--pille); cursor: pointer;
}
button.knopf:hover { background: #B07E68; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Zwei Reihen auf einer Achse (Seite Geschäft) --- */

.reihe-titel {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--salbei);
  margin: 1.4rem 0 0.5rem;
}
.reihe-titel:first-of-type { margin-top: 0; }
.verlauf.schmal { padding: 1rem 1rem 0.7rem; }
.verlauf.schmal .saeule-spur { height: 74px; }
.saeule.umsatz .saeule-balken { background: var(--salbei); opacity: 0.45; }
.saeule.umsatz.jetzt .saeule-balken { background: var(--salbei); opacity: 1; }


.navi-innen { gap: 0; align-items: stretch; }
.navi-gruppe {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0 1.4rem 0 0; margin-right: 1.4rem;
  border-right: 1px solid var(--band-kante);
}
.navi-gruppe:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.navi-bereich {
  font-size: 0.63rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--band-ink-2); opacity: 0.8;
  white-space: nowrap;
}
.navi-seiten { display: flex; gap: 0.2rem; }

/* --- Zeitraumleiste --- */

.zeitleiste { background: var(--flaeche); border-bottom: 1px solid var(--kante); }
.zeitleiste-innen {
  max-width: 76rem; margin: 0 auto;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; align-items: center;
}

.zeit-pager { display: flex; align-items: center; gap: 0.6rem; }
.zeit-pager strong {
  font-size: 0.9rem; font-weight: 700; min-width: 11rem; text-align: center;
}
.zeit-pager a, .zeit-pager .aus {
  display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem; border-radius: var(--pille);
  border: 1px solid var(--kante); text-decoration: none;
  font-size: 1.1rem; line-height: 1; color: var(--ink-2);
}
.zeit-pager a:hover { border-color: var(--salbei); color: var(--ink); background: var(--grund); }
.zeit-pager .aus { opacity: 0.3; }

.zeit-arten { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.zeit-arten a {
  font-size: 0.76rem; font-weight: 600; text-decoration: none;
  padding: 0.3rem 0.8rem; border: 1px solid var(--kante);
  border-radius: var(--pille); color: var(--ink-2);
}
.zeit-arten a:hover { border-color: var(--salbei); color: var(--ink); }
.zeit-arten a[aria-current="true"] {
  background: var(--salbei); border-color: var(--salbei); color: #F0F2F1;
}

.zeit-frei {
  display: flex; gap: 0.45rem; align-items: center; margin-left: auto;
  font-size: 0.74rem; color: var(--ink-3);
}
.zeit-frei label { display: flex; gap: 0.3rem; align-items: center; }
.zeit-frei input {
  font: inherit; font-size: 0.76rem; padding: 0.25rem 0.5rem;
  color: var(--ink); background: var(--grund);
  border: 1px solid var(--kante); border-radius: 4px;
}
.zeit-frei button {
  font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer;
  padding: 0.3rem 0.85rem; border-radius: var(--pille);
  border: 1px solid var(--kante); background: var(--grund); color: var(--ink-2);
}
.zeit-frei button:hover { border-color: var(--salbei); color: var(--ink); }

@media (max-width: 60rem) {
  .zeit-frei { margin-left: 0; }
  .navi-gruppe { border-right: 0; margin-right: 0.8rem; padding-right: 0; }
}

/* --- Marke auf der Anmeldung: Logo plus ausbrechende Kurve --- */

/* Logo und Symbol stehen auf einer Grundlinie. Die x-Achse des Symbols sitzt
   am unteren Rand seines Feldes, deshalb reicht flex-end - sonst schwebt es. */
/* Logo und Symbol gleich hoch und auf einer Grundlinie. Beide bekommen dieselbe
   Hoehe statt einer Breite - sonst haengt eines von beiden in der Luft. */
.anmelde-marke {
  display: flex; align-items: flex-end; gap: 1.4rem; margin: 0 0 1.9rem;
  height: 50px;
}
.anmelde-logo { display: block; height: 50px; width: auto; margin: 0; }
.durchdecke { flex: none; display: block; height: 50px; width: auto; color: #6B786F; }

/* Unter dem Knopf und bewusst leise: Es ist ein Gruss, keine Ansage. */
/* Feste Mindesthöhe: Die Zitate sind verschieden lang, und ohne sie springt
   die Karte bei jedem Laden auf eine andere Höhe. */
.spruch {
  margin: 1.9rem 0 0; padding: 1.2rem 0 0; border: 0;
  border-top: 1px solid #DDE2DF;
  /* Drei Zeilen Zitat plus zwei Zeilen Verweis - das deckt auch das laengste
     ab (Adam Smith, 145 Zeichen). Ohne feste Hoehe springt die Karte. */
  min-height: 7.4rem;
}
.spruch p {
  margin: 0 0 0.4rem; font-size: 0.8rem; line-height: 1.5;
  color: #6E7873; font-style: italic;
}
.spruch cite {
  font-style: normal; font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.01em; color: #98A19C;
}
