/* === Grundlayout === */
body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    color: #333;
}

/* === Header === */
header {
    background-color: #990033;
    color: white;
    padding: 12px 20px; /* Desktop höher */
    position: relative;
    z-index: 1000;
}
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
}
.logo img {
    height: 36px;             /* Desktop Logo größer */
    margin-right: 25px;       /* Abstand zum Menü */
}
nav {
    display: flex;
    gap: 20px;                /* Mehr Abstand zwischen Items */
    align-items: center;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background 0.2s ease-in-out;
}
nav a:hover {
    background: rgba(255,255,255,0.15);
}
.user-info {
    color: #fff;
    font-size: 0.9em;
    margin-left: 15px;
}
/* FIX: Burger-Button wirklich ganz rechts und vertikal mittig */
.menu-toggle {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
}

/* === Mobile Overlay Menü === */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(153,0,51,0.95);
    z-index: 2000;
    padding-top: 80px;
}
.mobile-nav.active { display: block; }
.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}
.mobile-nav-content a {
    color: #fff;
    font-size: 1.4em;
    text-decoration: none;
    padding: 10px 20px;
}
.mobile-nav-content a:hover {
    background: rgba(255,255,255,0.15);
    border-radius: 5px;
}

/* === Container === */
.container {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

/* === Form & Card Design === */
.form-box, .login-box {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.form-box h2, .form-box h3, .form-box h4, .login-box h2 {
    color: #990033;
    margin-bottom: 15px;
    text-align: center;
}

/* === Inputs & Buttons === */
label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}
.form-box input[type="text"],
.form-box input[type="email"],
.form-box input[type="tel"],
.form-box input[type="password"],
.form-box select {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}
button, input[type="submit"] {
    background-color: #990033;
    color: white;
    border: none;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}
button:hover, input[type="submit"]:hover {
    background-color: #b3003d;
}

/* === Tabellen Desktop === */
.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 0.95em;
    vertical-align: top;
}
table th { background-color: #f2f2f2; }

/* Labels in Tabellenzellen immer über dem Wert */
table td strong {
    display: block;            /* Label in eigene Zeile */
    margin-bottom: 4px;        /* kleiner Abstand zum Wert */
    color: #990033;            /* BNI-Farbe fürs Label */
    font-weight: 700;
}

/* Bedienleiste über der Tabelle */
.table-controls { margin-bottom: 12px; }
.table-controls select { margin-top: 6px; }
.table-controls a { display: inline-block; margin-top: 6px; }

/* === Responsive Tables -> Card Layout === */
@media (max-width: 768px) {
    #desktop-nav { display: none; }
    .menu-toggle { display: block; }

    header { padding: 8px 15px; } /* Mobile Header kleiner */
    .logo img { height: 30px; }

    /* Mobile: gleichmäßiger Rand für den inneren Container */
    .container { padding: 10px; }

    .responsive-table table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
        width: 100%;
    }
    /* Cards sollen NICHT rechts kleben: volle Breite des Containers, vertikaler Abstand */
    .responsive-table tr {
        margin: 10px 0;
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 8px 10px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .responsive-table td {
        border: none;
        padding: 8px 4px;
        text-align: left;
    }
    .responsive-table td strong {
        color: #990033;
        font-size: 0.95em;
        margin-bottom: 4px;
    }
    .responsive-table thead { display: none; }
}

/* === Messages === */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.95em;
}
.message.success { background-color: #dff0d8; color: #3c763d; border: 1px solid #3c763d; }
.message.error   { background-color: #f2dede; color: #a94442; border: 1px solid #a94442; }
.message.info    { background-color: #d9edf7; color: #31708f; border: 1px solid #31708f; }

/* === Footer === */
footer {
    background-color: #f2f2f2;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    border-top: 1px solid #ccc;
}
footer p { font-size: 0.9em; color: #555; }
footer a { color: #990033; text-decoration: none; font-weight: bold; }
footer a:hover { text-decoration: underline; }
