html, body {
    height: 100%;
    margin: 0;
}

/* --- Bilddarstellung für list_log --- */

:root {
    --ok-red: #E30613;
    --navbar-bg: #1f2937;
}

/* ===== Layout ===== */

.main-content {
    flex: 1;
    padding: 20px;
    background: #f6f7f9;
    overflow-y: auto;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif; 
    background: #f6f7f9; 
    color: #222; 
    min-height: 100vh;
    overflow-x: hidden;
}

table { 
    border-collapse: collapse; 
    width: 100%; 
}

th, td {
    padding: 8px 12px; 
    border: 1px solid #ccc; 
    text-align: left; 
} 

th {
    background-color: #f4f4f4; 
} 

tr:nth-child(even) {
    background-color: #fafafa; 
} 

img.vehicle-thumb {
    width: 60px; height: auto; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    margin: 2px; 
} 

form input, form select, form button { 
    padding: 6px 10px; 
    margin: 4px 0; 
    font-size: 14px; 
}

form button {
    cursor: pointer; 
    background-color: #007BFF; 
    color: white; 
    border: none; 
    border-radius: 4px; 
} 

.container { 
    max-width: 900px; 
    margin: 20px auto; 
    padding: 15px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    background-color: #fff; 
}

#lightbox { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.8); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
}

#lightbox img { 
    max-width: 90%; 
    max-height: 90%; 
    border-radius: 10px; 
}

.image-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.image-group-horizontal {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: #f1f3f6;
    border-radius: 6px;
}

.image-group-label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-right: 4px;
    white-space: nowrap;
}

.thumb {
    width: 70px;
    height: auto;
    max-height: 70px;
    object-fit: cover;

    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ccc;

    transition: transform .2s ease, box-shadow .2s ease;
}

.thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.thumb.damage {
    border: 2px solid #c00;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;

    background: #E30613; /* 🔴 Ozankurt-Rot */
}

/* Login Box */
.login-box {
    background: #fff;
    padding: 32px 28px 28px;
    width: 340px;
    border-radius: 10px;

    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    text-align: center;
}

/* Logo */
.login-logo {
    max-width: 180px;
    margin-bottom: 20px;
}

/* Überschrift */
.login-box h2 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #222;
}

/* Labels */
.login-box label {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    text-align: left;
}

/* Inputs */
.login-box input {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Button */
.login-box button {
    margin-top: 22px;
    width: 100%;
    padding: 10px;

    background: #E30613;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.login-box button:hover {
    background: #b80510;
}

/* Error */
.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 4px;
}

/* ===== Dashboard Cards ===== */
/* ================= DASHBOARD ================= */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.status-card {
    background: white;
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.status-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.status-card strong {
    font-size: 38px;
    margin-top: 6px;
}

/* Farben */

.status-card.available strong { color: #2ecc71; }
.status-card.used strong { color: #3498db; }
.status-card.maintenance strong { color: #f1c40f; }
.status-card.off strong { color: #e74c3c; }

/* ================= LOG TABLE ================= */

.log-table {
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    background:white;
    border-radius:12px;
    overflow:hidden;
    box-shadow:none
}

/* Header */

.log-table thead th {
    background:#f4f6fa;
    font-weight:600;
    font-size:13px;
    color:#555;
    padding:14px 12px;
    border-bottom:1px solid #e5e7eb;
}

/* Rows */

.log-table tbody tr {
    transition:background .15s ease, transform .1s ease;
}

.log-table tbody tr:hover {
    background:#797777;
}

/* Cells */

.log-table td {
    padding:12px;
    border-bottom:1px solid #eee;
    vertical-align:top;
}

/* letzter Eintrag ohne Linie */

.log-table tbody tr:last-child td {
    border-bottom:none;
}

/* Bilder */

.log-table img.thumb {
    width:60px;
    border-radius:6px;
    border:1px solid #ddd;
    transition:transform .15s ease, box-shadow .15s ease;
}

.log-table img.thumb:hover {
    transform:scale(1.05);
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

/* Schaden rot umranden */

.log-table img.damage {
    border:2px solid #e74c3c;
}

/* Hover leicht anheben */

.log-table tbody tr:hover {
    transform:translateY(-1px);
}

/* Fahrer Spalte etwas fetter */

.log-table td:nth-child(2) {
    font-weight:500;
}

/* Typ Badge */

.log-table td:nth-child(5) {
    text-transform:capitalize;
    font-weight:600;
}

/* Filterbar hübscher */

.filter-bar {
    margin-bottom:15px;
    display:flex;
    gap:10px;
}

.filter-bar select,
.filter-bar input {
    padding:8px 10px;
    border-radius:8px;
    border:1px solid #ddd;
}

.filter-bar button {
    padding:8px 14px;
    border-radius:8px;
    background:#c62828;
    color:white;
    border:none;
}

.table-wrapper {
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 4px 20px rgba(0,0,0,.05);
    background:white;
}

/* Header Ecken sauber abrunden */

.log-table thead th:first-child {
    border-top-left-radius:12px;
}

.log-table thead th:last-child {
    border-top-right-radius:12px;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    pointer-events:none;
}

.modal.show {
    pointer-events:auto;
}

.modal-content {
    background:white;
    width:95%;
    max-width:1400px;
    max-height:90vh;
    overflow-y:auto;
    border-radius:14px;
    padding:20px;
}

.modal-close {
    float: right;
    cursor: pointer;
    font-size: 28px;
}

/* login error message */
.login-error {
    background:#ffd6d6;
    color:#900;
    padding:10px;
    border-radius:6px;
    margin-bottom:10px;
    font-size:14px;
}

@media (max-width: 768px) {


.main-content {
    margin-left: 0 !important;
    padding: 10px;
}

/* DASHBOARD */

.dashboard-cards {
    flex-direction: column;
}

.status-card {
    width: 100%;
}

/* TABLE */

table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

/* FILTER */

.filter-bar {
    flex-direction: column;
    gap: 8px;
}

/* IMAGES */

.thumb {
    width: 50px;
}

/* LOGIN */

.login-box {
    width: 90%;
}

}

.modal-content {
    height: auto !important;
    max-height: 90vh !important;
    overflow-y: scroll !important;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.person-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.person-avatar img,
.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #ddd;
}

.person-info h3 {
    margin: 0;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e5e7eb;
    font-size:12px;
    font-weight:600;
}

.shift-cell {
    font-size: 13px;
}

.shift-name {
    font-weight: 600;
}

.shift-time {
    color: #666;
    font-size: 12px;
}

.custom-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.custom-table thead {
    background: #f8fafc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-table th {
    border: none;
    padding: 14px 12px;
    color: #64748b;
}

.custom-table td {
    border-top: 1px solid #f1f5f9;
    padding: 14px 12px;
    vertical-align: middle;
}

.custom-table tbody tr {
    transition: all 0.2s ease;
}

.custom-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

.custom-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}

.navbar {
    background: #E30613 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: #fff !important;
}

.navbar .nav-link:hover {
    opacity: 0.85;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.calendar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 40px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-cell {
    min-height: 120px;
    padding: 8px;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
}

.calendar-cell:hover {
    background: #e2e8f0;
}

.calendar-cell.outside {
    opacity: 0.3;
}

.calendar-cell.absence {
    background: #fef3c7;
}

.day-number {
    font-weight: 600;
    margin-bottom: 6px;
}

.shift {
    font-size: 12px;
    color: #2563eb;
}

.worked {
    font-size: 12px;
    color: #16a34a;
}

.absence-label {
    font-size: 12px;
    color: #dc2626;
}

.table-responsive {
    overflow: visible !important;
}

.dropdown-menu {
    z-index: 9999 !important;
}

.history-wrapper {
    padding: 0;
}

.history-scroll {
    max-height: 260px;
    overflow-y: auto;
}

.history-scroll table {
    width: 100%;
    margin-bottom: 0;
}

.is-invalid {
    border: 2px solid #dc3545 !important;
}