/* =====================================================================
   Caniluma Terminbuchung – Design (ohne Tailwind, reines CSS)
   Palette & Schriften 1:1 aus der Original-App.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --brand-50:  #fdf8f6;
  --brand-100: #f2e8e5;
  --brand-200: #eaddd7;
  --brand-300: #e0cec7;
  --brand-400: #d2bab0;
  --brand-500: #a3877a;
  --brand-600: #866a5d;
  --brand-700: #695044;
  --brand-800: #4a362d;
  --brand-900: #2c1d17;
  --accent-500: #5A5A40;
  --accent-600: #4a4a34;

  --green-bg: #ecfdf5; --green-bd: #a7f3d0; --green-tx: #047857;
  --red-bg: #fef2f2;  --red-bd: #fecaca;   --red-tx: #dc2626;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", ui-serif, Georgia, serif;
  --shadow: 0 6px 18px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--brand-50);
  color: var(--brand-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-serif); margin: 0; }

a { color: var(--accent-600); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand-200); border-radius: 10px; }

/* ---- Layout ---- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 40px 20px 80px; }

/* ---- Header / Hero ---- */
.hero { text-align: center; margin-bottom: 40px; }
.hero img.logo { height: 120px; margin: 0 auto 28px; display: block; object-fit: contain; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 600; color: var(--brand-900); margin-bottom: 20px; }
.hero p.lead { font-size: 18px; color: var(--brand-700); max-width: 640px; margin: 0 auto 28px; }

/* ---- Toggle pills ---- */
.pills { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pill {
  border: none; cursor: pointer; padding: 9px 24px; border-radius: 999px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  background: #fff; color: var(--brand-700); border: 1px solid var(--brand-200);
  transition: all .15s ease;
}
.pill:hover { background: var(--brand-50); }
.pill.active { background: var(--brand-900); color: #fff; border-color: var(--brand-900); }

/* ---- Cards ---- */
.card {
  background: #fff; border: 1px solid var(--brand-100);
  border-radius: 24px; box-shadow: var(--shadow); padding: 32px;
}
.card.pad-sm { padding: 24px; }

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
@media (max-width: 820px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Section titles ---- */
.section-title { font-size: 24px; font-weight: 500; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.section-title .ic { color: var(--accent-500); }

/* ---- Slot list ---- */
.slot-list { display: flex; flex-direction: column; gap: 16px; max-height: 560px; overflow-y: auto; padding-right: 6px; }
.slot {
  width: 100%; text-align: left; cursor: pointer; position: relative;
  background: #fff; border: 1px solid var(--brand-200); border-radius: 18px;
  padding: 22px; transition: all .2s ease; font-family: inherit; color: inherit;
}
.slot:hover:not(.booked) { border-color: var(--accent-500); box-shadow: var(--shadow); }
.slot.selected { border-color: var(--accent-500); background: var(--brand-100); box-shadow: var(--shadow); }
.slot.booked { opacity: .5; background: rgba(253,248,246,.5); border-color: var(--brand-200); cursor: not-allowed; }
.slot .slot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.slot .slot-date { font-weight: 500; font-size: 18px; }
.slot.booked .slot-date, .slot.booked .slot-time { text-decoration: line-through; color: var(--brand-500); }
.slot .slot-time { display: flex; align-items: center; gap: 8px; color: var(--brand-600); margin-top: 10px; }

.badge { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 8px; width: fit-content; display: inline-block; }
.badge.einzel { background: var(--brand-200); color: var(--brand-800); }
.badge.gruppe { background: rgba(90,90,64,.10); color: var(--accent-600); }
.badge.line { text-decoration: line-through; opacity: .7; }

.tag { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag.muted { background: var(--brand-200); color: var(--brand-700); }
.tag.free  { background: var(--brand-100); color: var(--brand-800); border: 1px solid var(--brand-200); }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--brand-700); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--brand-200);
  background: var(--brand-50); font-family: inherit; font-size: 15px; color: var(--brand-900);
  outline: none; transition: box-shadow .15s, border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-500); box-shadow: 0 0 0 2px rgba(90,90,64,.25);
}
.field textarea { resize: vertical; min-height: 84px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent-600); }
.check label { font-size: 14px; color: var(--brand-700); margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font-sans); font-weight: 500;
  padding: 13px 22px; border-radius: 12px; font-size: 15px; transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--accent-500); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 24px; font-size: 16px; border-radius: 12px; }
.btn-ghost { background: #fff; border: 1px solid var(--brand-200); color: var(--brand-700); box-shadow: var(--shadow); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-900); }
.btn-pill { border-radius: 999px; }

.linkbtn { background: none; border: none; cursor: pointer; font-family: inherit; color: var(--accent-600); font-weight: 500; font-size: 13px; padding: 0; }
.linkbtn:hover { color: var(--accent-500); }
.linkbtn.grey { color: var(--brand-500); }
.linkbtn.grey:hover { color: var(--brand-700); }

/* ---- Selected slots box ---- */
.sel-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.sel-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px; }
.sel-item .rm { color: var(--brand-500); font-weight: 500; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: none; border: none; cursor: pointer; }
.sel-item .rm:hover { color: var(--red-tx); background: var(--red-bg); }
.dim { opacity: .5; pointer-events: none; }

/* ---- Success / status boxes ---- */
.center { text-align: center; }
.circle-ic { width: 64px; height: 64px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; background: var(--green-bg); color: var(--green-tx); }
.number-box { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 12px; padding: 20px 26px; display: inline-block; margin: 8px 0 26px; }
.number-box .lbl { font-size: 14px; color: var(--brand-600); margin: 0 0 4px; }
.number-box .num { font-family: monospace; font-size: 26px; font-weight: 700; color: var(--brand-900); margin: 0; }
.note-box { padding: 16px; border-radius: 12px; font-size: 14px; }
.note-box.err { background: var(--red-bg); color: var(--red-tx); border: 1px solid var(--red-bd); }
.note-box.ok { background: var(--green-bg); color: var(--green-tx); border: 1px solid var(--green-bd); }
.empty { text-align: center; padding: 40px 16px; color: var(--brand-600); }
.empty .ic { color: var(--brand-300); margin-bottom: 12px; }

/* ---- My bookings / admin list rows ---- */
.book-row { background: #fff; border: 1px solid var(--brand-100); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.book-row .meta-id { font-size: 13px; color: var(--brand-500); background: var(--brand-50); border: 1px solid var(--brand-100); padding: 8px 14px; border-radius: 10px; }

/* ---- Admin header ---- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.admin-head .brand { display: flex; align-items: center; gap: 16px; }
.admin-head .brand img { height: 46px; object-fit: contain; }
.admin-head .brand h1 { font-size: 30px; font-weight: 600; }

.tabs { display: flex; gap: 14px; margin-bottom: 32px; border-bottom: 1px solid var(--brand-200); padding-bottom: 16px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: none; cursor: pointer; font-family: inherit; font-weight: 500; font-size: 15px; background: #fff; color: var(--brand-700); }
.tab:hover { background: var(--brand-100); }
.tab.active { background: var(--accent-500); color: #fff; }

.admin-slot { border: 1px solid var(--brand-100); border-radius: 16px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-list-scroll { max-height: 860px; overflow-y: auto; padding-right: 8px; }
.admin-slot .stat { font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; }
.stat.ok { background: var(--green-bg); color: var(--green-tx); }
.stat.full { background: var(--brand-200); color: var(--brand-700); }

.icon-btn { background: none; border: none; cursor: pointer; color: var(--brand-400); padding: 8px; border-radius: 10px; display: inline-flex; }
.icon-btn:hover { color: var(--red-tx); background: var(--red-bg); }

/* ---- Login ---- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { max-width: 420px; width: 100%; }
.lock-ic { width: 64px; height: 64px; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 20px; }

/* ---- Toast ---- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.12); border: 1px solid; font-weight: 500; animation: toastIn .3s ease; }
.toast.success { background: var(--green-bg); border-color: var(--green-bd); color: var(--green-tx); }
.toast.error { background: var(--red-bg); border-color: var(--red-bd); color: var(--red-tx); }
.toast .x { background: none; border: none; cursor: pointer; color: inherit; opacity: .7; margin-left: 6px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.hidden { display: none !important; }
.spin { display: inline-block; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.muted-text { color: var(--brand-500); font-size: 14px; }
.mt-sm { margin-top: 10px; } .mt-md { margin-top: 20px; } .mb-md { margin-bottom: 20px; }
.day-head { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--accent-600); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 2px; }

/* ---- Splash (Icon fliegt herein, wie in der alten App) ---- */
.splash {
  position: fixed; inset: 0; z-index: 90;
  background: #fdf8f6;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: splashFade 5s ease-in-out forwards;
}
.splash-icon {
  width: 180px; height: 180px; object-fit: contain;
  animation: flyIn 4s ease-in-out forwards;
}
@keyframes flyIn {
  0%   { opacity: 0; transform: translate(-50vw, -50vh) scale(.5) rotate(-360deg); }
  50%  { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  75%  { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(360deg); }
}
@keyframes splashFade {
  0%, 80% { opacity: 1; visibility: visible; }
  100%    { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
}

/* ---- Footer mit dezentem Admin-Link ---- */
.site-footer {
  max-width: 1120px; margin: 0 auto;
  padding: 20px 20px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--brand-500); font-size: 13px;
}
.site-footer p { margin: 0; }
.admin-link { color: var(--brand-400); text-decoration: none; font-size: 12px; transition: color .15s; }
.admin-link:hover { color: var(--accent-500); }
@media (max-width: 480px) { .site-footer { flex-direction: column; gap: 6px; } }
@media (max-width: 820px) { .admin-list-scroll { max-height: 720px; } }

/* ---- PWA-Installations-Hinweis (unten rechts) ---- */
.install-card {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 70;
  background: #fff; border: 1px solid var(--brand-200); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.14); padding: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  animation: toastIn .3s ease;
}
.install-card.install-col { flex-direction: column; align-items: stretch; }
@media (min-width: 640px) { .install-card { left: auto; width: 380px; } }
.install-txt { display: flex; flex-direction: column; }
.install-title { font-weight: 600; color: var(--brand-900); }
.install-sub { font-size: 14px; color: var(--brand-500); }
.install-btn { background: #059669; color: #fff; padding: 10px 16px; border-radius: 10px; white-space: nowrap; }
.install-btn:hover { background: #047857; }
.install-x { background: none; border: none; cursor: pointer; color: var(--brand-400); font-size: 16px; line-height: 1; }
.install-x:hover { color: var(--brand-700); }
.install-ios { font-size: 14px; color: var(--brand-700); background: var(--brand-50); padding: 12px; border-radius: 10px; margin-top: 10px; }
