/* Globale Stile */
body {
    background-color: #0d1a26; /* Sehr dunkles Blau */
    color: #f8f9fa; /* Heller Text für Kontrast */
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px;
    background-color: #1a2d40; /* Dunkles Blau für den Hauptcontainer */
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden; /* Für saubere Abgrenzung */
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #334e68; /* Trennlinie im Header */
}

h1 {
    color: #ffc107; /* Gold für den Titel */
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
}

/* Buttons allgemein */
.button {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logout-button {
    background-color: #dc3545; /* Rot für Abmelden */
    color: #f8f9fa;
}

.logout-button:hover {
    background-color: #c82333;
}

/* Hauptnavigation (Tabs) */
.main-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    border-bottom: 1px solid #334e68; /* Trennlinie unter der Navigation */
}

.main-nav button {
    background-color: #2a415a; /* Etwas helleres Blau für inaktive Tabs */
    color: #e0e0e0;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 8px 8px 0 0; /* Abgerundete Ecken oben */
    position: relative;
    top: 1px; /* Optische Anpassung */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav button:hover {
    background-color: #334e68; /* Hover-Effekt */
}

.main-nav button.active {
    background-color: #1a2d40; /* Hintergrundfarbe des Containers für den aktiven Tab */
    color: #ffc107; /* Gold für den aktiven Tab-Text */
    border-bottom: 2px solid #ffc107; /* Goldene Linie unter dem aktiven Tab */
    font-weight: bold;
}

/* Sektionen */
.content-section {
    padding: 30px;
    border: 1px solid #334e68; /* Rahmen um jede Sektion */
    border-radius: 8px;
    background-color: #1a2d40; /* Dunkles Blau für den Inhalt */
    margin-bottom: 30px; /* Abstand zwischen den Sektionen */
}

.hidden {
    display: none;
}

/* Sektionstitel */
.content-section h2 {
    color: #ffc107; /* Gold für Sektionstitel */
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2em;
    border-bottom: 1px solid #334e68;
    padding-bottom: 10px;
}

/* Suchformular */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.search-form input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #4a6b8a; /* Mittleres Blau */
    background-color: #2a415a; /* Etwas helleres Dunkelblau */
    color: #f8f9fa;
    border-radius: 5px;
    font-size: 1em;
}

.search-form button {
    background-color: #4a6b8a; /* Blau für Suchbutton */
    color: #f8f9fa;
    padding: 12px 20px;
    border-radius: 5px;
}

.search-form button:hover {
    background-color: #5d81a3;
}

/* Header Buttons (Neue Lizenz, Neues Produkt) */
.header-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.add-button, .add-product-button {
    background-color: #ffc107; /* Gold für Hinzufügen-Buttons */
    color: #1a2d40; /* Dunkles Blau für Text auf Gold */
}

.add-button:hover, .add-product-button:hover {
    background-color: #e0a800;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #2a415a; /* Hintergrund für die Tabelle */
    border-radius: 8px;
    overflow: hidden; /* Für abgerundete Ecken der Tabelle */
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #334e68; /* Trennlinien in der Tabelle */
}

th {
    background-color: #334e68; /* Dunkleres Blau für Tabellenheader */
    color: #ffc107; /* Gold für Header-Text */
    font-weight: 600;
    font-size: 1.05em;
}

tr:nth-child(even) {
    background-color: #2a415a; /* Abwechselnde Zeilenfarbe */
}

tr:hover {
    background-color: #334e68; /* Hover-Effekt für Zeilen */
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.edit-button {
    background-color: #4a6b8a; /* Blau für Bearbeiten */
    color: #f8f9fa;
}

.edit-button:hover {
    background-color: #5d81a3;
}

.delete-button {
    background-color: #dc3545; /* Rot für Löschen */
    color: #f8f9fa;
}

.delete-button:hover {
    background-color: #c82333;
}

/* Formulare in den neuen Sektionen */
.forms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.form-card {
    background-color: #2a415a; /* Hintergrund der Formular-Karten */
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #334e68;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.form-card h3 {
    color: #ffc107; /* Gold für Formular-Titel */
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 1px solid #4a6b8a;
    padding-bottom: 8px;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #e0e0e0;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    padding: 12px;
    border: 1px solid #4a6b8a;
    background-color: #334e68; /* Input-Feld Hintergrund */
    color: #f8f9fa;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #a0a0a0;
}

.form-card button {
    margin-top: 20px;
    background-color: #ffc107; /* Gold für Formular-Buttons */
    color: #1a2d40; /* Dunkles Blau für Text auf Gold */
    font-weight: bold;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.05em;
}

.form-card button:hover {
    background-color: #e0a800;
}

.result-box {
    background-color: #334e68; /* Hintergrund der Ergebnisbox */
    border: 1px solid #4a6b8a;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #f8f9fa;
    max-height: 250px; /* Begrenzung der Höhe */
    overflow-y: auto; /* Scrollbar bei zu viel Inhalt */
}

/* Media Queries für Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .main-nav {
        flex-direction: column;
        gap: 8px;
    }

    .main-nav button {
        width: 100%;
        border-radius: 5px;
    }
    
    .main-nav button.active {
        border-bottom: none;
        border-left: 3px solid #ffc107; /* Goldene Linie links für aktive Tabs auf Mobilgeräten */
    }

    .search-form, .header-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .forms-container {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.85em;
        white-space: normal; /* Erlaubt Zeilenumbrüche für bessere Darstellung auf kleinen Bildschirmen */
        display: block; /* Erlaubt vertikales Scrollen auf Mobilgeräten */
        width: 100%; /* Stellt sicher, dass die Tabelle die volle Breite einnimmt */
    }
    
    th, td {
        padding: 10px;
    }
    
    .actions {
        flex-direction: column;
        gap: 8px;
    }
}