/* ============================================================
   VARIABLEN — LIGHT MODE
   ============================================================ */
:root {
  --primary:        #3A7CA5;
  --primary-hover:  #2D6287;
  --primary-light:  #EBF4FA;
  --accent:         #5DA86A;
  --accent-hover:   #4A9058;

  --sidebar-bg:     #1B2B3B;
  --sidebar-text:   #B8CCD8;
  --sidebar-hover:  #253D50;
  --sidebar-active: #3A7CA5;
  --sidebar-width:  250px;

  --bg:             #F0F4F8;
  --card-bg:        #FFFFFF;
  --border:         #DDE5EE;
  --text:           #2C3E50;
  --text-muted:     #6B808F;
  --text-light:     #8FA5B3;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow:    0 2px 10px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.14);
  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --status-open:        #3B82F6;
  --status-open-bg:     #EFF6FF;
  --status-progress:    #F59E0B;
  --status-progress-bg: #FFFBEB;
  --status-done:        #10B981;
  --status-done-bg:     #ECFDF5;
  --status-overdue:     #EF4444;
  --status-overdue-bg:  #FEF2F2;
  --status-deferred:    #8B5CF6;
  --status-deferred-bg: #F5F3FF;
  --prio-low:    #6B7280;
  --prio-medium: #F59E0B;
  --prio-high:   #EF4444;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --primary:        #5BA3C5;
  --primary-hover:  #7BBFD9;
  --primary-light:  #1A3347;

  --sidebar-bg:     #0D1B2A;
  --sidebar-text:   #7A9BB0;
  --sidebar-hover:  #1A2E40;
  --sidebar-active: #2A5A7A;

  --bg:             #111D28;
  --card-bg:        #182535;
  --border:         #243344;
  --text:           #D4E5F2;
  --text-muted:     #6A8DA3;
  --text-light:     #3D6070;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25);
  --shadow:    0 2px 10px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);

  --status-open-bg:     #1A2840;
  --status-progress-bg: #2A2010;
  --status-done-bg:     #0F2518;
  --status-overdue-bg:  #2A1010;
  --status-deferred-bg: #1E1830;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; }
body  {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}
a             { color: var(--primary); text-decoration: none; }
a:hover       { text-decoration: underline; }
button        { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); background: var(--card-bg); }
ul, ol        { list-style: none; }

/* ============================================================
   LOGIN-OVERLAY
   ============================================================ */
#login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--sidebar-bg);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
#login-overlay.visible { display: flex; }

#login-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
#login-icon  { font-size: 3rem; margin-bottom: 12px; }
#login-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
#login-sub   { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }
.login-error { color: var(--status-overdue); font-size: 0.83rem; min-height: 20px; margin-top: 6px; }
#login-password { text-align: center; letter-spacing: 2px; font-size: 1rem; }

/* ============================================================
   LAYOUT
   ============================================================ */
#app { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease, background 0.2s;
}

#sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#brand-icon  { font-size: 1.9rem; flex-shrink: 0; }
#brand-title { font-size: 0.93rem; font-weight: 700; color: #fff; line-height: 1.2; }
#brand-sub   { font-size: 0.7rem; opacity: 0.65; margin-top: 2px; }

/* Nutzer-Anzeige */
#user-bar {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#user-bar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--sidebar-text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
}
#user-bar-btn:hover { background: rgba(255,255,255,0.10); }
#user-avatar   { font-size: 1rem; flex-shrink: 0; }
#user-name-display { flex: 1; text-align: left; }
#user-change-hint  { opacity: 0.5; font-size: 0.9rem; }

/* Suchfeld */
#sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#search-icon { font-size: 0.95rem; opacity: 0.5; flex-shrink: 0; }
#search-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--sidebar-text);
  font-size: 0.83rem;
}
#search-input::placeholder { color: var(--sidebar-text); opacity: 0.5; }
#search-input:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.1); }

#nav-list { flex: 1; padding: 10px 0; }
#nav-list li { margin: 2px 10px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  position: relative;
}
.nav-link:hover         { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-link.active        { background: var(--sidebar-active); color: #fff; }
.nav-icon               { font-size: 1.05rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-label              { flex: 1; }
.nav-badge {
  background: var(--status-overdue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  display: none;
}
.nav-badge:not(:empty) { display: inline-block; }

#sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#dark-mode-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 1rem;
  color: var(--sidebar-text);
  transition: background 0.15s;
}
#dark-mode-btn:hover { background: rgba(255,255,255,0.14); }
#logout-btn {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.78rem;
  color: #F87171;
  transition: background 0.15s;
}
#logout-btn:hover { background: rgba(239,68,68,0.2); }
#sidebar-footer small { flex: 1; opacity: 0.4; font-size: 0.72rem; text-align: right; }

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
#mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 101;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
  box-shadow: var(--shadow);
}
#burger-btn {
  background: none; border: none; padding: 6px;
  display: flex; flex-direction: column; gap: 5px; cursor: pointer;
}
#burger-btn span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
#mobile-kita-name { font-weight: 700; font-size: 1rem; color: #fff; flex: 1; }
#mobile-search-btn { background: none; border: none; font-size: 1.3rem; color: #fff; padding: 4px 6px; }

/* ============================================================
   HAUPTBEREICH
   ============================================================ */
#main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#page-content {
  padding: 28px 30px;
  max-width: 1100px;
  flex: 1;
  padding-bottom: 64px;
}

#sticky-footer {
  position: sticky;
  bottom: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 10px 24px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.footer-nav-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.footer-nav-link:hover { color: var(--primary); background: var(--primary-light); }
.footer-nav-link.active { color: var(--primary); font-weight: 600; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; }

/* ============================================================
   KARTEN
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 20px;
}
.card-title {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: none; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s, opacity 0.15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); }
.btn-danger  { background: var(--status-overdue-bg); color: var(--status-overdue); }
.btn-danger:hover  { background: #fecaca; }
.btn-ghost   { background: transparent; color: var(--text-muted); border: none; padding: 6px 10px; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm   { padding: 5px 12px; font-size: 0.8rem; }
.btn-icon { padding: 6px 10px; font-size: 1rem; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   FORMULARE
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-group label .req { color: var(--status-overdue); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(58,124,165,0.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border);
}

/* ============================================================
   FILTER-LEISTE
   ============================================================ */
.filter-bar {
  display: flex; gap: 10px; margin-bottom: 20px;
  flex-wrap: wrap; align-items: center;
}
.filter-bar select,
.filter-bar input {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.85rem;
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--primary); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-open      { background: var(--status-open-bg);      color: var(--status-open); }
.badge-progress  { background: var(--status-progress-bg);  color: var(--status-progress); }
.badge-done      { background: var(--status-done-bg);       color: var(--status-done); }
.badge-overdue   { background: var(--status-overdue-bg);   color: var(--status-overdue); }
.badge-deferred  { background: var(--status-deferred-bg);  color: var(--status-deferred); }
.badge-low       { background: var(--bg); color: var(--prio-low); }
.badge-medium    { background: var(--status-progress-bg);  color: var(--status-progress); }
.badge-high      { background: var(--status-overdue-bg);   color: var(--status-overdue); }
.badge-info      { background: var(--status-open-bg);      color: var(--status-open); }
.badge-urgent    { background: var(--status-overdue-bg);   color: var(--status-overdue); }
.badge-question  { background: var(--status-deferred-bg);  color: var(--status-deferred); }
.badge-decision  { background: var(--status-progress-bg);  color: var(--status-progress); }
.badge-archive   { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge-recurring { background: var(--status-done-bg); color: var(--status-done); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  font-size: 1.8rem; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--status-open-bg); }
.stat-icon.green  { background: var(--status-done-bg); }
.stat-icon.orange { background: var(--status-progress-bg); }
.stat-icon.red    { background: var(--status-overdue-bg); }
.stat-icon.purple { background: var(--status-deferred-bg); }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-header h2 { font-size: 1rem; font-weight: 700; }

/* ============================================================
   LISTEN-ELEMENTE
   ============================================================ */
.item-list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.list-item:hover { box-shadow: var(--shadow); }
.list-item.overdue { border-left: 4px solid var(--status-overdue); }
.list-item.urgent  { border-left: 4px solid var(--status-overdue); }
.list-item.done    { opacity: 0.6; }
.list-item.archived { opacity: 0.55; background: var(--bg); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-size: 0.93rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.item-meta  {
  font-size: 0.79rem; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px;
}
.item-desc  {
  font-size: 0.84rem; color: var(--text-muted);
  margin-top: 6px; white-space: pre-wrap; word-break: break-word;
}
.item-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: flex-start; }

/* Aufgaben */
.task-done .item-title { text-decoration: line-through; }
.task-check {
  width: 20px; height: 20px;
  border-radius: 5px; border: 2px solid var(--border);
  background: transparent; cursor: pointer; flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; color: transparent; font-size: 0.8rem;
}
.task-check:hover  { border-color: var(--primary); }
.task-check.checked { background: var(--accent); border-color: var(--accent); color: #fff; }
.overdue-label { color: var(--status-overdue); font-weight: 700; font-size: 0.78rem; }

/* Kommentare */
.comments-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.comments-section h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.comment-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  position: relative;
}
.comment-author { font-size: 0.8rem; font-weight: 700; color: var(--primary); }
.comment-date   { font-size: 0.75rem; color: var(--text-muted); margin-left: 8px; }
.comment-text   { font-size: 0.86rem; margin-top: 4px; white-space: pre-wrap; }
.comment-delete {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: var(--text-muted);
  font-size: 0.85rem; cursor: pointer; opacity: 0.6; padding: 2px 5px;
}
.comment-delete:hover { opacity: 1; color: var(--status-overdue); }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form textarea { flex: 1; min-height: 60px; resize: vertical; }

/* ============================================================
   NACHRICHTEN
   ============================================================ */
.message-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.message-card.urgent { border-left: 4px solid var(--status-overdue); }
.message-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.message-subject { font-weight: 700; font-size: 0.93rem; }
.message-body   { font-size: 0.87rem; color: var(--text-muted); white-space: pre-wrap; word-break: break-word; }
.message-meta   { font-size: 0.77rem; color: var(--text-light); margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   MODAL
   ============================================================ */
#modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 200;
  align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
#modal-overlay.open { display: flex; }
#modal-box {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px;
  animation: modal-in 0.2s ease;
  max-height: calc(100vh - 80px); overflow-y: auto;
  flex-shrink: 0;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
#modal-title { font-size: 1.08rem; font-weight: 700; }
#modal-close {
  background: none; border: none; font-size: 1.5rem; color: var(--text-muted);
  line-height: 1; padding: 2px 8px; cursor: pointer; border-radius: 4px;
}
#modal-close:hover { background: var(--bg); color: var(--text); }
#modal-body { padding: 18px 22px 22px; }

/* ============================================================
   KALENDER
   ============================================================ */
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.calendar-nav h2 { font-size: 1.1rem; font-weight: 700; }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 3px; margin-bottom: 3px;
}
.calendar-weekday {
  text-align: center; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); padding: 4px 0;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.calendar-day {
  min-height: 76px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 5px; overflow: hidden; cursor: default;
}
.calendar-day.other-month { opacity: 0.35; }
.calendar-day.today {
  border-color: var(--primary); border-width: 2px;
  background: var(--primary-light);
}
.calendar-day-num {
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 3px;
}
.calendar-day.today .calendar-day-num { color: var(--primary); }
.cal-event {
  background: var(--primary-light); color: var(--primary);
  border-radius: 3px; padding: 1px 4px;
  font-size: 0.68rem; margin-top: 2px;
  cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 600;
}
.cal-event:hover { background: var(--primary); color: #fff; }
.cal-event.recurring { background: var(--status-done-bg); color: var(--status-done); }
.cal-event.recurring:hover { background: var(--status-done); color: #fff; }

/* ============================================================
   PROTOKOLL
   ============================================================ */
.protocol-view {
  background: var(--bg); border-radius: var(--radius); padding: 18px;
  font-size: 0.85rem; white-space: pre-wrap; word-break: break-word;
  font-family: 'Courier New', Courier, monospace;
  border: 1px solid var(--border); max-height: 420px; overflow-y: auto;
  line-height: 1.7;
}
.protocol-actions { display: flex; gap: 10px; margin-bottom: 12px; }

/* ============================================================
   SITZUNGSDETAIL
   ============================================================ */
.meeting-section { margin-bottom: 22px; }
.meeting-section h3 {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.agenda-list { padding-left: 18px; list-style: decimal; }
.agenda-list li { padding: 4px 0; font-size: 0.9rem; }

.decision-item {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; gap: 12px; align-items: flex-start;
}
.decision-item-text { flex: 1; font-size: 0.88rem; }

/* Abstimmungs-Buttons */
.vote-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vote-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 10px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; gap: 4px;
}
.vote-btn.ja:hover        { background: var(--status-done-bg);     border-color: var(--status-done);    color: var(--status-done); }
.vote-btn.nein:hover      { background: var(--status-overdue-bg);  border-color: var(--status-overdue); color: var(--status-overdue); }
.vote-btn.enthaltung:hover{ background: var(--status-progress-bg); border-color: var(--status-progress);color: var(--status-progress); }
.vote-count { font-size: 0.85rem; }

/* ============================================================
   DYNAMISCHE LISTEN (Sitzungsformular)
   ============================================================ */
.dynamic-list { margin-bottom: 10px; }
.dynamic-list-item { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.dynamic-list-item .form-control { flex: 1; }
.btn-remove-item {
  background: var(--status-overdue-bg); border: none;
  color: var(--status-overdue); width: 30px; height: 30px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
}
.btn-remove-item:hover { background: #fecaca; }

/* ============================================================
   KONTAKTE & DOKUMENTE
   ============================================================ */
.contacts-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.documents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }

.contact-card, .document-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.contact-name    { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; }
.contact-role    { font-size: 0.82rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.contact-info    { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.contact-info a  { color: var(--primary); }
.contact-actions, .document-actions { margin-top: 12px; display: flex; gap: 6px; }
.document-title  { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.document-desc   { font-size: 0.82rem; color: var(--text-muted); margin: 6px 0; }
.document-link a { font-size: 0.81rem; word-break: break-all; }

/* ============================================================
   EINSTELLUNGEN
   ============================================================ */
.settings-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.settings-section h2 { font-size: 0.97rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.member-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.member-item { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }

/* ============================================================
   SUCHE
   ============================================================ */
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-result-item {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow 0.15s;
  display: flex; gap: 12px; align-items: flex-start;
}
.search-result-item:hover { box-shadow: var(--shadow); }
.search-result-type {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  color: var(--text-muted); min-width: 80px; padding-top: 2px;
}
.search-result-main .item-title { font-size: 0.9rem; }
mark { background: #FEF08A; color: inherit; border-radius: 2px; padding: 0 2px; }
[data-theme="dark"] mark { background: #3D3500; color: #FDE68A; }

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--sidebar-bg); color: #fff; padding: 11px 16px;
  border-radius: var(--radius); font-size: 0.87rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toast-in 0.25s ease;
  pointer-events: all; max-width: 300px;
}
.toast.success { background: var(--accent); }
.toast.error   { background: var(--status-overdue); }
.toast.info    { background: var(--primary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   LEERE ZUSTÄNDE & LADESCHIRM
   ============================================================ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.02rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 0.87rem; }
.loading-screen { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   HILFSSTYLINGS
   ============================================================ */
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--status-overdue); }
.text-success { color: var(--status-done); }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  background: none; border: none; cursor: pointer;
  padding: 4px 0; margin-bottom: 14px; transition: color 0.15s;
}
.btn-back:hover { color: var(--primary); }
.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* Archiv-Toggle */
.archive-toggle {
  font-size: 0.8rem; color: var(--text-muted); background: none;
  border: none; cursor: pointer; padding: 4px 8px; margin-left: auto;
  text-decoration: underline;
}
.archive-toggle:hover { color: var(--text); }

/* Wiederkehrend-Abschnitt im Formular */
.recurrence-fields { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-top: 6px; background: var(--bg); }

/* ============================================================
   DRUCKSTILE
   ============================================================ */
@media print {
  #sidebar, #mobile-header, #toast-container, #modal-overlay,
  #login-overlay, .item-actions, .btn, .filter-bar, .page-header .btn,
  .page-header .btn-group, #dark-mode-btn, #logout-btn, #user-bar,
  #sidebar-search, .protocol-actions, .vote-btns { display: none !important; }

  #main-content { margin-left: 0 !important; }
  #page-content { padding: 0 !important; max-width: none; }
  #sticky-footer { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card, .list-item, .message-card, .contact-card, .document-card {
    box-shadow: none !important; border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  .protocol-view { max-height: none !important; font-size: 10pt; }
}

/* ============================================================
   RESPONSIVE — TABLET (< 900px)
   ============================================================ */
@media (max-width: 900px) {
  #sidebar           { transform: translateX(-100%); }
  #sidebar.open      { transform: translateX(0); box-shadow: var(--shadow-lg); }
  #sidebar-overlay.open { display: block; }
  #mobile-header     { display: flex; }
  #main-content      { margin-left: 0; padding-top: 56px; }
  #page-content      { padding: 18px 16px; padding-bottom: 64px; }
  .form-row          { grid-template-columns: 1fr; }
  .member-item       { grid-template-columns: 1fr auto; }
  .member-item select { grid-column: 1; }
  .dash-two-col      { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-header       { flex-direction: column; align-items: flex-start; }
  .dashboard-grid    { grid-template-columns: 1fr 1fr; }
  .contacts-grid, .documents-grid { grid-template-columns: 1fr; }
  .list-item         { flex-wrap: wrap; }
  .item-actions      { width: 100%; justify-content: flex-end; margin-top: 6px; }
  .stat-value        { font-size: 1.6rem; }
  #page-content      { padding: 12px 10px; }
  .calendar-day      { min-height: 52px; }
  .calendar-weekday  { font-size: 0.65rem; }
}
@media (max-width: 400px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   NAVIGATION SEPARATOR
   ============================================================ */
.nav-separator {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 8px 10px;
  list-style: none;
}

/* ============================================================
   ROADMAP
   ============================================================ */
.roadmap-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.roadmap-col { background: var(--bg); border-radius: var(--radius); padding: 14px; }
.roadmap-col-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.roadmap-col-title.status-idee       { border-color: var(--text-muted); }
.roadmap-col-title.status-geplant    { border-color: var(--status-open); }
.roadmap-col-title.status-in-arbeit  { border-color: var(--status-progress); }
.roadmap-col-title.status-abgeschlossen { border-color: var(--status-done); }
.roadmap-col-title.status-verworfen  { border-color: var(--status-deferred); }

.roadmap-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
  cursor: default;
}
.roadmap-card-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; }
.roadmap-card-meta  { font-size: 0.77rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }
.roadmap-card-actions { margin-top: 10px; display: flex; gap: 5px; }

.badge-idee        { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge-geplant     { background: var(--status-open-bg); color: var(--status-open); }
.badge-in-arbeit   { background: var(--status-progress-bg); color: var(--status-progress); }
.badge-abgeschlossen { background: var(--status-done-bg); color: var(--status-done); }
.badge-verworfen   { background: var(--status-deferred-bg); color: var(--status-deferred); }

/* ============================================================
   VERSIONIERUNG / CHANGELOG
   ============================================================ */
.changelog-timeline { position: relative; padding-left: 28px; }
.changelog-timeline::before {
  content: '';
  position: absolute; left: 9px; top: 6px; bottom: 0;
  width: 2px; background: var(--border);
}
.changelog-entry {
  position: relative; margin-bottom: 24px;
}
.changelog-dot {
  position: absolute; left: -24px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--primary);
}
.changelog-dot.app-entry { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.changelog-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.changelog-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.changelog-version {
  font-size: 1rem; font-weight: 800; color: var(--primary);
  background: var(--primary-light); padding: 2px 10px; border-radius: 20px;
}
.changelog-version.app-version { color: var(--accent); background: var(--status-done-bg); }
.changelog-title  { font-size: 0.93rem; font-weight: 700; flex: 1; }
.changelog-date   { font-size: 0.78rem; color: var(--text-muted); }
.changelog-author { font-size: 0.78rem; color: var(--text-muted); }
.changelog-changes { margin-top: 8px; }
.changelog-changes ul { list-style: disc; padding-left: 18px; }
.changelog-changes li { font-size: 0.86rem; color: var(--text-muted); padding: 2px 0; }
.changelog-type-badge { font-size: 0.72rem; }
.changelog-actions { margin-top: 10px; display: flex; gap: 6px; }

/* ============================================================
   HANDBUCH
   ============================================================ */
.handbook-toc {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.handbook-toc h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.handbook-toc ol { list-style: decimal; padding-left: 20px; }
.handbook-toc li { font-size: 0.88rem; padding: 3px 0; }
.handbook-toc a  { color: var(--primary); }

.handbook-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.handbook-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; cursor: pointer;
  user-select: none; transition: background 0.15s;
}
.handbook-section-header:hover { background: var(--bg); }
.handbook-section-icon { font-size: 1.2rem; width: 28px; flex-shrink: 0; }
.handbook-section-title { flex: 1; font-size: 0.97rem; font-weight: 700; }
.handbook-toggle { font-size: 0.9rem; color: var(--text-muted); transition: transform 0.2s; }
.handbook-toggle.open { transform: rotate(180deg); }
.handbook-section-body {
  display: none; padding: 0 20px 20px; border-top: 1px solid var(--border);
}
.handbook-section-body.open { display: block; }
.handbook-section-body h3 {
  font-size: 0.88rem; font-weight: 700; color: var(--primary);
  margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.handbook-section-body p, .handbook-section-body li {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.65;
}
.handbook-section-body ul { list-style: disc; padding-left: 18px; margin: 6px 0; }
.handbook-section-body ol { list-style: decimal; padding-left: 18px; margin: 6px 0; }
.handbook-tip {
  background: var(--primary-light); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; margin: 10px 0; font-size: 0.86rem;
}
.handbook-tip strong { color: var(--primary); }
.handbook-warning {
  background: var(--status-overdue-bg); border-left: 3px solid var(--status-overdue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; margin: 10px 0; font-size: 0.86rem;
}
.handbook-field-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.84rem; }
.handbook-field-table th {
  text-align: left; padding: 6px 10px; background: var(--bg);
  font-weight: 700; font-size: 0.78rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.handbook-field-table td { padding: 7px 10px; border-top: 1px solid var(--border); }
.handbook-field-table tr:hover td { background: var(--bg); }

/* ============================================================
   MODAL FOOTER & DETAIL VIEWS
   ============================================================ */
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border);
}
.detail-view { display: flex; flex-direction: column; gap: 16px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 0.86rem; color: var(--text-muted);
  background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px;
}
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.detail-section { display: flex; flex-direction: column; gap: 6px; }
.detail-section h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0; }
.detail-text { font-size: 0.88rem; line-height: 1.65; }
.list-item-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   ROADMAP BOARD (new layout)
   ============================================================ */
.roadmap-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.roadmap-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.roadmap-count {
  font-size: 0.75rem; background: var(--border);
  color: var(--text-muted); border-radius: 20px;
  padding: 1px 7px; font-weight: 700;
}
.roadmap-empty { font-size: 0.8rem; color: var(--text-muted); text-align: center; padding: 14px 0; font-style: italic; }
.roadmap-card-desc { font-size: 0.81rem; color: var(--text-muted); margin-bottom: 6px; }
.roadmap-section-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 24px 0 12px; display: flex; align-items: center; gap: 8px;
}
.roadmap-col-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.roadmap-card-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.roadmap-meta { font-size: 0.75rem; color: var(--text-muted); }
.roadmap-card-actions { margin-left: auto; display: flex; gap: 4px; }

/* Vorschläge */
.suggestion-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.suggestion-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow 0.15s;
}
.suggestion-card:hover { box-shadow: var(--shadow); }
.vote-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  cursor: pointer; min-width: 44px; transition: all 0.15s; flex-shrink: 0;
}
.vote-btn:hover { border-color: var(--primary); color: var(--primary); }
.vote-btn.voted { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.vote-icon { font-size: 0.75rem; }
.vote-count { font-size: 0.85rem; font-weight: 700; }
.suggestion-body { flex: 1; min-width: 0; }
.suggestion-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.suggestion-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.suggestion-meta { font-size: 0.75rem; color: var(--text-light); }
.suggestion-actions { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; }

/* ============================================================
   CHANGELOG EXTRAS
   ============================================================ */
.badge-app {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  background: var(--status-done-bg); color: var(--status-done);
  border-radius: 20px; padding: 2px 8px; letter-spacing: 0.04em;
}
.changelog-dot.dot-app { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.changelog-list { list-style: disc; padding-left: 18px; margin-top: 8px; }
.changelog-list li { font-size: 0.86rem; color: var(--text-muted); padding: 2px 0; }
.changelog-desc { font-size: 0.86rem; color: var(--text-muted); margin-top: 8px; }

/* ============================================================
   HANDBOOK EXTRAS
   ============================================================ */
.handbook-container { display: flex; flex-direction: column; gap: 0; }
.handbook-section-header {
  width: 100%; text-align: left; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; font-size: 0.95rem; font-weight: 700;
  color: var(--text); transition: background 0.15s;
}
.handbook-section-header:hover { background: var(--bg); }
.handbook-arrow { font-size: 0.75rem; color: var(--text-muted); transition: transform 0.2s; }
.handbook-list { list-style: disc; padding-left: 18px; margin: 0; }
.handbook-list li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; padding: 3px 0; }

/* ============================================================
   SETTINGS EXTRAS
   ============================================================ */
.settings-container { display: flex; flex-direction: column; gap: 0; }
.settings-section h3 { font-size: 0.97rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.member-row:last-child { border-bottom: none; }
.member-name { font-weight: 600; flex: 1; font-size: 0.9rem; }
.member-role { font-size: 0.8rem; color: var(--primary); min-width: 120px; }
.member-add-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.backup-list { display: flex; flex-direction: column; gap: 6px; }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.backup-row:last-child { border-bottom: none; }
.backup-name { flex: 1; font-size: 0.82rem; font-family: monospace; }
.info-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-family: monospace; font-size: 0.84rem; color: var(--text-muted);
  margin-top: 10px; white-space: pre;
}

/* ============================================================
   MESSAGES EXTRAS
   ============================================================ */
.unread-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%; margin-right: 6px; flex-shrink: 0;
}
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; background: var(--status-overdue);
  color: #fff; border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  padding: 0 5px; vertical-align: middle; margin-left: 6px;
}
.message-item.unread .list-item-title { font-weight: 700; }

/* ============================================================
   DECISIONS & MEETINGS INLINE
   ============================================================ */
.decision-item-inline {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.decision-item-inline:last-child { border-bottom: none; }
.decision-text { font-size: 0.88rem; flex: 1; }
.task-item-inline {
  font-size: 0.88rem; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.task-item-inline:last-child { border-bottom: none; }
.votes-summary { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================================
   DOCUMENTS EXTRAS
   ============================================================ */
.doc-icon { font-size: 0.9rem; }
.badge-category {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  background: var(--primary-light); color: var(--primary);
  border-radius: 20px; padding: 2px 8px; letter-spacing: 0.04em;
}
.doc-link {
  font-size: 0.82rem; color: var(--primary); text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px;
}
.doc-link:hover { text-decoration: underline; }

/* ============================================================
   CONTACTS EXTRAS
   ============================================================ */
.contact-avatar {
  width: 44px; height: 44px; background: var(--primary-light);
  color: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0; margin-bottom: 10px;
}
.contact-org { font-size: 0.81rem; color: var(--text-muted); margin-bottom: 4px; }
.contact-link {
  font-size: 0.82rem; color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.contact-link:hover { text-decoration: underline; }
.contact-notes { font-size: 0.81rem; color: var(--text-muted); margin-top: 6px; font-style: italic; }
