/* Takoma OS — visual language aligned with Brand Guidelines V01 (25.03.2026)
   Dark Deep-Core base, radial Precision-Blue ↔ Impact-Orange glow,
   Cy Bold headlines, Harmonia Sans body, takoma-logo as watermark.
   Mobile-first, safe on iOS Safari. */

/* ============================================================
   BRAND TOKENS — Single Source of Truth (sync with reports.py)
   ============================================================ */
:root {
  /* Primary palette */
  --brand-blue:        #356692;   /* Precision Blue */
  --brand-blue-dark:   #284e72;
  --brand-blue-light:  #ADD5F4;   /* Signal Blue Light */
  --brand-orange:      #F2581B;   /* Impact Orange */
  --brand-orange-dark: #D44610;
  --brand-deep:        #252525;   /* Deep Core */
  --brand-neutral:     #EDEDED;

  /* Tints */
  --brand-blue-tint:   rgba(53, 102, 146, 0.12);
  --brand-orange-tint: rgba(242, 88, 27, 0.12);

  /* Surfaces / text on dark */
  --surface-1: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.10);
  --rule:      rgba(255, 255, 255, 0.10);
  --rule-strong: rgba(255, 255, 255, 0.18);
  --text:        #EDEDED;
  --text-muted:  rgba(237, 237, 237, 0.66);
  --text-faint:  rgba(237, 237, 237, 0.42);

  /* Status semantic colors (kept usable on dark) */
  --green: #4CAF6D;
  --amber: #E5A22A;
  --red:   #E25E5E;

  /* Layout vars */
  --sidebar-w: 240px;
  --topbar-h:  68px;

  /* Legacy aliases used by older module CSS — point to brand tokens. */
  --ink:      var(--brand-deep);
  --accent:   var(--brand-orange);
  --muted:    var(--text-muted);
  --bg:       var(--brand-deep);
  --bg-soft:  var(--surface-2);
  --card:     var(--surface-1);
}

/* ============================================================
   FONTS — Cy Bold (Headlines), Harmonia Sans (Body)
   ============================================================ */
@font-face {
  font-family: "Cy";
  src: url("/static/fonts/Cy-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Harmonia";
  src: url("/static/fonts/HarmoniaSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font: 15px/1.55 "Harmonia", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: "Cy", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: var(--text);
}
h1 { font-size: 26px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 17px; line-height: 1.25; margin: 0; }
h3 { font-size: 14px; line-height: 1.3;  margin: 0; }

a { color: var(--brand-blue-light); text-decoration: none; }
a:hover { color: #fff; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}

/* ============================================================
   BODY BACKGROUND — Deep-Core base + Precision-Blue ↔ Impact-Orange
   radial glows + Takoma watermark logo behind content.
   "System 23 — Verbindung statt Trennung"
   ============================================================ */
body.shell {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background:
    url('/static/takoma-logo.png') calc(100% - 60px) calc(100% - 40px) / 320px auto no-repeat,
    radial-gradient(ellipse 1400px 900px at 100% -10%, rgba(242, 88, 27, 0.32), transparent 60%),
    radial-gradient(ellipse 1800px 1200px at 0% 100%, rgba(53, 102, 146, 0.55), transparent 60%),
    radial-gradient(ellipse 900px 700px at 12% 80%, rgba(173, 213, 244, 0.14), transparent 70%),
    var(--brand-deep);
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  background-repeat: no-repeat;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar content";
}
body.shell.chat-mode { grid-template-columns: 60px 1fr; }

body.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(37, 37, 37, 0.55);
  pointer-events: none;
  z-index: 0;
}
body.shell > .topbar     { grid-area: topbar;  z-index: 5; }
body.shell > .sidebar    { grid-area: sidebar; z-index: 4; overflow-y: auto; min-height: 0; }
body.shell > main.content { grid-area: content; position: relative; z-index: 1; overflow-y: auto; min-height: 0; }
body.shell > .nav-toggle, body.shell > .nav-scrim { display: none; }

/* ============================================================
   TOPBAR
   ============================================================ */
body.shell .topbar {
  /* Grid-area places the bar; no sticky positioning needed. */
  padding: 0 18px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(20, 20, 20, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--rule);
  color: var(--text);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand::before {
  content: "";
  display: inline-block;
  width: 26px; height: 26px;
  background: url('/static/takoma-primary-logo.png') center / contain no-repeat;
  flex-shrink: 0;
}
.brand-mark {
  font-family: "Cy", sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--text);
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--brand-orange);
  text-transform: uppercase;
}
.topbar-crumbs {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-crumbs a { color: var(--text-faint); }
.topbar-crumbs a:hover { color: var(--brand-blue-light); }
.topbar-crumbs .sep { margin: 0 8px; color: var(--text-faint); }
.topbar-crumbs span:last-child { color: var(--text); font-weight: 600; }

.topbar-meta {
  display: flex; align-items: center; gap: 10px;
}
.user-chip {
  font-size: 12px;
  color: var(--text);
  padding: 5px 11px;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 999px;
  white-space: nowrap;
}
.topbar-logout {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.topbar-logout:hover { color: var(--brand-orange); border-color: var(--brand-orange); }

.pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--rule);
  text-transform: uppercase;
}
.pill-mock { background: rgba(242,88,27,0.18); color: var(--brand-orange); border-color: rgba(242,88,27,0.45); }
.pill-live { background: rgba(76,175,109,0.18); color: var(--green); border-color: rgba(76,175,109,0.45); }

/* Lead status pills (kept from Phase 0/1) */
.pill-new       { background: var(--surface-2); color: var(--text-muted); }
.pill-scanning  { background: rgba(229,162,42,0.18); color: var(--amber); }
.pill-drafted   { background: rgba(242,88,27,0.18); color: var(--brand-orange); border-color: rgba(242,88,27,0.45); }
.pill-approved  { background: rgba(53,102,146,0.18); color: var(--brand-blue-light); border-color: rgba(53,102,146,0.45); }
.pill-scheduled { background: var(--surface-2); color: var(--text-muted); }
.pill-sent      { background: rgba(76,175,109,0.18); color: var(--green); border-color: rgba(76,175,109,0.45); }
.pill-error     { background: rgba(226,94,94,0.18); color: var(--red); border-color: rgba(226,94,94,0.45); }
.pill-rejected  { background: var(--surface-1); color: var(--text-faint); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  padding: 4px 8px;
  user-select: none;
}

.sidebar {
  /* Grid-area takes care of placement; no fixed positioning needed. */
  background:
    radial-gradient(ellipse 600px 700px at 0% 100%, rgba(53, 102, 146, 0.45), transparent 65%),
    radial-gradient(ellipse 400px 500px at 0% 75%, rgba(173, 213, 244, 0.10), transparent 70%),
    linear-gradient(180deg,
      rgba(28, 28, 28, 0.78) 0%,
      rgba(28, 28, 28, 0.62) 60%,
      rgba(28, 28, 28, 0.40) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}
.sidenav { padding: 14px 0 28px; }
.sidenav-group { padding: 6px 0 4px; }
.sidenav-label {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  padding: 10px 18px 6px;
}
.sidenav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 18px;
  margin: 0 8px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  border-left: 0;
  transition: background 120ms ease, color 120ms ease;
}
.sidenav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sidenav-link.is-active {
  background: rgba(53, 102, 146, 0.55);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(53, 102, 146, 0.40);
}
.sidenav-link.is-active .ico { color: var(--brand-orange); }
.sidenav-link .ico {
  display: inline-block;
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--brand-blue-light);
}
.sidenav-foot {
  padding: 18px 18px 4px;
  color: var(--text-faint);
  border-top: 1px solid var(--rule);
  margin-top: 12px;
  font-family: "Cy", sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  background: rgba(0,0,0,0.5);
  z-index: 3;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
body.shell .content {
  /* Grid-area places this; just internal padding. */
  padding: 24px 28px 64px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 22px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 28px; }
.page-head .lede {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 8px;
  font: 600 13px/1 "Harmonia", -apple-system, sans-serif;
  cursor: pointer;
  min-height: 38px;
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover {
  background: rgba(53, 102, 146, 0.30);
  border-color: rgba(53, 102, 146, 0.55);
  color: #fff;
}
.btn-primary {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
  box-shadow: 0 6px 18px rgba(242, 88, 27, 0.35);
}
.btn-primary:hover {
  background: var(--brand-orange-dark);
  border-color: var(--brand-orange-dark);
  color: #fff;
  box-shadow: 0 8px 22px rgba(242, 88, 27, 0.45);
}
.btn-danger {
  border-color: rgba(226,94,94,0.50);
  color: var(--red);
  background: rgba(226,94,94,0.08);
}
.btn-danger:hover {
  background: rgba(226,94,94,0.20);
  color: #fff;
  border-color: var(--red);
}
.btn.small { padding: 5px 10px; font-size: 12px; min-height: 30px; border-radius: 6px; }
.btn.small.btn-danger { padding: 5px 9px; }

.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions-row form { margin: 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 18px 50px -28px rgba(0,0,0,0.6);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Inbox hint banner */
.hint {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 0 0 16px;
  border: 1px solid var(--rule);
  font-size: 14px;
  background: var(--surface-1);
}
.hint-error    { background: rgba(226,94,94,0.10);  border-color: rgba(226,94,94,0.45);  color: var(--red); }
.hint-drafted  { background: var(--brand-orange-tint); border-color: rgba(242,88,27,0.45); color: var(--brand-orange); }
.hint-new      { background: var(--surface-2); color: var(--text-muted); }
.hint-scheduled{ background: var(--surface-2); color: var(--text-muted); }
.hint-sent     { background: rgba(76,175,109,0.10); border-color: rgba(76,175,109,0.45); color: var(--green); }
.hint-idle     { background: var(--surface-1); color: var(--text-muted); }

/* Lead inbox counts grid */
.row.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}
.count {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  border-top: 2px solid var(--brand-blue);
}
.count-num {
  display: block;
  font-family: "Cy", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}
.count-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
  margin-top: 4px;
}
.count-attention { border-top-color: var(--brand-orange); }

/* ============================================================
   DASHBOARD MODULE GRID
   ============================================================ */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 8px 0 24px;
}
.mod-card {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
  position: relative;
  overflow: hidden;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.mod-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(53,102,146,0.4) 60%, rgba(242,88,27,0.4));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}
.mod-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.mod-card:hover::before { opacity: 1; }
.mod-card .mod-name {
  font-family: "Cy", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.mod-card .mod-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}
.mod-card .mod-stat {
  margin-top: auto;
  font-family: "Cy", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.mod-card .mod-stat .unit {
  font-family: "Harmonia", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.mod-card.is-stub { opacity: 0.6; }
.mod-card.is-stub .mod-name::after {
  content: " · in Arbeit";
  font-weight: 400;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: "Harmonia", sans-serif;
}

/* ============================================================
   TABLES
   ============================================================ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
  color: var(--text);
}
.tbl th {
  text-align: left;
  font-family: "Cy", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--rule-strong);
  font-weight: 700;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(53, 102, 146, 0.10); }
.tbl a { color: var(--text); font-weight: 600; }
.tbl a:hover { color: var(--brand-orange); }
.tbl .tbl-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 14px;
  font-size: 13px;
}

/* Audit table — same dark style */
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--text);
}
.audit-table th {
  font-family: "Cy", sans-serif;
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--rule-strong);
}
.audit-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.audit-action {
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--brand-blue-light);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}
.form-grid label { display: flex; flex-direction: column; gap: 4px; }
.form-grid label > span {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.form-grid input,
.form-grid select,
.form-grid textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="password"],
select, textarea {
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: rgba(20, 20, 20, 0.55);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.form-grid input::placeholder,
.form-grid textarea::placeholder,
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(53, 102, 146, 0.25);
}
.form-grid textarea { min-height: 88px; resize: vertical; }
.form-grid label.full { grid-column: 1 / -1; }

/* ============================================================
   KEY-VALUE LISTS (Detail pages)
   ============================================================ */
.kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 6px 18px;
  margin: 0;
}
.kv dt {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
}
.kv dt:first-child, .kv dt:nth-child(2) { border-top: 0; padding-top: 0; }
.kv dd {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
  word-break: break-word;
  color: var(--text);
}
.kv dd:nth-child(2) { border-top: 0; padding-top: 0; }

.muted { color: var(--text-muted); }
.err   { color: var(--red); }
.small { font-size: 12px; }
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-decoration: none;
}
.back-link:hover { color: var(--brand-blue-light); }

details { margin-top: 8px; }
summary { cursor: pointer; font-size: 13px; color: var(--text-muted); padding: 4px 0; }
pre {
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--brand-blue-light);
}

/* ============================================================
   STATUS PILLS — Kunden / Projekte / Reports
   ============================================================ */
.pill-status {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--rule);
  background: var(--surface-1);
  color: var(--text-muted);
}
.pill-status-lead          { background: var(--surface-2); color: var(--text-muted); }
.pill-status-aktiv         { background: rgba(76,175,109,0.18);  color: var(--green);     border-color: rgba(76,175,109,0.45); }
.pill-status-pausiert      { background: rgba(229,162,42,0.18);  color: var(--amber);     border-color: rgba(229,162,42,0.45); }
.pill-status-abgeschlossen { background: var(--surface-2);        color: var(--text-faint);}
.pill-status-besetzt       { background: rgba(76,175,109,0.18);   color: var(--green);     border-color: rgba(76,175,109,0.45); }
.pill-status-geschlossen   { background: var(--surface-2);        color: var(--text-faint);}

/* ============================================================
   REQUEST LIST (Leads / Posteingang)
   ============================================================ */
.req-list { list-style: none; padding: 0; margin: 0; }
.req-item { border-top: 1px solid var(--rule); }
.req-item:first-child { border-top: 0; }
.req-link {
  display: block;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
}
.req-link:hover { background: var(--surface-2); }
.req-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.req-id { font-weight: 700; color: var(--brand-orange); font-family: "Cy", sans-serif; }
.req-from { font-weight: 600; }
.req-subject { font-size: 14px; margin-top: 2px; color: var(--text); }
.req-url { font-size: 12px; color: var(--text-muted); margin-top: 2px; word-break: break-all; }
.req-url.muted { color: var(--red); }
.req-status-error { background: rgba(226,94,94,0.06); }

/* ============================================================
   ALERTS / LOGIN CARD
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid;
  background: var(--surface-1);
}
.alert-err { background: rgba(226,94,94,0.10); border-color: rgba(226,94,94,0.45); color: var(--red); }

body:not(.shell) .container {
  max-width: 480px;
  margin: 60px auto;
  padding: 16px;
  color: var(--text);
}
body:not(.shell) {
  min-height: 100vh;
  background:
    url('/static/takoma-logo.png') calc(50% + 0px) 30% / 320px auto no-repeat,
    radial-gradient(ellipse 1500px 1000px at 100% -10%, rgba(242, 88, 27, 0.45), transparent 60%),
    radial-gradient(ellipse 1900px 1300px at 0% 100%, rgba(53, 102, 146, 0.70), transparent 60%),
    var(--brand-deep);
  background-attachment: fixed;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
body:not(.shell) .container { display: block; }
.login-card {
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 30px 80px -24px rgba(0,0,0,0.7);
}
.login-card label { display: block; margin-bottom: 16px; }
.login-card label span {
  display: block;
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.login-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 16px;  /* avoid iOS zoom */
  background: rgba(20,20,20,0.55);
  color: var(--text);
}
.login-card input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(53,102,146,0.25);
}
.login-card .btn { width: 100%; }

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-card {
  max-width: 500px;
  margin: 80px auto;
  text-align: center;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 36px 28px;
}
.error-code {
  font-family: "Cy", sans-serif;
  font-size: 64px;
  font-weight: 800;
  color: var(--brand-orange);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.error-card h1 { font-size: 22px; }

/* ============================================================
   REJECT / SECTION-EDIT details
   ============================================================ */
.reject-details summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  user-select: none;
}
.reject-details summary::-webkit-details-marker { display: none; }
.reject-details[open] summary { background: var(--surface-2); }
.reject-form {
  margin-top: 8px;
  padding: 14px;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  max-width: 520px;
}
.reject-form label { display: block; margin-bottom: 8px; }

/* ============================================================
   KANBAN BOARD (Projekte + Recruiting)
   ============================================================ */
.task-quickadd {
  display: grid;
  grid-template-columns: 1fr 130px 160px 130px auto;
  gap: 8px;
  margin-bottom: 16px;
}
.task-quickadd input,
.task-quickadd select { min-height: 38px; }
.task-quickadd button { white-space: nowrap; }

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kanban-col {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.kanban-col-title {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.kanban-col-count {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 1px 9px;
  font-family: "Cy", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  min-width: 22px;
  text-align: center;
}
.kanban-col-backlog .kanban-col-title { color: var(--text-muted); }
.kanban-col-doing   .kanban-col-title { color: var(--amber); }
.kanban-col-review  .kanban-col-title { color: var(--brand-blue-light); }
.kanban-col-done    .kanban-col-title { color: var(--green); }

.kanban-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand-orange);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text);
}
.kanban-col-doing  .kanban-card { border-left-color: var(--amber); }
.kanban-col-review .kanban-card { border-left-color: var(--brand-blue-light); }
.kanban-col-done   .kanban-card { border-left-color: var(--green); opacity: 0.85; }

.kanban-card-title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}
.kanban-card-title:hover { color: var(--brand-orange); }
.kanban-card-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.kanban-assignee {
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--rule);
}
.kanban-due { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.kanban-rating { color: var(--amber); letter-spacing: 1px; }
.kanban-move select {
  width: 100%;
  font-size: 11px;
  padding: 4px 8px;
}
.kanban-empty {
  padding: 16px 8px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
}
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px)  { .kanban { grid-template-columns: 1fr; }
                             .task-quickadd { grid-template-columns: 1fr; } }

/* Recruiting kanban — 6 columns */
.recruiting-kanban { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.recruiting-kanban .kanban-col-eingang   .kanban-card { border-left-color: var(--text-muted); }
.recruiting-kanban .kanban-col-sichtung  .kanban-card { border-left-color: var(--brand-orange); }
.recruiting-kanban .kanban-col-gespraech .kanban-card { border-left-color: var(--brand-blue-light); }
.recruiting-kanban .kanban-col-zusage    .kanban-card { border-left-color: var(--green); }
.recruiting-kanban .kanban-col-absage    .kanban-card { border-left-color: var(--red); opacity: 0.78; }
.recruiting-kanban .kanban-col-rueckzug  .kanban-card { border-left-color: var(--rule-strong); opacity: 0.65; }
.recruiting-kanban .kanban-col-eingang   .kanban-col-title { color: var(--text-muted); }
.recruiting-kanban .kanban-col-sichtung  .kanban-col-title { color: var(--brand-orange); }
.recruiting-kanban .kanban-col-gespraech .kanban-col-title { color: var(--brand-blue-light); }
.recruiting-kanban .kanban-col-zusage    .kanban-col-title { color: var(--green); }
.recruiting-kanban .kanban-col-absage    .kanban-col-title { color: var(--red); }
.recruiting-kanban .kanban-col-rueckzug  .kanban-col-title { color: var(--text-faint); }
@media (max-width: 1300px) { .recruiting-kanban { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 700px)  { .recruiting-kanban { grid-template-columns: 1fr; } }

/* ============================================================
   REPORT BUILDER (Phase 3)
   ============================================================ */
.section-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 14px;
}
.section-check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.section-check:hover { background: var(--surface-2); }
.section-check input[type="checkbox"] { margin: 0; }

.report-section { scroll-margin-top: 80px; }
.kpi-tbl { font-size: 13px; margin-top: 6px; }
.kpi-tbl th { padding: 9px 12px; }
.kpi-tbl td { padding: 5px 9px; vertical-align: middle; }
.kpi-tbl input[type="text"] {
  width: 100%;
  padding: 6px 9px;
  font-size: 13px;
  border-radius: 6px;
}
.kpi-tbl tr.kpi-add { background: var(--surface-2); }
.kpi-tbl tr.kpi-add td { padding: 9px 12px; }
.kpi-row { display: contents; }
.kpi-tbl tr.kpi-add .kpi-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr auto;
  gap: 6px;
  align-items: center;
}
.kpi-actions { white-space: nowrap; }
.section-edit > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
}
.section-edit > summary:hover { color: var(--brand-blue-light); }

/* ============================================================
   CONTENT / Redaktionsplan (Phase 4)
   ============================================================ */
.content-filter, .calendar-filter {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.content-filter select, .calendar-filter select { min-height: 38px; }
.content-row-overdue { background: rgba(226,94,94,0.06); }
.content-date { white-space: nowrap; }

/* Platform badges (kept brand-correct for Meta/LI/TT, neutralized for own) */
.platform-badge {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--rule);
}
.platform-instagram  { background: linear-gradient(135deg,#fdf497 0%,#fd5949 50%,#d6249f 100%); color:#fff; border-color: transparent; }
.platform-facebook   { background:#1877F2; color:#fff; border-color: transparent; }
.platform-linkedin   { background:#0A66C2; color:#fff; border-color: transparent; }
.platform-tiktok     { background:#000;    color:#fff; border-color: transparent; }
.platform-website    { background: var(--brand-blue); color:#fff; border-color: transparent; }
.platform-newsletter { background: var(--brand-orange); color:#fff; border-color: transparent; }

.content-status {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--rule);
  background: var(--surface-1);
  color: var(--text-muted);
  white-space: nowrap;
}
.content-status-idea       { background: var(--surface-2); color: var(--text-muted); }
.content-status-draft      { background: var(--surface-2); color: var(--text-muted); }
.content-status-review     { background: rgba(229,162,42,0.18); color: var(--amber);  border-color: rgba(229,162,42,0.45); }
.content-status-approved   { background: rgba(53,102,146,0.18); color: var(--brand-blue-light); border-color: rgba(53,102,146,0.45); }
.content-status-scheduled  { background: rgba(53,102,146,0.30); color: #fff; border-color: rgba(53,102,146,0.55); }
.content-status-published  { background: rgba(76,175,109,0.18); color: var(--green); border-color: rgba(76,175,109,0.45); }
.content-status-archived   { background: var(--surface-1); color: var(--text-faint); }

.status-flow { display: flex; gap: 6px; flex-wrap: wrap; }
.status-flow button { cursor: pointer; font-family: inherit; }
.status-flow .content-status.is-current {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.hashtag-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  font-size: 13px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

/* Calendar */
.calendar-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.calendar-month {
  font-family: "Cy", sans-serif;
  font-size: 17px;
  letter-spacing: 0.01em;
  min-width: 160px;
  text-align: center;
  color: var(--text);
}
.calendar-grid {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.calendar-row:last-child { border-bottom: 0; }
.calendar-cell {
  position: relative;
  min-height: 110px;
  padding: 6px 6px 8px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calendar-cell:last-child { border-right: 0; }
.calendar-cell-head {
  min-height: auto;
  background: var(--surface-2);
  text-align: center;
  font-family: "Cy", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-muted);
  padding: 9px 6px;
}
.calendar-cell-other { background: rgba(0,0,0,0.18); }
.calendar-cell-other .calendar-date { color: var(--text-faint); }
.calendar-cell-today { background: rgba(242, 88, 27, 0.12); }
.calendar-cell-today .calendar-date {
  background: var(--brand-orange);
  color: #fff;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Cy", sans-serif;
}
.calendar-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-family: "Cy", sans-serif;
}
.calendar-post {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  text-decoration: none;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-left: 3px solid var(--brand-blue-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-post:hover { background: rgba(255,255,255,0.14); color: #fff; }
.calendar-post-platform {
  font-family: "Cy", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--text-muted);
  flex-shrink: 0;
}
.calendar-post-title { overflow: hidden; text-overflow: ellipsis; }
.calendar-post.content-status-review     { border-left-color: var(--amber); }
.calendar-post.content-status-approved   { border-left-color: var(--brand-blue-light); }
.calendar-post.content-status-scheduled  { border-left-color: var(--brand-blue); }
.calendar-post.content-status-published  { border-left-color: var(--green); opacity: 0.88; }
.calendar-post.content-status-archived   { border-left-color: var(--rule-strong); opacity: 0.55; }

.calendar-add {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  font-weight: 700;
}
.calendar-cell:hover .calendar-add { color: var(--brand-orange); }
.calendar-add:hover { background: var(--brand-orange); color: #fff; }

@media (max-width: 800px) {
  .calendar-cell { min-height: 64px; }
  .calendar-cell-head { font-size: 9px; padding: 6px 2px; }
  .calendar-post-title { display: none; }
  .calendar-post { padding: 2px 4px; }
}

/* ============================================================
   SLACK-CLONE (chat-mode) — 3-Pane: Rail · Channels · Main
   ============================================================ */

/* Im chat-mode wird der globale Sidebar zur schmalen Icon-Rail.
   Width kommt aus body.shell.chat-mode grid-template-columns 60px. */
body.shell.chat-mode .sidebar {
  overflow-x: hidden;
  overflow-y: auto;
}
body.shell.chat-mode .sidenav-label,
body.shell.chat-mode .sidenav-foot { display: none; }
body.shell.chat-mode .sidenav-link {
  margin: 3px 6px;
  padding: 9px 0;
  justify-content: center;
  font-size: 0;                    /* hides direct text nodes in the <a> */
  border-radius: 8px;
  position: relative;
}
body.shell.chat-mode .sidenav-link .ico {
  font-size: 18px;
  width: auto;
  color: var(--text-muted);
}
body.shell.chat-mode .sidenav-link:hover .ico { color: var(--text); }
body.shell.chat-mode .sidenav-link.is-active {
  background: var(--brand-orange);
  box-shadow: 0 4px 14px rgba(242, 88, 27, 0.40);
}
body.shell.chat-mode .sidenav-link.is-active .ico { color: #fff; }
body.shell.chat-mode .content {
  padding: 0;
  background: var(--brand-deep);
  overflow: hidden;            /* slack-shell scrollt selbst */
}
/* Hide breadcrumbs & extras inside topbar to give the chat full width */
body.shell.chat-mode .topbar-crumbs { opacity: 0.7; }

/* Slack-Shell selbst — fix-positioned to fill viewport beneath topbar */
.slack-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100%;
  overflow: hidden;
}

/* ----- Channels Sidebar (Slack dunkel) ----- */
.slack-channels {
  background: linear-gradient(180deg,
    rgba(40, 78, 114, 0.55) 0%,
    rgba(28, 28, 28, 0.85) 100%),
    var(--brand-deep);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  padding: 0 0 24px;
  color: var(--text);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.slack-channels-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: rgba(28, 28, 28, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 2;
}
.slack-channels-head h2 {
  font-size: 16px;
  letter-spacing: 0.005em;
  margin: 0;
}

.slack-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.slack-icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.slack-icon-btn.slack-disabled,
.slack-disabled { opacity: 0.45; cursor: not-allowed; }
.slack-icon-btn.slack-disabled:hover { background: transparent; }

.slack-nav { padding: 8px 6px 4px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.slack-nav-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
}
.slack-nav-shortcut:hover { background: var(--surface-2); color: var(--text); }
.slack-nav-ico {
  width: 18px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

.slack-section { padding: 4px 6px 4px; border: 0; }
.slack-section-head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-muted);
}
.slack-section-head::-webkit-details-marker { display: none; }
.slack-section-head:hover { background: var(--surface-2); color: var(--text); }
.slack-section-caret {
  font-size: 10px;
  color: var(--text-faint);
  width: 12px;
  transition: transform 120ms ease;
}
.slack-section[open] .slack-section-caret { transform: rotate(0deg); }
.slack-section:not([open]) .slack-section-caret { transform: rotate(-90deg); }
.slack-section-title {
  font-family: "Cy", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}
.slack-section-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.slack-section-list li { margin: 0; }
.slack-channel,
.slack-dm-form .slack-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 26px;
  width: 100%;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.slack-channel:hover {
  background: var(--surface-2);
  color: var(--text);
}
.slack-channel.is-active {
  background: var(--brand-blue);
  color: #fff;
  font-weight: 500;
}
.slack-channel.is-active:hover { background: var(--brand-blue); }
.slack-channel.is-unread {
  color: #fff;
  font-weight: 700;
}
.slack-channel-prefix {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  flex-shrink: 0;
}
.slack-channel.is-active .slack-channel-prefix,
.slack-channel.is-unread .slack-channel-prefix { color: inherit; }
.slack-channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.slack-presence {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--text-muted);
}
.slack-channel.is-active .slack-presence,
.slack-channel.is-unread .slack-presence {
  background: var(--green);
  border-color: var(--green);
}
.slack-unread-dot {
  background: var(--brand-orange);
  color: #fff;
  font-family: "Cy", sans-serif;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.slack-empty-hint {
  display: block;
  padding: 4px 28px 8px;
  font-size: 12px;
  color: var(--text-faint);
}
.slack-dm-form { margin: 0; }

/* ----- Main pane ----- */
.slack-main {
  display: flex;
  flex-direction: column;
  background: rgba(20, 20, 20, 0.50);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  min-width: 0;
}
.slack-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--rule);
  background: rgba(28, 28, 28, 0.50);
  flex-shrink: 0;
  gap: 10px;
}
.slack-main-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.slack-main-title h1 {
  font-size: 18px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slack-main-title h1 .slack-channel-prefix {
  width: auto;
  font-size: 18px;
  color: var(--text-muted);
}
.slack-head-fav { color: var(--text-faint); }
.slack-main-actions { display: flex; gap: 4px; }

.slack-tabs {
  display: flex;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--rule);
  background: rgba(28, 28, 28, 0.30);
  flex-shrink: 0;
}
.slack-tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.slack-tab:hover { color: var(--text); }
.slack-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--brand-orange);
}
.slack-tab.is-disabled { opacity: 0.45; cursor: default; }
.slack-tab-add { font-size: 16px; padding: 10px 12px; cursor: pointer; }

/* + Tab Dropdown — KI-Verlinkung */
.slack-tab-menu {
  position: relative;
  list-style: none;
}
.slack-tab-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.slack-tab-menu > summary::-webkit-details-marker { display: none; }
.slack-tab-menu[open] > summary { color: var(--text); border-bottom-color: var(--brand-orange); }
.slack-tab-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 280px;
  background: rgba(20, 20, 20, 0.96);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.slack-tab-dropdown-head {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 6px 10px 4px;
}
.slack-tab-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.slack-tab-dropdown-item:hover {
  background: rgba(53, 102, 146, 0.30);
}
.slack-tab-dropdown-ico {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-orange);
  font-size: 14px;
  flex-shrink: 0;
}
.slack-tab-dropdown-title {
  font-weight: 600;
  color: var(--text);
}
.slack-tab-dropdown-sub {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 1px;
}
.slack-tab-dropdown-sep {
  height: 1px;
  background: var(--rule);
  margin: 4px 4px;
}

.slack-stream {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.slack-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.slack-empty h2 {
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--text);
}

.slack-date-divider {
  position: relative;
  text-align: center;
  margin: 10px 0 8px;
  z-index: 1;
}
.slack-date-divider::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 1px;
  background: var(--rule);
  z-index: -1;
}
.slack-date-divider span {
  background: rgba(28, 28, 28, 0.95);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  font-family: "Cy", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ----- Compose ----- */
.slack-compose {
  border-top: 1px solid var(--rule);
  padding: 10px 18px 14px;
  background: rgba(28, 28, 28, 0.45);
  flex-shrink: 0;
}
.slack-compose-form {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.65);
}
.slack-compose-form:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(53, 102, 146, 0.18);
}
.slack-format-toolbar {
  display: flex;
  gap: 1px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.slack-format-toolbar button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  min-width: 26px;
  text-align: center;
}
.slack-format-toolbar button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.slack-format-toolbar button code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: transparent;
  padding: 0;
}
.slack-format-sep {
  width: 1px;
  align-self: stretch;
  background: var(--rule);
  margin: 4px 4px;
}
.slack-compose-form textarea {
  width: 100%;
  resize: none;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  color: var(--text);
  font-family: "Harmonia", sans-serif;
  font-size: 14px;
  outline: none;
  min-height: 44px;
  max-height: 200px;
}
.slack-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 6px;
  gap: 6px;
}
.slack-compose-tools { display: flex; gap: 1px; }
.slack-compose-tools .slack-icon-btn {
  font-size: 14px;
  padding: 6px 8px;
}
.slack-send-btn {
  background: var(--brand-orange);
  color: #fff;
  border: 0;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(242, 88, 27, 0.30);
  transition: background 120ms ease, transform 100ms ease;
}
.slack-send-btn:hover { background: var(--brand-orange-dark); }
.slack-send-btn:active { transform: scale(0.97); }

.slack-emoji-pop {
  position: fixed;
  background: rgba(20, 20, 20, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  z-index: 100;
}
.slack-emoji-pop button {
  background: transparent;
  border: 0;
  font-size: 20px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.slack-emoji-pop button:hover { background: var(--surface-2); }

/* ----- Stream messages — Slack density ----- */
.slack-stream .chat-msg {
  padding: 4px 18px 4px 18px;
  border-radius: 0;
  margin: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  position: relative;
}
.slack-stream .chat-msg:hover { background: rgba(255, 255, 255, 0.025); }
.slack-stream .chat-msg-continued { padding-top: 0; padding-bottom: 0; }
.slack-stream .chat-avatar { width: 36px; height: 36px; border-radius: 4px; }
.slack-stream .chat-avatar-spacer {
  width: 36px;
  position: relative;
  cursor: default;
}
.chat-msg-time-hover {
  display: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--text-faint);
  text-align: right;
  width: 36px;
  padding-right: 4px;
}
.slack-stream .chat-msg-continued:hover .chat-msg-time-hover {
  display: block;
  position: absolute;
  top: 4px;
  right: 0;
}

/* unify older chat module classes used in templates */
.chat-shell {
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 12px;
  align-self: stretch;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px);
  overflow-y: auto;
}
.chat-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
  font-family: "Cy", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.chat-channel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-channel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: background 120ms ease, color 120ms ease;
}
.chat-channel-link:hover { background: var(--surface-2); color: var(--text); }
.chat-channel-link.is-active {
  background: rgba(53, 102, 146, 0.55);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(53, 102, 146, 0.30);
}
.chat-channel-name { word-break: break-all; }
.chat-channel-count {
  font-size: 11px;
  font-family: "Cy", sans-serif;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}
.chat-channel-link.is-active .chat-channel-count {
  background: rgba(0, 0, 0, 0.20);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.20);
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  min-height: 540px;
}
.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}
.chat-head h1 {
  font-size: 22px;
  margin: 0 0 4px;
}
.chat-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
}
.chat-description {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.chat-stream {
  padding: 18px 22px;
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-empty {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  padding: 32px 12px;
}

.chat-msg {
  position: relative;
  padding: 4px 12px 4px 12px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  scroll-margin-top: 80px;
  transition: background 120ms ease;
}
.chat-msg:hover { background: rgba(255, 255, 255, 0.025); }
.chat-msg-continued { padding-top: 0; padding-bottom: 0; margin-top: -8px; }

.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cy", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-avatar-spacer {
  background: transparent !important;
  box-shadow: none;
}

.chat-msg-inner {
  min-width: 0;
}
.chat-msg-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 12px;
}
.chat-msg-author {
  font-family: "Cy", sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  font-size: 14px;
}
.chat-msg-time { color: var(--text-faint); font-size: 11px; }
.chat-msg-edited {
  color: var(--text-faint);
  font-size: 11px;
  font-style: italic;
  background: var(--surface-2);
  padding: 0 6px;
  border-radius: 4px;
}

.chat-msg-actions {
  position: absolute;
  top: -10px;
  right: 12px;
  display: none;
  background: rgba(20, 20, 20, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2px;
  align-items: center;
  gap: 1px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
  z-index: 2;
}
.chat-msg:hover .chat-msg-actions,
.chat-msg.is-editing .chat-msg-actions { display: flex; }
.chat-msg-action-btn,
.chat-msg-actions form button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.chat-msg-action-btn:hover { color: var(--text); background: var(--surface-2); }
.chat-msg-actions form button:hover {
  color: var(--red);
  background: rgba(226, 94, 94, 0.18);
}

.chat-msg-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg-body strong { font-weight: 700; color: #fff; }
.chat-msg-body em { font-style: italic; }
.chat-msg-body a { color: var(--brand-blue-light); text-decoration: underline; }
.chat-msg-body a:hover { color: var(--brand-orange); }
.chat-msg-body code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--brand-blue-light);
}
.chat-codeblock {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0 4px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
}
.chat-codeblock code {
  background: transparent;
  padding: 0;
  color: var(--text);
}

.chat-mention {
  background: rgba(242, 88, 27, 0.18);
  color: var(--brand-orange);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(242, 88, 27, 0.35);
}
.chat-mention-unknown {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--rule);
}
.chat-mention-broadcast {
  background: rgba(53, 102, 146, 0.20);
  color: #6fb3e8;
  border-color: rgba(53, 102, 146, 0.45);
}

/* Threads + Pins + Saved (Slack-Parität) */
.chat-thread-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px; padding: 4px 10px;
  font-size: 12px; font-weight: 600;
  color: #6fb3e8; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 16px;
  background: var(--surface-1);
}
.chat-thread-link:hover { background: var(--surface-2); border-color: #6fb3e8; }
.chat-msg-pinned-tag {
  font-size: 11px; color: var(--brand-orange); font-weight: 700;
  margin-bottom: 2px;
}
.chat-msg-action-btn.is-active { color: var(--brand-orange); background: rgba(242,88,27,.14); }
.slack-pinned-bar {
  margin: 0 0 4px; border-bottom: 1px solid var(--rule);
  background: var(--surface-1); font-size: 13px;
}
.slack-pinned-bar > summary {
  cursor: pointer; padding: 8px 18px; font-weight: 600; color: var(--text);
  list-style: none;
}
.slack-pinned-bar > summary::-webkit-details-marker { display: none; }
.slack-pinned-list { padding: 4px 18px 12px; max-height: 280px; overflow-y: auto; }
.slack-pinned-item {
  padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px;
  margin-bottom: 8px; background: var(--surface);
}
.slack-pinned-meta { font-size: 12px; }
.slack-pinned-body { font-size: 13px; margin: 2px 0 6px; }
.slack-pinned-unpin {
  font-size: 11px; color: var(--text-muted); background: transparent;
  border: 1px solid var(--rule); border-radius: 6px; padding: 2px 8px; cursor: pointer;
}
.slack-pinned-unpin:hover { color: var(--text); border-color: var(--brand-orange); }
/* Online-Präsenz-Punkt */
.slack-presence {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #3aa856; margin-right: 5px; vertical-align: middle;
}
.slack-presence.is-away { background: var(--text-muted); }

/* Reactions row + picker */
.chat-reactions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.chat-reaction-form { margin: 0; display: inline; }
.chat-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.chat-reaction:hover {
  background: rgba(53, 102, 146, 0.30);
  border-color: rgba(53, 102, 146, 0.55);
  color: #fff;
}
.chat-reaction-count {
  font-family: "Cy", sans-serif;
  font-weight: 700;
  font-size: 11px;
}
.chat-react-picker { position: relative; margin: 0; }
.chat-react-picker > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-muted);
}
.chat-react-picker > summary::-webkit-details-marker { display: none; }
.chat-react-picker > summary:hover { color: var(--text); background: var(--surface-2); }
.chat-react-tray {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(20, 20, 20, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  z-index: 5;
}
.chat-react-pick {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
}
.chat-react-pick:hover { background: var(--surface-2); }

/* Edit mode */
.chat-edit-form textarea {
  width: 100%;
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid var(--brand-blue);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
}
.chat-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* Help block in sidebar */
.chat-help {
  margin-top: 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.6;
}
.chat-help code {
  background: var(--surface-2);
  color: var(--brand-blue-light);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* Unread badge in sidebar (Brand-Orange = noch ungelesen) */
.chat-channel-unread {
  background: var(--brand-orange);
  color: #fff;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Cy", sans-serif;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(242, 88, 27, 0.40);
}

/* Compose box hint row */
.chat-compose {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.20);
}
.chat-compose textarea {
  resize: vertical;
  min-height: 64px;
  max-height: 240px;
  font-family: "Harmonia", sans-serif;
}
.chat-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chat-compose-hint {
  color: var(--text-faint);
  font-size: 11px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.20);
}
.chat-compose textarea {
  resize: vertical;
  min-height: 44px;
  max-height: 200px;
  font-family: "Harmonia", sans-serif;
}

@media (max-width: 900px) {
  .chat-shell { grid-template-columns: 1fr; }
  .chat-sidebar { position: static; max-height: 240px; }
  .chat-stream { max-height: 50vh; }
}

/* ============================================================
   PRODUCTION (Bilder → Posts)
   ============================================================ */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.prod-tile {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease;
  display: flex;
  flex-direction: column;
}
.prod-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(53, 102, 146, 0.55);
}
.prod-tile-img {
  background: rgba(0, 0, 0, 0.30);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.prod-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-tile-placeholder {
  font-size: 32px;
  color: var(--text-faint);
}
.prod-tile-meta {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.prod-tile-platforms {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.prod-tile-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--text-faint);
  font-family: "Cy", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.prod-tile-platform-draft     { color: var(--text-muted); }
.prod-tile-platform-approved  { background: rgba(53,102,146,0.30); color: #fff; border-color: rgba(53,102,146,0.55); }
.prod-tile-platform-published { background: rgba(76,175,109,0.30); color: #fff; border-color: rgba(76,175,109,0.55); }
.prod-tile-platform-rejected  { background: rgba(226,94,94,0.20); color: var(--red); border-color: rgba(226,94,94,0.45); opacity: 0.7; }
.prod-tile-platform-none      { opacity: 0.35; }

.prod-detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .prod-detail-grid { grid-template-columns: 1fr; }
}
.prod-asset-pane { display: flex; flex-direction: column; gap: 16px; }
.prod-original {
  width: 100%;
  border-radius: 8px;
  display: block;
  background: rgba(0,0,0,0.20);
}
.prod-renders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.prod-render {
  background: rgba(0,0,0,0.20);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  font-size: 11px;
}
.prod-render img {
  width: 100%;
  border-radius: 4px;
  background: rgba(0,0,0,0.30);
}
.prod-render-label {
  font-family: "Cy", sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.prod-render-dim { font-family: ui-monospace, Menlo, monospace; color: var(--text-faint); }

.prod-posts-pane { display: flex; flex-direction: column; gap: 16px; }
.prod-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prod-post {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  scroll-margin-top: 80px;
}
.prod-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.prod-post-status { font-size: 10px; }
.prod-post-edit textarea {
  width: 100%;
  min-height: 110px;
  font-family: "Harmonia", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.55);
  color: var(--text);
  resize: vertical;
}
.prod-post-edit textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(53, 102, 146, 0.20);
}
.prod-post-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   SCHEDULE (Buffer-style Queue + Slots)
   ============================================================ */
.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  flex-wrap: wrap;
}
.schedule-week-label {
  font-family: "Cy", sans-serif;
  font-size: 16px;
  letter-spacing: 0.005em;
  min-width: 160px;
  text-align: center;
  color: var(--text);
}
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px;
}
.schedule-day {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.20);
  border-radius: 8px;
  min-height: 360px;
}
.schedule-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--rule);
}
.schedule-day-name {
  font-family: "Cy", sans-serif;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.schedule-day-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.schedule-day-count {
  font-family: "Cy", sans-serif;
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--text-faint);
}
.schedule-day-posts {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.schedule-post {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand-blue-light);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}
.schedule-post a { color: var(--text); text-decoration: none; display: block; }
.schedule-post a:hover { color: #fff; }
.schedule-post-time {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.schedule-post .platform-badge { font-size: 9px; padding: 2px 6px; }
.schedule-post-client { margin-top: 4px; font-size: 10px; }
.schedule-post-caption {
  margin-top: 4px;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}
.schedule-post-status { margin-top: 4px; }
.schedule-post.platform-instagram-bar { border-left-color: #d6249f; }
.schedule-post.platform-facebook-bar  { border-left-color: #1877F2; }
.schedule-post.platform-linkedin-bar  { border-left-color: #0A66C2; }
.schedule-post.platform-tiktok-bar    { border-left-color: #fff; }
.schedule-day-empty {
  padding: 12px;
  color: var(--text-faint);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
  .schedule-day { min-height: 220px; }
}
@media (max-width: 600px) {
  .schedule-grid { grid-template-columns: 1fr; }
}

/* ----- Slot-Editor Tabelle ----- */
.slots-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 13px;
}
.slots-grid th {
  font-family: "Cy", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 4px;
  text-align: center;
  font-weight: 700;
}
.slots-grid td {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 6px;
  vertical-align: top;
}
.slots-grid td:first-child {
  background: transparent;
  border: 0;
  text-align: center;
  vertical-align: middle;
}
.slot-pill-form { display: inline-block; margin: 2px; }
.slot-pill {
  background: rgba(53, 102, 146, 0.40);
  border: 1px solid rgba(53, 102, 146, 0.60);
  color: #fff;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease;
}
.slot-pill:hover {
  background: rgba(226, 94, 94, 0.40);
  border-color: rgba(226, 94, 94, 0.60);
}
.slot-add {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}
.slot-add input[type="time"] {
  flex: 1;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  min-width: 80px;
}
.slot-add-btn {
  background: var(--brand-orange);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 3px 9px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.slot-add-btn:hover { background: var(--brand-orange-dark); }

/* ============================================================
   METRICOOL-LAYER: Heatmap + Plattform-Bars + Hashtag-Cloud
   ============================================================ */
.heatmap-grid {
  border-collapse: separate;
  border-spacing: 1px;
  width: 100%;
  margin-top: 8px;
}
.heatmap-hour-head, .heatmap-day-head {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 2px;
  text-align: center;
}
.heatmap-day-head { font-family: "Cy", sans-serif; font-size: 10px; padding-right: 6px; }
.heatmap-cell {
  width: 26px;
  height: 22px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  vertical-align: middle;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-monospace, Menlo, monospace;
}
.heatmap-cell:hover { outline: 1px solid var(--brand-blue-light); }

.platform-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.platform-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  align-items: center;
  gap: 10px;
}
.platform-bar-track {
  height: 14px;
  background: var(--surface-2);
  border-radius: 7px;
  overflow: hidden;
}
.platform-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-orange) 100%);
  border-radius: 7px;
}
.platform-bar-count {
  font-family: "Cy", sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

.hashtag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.hashtag-pill {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Harmonia", sans-serif;
  font-size: 13px;
  transition: background 120ms ease, border-color 120ms ease;
}
.hashtag-pill:hover {
  background: rgba(53, 102, 146, 0.30);
  border-color: rgba(53, 102, 146, 0.55);
  color: #fff;
}
.hashtag-pill.is-copied {
  background: rgba(76, 175, 109, 0.35);
  border-color: rgba(76, 175, 109, 0.65);
  color: #fff;
}

/* ============================================================
   GEO-MARKETING (Karte + Keyword-Editoren)
   ============================================================ */
.geo-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 1100px) {
  .geo-detail-grid { grid-template-columns: 1fr 1fr; }
  .geo-detail-grid > section:first-child { grid-column: 1 / -1; }
}
.geo-map-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.20);
}
.geo-map {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
  filter: invert(0.92) hue-rotate(180deg) saturate(0.6);
}

/* ============================================================
   NEWSLETTER / E-MAIL-MARKETING
   ============================================================ */
.pill-status-sending  { background: rgba(53,102,146,0.30); color: #fff; border-color: rgba(53,102,146,0.55); }
.pill-status-sent     { background: rgba(76,175,109,0.18); color: var(--green); border-color: rgba(76,175,109,0.45); }
.pill-status-draft    { background: var(--surface-2); color: var(--text-muted); }
.pill-status-approved { background: rgba(53,102,146,0.18); color: var(--brand-blue-light); border-color: rgba(53,102,146,0.45); }
.pill-status-failed   { background: rgba(226,94,94,0.18); color: var(--red); border-color: rgba(226,94,94,0.45); }
.pill-status-unsubscribed { background: var(--surface-1); color: var(--text-faint); }
.pill-status-bounced { background: rgba(226,94,94,0.18); color: var(--red); border-color: rgba(226,94,94,0.45); }
.pill-status-overdue   { background: rgba(226,94,94,0.18); color: var(--red); border-color: rgba(226,94,94,0.45); font-weight: 700; }
.pill-status-paid      { background: rgba(76,175,109,0.18); color: var(--green); border-color: rgba(76,175,109,0.45); }
.pill-status-cancelled { background: var(--surface-1); color: var(--text-faint); }
.pill-status-archived  { background: var(--surface-1); color: var(--text-faint); }
.pill-status-rejected  { background: rgba(226,94,94,0.18); color: var(--red); border-color: rgba(226,94,94,0.45); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
}

/* ============================================================
   RESPONSIVE — mobile drawer
   ============================================================ */
@media (max-width: 900px) {
  .nav-burger { display: inline-block; }
  body.shell .topbar { grid-template-columns: auto auto 1fr auto; }
  .topbar-crumbs { display: none; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    width: 280px;
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .nav-scrim { display: block; }
  body.shell .content {
    margin-left: 0;
    padding: 16px 16px 56px;
  }
}

/* mobile tweaks (forms / kv / cards) */
@media (max-width: 600px) {
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-top: 8px; }
  .kv dd { padding-bottom: 4px; border-top: 0; }
  .kv dt:first-child { padding-top: 0; }
  .card { padding: 14px 16px; }
}


/* ════════════════════════════════════════════════════════════════════
   TAKOMA OS · DARK-GLASS POLISH v3   (2026-05-31)
   ────────────────────────────────────────────────────────────────────
   EINE additive Schicht auf der dunklen Brand-Basis. KEINE Theme-Wechsel,
   KEINE Textfarben-Eingriffe (Templates sind dark-authored → helle Texte
   bleiben lesbar). Nur Politur: präsenteres Glas, weichere Tiefe, runde
   Kanten, sanfter Hover-Lift, ruhigere Chrome, klarer Fokus.
   Referenz: Pinterest-Wetter-Dashboard (Dark-Glassmorphism).
   ════════════════════════════════════════════════════════════════════ */

/* ─── Ruhigere, edlere Chrome (Topbar) ───────────────────────────── */
body.shell .topbar {
  background: linear-gradient(180deg, rgba(22,27,36,0.92) 0%, rgba(16,20,28,0.88) 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 26px -14px rgba(0,0,0,0.7) !important;
}

/* ─── Sidebar: ruhiger Deep-Core-Verlauf mit zartem Blau-Glow unten ─ */
body.shell .sidebar {
  background:
    radial-gradient(ellipse 540px 600px at 0% 102%, rgba(53,102,146,0.34), transparent 64%),
    radial-gradient(ellipse 360px 420px at 0% 78%, rgba(173,213,244,0.08), transparent 70%),
    linear-gradient(180deg, rgba(22,27,36,0.96) 0%, rgba(16,20,28,0.94) 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.07) !important;
}
body.shell .sidenav-link { border-radius: 10px; transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease; }
body.shell .sidenav-link.is-active {
  background: linear-gradient(90deg, rgba(53,102,146,0.78), rgba(40,78,114,0.55)) !important;
  box-shadow: inset 3px 0 0 var(--brand-orange), 0 6px 18px -8px rgba(53,102,146,0.6) !important;
}

/* ─── Karten: präsenteres Glas, runder, weiche Tiefe, Hover-Lift ─── */
body.shell .card,
body.shell .mod-card,
body.shell .mod-tile,
body.shell .today-tile,
body.shell .count,
body.shell .dash-hero,
body.shell .cw-card,
body.shell .cw-form-wrap,
body.shell .imp-wrap,
body.shell .wf-progress,
body.shell .wf-phase {
  background: rgba(255,255,255,0.055) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 16px !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 14px 36px -18px rgba(0,0,0,0.72) !important;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
body.shell .card:hover,
body.shell .mod-card:hover,
body.shell .mod-tile:hover,
body.shell .today-tile:hover,
body.shell .cw-card:hover {
  transform: translateY(-2px);
  border-color: rgba(53,102,146,0.50) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 20px 46px -18px rgba(0,0,0,0.78),
    0 10px 30px -14px rgba(53,102,146,0.45) !important;
}

/* ─── Tabellen: runder Container + klarer Zeilen-Hover ───────────── */
body.shell .tbl {
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 14px 36px -20px rgba(0,0,0,0.7) !important;
}
body.shell .tbl thead th { background: rgba(255,255,255,0.035) !important; }
body.shell .tbl tbody tr { transition: background 110ms ease; }
body.shell .tbl tbody tr:hover { background: rgba(255,255,255,0.045) !important; }

/* ─── Buttons: runder + sanfter Hover-Lift (Brand-Farben bleiben) ── */
body.shell .btn { border-radius: 10px; transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease; }
body.shell .btn:hover { transform: translateY(-1px); }
body.shell .btn.small { border-radius: 8px; }

/* ─── Inputs: runder + klarer Brand-Fokusring ────────────────────── */
body.shell input[type=text], body.shell input[type=email], body.shell input[type=url],
body.shell input[type=number], body.shell input[type=password], body.shell input[type=search],
body.shell input[type=date], body.shell input[type=datetime-local], body.shell input[type=tel],
body.shell textarea, body.shell select { border-radius: 10px; }
body.shell input:focus, body.shell textarea:focus, body.shell select:focus {
  border-color: var(--brand-blue) !important;
  box-shadow: 0 0 0 4px rgba(53,102,146,0.28) !important;
  outline: none !important;
}

/* ─── Sidebar: "in Vorbereitung"-Module (Stubs / ohne Live-Integration) ─ */
body.shell .sidenav-link.is-soon { opacity: 0.5; }
body.shell .sidenav-link.is-soon:hover { opacity: 0.85; }
body.shell .sidenav-link.is-soon.is-active { opacity: 1; }
body.shell .soon-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; line-height: 1.4;
  background: rgba(242,88,27,0.16); color: #ffb49a; border: 1px solid rgba(242,88,27,0.34);
}

/* ─── Topbar: globaler Kunden-Umschalter ─────────────────────────── */
body.shell .client-switch-form { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
body.shell .client-switch-ico { font-size: 13px; opacity: 0.7; }
body.shell .client-switch {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  color: #eef2f7 !important;
  border-radius: 8px !important;
  padding: 5px 10px !important;
  font-size: 12px; max-width: 220px; cursor: pointer;
}
body.shell .client-switch:focus {
  border-color: rgba(53,102,146,0.75) !important;
  box-shadow: 0 0 0 3px rgba(53,102,146,0.3) !important; outline: none !important;
}
body.shell .client-switch option { color: #1a1f29; }

/* ─── Bewegung respektieren ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.shell .card, body.shell .mod-card, body.shell .mod-tile,
  body.shell .today-tile, body.shell .btn, body.shell .sidenav-link { transition: none !important; }
  body.shell .card:hover, body.shell .mod-card:hover, body.shell .mod-tile:hover,
  body.shell .today-tile:hover, body.shell .btn:hover { transform: none !important; }
}
/* ════════════════════════ Ende Dark-Glass Polish v3 ══════════════ */
