/* =====================================================================
   SeeYou Heilraum – Designsystem (an die Marke seeyou-heilraum.de angelehnt)
   Creme · Goldbraun · Salbei · Cormorant Garamond. Mobile-first.
   ===================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-variable-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Markenfarben */
  --bg:            #faf7e0;   /* warmes Creme */
  --bg-2:          #f2efd5;   /* warm-white */
  --surface:       #fffdf4;   /* Kartenfläche */
  --surface-alt:   #f0ecd9;   /* sanfter Sand */

  --ink:           #574325;   /* Goldbraun – Haupttext */
  --ink-mid:       #6b5535;
  --ink-soft:      #8f7050;   /* gedämpft */
  --line:          rgba(87, 67, 37, 0.15);

  --brown:         #3d2d18;   /* dunkles Braun – Primäraktion */
  --brown-hover:   #574325;
  --sage:          #d6dec1;   /* Salbei */
  --sage-soft:     #e8edda;
  --olive:         #7d8a63;   /* gedämpftes Oliv – Nebenaktion */
  --olive-hover:   #6c784f;

  --ok:            #5f7a4e;
  --warn:          #a9802f;
  --danger:        #a4584a;

  /* Form */
  --radius:        20px;
  --radius-sm:     13px;
  --radius-pill:   999px;
  --shadow:        0 14px 40px rgba(87, 67, 37, 0.10);
  --shadow-soft:   0 6px 18px rgba(87, 67, 37, 0.07);
  --tap:           48px;
  --maxw:          580px;

  --font-display:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:     system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 28px;
}

/* --- Typografie ---------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.2;
}
h1 { font-size: 2rem;    margin: 0 0 0.35em; }
h2 { font-size: 1.5rem;  margin: 1.1em 0 0.45em; }
h3 { font-size: 1.2rem;  margin: 0.9em 0 0.35em; }
p  { margin: 0 0 1em; }
a  { color: var(--ink-mid); text-underline-offset: 3px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.center { text-align: center; }

/* --- Kopfbereich --------------------------------------------------- */
.app-header {
  background: rgba(255, 253, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header .container { padding-top: 15px; padding-bottom: 15px; }
.app-header .logo { height: 40px; width: auto; flex: 0 0 auto; }
.app-header h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* --- Karten -------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}
.card-link { text-decoration: none; color: inherit; display: block; transition: transform 0.12s ease, box-shadow 0.2s ease; }
.card-link:hover  { box-shadow: var(--shadow); }
.card-link:active { transform: scale(0.992); }

.card-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 0 0 3px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* --- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brown);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.06s ease, box-shadow 0.2s ease;
}
.btn:hover  { background: var(--brown-hover); }
.btn:active { transform: scale(0.98); }
.btn-block  { display: flex; width: 100%; }

.btn-secondary { background: var(--surface-alt); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg-2); }

.btn-ghost { background: transparent; color: var(--ink-mid); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(87, 67, 37, 0.05); }

.btn-clay { background: var(--olive); color: #fff; }
.btn-clay:hover { background: var(--olive-hover); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f4b3e; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }

.quick-actions { display: flex; gap: 10px; margin-top: 14px; }
.quick-actions .btn { flex: 1; padding: 13px; }

/* --- Status-Pills -------------------------------------------------- */
.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill-neu               { background: var(--sage-soft); color: var(--ink-mid); }
.pill-formular_erhalten { background: #f2e7cf;          color: #8a6a2f; }
.pill-kontaktiert       { background: #e3e8da;          color: #5f6f4c; }
.pill-termin_vereinbart { background: #e7e2d3;          color: var(--ink-mid); }
.pill-aktiv             { background: var(--sage);      color: #46552f; }
.pill-abgeschlossen     { background: var(--surface-alt);color: var(--ink-soft); }
.pill-open              { background: #f2e7cf;          color: #8a6a2f; }
.pill-done              { background: var(--sage);      color: #46552f; }

/* --- Formulare ----------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 0.95rem;
  color: var(--ink-mid);
}
.field .hint { font-size: 0.85rem; color: var(--ink-soft); margin: 5px 0 0; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=datetime-local], input[type=number],
input[type=search], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(125, 138, 99, 0.18);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-alt);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.checkbox-row input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--olive); }

.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* --- Meldungen ----------------------------------------------------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: #e6edd9; border-color: #cdd9b8; color: #46552f; }
.alert-error   { background: #f3e1da; border-color: #e3c4ba; color: #8a4435; }
.alert-info    { background: #efe9d6; border-color: #e0d6bd; color: var(--ink-mid); }

.errors { list-style: none; margin: 0; padding: 0; }
.errors li { margin-bottom: 5px; }

/* --- Listen / leere Zustände -------------------------------------- */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-soft);
}
.empty-state .icon { font-size: 2.4rem; display: block; margin-bottom: 10px; opacity: 0.85; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 0 12px;
}
.section-title h2 { margin: 0; }
.badge {
  background: var(--olive);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: middle;
}

/* --- Untere Tab-Navigation ---------------------------------------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(255, 253, 244, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(87, 67, 37, 0.06);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  min-height: var(--tap);
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tabbar a.active { color: var(--brown); }
.tabbar .ti { font-size: 1.3rem; line-height: 1; opacity: 0.9; }

/* --- FAB (Schnell-Hinzufügen) ------------------------------------- */
.fab {
  position: fixed;
  right: 20px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 31;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--bg);
  border: 0;
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(61, 45, 24, 0.32);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.2s ease;
}
.fab:hover  { background: var(--brown-hover); }
.fab:active { transform: scale(0.94); }

/* --- Diverses ------------------------------------------------------ */
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.stack > * + * { margin-top: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
