/* =====================================================================
 * Hashtag-Review · Design-System (Website)
 * Marke: Lila #6C5CE7 · Business-Nav: dunkelblau · Admin-Nav: hell
 * ===================================================================== */
:root {
  --brand: #6C5CE7;
  --brand-600: #5a4bd4;
  --brand-50: #EEF0FF;
  --brand-100: #E2DEFF;

  --ink: #1A2138;
  --ink-2: #3A4256;
  --muted: #7A8197;
  --line: #ECEEF3;
  --bg: #F7F8FB;
  --card: #FFFFFF;

  --green: #16B97D;  --green-bg: #E7F8F1;
  --amber: #F5A623;  --amber-bg: #FEF3E2;
  --red: #EF5B5B;    --red-bg: #FDECEC;
  --blue: #4A9DFF;   --blue-bg: #EAF3FF;

  /* Business-Sidebar (dunkelblau) */
  --nav-bg: #151B2E;
  --nav-bg-2: #1C2440;
  --nav-text: #A7AFC6;
  --nav-active: #6C5CE7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,30,60,.04), 0 8px 24px rgba(20,30,60,.05);
  --shadow-lg: 0 12px 40px rgba(20,30,60,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- App-Layout (Dashboard) --------------------------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow-y: auto;
}
.content { flex: 1; min-width: 0; padding: 26px 30px 60px; }

/* ---------- Sidebar: Marke & Kontext ------------------------------- */
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand);
  color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center;
}
.brand-name { font-weight: 800; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--muted); }

.sidebar--dark { background: var(--nav-bg); color: #fff; }
.sidebar--dark .brand-sub { color: #8C93AD; }
.ctx-card { display: flex; align-items: center; gap: 10px; background: var(--nav-bg-2);
  border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.ctx-logo { width: 38px; height: 38px; border-radius: 10px; background: #0B1020; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ctx-name { font-weight: 700; font-size: 13px; color: #fff; }
.ctx-plan { font-size: 11px; color: #8C93AD; }
.verify-dot { color: #fff; background: var(--brand); border-radius: 50%; font-size: 9px;
  width: 14px; height: 14px; display: inline-grid; place-items: center; vertical-align: middle; }

/* ---------- Nav-Items ---------------------------------------------- */
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--nav-text); }
.nav-item .ic { width: 18px; height: 18px; }
.sidebar--dark .nav-item:hover { background: var(--nav-bg-2); color: #fff; }
.sidebar--dark .nav-item.is-active { background: var(--brand); color: #fff; }
.sidebar--light { background: #fff; border-right: 1px solid var(--line); }
.sidebar--light .nav-item { color: var(--ink-2); }
.sidebar--light .nav-item:hover { background: var(--bg); }
.sidebar--light .nav-item.is-active { background: var(--brand-50); color: var(--brand); }
.nav-badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.sidebar--light .nav-badge { background: var(--red); }

.sidebar__footer { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.promo { background: linear-gradient(160deg, #2A2350, #1C2440); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 14px; margin-bottom: 8px; }
.promo__title { font-weight: 800; font-size: 13px; }
.promo__text { font-size: 11.5px; color: #9aa1bb; margin: 5px 0 11px; line-height: 1.45; }
.user-chip { gap: 10px; }
.chip-name { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.chip-role { display: block; font-size: 11px; color: var(--muted); }

/* ---------- Topbar (Seitenkopf) ------------------------------------ */
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; }
.topbar .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.topbar__actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  font-weight: 700; font-size: 13.5px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(108,92,231,.28); }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn--danger { color: var(--red); border-color: var(--line); }
.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }

/* ---------- Cards & Grid ------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card__title { font-size: 16px; font-weight: 800; }
.card__hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: 1.15fr .92fr .92fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px){ .grid-3,.grid-4{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px){ .grid-2,.grid-3,.grid-4{ grid-template-columns: 1fr; } .content{ padding: 18px; } .sidebar{ display:none; } }

/* ---------- KPI ---------------------------------------------------- */
.kpi-row { display: flex; flex-wrap: wrap; gap: 26px; }
.kpi { min-width: 120px; }
.kpi__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 10px; }
.kpi__num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi__label { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.kpi__delta { font-size: 12px; font-weight: 700; margin-top: 6px; }
.delta-up { color: var(--green); } .delta-down { color: var(--red); }

/* ---------- Mini-KPI-Karten (Admin) -------------------------------- */
.statcard { display: flex; align-items: center; gap: 14px; }
.statcard__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.statcard__num { font-size: 24px; font-weight: 800; }
.statcard__label { color: var(--muted); font-size: 12.5px; }

/* ---------- Tabellen ----------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); font-weight: 700; padding: 0 12px 12px; }
.table td { padding: 13px 12px; border-top: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.table tr:hover td { background: #FAFAFD; }
.table--rows td { border-top: 1px solid var(--line); }
.cellflex { display: flex; align-items: center; gap: 11px; }

/* ---------- Badges & Status ---------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; }
.badge--green { background: var(--green-bg); color: #0E8A5E; }
.badge--amber { background: var(--amber-bg); color: #B4730E; }
.badge--red { background: var(--red-bg); color: #C53B3B; }
.badge--brand { background: var(--brand-50); color: var(--brand); }
.badge--gray { background: #F1F2F6; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------- Avatare ------------------------------------------------ */
.avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px; background: var(--brand); flex: none; }
.avatar--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.avatar--round { border-radius: 50%; }

/* ---------- Listenzeilen (Trending / Warnungen / KI) --------------- */
.listrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.listrow:first-child { border-top: 0; }
.listrow__tag { font-weight: 700; }
.listrow__pct { font-weight: 800; }
.spark { display: block; }
.medal { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.medal--1 { background: #F5C451; } .medal--2 { background: #C7CCD6; } .medal--3 { background: #D9925A; }
.rank-num { width: 24px; text-align: center; color: var(--muted); font-weight: 700; }

/* ---------- Donut --------------------------------------------------- */
.donut .donut-num { font-size: 26px; font-weight: 800; fill: var(--ink); }
.donut .donut-sub { font-size: 11px; fill: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 9px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend__val { margin-left: auto; font-weight: 700; }
.bar-label { font-size: 10px; fill: var(--muted); }

/* ---------- Sterne -------------------------------------------------- */
.stars { color: #E3E5EC; font-size: 14px; letter-spacing: 1px; }
.star--on { color: #F5C451; } .star--half { background: linear-gradient(90deg,#F5C451 50%,#E3E5EC 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Tabs --------------------------------------------------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 11px 0; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-size: 13.5px; }
.tab.is-active { color: var(--brand); border-color: var(--brand); }

/* ---------- Formulare ---------------------------------------------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, textarea.input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px;
  font: inherit; color: var(--ink); background: #fff; outline: none; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.searchbar { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 13px; }
.searchbar input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; }

/* Toggle */
.toggle { width: 42px; height: 24px; border-radius: 999px; background: #D7DAE3; position: relative; cursor: pointer; transition: .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.is-on { background: var(--brand); }
.toggle.is-on::after { left: 21px; }

/* ---------- Drawer (Detail-Seitenpanel) ---------------------------- */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 380px; background: #fff;
  border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 20px; overflow-y: auto;
  transform: translateX(100%); transition: transform .25s; z-index: 40; }
.drawer.is-open { transform: translateX(0); }
.drawer__overlay { position: fixed; inset: 0; background: rgba(20,30,60,.25); opacity: 0; pointer-events: none; transition: .25s; z-index: 39; }
.drawer__overlay.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Pagination --------------------------------------------- */
.pager { display: flex; align-items: center; gap: 6px; justify-content: center; }
.pager button { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.pager button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Breadcrumb --------------------------------------------- */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.crumbs a { font-weight: 600; }
.crumbs .sep { opacity: .5; }

/* ---------- Toast -------------------------------------------------- */
.toast-host { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 11px; font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: .3s; }
.toast--show { opacity: 1; transform: none; }
.toast--success { background: var(--green); } .toast--error { background: var(--red); } .toast--info { background: var(--brand); }

/* ---------- Hilfsklassen ------------------------------------------- */
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.link { color: var(--brand); font-weight: 700; cursor: pointer; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
