/* KINTEC Pro – Design System (Apple/Linear-inspiriert) */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #9b9ba0;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --accent-hover: #0077ed;
  --green: #1db954;
  --green-soft: rgba(29, 185, 84, 0.12);
  --orange: #e8871e;
  --orange-soft: rgba(232, 135, 30, 0.12);
  --red: #e0245e;
  --red-soft: rgba(224, 36, 94, 0.1);
  --violet: #7c5cff;
  --violet-soft: rgba(124, 92, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 232px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #101014;
  --surface: #1a1a20;
  --surface-2: #222229;
  --text: #f2f2f4;
  --text-2: #a3a3ac;
  --text-3: #6e6e78;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.16);
  --accent-hover: #3aa1ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
::placeholder { color: var(--text-3); }
svg { display: block; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  position: fixed; top: 0; bottom: 0; left: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 12px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #0071e3, #42a1ff);
  color: #fff; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.35);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-name span { color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 0; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 14px;
  border: none; background: none; text-align: left; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm); }
.user-chip .meta { min-width: 0; }
.user-chip .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.searchbox { flex: 1; max-width: 520px; position: relative; }
.searchbox svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.searchbox input {
  width: 100%; padding: 9px 14px 9px 38px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; flex: 0 0 auto; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 39; }
.sidebar-backdrop.show { display: block; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; stroke-width: 1.8; }

.content { padding: 26px 28px 48px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.page-head .sub { color: var(--text-2); margin-top: 3px; }

/* ---------- Komponenten ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card h3 { font-size: 15px; font-weight: 650; margin-bottom: 12px; letter-spacing: -0.01em; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px;
  background: var(--accent); color: #fff;
  transition: all 0.15s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3); }
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { box-shadow: var(--shadow-sm); background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); box-shadow: none; }
.btn.danger { background: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.orange { background: var(--orange-soft); color: var(--orange); border-color: transparent; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.rel-del {
  border: none; background: transparent; color: inherit; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 0 0 2px; margin-left: 1px; opacity: 0.6;
}
.rel-del:hover { opacity: 1; color: var(--red); }

.avatar {
  border-radius: 12px; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: -0.02em;
  text-transform: uppercase;
}

input.field, select.field, textarea.field {
  width: 100%; padding: 9px 13px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input.field:focus, select.field:focus, textarea.field:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.field { resize: vertical; min-height: 90px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 70% -10%, var(--accent-soft), transparent), var(--bg);
  padding: 24px;
}
.login-card { width: 420px; max-width: 100%; padding: 36px; }
.login-card .brand { justify-content: center; padding-bottom: 8px; }
.login-card h1 { font-size: 22px; text-align: center; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--text-2); margin-bottom: 24px; font-size: 13.5px; }
.demo-hint {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); font-size: 13px; color: var(--text-2);
}
.demo-hint b { color: var(--text); }
.login-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--text-2); }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; }
.stat .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stat .label svg { width: 15px; height: 15px; stroke-width: 1.8; color: var(--accent); }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; }
.stat .hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 13.5px; }
.list-row .sub { font-size: 12.5px; color: var(--text-2); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ---------- Verzeichnis ---------- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 16px; margin-bottom: 18px;
}
.filter-bar select, .filter-bar input { max-width: 190px; }
.view-toggle { margin-left: auto; display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.view-toggle button {
  border: none; background: none; padding: 5px 11px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.view-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.company-card { padding: 20px; cursor: pointer; transition: transform 0.16s, box-shadow 0.16s; }
.company-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.company-card .head { display: flex; gap: 13px; align-items: center; margin-bottom: 12px; }
.company-card h3 { margin: 0; font-size: 15.5px; }
.company-card .loc { font-size: 12.5px; color: var(--text-2); }
.company-card .desc {
  font-size: 13px; color: var(--text-2); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.company-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.company-list .list-row { padding: 13px 18px; cursor: pointer; }
.company-list .list-row:hover { background: var(--surface-2); }
.rating-star { color: #f5a623; }

/* ---------- Company Place ---------- */
.place-hero { padding: 26px; margin-bottom: 16px; }
.place-hero .top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.place-hero h1 { font-size: 24px; letter-spacing: -0.03em; }
.place-hero .tagline { color: var(--text-2); margin-top: 2px; }
.place-hero .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.place-hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  border: none; background: none; padding: 10px 15px;
  font-weight: 600; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.place-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 16px; align-items: start; }
.info-list { display: grid; gap: 9px; font-size: 13.5px; }
.info-list .row { display: flex; gap: 10px; }
.info-list .k { width: 130px; color: var(--text-2); flex-shrink: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
.product-card { padding: 17px; }
.product-card .pic {
  height: 120px; border-radius: 10px; margin-bottom: 12px;
  background-color: var(--surface-2); background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px; color: #fff; letter-spacing: -0.02em;
}
.product-card h4 { font-size: 14px; margin-bottom: 4px; }
.product-card .price { font-weight: 700; margin-top: 8px; }
.product-card .specs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border: none; }
.review .head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.review .who { font-weight: 600; font-size: 13.5px; }
.score-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.stars { color: #f5a623; letter-spacing: 1px; font-size: 13px; }

/* ---------- Netzwerk ---------- */
.network-wrap { position: relative; }
.network-svg { width: 100%; height: 620px; border-radius: var(--radius); }
.net-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 16px; font-size: 12.5px; color: var(--text-2); }
.net-legend .item { display: flex; align-items: center; gap: 6px; }
.net-legend .line { width: 18px; height: 3px; border-radius: 2px; }
.net-node { cursor: pointer; }
.net-node text { fill: var(--text); font-size: 11px; font-weight: 600; }
.net-node circle { transition: r 0.15s; }
.net-node:hover circle { stroke-width: 3; }

/* ---------- Nachrichten ---------- */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 170px); min-height: 480px; overflow: hidden; }
.conv-list { border-right: 1px solid var(--border); overflow-y: auto; }
.conv-item { display: flex; gap: 11px; padding: 13px 16px; cursor: pointer; border-bottom: 1px solid var(--border); align-items: center; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--accent-soft); }
.conv-item .grow { min-width: 0; flex: 1; }
.conv-item .name { font-weight: 600; font-size: 13.5px; }
.conv-item .preview { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 13px 18px; border-bottom: 1px solid var(--border); display: flex; gap: 11px; align-items: center; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 68%; padding: 9px 14px; border-radius: 16px; font-size: 13.5px; }
.bubble .who { font-size: 11px; font-weight: 600; opacity: 0.7; margin-bottom: 2px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bubble .time { font-size: 10.5px; opacity: 0.6; margin-top: 3px; text-align: right; }
.chat-input { display: flex; gap: 9px; padding: 13px 16px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-3); flex-direction: column; gap: 10px; }

/* ---------- Aufgaben ---------- */
.task-row { display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.task-row:last-child { border: none; }
.task-check {
  width: 21px; height: 21px; border-radius: 7px; border: 1.5px solid var(--border-strong);
  background: none; display: flex; align-items: center; justify-content: center;
  color: transparent; flex-shrink: 0; transition: all 0.15s;
}
.task-check:hover { border-color: var(--green); }
.task-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.task-check svg { width: 13px; height: 13px; stroke-width: 3; }
.task-row.done .title { text-decoration: line-through; color: var(--text-3); }
.due { font-size: 12px; font-weight: 600; }
.due.overdue { color: var(--red); }
.due.today { color: var(--orange); }

/* ---------- Modal & Toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal {
  width: 520px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 26px; animation: popIn 0.18s ease;
}
.modal h2 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--text); color: var(--bg);
  padding: 10px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: popIn 0.2s ease;
}

/* ---------- Suche ---------- */
.search-section { margin-bottom: 22px; }
.search-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 9px; }

.empty {
  padding: 42px 20px; text-align: center; color: var(--text-3);
}
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; stroke-width: 1.4; opacity: 0.6; }

.assistant-box { background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); border: 1px solid var(--border); }
.assistant-box .line { margin-bottom: 8px; font-size: 13.5px; }
.assistant-box .line:last-child { font-size: 12px; color: var(--text-3); margin-top: 12px; margin-bottom: 0; }

/* ---------- Social Feed ---------- */
.feed-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 16px; max-width: 1140px; margin: 0 auto; align-items: start;
}
.feed-left, .feed-right { position: sticky; top: 78px; display: grid; gap: 16px; }
.feed-center { min-width: 0; }
.mini-profile { overflow: hidden; text-align: center; padding-bottom: 16px; }
.mp-cover { height: 58px; }
.mini-profile > .avatar { margin: -28px auto 8px; border: 3px solid var(--surface); }
.mp-name { font-weight: 700; font-size: 14.5px; padding: 0 12px; }
.mp-sub { font-size: 12.5px; color: var(--text-2); }
.mp-stats { display: flex; margin: 12px 10px 0; border-top: 1px solid var(--border); padding-top: 10px; }
.mp-stats .st { flex: 1; }
.mp-stats .v { font-weight: 700; font-size: 15px; }
.mp-stats .l { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px; margin-bottom: 16px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; color: var(--text); }
.story-ring {
  border-radius: 50%; padding: 3px; display: block;
  background: conic-gradient(from 210deg, #f5a623, #e0245e, #7c5cff, #0071e3, #f5a623);
}
.story-ring .avatar { border: 2.5px solid var(--surface); border-radius: 50% !important; }
.story-name { font-size: 11px; color: var(--text-2); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story:hover .story-name { color: var(--text); }

.composer { padding: 16px; margin-bottom: 16px; }
.composer textarea {
  border: none; background: var(--surface-2); border-radius: 14px;
  padding: 12px 15px; width: 100%; resize: none; outline: none; min-height: 54px;
}
.composer textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

.feed-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.feed-tab {
  border: 1px solid var(--border); background: var(--surface);
  padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--text-2);
  transition: all 0.15s;
}
.feed-tab.active { background: var(--text); color: var(--bg); border-color: transparent; }

.post { margin-bottom: 16px; overflow: hidden; }
.post-head { display: flex; gap: 11px; padding: 15px 17px 0; align-items: flex-start; }
.post-head .pname { font-weight: 700; color: var(--text); font-size: 14px; }
.post-head .pname:hover { color: var(--accent); }
.post-head .psub { font-size: 12px; color: var(--text-2); }
.post-head .ptime { font-size: 11.5px; color: var(--text-3); }
.post-body { padding: 11px 17px 13px; font-size: 14px; line-height: 1.55; }
.post-media {
  height: 280px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 27px; letter-spacing: -0.02em;
  text-align: center; padding: 0 24px; text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.post-stats { display: flex; padding: 8px 17px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); min-height: 33px; align-items: center; }
.post-actions { display: flex; padding: 4px 8px; }
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border: none; background: none; border-radius: 9px;
  font-weight: 600; font-size: 13px; color: var(--text-2); transition: all 0.12s;
}
.post-action:hover { background: var(--surface-2); color: var(--text); }
.post-action.liked { color: var(--accent); }
.comments { padding: 12px 17px 15px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.comment { display: flex; gap: 9px; align-items: flex-start; }
.cbubble { background: var(--surface-2); border-radius: 13px; padding: 8px 13px; font-size: 13px; flex: 1; }
.cbubble b { font-size: 12.5px; }
.cbubble .ctime { color: var(--text-3); font-size: 11px; margin-left: 7px; }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form input { flex: 1; }

.suggest-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.suggest-row:last-child { border-bottom: none; }

.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center;
}

/* Company Place – Social Hero */
.place-hero.social { padding: 0; overflow: hidden; }
.place-cover { height: 150px; }
.place-hero.social .top { padding: 0 26px 22px; align-items: flex-start; }
.place-hero.social .top > .avatar { margin-top: -40px; border: 4px solid var(--surface); box-shadow: var(--shadow-sm); }
.place-hero.social h1 { margin-top: 14px; }
.place-hero.social .actions { margin-top: 16px; }

/* Logo per Drag&Drop / Klick auf dem eigenen Header ändern */
.place-hero.social .top > .logo-drop { margin-top: -40px; }
.logo-drop {
  position: relative; flex-shrink: 0; cursor: pointer; border-radius: 14px;
  outline: 2px dashed transparent; outline-offset: 3px; transition: outline-color 0.15s;
}
.logo-drop > .avatar { border: 4px solid var(--surface); box-shadow: var(--shadow-sm); }
.logo-drop-hint {
  position: absolute; inset: 4px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; font-weight: 600; text-align: center;
  opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
.logo-drop:hover .logo-drop-hint,
.logo-drop.busy .logo-drop-hint { opacity: 1; }
.logo-drop.drag { outline-color: var(--accent); }
.logo-drop.drag .logo-drop-hint { opacity: 1; background: rgba(0,0,0,0.35); }
.follow-stats { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.follow-stats b { color: var(--text); }

/* ---------- Tabellen (Devices/Fleet) ---------- */
.tbl-head, .tbl-row { display: grid; gap: 12px; align-items: center; padding: 12px 18px; }
.tbl-head { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); border-bottom: 1px solid var(--border); }
.tbl-row { border-bottom: 1px solid var(--border); }
.tbl-row:last-child { border-bottom: none; }
.tbl-row .title { font-weight: 600; font-size: 13.5px; }
.tbl-row .sub { font-size: 12px; color: var(--text-2); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-2); }

/* ---------- Produkt-Detailseite (digitec/Apple-Stil) ---------- */
.prod-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.prod-media { padding: 20px; }
.prod-main {
  aspect-ratio: 1/1; border-radius: 16px; background: var(--surface-2);
  background-size: contain; background-repeat: no-repeat; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.prod-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.prod-thumb {
  width: 64px; height: 64px; border-radius: 10px; background: var(--surface-2);
  background-size: contain; background-repeat: no-repeat; background-position: center;
  border: 1.5px solid var(--border); cursor: pointer; transition: border-color 0.15s;
}
.prod-thumb.active { border-color: var(--accent); }
.prod-buy { display: grid; gap: 16px; align-content: start; }
.prod-price { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-top: 14px; }
.prod-stockline { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.prod-stockline .dot { width: 9px; height: 9px; border-radius: 50%; }
.prod-stockline.in { color: var(--green); }
.prod-stockline.in .dot { background: var(--green); }
.prod-stockline.out { color: var(--text-3); }
.prod-stockline.out .dot { background: var(--text-3); }
.buy-box .qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spec-table { margin-top: 8px; border-top: 1px solid var(--border); }
.spec-row { padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.prod-info { margin-top: 20px; }
@media (max-width: 820px) { .prod-hero { grid-template-columns: 1fr; } }
.prod-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.prod-gallery:empty { display: none; }
.prod-img {
  position: relative; aspect-ratio: 4/3; border-radius: 12px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  border: 1px solid var(--border); background-color: var(--surface-2);
}
.prod-img:first-child { grid-column: span 2; grid-row: span 2; }
.prod-img-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.prod-img-del:hover { background: var(--red); }
.dropzone {
  margin-top: 12px; border: 2px dashed var(--border-strong); border-radius: 14px; padding: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  color: var(--text-2); transition: all 0.15s; cursor: default;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone svg { color: var(--text-3); }
.dropzone.drag svg { color: var(--accent); }

/* ---------- Produkt-Kategoriebaum ---------- */
.cat-tree { display: flex; flex-direction: column; gap: 2px; max-height: 72vh; overflow-y: auto; }
.cat-node {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 7px 8px; padding-left: calc(8px + var(--depth, 0) * 17px);
  border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text);
  transition: background 0.12s, opacity 0.12s; user-select: none;
}
.cat-node:hover { background: var(--surface-2); }
.cat-node.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cat-node.dragging { opacity: 0.4; }
.cat-node.drop-into { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cat-node.drop-before::before, .cat-node.drop-after::after {
  content: ''; position: absolute; left: calc(8px + var(--depth, 0) * 17px); right: 8px; height: 2px; border-radius: 2px; background: var(--accent);
}
.cat-node.drop-before::before { top: -1px; }
.cat-node.drop-after::after { bottom: -1px; }
.cat-toggle { width: 13px; text-align: center; color: var(--text-3); font-size: 10px; flex-shrink: 0; }
.cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-count { font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.cat-node.sel .cat-count { background: var(--surface); color: var(--accent); }
.cat-actions { display: none; gap: 2px; align-items: center; }
.cat-node:hover .cat-actions { display: flex; }
.cat-actions button {
  border: none; background: none; color: var(--text-3); cursor: pointer;
  width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.cat-actions button:hover { background: var(--surface); color: var(--text); }
.cat-actions button svg { width: 12px; height: 12px; }

/* ---------- Karte (Leaflet) ---------- */
#leaflet-map { z-index: 0; background: var(--surface-2); }
.lpin-wrap { background: transparent !important; border: none !important; }
.lpin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  color: #fff; font-weight: 700; font-size: 12px; letter-spacing: -0.02em;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.lpin > * { transform: rotate(45deg); }
.leaflet-popup-content { font: inherit; font-size: 13px; }
.leaflet-popup-content a { font-weight: 600; }
.leaflet-container { font: inherit; }

.notif-row { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: center; }
.notif-row:last-child { border-bottom: none; }
.notif-row.unread { background: var(--accent-soft); }

@media (max-width: 1150px) {
  .feed-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .feed-left { display: none; }
}
@media (max-width: 900px) {
  .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .feed-right { display: none; }
}

@media (max-width: 1000px) {
  .dash-grid, .place-grid { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .conv-list { display: none; }
  .chat-layout.list-mode .conv-list { display: block; }
  .chat-layout.list-mode .chat-pane { display: none; }
}
@media (max-width: 780px) {
  .main { margin-left: 0; }
  /* Sidebar wird zum ausblendbaren Drawer */
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: 0 0 40px rgba(0,0,0,0.25); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .topbar { padding: 12px 16px; }
}

/* ---------- Private/interne Beiträge ---------- */
.ip-composer .dropzone { padding: 18px; }
.ip-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ip-thumbs:empty { margin-top: 0; }
.ip-thumb {
  position: relative; width: 84px; height: 84px; border-radius: 10px;
  background-size: cover; background-position: center; border: 1px solid var(--border);
}
.ip-thumb-del {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: var(--text-1); color: var(--bg); display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ip-thumb-del svg { width: 12px; height: 12px; }
.ip-time { font-size: 12px; color: var(--text-3); }
.ip-text { color: var(--text-1); font-size: 14px; line-height: 1.55; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.ip-img {
  aspect-ratio: 1 / 1; border-radius: 10px; background-size: cover; background-position: center;
  border: 1px solid var(--border); cursor: zoom-in; transition: transform 0.12s;
}
.ip-img:hover { transform: scale(1.02); }
.modal-backdrop.lightbox { align-items: center; justify-content: center; }
.lightbox-img {
  max-width: 92vw; max-height: 90vh; border-radius: 12px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: zoom-out;
}
