:root {
    --bg: #0f172a;
    --card: #1e293b;
    --accent: #10b981;
    --orange: #f59e0b;
    --danger: #ef4444;
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: #334155;
    --radius: 18px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0; padding: 0;
    overflow-x: hidden;
}

/* Dashboard Styles */
.weather-widget {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    margin: 20px; padding: 20px; border-radius: 24px;
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid var(--border);
}
.weather-info { display: flex; align-items: center; gap: 20px; }
#weather-icon-container { font-size: 3rem; color: var(--accent); }
.temp-val { font-size: 2.5rem; font-weight: 600; }
.weather-detail { color: var(--text-dim); font-size: 0.9rem; }

.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; padding: 20px; }
.tile { background: var(--card); border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: white; aspect-ratio: 1 / 1; border: 1px solid var(--border); cursor: pointer; transition: transform 0.1s; }
.tile:active { transform: scale(0.95); }
.tile i { font-size: 2.2rem; margin-bottom: 10px; color: var(--accent); }
.tile span { font-weight: 600; font-size: 0.9rem; }

/* Overlay & Header */
#content-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg); display: none; z-index: 1000; flex-direction: column;
}

.overlay-header {
    height: 70px; background: #111827;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 15px; border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; gap: 15px; }
.btn-side { width: 45px; height: 45px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

iframe { width: 100%; height: calc(100% - 70px); border: none; }

/* SIDE MENU */
.side-menu {
    position: fixed; top: 0; left: -300px;
    width: 280px; height: 100%;
    background: #0f172a; border-right: 1px solid var(--border);
    z-index: 10001; transition: transform 0.3s ease;
    display: flex; flex-direction: column;
    /* Scrollbar fix: Menü scrollt, damit alle Einträge erreichbar sind */
    overflow-y: auto;
    overflow-x: hidden;
    /* iOS Safari: sicherer Bereich unten (Home-Leiste) */
    padding-bottom: env(safe-area-inset-bottom, 20px);
    -webkit-overflow-scrolling: touch;
}
.side-menu.open { transform: translateX(300px); }

#menu-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000; display: none;
}

.menu-section-label {
    padding: 14px 20px 4px;
    font-size: 0.68rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px;
}
.menu-header { padding: 20px 20px 6px; font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.menu-item {
    width: 100%; padding: 13px 20px; background: transparent; border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: white; text-align: left; font-size: 1rem;
    display: flex; align-items: center; gap: 14px; cursor: pointer;
    box-sizing: border-box;
}
.menu-item i { width: 22px; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.menu-item:active { background: var(--card); }

/* Buttons & Inputs (für Unterseiten) */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 15px; }
/* Erweitere die bestehende Regel um 'select' */
input, select {
    width: 100%;
    padding: 16px; 
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 16px !important; 
    box-sizing: border-box;
    margin-top: 8px;
    appearance: none; /* Entfernt das Standard-Design des Browsers */
}

/* Spezifisch für die Combobox (Dropdown-Pfeil fixen) */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px; /* Platz für den Pfeil */
}
.btn-touch-nav { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: white; text-decoration: none; }

/* --- Suche & Add-Button Zeile --- */
.search-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

/* Der Plus-Button links */
.btn-touch-nav {
    width: 55px;
    height: 52px;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Suchfeld Container */
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    z-index: 5;
}

#suche {
    width: 100%;
    margin: 0 !important;
    padding: 15px 15px 15px 45px !important; /* Platz für die Lupe */
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
}
.filter-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: #1e293b;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text);
}
.filter-btn.active {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.15);
}

.filter-btn input { 
    display: none; /* Versteckt die kleine Checkbox */
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #111827;
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}
.select-row { 
    display: flex; 
    gap: 12px; 
    align-items: flex-end; 
    margin-bottom: 20px; 
}
/* Große Touch-Buttons */
.btn-submit, .btn-action {
    background: var(--accent);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-weight: bold;
    font-size: 1.1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}