/* ================================================================
   design.css – Yoga mit Melissa · Design System v2
   Warm & Organic · Premium Earthy · Light Mode
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@400;500;600;700&display=swap');

/* ================================================================
   CSS Custom Properties – Light Mode (default)
   ================================================================ */
:root {
  /* Homepage CI – Yoga mit Melissa 2025 */
  /* ── Exakte Farbtöne aus dem Brand-Sheet ── */
  --sage-dark:    #5F6F65;   /* Dunkel-Sage (primär, Buttons, Badges) */
  --sage-mid:     #A8B5A2;   /* Mittel-Sage (Move-Akzent) */
  --sage-light:   #C7D2C1;   /* Hell-Sage (Move-Badges, Borders) */
  --sage-pale:    #EFE7DC;   /* Linen (= --cream, ganz helles Beige) */

  --terra:        #B87962;   /* Terrakotta (Special, Workshop, Akzente) */
  --terra-hover:  #9E6352;
  --gold:         #C9A96E;   /* Gold-Akzent */

  --near-black:   #2F2A27;   /* Dunkel-Braun (Headings, Text) */
  --cream:        #EFE7DC;   /* Linen – sehr helles Beige */
  --warm-200:     #DCCDBE;   /* Beige-Mittel (Cards, Hintergrund-Akzent) */
  --beige:        #DCCDBE;   /* identisch mit --warm-200 */
  --warm-white:   #FDFBF8;

  /* Semantic – Light */
  --bg:           #EFE7DC;   /* Haupt-Hintergrund = Linen */
  --bg-page:      #DCCDBE;   /* Admin-Seiten Hintergrund = Beige-Mittel */
  --card:         #FDFBF8;
  --card-border:  rgba(95,111,101,.14);
  --text:         #2F2A27;
  --text-inv:     #EFE7DC;
  --muted:        #7A8878;
  --brand:        var(--sage-dark);
  --ok:           #4A6E52;
  --bad:          #8B2C1E;
  --disabled:     #C8C4BC;

  /* Header – Dunkles Forest-Grün (wie Homepage Hero) */
  --header-bg:    #2a3428;
  --header-text:  #EFE7DC;

  /* Status */
  --special-bg:   #F5EAE5;
  --special-bdr:  #D4A090;
  --canceled-bg:  #F2EFEB;
  --canceled-txt: #8A7A6E;
  --noblock-bg:   #EDF2F8;
  --noblock-bdr:  #C0CED8;

  /* Radii & Shadows */
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    22px;
  --shadow:       0 4px 24px rgba(30,19,12,.10);
  --shadow-sm:    0 2px 10px rgba(30,19,12,.07);
  --shadow-card:  0 1px 4px rgba(30,19,12,.06), 0 8px 24px rgba(30,19,12,.08);

  /* Transitions */
  --t: .2s ease;
}


/* ================================================================
   Reset & Base
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

/* ── Body ─────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background var(--t), color var(--t);
}

/* ================================================================
   Typography
   ================================================================ */
h1, h2, h3, h4, .heading {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.15;
  color: var(--near-black);
}
h1 {
  font-size: clamp(24px, 5.5vw, 36px);
  font-weight: 600;
  letter-spacing: .01em;
}
h2 {
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 400;
  font-style: italic;
  margin-top: 4px;
  opacity: .88;
}
h3 { font-size: clamp(18px, 3vw, 22px); font-weight: 600; margin-bottom: 12px; }
h4 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }

p { margin-bottom: 10px; }
a { color: var(--terra); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scripted highlight (Brittany Signature) ──────────────────── */
.script {
  font-family: 'Brittany Signature', 'Dancing Script', cursive;
  font-weight: 400;
}

/* ================================================================
   Header
   ================================================================ */
header {
  background: linear-gradient(135deg, #2a3428 0%, #3d4f3a 60%, #5F6F65 100%);
  color: var(--header-text);
  text-align: center;
  padding: 32px 20px 16px;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,.04)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  opacity: .4;
  pointer-events: none;
}
header h1, header h2 { color: var(--header-text); position: relative; }
header h1 { font-family: 'Playfair Display', serif; font-size: clamp(22px, 5vw, 32px); font-weight: 600; }
header h2 { font-size: clamp(12px, 2.5vw, 16px); opacity: .8; }


/* Back button – top-left of header */
.back-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  height: 34px;
  padding: 0 14px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: background var(--t), color var(--t);
  z-index: 10;
  white-space: nowrap;
}
.back-btn:hover { background: rgba(255,255,255,.25); color: #fff; text-decoration: none; }
.back-btn svg  { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* ================================================================
   Hero Header (neue App-Variante)
   ================================================================ */
.hero-header {
  background: linear-gradient(135deg, #2a3428 0%, #3d4f3a 60%, #5F6F65 100%);
  color: #fff;
  padding: 20px 16px 28px;
  position: relative;
}
.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hero-studio-name {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hero-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  text-decoration: none;
}
.hero-eyebrow {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 2px;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 600;
  color: #FAF6EF;
  line-height: 1.2;
  margin-bottom: 14px;
}
.hero-stats {
  display: flex;
  gap: 8px;
}
.hero-stat {
  background: rgba(255,255,255,.11);
  border-radius: 10px;
  flex: 1;
  text-align: center;
  padding: 8px 4px;
}
.hero-stat-num {
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 9px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 3px;
}

/* Hero-Header-Variante für Unterseiten (ohne Stat-Boxen) */
.hero-header.sub {
  padding-bottom: 18px;
}
.hero-header.sub .hero-title {
  margin-bottom: 4px;
}
.hero-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  text-decoration: none;
}
.hero-back:hover { color: #fff; }

/* Page-card: weißes Panel das aus dem Hero herausschaut */
.page-card {
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  margin-top: -10px;
  padding: 14px 0 0;
  flex: 1;
}

/* ================================================================
   Bottom Tab Navigation
   ================================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 0.5px solid var(--card-border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .03em;
  text-transform: uppercase;
  gap: 3px;
  transition: color .15s;
}
.bottom-nav a.active,
.bottom-nav a:hover { color: var(--sage-dark); }
.bottom-nav a svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Simple page header (Unterseiten ohne hero) */
.page-header {
  background: linear-gradient(135deg, #2a3428 0%, #3d4f3a 100%);
  color: #fff;
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header-back {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
}
.page-header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: #FAF6EF;
  line-height: 1.2;
}
.page-header-sub {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 1px;
}

/* ================================================================
   Layout
   ================================================================ */
#app { flex: 1; display: flex; flex-direction: column; }
.container {
  width: min(1100px, 96%);
  margin: 16px auto 96px;
}

/* ================================================================
   Cards
   ================================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px;
  margin-bottom: 16px;
  transition: background var(--t), border-color var(--t);
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 16px;
  letter-spacing: .01em;
}

/* Subtle divider between card sections */
.card-divider {
  height: 1px;
  background: var(--card-border);
  margin: 16px -22px;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  min-height: 44px;             /* touch target */
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--t), transform .08s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover  { filter: brightness(.92); }
.btn:active { filter: brightness(.85); transform: scale(.98); }
.btn[disabled], .btn:disabled {
  background: var(--disabled);
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* Variants */
.btn-ghost   { background: var(--cream); color: var(--near-black); }
.btn-ghost:hover { background: var(--beige); }
.btn-outline {
  background: transparent;
  color: var(--terra);
  border: 1.5px solid var(--terra);
}
.btn-outline:hover { background: var(--terra); color: #fff; }
.btn-danger  { background: var(--bad); }
.btn-sm      { padding: 7px 13px; font-size: 13px; min-height: 34px; }
.btn-lg      { padding: 14px 28px; font-size: 16px; min-height: 52px; }
.btn-block   { width: 100%; }

/* ================================================================
   Form Elements
   ================================================================ */
input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--beige);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: var(--card);
  color: var(--text);
  min-height: 44px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(95,111,101,.18);
}
textarea { min-height: 80px; resize: vertical; }
select { cursor: pointer; }
input[type="checkbox"], input[type="radio"] {
  all: revert;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

label {
  display: block;
  margin: 12px 0 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Password toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.pw-toggle svg { width: 20px; height: 20px; fill: currentColor; }

/* ================================================================
   Notifications
   ================================================================ */
.notice {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ok) 10%, var(--card));
  color: var(--ok);
  border-left: 3px solid var(--ok);
  margin: 10px 0;
  font-size: 14px;
}
.error {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bad) 10%, var(--card));
  color: var(--bad);
  border-left: 3px solid var(--bad);
  margin: 10px 0;
  font-size: 14px;
}
.info {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--terra) 10%, var(--card));
  color: var(--terra);
  border-left: 3px solid var(--terra);
  margin: 10px 0;
  font-size: 14px;
}
#alerts { min-height: 4px; }

/* Fallback for older browsers */
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .notice { background: #eef5ee; }
  .error  { background: #fdf0ee; }
  .info   { background: var(--special-bg); }
}

/* ================================================================
   Block / Unit Info
   ================================================================ */
.block-info {
  font-size: 16px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ok) 12%, var(--card));
  color: var(--ok);
  margin: 6px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 10px;
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .block-info { background: #eef5ee; }
}

/* ================================================================
   Course Cards
   ================================================================ */
.course-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin: 10px 0;
  cursor: pointer;
  background: var(--card);
  transition: background var(--t), box-shadow var(--t), border-color var(--t);
}
.course-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: color-mix(in srgb, var(--terra) 25%, transparent);
}
.course-card.special  { background: var(--special-bg); border-color: var(--special-bdr); }
.course-card.canceled { background: var(--canceled-bg); color: var(--canceled-txt); border-color: var(--beige); }
.course-card.noblock  { background: var(--noblock-bg); border-color: var(--noblock-bdr); }

.course-meta  { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.course-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--near-black);
  margin: 3px 0 5px;
  line-height: 1.2;
}
.course-free   { font-size: 13px; color: var(--muted); }
.course-action { text-align: right; }

@supports not (color: color-mix(in srgb, red 10%, white)) {
  .course-card:hover { border-color: rgba(158,96,64,.25); }
}

/* ================================================================
   Tags / Chips
   ================================================================ */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--cream);
  color: var(--muted);
  margin-left: 5px;
  border: 1px solid transparent;
}
.tag.special  { background: var(--special-bg); border-color: var(--special-bdr); color: #B87962; }
.tag.canceled { background: var(--canceled-bg); color: var(--canceled-txt); border-color: var(--beige); }
.tag.nuad     { background: #F0EDF8; border-color: #C9BFE8; color: #4A3870; }
.tag.yoga     { background: #C7D2C1; border-color: #A8B5A2; color: #2F2A27; }
.tag.member   { background: var(--special-bg); border-color: var(--special-bdr); color: #B87962; }

/* ================================================================
   Bottom Tab Navigation
   ================================================================ */
nav.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  padding: 6px 4px env(safe-area-inset-bottom, 8px);
  z-index: 99;
  border-top: 0.5px solid var(--card-border);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 9px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color var(--t);
  padding: 4px 10px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
}
.tab svg  { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover  { color: var(--sage-dark); }
.tab.active { color: var(--sage-dark); }
.tab small { font-size: 9px; }
.tab .tab-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage-dark);
  margin-top: 0px;
  display: none;
}
.tab.active .tab-dot { display: block; }

/* ================================================================
   Sub-tabs (Me-Bereich etc.)
   ================================================================ */
.me-tabs {
  display: flex;
  gap: 8px;
  margin: 2px 0 16px;
  flex-wrap: wrap;
}
.me-tab {
  border: 1.5px solid var(--beige);
  background: var(--cream);
  color: var(--near-black);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  min-height: 44px;
  transition: background var(--t), border-color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.me-tab:hover  { background: var(--beige); }
.me-tab.active { background: var(--terra); color: #fff; border-color: var(--terra); }

/* ================================================================
   Admin Menu Grid
   ================================================================ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.menu-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background var(--t), box-shadow var(--t), transform .08s;
  -webkit-tap-highlight-color: transparent;
}
.menu-card:hover {
  background: color-mix(in srgb, var(--terra) 4%, var(--card));
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .menu-card:hover { background: var(--cream); }
}
.menu-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--terra) 12%, var(--cream));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .menu-icon { background: var(--cream); }
}
.menu-icon svg { width: 24px; height: 24px; fill: var(--terra); }
.menu-title { font-weight: 700; font-size: 15px; color: var(--near-black); }
.menu-sub   { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ================================================================
   Badges
   ================================================================ */
.badge-wrap { position: relative; display: inline-block; }
.badge-dot {
  position: absolute;
  top: -5px; right: -5px;
  width: 10px; height: 10px;
  background: var(--bad);
  border-radius: 50%;
  border: 2px solid var(--card);
}
.badge-count {
  position: absolute;
  top: -7px; right: -7px;
  background: var(--bad);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border: 2px solid var(--card);
  line-height: 1;
}

/* Membership badge */
.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}
.membership-badge.active   { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.membership-badge.inactive { background: var(--cream); color: var(--muted); }
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .membership-badge.active { background: #eef5ee; }
}

/* Unit badge */
.unit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
}

/* ================================================================
   Tables
   ================================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 2px solid var(--beige);
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: 'Inter', sans-serif;
}
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: color-mix(in srgb, var(--terra) 4%, var(--card)); }
@supports not (color: color-mix(in srgb, red 10%, white)) {
  tr:hover td { background: var(--cream); }
}

/* ================================================================
   Forms – Layout Helpers
   ================================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-full  { grid-column: 1 / -1; }

/* ================================================================
   Mediathek
   ================================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.media-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card);
  cursor: pointer;
  transition: box-shadow var(--t), transform .08s;
}
.media-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.media-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 40px;
}
.media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-info  { padding: 13px 15px; }
.media-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--near-black);
}
.media-meta  { font-size: 13px; color: var(--muted); }

/* ================================================================
   Coaching Journal
   ================================================================ */
.entry-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.entry {
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: var(--card);
}
.entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: color-mix(in srgb, var(--terra) 6%, var(--cream));
  border-bottom: 1px solid var(--card-border);
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .entry-header { background: var(--cream); }
}
.entry-type-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--terra);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.entry-meta   { font-size: 13px; color: var(--muted); }
.entry-author { font-weight: 600; font-size: 14px; color: var(--near-black); }
.entry-body   { padding: 15px; }
.entry-body video { width: 100%; border-radius: 9px; margin-top: 8px; }
.entry-replies { padding: 0 15px 15px; display: flex; flex-direction: column; gap: 8px; }
.reply {
  background: color-mix(in srgb, var(--bg) 60%, var(--card));
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 14px;
}
.reply.from-coach {
  background: color-mix(in srgb, var(--sage-dark) 10%, var(--card));
  border-left: 3px solid var(--sage-dark);
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .reply { background: var(--cream); }
  .reply.from-coach { background: #eef5f0; }
}

/* ================================================================
   Action Rows (Admin)
   ================================================================ */
.action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--card-border);
}
.action-row:last-child { border-bottom: none; }

/* ================================================================
   Login Page
   ================================================================ */
.login-wrap {
  width: min(440px, 96%);
  margin: 28px auto 0;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { margin-top: 4px; }
.login-links { text-align: center; margin-top: 18px; }
.login-links a { color: var(--text); font-size: 14px; opacity: .8; }
.login-links a:hover { opacity: 1; text-decoration: underline; }
#loginError {
  background: color-mix(in srgb, var(--bad) 15%, var(--card));
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  color: var(--bad);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  #loginError { background: rgba(139,44,30,.1); border-color: rgba(139,44,30,.25); }
}

/* ================================================================
   Loader
   ================================================================ */
.loader {
  display: flex;
  justify-content: center;
  padding: 36px;
}
.loader::after {
  content: '';
  width: 34px; height: 34px;
  border: 3px solid var(--beige);
  border-top-color: var(--terra);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   Footer Links
   ================================================================ */
.footer-links {
  text-align: center;
  padding: 12px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ================================================================
   Utility Classes
   ================================================================ */
.hide         { display: none !important; }
.muted        { color: var(--muted); }
.ok           { color: var(--ok); font-weight: 600; }
.bad          { color: var(--bad); font-weight: 600; }
.center       { text-align: center; }
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.mt-8         { margin-top: 8px; }
.mt-12        { margin-top: 12px; }
.mt-16        { margin-top: 16px; }

/* ================================================================
   Admin – Section Headings (konsistente Überschriften-Hierarchie)
   ================================================================ */

/* Haupt-Kartenüberschrift (= .card-title bereits definiert oben) */
/* Unter-Sektions-Titel innerhalb einer Karte */
.section-title,
.form-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--near-black);
  letter-spacing: .01em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--card-border);
}

/* Kleines Label über einer Gruppe (z.B. "Verwendungszweck") */
.group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Admin-Seitenüberschrift im Header-Bereich */
.admin-page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 4px;
}

/* ── Month select ─────────────────────────────────────────────── */
select.month-sel {
  width: auto;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--beige);
  background: var(--card);
  color: var(--text);
}

/* ================================================================
   Overview / Main page specific
   ================================================================ */
.greeting {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 4.5vw, 28px);
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 4px;
}
.greeting-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 10px;
}
.booking-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card);
  margin-bottom: 10px;
  transition: box-shadow var(--t);
}
.booking-strip:hover { box-shadow: var(--shadow-sm); }
.booking-date-box {
  text-align: center;
  min-width: 46px;
  background: var(--terra);
  color: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  flex-shrink: 0;
}
.booking-date-box .day-num {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.booking-date-box .day-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}
.booking-info { flex: 1; min-width: 0; }
.booking-info .b-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--near-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booking-info .b-meta { font-size: 13px; color: var(--muted); }

/* Admin widget */
.admin-widget-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
  color: var(--text);
}
.admin-widget-row:last-child { border-bottom: none; }
.admin-widget-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--terra) 12%, var(--cream));
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
@supports not (color: color-mix(in srgb, red 10%, white)) {
  .admin-widget-icon { background: var(--cream); }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 700px) {
  .menu-grid  { grid-template-columns: 1fr; }
  .form-grid  { grid-template-columns: 1fr; }
  .form-full  { grid-column: 1; }
}

@media (max-width: 600px) {
  header { padding: 22px 14px 12px; }
  .container { margin: 10px auto 88px; }
  .card { padding: 16px; }
  .card-divider { margin: 12px -16px; }
  .course-card { grid-template-columns: 1fr; }
  .course-action { text-align: left; }
  .me-tabs { gap: 6px; }
  .me-tab  { padding: 7px 12px; font-size: 13px; }
  nav.tabs { padding: 7px 2px 10px; }
  .tab     { font-size: 10px; gap: 3px; }
  .tab svg { width: 21px; height: 21px; }
  .media-grid { grid-template-columns: 1fr; }
  .btn    { padding: 10px 16px; font-size: 14px; }
  table th, table td { padding: 8px 6px; font-size: 13px; }
  .booking-strip { gap: 10px; padding: 12px 13px; }
}

/* ================================================================
   Admin – Mobile (≤600px) – globale Admin-Optimierungen
   ================================================================ */
@media (max-width: 600px) {
  /* Header kompakter */
  .adm-header { padding: 10px 12px 8px; }
  .adm-logo { font-size: 15px; }
  .adm-logo span { font-size: 11px; }
  .btn-preview { padding: 5px 8px; font-size: 11px; gap: 4px; }

  /* Tabellen scrollbar machen (ohne JS) */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* iOS: Input-Zoom verhindern (font-size < 16px → Browser zoomt) */
  input, select, textarea { font-size: 16px !important; }

  /* Inline-Grids → einspaltig */
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Modals */
  .modal .dialog { width: 95% !important; max-width: none; padding: 14px; }
  .ql-sheet { padding: 16px; }

  /* Quick-Links Bar umbrechbar */
  .ql-bar { flex-wrap: wrap; }

  /* Karten */
  .card { padding: 12px; }
}
