/* ============================================================
 * Mission Online-Business — Mitgliederbereich SPA
 * Design-Tokens: Türkis #09a5a2, Orange #f37721, Dunkel #1a1a1a
 * Keine externen Fonts (DSGVO), nur System-Fonts.
 * ============================================================ */

:root {
  --primary: #09a5a2;
  --primary-dark: #066b69;
  --primary-light: #e6f7f6;
  --accent: #f37721;
  --accent-dark: #d6651b;
  --accent-light: #fff0e3;
  --dark: #1a1a1a;
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #222;
  --muted: #777;
  --border: #e3e3e3;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); }

/* ── App-Shell ───────────────────────────────────────────── */
.app { min-height: 100%; display: flex; flex-direction: column; }

/* ── Splash (Initial-Load) ───────────────────────────────── */
.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  gap: 24px;
}
.splash-logo { height: 56px; opacity: 0.9; }
.splash-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login-Screen ────────────────────────────────────────── */
.login-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
}
.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  overflow: hidden;
}
.login-head {
  background: var(--dark);
  color: white;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-head img { height: 48px; }
.login-head h1 { margin: 0; font-size: 18px; font-weight: 600; }
.login-head .sub { margin: 2px 0 0; font-size: 13px; opacity: 0.7; }
.login-body { padding: 30px 32px; }
.login-body p.lead { margin: 0 0 22px; color: #555; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  background: white;
  font-family: inherit;
}
.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(9, 165, 162, 0.12);
}
.field input.mono {
  font-family: Menlo, Consolas, monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  transition: background 0.15s, opacity 0.15s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.btn-secondary:hover { background: var(--primary-light); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.btn-ghost:hover { background: #f3f3f3; }

.alert {
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error   { background: #ffebee; border-left: 4px solid #f44336; color: #c62828; }
.alert-warning { background: #fff3e0; border-left: 4px solid #ff9800; color: #e65100; }
.alert-info    { background: var(--primary-light); border-left: 4px solid var(--primary); color: var(--primary-dark); }

.login-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.login-footer a { color: var(--accent); text-decoration: none; margin: 0 4px; }
.login-footer a:hover { text-decoration: underline; }

/* ── Header (Dashboard + Tool-View) ──────────────────────── */
.header {
  background: var(--dark);
  color: white;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-logo { height: 36px; }
.header-title { flex: 1; min-width: 0; }
.header-title .brand { font-weight: 600; font-size: 15px; }
.header-title .meta { font-size: 12px; opacity: 0.65; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-greeting { font-size: 14px; opacity: 0.85; }
.tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 12px;
}
.tier-badge.basis { background: var(--primary-light); color: var(--primary-dark); }
.tier-badge.premium { background: var(--accent); color: white; }
/* Einheitlicher Header-Button (Meine Sammlung, Feedback, Logout) */
.header-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: background .15s, border-color .15s;
}
.header-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
  width: 100%;
}

/* ── Dashboard Grid ──────────────────────────────────────── */
.dashboard-intro {
  margin-bottom: 24px;
}
.dashboard-intro h2 { margin: 0 0 6px; font-size: 22px; color: var(--text); }
.dashboard-intro p { margin: 0; color: var(--muted); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid transparent;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.tool-card:hover:not(:disabled):not(.locked) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.tool-card.locked { cursor: not-allowed; opacity: 0.65; }
.tool-card.locked:hover { transform: none; box-shadow: var(--shadow-sm); }
.tool-card.exhausted { border-color: #c62828; }
.tool-card { position: relative; }
.tool-order-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
}
.tool-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}
.tool-icon-letter {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

/* ── Kategorien-Sektionen ─────────────────────────────────────────────────── */
.tool-section { margin-top: 32px; }
.tool-section:first-of-type { margin-top: 8px; }
.section-head { margin-bottom: 14px; }
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text);
}
.section-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.section-placeholder {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 2px dashed var(--primary-light);
  color: var(--muted);
}
.coming-soon-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.tool-name { font-size: 16px; font-weight: 600; margin: 0; }
.tool-desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.tool-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.tool-quota .qq { font-weight: 600; color: var(--text); }
.tool-quota.warn .qq { color: #e65100; }
.tool-quota.danger .qq { color: #c62828; }
.lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;
}

.empty-state {
  background: white;
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.empty-state h3 { color: var(--text); margin: 0 0 10px; }

/* ── Tool-View ───────────────────────────────────────────── */
.tool-view-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tool-view-head h2 { margin: 0; font-size: 22px; }
.tool-view-head .desc { color: var(--muted); font-size: 14px; flex-basis: 100%; margin-top: 4px; }
.tool-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-height: 200px;
}
.tool-container .loading { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ── Tool-View mit Sidebar (ab 921px Sidebar fixed am linken Rand) ── */
.tool-view-grid {
  display: block;
}
.tool-view-main { min-width: 0; }
.tool-sidebar {
  background: var(--card-bg);
  padding: 18px 14px;
}
@media (min-width: 921px) {
  /* Container im Tool-View streckt sich über die volle Breite, Sidebar links fixed */
  .tool-view-container {
    max-width: none;
    margin: 0;
    padding-left: 264px;
    padding-right: 32px;
  }
  .tool-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 240px;
    border-radius: 0;
    border-right: 1px solid #e5e5e5;
    box-shadow: 2px 0 6px rgba(0,0,0,0.03);
    overflow-y: auto;
    z-index: 40;
  }
}
@media (max-width: 920px) {
  /* Auf schmalen Bildschirmen: Sidebar nach unten unter den Tool-Container */
  .tool-view-grid { display: flex; flex-direction: column; gap: 18px; }
  .tool-sidebar { order: 2; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
  .tool-view-main { order: 1; }
}
.tool-sidebar-section { margin-bottom: 18px; }
.tool-sidebar-section:last-child { margin-bottom: 0; }
.tool-sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 0 0 8px 8px;
}
.tool-sidebar-list { display: flex; flex-direction: column; gap: 2px; }
.tool-sidebar-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  transition: background .12s, color .12s;
}
.tool-sidebar-item:hover:not(.active):not(.locked) {
  background: var(--primary-light);
  color: var(--primary);
}
.tool-sidebar-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.tool-sidebar-item.locked { opacity: 0.5; cursor: not-allowed; }
.tool-sidebar-order {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.06);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  font-family: monospace;
}
.tool-sidebar-item.active .tool-sidebar-order {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.tool-sidebar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-sidebar-lock { font-size: 11px; opacity: 0.7; }
.tool-sidebar-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--muted);
}
.tool-sidebar-collection { font-weight: 600; }
.tool-sidebar-collection.active .tool-sidebar-icon { color: #fff; }
.tool-sidebar-item:hover:not(.active):not(.locked) .tool-sidebar-icon { color: var(--primary); }
.tool-sidebar-count {
  background: var(--accent, #f37721);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* Orange-Akzent-Button für „Auswahl-Modus" und ähnliche Highlight-Aktionen */
.btn-primary-accent {
  background: var(--accent, #f37721);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn-primary-accent:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-primary-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.tool-order-badge-inline {
  position: static;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  font-family: monospace;
}

/* ── Dashboard-Sidebar: Sammlung-Dokumente ────────────────── */
.docs-sidebar { padding: 14px 12px; }
.docs-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px 10px 6px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}
.docs-sidebar-head h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.docs-sidebar-open {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.docs-sidebar-open:hover { color: #088a87; }
.docs-sidebar-empty {
  color: #999;
  font-size: 12px;
  font-style: italic;
  padding: 8px 6px;
  margin: 0;
  line-height: 1.4;
}
.docs-sidebar-loading { display: flex; justify-content: center; }
.docs-sidebar-list { display: flex; flex-direction: column; gap: 2px; }
.docs-sidebar-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: inherit;
  transition: background .12s;
}
.docs-sidebar-item:hover {
  background: var(--primary-light);
}
.docs-sidebar-star {
  color: #f5b53d;
  font-size: 14px;
  width: 14px;
  flex-shrink: 0;
  line-height: 1.4;
}
.docs-sidebar-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.docs-sidebar-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-sidebar-item-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-sidebar-more {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 8px 4px 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.docs-sidebar-more:hover { text-decoration: underline; }

/* ── Header-Collection-Button ─────────────────────────────── */
.header-collection-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-collection-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
.header-collection-count {
  background: var(--accent, #f37721);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Collection-View ────────────────────────────────────── */
.collection-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.collection-head h2 { margin: 0; font-size: 22px; flex: 1; }
.collection-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.collection-search,
.collection-filter-tool,
.collection-filter-cat {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.collection-search { flex: 1; min-width: 200px; }
.collection-search:focus,
.collection-filter-tool:focus,
.collection-filter-cat:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(9,165,162,0.15);
}
.collection-selection-bar {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--primary);
  gap: 12px;
  flex-wrap: wrap;
}
.collection-selection-bar > div { display: flex; gap: 8px; flex-wrap: wrap; }
.collection-list { display: flex; flex-direction: column; gap: 10px; }
.collection-item {
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: all .15s;
}
.collection-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.collection-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.collection-item-check { padding-top: 4px; }
.collection-item-check input { width: 18px; height: 18px; cursor: pointer; }
.collection-item-fav {
  background: none;
  border: none;
  font-size: 22px;
  color: #ddd;
  cursor: pointer;
  padding: 4px 6px;
  transition: color .15s, transform .15s;
  flex-shrink: 0;
  align-self: flex-start;
}
.collection-item-fav:hover { color: #f5b53d; transform: scale(1.15); }
.collection-item-fav.is-fav { color: #f5b53d; }
.collection-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.collection-item-icon svg { width: 18px; height: 18px; stroke: currentColor; }
.collection-item-body { flex: 1; min-width: 0; }
.collection-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.collection-item-title { font-size: 15px; font-weight: 600; margin: 0; color: var(--text); }
.collection-item-tool { font-size: 12px; color: var(--muted); background: var(--primary-light); padding: 2px 8px; border-radius: 999px; }
.collection-item-preview { font-size: 13px; color: var(--muted); margin: 0 0 4px 0; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.collection-item-date { font-size: 11px; color: #999; }

/* Modal */
.collection-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.collection-modal-inner {
  background: #fff;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 60px rgba(0,0,0,0.3);
}
.collection-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.collection-modal-head h3 { margin: 0 0 4px 0; font-size: 18px; }
.collection-modal-meta { font-size: 12px; color: var(--muted); }
.collection-modal-close { background: none; border: none; font-size: 28px; color: #999; cursor: pointer; padding: 0 8px; line-height: 1; }
.collection-modal-close:hover { color: #333; }
.collection-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.65;
}
.collection-modal-body h1, .collection-modal-body h2, .collection-modal-body h3 { margin-top: 1em; margin-bottom: .4em; }
.collection-modal-body h1:first-child, .collection-modal-body h2:first-child, .collection-modal-body h3:first-child { margin-top: 0; }
.collection-modal-body pre { white-space: pre-wrap; word-wrap: break-word; background: #f4f4f4; padding: 10px 14px; border-radius: 6px; max-width: 100%; }
.collection-modal-body code { white-space: pre-wrap; word-wrap: break-word; }
.collection-modal-actions {
  padding: 12px 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--dark);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toast-in 0.2s ease-out;
}
.toast.success { background: #2e7d32; }
.toast.warning { background: #e65100; }
.toast.error { background: #c62828; }
.toast.info { background: var(--primary); }
.toast.fade-out { opacity: 0; transition: opacity 0.4s; }
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .header { padding: 0 14px; gap: 10px; }
  .header .user-greeting { display: none; }
  .container { padding: 20px 14px; }
  .login-head, .login-body { padding-left: 22px; padding-right: 22px; }
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .header-logo { height: 32px; }
  .header-title .brand { font-size: 13px; }
}

/* ── Dashboard: Übersichts-Kacheln (Akkordeon) ────────────── */
.overview-list { display: flex; flex-direction: column; gap: 14px; }
.overview-card {
  width: 100%;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.overview-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.overview-card.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transform: none;
}
.overview-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.overview-card-icon svg { width: 26px; height: 26px; stroke: currentColor; }
.overview-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.overview-card-title { font-size: 17px; font-weight: 700; color: var(--text); }
.overview-card-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.overview-card-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.overview-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.overview-chevron { font-size: 22px; color: var(--muted); line-height: 1; transition: transform 0.15s, color 0.15s; }
.overview-card.open .overview-chevron { transform: rotate(90deg); color: var(--primary); }
.overview-panel {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-md);
}
.overview-panel .tool-grid { gap: 16px; }
@media (max-width: 560px) {
  .overview-card { padding: 14px 15px; gap: 12px; }
  .overview-card-icon { width: 40px; height: 40px; }
  .overview-card-sub { display: none; }
  .overview-card-count { display: none; }
}

/* ── Einheitliche Seitenleiste: Layout mit fixem Fuß ──────── */
.app-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.sb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 12px; }
.sb-foot {
  flex: 0 0 auto;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 8px 12px 10px;
  background: var(--card-bg);
}
@media (max-width: 920px) {
  /* In der Flow-Variante (schmal) darf die Leiste normal mitwachsen */
  .app-sidebar { overflow: visible; }
  .sb-scroll { overflow: visible; }
}

/* Kategorien in der Seitenleiste (einklappbar) */
.sb-cats { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.sb-cat-head {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.12s, color 0.12s;
}
.sb-cat-head:hover { background: var(--primary-light); color: var(--primary); }
.sb-cat.has-active > .sb-cat-head { color: var(--primary); }
.sb-cat-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}
.sb-cat-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.sb-cat-head:hover .sb-cat-icon,
.sb-cat.has-active > .sb-cat-head .sb-cat-icon { color: var(--primary); }
.sb-cat-title { flex: 1; min-width: 0; text-align: left; line-height: 1.3; }
.sb-cat-chevron { flex-shrink: 0; color: var(--muted); font-size: 16px; line-height: 1; transition: transform 0.15s; }
.sb-cat.open > .sb-cat-head .sb-cat-chevron { transform: rotate(90deg); }
.sb-cat-body .tool-sidebar-list { padding: 2px 0 6px 30px; }
.sb-cat-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 2px 0 8px 30px;
}

/* Fußbereich: Feedback + Benutzerkonto */
.sb-account { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px; }
.sb-account-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-account-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-account-mail { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.sb-logout:hover { border-color: var(--accent); color: var(--accent); }
