:root {
    --bg-color: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #6e6e73;
    --accent-color: #0071E3;
    --danger-color: #FF3B30;
    --success-color: #34C759;
    --card-bg: rgba(255, 255, 255, 0.82);
    --radius-l: 20px;
    --radius-m: 12px;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-stack);
    background: url('background_snow.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0; padding: 0;
    color: var(--text-primary);
    min-height: 100vh;
}

body::before {
    content: ''; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.1); 
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}

.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    padding: 30px 20px;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    border-right: 1px solid rgba(255,255,255,0.4);
    box-shadow: 5px 0 25px rgba(0,0,0,0.05);
}

.brand { font-size: 1.2rem; font-weight: 800; margin-bottom: 40px; padding-left: 10px; color: #000; }
.brand span { display: block; font-size: 0.8rem; font-weight: 500; color: #666; }

.nav-links { list-style: none; padding: 0; margin: 0; flex: 1; }
.nav-links a {
    display: flex; align-items: center; padding: 12px 16px;
    text-decoration: none; color: #333;
    border-radius: var(--radius-m); font-weight: 600; margin-bottom: 5px;
    transition: 0.2s;
}
.nav-links a:hover { background: rgba(0,0,0,0.05); }
.nav-links a.active { background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.08); color: var(--accent-color); }
.nav-icon { margin-right: 12px; font-size: 1.2rem; }

/* Main Content */
.main-content {
    flex: 1; padding: 40px; overflow-y: auto;
    padding-bottom: 100px; 
}

/* --- HEADER TEXT --- */
header h1 { 
    margin: 0 0 5px 0; 
    font-size: 2.2rem; 
    color: #fff; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.6); 
    letter-spacing: -0.5px;
}
.dashboard-date, header p {
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
    font-weight: 600;
}

/* Card Headers */
.card h3, .card h4 { 
    margin-top: 0; 
    color: #000; 
    font-weight: 700;
}

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

.card {
    background: var(--card-bg);
    border-radius: var(--radius-l);
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.2s;
}

/* Buttons & Inputs */
.btn-primary {
    background: var(--accent-color); color: white;
    border: none; padding: 10px 20px; border-radius: var(--radius-m);
    cursor: pointer; font-weight: 600; text-decoration: none;
    display: inline-block; text-align: center;
    box-shadow: 0 2px 10px rgba(0,113,227,0.3);
}

input, textarea, select {
    width: 100%; padding: 12px; margin-bottom: 10px;
    border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-m);
    background: rgba(255,255,255,0.95);
    color: #000; font-weight: 500; font-family: inherit; font-size: 1rem;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}

/* --- ADMIN PANEL STYLES --- */
table {
    width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px;
}
th, td {
    padding: 14px 10px; text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
th {
    font-weight: 700; color: var(--text-secondary); 
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,0.02); }

/* Custom Select Arrow */
select {
    appearance: none; -webkit-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%230071E3%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: 10px auto;
}

/* --- LOGIN PAGE --- */
.login-wrapper {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; width: 100%;
}
.login-card {
    width: 100%; max-width: 380px; text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.9); /* Etwas heller für Login */
    backdrop-filter: blur(25px);
}
.login-card h2 { margin: 0 0 5px 0; font-size: 1.8rem; }
.login-card p { margin-top: 0; color: var(--text-secondary); }


/* Inventory */
.inventory-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.item-name-text { font-weight: 700; font-size: 1.05rem; color: #111; }
.qty-controls { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.6); padding: 4px; border-radius: 12px; border:1px solid rgba(0,0,0,0.05); }
.qty-btn { 
    border: none; background: white; width: 30px; height: 30px; 
    border-radius: 8px; cursor: pointer; font-weight: 800; color: var(--accent-color); 
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.qty-btn.delete { color: var(--danger-color); }
.min-input { width: 50px; padding: 4px; margin: 0 5px; text-align: center; border: 1px solid #ccc; font-size: 0.8rem; color: #333;}

/* WETTER DETAIL */
.weather-day-card {
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    padding: 15px; margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.5);
}
.weather-date-header {
    font-weight: 800; font-size: 1.1rem; margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 5px;
}
.weather-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
.weather-slot {
    text-align: center; font-size: 0.85rem; padding: 5px;
    background: rgba(255,255,255,0.4); border-radius: 10px;
}
.slot-title { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; font-weight: bold; margin-bottom: 4px; }
.slot-icon { font-size: 1.8rem; margin: 2px 0; display: block; }
.slot-temp { font-weight: 800; font-size: 1rem; display: block;}
.slot-meta { font-size: 0.75rem; color: #555; display: block; margin-top: 2px; line-height: 1.2;}

/* Todo */
.todo-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.todo-item.done span { text-decoration: line-through; color: var(--text-secondary); opacity: 0.7; }
.todo-checkbox { width: 22px; height: 22px; margin-right: 15px; accent-color: var(--accent-color); cursor: pointer; }
.todo-text { font-weight: 500; color: #222; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card {
    background: #fff; width: 90%; max-width: 360px;
    padding: 30px; border-radius: 24px; text-align: center;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    transform: scale(0.95); transition: transform 0.2s;
}
.modal-overlay.active .modal-card { transform: scale(1); }
.modal-input {
    font-size: 2.5rem; text-align: center; font-weight: bold;
    border: none; background: #f2f2f5; border-radius: 16px;
    margin: 15px 0 25px 0; height: 70px; color: var(--accent-color);
}
.modal-actions { display: flex; gap: 12px; }
.btn-cancel { background: #e5e5ea; color: #000; flex: 1; padding: 14px; border-radius: 14px; border:none; cursor: pointer; font-weight:600; font-size: 1rem;}
.btn-confirm { background: var(--accent-color); color: white; flex: 1; padding: 14px; border-radius: 14px; border:none; cursor: pointer; font-weight:600; font-size: 1rem;}
.btn-confirm.danger { background: var(--danger-color); }

/* Mobile */
@media (max-width: 900px) {
    .app-container { display: block; }
    .sidebar {
        position: fixed; bottom: 0; top: auto;
        width: 100%; height: auto;
        flex-direction: row; padding: 10px;
        background: rgba(255,255,255,0.98);
        border-top: 1px solid rgba(0,0,0,0.1);
        z-index: 100; justify-content: space-around; border-right: none;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    }
    .brand, .user-profile { display: none; }
    .nav-links { display: flex; justify-content: space-around; width: 100%; }
    .nav-links a {
        flex-direction: column; padding: 8px 5px; font-size: 0.75rem;
        background: transparent !important; box-shadow: none !important;
    }
    .nav-links a.active { color: var(--accent-color); }
    .nav-icon { margin: 0 0 4px 0; font-size: 1.4rem; }
    .main-content { padding: 20px 20px 100px 20px; }
    .grid { grid-template-columns: 1fr; }
    .weather-slots { overflow-x: auto; }
}