/* --- GRUNDLEGENDE EINSTELLUNGEN --- */
* {
    box_sizing: border-box; /* Zwingend für korrekte Breiten */
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* --- LAYOUT CONTAINER --- */
.container {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e4e8;
}

.container.wide {
    max-width: 1200px;
}

/* --- NAVIGATION & HEADER --- */
header a {
    text-decoration: none;
    color: inherit;
}

nav {
    background: #f8f9fa;
    padding: 10px 20px; /* Etwas kompakter */
    border-radius: 5px;
    margin-bottom: 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between; /* Links links, Rechts Icons */
    align-items: center;
}

/* Linke Seite der Navi (Dashboard/Profil Link) */
.nav-left a {
    font-weight: 600;
    color: #495057;
    text-decoration: none;
}
.nav-left a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Rechte Seite der Navi (Icons) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Abstand zwischen Passwort und Logout */
}

.nav-icon-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #555;
    font-size: 0.9em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-icon-link:hover {
    background-color: #e9ecef;
    color: #000;
}

.nav-icon-link.logout {
    color: #dc3545; /* Rot für Logout */
}

.nav-icon-link.logout:hover {
    background-color: #fee2e2;
}

/* SVG Icons Größe */
.nav-icon-link svg {
    width: 20px;
    height: 20px;
}

/* --- FORMULARE --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

/* WICHTIG: box-sizing verhindert, dass Padding die Breite > 100% drückt */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    box-sizing: border-box; 
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.15s ease-in-out;
    max-width: 100%; /* Sicherheitshalber */
}

input:focus,
select:focus,
textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

textarea {
    resize: vertical;
}

/* Checkbox Bereich */
input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

/* --- BUTTONS --- */
button, 
.button {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: #0056b3;
    color: white;
    border: 1px solid transparent;
    padding: 12px 24px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 4px;
    transition: background-color 0.15s ease-in-out;
    width: 100%;
}

button:hover,
.button:hover {
    background-color: #004494;
    text-decoration: none;
}

@media (min-width: 600px) {
    button, .button { width: auto; }
}

/* --- ACCORDION / VERTRAG --- */
details {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 15px;
}

summary {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    background-color: #f8f9fa;
    outline: none;
}

summary:hover {
    background-color: #e2e6ea;
}

/* Pfeil Indikator */
summary::after {
    content: '+'; 
    float: right;
    font-weight: bold;
}

details[open] summary::after {
    content: '-';
}

details[open] summary {
    border-bottom: 1px solid #ced4da;
}

/* Inhalt scrollbar machen, wie gewünscht */
.agreement-scroll-box {
    padding: 15px;
    height: 300px;     /* Feste Höhe */
    overflow-y: scroll; /* Scrollbalken erzwingen */
    background: #fff;
}

/* --- SONSTIGES --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
th {
    background-color: #f1f1f1;
    font-weight: bold;
}
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 0.85rem;
}