/* Design „Warm“ der Kundenansicht (docs/DESIGN_KUNDE.md). Gilt nur, wenn ein Kunde angemeldet ist (body.cust); die Admin-Oberfläche bleibt unberührt.
   Die Variablen der Admin-Oberfläche werden hier auf die warmen Farben gesetzt, damit noch nicht umgebaute Seiten zum Rahmen passen. */
/* Schrift Nunito (variabel, Gewichte 500–800), selbst gehostet unter /fonts (SIL Open Font License, fonts/OFL.txt). Kein Google Fonts: die
   Content-Security-Policy erlaubt nur eigene Quellen, und so sieht Google die Adressen der Kunden nicht. latin-ext deckt Türkisch ab. */
@font-face { font-family: Nunito; font-style: normal; font-weight: 500 800; font-display: swap; src: url("/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Nunito; font-style: normal; font-weight: 500 800; font-display: swap; src: url("/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

body.cust {
  /* Flächen */
  --c-bg: #faf7f2; --c-card: #ffffff; --c-sand: #ece6da; --c-sand-2: #e3dccd;
  --c-ink: #2b2a26; --c-ink-2: #7a766c; --c-ink-3: #b8b3a6;
  /* Akzent */
  --c-green: #1f6f5a; --c-green-2: #164f40; --c-green-soft: #d6ebe3;
  /* Status */
  --c-warn: #9a5b00; --c-warn-soft: #fff3dc; --c-bad: #a2301f; --c-bad-soft: #fde4e1;
  /* Schatten, Radien */
  --c-shadow: 0 2px 10px rgba(60, 50, 20, .06); --c-shadow-nav: 0 8px 24px rgba(43, 42, 38, .25);
  --c-r-card: 16px; --c-r-big: 18px; --c-r-pill: 999px; --c-r-nav: 20px;

  /* Variablen der Admin-Oberfläche für die übrigen Seiten */
  --bg: var(--c-bg); --panel: var(--c-card); --text: var(--c-ink); --muted: var(--c-ink-2); --line: var(--c-sand); --soft: #f5f1e9; --hover: #f2ede3;
  --side: var(--c-card); --side-text: var(--c-ink); --side-muted: var(--c-ink-2);
  --accent: var(--c-green); --accent-dark: var(--c-green-2); --accent-text: #ffffff; --accent-soft: var(--c-green-soft);
  --ok: var(--c-green); --ok-bg: var(--c-green-soft); --ok-dot: var(--c-green); --warn: var(--c-warn); --warn-bg: var(--c-warn-soft); --error: var(--c-bad); --error-bg: var(--c-bad-soft);
  --radius: 10px; --radius-lg: var(--c-r-card); --shadow: var(--c-shadow);
  color-scheme: light;

  background: var(--c-bg); color: var(--c-ink);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; line-height: 1.4;
}
body.cust a { color: var(--c-green); }

/* Rahmen: Der Admin-Rahmen (Seitenleiste, Handy-Leiste) ist aus; oben eine schmale Kopfzeile, auf dem Handy unten die schwebende Leiste. */
body.cust header#top, body.cust .mobile-bar, body.cust .nav-backdrop { display: none !important; }
body.cust .shell { display: block; min-height: 100vh; }
body.cust main { max-width: 1180px; margin: 0 auto; padding: 18px 24px 40px; }

.c-top { display: flex; align-items: center; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 14px 24px 0; }
.c-top .c-brand { display: flex; align-items: center; gap: 10px; color: var(--c-ink); text-decoration: none; font-size: 18px; font-weight: 800; }
.c-top .c-brand img { border-radius: 10px; }
.c-top nav.c-links { display: flex; flex-direction: row; gap: 4px; flex: 1; justify-content: center; }
.c-top nav.c-links a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--c-r-pill); color: var(--c-ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.c-top nav.c-links a .icon { width: 18px; height: 18px; margin: 0; color: var(--c-ink-2); }
.c-top nav.c-links a:hover { background: var(--c-sand); }
.c-top nav.c-links a[aria-current="page"] { background: var(--c-green-soft); color: var(--c-green-2); }
.c-top nav.c-links a[aria-current="page"] .icon { color: var(--c-green); }
.c-top nav.c-links a::before { content: none; }

/* Menü oben rechts: Sprache, Passwort, Abmelden */
.c-menu { position: relative; margin-left: auto; }
.c-menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 4px; border-radius: var(--c-r-pill); cursor: pointer; font-size: 14px; font-weight: 700; color: var(--c-ink); }
.c-menu > summary::-webkit-details-marker { display: none; }
.c-menu > summary:hover { background: var(--c-sand); }
.c-menu > summary .avatar { flex: 0 0 36px; height: 36px; background: var(--c-green-soft); color: var(--c-green-2); }
.c-menu > summary .c-menu-name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 15rem; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--c-card); border-radius: var(--c-r-card); box-shadow: 0 12px 32px rgba(43, 42, 38, .18); }
.c-menu-panel label { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; font-size: 13px; font-weight: 700; color: var(--c-ink-2); }
.c-menu-panel select { height: 44px; min-height: 44px; border: 1px solid var(--c-sand-2); border-radius: 10px; background-color: #fff; font: inherit; font-size: 15px; color: var(--c-ink); }
body.cust .c-menu-panel a, .c-menu-panel button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--c-ink); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: none; filter: none; }
.c-menu-panel a:hover, .c-menu-panel button:hover { background: var(--c-sand); }
.c-menu-panel .icon { width: 18px; height: 18px; margin: 0; color: var(--c-ink-2); }

/* Untere Leiste (nur Handy) */
nav.c-bar { display: none; }

@media (max-width: 52rem) {
  .c-top { padding: 12px 20px 0; }
  .c-top nav.c-links { display: none; }
  .c-menu > summary .c-menu-name { display: none; }
  body.cust main { padding: 14px 20px 90px; }
  nav.c-bar { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; height: 64px; display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--c-ink); border-radius: var(--c-r-nav); box-shadow: var(--c-shadow-nav); padding: 0; gap: 0; }
  nav.c-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border-radius: var(--c-r-nav); color: var(--c-ink-3); font-size: 11px; font-weight: 700; text-decoration: none; }
  nav.c-bar a, nav.c-bar a:hover, nav.c-bar a[aria-current="page"] { background: transparent; }
  nav.c-bar a::before { content: none; }
  nav.c-bar .c-bar-box { display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 10px; }
  nav.c-bar .icon { width: 22px; height: 22px; margin: 0; color: inherit; transform: none; }
  nav.c-bar a[aria-current="page"] { color: #fff; }
  nav.c-bar a[aria-current="page"] .c-bar-box { background: var(--c-green); }
  nav.c-bar a[aria-current="page"] .icon { color: #fff; }
  body.cust .toasts { bottom: 92px; }
}

/* ---------- Bausteine ---------- */

.c-page { display: flex; flex-direction: column; gap: 8px; }
.c-page h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: 0; line-height: 1.2; }
@media (min-width: 52.01rem) { .c-page h1 { font-size: 28px; } }

/* Seitenkopf: Titel links, Nebentext rechts */
.c-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.c-head h1 { flex: 1; min-width: 0; }
.c-head .c-head-note { font-size: 14px; font-weight: 600; color: var(--c-ink-2); white-space: nowrap; }

/* Stimmungs-Karte */
.c-mood { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--c-card); border-radius: var(--c-r-big); box-shadow: var(--c-shadow); margin-bottom: 6px; }
.c-ring { --c-ring-color: var(--c-green); --c-ring-value: 0%; flex: none; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%;
  background: conic-gradient(var(--c-ring-color) 0 var(--c-ring-value), var(--c-sand) var(--c-ring-value) 100%); }
.c-ring.warn { --c-ring-color: var(--c-warn); }
.c-ring > span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-card); font-size: 12px; font-weight: 800; color: var(--c-green); }
.c-ring.warn > span { color: var(--c-warn); }
.c-mood-text { display: flex; flex-direction: column; min-width: 0; }
.c-mood-text strong { font-size: 16px; font-weight: 700; }
.c-mood-text span { font-size: 13px; color: var(--c-ink-2); }
.c-link { display: inline; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; filter: none; color: var(--c-green); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.c-link:hover { background: none; color: var(--c-green-2); box-shadow: none; }

/* Filter-Pillen (Knöpfe und Auswahlen sehen gleich aus) */
.c-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.c-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--c-r-pill); background: var(--c-sand); color: var(--c-ink);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none; filter: none; }
.c-pill:hover { background: var(--c-sand-2); box-shadow: none; }
.c-pill.on, .c-pill.on:hover { background: var(--c-green); color: #fff; }
select.c-pill { appearance: none; max-width: 100%; padding-right: 32px; background-image: url("/select-arrow.svg"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
select.c-pill.on { background-image: url("/select-arrow.svg"); }
@media (pointer: coarse) { .c-pill { min-height: 36px; } }

/* Abschnitts-Label */
.c-label { padding: 6px 0 2px; font-size: 13px; font-weight: 700; color: var(--c-ink-2); text-transform: uppercase; letter-spacing: .06em; }

/* Listenzeile */
.c-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 14px; background: var(--c-card); border-radius: var(--c-r-card); color: inherit; text-decoration: none; transition: box-shadow .15s ease; }
body.cust a.c-row { color: inherit; }
a.c-row:hover { box-shadow: var(--c-shadow); }
a.c-row:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; }
.c-row time { flex: none; width: 44px; font-size: 14px; font-weight: 800; color: var(--c-ink-2); }
.c-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c-row-text strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-row-text span { font-size: 13px; color: var(--c-ink-2); overflow: hidden; text-overflow: ellipsis; }
.c-row .c-mark { flex: none; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.c-row .c-mark .icon { width: 20px; height: 20px; margin: 0; stroke-width: 2.5; }
.c-row.ok .c-mark { color: var(--c-green); }
.c-row.run time, .c-row.run .c-row-text span { color: var(--c-green); font-weight: 600; }
.c-row.warn { background: var(--c-warn-soft); }
.c-row.warn time, .c-row.warn .c-row-text span, .c-row.warn .c-mark { color: var(--c-warn); }
.c-row.warn .c-row-text span { font-weight: 600; }
.c-row.bad { background: var(--c-bad-soft); }
.c-row.bad time, .c-row.bad .c-row-text span, .c-row.bad .c-mark { color: var(--c-bad); }
.c-row.bad .c-row-text span { font-weight: 600; }
.c-row.off { opacity: .6; }
.c-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 4px var(--c-green-soft); }

/* Hinweis bei leerer Liste */
.c-empty { margin: 0; padding: 22px 16px; background: var(--c-card); border-radius: var(--c-r-card); color: var(--c-ink-2); font-size: 14px; text-align: center; }

/* Knöpfe */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--c-green); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: none; filter: none; }
.c-btn:hover { background: var(--c-green-2); box-shadow: none; }
.c-btn.second { background: var(--c-sand); color: var(--c-ink); }
.c-btn.second:hover { background: var(--c-sand-2); }
.c-btn[disabled] { opacity: .5; cursor: default; }
.c-more { display: flex; justify-content: center; padding-top: 8px; }
