/* assets/css/style.css */

/* 1. CSS-Farbvariablen (Darkmode) */
:root {
    --bg-main: #111827;
    --bg-card: #1F2937;
    --bg-input: rgba(17, 24, 39, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --accent-blue: #3B82F6;
    --status-open: #4B5563; /* Grau */
    --status-in-progress: #3B82F6; /* Blau */
    --status-completed: #10B981; /* Grün */
    --status-critical: #EF4444; /* Rot */
    --priority-low: #6B7280; /* Grau */
    --priority-medium: #3B82F6; /* Blau */
    --priority-high: #F59E0B; /* Orange */
    --priority-critical: #EF4444; /* Rot */
    --success-color: #10B981; /* Grün für Erfolgsmeldungen */
}

/* Allgemeine Reset- und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 3. Typografie */
body {
    /* 1. Seitenstruktur und Hintergrund: Animierter linear-gradient */
    background: linear-gradient(135deg, var(--bg-main), var(--bg-card), var(--bg-main), var(--bg-card));
    background-size: 400% 400%; /* Ermöglicht die Verschiebung für die Animation */
    animation: gradient-animation 15s ease infinite; /* Animation über 15 Sekunden */
    min-height: 100vh; /* Mindestens volle Viewport-Höhe */
    display: flex; /* Für Zentrierung des page-wrappers */
    justify-content: center; /* Horizontale Zentrierung */
    align-items: center; /* Vertikale Zentrierung */
    color: var(--text-primary); /* Primäre Textfarbe */
    font-family: 'Inter', sans-serif; /* Importierte Schriftart */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 {
    font-size: 2.5rem; /* 40px */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem; /* 32px */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

p {
    font-size: 1rem; /* 16px */
    font-weight: 400; /* Standardgewicht */
    color: var(--text-secondary); /* Sekundäre Textfarbe für Absätze */
    margin-bottom: 1rem;
}

small {
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    color: var(--text-secondary);
}

/* 1. Seitenstruktur und Hintergrund: .page-wrapper */
.page-wrapper {
    width: 100%;
    max-width: 1600px; /* Maximale Breite */
    margin: 2rem auto; /* Oben/Unten 2rem, Links/Rechts Auto (zentriert) */
    padding: 0 1.5rem; /* Innenabstand für kleinere Bildschirme */
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Abstand zwischen Hauptbereichen, z.B. Header und Main */
}

/* Speziell für die Login-Seite, um den Wrapper vertikal zu zentrieren */
.login-page-wrapper {
    min-height: 100vh; /* Der Wrapper nimmt die volle Höhe ein, um das Login-Feld zu zentrieren */
    justify-content: center; /* Zentriert den Inhalt vertikal */
}

/* 4. Glassmorphism-Effekte für Hauptcontainer */
.glass-container {
    background: rgba(31, 41, 55, 0.5); /* 50% Deckkraft von --bg-card */
    backdrop-filter: blur(12px); /* Hintergrundunschärfe */
    border: 1px solid var(--border-color); /* Leichter Rand */
    border-radius: 16px; /* Abgerundete Ecken */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Subtiler Schatten */
    padding: 2rem;
    position: relative; /* Für absolute Positionierung von Elementen innerhalb */
}

/* Login-Container spezifisch */
.login-container {
    max-width: 500px;
    margin: auto; /* Zentriert sich selbst innerhalb des page-wrappers */
    text-align: center;
    padding: 3rem;
}

.login-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem; /* Abstand zwischen Icon und Text */
    margin-bottom: 1.5rem;
}

.login-title .logo-icon {
    font-size: 2.2rem; /* Größe des Icons im Titel */
    color: var(--accent-blue);
}

.login-description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.login-card {
    background: rgba(31, 41, 55, 0.6); /* Leicht dunkler als glass-container, aber auch transparent */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

/* 5. Komponenten: Buttons */
.btn {
    display: inline-flex; /* Für Icon und Text nebeneinander */
    align-items: center; /* Vertikale Zentrierung */
    justify-content: center; /* Horizontale Zentrierung */
    padding: 0.8rem 1.5rem;
    border-radius: 8px; /* Leicht abgerundete Ecken */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none; /* Für Links, die als Buttons dienen */
    transition: all 0.3s ease-in-out; /* Sanfte Übergänge */
    border: none; /* Keine Standard-Border */
    gap: 0.5rem; /* Abstand zwischen Icon und Text */
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--text-primary);
}

.btn-primary:hover {
    background-color: #2563EB; /* Eine Stufe dunkler */
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); /* Schatten mit Akzentfarbe */
    transform: translateY(-2px); /* Leichter Hoch-Effekt */
}

.btn-secondary {
    background-color: #4b5563;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #374151; /* Eine Stufe dunkler */
    box-shadow: 0 5px 15px rgba(75, 85, 99, 0.2); /* Schatten mit Sekundärfarbe */
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.discord-login-btn .fab {
    font-size: 1.2rem; /* Größe des Discord-Icons */
}

/* 5. Komponenten: Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--bg-input); /* Hintergrund aus Variablen */
    color: var(--text-primary); /* Textfarbe */
    border: 1px solid var(--border-color); /* Border aus Variablen */
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Übergänge für Fokus */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none; /* Standard-Outline entfernen */
    border-color: var(--accent-blue); /* Akzentfarbe als Border */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* Subtiler Fokus-Schatten */
}

/* Platzhalter-Text-Farbe anpassen */
input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Checkboxen (einfaches Custom Styling) */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
}

input[type="checkbox"] {
    appearance: none; /* Standard-Checkbox ausblenden */
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

input[type="checkbox"]:checked::after {
    content: '\2713'; /* Unicode-Haken */
    color: var(--text-primary);
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Fieldset und Legend */
fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    padding: 0 0.5rem;
}

/* Form Grouping */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}


/* Textfarben-Helferklassen */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-accent-blue {
    color: var(--accent-blue) !important;
}

/* Hilfsklassen für Ränder (Margins) */
.mt-4 { margin-top: 1rem; } /* 16px */
.mb-4 { margin-bottom: 1rem; } /* 16px */
.ml-2 { margin-left: 0.5rem; } /* 8px */

/* 7. Animationen & Übergänge: fadeIn-up */
@keyframes fade-in-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
    animation-delay: 0.1s; /* Leichte Verzögerung */
    opacity: 0; /* Standardmäßig unsichtbar, bis Animation startet */
}

/* Allgemeine Übergänge für interaktive Elemente */
a, button, input, select, textarea {
    transition: all 0.3s ease-in-out;
}

/* Status-Badges (6. Status-Badges) */
.status-badge {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 9999px; /* Pillenform */
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

/* Spezifische Farben für Rollen-Badges */
.status-badge.admin {
    background-color: var(--accent-blue); /* Admin-Rolle blau */
    color: var(--text-primary);
}
.status-badge.developer {
    background-color: var(--status-in-progress); /* Entwickler-Rolle blau (ähnlich wie 'In Bearbeitung') */
    color: var(--text-primary);
}


.status-badge.open {
    background-color: var(--status-open);
    color: var(--text-primary);
}

.status-badge.in_progress {
    background-color: var(--status-in-progress);
    color: var(--text-primary);
}

.status-badge.completed {
    background-color: var(--status-completed);
    color: var(--text-primary);
}

.status-badge.critical {
    background-color: var(--status-critical);
    color: var(--text-primary);
}

/* Prioritäts-Badges */
.status-badge.priority-low {
    background-color: var(--priority-low);
}
.status-badge.priority-medium {
    background-color: var(--priority-medium);
}
.status-badge.priority-high {
    background-color: var(--priority-high);
}
.status-badge.priority-critical {
    background-color: var(--priority-critical);
}


/* Header Styling für Dashboard */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem; /* Innenabstand */
    margin-bottom: 2rem; /* Abstand zum Inhalt darunter */
}

.header-title {
    font-size: 1.8rem;
    margin: 0; /* Kein zusätzlicher Rand */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.header-title .fas {
    font-size: 1.6rem;
    color: var(--accent-blue);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex; /* Für Icon und Text nebeneinander */
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(59, 130, 246, 0.1); /* Leichter blauer Hintergrund beim Hover/Active */
}

.nav-link.btn-secondary {
    /* Style wie ein Sekundär-Button */
    padding: 0.6rem 1.2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    object-fit: cover;
}
.user-avatar-small { /* Für kleinere Avatare in Kommentaren/Zuweisungen */
    width: 24px;
    height: 24px;
    border-width: 1px;
}


.user-name {
    font-weight: 600;
    margin-right: 0.2rem;
}

/* Dashboard Content Styling (auch für Admin Panel und Task Detail) */
.dashboard-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.task-filters {
    display: flex;
    flex-wrap: wrap; /* Ermöglicht Umbruch auf kleineren Bildschirmen */
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-start; /* Links ausrichten */
}

.task-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsives Grid */
    gap: 1.5rem;
}

.task-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Verteilt den Inhalt */
    height: auto; /* Höhe passt sich dem Inhalt an */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover-Effekte */
}

.task-card:hover {
    transform: translateY(-5px); /* Leichter Hoch-Effekt */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); /* Vergrößerter Schatten */
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem; /* Abstand zwischen Titel und Badges */
}

.task-title {
    margin: 0; /* Keine doppelten Ränder */
    font-size: 1.3rem; /* Etwas kleiner für Karten */
    flex-grow: 1; /* Nimmt verfügbaren Platz ein */
}

.task-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap; /* Badges können umbrechen, wenn der Platz eng wird */
}

.task-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Beschreibung nimmt den restlichen Platz ein */
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Elemente können umbrechen */
    gap: 0.75rem;
    margin-top: 1rem; /* Abstand zur Beschreibung */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Leichte Trennlinie */
    padding-top: 0.75rem;
}

.task-meta {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Neue Styles für Task-Card-Aktionen */
.task-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem; /* Abstand vom Footer-Inhalt */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    justify-content: flex-end; /* Buttons rechts ausrichten */
}

.task-card-actions .btn {
    flex-shrink: 0; /* Verhindert, dass Buttons schrumpfen */
    font-size: 0.8rem; /* Kleinere Schrift für diese Buttons */
    padding: 0.3rem 0.6rem; /* Kleinerer Padding */
}

/* Farbige Status-Buttons */
.btn-status-in_progress {
    background-color: var(--status-in-progress);
    color: var(--text-primary);
}
.btn-status-in_progress:hover {
    background-color: #2563EB;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.btn-status-completed {
    background-color: var(--status-completed);
    color: var(--text-primary);
}
.btn-status-completed:hover {
    background-color: #059669;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-status-open {
    background-color: var(--status-open);
    color: var(--text-primary);
}
.btn-status-open:hover {
    background-color: #374151;
    box-shadow: 0 3px 10px rgba(75, 85, 99, 0.2);
}

.no-tasks-message {
    text-align: center;
    padding: 3rem;
    border: 1px dashed var(--border-color); /* Gestrichelter Rand */
}

/* Meldungs-Styles (für Erfolg und Fehler) */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.1); /* Grün, leicht transparent */
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1); /* Rot, leicht transparent */
    color: var(--status-critical); /* Rot für Fehlermeldungen */
    border: 1px solid var(--status-critical);
}


/* Admin Panel spezifisches Styling */
.admin-section {
    padding: 2rem;
    margin-bottom: 2rem; /* Abstand zwischen den Sektionen */
}

.admin-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.admin-section h3 .fas {
    color: var(--accent-blue);
}

.task-form {
    display: flex;
    flex-direction: column;
}

.task-form .form-group {
    margin-bottom: 1rem;
}

.task-form .form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-secondary); /* Textfarbe für Labels */
}

/* Task Detail Page Specific Styles */
.task-detail-content {
    /* Nutzt dashboard-content als Basis */
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Erlaubt Umbruch auf kleineren Screens */
    gap: 1rem;
}

.task-detail-header h2 {
    margin-bottom: 0; /* Entfernt doppelten Rand */
}

.task-detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.task-meta-info {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsiv für Metainfos */
    gap: 1rem;
}

.task-meta-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.task-meta-info p .fas {
    color: var(--accent-blue);
}

.task-detail-badges {
    grid-column: 1 / -1; /* Badges nehmen ganze Breite ein */
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.task-description-section .description-content {
    background-color: rgba(0,0,0,0.1); /* Leicht dunklerer Hintergrund für den Inhalt */
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.task-description-section .description-content strong {
    color: var(--text-primary); /* Bold Text in Description */
}
.task-description-section .description-content em {
    color: var(--text-primary); /* Italic Text in Description */
}
.task-description-section .description-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.resource-link-area {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assigned-users-section .assigned-user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.assigned-user-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(59, 130, 246, 0.1); /* Leichter Akzent-Hintergrund */
    border-radius: 9999px; /* Pillenform */
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.flex-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap; /* Erlaubt Umbruch auf kleineren Screens */
}

.flex-item {
    flex: 1; /* Nimmt gleichen Platz ein */
    min-width: 300px; /* Mindestbreite, bevor es umbricht */
}


.file-list {
    list-style: none;
    margin-bottom: 1rem;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.file-list li .fas {
    color: var(--accent-blue);
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}
.file-upload-area p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.history-list {
    list-style: none;
}

.history-list li {
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    position: relative;
    margin-bottom: 1rem;
}
.history-list li:last-child {
    margin-bottom: 0;
}
.history-list li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    border: 2px solid var(--bg-card);
}
.history-details {
    margin-top: 0.25rem;
    margin-bottom: 0;
    font-style: italic;
}


.comments-list {
    margin-top: 1rem;
    margin-bottom: 2rem;
    max-height: 400px; /* Beispielhöhe, kann scrollbar werden */
    overflow-y: auto; /* Scrollbar, wenn viele Kommentare */
    padding-right: 1rem; /* Platz für Scrollbar */
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.1); /* Leichter Hintergrund für Kommentar */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-item:last-child {
    margin-bottom: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-author {
    font-weight: 600;
    margin-right: 0.5rem;
}

.comment-timestamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-text {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.new-comment-form textarea {
    margin-top: 1rem;
    margin-bottom: 1rem; /* Abstand zum Button */
}

/* Tabellen-Styling für Aufgabenverwaltung */
.data-table {
    width: 100%;
    border-collapse: collapse; /* Keine doppelten Ränder */
    margin-top: 1.5rem;
    font-size: 0.95rem;
    background-color: rgba(0,0,0,0.1); /* Leichter Hintergrund für die Tabelle */
    border-radius: 12px;
    overflow: hidden; /* Für abgerundete Ecken bei Überlauf */
}

.data-table thead {
    background-color: var(--bg-input); /* Dunklerer Hintergrund für den Header */
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 600;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color); /* Leichte Trennlinie zwischen Zeilen */
}

.data-table tbody tr:last-child td {
    border-bottom: none; /* Keine Linie bei der letzten Zeile */
}

.data-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05); /* Leichter blauer Glow beim Hover */
    transform: translateY(-3px); /* Leichter Hoch-Effekt */
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Subtiler Schatten beim Hover */
}

.data-table .table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end; /* Aktionen rechtsbündig */
}


/* Responsive Anpassungen */
@media (max-width: 992px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .user-info {
        margin-top: 1rem;
        justify-content: center;
        width: 100%;
    }

    .task-filters {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .page-wrapper {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    .login-container {
        padding: 2rem;
    }
    .header-title {
        font-size: 1.5rem;
    }
    .header-title .fas {
        font-size: 1.3rem;
    }
    .quick-actions {
        flex-direction: column;
    }
    .quick-actions .btn {
        width: 100%;
    }
    .task-board-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Kleinere Karten auf kleineren Bildschirmen */
    }
    .task-card-header {
        flex-direction: column; /* Titel und Badges untereinander */
        align-items: flex-start;
        gap: 0.5rem;
    }
    .admin-section {
        padding: 1.5rem;
    }
    .checkbox-group {
        flex-direction: column;
    }
    .checkbox-label {
        margin-bottom: 0.5rem;
    }

    /* Task Detail */
    .task-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .task-detail-actions {
        width: 100%; /* Buttons nehmen volle Breite ein */
    }
    .task-detail-actions .btn {
        width: 100%;
    }
    .flex-container {
        flex-direction: column; /* Abschnitte untereinander */
    }
    .flex-item {
        min-width: unset; /* Mindestbreite aufheben */
        width: 100%; /* Volle Breite */
    }

    /* Admin Table Responsive */
    .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td {
        display: block; /* Elemente untereinander */
        width: 100%;
    }
    .data-table thead {
        display: none; /* Tabellenheader auf Mobil ausblenden */
    }
    .data-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .data-table td {
        text-align: right;
        padding-left: 50%; /* Platz für Label */
        position: relative;
    }
    .data-table td::before {
        content: attr(data-label); /* Label aus data-label Attribut */
        position: absolute;
        left: 1rem;
        width: calc(50% - 1.5rem);
        padding-right: 1rem;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-primary);
    }
    .data-table td:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .data-table td:last-child {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        border-bottom: none;
    }
    .data-table .table-actions {
        justify-content: center; /* Buttons zentrieren */
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    .login-title {
        font-size: 2rem;
    }
    .login-title .logo-icon {
        font-size: 1.8rem;
    }
    .header-title {
        font-size: 1.3rem;
    }
    .header-title .fas {
        font-size: 1.1rem;
    }
    .main-nav ul {
        gap: 0.5rem;
    }
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
    .task-filters {
        flex-direction: column; /* Filterbuttons untereinander */
        align-items: stretch; /* Volle Breite */
    }
    .task-filters .btn {
        width: 100%;
    }
}
