:root {
    --primary: #FEBE49; /* Tvoje firemní žlutá */
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Hlavička aplikace */
header {
    background-color: #000;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 { margin: 0; font-size: 1.2rem; color: var(--primary); }

/* Stav synchronizace (mráček) */
.sync-status {
    font-size: 1.5rem;
}
.synced { color: #00aaff; } /* Modrá - OK */
.unsynced { color: #ff4444; } /* Červená - Čeká */

/* Kontejner pro obsah */
.container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Přihlašovací formulář */
.login-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    border: 1px solid #333;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: white;
    box-sizing: border-box; /* Důležité pro padding */
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

/* Mřížka plošin (Grid) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: white;
    border: 1px solid #333;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100px;
}

.card:hover, .card:active {
    border-color: var(--primary);
    transform: scale(1.02);
}

.card h3 {
    margin: 0;
    font-size: 1rem;
}

.card span {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Pro tablety a větší */
@media (min-width: 768px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* --- PŘIDAT NA KONEC style.css --- */

/* Tlačítko zpět v hlavičce */
.back-btn {
    color: var(--primary);
    font-size: 1.5rem;
    text-decoration: none;
    padding-right: 15px;
}

/* Velké tlačítko pro novou opravu */
.btn-action {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: #000;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.btn-action:active {
    transform: scale(0.98);
}

/* Kartička opravy */
.repair-card {
    background-color: #2a2a2a; /* Světlejší než pozadí */
    border-left: 5px solid var(--primary);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    position: relative;
}

.repair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.repair-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
}

.repair-date {
    color: var(--primary);
    font-size: 0.9rem;
    font-family: monospace;
}

.repair-desc {
    color: #ccc;
    font-size: 0.95rem;
    white-space: pre-wrap; /* Zachová řádkování */
}

.repair-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #444;
    padding-top: 8px;
}

.photo-badge {
    background: #444;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- GALERIE A FULLSCREEN (Přidat na konec style.css) --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.gallery-item {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Aby se fotka nedeformovala */
    transition: transform 0.2s;
}

.gallery-item:active {
    transform: scale(0.95);
    border-color: var(--primary);
}

/* Fullscreen okno */
.fullscreen-modal {
    display: none; /* Skryté ve výchozím stavu */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    max-width: 95%;
    max-height: 80%;
    border: 2px solid var(--primary);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}