/* Thai Yoga Admin. Erscheinungsbild wie die App und thaiyoga.de (Markenebene
   am Ende dieser Datei). Alle Text-Grund-Paare >= 4.5:1. Tippflaechen >= 44 px,
   nichts haengt an Hover. Schriften liegen hier unter fonts/. */

@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/josefin-sans-latin.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/josefin-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0; }
@font-face { font-family: 'Afrah'; font-weight: 700; font-display: swap; src: url('fonts/Afrah-Bold.woff') format('woff'); }
@font-face { font-family: 'Afrah'; font-weight: 400; font-display: swap; src: url('fonts/Afrah-Regular.woff') format('woff'); }

:root {
  --papier: #f6f1e7;
  --karte: #fbf8f1;
  --sand: #e6dac6;
  --linie: #d9cdb8;
  --oliv: #343a30;
  --tusche: #2c2a25;
  --weich: #6b6459;
  --bronze: #6a512d;
  --gold: #c9a86a;
  --gruen: #3d6b46;
  --gruen-grund: #e3eedf;
  --rot: #9b2c22;
  --rot-grund: #f6e1dc;
  --gelb-grund: #f4e8c8;
  --grau-grund: #e9e5de;
  --schatten: 0 1px 2px rgba(44, 42, 37, .08), 0 4px 16px rgba(44, 42, 37, .06);
  --rund: 14px;
  --kopf-h: 56px;
  --navi-h: 64px;
  --schrift: 'Josefin Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titel: 'Cormorant SC', Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tusche);
  font: 400 1rem/1.5 var(--schrift);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--bronze); }
h1, h2, h3 { font-family: var(--titel); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
[hidden] { display: none !important; }
.leise { color: var(--weich); }
.klein { font-size: .875rem; }
.zahl { font-variant-numeric: tabular-nums; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Geruest ---------- */
.app { min-height: 100dvh; }
.kopf {
  position: sticky; top: 0; z-index: 20; height: calc(var(--kopf-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; justify-content: space-between;
  background: var(--oliv); color: var(--papier);
}
.marke { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--titel); font-size: 1.35rem; min-height: 44px; }
.marke svg { width: 28px; height: 28px; color: var(--gold); }
.kopf-rechts { display: flex; align-items: center; gap: 8px; }
.wer { font-size: .85rem; opacity: .85; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-knopf { display: grid; place-items: center; width: 44px; height: 44px; color: inherit; border-radius: 50%; }

.navi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--navi-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--karte); border-top: 1px solid var(--linie);
}
.navi a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--weich); text-decoration: none; font-size: .78rem; letter-spacing: .02em;
}
.navi a[aria-current="page"] { color: var(--bronze); font-weight: 600; }
.abzeichen {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--rot); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; font-weight: 700;
}
.inhalt { padding: 16px 16px calc(var(--navi-h) + 32px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; outline: none; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; }
  .kopf { grid-column: 1 / -1; }
  .navi {
    position: sticky; top: var(--kopf-h); bottom: auto; height: calc(100dvh - var(--kopf-h)); padding: 16px 12px;
    display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--linie); background: transparent;
  }
  .navi a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; min-height: 48px; border-radius: 10px; font-size: .95rem; }
  .navi a[aria-current="page"] { background: var(--sand); }
  .abzeichen { position: static; margin-left: auto; }
  .inhalt { padding: 28px 32px 48px; width: 100%; grid-column: 2; }
  /* Beim Login ist die Navigation aus, dann bekommt der Inhalt die ganze Breite. */
  .navi[hidden] + .inhalt { grid-column: 1 / -1; }
}

/* ---------- Bausteine ---------- */
.zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zeile.zwischen { justify-content: space-between; }
.stapel > * + * { margin-top: 12px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.seitenkopf p { margin: 4px 0 0; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--oliv); background: var(--oliv); color: var(--papier);
  font-weight: 600; letter-spacing: .02em; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.knopf svg { width: 18px; height: 18px; }
.knopf.hell { background: transparent; color: var(--oliv); }
.knopf.rot { background: var(--rot); border-color: var(--rot); }
.knopf.rot.hell { background: transparent; color: var(--rot); }
.knopf.klein { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.knopf:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.knopfleiste { display: flex; flex-wrap: wrap; gap: 8px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linie); background: var(--karte);
  color: var(--tusche); cursor: pointer; white-space: nowrap;
}
select.chip { width: auto; min-height: 40px; padding: 0 12px; }
.chip[aria-pressed="true"] { background: var(--oliv); color: var(--papier); border-color: var(--oliv); }

.status {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem;
  font-weight: 600; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
.s-offen, .s-angemeldet, .s-bezahlt { background: var(--gruen-grund); color: var(--gruen); }
.s-ausgebucht, .s-warteliste, .s-gestellt, .s-laeuft { background: var(--gelb-grund); color: #6b4e12; }
.s-entwurf, .s-geschlossen, .s-vergangen, .s-teilgenommen, .s-offen-rechnung { background: var(--grau-grund); color: #4f4a42; }
.s-abgesagt, .s-storniert { background: var(--rot-grund); color: var(--rot); }
.s-umgebucht { background: #e2e6ef; color: #34405e; }

.karte {
  display: block; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund);
  padding: 16px; box-shadow: var(--schatten); color: inherit; text-decoration: none;
}
a.karte, button.karte { cursor: pointer; width: 100%; text-align: left; }
.raster { display: grid; gap: 12px; }
@media (min-width: 640px) { .raster.zwei { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .raster.drei { grid-template-columns: repeat(3, 1fr); } }

.termin-karte h3 { margin: 6px 0 2px; }
.balken { height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; margin: 12px 0 6px; }
.balken > i { display: block; height: 100%; background: var(--bronze); border-radius: 4px; }
.balken.voll > i { background: var(--rot); }

.person-karte { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.person-karte .name { font-weight: 600; }
.symbole { display: inline-flex; gap: 6px; color: var(--weich); }
.symbole svg { width: 16px; height: 16px; }

.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin: 20px 0 12px; overflow-x: auto; }
.reiter button {
  min-height: 44px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer;
  color: var(--weich); white-space: nowrap;
}
.reiter button[aria-selected="true"] { color: var(--tusche); border-bottom-color: var(--bronze); font-weight: 600; }

dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.daten dt { color: var(--weich); }
dl.daten dd { margin: 0; overflow-wrap: anywhere; }

.tabelle-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--rund); background: var(--karte); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: middle; }
th { font-weight: 600; color: var(--weich); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr { cursor: pointer; }
tbody tr:last-child td { border-bottom: 0; }
.nur-breit { display: none; }
@media (min-width: 1024px) { .nur-breit { display: block; } .nur-schmal { display: none; } }

/* ---------- Formulare ---------- */
.feld { display: grid; gap: 6px; }
.feld label, .feld .label { font-weight: 600; font-size: .92rem; }
.feld .hilfe { font-size: .85rem; color: var(--weich); }
.feld .fehler { font-size: .875rem; color: var(--rot); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9ab92; border-radius: 10px; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--rot) !important; }
.formular { display: grid; gap: 16px; }
@media (min-width: 640px) { .formular .zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
.formular .zwei > * + * { margin-top: 16px; }
@media (min-width: 640px) { .formular .zwei > * + * { margin-top: 0; } }
fieldset { border: 1px solid var(--linie); border-radius: var(--rund); padding: 14px 16px 16px; margin: 0; }
legend { font-family: var(--titel); font-size: 1.15rem; padding: 0 6px; }
.wahl { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; }
.wahl input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--oliv); flex: none; }
.id-vorschau { font-family: ui-monospace, Menlo, monospace; background: var(--sand); padding: 6px 10px; border-radius: 8px; display: inline-block; }

/* ---------- Panel (Buchung) und Dialog ---------- */
.panel, .dialog { position: fixed; inset: 0; z-index: 50; }
.panel-schleier { position: absolute; inset: 0; background: rgba(44, 42, 37, .45); }
.panel-blatt {
  position: absolute; inset: 0; background: var(--papier); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
  animation: rein .2s ease-out;
}
@media (min-width: 768px) {
  .panel-blatt { left: auto; width: min(560px, 92vw); box-shadow: -8px 0 32px rgba(0,0,0,.18); padding: 20px 24px 40px; }
}
@keyframes rein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .panel-blatt { animation: none; } }
.panel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.zu { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sand); cursor: pointer; }
.abschnitt { margin-top: 20px; }
.abschnitt > h3 { margin-bottom: 8px; }

.dialog-blatt {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--papier); border-radius: var(--rund); padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.zusammenfassung { background: var(--karte); border: 1px solid var(--linie); border-left: 4px solid var(--bronze); border-radius: 10px; padding: 12px 14px; margin: 12px 0 16px; }

.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf li { padding: 8px 0; border-bottom: 1px dashed var(--linie); }
.verlauf li:last-child { border-bottom: 0; }

.ziel { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--linie); border-radius: 12px; background: var(--karte); cursor: pointer; }
.ziel:has(input:checked) { border-color: var(--oliv); box-shadow: 0 0 0 2px var(--oliv) inset; }
.ziel input { width: 22px; height: 22px; accent-color: var(--oliv); }

.hinweis { padding: 12px 14px; border-radius: 10px; background: var(--gelb-grund); color: #4d3a0d; }
.hinweis.rot { background: var(--rot-grund); color: var(--rot); }
.hinweis.gruen { background: var(--gruen-grund); color: var(--gruen); }

/* ---------- Laden ---------- */
.platzhalter { background: linear-gradient(90deg, var(--sand) 0%, #efe6d6 50%, var(--sand) 100%); background-size: 200% 100%;
  animation: schimmer 1.2s infinite linear; border-radius: var(--rund); }
@keyframes schimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .platzhalter { animation: none; } }
.leer { text-align: center; padding: 40px 16px; color: var(--weich); }

/* ---------- Meldung ---------- */
.meldung {
  position: fixed; left: 50%; bottom: calc(var(--navi-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--oliv); color: var(--papier); padding: 12px 18px; border-radius: 12px; box-shadow: var(--schatten);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px);
}
.meldung.an { opacity: 1; transform: translate(-50%, 0); }
.meldung.rot { background: var(--rot); }
@media (min-width: 900px) { .meldung { bottom: 24px; } }

/* ---------- Login ---------- */
.login { max-width: 420px; margin: 8vh auto 0; }
.login .karte { padding: 24px; }


/* ===========================================================================
   MARKENEBENE wie die App (app/klickdummy/app.css) und thaiyoga.de:
   Grund #ededed, Gruen #595f5c, Taupe #a48a7b nur als Flaeche/Linie (als
   Schrift zu schwach), hell #d7cbc4. Afrah fuer Ueberschriften, Josefin
   Sans fuer Text, fast eckig. Die Variablen oben werden hier umgelenkt,
   damit die Regeln darueber unveraendert bleiben.
   =========================================================================== */
:root {
  --papier: #ededed;
  --karte: #f7f7f6;
  --sand: #e4e4e2;
  --linie: rgba(89, 95, 92, .22);
  --oliv: #595f5c;
  --tusche: #3f4442;          /* Fliesstext etwas dunkler als das Gruen: bequem lesbar */
  --weich: #626764;           /* 4.9:1 auf #ededed */
  --bronze: #595f5c;          /* Links, aktive Reiter, Balken */
  --gold: #d7cbc4;
  --gruen: #3f5a46;
  --gruen-grund: #e1e8e3;
  --gelb-grund: #efe6e0;
  --grau-grund: #e4e4e2;
  --rund: 2px;
  --schatten: none;
  --titel: 'Afrah', Georgia, serif;
  --taupe: #a48a7b;
}
h1, h2, h3, legend { font-family: var(--titel); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #595f5c; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; letter-spacing: .05em; }

/* Kopf: Gruen der Website, Logo statt Enso */
.kopf { background: #595f5c; color: #ededed; }
.marke { gap: 0; }
.marke svg.logo { width: auto; height: 34px; color: #ededed; stroke: none; }
.kopf-knopf { border-radius: var(--rund); }

/* Knoepfe: eckig, Grossbuchstaben, gesperrt */
.knopf { border-radius: var(--rund); text-transform: uppercase; letter-spacing: .12em; font-weight: 500; font-size: .92rem; }
.knopf.klein { font-size: .8rem; letter-spacing: .1em; }
.chip, select.chip { border-radius: var(--rund); letter-spacing: .04em; }
.zu { border-radius: var(--rund); }

/* Statusmarken: gesperrt wie auf der Website */
.status { border-radius: var(--rund); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; }
.s-ausgebucht, .s-warteliste, .s-gestellt, .s-laeuft { background: #efe6e0; color: #5e4637; }

/* Navigation unten: aktive Seite mit Taupe-Strich */
.navi { background: #f7f7f6; }
.navi a span { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
.navi a[aria-current="page"] { color: #595f5c; }
.navi a[aria-current="page"]::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--taupe); }
.reiter button[aria-selected="true"] { border-bottom-color: var(--taupe); color: #595f5c; }

/* Flaechen */
.zusammenfassung { border-left-color: var(--taupe); border-radius: var(--rund); }
.hinweis, .id-vorschau, .panel-blatt, .dialog-blatt, .meldung, .tabelle-huelle, .ziel, .balken, .balken > i { border-radius: var(--rund); }
.balken > i { background: #595f5c; }
.panel-schleier { background: rgba(43, 47, 45, .5); }
.wahl input, .ziel input { accent-color: #595f5c; }

/* Anmelden: Logo ueber der Karte */
.login-logo { display: block; width: 150px; height: auto; margin: 8px auto 20px; color: #595f5c; }
.login-logo { stroke: none; width: 150px; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Eingabefelder eckig wie in der App */
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-radius: var(--rund) !important; border-color: #a3a8a5; }
/* Beim Anmelden steht das grosse Logo in der Mitte, oben nicht doppelt */
.app:has(.login) .kopf .marke, .app:has(.login) .kopf-rechts { visibility: hidden; }
