/* --- Globales Layout --- */
* {
    box-sizing: border-box;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding-top: 70px; 
    background-color: #f4f7f6; 
    color: #333; 
}

.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    border: solid 1px #e9e9e9;
}

/* --- Navigation --- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background-color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 1000;
}

.top-nav .brand {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.top-nav .menu-items {
    display: flex;
    gap: 10px;
}

.top-nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.top-nav a:hover { background-color: #34495e; }
.top-nav a.active { background-color: #007bff; color: #fff; }
.top-nav a.logout { background-color: #e74c3c; }
.top-nav a.logout:hover { background-color: #c0392b; }

/* --- Karten & Grid (Dashboard) --- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.full-width { grid-column: span 2; }

/* --- Formulare & Buttons --- */
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }

label { display: block; margin-bottom: 5px; font-weight: bold; color: #444; }
input, select, textarea { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 14px;
}

.btn { 
    background: #007bff; 
    color: white; 
    padding: 10px 15px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 15px; 
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: #0056b3; }
.btn-success { background: #28a745; }
.btn-success:hover { background: #218838; }

/* --- Benachrichtigungen --- */
.alert-success { background: #d4edda; color: #155724; padding: 12px; border-radius: 4px; margin-bottom: 15px; }
.alert-danger { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 4px; margin-bottom: 15px; }

/* --- Tabellen --- */
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { border: 1px solid #ddd; padding: 10px; text-align: left; font-size: 14px; }
th { background-color: #f8f9fa; }

/* Dashboard */

        .dash_header { display: flex; justify-content: space-between; align-items: center; background: white; padding: 15px 25px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

        .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        .card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
        .full-width { grid-column: span 2; }

        h2, h3 { margin-top: 0; color: #2c3e50; }
        .profile-info span { display: inline-block; margin-right: 20px; font-size: 14px; color: #666; }

        canvas { width: 100% !important; max-height: 300px; }

        @media (max-width: 900px) {
            .grid { grid-template-columns: 1fr; }
            .full-width { grid-column: span 1; }
        }


/* --- Responsive & Druckansicht --- */
@media (max-width: 768px) {
    .grid, .form-row { grid-template-columns: 1fr; flex-direction: column; gap: 0; }
}

@media print {
    body { padding-top: 0; background: white; }
    .top-nav, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}