/*
 * CAZUBU Custom Stylesheet
 * Version 9.2 - Finaler Feinschliff (Refactored for Clean HTML)
 */

/* Globale Stile & Layout */
body, html { height: 100%; }
body { 
    background-image: url('../wallpaper.png'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
}
.site-container { display: flex; min-height: 100vh; }

/* Sidebar */
.side-menu { 
    width: 280px; 
    flex-shrink: 0; 
    background-color: rgba(47, 54, 64, 0.85); 
    color: #f5f6fa; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.project-name { font-weight: 700; color: white; font-family: 'Poppins', sans-serif; letter-spacing: 0.5px; }

/* Modern Sidebar Navigation */
.nav-link-header { 
    font-family: 'Poppins', sans-serif;
    font-weight: 600; 
    color: #a4b0be; 
    padding: 1rem 1rem 0.5rem 1rem; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
}

.side-menu .nav-pills { padding: 0 0.5rem; }

.side-menu .nav-link {
    color: #dfe6e9; 
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.side-menu .nav-link i {
    margin-right: 12px;
    font-size: 1.1em;
    opacity: 0.8;
}

.side-menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.side-menu .nav-link.active {
    background-color: #556B2F; /* Primary Green */
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}
.side-menu .nav-link.active i { opacity: 1; }

.site-logo { width: 80%; max-width: 180px; height: auto; margin-bottom: 10px; }

/* Main Content */
.main-content { flex-grow: 1; padding: 30px 10%; color: #fff; }

/* Headers & Typography */
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.5px;
}
.card-text { color: rgba(255,255,255,0.7); }
.text-muted { color: #a4b0be !important; }

/* Cards */
.header-card { background-color: #343a40 !important; color: #f8f9fa; border-radius: 0.75rem !important; margin-bottom: 1.5rem; }

/* Modals */
.modal-content { 
    background-color: #f8f9fa; 
    color: #212529; 
    border: none;
    overflow: hidden;
}
.modal-header {
    background-color: #2f3640; 
    color: #fff;
    border-bottom: 1px solid #4a5568;
}
.modal-title { color: #fff !important; font-family: 'Poppins', sans-serif; }
.btn-close { filter: invert(1); }

/* Login/Register Seiten */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-form-wrapper { max-width: 450px; width: 100%; padding: 30px; border-radius: 0.75rem; background-color: rgba(248, 249, 250, 0.95); box-shadow: 0 5px 15px rgba(0,0,0,0.2); border: 1px solid rgba(255, 255, 255, 0.2); }

/* Buttons & Icons */
.btn-cazubu { --bs-btn-color: #fff; --bs-btn-bg: #556B2F; --bs-btn-border-color: #556B2F; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #6B8E23; --bs-btn-hover-border-color: #6B8E23; }
.info-link, .info-link:hover { text-decoration: none !important; color: inherit !important; }

/* Das einheitliche, rahmenlose Cazubu Tabellen-Design */
.cazubu-table-frameless { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 0.75rem; overflow: hidden; }
.cazubu-table-frameless thead th { background-color: #2f3640; color: white; border: none; text-align: left !important; vertical-align: middle; padding: 1rem; }
/* Override for centered headers */
.cazubu-table-frameless thead th.text-center { text-align: center !important; }

.cazubu-table-frameless tbody td { 
    background-color: rgba(233, 236, 239, 0.85) !important; /* Mehr Transparenz */
    color: #212529; 
    border-top: 1px solid rgba(47, 54, 64, 0.15); 
    vertical-align: middle; 
    padding: 1rem;
    backdrop-filter: blur(5px); /* Glas-Effekt */
    -webkit-backdrop-filter: blur(5px);
}

/* Fix Active Button Contrast */
.btn-outline-dark.active, .btn-outline-dark:active {
    color: #fff !important;
    background-color: #212529;
    border-color: #212529;
}

/* Fix Tab Content Headings (Readable on Light BG) */
.tab-content h5, .tab-content h6 {
    color: #212529 !important;
    text-shadow: none !important;
    font-weight: 600;
}

.cazubu-table-frameless tbody tr:first-child td { border-top: none; }
.cazubu-table-frameless.table-hover tbody tr:hover td { background-color: rgba(220, 223, 226, 0.95) !important; }
.cazubu-table-frameless .text-muted { color: #495057 !important; }
.cazubu-table-frameless .btn-outline-dark { border-color: #2f3640; color: #2f3640; }
.cazubu-table-frameless .btn-outline-dark:hover { background-color: #2f3640; color: white; }

/* Registerkarten */
.plant-tabs { margin-bottom: 1.5rem; }
.plant-tabs .nav-link { color: #fff; font-weight: 500; background-color: rgba(47, 54, 64, 0.7); margin-right: 5px; border-radius: .375rem; }
.plant-tabs .nav-link.active { background-color: #556B2F; color: #fff; font-weight: bold; }
.cazubu-table-frameless .nav-tabs { border-bottom: none; }
.cazubu-table-frameless .nav-tabs .nav-link { border: 1px solid transparent; color: #a9a9a9; padding: 0.75rem 1rem; }
.cazubu-table-frameless .nav-tabs .nav-link:hover { border-color: transparent; color: #fff; }
.cazubu-table-frameless .nav-tabs .nav-link.active { background-color: rgba(233, 236, 239, 0.92); color: #212529; font-weight: bold; border-color: transparent; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }

/* Detailseite */
.plant-image-frame { background-color: #fff; padding: 0.75rem; border-radius: 0.75rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); height: 300px; display: flex; align-items: center; justify-content: center; }
.plant-image-frame img { border-radius: 0.5rem; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; }
.gallery-item .gallery-image { width: 100%; height: 120px; object-fit: cover; border-radius: 0.5rem; border: 1px solid #dee2e6; }
.gallery-item .gallery-date { font-size: 0.75rem; color: #6c757d; text-align: left; margin-top: 0.25rem; padding-left: 0.25rem; }
.gallery-item .delete-image-btn { position: absolute; bottom: 5px; right: 5px; opacity: 0.6; transition: opacity 0.2s ease-in-out; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.gallery-item:hover .delete-image-btn { opacity: 1; }

/* Minimalistisches DataTables Design */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { display: none !important; }
table.dataTable.no-footer { border-bottom: none !important; }

/* Dashboard Summary Cards alignment fix */
.col-lg-4.d-flex .cazubu-table-frameless {
    height: 100%;
}
.col-lg-4.d-flex .cazubu-table-frameless tbody,
.col-lg-4.d-flex .cazubu-table-frameless tr,
.col-lg-4.d-flex .cazubu-table-frameless td {
    height: 100%;
}