/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Freundliche, vertrauensvolle Grundpalette (Calm & Trust) */
    --primary-color: #2563eb;   /* ruhiges Blau für Überschriften & Akzente */
    --secondary-color: #64748b; /* weiches Slate-Grau für Texte */
    --success-color: #22c55e;   /* freundliches Grün für positive Zustände */
    --danger-color: #ef4444;    /* warmes Rot für Fehler */
    --warning-color: #f59e0b;   /* sanftes Orange für Warnungen */
    --info-color: #0ea5e9;      /* klares Blau für Infos */
    --light-bg: #f9fafb;        /* warmes, helles Hintergrundweiß */
    --dark-text: #0f172a;       /* gut lesbares Dunkelblau/Grau */
    --border-color: #e2e8f0;    /* zarte Rahmenfarbe */
    --sidebar-width: 250px;
    --bottom-nav-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Überschriften fett */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Sidebar Navigation (Desktop) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    background-color: transparent;
    color: var(--dark-text);
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.sidebar-logo-img {
    width: 96px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
    text-align: center;
}

.sidebar-menu {
    padding: 1.25rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-accordion-section {
    margin-bottom: 0.2rem;
}

.sidebar-accordion-section summary {
    padding: 0.55rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    cursor: pointer;
    list-style: none;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-accordion-section summary::-webkit-details-marker,
.sidebar-accordion-section summary::marker {
    display: none;
}

.sidebar-accordion-section summary::after {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.sidebar-accordion-section[open] summary::after {
    transform: rotate(90deg);
}

.sidebar-accordion-section summary:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
}

.sidebar-accordion-links {
    list-style: none;
    padding: 0.2rem 0 0 0.5rem;
    margin: 0;
}

.sidebar-accordion-links li {
    margin: 0;
}

.sidebar-accordion-links .sidebar-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
}

.sidebar-section-label {
    margin-top: 0.75rem;
    margin-bottom: 0.15rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

.sidebar-section-label:first-child {
    margin-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    background: transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
    color: var(--primary-color);
}

.sidebar-link-primary {
    background: linear-gradient(135deg, #34d399, #22c55e);
    color: #ffffff;
}

.sidebar-link-primary:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
}

.sidebar-link-logout {
    color: #b91c1c;
}

.sidebar-link-logout:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.sidebar-link-admin {
    background: rgba(15, 23, 42, 0.06);
}

.sidebar-link-text {
    white-space: nowrap;
}

.sidebar-link-icon .sidebar-link-text {
    font-size: 1.25rem;
}

.menu-divider {
    height: 1px;
    background-color: rgba(148, 163, 184, 0.5);
    margin: 0.85rem 0;
    list-style: none;
}

/* Bottom Navigation (Mobile) - Home, Neuer Eintrag, Menü-Button */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.5rem;
    flex: 1;
    transition: color 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
    color: var(--primary-color);
}

/* Mobile Drawer (Sidebar mit allen Links, Untermenüs) - nur mobil sichtbar */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1098;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Klicks durchlassen wenn geschlossen */
}

.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto; /* Klicks empfangen wenn geöffnet */
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    z-index: 1099;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-logo {
    display: flex;
    align-items: center;
}

.mobile-drawer-logo .sidebar-logo-img {
    width: 80px;
}

.mobile-drawer-close {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-close:hover {
    background: var(--light-bg);
    color: var(--dark-text);
}

.mobile-drawer-menu {
    padding: 1rem 1.25rem 2rem;
}

.mobile-drawer-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: background 0.15s;
}

.mobile-drawer-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mobile-drawer-link-home {
    font-weight: 600;
}

.mobile-drawer-link-primary {
    background: linear-gradient(135deg, #34d399, #22c55e);
    color: #fff !important;
}

.mobile-drawer-link-primary:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff !important;
}

.mobile-drawer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0 1rem;
}

.mobile-drawer-section {
    margin-bottom: 0.25rem;
}

.mobile-drawer-section summary {
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-drawer-section summary::-webkit-details-marker,
.mobile-drawer-section summary::marker {
    display: none;
}

.mobile-drawer-section summary::after {
    content: '▶';
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.mobile-drawer-section[open] summary::after {
    transform: rotate(90deg);
}

.mobile-drawer-section summary:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mobile-drawer-sublink {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.mobile-drawer-sublink:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mobile-drawer-sublink-logout {
    color: #b91c1c;
}

.mobile-drawer-sublink-logout:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.mobile-drawer-sublink-primary {
    font-weight: 600;
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-label {
    font-size: 0.75rem;
}

/* ========== Admin Area (modern layout) ========== */
body.admin-area {
    --admin-sidebar-width: 260px;
    --admin-header-height: 56px;
}

.admin-area .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--admin-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

.admin-sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f1f5f9;
}

.admin-sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
}

.admin-sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.75rem 1rem;
}

.admin-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-group {
    margin-bottom: 1rem;
}

.admin-nav-group:last-child {
    margin-bottom: 0;
}

.admin-nav-group-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    padding: 0 0.75rem;
    margin-bottom: 0.35rem;
}

.admin-nav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #f1f5f9;
}

.admin-nav-link.active {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.admin-nav-link-badge .admin-badge {
    margin-left: 0.35rem;
}

.admin-badge {
    display: inline-block;
    min-width: 1.25em;
    height: 1.25em;
    line-height: 1.25em;
    font-size: 0.7rem;
    font-weight: 600;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    text-align: center;
    padding: 0 0.25em;
    box-sizing: border-box;
}

.admin-sidebar-footer {
    padding: 0.75rem 0.75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-nav-link-outline {
    color: #94a3b8;
}

.admin-nav-link-outline:hover {
    color: #e2e8f0;
}

.admin-nav-link-logout {
    color: #fca5a5;
}

.admin-nav-link-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

/* Admin Main */
.admin-area .admin-main {
    margin-left: var(--admin-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: var(--admin-header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-breadcrumb-wrap {
    font-size: 0.875rem;
}

.admin-breadcrumb {
    color: #64748b;
}

.admin-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    text-decoration: underline;
}

.admin-header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header-name {
    font-weight: 500;
    color: var(--dark-text);
}

.admin-header-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.admin-header-btn:hover {
    background: #e2e8f0;
    color: var(--dark-text);
}

.admin-header-btn-danger {
    color: #dc2626;
    background: #fee2e2;
}

.admin-header-btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}

.admin-content {
    flex: 1;
    padding: 1.5rem 1.5rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.admin-content-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 1.5rem 1.75rem;
    border: 1px solid #e2e8f0;
}

.admin-content-inner .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-content-inner .page-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
    flex: 1;
}

.admin-content-inner h2:first-child {
    margin-top: 0;
}

.admin-content-inner h2 {
    margin: 1.25rem 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.admin-content-inner h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.05rem;
}

.admin-content-inner .table {
    margin-top: 1rem;
    width: 100%;
}

.admin-content-inner .alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.admin-content-inner .alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.admin-content-inner .alert-error,
.admin-content-inner .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.admin-content-inner .alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.admin-content-inner .admin-page,
.admin-content-inner .admin-filter-form,
.admin-content-inner .admin-actions-top,
.admin-content-inner .admin-filter-bar {
    margin-bottom: 1rem;
}

/* Admin Bottom Nav (mobile, 3 items) */
.admin-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    z-index: 1001;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e2e8f0;
}

.admin-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    padding: 0.5rem;
    flex: 1;
    transition: color 0.2s, background 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    border-radius: 8px;
}

.admin-bottom-nav-item:hover,
.admin-bottom-nav-item:focus {
    color: var(--primary-color);
    background: #f1f5f9;
}

.admin-bottom-nav-icon {
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.admin-bottom-nav-label {
    font-weight: 500;
}

/* Admin Drawer (mobile) */
.admin-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1098;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.admin-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.admin-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 88vw;
    height: 100vh;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    z-index: 1099;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.admin-drawer.open {
    transform: translateX(0);
}

.admin-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.admin-drawer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
}

.admin-drawer-close {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    border-radius: 8px;
}

.admin-drawer-close:hover {
    background: #e2e8f0;
    color: var(--dark-text);
}

.admin-drawer-nav {
    padding: 1rem 0.75rem 2rem;
}

.admin-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.admin-drawer-link:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.admin-drawer-group-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 0.5rem 1rem 0.25rem;
    margin-top: 0.5rem;
}

.admin-drawer-group-label:first-child {
    margin-top: 0;
}

.admin-drawer-footer-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.admin-drawer-link-logout {
    color: #dc2626;
}

.admin-drawer-link-logout:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ========== Auth Pages (Login, Register, etc.) – Admin-Design ========== */
.auth-body {
    margin: 0;
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #f8fafc;
}

.auth-card {
    background: #fff;
    padding: 2rem 2.25rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    max-width: 420px;
    width: 100%;
}

.auth-card-header {
    margin-bottom: 1.5rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark-text);
}

.auth-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}

.auth-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dark-text);
}

.auth-brand:hover .auth-brand-name {
    color: var(--primary-color);
}

.auth-heading {
    margin: 0 0 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1.3;
}

.auth-card .form-group {
    margin-bottom: 1.25rem;
}

.auth-card label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-text);
}

.auth-card input[type="email"],
.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: var(--dark-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-card .btn {
    width: 100%;
    padding: 0.7rem 1rem;
    margin-top: 0.25rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-card .alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.auth-card .alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.auth-card .alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.auth-footer-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.auth-footer-links a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer-links a:hover {
    text-decoration: underline;
}

.auth-telegram {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.auth-telegram p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
}

/* Main Content (non-admin) */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + 2rem);
    /* Freundlicher Hintergrund wie auf der Landingpage */
    background: linear-gradient(135deg, #fdf2ff 0%, #e0f2fe 30%, #ecfdf3 65%, #fef9c3 100%);
}

.main-content-landing {
    margin-left: 0;
    padding: 0;
    padding-bottom: 0;
    /* Landing-Page steuert ihren Hintergrund selbst (Hero-Section) */
    background: transparent;
    overflow-x: visible;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Forms */
.diary-form {
    background: #ffffff;
    padding: 2.25rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    max-width: 640px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    min-height: 44px; /* Mindestgröße für Touch-Targets */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-checkbox {
    margin-right: 0.5rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.required {
    color: var(--danger-color);
}

.help-signal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: var(--light-bg, #f1f5f9);
    border-radius: 50%;
    text-decoration: none;
    vertical-align: middle;
}
.help-signal-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
    min-height: 48px; /* Mindestgröße für Touch-Targets */
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
}

/* Wetter / Standort */
.weather-status { margin-bottom: 0.5rem; }
.weather-status-loading { color: var(--info-color); }
.weather-status-ok { color: var(--success-color); font-weight: 500; }
.weather-status-error { color: var(--danger-color); }
.weather-coords-fallback { display: flex; flex-direction: column; gap: 0.5rem; }
.weather-coords-fallback label { margin-top: 0.5rem; }
.weather-coords-fallback label:first-child { margin-top: 0; }

/* Debug-Sektion */
.debug-section {
    background: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    padding: 1rem;
    margin-top: 2rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.debug-section h3 {
    margin-top: 0;
    color: #856404;
}

.debug-section pre {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    margin-top: 0.5rem;
}

.debug-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.debug-section code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Diary Cards */
.diary-list {
    display: grid;
    gap: 0.75rem;
}

/* Wochenauswahl – nur eine Woche sichtbar, Rest über Datepicker */
.diary-week-picker {
    margin-bottom: 0.5rem;
}
.diary-week-picker-label {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}
.diary-week-input {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    font-size: 0.95rem;
}

/* Flatpickr: Tage mit Einträgen deutlich grün kennzeichnen */
.flatpickr .flatpickr-day.flatpickr-day-has-entry {
    background: #22c55e !important;
    background-color: #22c55e !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    border: 2px solid #16a34a !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05) !important;
    transform: none !important;
}
.flatpickr .flatpickr-day.flatpickr-day-has-entry:hover {
    background: #16a34a !important;
    background-color: #16a34a !important;
    color: #fff !important;
    border-color: #15803d !important;
}
.flatpickr .flatpickr-day.flatpickr-day-has-entry.flatpickr-selected,
.flatpickr .flatpickr-day.flatpickr-day-has-entry.selected {
    background: var(--primary-color, #2563eb) !important;
    background-color: var(--primary-color, #2563eb) !important;
    border-color: var(--primary-color, #2563eb) !important;
    color: #fff !important;
}
.diary-week-range {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0 0 0.75rem 0;
}

/* Gruppierte Tagesansicht in der Liste */
.diary-day-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.diary-day-block {
    margin-top: 0.75rem;
}

.diary-day-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--secondary-color);
}
.diary-day-list > .diary-day-block:first-child .diary-day-header { margin-top: 0; }

.diary-day-count {
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: var(--dark-text);
}

.diary-day-empty {
    font-size: 0.9rem;
    color: var(--secondary-color);
    padding: 0.5rem 0.75rem;
    margin: 0 0 0.5rem 0;
}
.diary-day-empty a { text-decoration: underline; }

.diary-day-date {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(209, 213, 219, 0.8);
}

.diary-day-entry-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.9);
}

.diary-day-entry-top {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem 0.75rem;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.diary-day-entry-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.diary-day-time {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-text);
    min-width: 3.1rem;
}

.diary-day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #eff6ff;
    font-size: 0.8rem;
    color: #1d4ed8;
    white-space: nowrap;
    flex-shrink: 0;
}

.diary-contact-badge {
    background: #f0fdf4;
    color: #166534;
}

.diary-energy-badge.diary-energy-spender {
    background: #ecfdf5;
    color: #047857;
}

.diary-energy-badge.diary-energy-neutral {
    background: #f8fafc;
    color: #64748b;
}

.diary-energy-badge.diary-energy-raeuber {
    background: #fef2f2;
    color: #b91c1c;
}

.diary-day-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.diary-day-entry-text-row {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.diary-day-entry-text-row:empty {
    display: none;
}

.diary-day-entry-text-row .diary-day-text {
    display: block;
    white-space: normal;
    overflow: visible;
    word-break: normal;
    overflow-wrap: break-word;
}

.diary-day-entry-text-row .diary-day-text + .diary-day-text {
    margin-top: 0.35rem;
}

.diary-day-text-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-right: 0.35rem;
}

.diary-day-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.diary-day-entry-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.diary-day-entry-actions-top {
    width: 100%;
    justify-content: flex-end;
    order: -1;
    margin-bottom: 0.25rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.diary-day-entry-actions form,
.diary-day-entry-actions .diary-action-form {
    margin: 0;
}

.diary-entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    text-decoration: none;
    color: var(--secondary-color);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.diary-entry-icon:hover {
    opacity: 1;
    color: var(--primary-color);
}

.diary-entry-icon-delete:hover {
    color: var(--danger-color);
}

/* Globale Icon-Links (ohne Button-Optik, wie Tagebuch-Aktionen) */
.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    color: var(--secondary-color);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s, color 0.2s;
    border-radius: 6px;
}

.link-icon:hover {
    opacity: 1;
    color: var(--primary-color);
}

.link-icon-danger:hover {
    color: var(--danger-color);
}

.link-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    border-radius: 8px;
    text-decoration: none;
}

.btn-icon.btn-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.3);
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

.diary-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.diary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.diary-card-body {
    padding: 1rem;
}

.diary-card-footer {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

.diary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.weather-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.weather-icon {
    font-size: 1.25rem;
}

.weather-temp {
    font-weight: 600;
    color: var(--primary-color);
}

.weather-desc {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Kompakte Wetterdaten-Anzeige (horizontal) */
.weather-compact-horizontal {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.weather-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.weather-icon-img {
    height: 80px;
    width: auto;
    display: block;
}

.weather-description {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
    text-align: center;
}

.weather-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    flex: 1;
}

.weather-item-horizontal {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-width: 0;
}

.weather-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.weather-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    word-break: break-word;
}

/* Slider Styles */
.slider-container {
    margin: 1.5rem 0;
    padding: 0.5rem 0;
}

.slider {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    position: relative;
    touch-action: pan-x;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.slider:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.slider::-moz-range-thumb:active {
    transform: scale(1.2);
}

/* Farbverlauf für Stimmung und Aktivität (rot-grün) */
.slider-mood-activity {
    background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 50%, rgb(0, 255, 0) 100%);
}

/* Farbverlauf für Schlafdauer (rot bei 0/24, grün bei 7-9) */
.slider-sleep {
    background: linear-gradient(to right, 
        rgb(255, 0, 0) 0%, 
        rgb(255, 255, 0) 29%, 
        rgb(0, 255, 0) 29%, 
        rgb(0, 255, 0) 37.5%, 
        rgb(255, 255, 0) 37.5%, 
        rgb(255, 0, 0) 100%
    );
}

.slider-value-display {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.slider-value {
    display: inline-block;
    min-width: 50px;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Responsive: Bei kleineren Bildschirmen Icon über den Daten */
@media (max-width: 768px) {
    .weather-compact-horizontal {
        flex-direction: column;
        gap: 1rem;
    }
    
    .weather-icon-wrapper {
        align-self: center;
    }
    
    .weather-data-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Miro-Style grüne Progress-Balken für Stimmung/Aktivität/Antrieb (Detail-Ansicht) */
.detail-level-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.detail-level-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-level-bar-item .bar-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.detail-level-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-level-bar-track {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.detail-level-bar-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 10%;
    transition: width 0.3s ease;
    /* Rot-Gelb-Grün Verlauf: 1 = rot, 5 = gelb, 10 = grün */
    background: linear-gradient(to right, #ef4444 0%, #f59e0b 40%, #22c55e 70%, #16a34a 100%);
}

.detail-level-bar-value {
    font-size: 1rem;
    font-weight: 700;
    min-width: 2.5rem;
    text-align: right;
    color: var(--dark-text);
}

/* Gefühlsmatrix-Block auf voller Breite (wie Analyse) */
.detail-section-full {
    width: 100%;
    background: #e8f4fc;
    border-left: 4px solid #0ea5e9;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 12px 12px 0;
}

.detail-section-full h3 {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.detail-section-full .matrix-subpoints {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.matrix-subpoint {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.25);
}

.matrix-subpoint-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.matrix-subpoint-content {
    font-size: 1rem;
    line-height: 1.5;
}

/* Inline Stats für eine Zeile */
.diary-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin: 0.75rem 0;
}

.stat-inline-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-inline-item .stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
}

.stat-inline-item .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* Kompakte Einträge */
.diary-card-compact {
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.diary-card-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.diary-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-text);
}

.diary-card-body-compact {
    padding: 0.75rem;
}

.diary-stats-inline-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: 0;
    justify-content: space-between;
}

.stat-inline-item-compact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stat-label-compact {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin: 0;
}

.stat-value-compact {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.weather-preview-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #e3f2fd;
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
    font-size: 0.85rem;
}

.weather-icon-compact {
    font-size: 1rem;
}

.weather-temp-compact {
    font-weight: 600;
    color: var(--primary-color);
}

.weather-desc-compact {
    color: var(--secondary-color);
}

.diary-card-content-compact {
    display: flex;
    flex-direction: column;
}

.diary-actions-inline {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.diary-content-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}

.diary-notes-compact {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

/* Checkbox-Gruppe für Körper-Check */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.checkbox-group .checkbox-label {
    margin: 0;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Kompakte Text-Anzeige in Liste */
.diary-text-compact {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.diary-thoughts-compact {
    color: var(--secondary-color);
    margin-bottom: 0.35rem;
}

.diary-win-compact {
    color: var(--success-color);
    font-weight: 500;
}

/* Signal Icon Grids für Körper & Energie */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.signal-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
    -webkit-user-select: none;
    user-select: none;
}

.signal-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.signal-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.signal-label {
    font-size: 0.85rem;
    color: var(--dark-text);
    font-weight: 500;
}

/* Positive Signale - Grün/Blau */
.signal-grid-positive .signal-icon-btn {
    border-color: #c8e6c9;
}

.signal-grid-positive .signal-icon-btn:hover {
    border-color: var(--success-color);
    background: #e8f5e9;
}

.signal-grid-positive .signal-icon-btn.active {
    background: linear-gradient(135deg, #4caf50 0%, #2196f3 100%);
    border-color: var(--success-color);
    color: white;
}

.signal-grid-positive .signal-icon-btn.active .signal-label {
    color: white;
    font-weight: 600;
}

/* Negative Signale - Rot/Orange */
.signal-grid-negative .signal-icon-btn {
    border-color: #ffccbc;
}

.signal-grid-negative .signal-icon-btn:hover {
    border-color: var(--danger-color);
    background: #ffebee;
}

.signal-grid-negative .signal-icon-btn.active {
    background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
    border-color: var(--danger-color);
    color: white;
}

.signal-grid-negative .signal-icon-btn.active .signal-label {
    color: white;
    font-weight: 600;
}

/* Mobile Anpassungen für Signal-Grids */
@media (max-width: 768px) {
    .signal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .signal-icon-btn {
        min-height: 90px;
        padding: 0.75rem 0.5rem;
    }
    
    .signal-icon {
        font-size: 1.75rem;
    }
    
    .signal-label {
        font-size: 0.8rem;
    }
}

/* Farben für Stimmung und Aktivität (rot-grün) */
.stat-mood,
.stat-activity {
    transition: color 0.2s;
}

/* Farben für Schlaf (rot bei 0/24, grün bei 7-9) */
.stat-sleep {
    transition: color 0.2s;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-depression {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-general {
    background-color: #f5f5f5;
    color: #616161;
}

.badge-pending { background-color: #fff3cd; color: #856404; }
.badge-completed { background-color: #d4edda; color: #155724; }
.badge-failed { background-color: #f8d7da; color: #721c24; }
.badge-refunded { background-color: #e2e3e5; color: #383d41; }

/* Detail View */
.diary-detail {
    background: #ffffff;
    padding: 2.25rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.detail-section {
    margin-bottom: 2rem;
    text-align: center;
}

.detail-section h3 {
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #eff6ff;
}

.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.detail-list dt {
    font-weight: 600;
}

.detail-list dd {
    margin: 0;
}

/* Grundinformationen nebeneinander */
.detail-info-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: center;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
}

.detail-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
}

/* Revisionierung */
.revision-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.revision-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

.revision-notice a {
    font-weight: 600;
    color: #b45309;
}

.revision-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.revision-item {
    margin: 0;
}

.revision-link {
    display: inline-flex;
    flex-direction: column;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-text);
    transition: background 0.2s, border-color 0.2s;
}

.revision-link:hover {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.revision-item-active .revision-link {
    background: #dbeafe;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.revision-link-current {
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}

.revision-item-active .revision-link-current {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.revision-number {
    font-size: 0.9rem;
    font-weight: 600;
}

.revision-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.15rem;
}

/* Chart */
/* Chart Tooltip Styling für bessere Lesbarkeit */
.chartjs-tooltip {
    max-width: 400px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    padding: 0.75rem !important;
}

.chartjs-tooltip-body {
    margin: 0.25rem 0 !important;
}

/* Horizontaler Scroll für Diagramm auf Mobile (Datenpunkte nicht quetschen) */
.chart-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.chart-container-inner {
    min-width: 100%;
}

.chart-scroll-hint {
    display: none;
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 767px) {
    .chart-scroll-hint {
        display: block;
    }
    .chart-scroll-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-radius: 0;
    }
    /* Feste Breite erzwingt horizontalen Scroll, Chart wird nicht gequetscht */
    .chart-scroll-wrapper .chart-container-inner {
        width: 520px;
        min-width: 520px;
    }
    .chart-container {
        padding: 1rem 0.75rem;
    }
    .chart-legend-btn {
        min-height: 44px;
        padding: 0.5rem 0.9rem;
        font-size: 0.9rem;
    }
}

.chart-container-inner--narrow .chartjs-chart {
    min-width: 400px;
}

.chart-container {
    background: #e8eaed;
    padding: 2.25rem 2.5rem;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(70, 75, 85, 0.06);
    border: 2px solid #a8c5e0;
    margin-bottom: 1rem;
}

.chart-sublabel {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.energy-flow-section {
    margin-top: 1.5rem;
}

.chart-legend-symbol {
    font-size: 0.85em;
    margin-right: 0.15rem;
}

.analyze-date-range-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fafbfc;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(70, 75, 85, 0.04);
    border: 1px solid rgba(200, 205, 212, 0.45);
}

.analyze-date-range-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.analyze-date-range-form .form-control {
    max-width: 11rem;
}

.chart-legend-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 0;
}

.chart-legend-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 2rem 0;
    padding: 0;
}

.chart-legend-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid;
    border-radius: 10px;
    background: #fafbfc;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s, background 0.2s;
}

.chart-legend-btn:hover {
    box-shadow: 0 2px 8px rgba(70, 75, 85, 0.08);
}

.chart-legend-btn.active {
    opacity: 1;
}

.chart-legend-btn.inactive {
    opacity: 0.4;
}

.chart-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #fafbfc;
    padding: 1.75rem 1.8rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(70, 75, 85, 0.05);
    border: 1px solid rgba(200, 205, 212, 0.5);
    text-align: center;
}

.stat-card h4 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    color: #374151;
}

/* Gefühls-Matrix (tiefenpsychologische Kontakt-Analyse) */
.emotion-matrix-section .emotion-matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 640px) {
    .emotion-matrix-section .emotion-matrix-grid {
        grid-template-columns: 1fr;
    }
}
.emotion-matrix-section .emotion-group {
    padding: 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(200, 205, 212, 0.5);
}
.emotion-matrix-section .emotion-group.emotion-resources {
    border-left: 3px solid rgb(94, 124, 94);
}
.emotion-matrix-section .emotion-group.emotion-burdens {
    border-left: 3px solid rgb(115, 100, 130);
}
.emotion-matrix-section .emotion-group-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}
.emotion-matrix-section .emotion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}
.emotion-matrix-section .emotion-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.emotion-matrix-section .emotion-tag:hover {
    background: rgba(200, 205, 212, 0.3);
}
.emotion-matrix-section .emotion-tag input {
    margin: 0;
}

/* Dev-Popup: Emotionale Kernzonen – nur für Entwickler/Admin sichtbar */
.dev-kernzone-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.dev-kernzone-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.dev-kernzone-modal-content {
    position: relative;
    max-width: 32rem;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.dev-kernzone-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
}
.dev-kernzone-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.dev-kernzone-modal-close {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
}
.dev-kernzone-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}
.dev-kernzone-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}
.dev-kernzone-modal-body h4 {
    margin: 1rem 0 0.5rem 0;
    font-size: 0.9rem;
}
.dev-kernzone-modal-body h4:first-child {
    margin-top: 0;
}
.dev-kernzone-modal-body ul {
    margin: 0 0 0.75rem 0;
    padding-left: 1.25rem;
}

.dev-kernzone-json {
    margin: 0.5rem 0 0 0;
    padding: 0.75rem;
    max-height: 14rem;
    overflow: auto;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Wochenauswertung */
.weekly-health-container {
    max-width: 1200px;
    margin: 0 auto;
}

.week-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.summary-card {
    background: #ffffff;
    padding: 1.75rem 1.9rem;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.8);
    text-align: center;
}

.summary-card h3 {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.summary-positive .summary-number {
    color: var(--success-color);
}

.summary-negative .summary-number {
    color: var(--danger-color);
}

.summary-balance .summary-number {
    color: var(--primary-color);
}

/* Korrelationsanalyse */
.correlation-analysis-container {
    max-width: 1200px;
    margin: 0 auto;
}

.analysis-question {
    background: #ffffff;
    padding: 1.8rem 2rem;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.analysis-question h3 {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.analysis-question p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-subtitle {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.comparison-section {
    background: #ffffff;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(209, 213, 219, 0.8);
    margin-bottom: 2rem;
}

.comparison-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.comparison-card {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid;
}

.comparison-positive {
    background: #e8f5e9;
    border-color: var(--success-color);
}

.comparison-negative {
    background: #ffebee;
    border-color: var(--danger-color);
}

.comparison-card h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.comparison-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.comparison-positive .comparison-value {
    color: var(--success-color);
}

.comparison-negative .comparison-value {
    color: var(--danger-color);
}

.comparison-count {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
}

.correlation-result {
    margin-top: 2rem;
}

.correlation-result h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.correlation-box {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.correlation-box.positive {
    background: #e8f5e9;
    border-color: var(--success-color);
}

.correlation-box.negative {
    background: #fff3e0;
    border-color: var(--warning-color);
}

.correlation-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

.data-table-section {
    background: #ffffff;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(209, 213, 219, 0.8);
    margin-top: 2rem;
}

.data-table-section h3 {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.table-responsive {
    overflow-x: auto;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 2.75rem;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.8);
}

/* Headers */
.diary-header,
.diary-form-header,
.diary-detail-header,
.analyze-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.diary-header h2,
.diary-form-header h2,
.diary-detail-header h2,
.analyze-header h2 {
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    margin: 0;
    flex: 1;
    text-align: center;
}

.diary-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.detail-actions {
    display: flex;
    gap: 0.5rem;
}

/* Error Page */
.error-container {
    text-align: center;
    padding: 2.5rem 2.75rem;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.8);
}

.error-container h1 {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-height) + 1rem);
    }

    .page-header-bar {
        margin: -1rem -1rem 1rem -1rem;
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .user-info {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions .btn {
        flex: 0 1 auto;
        min-width: auto;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .diary-day-entry-main {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .diary-day-chip {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .sidebar {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    /* Mobile Drawer sichtbar machen */
    .mobile-drawer-overlay,
    .mobile-drawer {
        display: block;
    }

    /* Admin Area: Mobile */
    .admin-area .admin-sidebar {
        display: none;
    }

    .admin-area .admin-main {
        margin-left: 0;
        padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
    }

    .admin-bottom-nav {
        display: flex;
    }

    /* Admin Drawer auf Mobil sichtbar schaltbar machen */
    .admin-drawer-overlay,
    .admin-drawer {
        display: block;
    }

    .admin-header {
        padding: 0 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        min-height: 0;
        height: auto;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .admin-header-left {
        flex-wrap: wrap;
    }

    .admin-header-user {
        order: 3;
        width: 100%;
    }

    .admin-header-actions {
        flex-wrap: wrap;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-content-inner {
        padding: 1rem 1.25rem;
        border-radius: 10px;
    }

    .admin-header-menu-btn {
        display: inline-flex;
    }

    /* Admin Main Content Anpassung für mobile Navigation */
    .main-content {
        margin-left: 0;
        padding-bottom: calc(var(--bottom-nav-height) + 2rem);
    }

    .diary-header,
    .diary-form-header,
    .diary-detail-header,
    .analyze-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Mobile-optimierte Formulare */
    .diary-form {
        padding: 1.25rem;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }

    .form-group {
        margin-bottom: 2rem;
    }

    .form-group label {
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }

    .form-control {
        font-size: 1.1rem;
        padding: 1rem;
        min-height: 52px;
        border-radius: 8px;
    }

    /* Größere Slider für Mobile */
    .slider-container {
        margin: 2rem 0;
        padding: 1rem 0;
    }

    .slider {
        height: 16px;
    }

    .slider::-webkit-slider-thumb {
        width: 44px;
        height: 44px;
        border-width: 4px;
    }

    .slider::-moz-range-thumb {
        width: 44px;
        height: 44px;
        border-width: 4px;
    }

    .slider-value-display {
        margin-top: 1.5rem;
        padding: 1rem;
        font-size: 1.75rem;
    }

    .slider-value {
        font-size: 2.5rem;
        min-width: 60px;
    }

    /* Größere Checkboxen */
    .checkbox-label {
        font-size: 1.1rem;
        padding: 0.75rem;
        min-height: 48px;
    }

    .form-checkbox {
        width: 24px;
        height: 24px;
        margin-right: 0.75rem;
    }

    /* Form Actions Mobile */
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 2.5rem;
    }

    .form-actions .btn {
        width: 100%;
        min-height: 56px;
        font-size: 1.2rem;
        padding: 1rem;
    }

    /* Header Actions Mobile */
    .diary-header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .diary-header-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .diary-header-actions .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    .diary-form-header h2 {
        font-weight: 700;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    /* Datetime Input Mobile */
    input[type="datetime-local"] {
        font-size: 1.1rem !important;
        padding: 1rem !important;
        min-height: 52px !important;
    }

    /* Textarea Mobile */
    textarea.form-control {
        font-size: 1.1rem;
        padding: 1rem;
        min-height: 120px;
        line-height: 1.6;
    }

    /* Weather Section Mobile */
    .weather-coords-fallback {
        gap: 1rem;
    }

    .weather-coords-fallback label {
        font-size: 1.1rem;
        font-weight: 600;
        margin-top: 0.5rem;
    }

    .weather-coords-fallback input {
        font-size: 1.1rem;
        padding: 1rem;
        min-height: 52px;
    }

    .diary-stats {
        grid-template-columns: 1fr;
    }

    .diary-stats-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .stat-inline-item {
        width: 100%;
        justify-content: space-between;
    }

    .diary-stats-inline-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-inline-item-compact {
        width: 100%;
        justify-content: space-between;
    }

    .diary-stats-inline-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .diary-actions-inline {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .diary-content-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .diary-actions-inline .btn {
        flex: 1;
        min-width: 80px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    .diary-day-entry-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
    }

    .diary-day-entry-top {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .diary-day-entry-main {
        flex-wrap: wrap;
        gap: 0.4rem;
        min-width: 0;
    }

    .diary-day-entry-meta {
        flex-shrink: 0;
        margin-left: auto;
    }

    .diary-day-entry-actions-top {
        margin-bottom: 0.3rem;
        padding-bottom: 0.4rem;
    }

    .diary-entry-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }

    .diary-day-entry-text-row {
        margin-top: 0.35rem;
        padding-top: 0.4rem;
        width: 100%;
    }

    .diary-day-entry-text-row .diary-day-text {
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }

    .btn-icon {
        width: 2.25rem;
        min-width: 2.25rem;
        height: 2.25rem;
        font-size: 1.05rem;
    }
}

/* User / Admin */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-success { background: #d4edda; color: #155724; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-header h2 {
    margin: 0;
    flex: 1;
    text-align: center;
}

/* Profil */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
}

.profile-column-left,
.profile-column-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-color);
}

.profile-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #eff6ff; /* zartes Blau */
    color: var(--primary-color);
}

.profile-card-contacts h3 {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-contacts-empty {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.profile-contacts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem 1rem;
}

.profile-contacts-list li {
    font-size: 0.95rem;
}

.profile-contacts-category {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.contact-group-row td {
    background: #f9fafb;
}

.contact-group-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary-color);
}

.energy-flow-cell { vertical-align: middle; }
.energy-flow-buttons { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.energy-flow-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.35rem 0.6rem; border-radius: 8px; font-size: 0.8rem; font-weight: 500;
    cursor: pointer; border: 1.5px solid transparent; white-space: nowrap;
}
.energy-flow-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
.energy-flow-btn:has(input:checked) { border-color: currentColor; box-shadow: 0 0 0 1px currentColor; }
.energy-flow-spender { color: #15803d; background: #dcfce7; }
.energy-flow-spender:has(input:checked) { background: #bbf7d0; }
.energy-flow-neutral { color: #64748b; background: #f1f5f9; }
.energy-flow-neutral:has(input:checked) { background: #e2e8f0; }
.energy-flow-raeuber { color: #b91c1c; background: #fee2e2; }
.energy-flow-raeuber:has(input:checked) { background: #fecaca; }

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.profile-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-quick-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-weight: 400;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.profile-quick-actions .profile-quick-action-btn.btn-primary {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary, #6366f1);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.profile-quick-actions .profile-quick-action-btn.btn-primary:hover {
    background: rgba(99, 102, 241, 0.2);
}

.profile-quick-actions .profile-quick-action-btn.btn-secondary {
    background: rgba(100, 116, 139, 0.08);
    color: var(--secondary-color, #64748b);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.profile-quick-actions .profile-quick-action-btn.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.15);
}

.profile-quick-action-icon {
    font-size: 1.1rem;
}

.profile-contacts-by-category {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-contacts-category-group {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.profile-contacts-category-group + .profile-contacts-category-group {
    margin-top: 0.5rem;
}

.profile-contacts-category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary, #6366f1);
}

.profile-contacts-category-icon {
    font-size: 1.1rem;
}

.profile-contacts-category-name {
    color: inherit;
}

.btn-block {
    width: 100%;
    text-align: center;
    display: block;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.verification-badge.verified {
    background: #dcfce7;
    color: #166534;
}

.verification-badge.not-verified {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-column-left,
    .profile-column-right {
        gap: 1rem;
    }
}

/* Page Header Bar (oben im Content-Bereich) */
.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: -2rem -2rem 2rem -2rem;
    border-bottom: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-weight: 500;
    color: var(--dark-text);
}

.user-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-badge.user-badge-icon {
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.header-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
}
.profile-dl { 
    max-width: 100%; 
    margin: 0;
}
.profile-dl dt { 
    font-weight: 600; 
    margin-top: 0.75rem; 
    color: var(--secondary-color);
    font-size: 0.875rem;
}
.profile-dl dt:first-child {
    margin-top: 0;
}
.profile-dl dd { 
    margin: 0.25rem 0 0; 
    color: var(--dark-text);
    font-size: 0.95rem;
}
.profile-plan-link {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--primary, #6366f1);
    text-decoration: none;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-plan-link:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Nutzungskontingente-Seite */
.usage-page {
    max-width: 42rem;
}

.usage-card {
    margin-top: 0;
}

.usage-summary {
    margin-bottom: 1.5rem;
}

.usage-table-title {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.usage-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.usage-table {
    margin: 0;
    border: none;
    box-shadow: none;
}

.usage-table th {
    background: rgba(99, 102, 241, 0.06);
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.85rem;
}

.usage-table td {
    font-weight: 400;
}

.usage-empty {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.usage-back-link {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.usage-back-link .profile-plan-link {
    margin-left: 0;
}

.table { border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.table {
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.8);
}
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.table th { background: var(--light-bg); font-weight: 600; }
.table tbody tr:hover { background: var(--light-bg); }
.table input[type="text"], .table input[type="email"], .table input[type="password"], .table select { width: 100%; padding: 0.4rem 0.5rem; }

/* Landing Page */
.landing-hero {
    background: linear-gradient(135deg, #fdf2ff 0%, #e0f2fe 30%, #ecfdf3 65%, #fef9c3 100%);
    padding: 2.5rem 0 3rem;
}

.landing-hero-logo {
    display: block;
    text-align: center;
    margin-bottom: 1.25rem;
}

.landing-hero-logo-img {
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    justify-items: center;
}

.landing-hero-text {
    max-width: 560px;
}

.landing-tagline {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.landing-title {
    margin-top: 1.5rem;
    font-size: 2.2rem;
    line-height: 1.2;
    color: var(--dark-text);
}

.landing-subtitle {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--secondary-color);
    max-width: 34rem;
}

.landing-hero-actions {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-cta {
    border-radius: 999px;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #34d399, #22c55e);
}

.btn-primary.landing-cta:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.landing-hero-note {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.landing-hero-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.landing-hero-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f5bb5;
    margin-bottom: 0.4rem;
}

.landing-hero-card-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.landing-hero-card-stats {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.landing-hero-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: #f8fafc;
}

.landing-hero-card-label-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.landing-hero-card-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
}

.landing-hero-card-value-positive {
    color: #15803d;
}

.landing-hero-card-value-highlight {
    color: #1d4ed8;
}

.landing-hero-card-hint {
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.landing-section {
    padding: 0 0 3rem;
}

/* Landing Quote Section */
.landing-quote-section {
    margin: 4rem 0;
    padding: 0;
}

.landing-quote-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.landing-quote-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.landing-quote-image-container {
    width: 100%;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.landing-quote-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.landing-quote-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.landing-quote-icon {
    font-size: 3rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .landing-quote-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .landing-quote-image-container {
        border-radius: 12px;
    }
}

.landing-section-muted {
    background: #f9fafb;
    padding-top: 1rem;
}

.landing-section-header {
    text-align: center;
    max-width: 620px;
    margin: 2.5rem auto 1.75rem;
}

.landing-section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.landing-section-header p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.landing-feature-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.4rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(209, 213, 219, 0.7);
}

.landing-feature-card h3 {
    margin-top: 0.9rem;
    font-size: 1rem;
}

.landing-feature-card p {
    margin-top: 0.6rem;
    font-size: 0.92rem;
    color: var(--secondary-color);
}

.landing-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.landing-feature-icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.landing-feature-icon-green {
    background: #bbf7d0;
    color: #16a34a;
}

.landing-feature-icon-indigo {
    background: #ede9fe;
    color: #7c3aed;
}

.landing-benefit-card {
    max-width: 780px;
    margin: 2.5rem auto 0;
    background: linear-gradient(135deg, #fdf2ff 0%, #ffffff 35%, #ecfdf3 100%);
    border-radius: 20px;
    padding: 1.8rem 1.8rem 1.9rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.8);
}

.landing-benefit-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.landing-benefit-card p {
    font-size: 0.98rem;
    color: var(--secondary-color);
}

/* Eintrags-Maske informativ */
.landing-maske-section {
    background: #f8fafc;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.landing-maske-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.landing-maske-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 0 0 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.landing-maske-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f1f5f9;
}

.landing-maske-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.landing-maske-card .landing-maske-step,
.landing-maske-card h3,
.landing-maske-card p {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.landing-maske-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}

.landing-maske-card-optional .landing-maske-step {
    background: #fef3c7;
    color: #92400e;
}

.landing-maske-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--dark-text);
}

.landing-maske-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.45;
}

.landing-maske-cta-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.landing-maske-cta-text strong {
    color: var(--dark-text);
}

@media (max-width: 900px) {
    .landing-hero {
        padding-top: 1.5rem;
    }

    .landing-hero-logo-img {
        max-width: 180px;
    }

    .landing-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-hero-card {
        margin-top: 0.5rem;
    }

    .landing-title {
        font-size: 1.9rem;
    }
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    width: 100%;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-separator {
    color: var(--border-color);
    margin: 0 0.25rem;
}

.footer-copyright {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.footer-copyright p {
    margin: 0;
}

/* Legal Pages */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    line-height: 1.8;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-text);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.legal-section h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-text);
}

.legal-section p {
    margin-bottom: 1rem;
    color: var(--dark-text);
    text-align: justify;
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-section a:hover {
    color: #1e40af;
}

.legal-form {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.legal-form p {
    margin-bottom: 0.75rem;
}

.legal-form small {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem 1rem;
    }

    .legal-page h1 {
        font-size: 1.75rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

    .legal-section h3 {
        font-size: 1.1rem;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-separator {
        display: none;
    }

    /* Admin Filter Form Responsive */
    .filter-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Admin Filter Form */
.admin-filter-form .diary-form {
    max-width: 100%;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }
}

/* Quote Hero Card (Dashboard) */
.quote-hero-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.quote-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.quote-hero-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.quote-hero-text {
    flex: 1;
}

.quote-hero-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.quote-hero-quote {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-text);
    font-style: italic;
}

.quote-hero-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.quote-hero-link:hover {
    transform: translateX(4px);
    background: rgba(37, 99, 235, 0.1);
}

/* Quote Page */
.quote-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;
}

.quote-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    margin-bottom: 2rem;
    position: relative;
}

.quote-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.quote-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--dark-text);
    font-style: italic;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quote-image-container {
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    background: #fff;
}

.quote-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.quote-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.quote-icon {
    font-size: 3rem;
    margin-top: 1rem;
}

/* Audio (TTS) – optisch an die Quote-Karte angepasst */
.quote-audio-section {
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.quote-audio-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.quote-audio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    opacity: 0.9;
}

.quote-audio-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
    letter-spacing: 0.01em;
}

.quote-audio-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quote-audio-player {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.quote-audio-player::-webkit-media-controls-panel {
    background: transparent;
}

.quote-audio-player::-webkit-media-controls-play-button,
.quote-audio-player::-webkit-media-controls-current-time-display,
.quote-audio-player::-webkit-media-controls-time-remaining-display {
    min-width: 44px;
    min-height: 44px;
}

.quote-audio-player::-webkit-media-controls-enclosure {
    border-radius: 8px;
}

/* Share Section */
.quote-share-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.quote-share-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--dark-text);
    text-align: center;
    width: 100%;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--dark-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}
@supports (min-width: fit-content) {
    .share-btn {
        min-width: fit-content;
    }
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-btn svg {
    flex-shrink: 0;
}

.share-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-twitter:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.share-whatsapp:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.share-telegram:hover {
    background: #0088cc;
    color: white;
    border-color: #0088cc;
}

.share-email:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.share-link:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.share-native:hover {
    background: var(--info-color);
    color: white;
    border-color: var(--info-color);
}

@media (max-width: 768px) {
    .quote-page {
        padding: 1.5rem 0.5rem;
    }
    
    .quote-share-section {
        padding: 1rem;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    
    .share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }
    
    .share-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 140px;
        justify-content: center;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .share-btn {
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem;
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
}

.quote-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Öffentliche Quote-Seite Header */
.quote-header-public {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.quote-home-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
}

.quote-home-link:hover {
    color: var(--info-color);
    background: rgba(37, 99, 235, 0.15);
}

.quote-header-public h2 {
    margin: 0;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

/* Quote-Seite ohne Navigation */
.layout-landing .quote-page {
    padding: 2rem 1rem;
}

.layout-landing .site-footer {
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .quote-home-link {
        position: static;
        transform: none;
        justify-content: center;
        margin-bottom: 1rem;
        width: auto;
        display: inline-flex;
    }
    
    .quote-header-public {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .quote-hero-card {
        padding: 1.25rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .quote-hero-content {
        gap: 1rem;
    }

    .quote-hero-icon {
        font-size: 1.5rem;
    }

    .quote-hero-quote {
        font-size: 1rem;
    }

    .quote-card {
        padding: 2rem 1.5rem;
    }

    .quote-text {
        font-size: 1.25rem;
    }

    .quote-image-container {
        margin: 1.5rem 0;
        border-radius: 12px;
    }

    .quote-audio-section {
        margin-top: 1.25rem;
        padding: 1rem 1.25rem;
        border-radius: 14px;
    }

    .quote-audio-header {
        margin-bottom: 0.625rem;
    }

    .quote-audio-label {
        font-size: 0.9rem;
    }

    .quote-audio-wrapper {
        padding: 0.5rem 0.625rem;
        border-radius: 10px;
    }

    .quote-audio-player {
        height: 52px;
        min-height: 52px;
    }

    .quote-actions {
        flex-direction: column;
    }

    .quote-actions .btn {
        width: 100%;
    }
}

/* Feedback & Feature Requests */
.feedback-page,
.feedback-create-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.feedback-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feedback-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feedback-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.feedback-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    cursor: pointer;
    padding: 1rem;
    margin: -1.5rem -1.5rem 0 -1.5rem;
    border-radius: 12px 12px 0 0;
    transition: background-color 0.2s ease;
}

.feedback-card-header:hover {
    background: var(--bg-hover);
}

.feedback-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.feedback-toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.feedback-details {
    padding-top: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.feedback-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.feedback-status {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-open {
    background: #e0f2fe;
    color: #0369a1;
}

.status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.status-implemented {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.feedback-description {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.feedback-admin-response {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.admin-response-header {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.admin-response-text {
    color: #78350f;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.feedback-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.feedback-author {
    font-weight: 500;
}

.feedback-date {
    color: var(--text-tertiary);
}

.feedback-form {
    max-width: 100%;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.required {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 150px;
}

@media (max-width: 768px) {
    .feedback-page,
    .feedback-create-page {
        padding: 1rem 0.75rem;
    }

    .feedback-actions {
        flex-direction: column;
    }

    .feedback-actions .btn {
        width: 100%;
    }

    .feedback-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .feedback-card-header {
        flex-direction: column;
    }

    .feedback-title {
        width: 100%;
    }

    .feedback-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Admin Feature Requests */
.admin-filter-bar {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    margin: 0;
}

.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table thead {
    background: var(--primary-color);
    color: white;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-normal {
    background: #e0f2fe;
    color: #0369a1;
}

.priority-low {
    background: #f3f4f6;
    color: #6b7280;
}

.feature-request-detail {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

.detail-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail-header h3 {
    margin: 0;
    flex: 1;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    font-size: 0.9rem;
}

.meta-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.detail-description,
.detail-admin-comment {
    margin-bottom: 2rem;
}

.detail-description h4,
.detail-admin-comment h4 {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-description p,
.detail-admin-comment p {
    line-height: 1.6;
    white-space: pre-wrap;
}

.detail-admin-comment {
    background: #fef3c7;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.admin-actions-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.admin-actions-panel h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    text-align: center;
}

.admin-form {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-form:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 1024px) {
    .feature-request-detail {
        grid-template-columns: 1fr;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-table-container {
        overflow-x: scroll;
    }

    .admin-table {
        min-width: 800px;
    }

    .admin-actions {
        flex-direction: column;
    }

    .admin-actions .btn {
        width: 100%;
    }
}

/* ========== Ernährungsmodul (ADHS-/Depressions-freundlich, Calm UI) ========== */
.meal-section-calm {
    background-color: #f0f4f8;
    color: #4a5568;
}

.meal-day-card {
    background: #f0f4f8;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.meal-day-title {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.meal-day-image-wrap {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    max-width: 280px;
}

.meal-day-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.meal-day-dish-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.meal-day-label {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.meal-day-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.meal-day-check-item {
    margin-bottom: 0.25rem;
}

.meal-day-check-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
    cursor: pointer;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: background 0.15s, border-color 0.15s;
}

.meal-day-check-label:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.meal-day-checkbox {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    accent-color: #4a5568;
}

.meal-day-check-text {
    color: #4a5568;
}

.meal-day-checkbox:checked + .meal-day-check-text {
    text-decoration: line-through;
    color: #718096;
}

.meal-day-instructions {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.meal-day-instructions summary {
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
}

.meal-day-instructions-text {
    margin-top: 0.5rem;
    color: #4a5568;
    line-height: 1.5;
}

.meal-day-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-meal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    background: #4a5568;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn-meal:hover {
    background: #2d3748;
    color: #fff;
    transform: translateY(-1px);
}

.btn-meal-secondary {
    background: #fff;
    color: #4a5568;
    border: 2px solid #4a5568;
}

.btn-meal-secondary:hover {
    background: #edf2f7;
    color: #2d3748;
}

.btn-meal-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-meal-sm { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-meal-lg { min-height: 52px; padding: 0.875rem 1.5rem; }
.btn-meal-outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #4a5568;
}

.btn-meal-outline:hover {
    background: #edf2f7;
}

.meal-page-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.meal-page-desc {
    color: #718096;
    margin-bottom: 1.5rem;
}

.meal-page-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meal-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.meal-day-tile {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.meal-day-tile-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #718096;
}

.meal-day-tile-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.meal-day-tile-image img {
    width: 100%;
    height: auto;
    display: block;
}

.meal-day-tile-title {
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.meal-day-tile-title-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
}

.meal-day-tile-title-link:hover {
    text-decoration: underline;
    color: #2d3748;
}

.meal-day-tile-no-image {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: #f0f4f8;
    border-radius: 8px;
}

.meal-gen-image-inline {
    margin: 0;
}

.meal-day-tile-fav-name, .meal-day-tile-fav-notes {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.meal-day-tile-empty {
    color: #718096;
    font-size: 0.875rem;
}

.meal-fav-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meal-input {
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #4a5568;
}

.meal-shopping-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meal-shopping-category {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.meal-shopping-hint {
    background: #edf2f7;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.meal-shopping-select {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.meal-shopping-select-compact {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.meal-shopping-select-compact .meal-shopping-select-title {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.meal-shopping-select-compact .meal-shopping-select-group {
    margin-bottom: 0.5rem;
}

.meal-shopping-select-compact .meal-shopping-select-group:last-of-type {
    margin-bottom: 0.75rem;
}

.meal-shopping-select-compact .meal-shopping-select-grid {
    gap: 0.4rem 1rem;
    margin-bottom: 0.5rem;
}

.meal-shopping-select-compact .meal-shopping-select-item {
    padding: 0.4rem 0.6rem;
    min-height: 36px;
}

.meal-shopping-select-compact .meal-shopping-select-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.meal-shopping-select-compact .meal-shopping-select-day {
    font-size: 0.6875rem;
}

.meal-shopping-select-compact .meal-shopping-select-name {
    font-size: 0.8125rem;
}

.meal-shopping-select-title {
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.meal-shopping-select-form {
    margin: 0;
}

.meal-shopping-select-group-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.meal-shopping-select-group {
    margin-bottom: 0.75rem;
}

.meal-shopping-select-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.meal-shopping-select-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f9fafb;
    transition: background 0.15s, border-color 0.15s;
}

.meal-shopping-select-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.meal-shopping-select-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.15rem;
    accent-color: #4a5568;
}

.meal-shopping-select-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meal-shopping-select-day {
    font-size: 0.75rem;
    color: #718096;
}

.meal-shopping-select-name {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
}

.meal-shopping-hint a {
    color: #2d3748;
    text-decoration: underline;
}

.meal-shopping-today {
    background: #fff;
    border: 2px solid #4a5568;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.meal-shopping-today-title {
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.meal-shopping-today-desc {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

.meal-shopping-today-desc a {
    color: #4a5568;
    text-decoration: underline;
}

.meal-shopping-today-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
    color: #4a5568;
}

.meal-shopping-week-title {
    font-size: 1.125rem;
    color: #2d3748;
}

.meal-shopping-recipes-desc {
    font-size: 0.9375rem;
    color: #4a5568;
    margin: -0.25rem 0 1rem 0;
}

.meal-shopping-cat-title {
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.meal-shopping-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meal-shopping-item {
    margin-bottom: 0.25rem;
}

.meal-shopping-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.meal-shopping-label:hover {
    background: #f0f4f8;
}

.meal-shopping-checkbox {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    accent-color: #4a5568;
}

.meal-shopping-text {
    color: #4a5568;
}

.meal-shopping-checkbox:checked + .meal-shopping-text {
    text-decoration: line-through;
    color: #718096;
}

.meal-empty {
    color: #718096;
    padding: 1rem;
}

/* Rezepte-Übersicht (/diary/rezepte) */
.meal-rezepte-block {
    margin-bottom: 2rem;
}

.meal-rezepte-block-title {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.meal-rezepte-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.meal-rezept-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.meal-rezept-header {
    margin-bottom: 0.5rem;
}

.meal-rezept-day {
    font-size: 0.875rem;
    color: #718096;
}

.meal-rezept-fav-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.meal-rezept-notes {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.meal-rezept-image {
    border-radius: 8px;
    overflow: hidden;
    margin: 0.75rem 0;
    max-width: 260px;
}

.meal-rezept-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 160px;
    object-fit: cover;
}

.meal-rezept-name {
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.meal-rezept-label {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.meal-rezept-ingredients {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.meal-rezept-details {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.meal-rezept-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
}

.meal-rezept-instructions {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.5;
}

/* Rezept-Detailseite (/diary/rezept/{id}) */
.meal-back-link {
    margin-bottom: 1rem;
}

.meal-back-link a {
    color: #4a5568;
    text-decoration: none;
}

.meal-back-link a:hover {
    text-decoration: underline;
}

.meal-rezept-detail {
    max-width: 600px;
}

.meal-rezept-detail-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.meal-rezept-detail-date {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1rem;
}

.meal-rezept-detail-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-width: 360px;
}

.meal-rezept-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 280px;
    object-fit: cover;
}

.meal-rezept-detail-no-image {
    background: #edf2f7;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.meal-rezept-detail-no-image p {
    margin-bottom: 0.75rem;
    color: #4a5568;
}

.meal-gen-image-form {
    margin: 0.5rem 0;
}

.meal-rezept-detail-hint {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.5rem;
}

.meal-rezept-detail-ingredients h3,
.meal-rezept-detail-instructions h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.meal-rezept-detail-ingredients-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0 0 1.5rem;
    color: #4a5568;
}

.meal-rezept-detail-instructions-text {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Schlafanalyse-Sektion */
.sleep-analysis-card {
    border: 1px solid var(--border-color);
}
.sleep-analysis-card h4 {
    font-weight: 600;
    color: var(--dark-text);
}
.wake-frequency-buttons .btn,
.recovery-buttons .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}
.recovery-icon {
    margin-right: 0.25rem;
}
.sleep-influence-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.sleep-influence-tag {
    cursor: pointer;
    margin: 0;
}
.sleep-influence-chip {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.875rem;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.sleep-influence-tag:hover .sleep-influence-chip {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
}
.sleep-influence-tag.active .sleep-influence-chip {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Schlafanalyse Detail (show.twig) */
.badge-sleep-influence {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Sleep Coach Aktions-Karten */
.sleep-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.sleep-action-card {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}
.sleep-action-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.sleep-action-card--tip {
    border-left: 4px solid var(--info-color);
}
.sleep-action-card--warning {
    border-left: 4px solid var(--warning-color);
}
.sleep-action-card--praise {
    border-left: 4px solid var(--success-color);
}
.sleep-action-card.read {
    opacity: 0.85;
}
.sleep-action-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.sleep-action-icon {
    font-size: 1.25rem;
}
.sleep-action-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
}
.sleep-action-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.sleep-action-btn {
    margin-bottom: 0.75rem;
}
.sleep-action-status {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sleep-action-status .sleep-status-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--secondary-color);
    cursor: pointer;
}
.sleep-action-status .sleep-status-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Schlafanalyse-Dashboard */
.sleep-trends-range-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.sleep-range-tab {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}
.sleep-range-tab:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sleep-range-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.sleep-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sleep-stat-card .stat-number {
    font-size: 1.5rem;
}
.sleep-chart-section,
.sleep-weekday-section,
.sleep-influence-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sleep-chart-section h3,
.sleep-weekday-section h3,
.sleep-influence-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.weekend-insight {
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.influence-ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.influence-card {
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid;
}
.influence-positive {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.08);
}
.influence-negative {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.08);
}
.influence-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.influence-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}
