/* ============================================================
   FAMILIENPLANER – Design System
   Aesthetic: Warm Dark, moderne Haushalts-App
   ============================================================ */

:root {
  --bg-deep:       #0f0f14;
  --bg-base:       #16161f;
  --bg-card:       #1e1e2a;
  --bg-hover:      #252535;
  --bg-active:     #2a2a3e;

  --accent:        #ff7043;
  --accent-soft:   rgba(255,112,67,0.15);
  --accent-2:      #42a5f5;
  --accent-2-soft: rgba(66,165,245,0.13);
  --success:       #66bb6a;
  --success-soft:  rgba(102,187,106,0.15);
  --warning:       #ffa726;
  --danger:        #ef5350;

  --text-primary:  #f0f0f8;
  --text-secondary:#9494b0;
  --text-muted:    #5a5a78;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.13);

  --sidebar-w:     260px;
  --topbar-h:      60px;
  --radius:        14px;
  --radius-sm:     8px;
  --shadow:        0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);

  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ─────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.sidebar-toggle {
  display: none;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 1.2rem; cursor: pointer;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.user-name { font-weight: 500; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; color: var(--text-muted); }

.nav-links {
  list-style: none;
  padding: 12px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.18s;
  margin-bottom: 3px;
}

.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { font-size: 1.15rem; width: 22px; text-align: center; }

.coming-soon {
  margin-left: auto;
  font-size: 0.65rem;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-link, .logout-link {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.18s;
}
.admin-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.logout-link:hover { background: rgba(239,83,80,0.1); color: var(--danger); }

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  height: var(--topbar-h);
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  flex: 1;
}

.top-actions { display: flex; align-items: center; gap: 10px; }

.module-container {
  padding: 24px;
  flex: 1;
  max-width: 900px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff8a65; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,112,67,0.35); }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-active); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: rgba(239,83,80,0.15); color: var(--danger); }
.btn-danger:hover { background: rgba(239,83,80,0.25); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select option { background: var(--bg-card); }

/* ── Shopping Module ─────────────────────────────────────────── */
.shopping-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.list-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list-tab {
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.list-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.list-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.list-tab .tab-count {
  background: var(--bg-hover);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.75rem;
  font-weight: 600;
}
.list-tab.active .tab-count { background: var(--accent); color: #fff; }

.add-item-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.add-item-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.add-item-main { flex: 1; position: relative; }
.add-item-qty { width: 90px; }
.add-item-unit { width: 90px; }

.autocomplete-list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 50;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s;
}
.autocomplete-item:hover { background: var(--bg-hover); }

.add-item-meta {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.category-select-wrap { flex: 1; }

/* ── Item List ───────────────────────────────────────────────── */
.items-list { display: flex; flex-direction: column; gap: 4px; }

.category-group { margin-bottom: 6px; }

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.18s;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.shopping-item:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.shopping-item.checked { opacity: 0.45; }
.shopping-item.checked .item-name { text-decoration: line-through; }

.item-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
  background: transparent;
}

.item-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.item-check:hover { border-color: var(--accent); }

.item-info { flex: 1; min-width: 0; }

.item-name {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-qty {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.item-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.18s;
  font-size: 1rem;
}
.shopping-item:hover .item-delete { opacity: 1; }
.item-delete:hover { background: rgba(239,83,80,0.15); color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; }

.list-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 4px;
}

.list-stats {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent-2); }

/* ── Alert ────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: rgba(239,83,80,0.1); border: 1px solid rgba(239,83,80,0.3); color: #ff8a80; }

/* ── Overlay ─────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* ── Login ───────────────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-deep);
  padding: 20px;
}

.login-wrap { width: 100%; max-width: 400px; }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  display: inline-flex;
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 4px;
}

.login-logo p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .sidebar-toggle { display: block; }
  .menu-btn { display: block; }
  .main-content { margin-left: 0; }
  .module-container { padding: 16px; }
  .add-item-row { flex-wrap: wrap; }
  .add-item-qty, .add-item-unit { width: calc(50% - 5px); }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 20px; }
}

/* ── To-Do Erweiterungen ─────────────────────────────────────── */
.overdue { border-color: rgba(239,83,80,0.3) !important; }
.overdue-text { color: var(--danger); font-weight: 600; }

.user-chip {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    animation: toastIn 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Icon Picker */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.icon-opt {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 2px solid var(--border);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
}
.icon-opt:hover, .icon-opt.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ── Lubblerhof 2.0 – Komplettes Redesign ────────────────────── */
.lh2-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lh-loading {
    padding: 40px;
    color: var(--text-muted);
    text-align: center;
}

/* Hero */
.lh2-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-active) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lh2-hero-day {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-primary);
}

.lh2-hero-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.lh2-hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lh2-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.lh2-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
}

.lh2-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lh2-stat-div {
    width: 1px;
    height: 36px;
    background: var(--border-strong);
}

/* Section Label */
.lh2-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding-left: 2px;
    margin-bottom: -8px;
}

/* Apartment Cards */
.lh2-apt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.lh2-apt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
}

.lh2-apt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.lh2-apt-color-bar {
    height: 4px;
    background: var(--apt-color, var(--accent));
}

.lh2-apt-card-inner { padding: 18px 20px; }

.lh2-apt-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.lh2-apt-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
}

.lh2-apt-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.pill-occupied {
    background: rgba(239,83,80,0.15);
    color: var(--danger);
    border: 1px solid rgba(239,83,80,0.25);
}

.pill-free {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(102,187,106,0.25);
}

.lh2-apt-guest {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.lh2-apt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.lh2-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.lh2-chip.sm { padding: 2px 8px; font-size: 0.75rem; }

/* Progress Bar */
.lh2-apt-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.lh2-apt-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border-strong);
    border-radius: 3px;
    overflow: hidden;
}

.lh2-apt-progress-fill {
    height: 100%;
    background: var(--apt-color, var(--accent));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.lh2-apt-progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.lh2-apt-free-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0 12px;
}

.lh2-apt-next {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.lh2-apt-next-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lh2-apt-next-date {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.lh2-apt-next-guest {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Notify Button */
.lh2-notify-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(255,112,67,0.3);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font-body);
}

.lh2-notify-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.lh2-notify-btn.sm {
    width: auto;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.lh2-notified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--success-soft);
    border: 1px solid rgba(102,187,106,0.2);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 600;
}

.lh2-notified-badge.sm {
    padding: 3px 8px;
    font-size: 0.75rem;
}

/* Heute Kacheln */
.lh2-today-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.lh2-today-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lh2-today-card.arrival  { border-top: 3px solid var(--success); }
.lh2-today-card.departure { border-top: 3px solid var(--danger); }

.lh2-today-type {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lh2-today-apt {
    font-size: 0.82rem;
    font-weight: 700;
}

.lh2-today-guest {
    font-size: 1.05rem;
    font-weight: 600;
}

.lh2-today-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.lh2-today-clean { margin-top: 6px; }

/* Upcoming */
.lh2-upcoming-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lh2-upcoming-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    flex-wrap: wrap;
}

.lh2-upcoming-row:last-child { border-bottom: none; }
.lh2-upcoming-row:hover { background: var(--bg-hover); }

.lh2-upcoming-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lh2-upcoming-when {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.lh2-upcoming-countdown {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.lh2-upcoming-countdown.today { color: var(--accent); }

.lh2-upcoming-datestr {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.lh2-upcoming-apt {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
}

.lh2-upcoming-guest {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.lh2-upcoming-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Bettwäsche */
.lh2-linen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.lh2-linen-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: border-color 0.2s, transform 0.18s;
}

.lh2-linen-card:hover { transform: translateY(-1px); }
.lh2-linen-card.low { border-color: rgba(255,167,38,0.4); }
.lh2-linen-card.critical { border-color: rgba(239,83,80,0.5); }

.lh2-linen-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.lh2-linen-icon { font-size: 1.2rem; }

.lh2-linen-cat {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}

.lh2-linen-warn {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,167,38,0.15);
    color: var(--warning);
}

.lh2-linen-warn.critical {
    background: rgba(239,83,80,0.15);
    color: var(--danger);
}

.lh2-linen-num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}

.lh2-linen-num small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.lh2-linen-track {
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 14px;
}

.lh2-linen-track-fill {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.lh2-linen-track-fill.low { background: var(--warning); }
.lh2-linen-track-fill.critical { background: var(--danger); }

.lh2-linen-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 5px;
}

.lh2-linen-btn {
    padding: 7px 4px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-strong);
    font-family: var(--font-body);
    transition: all 0.15s;
    text-align: center;
}

.lh2-linen-btn.minus {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.lh2-linen-btn.minus:hover {
    background: rgba(239,83,80,0.15);
    color: var(--danger);
    border-color: rgba(239,83,80,0.3);
}

.lh2-linen-btn.plus {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(102,187,106,0.25);
}

.lh2-linen-btn.plus:hover {
    background: var(--success);
    color: #fff;
}

.lh2-linen-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 600px) {
    .lh2-apt-grid { grid-template-columns: 1fr; }
    .lh2-linen-grid { grid-template-columns: 1fr 1fr; }
    .lh2-hero { flex-direction: column; align-items: flex-start; }
    .lh2-hero-stats { width: 100%; justify-content: space-around; }
    .lh2-upcoming-row { gap: 8px; }
    .lh2-upcoming-guest { min-width: 100%; order: 3; }
}

/* ── Lubblerhof v2 – Modern Dashboard ───────────────────────── */
.lh2-layout { display: flex; flex-direction: column; gap: 16px; }

/* Skeleton */
.lh-skeleton { display: flex; flex-direction: column; gap: 12px; }
.lh-skel-bar { background: var(--bg-hover); border-radius: 8px; animation: skel 1.4s ease infinite; }
.lh-skel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lh-skel-card { background: var(--bg-hover); border-radius: var(--radius); height: 160px; animation: skel 1.4s ease infinite; }
@keyframes skel { 0%,100%{opacity:.4} 50%{opacity:.8} }

/* Animate-in */
.lh-animate { animation: lhFadeUp 0.35s ease both; }
@keyframes lhFadeUp {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Hero */
.lh2-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.lh2-hero-day { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.lh2-hero-date { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-top: 2px; }
.lh2-hero-stats { display: flex; align-items: center; gap: 20px; }
.lh2-stat { text-align: center; }
.lh2-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1; }
.lh2-stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; }
.lh2-stat-divider { width: 1px; height: 40px; background: var(--border-strong); }

/* Section Label */
.lh2-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 0;
}

/* Apartment Cards */
.lh2-apt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.lh2-apt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: lhFadeUp 0.35s ease both;
}
.lh2-apt-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
.lh2-apt-card.occupied { border-top: 3px solid var(--apt-color, var(--accent)); }
.lh2-apt-card.free     { border-top: 3px solid var(--success); }

.lh2-apt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
}
.lh2-apt-name-row { display: flex; align-items: center; gap: 10px; }
.lh2-apt-icon { font-size: 1.4rem; }
.lh2-apt-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }

.lh2-apt-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.badge-occupied { background: rgba(239,83,80,0.12); color: var(--danger); }
.badge-free     { background: var(--success-soft); color: var(--success); }
.lh2-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

.lh2-apt-body { padding: 0 18px 16px; }

/* Guest row */
.lh2-guest-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lh2-guest-avatar {
    width: 40px; height: 40px;
    background: var(--apt-color, var(--accent));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800; font-size: 1.1rem; color: #fff;
    flex-shrink: 0;
}
.lh2-guest-name { font-weight: 600; font-size: 1rem; }
.lh2-guest-channel { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Chips */
.lh2-apt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lh2-chip {
    display: flex; align-items: center; gap: 5px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.lh2-chip-icon { font-size: 0.85rem; }

/* Countdown bar */
.lh2-countdown { margin-bottom: 14px; }
.lh2-countdown-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 5px; }
.lh2-countdown-fill { height: 100%; background: var(--apt-color, var(--accent)); border-radius: 2px; transition: width 0.6s ease; }
.lh2-countdown-label { font-size: 0.75rem; color: var(--text-muted); }

/* Cleaning */
.lh2-clean-row { margin-top: 4px; }
.lh2-clean-done {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: var(--success);
    background: var(--success-soft);
    padding: 6px 12px; border-radius: 20px;
    font-weight: 600;
}
.lh2-notify-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font-body);
}
.lh2-notify-btn:hover { background: var(--accent); color: #fff; }

/* Free state */
.lh2-free-body { display: flex; align-items: center; gap: 12px; padding: 8px 0 16px; color: var(--text-muted); }
.lh2-free-icon { font-size: 1.5rem; }
.lh2-free-text { font-size: 0.9rem; }

/* Next booking footer */
.lh2-next-booking {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.lh2-next-icon { color: var(--apt-color, var(--accent)); }
.lh2-next-days {
    margin-left: auto;
    background: var(--apt-color, var(--accent));
    color: #fff;
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
}

/* Quiet day */
.lh2-quiet-day {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--text-muted); font-size: 0.9rem;
}
.lh2-quiet-icon { font-size: 1.3rem; }

/* Movement cards */
.lh2-movement-list { display: flex; flex-direction: column; gap: 8px; }
.lh2-movement-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    flex-wrap: wrap;
    animation: lhFadeUp 0.3s ease both;
}
.lh2-movement-color { width: 4px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.lh2-movement-apt { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; min-width: 60px; }
.lh2-movement-guest { flex: 1; font-size: 0.95rem; }
.lh2-movement-persons { font-size: 0.85rem; color: var(--text-secondary); }
.lh2-movement-action { margin-left: auto; }
.lh2-notify-btn-sm {
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid var(--accent); border-radius: 20px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
    cursor: pointer; font-family: var(--font-body);
    transition: all 0.18s;
}
.lh2-notify-btn-sm:hover { background: var(--accent); color: #fff; }
.lh2-clean-done-sm {
    font-size: 0.78rem; color: var(--success);
    background: var(--success-soft);
    padding: 5px 10px; border-radius: 20px; font-weight: 600;
}

/* Upcoming */
.lh2-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.lh2-upcoming-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--apt-color, var(--accent));
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: transform 0.18s;
}
.lh2-upcoming-card:hover { transform: translateY(-2px); }
.lh2-upcoming-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lh2-upcoming-apt { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.lh2-upcoming-when {
    font-size: 0.72rem; font-weight: 700;
    background: var(--bg-hover); padding: 2px 8px; border-radius: 20px;
    color: var(--text-secondary);
}
.lh2-upcoming-when.today { background: var(--accent-soft); color: var(--accent); }
.lh2-upcoming-guest { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.lh2-upcoming-meta { display: flex; gap: 10px; font-size: 0.78rem; color: var(--text-secondary); flex-wrap: wrap; margin-bottom: 6px; }
.lh2-upcoming-channel { font-size: 0.72rem; color: var(--text-muted); }

/* Linen v2 */
.lh2-linen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.lh2-linen-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px;
    transition: border-color 0.2s;
}
.lh2-linen-card.low      { border-color: rgba(255,167,38,0.4); }
.lh2-linen-card.critical { border-color: rgba(239,83,80,0.4); }

.lh2-linen-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.lh2-linen-icon { font-size: 1.4rem; flex-shrink: 0; }
.lh2-linen-meta { flex: 1; min-width: 0; }
.lh2-linen-name { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.lh2-linen-warn { font-size: 0.7rem; color: var(--warning); font-weight: 600; margin-top: 2px; }
.lh2-linen-card.critical .lh2-linen-warn { color: var(--danger); }
.lh2-linen-count {
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 800;
    line-height: 1; text-align: right;
}
.lh2-linen-count small { font-size: 0.65rem; color: var(--text-muted); font-weight: 400; display: block; text-align: right; }

.lh2-linen-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.lh2-linen-fill { height: 100%; background: var(--success); border-radius: 2px; transition: width 0.5s ease; }
.lh2-linen-fill.low { background: var(--warning); }
.lh2-linen-fill.critical { background: var(--danger); }

.lh2-linen-btns { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px; }
.lh2-linen-btn {
    padding: 6px 0; border-radius: 6px; border: none;
    font-family: var(--font-body); font-size: 0.78rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
}
.lh2-linen-btn.minus { background: rgba(239,83,80,0.1); color: var(--danger); }
.lh2-linen-btn.minus:hover { background: rgba(239,83,80,0.25); }
.lh2-linen-btn.plus  { background: var(--success-soft); color: var(--success); }
.lh2-linen-btn.plus:hover  { background: rgba(102,187,106,0.3); }
.lh2-linen-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 600px) {
    .lh2-apt-grid { grid-template-columns: 1fr; }
    .lh2-hero { flex-direction: column; align-items: flex-start; }
    .lh2-linen-grid { grid-template-columns: 1fr 1fr; }
    .lh2-upcoming-grid { grid-template-columns: 1fr 1fr; }
}

/* Bettwäsche – Alle-Buttons Zeile */
.lh2-linen-all {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.lh2-linen-all-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

/* ── Lubblerhof Buchungsliste ────────────────────────────────── */
.lh-view-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-hover);
    padding: 3px;
    border-radius: var(--radius-sm);
}
.lh-view-tab {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.lh-view-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.lh-booking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.lh-booking-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.lh-booking-tab.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.lh-tab-count {
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 0.72rem;
}

.lh-booking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lh-booking-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow 0.18s;
    animation: lhFadeUp 0.25s ease both;
}
.lh-booking-row:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

.lh-booking-stripe {
    width: 4px;
    flex-shrink: 0;
}

.lh-booking-main {
    flex: 1;
    padding: 14px 16px;
    min-width: 0;
}

.lh-booking-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.lh-booking-apt {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.lh-booking-channel {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.lh-booking-guest {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
}
.lh-booking-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* Status Badges */
.lh-booking-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}
.lh-booking-badge.active   { background: var(--accent-soft); color: var(--accent); }
.lh-booking-badge.today    { background: rgba(255,167,38,0.15); color: var(--warning); }
.lh-booking-badge.soon     { background: var(--accent-2-soft); color: var(--accent-2); }
.lh-booking-badge.upcoming { background: var(--bg-hover); color: var(--text-muted); }

/* Checkboxen */
.lh-booking-checks {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-left: 1px solid var(--border);
    min-width: 140px;
}
.lh-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.15s;
    user-select: none;
}
.lh-check-label input[type="checkbox"] { display: none; }
.lh-check-label.checked { color: var(--success); }

.lh-check-box {
    width: 20px; height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
    flex-shrink: 0;
    background: transparent;
}
.lh-check-label.checked .lh-check-box {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.lh-check-label:hover .lh-check-box { border-color: var(--accent); }

@media (max-width: 600px) {
    .lh-booking-row { flex-wrap: wrap; }
    .lh-booking-checks {
        border-left: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        min-width: 100%;
        padding: 10px 16px;
    }
    /* Mobile: View-Tabs als fixe Bottom-Bar */
    .lh-view-tabs {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-strong);
        padding: 8px 16px 20px;
        gap: 8px;
        z-index: 100;
        justify-content: center;
    }
    .lh-view-tab {
        flex: 1;
        max-width: 160px;
        padding: 10px 16px;
        font-size: 0.88rem;
        text-align: center;
    }
    /* Platz unten damit Inhalte nicht hinter der Tab-Bar verschwinden */
    .lh2-layout { padding-bottom: 80px; }
}

/* ── Energie Dashboard ───────────────────────────────────────── */
:root {
    --solar-color: #ffa726;
    --battery-color: #66bb6a;
    --grid-color: #42a5f5;
    --heat-color: #ef5350;
}

.en-layout { display: flex; flex-direction: column; gap: 16px; }

.en-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

/* Energie Karten */
.en-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: lhFadeUp 0.3s ease both;
}
.en-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.en-card.active { border-color: rgba(255,167,38,0.3); }

.en-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.en-card-icon { font-size: 1.4rem; }
.en-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    flex: 1;
}

/* Status Dot */
.en-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.en-status-dot.active {
    background: var(--solar-color);
    box-shadow: 0 0 8px var(--solar-color);
    animation: pulse 2s infinite;
}
.en-status-dot.idle { background: var(--text-muted); }

/* Hauptwert */
.en-main-value {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
}
.en-unit {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}
.en-temp-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 14px;
}

/* Balken */
.en-bar-wrap {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}
.en-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

/* Stats */
.en-card-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.en-stat { flex: 1; min-width: 80px; }
.en-stat-val {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}
.en-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Battery */
.en-battery-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 3px 8px;
    background: var(--bg-hover);
    border-radius: 20px;
}
.en-battery-status.charging { color: var(--success); background: var(--success-soft); }

/* Kompressor */
.en-comp-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 3px 8px;
    background: var(--bg-hover);
    border-radius: 20px;
}
.en-comp-badge.active { color: var(--success); background: var(--success-soft); }

/* Config / Error */
.en-config-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px 0;
}
.en-config-key {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-family: monospace;
    background: var(--bg-hover);
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}
.en-error { border-color: rgba(239,83,80,0.2); }

/* Skeleton */
.en-skeleton {
    height: 200px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Timestamp */
.energy-ts {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Energiefluss */
.en-flow {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.en-flow-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}
.en-flow-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    flex-wrap: wrap;
}
.en-flow-item { text-align: center; }
.en-flow-icon { font-size: 1.6rem; margin-bottom: 6px; }
.en-flow-val { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.en-flow-label { font-size: 0.72rem; color: var(--text-muted); }
.en-flow-arrow {
    font-size: 1.4rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.en-flow-center .en-flow-icon { font-size: 2rem; }

@media (max-width: 600px) {
    .en-grid { grid-template-columns: 1fr; }
    .en-flow-grid { gap: 4px; }
}

/* ── Wetter ──────────────────────────────────────────────────── */
.en-weather-card {
    background: linear-gradient(135deg, #1a2744 0%, #0f1f3d 100%);
    border: 1px solid rgba(66,165,245,0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.en-weather-current {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 240px;
}

.en-weather-main {
    display: flex;
    align-items: center;
    gap: 4px;
}

.en-weather-icon { width: 64px; height: 64px; }

.en-weather-temp {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.en-weather-info { flex: 1; }
.en-weather-city  { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.en-weather-desc  { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 8px; text-transform: capitalize; }
.en-weather-details {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    flex-wrap: wrap;
}

.en-weather-forecast {
    display: flex;
    gap: 12px;
    align-items: center;
}

.en-forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 64px;
}
.en-forecast-name  { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.7); }
.en-forecast-icon  { width: 36px; height: 36px; }
.en-forecast-temps { display: flex; gap: 6px; font-size: 0.82rem; }
.en-forecast-max   { color: #ffa726; font-weight: 700; }
.en-forecast-min   { color: rgba(255,255,255,0.4); }

/* ── Stromverbrauch ─────────────────────────────────────────── */
.en-consumption {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.en-consumption-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}
.en-consumption-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.en-cons-item {
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.en-cons-val {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.en-cons-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .en-weather-card { flex-direction: column; gap: 16px; }
    .en-weather-forecast { justify-content: space-between; width: 100%; }
    .en-consumption-grid { grid-template-columns: 1fr 1fr; }
}

/* ── To-Do v2 ───────────────────────────────────────────────── */
.todo-layout { display: flex; flex-direction: column; gap: 16px; }

.todo-add-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.todo-group { display: flex; flex-direction: column; gap: 6px; }

.todo-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.todo-group-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.todo-group-count {
    margin-left: auto;
    font-size: 0.72rem;
    background: var(--bg-hover);
    padding: 1px 7px;
    border-radius: 20px;
}

/* Todo Item */
.todo-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: all 0.18s;
    animation: lhFadeUp 0.2s ease both;
}
.todo-item:hover { border-color: var(--border-strong); }
.todo-item.done { opacity: 0.45; }
.todo-item.done .todo-item-title { text-decoration: line-through; }

.todo-item-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.todo-check {
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-strong);
    background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    transition: all 0.15s;
    flex-shrink: 0;
    color: #fff;
}
.todo-check.checked { background: var(--success); border-color: var(--success); }
.todo-check:hover { border-color: var(--accent); }

.todo-item-title { flex: 1; font-weight: 500; font-size: 0.95rem; }

.todo-due { font-size: 0.75rem; color: var(--text-muted); }
.todo-due.overdue { color: var(--danger); font-weight: 600; }

.todo-delete {
    opacity: 0;
    background: none; border: none;
    cursor: pointer; padding: 3px 6px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.15s;
    font-size: 0.9rem;
}
.todo-item:hover .todo-delete { opacity: 1; }
.todo-delete:hover { color: var(--danger); background: rgba(239,83,80,0.1); }

/* Person Pills */
.todo-person-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.todo-person-pill {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.todo-person-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.todo-person-pill.active {
    font-weight: 700;
}
.todo-person-pill.unassigned.active {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

@media (max-width: 500px) {
    .todo-person-pills { gap: 4px; }
    .todo-person-pill { font-size: 0.72rem; padding: 3px 8px; }
}

/* ── Kalender ───────────────────────────────────────────────── */
.cal-wrap { display: flex; flex-direction: column; gap: 12px; }

.cal-bd-banner {
    background: linear-gradient(135deg, #2d1b4e, #1a1a2e);
    border: 1px solid #ab47bc44;
    border-radius: var(--radius);
    padding: 10px 16px;
    display: flex; gap: 16px; flex-wrap: wrap;
    font-size: 0.85rem; color: #ce93d8;
}

.cal-header { display: flex; align-items: center; justify-content: center; }
.cal-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-dow {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 0;
    text-transform: uppercase;
}
.cal-dow.weekend { color: #ef9a9a; }

.cal-day {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 6px;
    min-height: 80px;
    cursor: pointer;
    transition: border-color 0.15s;
    color: var(--text-primary);
}
.cal-day:hover { border-color: var(--accent); }
.cal-day.today { border-color: var(--accent); background: rgba(100,181,246,0.06); }
.cal-day.weekend { background: rgba(255,255,255,0.02); }
.cal-day-empty { background: transparent; border-color: transparent; cursor: default; }

.cal-day-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.cal-day.today .cal-day-num { color: var(--accent); }

.cal-event {
    font-size: 0.68rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity 0.15s;
}
.cal-event:hover { opacity: 0.75; }
.cal-event.cal-bd { background: #ab47bc22; border-left: 3px solid #ab47bc; color: #ce93d8; }
.cal-event-more { font-size: 0.65rem; color: var(--text-muted); padding: 1px 5px; }

/* Wochenansicht */
.cal-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-week-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.cal-week-col.today { border-color: var(--accent); }

.cal-week-header {
    padding: 10px 8px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.cal-week-header:hover { background: var(--bg-hover); }

.cal-week-dow { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.cal-week-date {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
}
.cal-week-date.today { color: var(--accent); }

.cal-week-events { padding: 6px; display: flex; flex-direction: column; gap: 3px; min-height: 120px; }

.cal-week-add {
    margin-top: auto;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.cal-week-add:hover { background: var(--bg-hover); color: var(--accent); }

.cal-event-time { color: var(--text-muted); margin-right: 4px; }

.cal-color-btn { cursor: pointer; transition: transform 0.15s; }
.cal-color-btn:hover { transform: scale(1.15); }

@media (max-width: 600px) {
    .cal-day { min-height: 52px; padding: 4px; }
    .cal-day-num { font-size: 0.72rem; }
    .cal-event { display: none; }
    .cal-event:first-of-type { display: block; }
    .cal-week-grid { grid-template-columns: repeat(7, 1fr); }
    .cal-week-dow { font-size: 0.6rem; }
    .cal-week-date { font-size: 0.9rem; }
}

/* ── Bildschirmschoner ──────────────────────────────────────── */
#screensaver {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    cursor: none;
    animation: ssFadeIn 1s ease;
}
@keyframes ssFadeIn { from { opacity: 0 } to { opacity: 1 } }

.ss-overlay {
    width: 100%;
    height: 100%;
    position: relative;
}

.ss-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.ss-time {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    pointer-events: none;
    letter-spacing: 0.05em;
}

.ss-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    pointer-events: none;
    white-space: nowrap;
}

/* ── Modal (global) ─────────────────────────────────────────── */
.lh-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lh-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95) } to { opacity:1; transform:scale(1) } }

.lh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.lh-modal-header h3 { margin: 0; font-size: 1rem; font-weight: 700; }

.lh-modal-close {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 1.1rem; padding: 4px 8px;
    border-radius: 6px; transition: all 0.15s;
}
.lh-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.lh-modal-body { padding: 20px; }

.lh-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}
