/* ==========================================
   1. CSS VARIABLES (Theme Colors)
========================================== */
:root {
    --bg-color: #1e1e2f;
    --card-bg: #2a2a40;
    --card-bg-hover: #32324e;
    
    --text-main: #ffffff;
    --text-muted: #a0a0b5;
    
    --primary: #6c5ce7;
    --primary-light: rgba(108, 92, 231, 0.15);
    --info: #00cec9;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
    
    --border-color: #3f3f5a;
    --border-radius: 12px;
}

/* ==========================================
   2. GLOBAL RESET & TYPOGRAPHY
========================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 100px; /* Platz für Tab-Bar & Floating Save Bar */
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
h1 { font-size: 1.4rem; text-align: center; margin-bottom: 25px; }
h2 { margin-top: 0; font-size: 1.2rem; color: #a8a8ff; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }

/* ==========================================
   3. LAYOUT, GRID & HEADERS
========================================== */
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.page-header { text-align: center; margin-bottom: 40px; }
.page-title { font-size: 2.2rem; letter-spacing: 0.5px; margin-bottom: 5px; }
.page-subtitle { font-size: 1rem; color: var(--text-muted); font-style: italic; max-width: 600px; margin: 0 auto; }

/* ==========================================
   4. CARDS & ACTION CARDS
========================================== */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 25px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { margin: 0; font-size: 1.3rem; font-weight: 600; }

.action-card {
    display: flex; align-items: center; gap: 15px; padding: 20px;
    background: var(--card-bg); border-radius: var(--border-radius);
    border: 1px solid var(--border-color); transition: all 0.2s ease;
    color: var(--text-main); text-decoration: none; margin-bottom: 15px;
}
.action-card:hover { transform: translateY(-4px); background: var(--card-bg-hover); border-color: var(--primary); }
.action-card.disabled { opacity: 0.5; pointer-events: none; border-color: transparent; }
.action-card .icon { font-size: 1.8rem; background: var(--primary-light); color: var(--primary); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.action-card-text h4 { margin: 0; font-size: 1.1rem; }
.action-card-text p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================
   5. BUTTONS
========================================== */
.btn, .submit-btn, .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--card-bg-hover); color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px 24px; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; text-decoration: none; box-sizing: border-box;
}
.btn:hover, .submit-btn:hover, .menu-btn:hover { background: var(--border-color); transform: translateY(-2px); }
.btn:active, .submit-btn:active, .menu-btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn-primary:hover { background: #5a4bcf; }
.btn-danger { background: rgba(255, 118, 117, 0.1); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: rgba(255, 118, 117, 0.2); }

/* ==========================================
   6. FORMS & INPUTS (Global)
========================================== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.form-control, .tax-input {
    width: 100%; height: 45px; padding: 0 15px; 
    border-radius: 8px; border: 1px solid var(--border-color); 
    background: var(--bg-color); color: white; 
    font-family: inherit; font-size: 1rem; box-sizing: border-box;
}
textarea.form-control { height: auto; padding: 15px; resize: vertical; }
.form-control:focus, .tax-input:focus { outline: none; border-color: var(--primary); }

/* Custom Dropdown mit SVG Pfeil */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 12px auto;
    padding-right: 40px; cursor: pointer;
}
select.form-control optgroup { background: var(--card-bg); color: var(--primary); font-weight: bold; }

/* Toggles & Checkboxen */
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-main); font-size: 0.95rem; margin-top: 10px; }
.toggle-switch input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }

/* ==========================================
   7. TIMELINE & BLOCKS (Tagesansicht & Templates)
========================================== */
.timeline-gap { text-align: center; color: var(--text-muted); padding: 15px 0; position: relative; }
.timeline-gap-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; border-left: 2px dashed var(--border-color); transform: translateX(-50%); z-index: 1; }
.timeline-gap-text { background: var(--bg-color); position: relative; z-index: 2; padding: 6px 16px; font-size: 0.85rem; border-radius: 20px; border: 1px solid var(--border-color); color: var(--text-muted); }

.tpl-block { display: flex; flex-direction: row; align-items: stretch; background: var(--card-bg); border-radius: 12px; margin-bottom: 12px; overflow: hidden; border-left: 6px solid var(--block-color, var(--primary)); position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.tpl-block-time { flex: 0 0 80px; background: rgba(0,0,0,0.2); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 15px 5px; font-family: monospace; font-size: 1.1rem; font-weight: bold; border-right: 1px solid rgba(255,255,255,0.05); }
.tpl-block-time span { font-size: 0.75rem; color: var(--text-muted); font-weight: normal; margin: 2px 0; font-family: system-ui, sans-serif; }

.tpl-block-content { flex: 1; padding: 15px 85px 15px 15px; display: flex; flex-direction: column; justify-content: center; }
.tpl-block-header { display: flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 600; margin-bottom: 5px; color: var(--text-main); flex-wrap: wrap; line-height: 1.2; }
.tpl-block-header .material-symbols-rounded { font-size: 18px; color: var(--block-color, var(--primary)); }
.tpl-block-title { font-size: 0.95rem; color: white; margin-bottom: 8px; font-style: italic; }

.tpl-block-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tpl-tag-pill { font-size: 0.7rem; padding: 3px 8px; border-radius: 12px; background: rgba(255,255,255,0.05); color: #ddd; }

.tpl-block-actions { position: absolute; right: 10px; top: 10px; display: flex; gap: 5px; }
.tpl-block-btn { background: rgba(255,255,255,0.05); color: var(--text-muted); border: none; cursor: pointer; padding: 8px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.tpl-block-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }
.tpl-block-btn.danger:hover { color: var(--danger); background: rgba(255,118,117,0.1); }

/* ==========================================
   8. TAG SELECTION (Pillen im Modal)
========================================== */
.tpl-tag-group { margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.tpl-tag-group-title { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; display: block; font-weight: bold; }
.tpl-tag-container { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.tpl-radio-label { display: inline-flex; align-items: center; padding: 8px 14px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; user-select: none; color: var(--text-main); }
.tpl-radio-label input[type="radio"], .tpl-radio-label input[type="checkbox"] { display: none; }
.tpl-radio-label:has(input:checked) { border-color: var(--tag-color, var(--primary)); background: var(--tag-color, var(--primary)); color: #111; font-weight: bold; }
.tpl-radio-label.clear-btn:has(input:checked) { border-color: var(--border-color); background: transparent; color: var(--text-muted); font-weight: normal; }

/* ==========================================
   9. CALENDAR (Month View)
========================================== */
.stamp-palette { background: var(--card-bg); padding: 25px; border-radius: var(--border-radius); border: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin-bottom: 20px;}
.stamp-palette p { margin: 0 0 15px 0; color: var(--text-muted); font-size: 0.95rem; }
.stamp-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.stamp-btn { background: var(--bg-color); color: var(--text-main); border: 1px solid var(--border-color); padding: 12px 20px; border-radius: 10px; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; user-select: none; }
.stamp-btn.active { border-color: var(--primary); background: var(--primary-light); font-weight: bold; color: var(--primary); }

.cal-nav { display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); padding: 15px 20px; border-radius: var(--border-radius); border: 1px solid var(--border-color); margin-bottom: 20px; }
.cal-nav a { color: var(--text-main); text-decoration: none; padding: 8px 15px; background: var(--card-bg-hover); border-radius: 8px; font-size: 1rem; border: 1px solid var(--border-color); transition: background 0.2s;}
.cal-nav a:hover { background: var(--border-color); }
.cal-nav h3 { margin: 0; font-size: 1.2rem; color: var(--info); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-header { background: transparent; padding: 10px 0; text-align: center; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.cal-cell { background: var(--card-bg); min-height: 100px; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; cursor: pointer; border: 2px solid var(--border-color); transition: border 0.2s, transform 0.1s; position: relative; }
.cal-cell:active { transform: scale(0.97); }
.cal-cell:hover:not(.locked) { border-color: var(--primary); }
.cal-cell.locked { background: rgba(30, 30, 47, 0.4); opacity: 0.5; cursor: not-allowed; border-color: transparent !important; }
.cal-cell.today { border-color: var(--info); background: rgba(0, 206, 201, 0.05); }

.cal-date { font-size: 1.1rem; font-weight: bold; margin-bottom: 5px; align-self: flex-end; }
.cal-date a { color: var(--text-main); text-decoration: none; padding: 4px 8px; border-radius: 8px; transition: background 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.cal-date a:hover { background: var(--primary-light); color: var(--primary); }

.badge-container { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.cal-badge { background: rgba(0, 184, 148, 0.2); color: var(--success); font-size: 0.75rem; font-weight: bold; padding: 6px; border-radius: 6px; text-align: center; word-wrap: break-word; line-height: 1.2; width: 100%; border: 1px solid var(--success); box-sizing: border-box; }
.cal-badge.draft { background: var(--primary-light); color: var(--primary); border: 1px dashed var(--primary); }

.gcal-dots-container { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0; margin-bottom: auto; cursor: help; }
.gcal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.gcal-dot-plus { font-size: 0.7rem; color: var(--text-muted); font-weight: bold; line-height: 8px; margin-left: 2px; }

/* ==========================================
   10. BOTTOM NAVIGATION & FLOATING BARS
========================================== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(30, 30, 47, 0.90); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); 
    z-index: 1000;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.75rem; font-weight: 500; text-decoration: none; transition: color 0.2s; width: 25%; }
.nav-item:hover, .nav-item.active { color: var(--primary); }
.nav-item .material-symbols-rounded { font-size: 1.6rem; }

.floating-save-bar { position: fixed; bottom: 85px; left: 0; width: 100%; background: rgba(24, 24, 36, 0.95); backdrop-filter: blur(10px); padding: 15px; box-sizing: border-box; border-top: 1px solid var(--border-color); transform: translateY(150%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; justify-content: center; z-index: 999; }
.floating-save-bar.visible { transform: translateY(0); }

/* ==========================================
   11. MODALS & OVERLAYS
========================================== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 10000; justify-content: center; align-items: center; backdrop-filter: blur(4px); padding: 20px; box-sizing: border-box;}
.modal-content { background: var(--card-bg); padding: 25px; border-radius: 12px; width: 100%; max-width: 450px; position: relative; border: 1px solid var(--border-color); box-shadow: 0 10px 25px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; }
.modal-close { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 5px; line-height: 1; transition: color 0.2s; }
.modal-close:hover { color: var(--danger); }

/* ==========================================
   12. ICON PICKER POPUP
========================================== */
.icon-picker-btn { width: 45px; height: 45px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: 8px; color: white; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.icon-picker-btn:hover { border-color: var(--primary); background: var(--card-bg-hover); }

.emoji-picker-popup button { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; border-radius: 6px; padding: 5px; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.emoji-picker-popup button:hover { background: rgba(255,255,255,0.1); }

/* Update für den Emoji Picker (Kategorien & Akkordeon) */
.emoji-picker-popup {
    display: none; position: absolute; z-index: 10005;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 10px; width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    max-height: 250px; 
    overflow-y: auto;
    overflow-x: hidden; /* Verhindert das seitliche Scrollen hart */
    box-sizing: border-box; /* Zwingt Padding nach innen */
}
/* Macht die Scrollbar im Picker schmal und passend zum Dark Mode */
.emoji-picker-popup::-webkit-scrollbar { width: 6px; }
.emoji-picker-popup::-webkit-scrollbar-track { background: transparent; }
.emoji-picker-popup::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
.emoji-picker-popup::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.emoji-picker-popup.active { display: block; }
.emoji-category-header {
    font-size: 0.8rem; font-weight: bold; color: var(--primary);
    margin: 10px 0 5px 0; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; padding: 4px 8px; border-radius: 6px;
    background: rgba(0,0,0,0.2);
}
.emoji-category-header:hover { background: rgba(108, 92, 231, 0.1); }
.emoji-category-header:first-child { margin-top: 0; }
.emoji-category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 5px; }

/* ==========================================
   13. TAXONOMY SPECIFICS
========================================== */
.tax-card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.tax-card-title h4 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.tax-color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

.tax-item { background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); padding: 10px 15px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; margin-bottom: 8px; }
.tax-item:hover { background: var(--card-bg-hover); border-color: var(--primary); }
.tax-item.disabled { opacity: 0.5; filter: grayscale(100%); }

.tax-actions { display: flex; gap: 5px; align-items: center; }
.tax-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 5px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.tax-btn:hover { background: var(--border-color); color: var(--text-main); }
.tax-btn.danger:hover { background: rgba(255, 118, 117, 0.1); color: var(--danger); }

/* ==========================================
   14. HABITS SPECIFICS
========================================== */
.habit-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 20px; background: var(--card-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.habit-info strong { display: block; font-size: 1.15rem; margin-bottom: 5px; color: var(--text-main); }
.streak { font-size: 0.85rem; color: var(--text-muted); }

.habit-btn { padding: 12px 20px; border-radius: 10px; font-weight: bold; border: none; cursor: pointer; transition: transform 0.1s, opacity 0.2s; display: flex; align-items: center; justify-content: center; min-width: 80px; }
.habit-btn:active { transform: scale(0.95); }
.habit-btn-count { background: var(--primary-light); color: var(--info); font-size: 1.3rem; border: 1px solid rgba(0, 206, 201, 0.2); }
.habit-btn-done { background: var(--primary); color: white; }
.habit-btn-disabled { background: var(--card-bg-hover); color: var(--text-muted); pointer-events: none; border: 1px solid var(--border-color); }

/* ==========================================
   15. HELPER CLASSES
========================================== */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================
   17. UTILITIES & ALERTS
========================================== */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.alert-danger { background: rgba(255, 118, 117, 0.1); color: var(--danger); border: 1px solid rgba(255, 118, 117, 0.2); }
.alert-success { background: rgba(0, 184, 148, 0.1); color: var(--success); border: 1px solid rgba(0, 184, 148, 0.2); }

/* ==========================================
   18. AUTHENTICATION (Login / Register)
========================================== */
body.auth-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px; padding-bottom: 20px !important; /* Überschreibt das Bottom-Nav Padding */
}
.login-card { width: 100%; max-width: 400px; text-align: center; margin: 0 auto; }
.login-brand { font-size: 2rem; font-weight: bold; color: var(--primary); display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 30px; }
.login-brand span { font-size: 2.5rem; }
.login-card .form-group { text-align: left; }
.checkbox-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.checkbox-inline label { margin: 0; cursor: pointer; color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================
   19. INDEX (Dashboard Specifics)
========================================== */
.welcome-hero { text-align: center; margin-top: 10vh; margin-bottom: 5vh; }
.welcome-hero h2 { border: none; font-size: 2.2rem; color: var(--text-main); margin-bottom: 5px; padding: 0; }
.welcome-hero p { color: var(--text-muted); margin-bottom: 40px; font-size: 1.1rem; }
.btn-hero { padding: 20px 40px; font-size: 1.3rem; border-radius: 100px; box-shadow: 0 10px 30px var(--primary-light); }

/* Helfer-Klasse für volle Breite (z.B. im Login) */
.w-100 { width: 100% !important; }
/* Entfernt die Linie unter dem "Good Morning" */
.welcome-hero h2 { border-bottom: none; padding-bottom: 0; }

/* ==========================================
   20. UTILITIES & HELPERS
========================================== */
.flex-row { display: flex; gap: 15px; align-items: center; width: 100%; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 25px !important; }
.mt-2 { margin-top: 10px !important; }

/* Spezifische Komponenten */
.btn-icon { width: 45px; height: 45px; padding: 0 !important; display: flex; align-items: center; justify-content: center; flex: 0 0 45px; }
.btn-dashed { border: 2px dashed var(--border-color); background: transparent; color: var(--text-muted); }
.btn-dashed:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.divider { border: 0; border-top: 1px solid var(--border-color); margin: 20px 0; }
.select-highlight { background-color: var(--card-bg-hover); font-weight: bold; border: 1px solid var(--primary); color: var(--primary); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; margin-top: 20px; }

.energy-badge { font-size: 0.75rem; color: var(--text-muted); }
.energy-impact { font-size: 0.8rem; color: var(--info); margin-left: 8px; font-weight: bold; }
.breadcrumb-arrow { color: var(--text-muted); margin: 0 4px; }

/* ==========================================
   21. ADDITIONAL UTILITIES & MORNING UI
========================================== */
/* Text Colors & Fonts */
.text-primary { color: var(--primary) !important; }
.text-info { color: var(--info) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: bold !important; }
.border-primary { border-color: var(--primary) !important; }

/* Layout & Links */
.back-link { font-size: 0.95rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; font-weight: 500; }
.back-link:hover { color: var(--text-main); }
.modal-md { max-width: 500px !important; }
.modal-title { margin: 0; color: var(--primary); display: flex; align-items: center; gap: 8px; }

/* Energy Slider & Calculator (morning.php) */
.energy-slider { width: 100%; margin: 10px 0; accent-color: var(--primary); cursor: pointer; }
.energy-slider.info { accent-color: var(--info); }

.energy-calc-box { background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.energy-calc-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem; }
.energy-calc-total { display: flex; justify-content: space-between; font-size: 1rem; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-color); }

/* Custom Checkbox Pills (Self-Care) */
.checkbox-pill { background: var(--card-bg-hover); padding: 8px 15px; border-radius: 8px; cursor: pointer; color: var(--text-main); font-size: 0.9rem; transition: all 0.2s; border: 1px solid transparent; display: inline-flex; align-items: center; margin: 0; }
.checkbox-pill input { display: none; }
.checkbox-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: bold; }

/* Timeline & GCal Specifics */
.timeline-container { min-height: 200px; display: flex; flex-direction: column; padding: 20px;}
.empty-state { color: var(--text-muted); text-align: center; padding: 40px 20px; }
.tpl-block-gcal { --block-color: #4285F4; border-style: dashed; background: rgba(66, 133, 244, 0.05); opacity: 0.8; }
.tpl-block-gcal .tpl-block-time { background: rgba(0,0,0,0.1); }
.btn-floating-save { width: 100%; max-width: 400px; padding: 15px; border-radius: 30px; font-size: 1.1rem; }

/* ==========================================
   22. LIVE DASHBOARD (index.php)
========================================== */
/* Basis-Klasse für erledigte Tasks (greift überall) */
.tpl-block-completed { 
    transition: all 0.3s; 
}

/* Spezifische Live-Timeline Anpassungen (Verkleinern & Lücken füllen) */
.timeline-container .tpl-block-completed {
    opacity: 0.4; 
    filter: grayscale(50%);
    /* transform: scale(0.85); */
    transform-origin: top center;
    /* margin-bottom: -15px; */
}

.tpl-block-active { 
    border-left-width: 8px !important; 
    border-color: var(--success) !important; 
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.4); 
    transform: scale(1.02);
    z-index: 10;
}
.tpl-block-active .tpl-block-time { background: rgba(0, 184, 148, 0.15) !important; color: var(--success); }

.current-time-marker { display: flex; align-items: center; margin: 15px 0; color: var(--success); font-weight: bold; font-size: 0.9rem; }
.current-time-marker::before, .current-time-marker::after { content: ''; flex: 1; border-bottom: 2px dashed var(--success); margin: 0 15px; opacity: 0.5; }

.btn-live { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; font-weight: bold; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s; }
.btn-live-start { background: var(--success); color: white; }
.btn-live-start:hover { background: #00a080; }
.btn-live-end { background: var(--warning); color: #111; }
.btn-live-end:hover { background: #e5b660; }

/* ==========================================
   23. COMPLETED TASKS ACCORDION (index.php)
========================================== */
.completed-group { margin-bottom: 15px; }
.completed-group summary {
    background: var(--card-bg-hover);
    color: var(--text-muted);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    transition: all 0.2s;
}
.completed-group summary:hover { background: var(--card-bg); color: var(--text-main); }
.completed-group summary::marker { display: none; }
.completed-group summary::-webkit-details-marker { display: none; }
.completed-group[open] summary { margin-bottom: 15px; background: transparent; border-color: transparent; }

/* ==========================================
   24. DASHBOARD & HEALTH GRID
========================================== */
/* Dashboard Tabs & Bars */
.view-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.view-tab { flex: 1; text-align: center; padding: 10px; background: var(--card-bg-hover); border-radius: 8px; color: var(--text-muted); text-decoration: none; font-weight: bold; border: 1px solid transparent; transition: all 0.2s;}
.view-tab.active { background: var(--card-bg); color: var(--primary); border-color: var(--primary); }

.bar-wrap { margin-top: 15px; }
.bar-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 5px; }
.bar-bg { width: 100%; background: var(--card-bg-hover); border-radius: 6px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 6px; }

.tag-chip { display: inline-block; background: var(--card-bg-hover); padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; border: 1px solid var(--border-color); color: var(--info); margin-right: 5px; margin-top: 5px; }
.cat-badge { display: inline-block; background: var(--warning); color: #111; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; margin-bottom: 5px; }

/* Health Grid */
.health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.metric-card { background: var(--card-bg); padding: 15px; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; flex-direction: column; }
.metric-title { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; font-weight: bold; }
.metric-value { font-size: 1.6rem; font-weight: bold; color: var(--text-main); }
.metric-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.metric-card.full-width { grid-column: 1 / -1; }

.metric-list { margin-top: 15px; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.metric-list-item { display: flex; justify-content: space-between; padding-bottom: 4px; border-bottom: 1px dashed var(--border-color); }
.metric-list-item:last-child { border-bottom: none; }
.metric-list-label { color: var(--text-muted); }
.metric-list-val { font-weight: 500; color: var(--text-main); }

/* Farb-Akzente & HR Zonen */
.color-bb { color: #00cec9; } 
.color-stress { color: var(--danger); } 
.color-sleep { color: #a8a8ff; } 
.color-cycle { color: #fd79a8; } 
.color-train { color: var(--warning); }
.color-daily { color: #55efc4; }
.hr-zones { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 5px; background: var(--card-bg-hover); }