:root {
    --primary-green: #66BB6A; /* Sanftes, pastelliges Grün */
    --primary-green-dark: #559959;
    --background-color: #F8F9FA; /* Sehr heller, cremefarbener Hintergrund */
    --card-bg: #FFFFFF; /* Reines Weiß für den Container */
    --text-color: #343A40; /* Dunkelgraue Textfarbe für gute Lesbarkeit */
    --input-border: #E0E0E0; /* Heller grauer Rand für Eingabefelder */
    --input-bg: #FFFFFF;
    --error-red: #E57373; /* Sanfterer Rottton */
    --warning-orange: #FFB74D; /* Sanfterer Orangeton */
    --link-color: #78909C; /* Dezenter Blaugrauton für Links */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

/* --- Login & Registration Page Styles --- */
.login-wrapper {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--input-border);
    margin: auto;
    box-sizing: border-box; /* Stellt sicher, dass Padding und Border in die Breite einfließen */
}

.login-title {
    color: var(--primary-green);
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group label {
    display: none;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--input-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

.input-group input::placeholder {
    color: var(--link-color);
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.input-group input:focus::placeholder {
    opacity: 0;
}

.login-button {
    width: 100%;
    padding: 16px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-green);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
}

.login-links {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--link-color);
}

.login-links a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-links a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Message Styling */
.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
}

.message-error {
    background-color: #FFEBEE;
    color: var(--error-red);
    border-color: #E57373;
}

.message-warning {
    background-color: #FFF3E0;
    color: var(--warning-orange);
    border-color: #FFB74D;
}

.message-info {
    background-color: #E8F5E9;
    color: var(--primary-green);
    border-color: var(--primary-green-dark);
}

/* --- Admin Dashboard Styles --- */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: left;
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Wichtig für die korrekte Breite */
}

h2 {
    color: var(--primary-green);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

/* Überschreibung für speziellen Bereich - Admin in rot   <div class="besonderer-bereich">  */
.besonderer-bereich h2 {
    color: red;
}

/* Tabellen-Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--primary-green);
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

th {
    font-weight: 600;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background-color: #F9F9F9;
}

tbody tr:hover {
    background-color: #F1F1F1;
}

/* Status-Styles */
.status-active {
    color: var(--primary-green-dark);
    font-weight: bold;
}

.status-inactive {
    color: var(--error-red);
    font-weight: bold;
}

/* Button-Styles für Tabellenaktionen (Links) */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-buttons a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    color: white;
}

.activate-button {
    background-color: var(--primary-green);
}

.deactivate-button {
    background-color: var(--warning-orange);
}

.delete-button {
    background-color: var(--error-red);
}

.action-buttons a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Admin-Hauptbuttons (Logout & Hauptseite) */
.admin-buttons-wrapper {
    margin-top: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.admin-button,
.admin-buttons-wrapper a {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: white;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
}

.logout-button {
    background-color: var(--error-red);
}

.logout-button:hover {
    background-color: #d35f5f;
    transform: translateY(-2px);
}

.main-page-button {
    background-color: var(--primary-green);
}

.main-page-button:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
}

/* Footer-Styles */
footer {
    text-align: center;
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid #E0E0E0;
    color: var(--link-color);
    font-size: 0.8rem;
    width: 100%;
}

/* --- Responsive Styles --- */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 25px;
        box-shadow: none;
        border-radius: 0;
        height: 100vh;
    }

    .container {
        padding: 15px;
        min-height: 100vh;
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Verbesserte Tabellenansicht für Mobilgeräte */
    table, thead, tbody, th, td, tr {
        display: block;
		
		border-radius: 4px; /* Fügt abgerundete Ecken hinzu */
    overflow: hidden; /* Wichtig: Versteckt Inhalte, die über die abgerundeten Ecken hinausragen */
    }

	table {
    border-collapse: collapse;
    width: 100%;
    border-radius: 4px; /* Fügt abgerundete Ecken hinzu */
    overflow: hidden; /* Wichtig: Versteckt Inhalte, die über die abgerundeten Ecken hinausragen */
	}

    thead {
        display: none;
	}

    tr {
        margin-bottom: 15px;
        border: 1px solid #E0E0E0;
        border-radius: 8px;
        padding: 10px;
    }

    td {
        border-bottom: 1px solid #F0F0F0; /* feine Trennlinien zwischen den Feldern  - sonst none*/
        padding: 8px 10px;
        text-align: right;
        position: relative;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }
	
	td:last-child {
        border-bottom: none; /* letzter Eintrag ohne Linie */
    }

    /* Korrektur für die Action-Buttons */
    .action-buttons {
        flex-direction: column;
        align-items: flex-end;
        width: 100%;
        gap: 10px;
    }

    .action-buttons a {
        width: auto;
        padding: 10px 15px;
        align-self: flex-end;
    }

    .admin-buttons-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .admin-button,
    .admin-buttons-wrapper a {
        width: 100%;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* --- Bestätigungs-Seite für Löschung --- */
.warning-box {
    background-color: #FFEBEE;
    color: var(--error-red);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--error-red);
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
}

.user-info {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.user-email {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--link-color);
    display: block;
    margin-top: 5px;
}

.confirm-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.confirm-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: white;
    font-size: 1.1rem;
    text-align: center;
}

.confirm-button.delete {
    background-color: var(--error-red);
}

.confirm-button.delete:hover {
    background-color: #d35f5f;
    transform: translateY(-2px);
}

.confirm-button.cancel {
    background-color: var(--link-color);
}

.confirm-button.cancel:hover {
    background-color: #647b87;
    transform: translateY(-2px);
}

/* Anpassung für kleinere Bildschirme */
@media (max-width: 480px) {
    .confirm-buttons-wrapper {
        flex-direction: column;
    }
}


/* --- Bestätigungs-Seite für Löschung --- */
.warning-box {
    background-color: #FFEBEE;
    color: var(--error-red);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--error-red);
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
}

.user-info {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.user-email {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--link-color);
    display: block;
    margin-top: 5px;
}

.confirm-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.confirm-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: white;
    font-size: 1.1rem;
    text-align: center;
}

.confirm-button.delete {
    background-color: var(--error-red);
}

.confirm-button.delete:hover {
    background-color: #d35f5f;
    transform: translateY(-2px);
}

.confirm-button.cancel {
    background-color: var(--link-color);
}

.confirm-button.cancel:hover {
    background-color: #647b87;
    transform: translateY(-2px);
}

/* Anpassung für kleinere Bildschirme */
@media (max-width: 480px) {
    .confirm-buttons-wrapper {
        flex-direction: column;
        align-items: center; /* Zentriert die Buttons im Flex-Container */
    }
    
    .confirm-button {
        max-width: 250px; /* Setzt eine maximale Breite */
        width: 100%;
        box-sizing: border-box; /* Stellt sicher, dass das Padding innerhalb der Breite liegt */
    }
}