/* ==========================================================================
   DAYBREAK – Design Tokens (Dark Mode)
   ========================================================================== */
:root {
  --accent-light: #FCB045;
  --accent-dark: #9C2D1A;
  --gradient: linear-gradient(100deg, var(--accent-light) 0%, var(--accent-dark) 100%);

  /* Warme, dunkle Nacht-Palette – die cremefarbenen Posts "brechen" wie
     Tageslicht durch das Dunkel (daher: DAYBREAK). */
  --bg: #15110D;
  --paper: var(--bg);
  --surface: #1E1811;
  --surface-hover: #271F16;
  --border: #3B2E1F;

  --cream: #F5EBD0;
  --cream-border: #C9A96A;   /* dunklere Variante von cream für die Umrandung */
  --cream-deep: #EADFC0;

  /* Text auf dunklem Grund */
  --ink: #F1E6CE;
  --ink-soft: #9C8D74;

  /* Text innerhalb der cremefarbenen Post-Karten bleibt dunkel & lesbar */
  --post-ink: #2B211A;
  --post-ink-soft: #6E6153;

  --danger: #E0603F;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-post: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);

  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent-light); color: var(--post-ink); }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ==========================================================================
   Icons (Lucide, per CSS-mask eingefärbt -> erben currentColor)
   ========================================================================== */
.icon {
  display: inline-block;
  width: var(--icon-size, 20px);
  height: var(--icon-size, 20px);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
}

/* ==========================================================================
   Logo
   ========================================================================== */
.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  white-space: nowrap;
}
.logo--lg { font-size: 2.6rem; }

/* ==========================================================================
   Desktop layout: Sidebar + zentrierte Content-Spalte
   ========================================================================== */
.layout {
  display: flex;
  justify-content: center;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
}

.app-shell {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg);
}

/* Sidebar: standardmäßig verborgen (Mobile), ab 900px sichtbar */
.sidebar {
  display: none;
  width: 270px;
  flex-shrink: 0;
}
.sidebar-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
}
.sidebar-logo { padding: 10px 14px 26px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}
.sidebar-link:hover { background: var(--surface-hover); }
.sidebar-link.active { color: var(--accent-light); }
.sidebar-compose-btn { margin-top: 18px; padding: 13px; font-size: 1rem; }
.sidebar-bottom { margin-top: auto; }

@media (min-width: 900px) {
  .sidebar { display: block; }
  .sidebar-inner { display: flex; }
  .topbar { display: none; }
  .fab-compose { display: none !important; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(21, 17, 13, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--accent-light); }

main { padding-bottom: 90px; }

.empty-state { padding: 60px 24px; text-align: center; color: var(--ink-soft); }
.empty-state .icon { margin: 0 auto 14px; }

/* Floating-Action-Button für "Posten" auf Mobile */
.fab-compose {
  position: fixed;
  bottom: 22px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-pop);
  z-index: 60;
}
.fab-compose:active { transform: scale(0.96); }

/* ==========================================================================
   Buttons & Forms
   ========================================================================== */
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--gradient); color: #1A130C; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hover); }

.btn-block { width: 100%; }

.field { margin-bottom: 18px; text-align: left; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}
.input-wrap:focus-within { border-color: var(--accent-light); }
.input-wrap .icon { color: var(--ink-soft); }

.input-wrap input, .input-wrap textarea {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.98rem;
  background: transparent;
  width: 100%;
  color: var(--ink);
}
.input-wrap input::placeholder, .input-wrap textarea::placeholder { color: var(--ink-soft); }
textarea { resize: none; }

.field-error { color: var(--danger); font-size: 0.8rem; margin-top: 6px; }
.field-hint { color: var(--ink-soft); font-size: 0.8rem; margin-top: 6px; }

.form-error-banner {
  background: rgba(224, 96, 63, 0.14);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ==========================================================================
   Auth screens
   ========================================================================== */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-card .logo--lg { margin-bottom: 6px; }
.auth-tagline { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 34px; }
.auth-footer { margin-top: 22px; font-size: 0.88rem; color: var(--ink-soft); }
.auth-footer a { color: var(--accent-light); font-weight: 600; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
#eumelstuff-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

.steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 28px; }
.step-dot { width: 32px; height: 5px; border-radius: 3px; background: var(--border); transition: background 0.2s ease; }
.step-dot.active { background: var(--gradient); }
.step-dot.done { background: var(--accent-light); }

.wizard-step { display: none; text-align: left; }
.wizard-step.active { display: block; animation: fadein 0.25s ease; }
.wizard-nav { display: flex; gap: 10px; margin-top: 6px; }
.wizard-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.wizard-subtitle { color: var(--ink-soft); font-size: 0.88rem; margin: 0 0 22px; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Composer (lebt jetzt innerhalb eines Modals statt dauerhaft im Feed)
   ========================================================================== */
.composer { display: flex; gap: 12px; }
.composer-body { flex: 1; min-width: 0; }
.composer textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 1.05rem;
  background: transparent;
  color: var(--ink);
  min-height: 70px;
}
.composer textarea::placeholder { color: var(--ink-soft); }

.composer-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.composer-image {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 1.3;
  border: 1px solid var(--border);
}
.composer-image img { width: 100%; height: 100%; object-fit: cover; }
.composer-image button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.composer-image button .icon { width: 14px; height: 14px; }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.composer-tools { display: flex; align-items: center; gap: 4px; }
.char-count { font-size: 0.78rem; color: var(--ink-soft); margin-right: 6px; }
.char-count.warn { color: var(--accent-light); font-weight: 600; }

/* ==========================================================================
   Post card – bewusst weiterhin cremefarben: Tageslicht im Dunkeln
   ========================================================================== */
.post {
  margin: 14px 20px;
  padding: 16px;
  background: var(--cream);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-post);
  color: var(--post-ink);
}
.post-head { display: flex; gap: 10px; align-items: flex-start; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gradient);
  flex-shrink: 0;
  border: 1.5px solid var(--cream);
}
.avatar-placeholder {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #1A130C; font-weight: 700; flex-shrink: 0;
}
.post-meta { flex: 1; min-width: 0; }
.post-author-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.post-display-name { font-weight: 700; font-size: 0.95rem; color: var(--post-ink); }
.post-username, .post-time { color: var(--post-ink-soft); font-size: 0.85rem; }
.post-username::before { content: '@'; }
.post-dot::before { content: '·'; color: var(--post-ink-soft); }

.post-text {
  margin: 8px 0 0;
  font-size: 0.98rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--post-ink);
}

.post-images { margin-top: 10px; display: grid; gap: 4px; border-radius: var(--radius-s); overflow: hidden; }
.post-images.count-1 { grid-template-columns: 1fr; }
.post-images.count-2 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 .img-item:first-child { grid-row: span 2; }
.post-images.count-4 { grid-template-columns: 1fr 1fr; }
.img-item { background: var(--cream-deep); }
.img-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }

.post-actions { display: flex; align-items: center; gap: 22px; margin-top: 12px; }
.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--post-ink-soft);
  font-size: 0.85rem;
  padding: 4px 6px;
  border-radius: var(--radius-s);
  transition: color 0.15s ease, background 0.15s ease;
}
.post-action:hover { background: rgba(156, 45, 26, 0.1); color: var(--accent-dark); }
.post-action.liked { color: var(--accent-dark); }
.post-action.liked .icon { background-color: var(--accent-dark); }
.post-action.delete:hover { color: var(--danger); }

/* ==========================================================================
   Profile
   ========================================================================== */
.banner { width: 100%; aspect-ratio: 3.5; background: var(--gradient); position: relative; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; }

.profile-header { padding: 0 20px 16px; position: relative; }
.profile-avatar-wrap { margin-top: -44px; margin-bottom: 10px; }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; background: var(--gradient); }
.profile-avatar-placeholder {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #1A130C; font-weight: 700; font-size: 1.8rem;
}
.profile-actions { position: absolute; top: 12px; right: 20px; display: flex; gap: 8px; }
.profile-name { font-size: 1.3rem; font-weight: 800; margin: 0; color: var(--ink); }
.profile-username { color: var(--ink-soft); font-size: 0.9rem; margin: 2px 0 10px; }
.profile-bio { font-size: 0.95rem; line-height: 1.5; margin: 0 0 6px; white-space: pre-wrap; color: var(--ink); }
.profile-joined { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 0.83rem; margin-top: 8px; }

.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
}
.profile-tab.active { color: var(--ink); border-color: var(--accent-light); }

.upload-overlay {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.banner-upload-btn { bottom: 10px; right: 12px; width: 36px; height: 36px; position: absolute; }
.avatar-upload-btn { bottom: 0; right: 0; width: 30px; height: 30px; border: 2px solid var(--bg); }

/* ==========================================================================
   Modal (Profil bearbeiten & Neuer Post)
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  width: 100%;
  max-width: 440px;
  padding: 22px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
}
.compose-modal { max-width: 560px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-header h2 { font-size: 1.1rem; margin: 0; color: var(--ink); }

.hidden { display: none !important; }

/* ==========================================================================
   Kommentare
   ========================================================================== */
.comments-modal { max-width: 480px; padding: 0; display: flex; flex-direction: column; max-height: 82vh; }
.comments-modal .modal-header { padding: 18px 20px; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.comments-list { flex: 1; overflow-y: auto; padding: 8px 4px; }

.comment-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
}
.comment-row.is-reply { padding-left: 46px; }
.comment-main { flex: 1; min-width: 0; }
.comment-text-line { margin: 0; font-size: 0.92rem; line-height: 1.4; color: var(--ink); word-break: break-word; }
.comment-author { font-weight: 700; margin-right: 4px; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.comment-meta button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 0.76rem;
}
.comment-meta button:hover { color: var(--ink); }
.comment-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  flex-shrink: 0;
  padding: 4px;
  margin-top: 2px;
}
.comment-like-btn.liked { color: var(--accent-dark); }
.comment-like-btn.liked .icon { background-color: var(--accent-dark); }

.comment-composer { border-top: 1px solid var(--border); padding: 12px 16px; }
.reply-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--surface-hover);
  border-radius: var(--radius-s);
  padding: 6px 10px;
  margin-bottom: 8px;
}
.comment-composer-row { display: flex; align-items: center; gap: 10px; }
.comment-composer input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.comment-composer input:focus { border-color: var(--accent-light); }

.hidden { display: none !important; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 200;
  box-shadow: var(--shadow-pop);
}

.post-text a.tag-link,
.post-text a.mention-link {
  color: var(--accent-dark);
  font-weight: 600;
}
.post-text a.tag-link:hover,
.post-text a.mention-link:hover { text-decoration: underline; }

.icon-spin { animation: icon-spin 0.8s linear infinite; }
@keyframes icon-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Hashtags-Seite
   ========================================================================== */
.period-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.period-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.period-tab.active { background: var(--gradient); color: #1A130C; border-color: transparent; }
.period-tab:not(.active):hover { background: var(--surface-hover); }

.trend-list { padding: 6px 8px; }
.trend-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background 0.15s ease;
}
.trend-row:hover { background: var(--surface-hover); }
.trend-rank {
  width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.trend-info { flex: 1; min-width: 0; }
.trend-tag { font-weight: 700; color: var(--ink); font-size: 1rem; }
.trend-count { color: var(--ink-soft); font-size: 0.83rem; margin-top: 2px; }

.tag-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.tag-header-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #1A130C;
  flex-shrink: 0;
}
.tag-header-title { font-size: 1.2rem; font-weight: 800; margin: 0; color: var(--ink); }
.tag-header-count { color: var(--ink-soft); font-size: 0.85rem; margin: 2px 0 0; }

/* ==========================================================================
   Hamburger-Drawer (Mobile-Navigation)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 95;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer.open ~ .drawer-backdrop,
.drawer-backdrop:not(.hidden) { opacity: 1; pointer-events: auto; }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 20px;
}

.dm-icon-link { position: relative; }
.dm-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-link .dm-badge { position: static; margin-left: auto; }

@media (min-width: 900px) {
  .nav-drawer, #drawer-backdrop { display: none; }
}

/* ==========================================================================
   Folgen-Button
   ========================================================================== */
.follow-btn { min-width: 108px; }
.btn-ghost.following:hover { border-color: var(--danger); color: var(--danger); }
.btn-ghost.following:hover::after { content: ' entfolgen'; }
.btn-ghost.pending { opacity: 0.75; }

/* ==========================================================================
   Home-Feed Tabs (Für dich / Folge ich)
   ========================================================================== */
.feed-tabs { display: flex; border-bottom: 1px solid var(--border); }
.feed-tab {
  flex: 1;
  text-align: center;
  padding: 15px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.feed-tab.active { color: var(--ink); border-color: var(--accent-light); }

/* ==========================================================================
   Follow-Requests-Panel (eigenes Profil)
   ========================================================================== */
.requests-panel { margin: 14px 20px; padding: 4px 0; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.requests-panel-title { padding: 12px 16px 4px; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.request-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.request-row-main { flex: 1; min-width: 0; }
.request-row-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.request-row-username { color: var(--ink-soft); font-size: 0.82rem; }
.request-row-actions { display: flex; gap: 6px; }
.request-row-actions .icon-btn.accept:hover { background: rgba(74, 160, 90, 0.15); color: #4AA05A; }
.request-row-actions .icon-btn.decline:hover { background: rgba(224, 96, 63, 0.15); color: var(--danger); }

.private-notice { padding: 50px 24px; text-align: center; color: var(--ink-soft); }
.private-notice .icon { margin: 0 auto 14px; color: var(--ink-soft); }

/* ==========================================================================
   Einstellungen (settings.html)
   ========================================================================== */
.settings-section { padding: 8px 20px 20px; }
.settings-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin: 22px 0 10px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-text { flex: 1; min-width: 0; }
.settings-row-title { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.settings-row-desc { font-size: 0.82rem; color: var(--ink-soft); margin-top: 3px; }

.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.toggle-switch.on { background: var(--gradient); }
.toggle-switch.on::after { transform: translateX(20px); background: #1A130C; }

.select-input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
}

/* ==========================================================================
   Direktnachrichten (dm.html) – Instagram-artiges Zweispalten-Layout
   ========================================================================== */
.dm-shell {
  display: flex;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.dm-list-pane {
  width: 340px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.dm-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dm-list-title { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.dm-conversations { flex: 1; overflow-y: auto; }

.dm-conv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.dm-conv-row:hover { background: var(--surface-hover); }
.dm-conv-row.active { background: var(--surface-hover); border-color: var(--accent-light); }
.dm-conv-main { flex: 1; min-width: 0; }
.dm-conv-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.dm-conv-preview { font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dm-conv-row.unread .dm-conv-preview { color: var(--ink); font-weight: 600; }
.dm-conv-time { font-size: 0.72rem; color: var(--ink-soft); flex-shrink: 0; }
.dm-conv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); flex-shrink: 0; }

.dm-chat-pane { flex: 1; display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.dm-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dm-chat-header-name { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.dm-chat-header-sub { font-size: 0.78rem; color: var(--ink-soft); }
.dm-back-btn { display: none; }

.dm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dm-bubble-row { display: flex; }
.dm-bubble-row.mine { justify-content: flex-end; }
.dm-bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.dm-bubble-row.mine .dm-bubble { background: var(--gradient); color: #1A130C; border-bottom-right-radius: 4px; }
.dm-bubble-row.theirs .dm-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 4px; }
.dm-time-divider { text-align: center; color: var(--ink-soft); font-size: 0.72rem; margin: 10px 0; }

.dm-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.dm-composer input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}
.dm-composer input:focus { border-color: var(--accent-light); }
.dm-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient); border: none; color: #1A130C;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0;
}
.dm-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dm-empty-pane {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  flex-direction: column;
  gap: 10px;
  padding: 40px;
  text-align: center;
}

.dm-disabled-notice {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
  padding: 10px;
}

@media (max-width: 720px) {
  .dm-shell { max-width: 100%; border: none; }
  .dm-list-pane { width: 100%; border-right: none; position: static; height: auto; min-height: 100vh; }
  .dm-chat-pane { position: fixed; inset: 0; background: var(--bg); z-index: 40; display: none; }
  .dm-chat-pane.open { display: flex; }
  .dm-back-btn { display: inline-flex; }
}

/* ==========================================================================
   Admin-Panel (separate Seite, bewusst nicht in der Sidebar verlinkt)
   ========================================================================== */
.admin-shell {
  max-width: 780px;
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(21, 17, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.admin-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  border: 1px solid var(--accent-dark);
  padding: 3px 9px;
  border-radius: 999px;
}

.admin-stats { display: flex; gap: 12px; padding: 18px 20px 4px; }
.stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 14px 18px;
}
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.stat-label { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }

.admin-tabs { display: flex; gap: 8px; padding: 16px 20px 0; }
.admin-toolbar { padding: 14px 20px; }
.admin-search input { font-size: 0.92rem; }

.admin-list { padding: 0 12px; }
.admin-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
}
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-username { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
a.admin-username:hover { text-decoration: underline; }
.admin-row-sub { color: var(--ink-soft); font-size: 0.87rem; margin-top: 2px; word-break: break-word; }
.admin-post-text { color: var(--ink); }
.admin-row-meta { color: var(--ink-soft); font-size: 0.78rem; margin-top: 4px; }
.admin-row-actions { display: flex; gap: 2px; flex-shrink: 0; }

.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--ink-soft);
}
.role-badge.admin { background: var(--gradient); color: #1A130C; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
  .app-shell, .admin-shell { border-left: none; border-right: none; }
  .post { margin: 10px 12px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
}
