/* ======================
   Basis Reset
====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ======================
   Body
====================== */
body {
    background: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* ======================
   Container
====================== */
.container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    max-width: 480px;
    width: 100%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ======================
   Überschriften
====================== */
h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

h2 {
    color: #34495e;
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 5px;
}

/* ======================
   Account-ID Styling
====================== */
.account-id {
    text-align: center;
    background: #f1f8ff;
    color: #2c3e50;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    display: inline-block;
}

.account-id span {
    margin-right: 8px;
    color: #3498db;
}

.account-id strong {
    font-weight: 700;
    color: #34495e;
}

/* ======================
   Tabs / Navigation
====================== */
.nav {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.nav a {
    flex: 1;
    padding: 12px 0;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    background: #ecf0f1;
    color: #2c3e50;
}

.nav a.active {
    background: #27ae60;
    color: #fff;
}

.nav a:hover:not(.logout-link) {
    background: #219150;
    color: #fff;
}

.nav a.logout-link {
    background: #e74c3c;
    color: #fff;
}

.nav a.logout-link:hover {
    background: #c0392b;
}

/* ======================
   Tab Content
====================== */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.tab-content.active {
    display: flex;
}

/* ======================
   Formulare
====================== */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

form input, form select, form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    width: 100%;
    transition: border 0.2s, box-shadow 0.2s;
}

form input:focus, form select:focus, form textarea:focus {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39,174,96,0.3);
    outline: none;
}

form button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #27ae60;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    background-color: #219150;
}

/* ======================
   Listen / Boxen
====================== */
.list {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.list h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #2c3e50;
}

/* ======================
   Essensplan Farben
====================== */
.meal {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
    transition: transform 0.2s;
}

.meal:hover {
    transform: scale(1.02);
}

.meal span.icon {
    margin-right: 10px;
    font-size: 18px;
}

.meal.breakfast { background-color: #f1c40f; color:#2c3e50; }
.meal.snack { background-color: #e67e22; }
.meal.lunch { background-color: #3498db; }
.meal.dinner { background-color: #9b59b6; }

/* ======================
   Diagramm
====================== */
canvas {
    width: 100% !important;
    max-height: 300px;
}

/* ======================
   Nachrichten / Fehler
====================== */
p.message {
    text-align: center;
    color: #e74c3c;
    font-weight: bold;
}

/* ======================
   Scrollbar Styling
====================== */
.list::-webkit-scrollbar {
    width: 8px;
}

.list::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 10px;
}

.list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.list::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* ======================
   Responsive
====================== */
@media(max-width:500px){
    .container { padding: 20px; }
    h1 { font-size: 24px; }
    h2 { font-size: 18px; }
    form input, form select, form textarea, form button { font-size: 14px; padding: 10px; }
    .nav a { font-size: 14px; padding: 10px 0; }
}