:root {
    --primary-color: #007bff;
    --secondary-color: #28a745;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #ffffff;
    --danger-color: #dc3545;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1337px; /* Tvoje specifická šířka */
    margin: 0 auto;   /* Vycentrování na střed */
    padding: 20px;
    box-sizing: border-box;
}

/* Vylepšená navigace */
nav {
    display: flex;
    justify-content: space-between; /* Rozdělí linky a odhlášení */
    align-items: center;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-links a {
    margin-right: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
}

.nav-links a:hover { color: var(--primary-color); }

.logout-link {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 600;
}

/* Tabulky a karty */
.content-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; border-bottom: 2px solid #eee; }
td { padding: 12px; border-bottom: 1px solid #eee; }

/* Styly pro modální okno */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.5); 
}
.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

/* ... (původní body a container zůstává) ... */

/* Moderní Modální okno */
.modal {
    display: none; /* Skryté v základu */
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Ztmavení */
    backdrop-filter: blur(8px); /* Rozostření pozadí */
    align-items: center; /* Vycentrování vertikálně */
    justify-content: center; /* Vycentrování horizontálně */
}

/* Když je modál aktivní, změníme display na flex přes JS */
.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hlavička auta s velkou ikonou */
.car-header-detail {
    display: flex;
    gap: 40px;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.car-icon-large {
    width: 300px;
    height: 300px;
    object-fit: contain;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
}

.car-info-text h1 { font-size: 2.5em; margin: 0; }
.car-info-text p { font-size: 1.2em; color: #666; }

/* Grid pro ikony v editaci */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.icon-option {
    cursor: pointer;
    border: 2px solid transparent;
    padding: 5px;
    border-radius: 8px;
    text-align: center;
}
.icon-option:hover { background: #f0f0f0; }
.icon-option input { display: none; }
.icon-option input:checked + img {
    border-color: var(--primary-color);
    background: #e7f1ff;
}
.icon-option img { width: 100%; border-radius: 4px; border: 2px solid transparent; }

.car-header-detail {
    display: flex;
    gap: 40px;
    align-items: stretch; /* Aby náklady měly stejnou výšku jako zbytek */
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}