/* ===== Neue Oberfläche mit Kacheln (nur im Design-Testlauf geladen, app/design.py) =====
   Gilt zusätzlich zu style.css – die bestehenden Seiten bleiben gleich aufgebaut. Farbe: Blau (--blau). */

:root { --dgrau: #eef1f4; --dschatten: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06); }

/* Testbalken mit Umschalter */
.lokalbalken.designbalken { background: #00796b; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 16px; font-size: 14px; }
.designwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: normal; }
.designwahl a { color: #fff; text-decoration: none; padding: 3px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.6); }
.designwahl a.aktiv { background: #fff; color: #00796b; font-weight: bold; }

body:not(.design-klassisch) { background: #f6f8fa; }
.symbol { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Kopfzeile ---------- */
.dkopf { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 64px;
  background: var(--blau); color: #fff; position: sticky; top: 0; z-index: 50; }
.dkopf a { color: inherit; text-decoration: none; }
.dlogo { display: flex; align-items: center; flex-shrink: 0; min-height: 44px; }
.dlogo img { height: 46px; width: auto; display: block; background: #fff; padding: 4px 10px; border-radius: 10px; }
.dfirma { font-weight: bold; font-size: 20px; white-space: nowrap; }
.dfirma span { font-weight: normal; opacity: .8; font-size: 15px; margin-left: 6px; }
.dtitel { font-size: 20px; font-weight: bold; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dstart, .dsuchknopf { display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 10px;
  background: color-mix(in srgb, currentColor 14%, transparent); font-weight: bold; font-size: 17px; flex-shrink: 0; }
.dstart { padding: 8px 16px 8px 12px; }
.dsuchknopf { padding: 8px 10px; }
.dstart:hover, .dsuchknopf:hover { background: color-mix(in srgb, currentColor 24%, transparent); }
.dperson { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dkreis { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--blau) !important; font-weight: bold; font-size: 15px; flex-shrink: 0; }
.dabmelden { font-size: 14px; opacity: .85; padding: 8px 4px; }

/* ---------- Inhalt: etwas mehr Luft, bessere Touch-Flächen ---------- */
body:not(.design-klassisch) main { padding: 20px 16px 40px; }
@media (pointer: coarse) {
  body:not(.design-klassisch) main button,
  body:not(.design-klassisch) main a.knopf,
  body:not(.design-klassisch) main select,
  body:not(.design-klassisch) main input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 44px; }
  body:not(.design-klassisch) main input[type=checkbox], body:not(.design-klassisch) main input[type=radio] { width: 22px; height: 22px; }
  body:not(.design-klassisch) main a.knopf { display: inline-flex; align-items: center; }
}
@media (max-width: 700px) {
  /* breite Tabellen seitlich wischen statt die Seite zu sprengen */
  body:not(.design-klassisch) main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dkopf { gap: 8px; padding: 8px 12px; }
  .dfirma span, .dabmelden { display: none; }
  .dlogo img { height: 40px; padding: 3px 8px; }
  /* Am Handy: Name des Bereichs steht ohnehin als Überschrift auf der Seite – nur Platzhalter */
  .dstart + .dtitel { visibility: hidden; }
  .dstart span { display: none; }
  .dstart { padding: 8px 10px; }
}
@media print { .dkopf, .lokalbalken { display: none !important; } body:not(.design-klassisch) { background: #fff; } }

/* ---------- Startseite ---------- */
.dstartseite { max-width: 1100px; margin: 0 auto; }
main:has(.dstartseite) { max-width: 1140px; }
.dgruss h1 { margin: 4px 0 0; font-size: 28px; }
.dgruss p { margin: 2px 0 18px; color: #667; }
.dgruppentitel { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: #556; margin: 26px 0 10px;
  display: flex; align-items: center; gap: 8px; }
.dgruppentitel::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--farbe, var(--blau)); }
.dkacheln.ohnetitel { margin-top: 22px; }

.dsuche { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--rand); border-radius: 14px;
  padding: 6px 6px 6px 14px; margin-bottom: 8px; box-shadow: var(--dschatten); }
.dsuche:focus-within { border-color: var(--blau); }
.dsuche .symbol { color: #889; }
.dsuche input { flex: 1; min-width: 0; border: 0; font-size: 18px; padding: 10px 4px; background: none; outline: none; }
.dsuche button { min-height: 44px; border-radius: 10px; font-size: 16px; padding: 8px 18px; }

/* Kacheln */
.dkacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dkachel { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 18px 16px;
  min-height: 150px; background: #fff; border-radius: 16px; text-decoration: none; color: var(--text);
  box-shadow: var(--dschatten); border-top: 6px solid var(--farbe); transition: transform .1s, box-shadow .1s; }
.dkachel:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.12); }
.dkachel:active { transform: scale(.98); }
.dkachel .symbol { width: 44px; height: 44px; color: var(--farbe); stroke-width: 1.6; margin-bottom: 6px; }
.dkachel b { font-size: 20px; }
.dkachel small { color: #667; font-size: 14px; line-height: 1.3; }
@media (max-width: 520px) {
  .dkacheln { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dkachel { min-height: 128px; padding: 14px 12px 12px; border-radius: 14px; }
  .dkachel .symbol { width: 36px; height: 36px; }
  .dkachel b { font-size: 17px; }
  .dkachel small { font-size: 13px; }
}

/* ---------- Suchergebnisse ---------- */
.danzahl { font-size: 12px; background: var(--dgrau); color: #556; padding: 1px 8px; border-radius: 10px; letter-spacing: 0; }
.dtreffer { display: flex; flex-direction: column; gap: 8px; }
.dtreffer a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 60px; background: #fff;
  border-radius: 12px; box-shadow: var(--dschatten); color: var(--text); text-decoration: none; }
.dtreffer a:hover, .dtreffer a:active { background: #eef4fa; }
.dtreffer a > .symbol:first-child { color: var(--blau); width: 28px; height: 28px; }
.dtreffer span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dtreffer b { overflow: hidden; text-overflow: ellipsis; }
.dtreffer small { color: #667; font-size: 14px; }
.dtreffer .pfeil { color: #aab; margin-left: auto; }
