/**
 * SanierungsApp - Custom Styles
 */

/* Allgemeine Anpassungen */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
#sidebar-container {
    min-width: 220px;
    max-width: 220px;
    min-height: calc(100vh - 56px);
    border-right: 1px solid #dee2e6;
}

#sidebar-container .list-group-item {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
}

#sidebar-container .list-group-item:hover {
    background-color: #e9ecef;
}

#sidebar-container .list-group-item a {
    color: #495057;
    text-decoration: none;
    display: block;
}

#sidebar-container .list-group-item a:hover {
    color: #007bff;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.card-header {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Tabellen */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Formulare */
.form-group label {
    font-weight: 500;
    color: #495057;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
}

/* Login/Registrierung */
.container.mt-5 .card {
    max-width: 450px;
    margin: 0 auto;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    #sidebar-container {
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
    }
    
    .d-flex {
        flex-direction: column;
    }
}

/* Status-Farben für Verfahren */
.table-secondary {
    opacity: 0.7;
}

/* Sortierung in Tabellen */
th a {
    color: inherit;
    text-decoration: none;
}

th a:hover {
    color: #007bff;
}

/* Pflichtfeld-Markierung */
label:has(+ input[required])::after,
label:has(+ select[required])::after {
    content: " *";
    color: #dc3545;
}

/* Print-Styles */
@media print {
    .navbar,
    #sidebar-container,
    .btn {
        display: none !important;
    }
    
    .container-fluid {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* Dokumente-Tabelle: Einheitliche Button-Breiten für Hochladen, Runterladen, Löschen */
.dok-tabelle td:nth-child(3) .btn,
.dok-tabelle td:nth-child(4) .btn,
.dok-tabelle td:nth-child(5) .btn {
    width: 32px;
    padding: 0.25rem 0;
    text-align: center;
}

/* Sicherstellen, dass alle Action-Buttons in der Liste gleich groß sind */
.dok-tabelle .dok-liste .btn-secondary,
.dok-tabelle .dok-liste .btn-danger {
    width: 32px;
    padding: 0.25rem 0;
    text-align: center;
}

/* Runterladen und Löschen Spalten: Inhalt zentrieren */
.dok-tabelle td:nth-child(4),
.dok-tabelle td:nth-child(5) {
    text-align: center;
}

/* Button-Liste in Runterladen/Löschen-Spalten zentrieren */
.dok-tabelle td:nth-child(4) .dok-liste,
.dok-tabelle td:nth-child(5) .dok-liste {
    align-items: center;
}
