/* ============================================
   MigraLog – Dark Violet Theme
   Komplett eigenes Design
   ============================================ */

:root {
  --bg:           #0d0d1a;
  --bg-2:         #141428;
  --bg-card:      #1c1c38;
  --bg-card-2:    #252548;
  --purple:       #8b5cf6;
  --purple-dark:  #7c3aed;
  --purple-light: #a78bfa;
  --pink:         #ec4899;
  --grad:         linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --grad-soft:    linear-gradient(135deg, rgba(124,58,237,.15), rgba(219,39,119,.1));
  --text:         #f1f5f9;
  --text-muted:   #8892a4;
  --border:       rgba(139,92,246,.18);
  --border-solid: #2a2a50;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    22px;
  --shadow:       0 4px 20px rgba(0,0,0,.4);
  --shadow-glow:  0 4px 20px rgba(124,58,237,.35);

  /* Severity Farben */
  --c-none-bg:     rgba(99,102,241,.2);  --c-none-text:    #a5b4fc;
  --c-leicht-bg:   rgba(16,185,129,.2);  --c-leicht-text:  #6ee7b7;
  --c-maessig-bg:  rgba(245,158,11,.2);  --c-maessig-text: #fcd34d;
  --c-stark-bg:    rgba(239,68,68,.2);   --c-stark-text:   #fca5a5;
  --c-migraene-bg: rgba(236,72,153,.25); --c-migraene-text:#f9a8d4;
  --c-empty-bg:    rgba(255,255,255,.04);--c-empty-text:   #475569;
}

/* ============ THEMES ============ */
body[data-theme="blue"] {
  --purple:       #3b82f6;
  --purple-dark:  #2563eb;
  --purple-light: #60a5fa;
  --pink:         #0ea5e9;
  --grad:         linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --grad-soft:    linear-gradient(135deg, rgba(37,99,235,.15), rgba(14,165,233,.1));
  --border:       rgba(59,130,246,.18);
  --shadow-glow:  0 4px 20px rgba(37,99,235,.35);
}
body[data-theme="green"] {
  --purple:       #10b981;
  --purple-dark:  #059669;
  --purple-light: #34d399;
  --pink:         #0d9488;
  --grad:         linear-gradient(135deg, #059669 0%, #0d9488 100%);
  --grad-soft:    linear-gradient(135deg, rgba(5,150,105,.15), rgba(13,148,136,.1));
  --border:       rgba(16,185,129,.18);
  --shadow-glow:  0 4px 20px rgba(5,150,105,.35);
}
body[data-theme="orange"] {
  --purple:       #f97316;
  --purple-dark:  #ea580c;
  --purple-light: #fb923c;
  --pink:         #f59e0b;
  --grad:         linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  --grad-soft:    linear-gradient(135deg, rgba(234,88,12,.15), rgba(245,158,11,.1));
  --border:       rgba(249,115,22,.18);
  --shadow-glow:  0 4px 20px rgba(234,88,12,.35);
}
body[data-theme="pink"] {
  --purple:       #ec4899;
  --purple-dark:  #db2777;
  --purple-light: #f472b6;
  --pink:         #a855f7;
  --grad:         linear-gradient(135deg, #db2777 0%, #9333ea 100%);
  --grad-soft:    linear-gradient(135deg, rgba(219,39,119,.15), rgba(147,51,234,.1));
  --border:       rgba(236,72,153,.18);
  --shadow-glow:  0 4px 20px rgba(219,39,119,.35);
}
body[data-theme="slate"] {
  --purple:       #64748b;
  --purple-dark:  #475569;
  --purple-light: #94a3b8;
  --pink:         #64748b;
  --grad:         linear-gradient(135deg, #475569 0%, #64748b 100%);
  --grad-soft:    linear-gradient(135deg, rgba(71,85,105,.15), rgba(100,116,139,.1));
  --border:       rgba(100,116,139,.18);
  --shadow-glow:  0 4px 20px rgba(71,85,105,.35);
}

/* ============ THEME MODAL ============ */
.theme-modal .modal-content {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-solid) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem;
  color: var(--text);
}
.theme-modal-title {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.theme-swatches {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.theme-swatch {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  position: relative;
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active {
  border-color: var(--text);
  transform: scale(1.08);
}
.theme-swatch::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #fff;
  opacity: 0;
  transition: opacity .15s;
}
.theme-swatch.active::after { opacity: 1; }
.theme-modal-divider {
  border-color: var(--border-solid);
  margin: 1rem 0;
}
.theme-settings-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  padding: .6rem .8rem;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.theme-settings-link:hover {
  background: var(--bg-card-2);
  color: var(--text);
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  padding-bottom: 82px;
  -webkit-font-smoothing: antialiased;
}

/* ============ TOP BAR ============ */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.1rem;
  background: rgba(13,13,26,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -.02em;
}
.topbar-brand i {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.15rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.topbar-user {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-solid);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.topbar-logout:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.1);
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(20,20,40,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 200;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: .3rem .5rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
  min-width: 52px;
}
.bnav-item i { font-size: 1.3rem; line-height: 1; }
.bnav-item.active { color: var(--purple-light); }
.bnav-item:not(.bnav-add):hover { color: var(--purple-light); }

.bnav-add {
  margin-top: -18px;
  padding: 0;
  min-width: auto;
}
.bnav-add-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  font-size: 1.6rem;
  color: #fff;
  border: 3px solid var(--bg);
  transition: transform .2s, box-shadow .2s;
}
.bnav-add:hover .bnav-add-btn {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(124,58,237,.5);
}

/* ============ AUTH ============ */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--bg);
  padding-bottom: 1.5rem; /* override body padding on auth pages */
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============ SEITEN-WRAPPER ============ */
.page-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
}

/* ============ DASHBOARD ============ */
.page-greeting {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.stat-tile {
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}
.stat-tile::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .15;
}

.stat-tile-blue   { background: linear-gradient(135deg,#1e1b4b,#2e1065); border-color: rgba(139,92,246,.3); }
.stat-tile-blue::before { background: #8b5cf6; }
.stat-tile-green  { background: linear-gradient(135deg,#064e3b,#065f46); border-color: rgba(16,185,129,.3); }
.stat-tile-green::before { background: #10b981; }
.stat-tile-yellow { background: linear-gradient(135deg,#451a03,#78350f); border-color: rgba(245,158,11,.3); }
.stat-tile-yellow::before { background: #f59e0b; }
.stat-tile-red    { background: linear-gradient(135deg,#450a0a,#7f1d1d); border-color: rgba(239,68,68,.3); }
.stat-tile-red::before { background: #ef4444; }
.stat-tile-pink   { background: linear-gradient(135deg,#500724,#831843); border-color: rgba(236,72,153,.3); }
.stat-tile-pink::before { background: #ec4899; }
.stat-tile-med    { background: linear-gradient(135deg,#1e1b4b,#312e81); border-color: rgba(99,102,241,.3); }
.stat-tile-med::before { background: #6366f1; }

.stat-tile-icon { font-size: 1.5rem; }
.stat-tile-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
}
.stat-tile-label {
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quick-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: 1rem;
  background: var(--grad);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: var(--shadow-glow);
  transition: transform .2s, box-shadow .2s;
}
.quick-entry-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.5);
}

/* ============ CALENDAR ============ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-header {
  text-align: center;
  font-size: .65rem;
  color: var(--text-muted);
  padding: 4px 0;
  font-weight: 700;
  letter-spacing: .05em;
}

.cal-day-wrapper { position: relative; }

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  aspect-ratio: 1;
  text-decoration: none;
  font-weight: 700;
  font-size: .8rem;
  position: relative;
  transition: transform .12s;
  min-height: 36px;
}
.cal-day:hover { transform: scale(1.1); }

.day-empty   { background: var(--c-empty-bg);    color: var(--c-empty-text);   }
.day-none    { background: var(--c-none-bg);     color: var(--c-none-text);    }
.day-leicht  { background: var(--c-leicht-bg);   color: var(--c-leicht-text);  }
.day-maessig { background: var(--c-maessig-bg);  color: var(--c-maessig-text); }
.day-stark   { background: var(--c-stark-bg);    color: var(--c-stark-text);   }
.day-migraene{ background: var(--c-migraene-bg); color: var(--c-migraene-text);}

.cal-today { box-shadow: 0 0 0 2px var(--purple-light); }
.cal-migraene-border { box-shadow: 0 0 0 2px var(--pink); }
.cal-today.cal-migraene-border { box-shadow: 0 0 0 2px var(--pink), 0 0 0 4px rgba(236,72,153,.2); }

.day-num { font-size: .8rem; font-weight: 800; }

.day-med-icon {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  width: 14px; height: 14px;
  font-size: .55rem;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg);
}

.day-note-icon {
  position: absolute;
  bottom: -2px; right: 0;
  font-size: .55rem;
  color: var(--purple-light);
}

/* ============ ENTRY FORM (Kacheln) ============ */
.entry-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: .75rem;
  border: 1px solid var(--border-solid);
  transition: border-color .2s;
}
.entry-section:focus-within {
  border-color: rgba(139,92,246,.5);
}

.entry-section-title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

/* Kachel-Grid für Anfälle und Optionen */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.tile-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.tile-label {
  display: block;
  cursor: pointer;
}
.tile-label input[type="radio"],
.tile-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  pointer-events: none;
}

.tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .85rem .4rem;
  background: var(--bg-2);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--radius-sm);
  transition: all .15s;
  min-height: 64px;
  text-align: center;
}
.tile-body-num {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.tile-body-sub {
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tile-label input:checked ~ .tile-body {
  background: var(--grad);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.tile-label input:checked ~ .tile-body .tile-body-num,
.tile-label input:checked ~ .tile-body .tile-body-sub { color: #fff; }

.tile-label:hover .tile-body {
  border-color: var(--purple);
  background: rgba(139,92,246,.12);
}

/* Severity-Kacheln (größer, mit Icon) */
.sev-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sev-label {
  display: block;
  cursor: pointer;
}
.sev-label input[type="radio"] { display: none; }

.sev-body {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  background: var(--bg-2);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--radius-sm);
  transition: all .18s;
}
.sev-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sev-icon-leicht  { background: var(--c-leicht-bg);  color: var(--c-leicht-text);  }
.sev-icon-maessig { background: var(--c-maessig-bg); color: var(--c-maessig-text); }
.sev-icon-stark   { background: var(--c-stark-bg);   color: var(--c-stark-text);   }

.sev-text-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}
.sev-text-sub {
  font-size: .75rem;
  color: var(--text-muted);
}

.sev-label input:checked ~ .sev-body {
  border-color: var(--purple);
  background: rgba(139,92,246,.12);
  box-shadow: 0 0 0 1px rgba(139,92,246,.4);
}
.sev-label input:checked ~ .sev-body .sev-text-title { color: var(--purple-light); }
.sev-label:hover .sev-body { border-color: rgba(139,92,246,.5); }

/* Ja/Nein Toggles */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.toggle-label {
  display: block;
  cursor: pointer;
}
.toggle-label input[type="radio"] { display: none; }
.toggle-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .8rem;
  background: var(--bg-2);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-muted);
  transition: all .15s;
}
.toggle-label input:checked ~ .toggle-body {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.toggle-label:hover .toggle-body {
  border-color: var(--purple);
  color: var(--text);
}

/* Slider */
.slider-wrap {
  padding: .5rem 0;
}
.slider-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--purple-light);
  text-align: center;
  margin-bottom: .5rem;
}
.slider-ends {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .25rem;
}
.form-range { accent-color: var(--purple); }

/* Summary-Karte (bei bestehendem Eintrag) */
.summary-card {
  background: var(--grad-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(139,92,246,.25);
  overflow: hidden;
  margin-bottom: .75rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .85rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row span:first-child { color: var(--text-muted); }
.summary-row span:last-child { color: var(--text); font-weight: 600; }

/* Notiz-Textarea */
.note-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem;
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color .15s;
}
.note-textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,.2);
}
.note-textarea::placeholder { color: var(--text-muted); }
.note-count {
  text-align: right;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* Medikament-Details */
.med-detail {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-solid);
}

/* ============ FORM CONTROLS ============ */
.form-label { font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: .4rem; }

.form-control, .form-select {
  background: var(--bg-2);
  border-color: var(--border-solid);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-2);
  border-color: var(--purple);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(139,92,246,.2);
}
.form-control::placeholder { color: var(--text-muted); }

/* ============ BUTTONS ============ */
.btn-primary {
  background: var(--grad);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-glow);
  transition: all .2s;
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #6d28d9, #be185d);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,.5);
}

.btn-outline-danger {
  border-radius: var(--radius-sm);
  font-weight: 600;
  border-color: rgba(239,68,68,.5);
  color: #fca5a5;
}
.btn-outline-danger:hover {
  background: rgba(239,68,68,.15);
  border-color: #ef4444;
  color: #fca5a5;
}

/* ============ ALERTS ============ */
.alert-danger {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.35);
  color: #fca5a5;
  border-radius: var(--radius-sm);
}
.alert-success {
  background: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.35);
  color: #6ee7b7;
  border-radius: var(--radius-sm);
}
.btn-close { filter: invert(1) brightness(.8); }

/* ============ MISC ============ */
.text-primary { color: var(--purple-light) !important; }
.text-secondary { color: var(--text-muted) !important; }

.tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
}
.tab-btn {
  display: block;
  padding: .7rem;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .05em;
  transition: all .15s;
}
.tab-btn.active { background: var(--grad); color: #fff; }
.tab-btn:hover:not(.active) { color: var(--purple-light); background: rgba(139,92,246,.1); }

hr { border-color: var(--border-solid); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-solid); border-radius: 4px; }

/* ============ MOBILE ============ */
@media (max-width: 400px) {
  .cal-day { min-height: 30px; font-size: .72rem; border-radius: 7px; }
  .calendar-grid { gap: 3px; }
  .entry-section { padding: .9rem; }
  .tile-body { padding: .7rem .3rem; min-height: 56px; }
}

/* Auth Seiten kein Bottom Padding */
.auth-container { padding-bottom: 1.5rem; }
body:has(.auth-container) { padding-bottom: 0; }

/* ============ OFFLINE-BANNER ============ */
.offline-banner {
  position: fixed;
  bottom: 64px; /* über der Bottom-Nav */
  left: 0;
  right: 0;
  background: #1a1a30;
  border-top: 1px solid rgba(139,92,246,.35);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 950;
  font-size: .82rem;
  color: var(--text-muted);
  gap: 8px;
}
.offline-banner-text { flex: 1; }
.offline-sync-btn {
  background: var(--grad);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.offline-sync-btn:active { opacity: .8; }

/* ============ ARZT-VIEW ============ */
.doctor-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-solid);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doctor-topbar-brand {
  font-size: 1rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.doctor-readonly-badge {
  font-size: .72rem;
  font-weight: 700;
  background: rgba(71,85,105,.25);
  color: #94a3b8;
  border: 1px solid rgba(71,85,105,.4);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.doctor-patient-name {
  font-size: .88rem;
  color: var(--text-muted);
  text-align: right;
}

/* ============ ARZT-ZUGANG VERWALTUNG ============ */
.access-token-card {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.access-token-card.is-revoked {
  opacity: .55;
}
.access-token-url {
  font-size: .75rem;
  word-break: break-all;
  color: var(--purple-light);
  background: rgba(139,92,246,.08);
  border-radius: 6px;
  padding: 6px 10px;
  margin: .5rem 0;
  font-family: monospace;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border-solid);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .75rem;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover { border-color: var(--purple-light); color: var(--purple-light); }

/* ============ SVG HEAD ZONE ============ */
.svg-loc-zone {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.18s, stroke 0.18s;
}
.svg-loc-zone:hover { fill: rgba(109,40,217,0.22); }
