/* =========================================================
   GhostFlow Design System
   ========================================================= */

/* ── Marken-Ramp ─────────────────────────────────────────────
   Kanonisch aus dem Markenhandbuch v1.1, identisch zur Landing
   (landing/assets/css/landing.css). Benannte Brand-Farben sind
   verbindlich und dürfen nicht frei angepasst werden.
   Das Magenta #e879f9 existiert in der Palette nicht und ist am
   2026-07-22 auch aus dem Dashboard entfernt worden. */
:root {
  --violet-050: #f0e6ff;
  --violet-100: #ede9fe;   /* Halo         (Brand) */
  --violet-300: #c4b5fd;   /* Mist         (Brand) */
  --violet-500: #a78bfa;   /* Ghost Violet (Brand) */
  --violet-700: #7c5cd6;   /* Deep Violet  (Brand) */
  --violet-900: #4a3690;   /* abgeleitet, verankert die Ramp unten */

  --ink:      #09090f;     /* Ink Black     (Brand) */
  --night:    #13121f;     /* Deep Night    (Brand) */
  --surface:  #1a1a2e;     /* Surface Night (Brand) */
  --paper:    #f5f4f9;     /* Paper         (Brand) */

  /* Radien: vier Stufen, wie auf der Landing */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-full: 999px;
  --radius:      var(--radius-md);

  /* Spacing-Scale, 4px-Basis */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;   --space-6: 2rem;
  --space-7: 2.5rem;   --space-8: 3rem;     --space-9: 4rem;
  --space-10: 5rem;    --space-12: 6rem;
}

/* ── Theme-Variablen ─────────────────────────────────────── */
/* Dark is the absolute default — works even without JS or before JS runs */
:root,
.dark {
  --gf-bg:             var(--surface);
  --gf-bg-card:        rgba(36, 36, 62, 0.85);
  --gf-bg-card-hover:  rgba(46, 46, 76, 0.96);
  /* Kanten aus Mist statt Ghost Violet — heller, feiner (Landing-Entscheid 21.07.) */
  --gf-border:         rgba(196, 181, 253, 0.16);
  --gf-border-hover:   rgba(196, 181, 253, 0.38);
  --gf-text:           var(--violet-100);
  --gf-text-2:         var(--violet-300);
  --gf-text-muted:     rgba(237, 233, 254, 0.72);
  --gf-text-faint:     rgba(237, 233, 254, 0.58);
  --gf-sidebar-bg:     rgba(19, 18, 31, 0.92);
  --gf-nav-hover:      rgba(196, 181, 253, 0.08);
  --gf-nav-active:     rgba(196, 181, 253, 0.15);
  --gf-nav-active-txt: var(--violet-300);
  --gf-glow-1:         rgba(167, 139, 250, 0.10);
  --gf-glow-2:         rgba(124, 92, 214, 0.08);
  --gf-grid:           rgba(167, 139, 250, 0.025);
  --gf-scrollbar:      rgba(196, 181, 253, 0.18);
  --gf-input-bg:       rgba(9, 9, 15, 0.6);
  --gf-input-border:   rgba(196, 181, 253, 0.18);
  --gf-tag-open:       rgba(245, 158, 11, 0.14);
  --gf-tag-open-txt:   #fcd34d;
  --gf-tag-done:       rgba(16, 185, 129, 0.14);
  --gf-tag-done-txt:   #6ee7b7;
  --gf-tag-called:     rgba(167, 139, 250, 0.16);
  --gf-tag-called-txt: var(--violet-300);
}

/* Light mode — only when explicitly opted in */
html:not(.dark) {
  --gf-bg:             #e6e1f2;
  --gf-bg-card:        rgba(255, 255, 255, 0.95);
  --gf-bg-card-hover:  rgba(255, 255, 255, 1.0);
  /* Kanten und Akzente auf Deep Violet (#7c5cd6) statt Tailwind-Violett — das
     alte #8b5cf6 stand nicht in der Palette. */
  --gf-border:         rgba(124, 92, 214, 0.22);
  --gf-border-hover:   rgba(124, 92, 214, 0.40);
  --gf-text:           var(--surface);
  --gf-text-2:         var(--violet-900);
  --gf-text-muted:     var(--surface);
  --gf-text-faint:     var(--surface);
  --gf-sidebar-bg:     rgba(255, 255, 255, 0.85);
  --gf-nav-hover:      rgba(124, 92, 214, 0.12);
  --gf-nav-active:     rgba(124, 92, 214, 0.22);
  --gf-nav-active-txt: var(--violet-900);
  --gf-glow-1:         rgba(167, 139, 250, 0.12);
  --gf-glow-2:         rgba(124, 92, 214, 0.09);
  --gf-grid:           rgba(124, 92, 214, 0.05);
  --gf-scrollbar:      rgba(124, 92, 214, 0.28);
  --gf-input-bg:       rgba(255,255,255,0.95);
  --gf-input-border:   rgba(124, 92, 214, 0.28);
  --gf-tag-open:       rgba(245, 158, 11, 0.12);
  --gf-tag-open-txt:   #92400e;
  --gf-tag-done:       rgba(16, 185, 129, 0.12);
  --gf-tag-done-txt:   #065f46;
  --gf-tag-called:     rgba(124, 92, 214, 0.14);
  --gf-tag-called-txt: var(--violet-900);
}

/* ── Light-Mode Icon-Overrides ────────────────────────────
   Tailwind-300/400-Akzentfarben sind auf hellem Background zu hell.
   Auf dunklere Varianten ziehen, ohne die Dark-Mode-Werte zu touchen. */
html:not(.dark) .text-amber-300,    html:not(.dark) .text-amber-400    { color: #92400e !important; }
html:not(.dark) .text-emerald-300,  html:not(.dark) .text-emerald-400  { color: #047857 !important; }
html:not(.dark) .text-accent-300,   html:not(.dark) .text-accent-400,
html:not(.dark) .text-accent-400\/70                                    { color: #5b21b6 !important; }
html:not(.dark) .text-accent-400\/50                                    { color: #1a1a2e !important; }
html:not(.dark) .text-white\/20,    html:not(.dark) .text-white\/30,
html:not(.dark) .text-white\/40,    html:not(.dark) .text-white\/50    { color: #4a4a66 !important; }
html:not(.dark) .text-sky-300,      html:not(.dark) .text-sky-400      { color: #0369a1 !important; }
html:not(.dark) .text-yellow-300,   html:not(.dark) .text-yellow-400   { color: #a16207 !important; }
html:not(.dark) .text-red-400                                           { color: #b91c1c !important; }
html:not(.dark) .text-zinc-400,     html:not(.dark) .text-zinc-500,
html:not(.dark) .text-zinc-600,     html:not(.dark) .text-white\/85    { color: #1a1a2e !important; }

/* Aktivitäten-Trennlinien im Light-Mode sichtbar machen
   (Tailwind divide-white/[0.05] ist auf hellem Background unsichtbar). */
html:not(.dark) .divide-white\/\[0\.05\] > :not([hidden]) ~ :not([hidden]) {
  border-top-color: rgba(124, 92, 214, 0.18) !important;
}

/* ── Schriftgrößen — leicht hoch für bessere Lesbarkeit ── */
.text-xs   { font-size: 0.8125rem !important; }   /* 12 → 13px */
.text-sm   { font-size: 0.9375rem !important; }   /* 14 → 15px */
.text-\[0\.6rem\],
.text-\[0\.62rem\],
.text-\[0\.65rem\] { font-size: 0.72rem !important; }  /* 9.6/9.9/10.4 → ~11.5px */

/* ── Nachrichten: Auswahl-Highlight ───────────────────────── */
.gf-conv-row             { background: transparent; }
.gf-conv-row:hover       { background: var(--gf-nav-hover); }
.gf-conv-row.is-selected,
.gf-conv-row.is-selected:hover {
  background: var(--gf-nav-active);
  border-left: 3px solid var(--gf-nav-active-txt);
  padding-left: calc(1.25rem - 3px);
}

/* ── Aktivitäten: Hover-Hervorhebung für klickbare Zeilen ── */
.gf-activity-row         { background: transparent; }
.gf-activity-row:hover   { background: var(--gf-nav-hover); }

/* ── Aktivitäten: Beschreibung weicher + Meta optisch absetzen ──
   Vorher war beides font-mono in (im Light-Mode) identischem Schwarz —
   keine visuelle Hierarchie. Jetzt: Beschreibung in DM Sans,
   Timestamp/Meta bleibt DM Mono mit eigener Farbe. */
.gf-activity-msg {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.gf-activity-meta {
  font-family: 'DM Mono', ui-monospace, monospace;
}
html:not(.dark) .gf-activity-msg  { color: #1a1a2e !important; }
html:not(.dark) .gf-activity-meta { color: #6b5b9a !important; }   /* gedämpftes Violett — klar vom Lesetext getrennt */
html.dark        .gf-activity-msg  { color: rgba(255,255,255,0.88); }
/* Mist bei 0.70 statt Ghost Violet bei 0.55: der alte Wert lag mit 2.70:1 klar
   unter WCAG AA und war auf der Kartenfläche kaum lesbar. Jetzt 4.84:1 — bleibt
   optisch zurückgenommen, ist aber lesbar. Nachgerechnet am 2026-07-22. */
html.dark        .gf-activity-meta { color: rgba(196,181,253,0.70); }

/* ── Nachrichten-Sprechblasen: WhatsApp-Stil mit dunkel/hell Lila ──
   Outgoing = sattes Lila (rechts), Incoming = helles Lila (links).
   Beide Modes deutlich getrennt, sodass auch im Dark Mode klar ist
   wer was geschrieben hat — nicht beides "irgendwie violett-grau". */
.gf-bubble-out, .gf-bubble-in {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 500;
}
html:not(.dark) .gf-bubble-out {
  background: #7c3aed;
  color: #ffffff;
}
html:not(.dark) .gf-bubble-in {
  background: #ede9fe;
  color: #1a1a2e;
}
html.dark .gf-bubble-out {
  background: #6d28d9;
  color: #ffffff;
}
html.dark .gf-bubble-in {
  background: rgba(167,139,250,0.20);
  color: rgba(255,255,255,0.92);
}

/* ── Utilities ───────────────────────────────────────────── */
.gf-bg   { background-color: var(--gf-bg); }
.gf-card {
  background: var(--gf-bg-card);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.gf-card:hover { border-color: var(--gf-border-hover); }
.gf-text       { color: var(--gf-text); }
.gf-text-2     { color: var(--gf-text-2); }
.gf-text-muted { color: var(--gf-text-muted); }
.gf-text-faint { color: var(--gf-text-faint); }

.gf-input {
  background: var(--gf-input-bg);
  border: 1px solid var(--gf-input-border);
  color: var(--gf-text);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-family: 'DM Mono', monospace;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.gf-input:focus { border-color: #a78bfa; }

/* ── Sidebar ─────────────────────────────────────────────── */
.gf-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: 232px;
  background: var(--gf-sidebar-bg);
  border-right: 1px solid var(--gf-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.25s ease;
}

.gf-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 39;
}

.gf-main {
  margin-left: 232px;
  min-height: 100dvh;
}

@media (max-width: 768px) {
  .gf-sidebar { transform: translateX(-100%); }
  .gf-sidebar.open { transform: translateX(0); }
  .gf-sidebar-overlay.open { display: block; }
  .gf-main { margin-left: 0; }
}

/* Nav items */
.gf-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: 'DM Mono', monospace;
  color: var(--gf-text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin: 0 0.5rem;
}
.gf-nav-item:hover {
  background: var(--gf-nav-hover);
  color: var(--gf-text);
}
.gf-nav-item.active {
  background: var(--gf-nav-active);
  color: var(--gf-nav-active-txt);
}
.gf-nav-item svg { flex-shrink: 0; }

/* ── Status Tags ─────────────────────────────────────────── */
.gf-tag-open    { background: var(--gf-tag-open);   color: var(--gf-tag-open-txt);   }
.gf-tag-called  { background: var(--gf-tag-called); color: var(--gf-tag-called-txt); }
.gf-tag-done    { background: var(--gf-tag-done);   color: var(--gf-tag-done-txt);   }
.gf-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.6rem;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Calendar ────────────────────────────────────────────── */
.gf-cal-day {
  height: 200px;
  overflow: hidden;
  border: 1px solid var(--gf-border);
  border-radius: 8px;
  padding: 14px 14px;
  background: var(--gf-bg-card);
  transition: border-color 0.15s;
}
.gf-cal-day:hover { border-color: var(--gf-border-hover); }
.gf-cal-day.today {
  border-color: #a78bfa;
  background: var(--gf-nav-active);
}
.gf-cal-day.empty {
  background: transparent;
  border-color: transparent;
}
.gf-cal-day-num {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.gf-cal-event {
  font-size: 0.82rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 5px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  display: block;
  line-height: 1.3;
}

/* ── Calendar view tabs (Tag / Woche / Monat) ─────────────── */
.gf-cal-tabs {
  display: inline-flex;
  background: var(--gf-nav-hover);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.gf-cal-tab {
  padding: 7px 16px;
  border-radius: 7px;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gf-text-faint);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.gf-cal-tab:hover { color: var(--gf-text); }
.gf-cal-tab.active {
  background: var(--gf-nav-active);
  color: var(--gf-nav-active-txt);
  font-weight: 600;
}

/* ── Week view: 7 vertical day columns with full event list ── */
.gf-cal-week-col {
  min-height: 380px;
  border: 1px solid var(--gf-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--gf-bg-card);
}
.gf-cal-week-col.today {
  border-color: #a78bfa;
  background: var(--gf-nav-active);
}
.gf-cal-week-col-header {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gf-text-faint);
  margin-bottom: 6px;
}
.gf-cal-week-col-date {
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gf-text-muted);
}
.gf-cal-week-col.today .gf-cal-week-col-date { color: #a78bfa; }
.gf-cal-week-event {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 6px;
  margin-top: 5px;
  color: white;
  line-height: 1.35;
  word-break: break-word;
}
.gf-cal-week-event-time {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 1px;
}

/* ── Day view: vertical agenda list ──────────────────────── */
.gf-cal-day-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gf-border);
}
.gf-cal-day-row:last-child { border-bottom: none; }
.gf-cal-day-row:hover { background: var(--gf-nav-hover); }
.gf-cal-day-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gf-text);
  flex-shrink: 0;
  width: 110px;
  line-height: 1.4;
}
.gf-cal-day-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}
.gf-cal-day-content { flex: 1; min-width: 0; }
.gf-cal-day-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gf-text);
  margin-bottom: 2px;
}
.gf-cal-day-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--gf-text-faint);
}


/* ── Cursor-Glow: leuchtender Ball, der dem normalen Mauszeiger folgt.
   Ersetzt den Zeiger NICHT (kein cursor:none) — der Systemcursor bleibt. */
#gf-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow:
    0 0 4px 1px rgba(167,139,250,0.9),
    0 0 8px 2px rgba(167,139,250,0.45),
    0 0 14px 4px rgba(167,139,250,0.18);
  pointer-events: none;
  z-index: 9997;
  will-change: transform;
  transform: translate3d(-100px, -100px, 0);
  opacity: 0;
  transition: opacity 180ms ease;
  /* KEIN transition auf transform — sonst Lag. */
  mix-blend-mode: screen;
}
/* Hellmodus: weisser Kern + screen-Blending waere auf hellem Grund unsichtbar.
   Stattdessen Deep Violet (#4a3690, Violett-900 der Marken-Ramp) und multiply,
   das auf hellem Untergrund abdunkelt statt aufzuhellen. */
html:not(.dark) #gf-cursor-glow {
  background: #4a3690;
  box-shadow:
    0 0 4px 1px rgba(74,54,144,0.55),
    0 0 8px 2px rgba(74,54,144,0.30),
    0 0 14px 4px rgba(74,54,144,0.12);
  mix-blend-mode: multiply;
}

#gf-cursor-glow.visible { opacity: 1; }
@media (pointer: coarse) { #gf-cursor-glow { display: none; } }

/* ── Logout Warning Modal ────────────────────────────────── */
#gf-logout-warning {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
#gf-logout-warning.visible { display: flex; }
#gf-logout-warning .gf-modal {
  background: var(--gf-bg-card);
  border: 1px solid var(--gf-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(24px);
}

/* ── Demo-Intro Modal ────────────────────────────────────── */
#gf-demo-intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#gf-demo-intro.visible { display: flex; }
#gf-demo-intro .gf-modal {
  background: var(--gf-bg-card);
  border: 1px solid var(--gf-border);
  border-radius: 16px;
  padding: 1.75rem;
  max-width: 460px;
  width: 100%;
  text-align: left;
  backdrop-filter: blur(24px);
}
#gf-demo-intro h2 {
  font-size: 1.1rem;
  color: var(--gf-text);
  margin-bottom: 0.75rem;
}
#gf-demo-intro p {
  font-size: 0.875rem;
  color: var(--gf-text-muted);
  line-height: 1.55;
  margin-bottom: 0.9rem;
}
#gf-demo-intro .gf-demo-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 0.9rem;
}

/* ── Body / Global ───────────────────────────────────────── */
body {
  background-color: var(--gf-bg) !important;
  color: var(--gf-text);
}

html { scroll-behavior: smooth; }
/* Fließtext DM Sans: Geschwisterschrift zu DM Mono, aufeinander abgestimmt.
   Fraunces (Handbuch-Fließtext) wurde am 2026-07-22 getestet und verworfen —
   eine Serifenschrift trägt in dichten Datenzeilen nicht. Sie bleibt auf der
   Landing, wo es um Lesetext geht, nicht um eine Arbeitsoberfläche. */
body { font-family: 'DM Sans', system-ui, sans-serif; }
.font-display, h1, h2, h3 { font-family: 'Unbounded', system-ui, sans-serif !important; }
.font-sans { font-family: 'DM Sans', system-ui, sans-serif !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gf-scrollbar); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,0.36); }

.htmx-swapping { opacity: 0; transition: opacity 150ms ease; }
.htmx-settling  { opacity: 1; transition: opacity 150ms ease; }

.group:hover .stat-value { text-shadow: 0 0 20px rgba(167,139,250,0.3); }

.chrome-text {
  background: linear-gradient(135deg, #f0e6ff 0%, #c4b5fd 40%, #a78bfa 70%, #ddd6fe 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: chromaShift 6s ease-in-out infinite;
}
@keyframes chromaShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.glass {
  background: var(--gf-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.gf-submit-btn {
  /* Verlauf ins Helle mit dunklem Text (Mist -> Ghost Violet): 10,03:1 und
     6,80:1. Das fruehere Magenta #e879f9 stand nicht in der Palette; weisser
     Text lag auf diesem Verlauf bei 1,85-2,72:1 und war unlesbar. */
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  /* Textfarbe hier statt in den Templates: styles.css laedt nach tw.css, damit
     gewinnt diese Regel gegen ein text-white am Knopf. Neun Verwendungen trugen
     weisse Schrift auf hellem Verlauf (1,85:1) — schon vor dem Farbwechsel. */
  color: #13121f;
  box-shadow: 0 0 24px rgba(167,139,250,0.3);
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
}
.gf-submit-btn:hover { box-shadow: 0 0 42px rgba(167,139,250,0.52); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(167,139,250,0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Legacy dashboard card overrides (Tailwind ink- classes → theme-aware) ── */
[class*="bg-ink-8"],
[class*="bg-ink-9"] {
  background-color: var(--gf-bg-card) !important;
  border-color: var(--gf-border) !important;
}
[class*="bg-ink-7"] {
  background-color: var(--gf-nav-hover) !important;
}
[class*="border-white\/"] {
  border-color: var(--gf-border) !important;
}
[class*="text-white\/8"],
[class*="text-white\/9"] {
  color: var(--gf-text) !important;
}
.text-white {
  color: var(--gf-text) !important;
}
[class*="text-zinc-5"],
[class*="text-zinc-6"] {
  color: var(--gf-text-faint) !important;
}
[class*="text-zinc-4"] {
  color: var(--gf-text-muted) !important;
}

/* ── Mobile Performance ──────────────────────────────────── */
@media (max-width: 1023px) {
  .gf-card,
  .glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .gf-cal-day {
    height: 110px !important;
    padding: 6px 8px !important;
  }
  .gf-cal-day-num { font-size: 0.85rem; margin-bottom: 3px; }
  .gf-cal-event {
    font-size: 0.68rem;
    padding: 2px 5px;
    margin-top: 2px;
  }
}

@media (max-width: 767px) {
  .gf-sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .animate-pulse-slow,
  [class*="animate-pulse"] {
    animation: none !important;
  }
  .gf-nav-item {
    min-height: 48px;
    padding: 0.875rem 1rem;
  }
  .flex.gap-2.mb-6.flex-wrap a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .text-5xl {
    font-size: 2.5rem !important;
  }
  #gf-thread-panel {
    min-height: calc(100dvh - 130px);
  }
  .gf-cal-day {
    height: 85px !important;
    padding: 4px 5px !important;
    font-size: 0.78rem !important;
  }
  .gf-cal-day-num { font-size: 0.8rem; margin-bottom: 2px; }
}


/* Toggle-Track Lila im AN-Zustand. Vanilla-CSS statt Tailwind-arbitrary
   value, damit das auch ohne JIT vom CDN-Tailwind garantiert greift. */
.gf-toggle-track {
  background: var(--gf-border);
  transition: background-color 0.2s ease;
}
.peer:checked ~ .gf-toggle-track,
input:checked + .gf-toggle-track {
  background: #a78bfa !important;
}
