/* Základní reset a nastavení */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Hlavička --- */
.main-header {
    background-color: #2c3e50; /* Tmavě modrá (jako patička) */
    color: #ecf0f1; /* Světlá šedá (jako patička) */
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Shadow můžeme nechat pro oddělení */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .15rem;
    list-style: none;
}

.main-nav a,
.nav-link-button {
    display: block;
    padding: .45rem .6rem;
    border-radius: 4px;
}

.nav-link-button {
    color: #ecf0f1;
    text-decoration: none;
}

.menu-toggle {
    display: none;
}

/* --- Úprava stylů pro navigaci v hlavičce --- */

/* 1. :link (Nenavštívený odkaz - toto je standardní styl pro 'a') */
.main-nav a {
    color: #ecf0f1; /* Světlá šedá */
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease; /* Přidána i transition pro barvu */
}

/* 2. :visited (Navštívený odkaz) */
.main-nav a:visited {
    color: #ecf0f1; /* Explicitně nastavíme STEJNOU barvu */
    /* Ostatní styly (padding, text-decoration atd.) se dědí z 'a' */
}

/* 3. :hover (Přejetí myší) */
/* Důležité: :hover musí být po :link a :visited, aby je přepsal */
.main-nav a:hover {
    color: #ffffff; /* Mírně světlejší barva při přejetí pro lepší zpětnou vazbu */
    background-color: rgba(255, 255, 255, 0.1);
 }

/* 4. :active (Kliknutí myší) - volitelné, ale dobré mít */
.main-nav a:active {
    background-color: rgba(255, 255, 255, 0.2); /* Mírně tmavší pozadí při kliku */
    color: #ffffff;
}

/* Styl pro aktivní položku menu (pokud používáte třídu .active) */
/* Musí být také po :link a :visited */
.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.15); /* Mírně odlišné pozadí pro aktivní */
     font-weight: bold; /* Například zvýraznit tučně */
    color: #ffffff; /* Může být také světlejší */
}
.main-nav a.active:visited {
     /* Pokud chcete, aby aktivní navštívený odkaz vypadal stejně jako aktivní nenavštívený */
     color: #ffffff;
     font-weight: bold;
}


/* --- Úprava stylu pro logo (pro konzistenci) --- */

.logo a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
}
.logo a:visited {
     color: #ecf0f1; /* Stejná barva pro navštívené */
}
.logo a:hover {
     color: #ffffff; /* Mírně světlejší při přejetí */
}


/* --- Hlavní obsah --- */
.main-content {
    flex-grow: 1; /* Zajistí, že obsah vyplní prostor mezi hlavičkou a patičkou */
    padding: 2rem 0;
}

/* --- Patička --- */
.main-footer {
    background-color: #2c3e50; /* Tmavě modrá */
    color: #ecf0f1; /* Světlá šedá */
    text-align: center;
    padding: 1rem 0;
    margin-top: auto; /* Přilepí patičku dolů */
}

/* --- Formuláře --- */
.form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}
.login-container .form { max-width: 400px; margin-left: auto; margin-right: auto; }
.check-form-container .form { max-width: 700px; margin-left: auto; margin-right: auto; }

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.form-group-checkbox {
     margin-bottom: 10px;
}
.form-group-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2); /* Trochu zvětšit checkbox */
}
.form-group-checkbox label {
    display: inline-flex; /* Aby label a checkbox byly na řádku */
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}
.task-list { margin-bottom: 15px; }
.points { font-size: 0.9em; color: #777; margin-left: 5px;}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* --- Tlačítka --- */
.button, .button-link {
    display: inline-block;
    background-color: #3498db; /* Modrá */
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-right: 5px;
    margin-bottom: 5px; /* Pro případ zalomení */
}

.button:hover, .button-link:hover {
    background-color: #2980b9; /* Tmavší modrá */
}

.scan-button {
    background-color: #2ecc71; /* Zelená */
    font-size: 1.2rem;
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scan-button:hover { background-color: #27ae60; }
.scan-button svg { margin-right: 10px; }

.submit-button { background-color: #2ecc71; /* Zelená */ }
.submit-button:hover { background-color: #27ae60; }

.cancel-button { background-color: #e74c3c; /* Červená */ }
.cancel-button:hover { background-color: #c0392b; }

.button-link.small {
    padding: 5px 10px;
    font-size: 0.9rem;
}


/* --- Zprávy --- */
.message {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}
.message.error {
    background-color: #f8d7da; /* Světle červená */
    color: #721c24; /* Tmavě červená */
    border: 1px solid #f5c6cb;
}
.message.success {
    background-color: #d4edda; /* Světle zelená */
    color: #155724; /* Tmavě zelená */
    border: 1px solid #c3e6cb;
}
.message.warning {
    background-color: #fff3cd; /* Světle žlutá */
    color: #856404; /* Tmavě žlutá */
    border: 1px solid #ffeeba;
}


/* --- Tabulky --- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.table th, .table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.table th {
    background-color: #ecf0f1; /* Světle šedá */
    color: #34495e; /* Tmavší šedo-modrá */
    font-weight: bold;
}

.table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Proužkování */
}

.table tbody tr:hover {
    background-color: #f1f1f1; /* Zvýraznění při najetí */
}

/* --- Dashboard --- */
.dashboard-container h1, .dashboard-container h2 {
     margin-bottom: 1rem;
     color: #2c3e50;
}
.dashboard-container p { margin-bottom: 1.5rem; }
.quick-links { list-style: none; padding-left: 0; }
.quick-links li { margin-bottom: 10px; }


/* --- Stránka Skenování --- */
#qr-reader {
    border: 1px solid #ccc;
    position: relative; /* Pro případné absolutní pozicování uvnitř */
}
#qr-reader-results { color: #27ae60; } /* Zelená pro úspěch */

/* --- Responzivita (velmi základní) --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    .main-nav ul li {
        margin-left: 0;
        margin-bottom: 5px;
        width: 100%;
    }
     .main-nav ul li a {
        display: block; /* Odkazy přes celou šířku */
        text-align: center;
    }
    /* Dropdown na mobilu - zjednodušení, zobrazí se pod sebou */
    .dropdown:hover .dropdown-menu {
        position: static; /* Zrušit absolutní pozicování */
        display: block;
        border: none;
        box-shadow: none;
        background-color: transparent;
    }
     .dropdown-menu li a {
        color: #fff; /* Barva jako hlavní menu */
        padding: 10px 0; /* Jen vertikální padding */
        background-color: rgba(0, 0, 0, 0.1); /* Lehké pozadí pro odlišení */
     }
     .dropdown-menu li a:hover { background-color: rgba(0, 0, 0, 0.2); }


    .table th, .table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    /* Můžete přidat skrytí méně důležitých sloupců na mobilu */
    /* .history-table th:nth-child(3), .history-table td:nth-child(3) { display: none; } */
}

/* Úprava pro video element QR skeneru */
#qr-reader video {
    width: 100% !important; /* Zajistí šířku */
    height: auto !important; /* Zachová poměr stran */
}


/* Styly pro tabulku úkolů - Aktualizace */
.task-table-container {
    margin-top: 15px;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.task-table th,
.task-table td {
    border: 1px solid #ddd;
    padding: 8px 5px;
    /* vertical-align: top; Již nastaveno inline v HTML */
}

.task-table thead th {
    background-color: #f2f2f2;
    font-size: 0.9em; /* Nadpis může zůstat menší */
    line-height: 1.3; /* Upraveno pro víceslovné nadpisy */
    /* vertical-align: top; Odstraněno, pokud je inline */
}
.task-table thead th strong {
    display: block;
    text-transform: uppercase; /* Zajistí velká písmena */
}

.task-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Styly pro radio buttony, popis a body */
.task-table input[type="radio"] {
    margin: 0 0 3px 0; /* Malá mezera pod radio */
    vertical-align: middle;
    cursor: pointer;
    display: block; /* Aby bylo nad body */
    margin-left: auto; /* Centrování bloku */
    margin-right: auto; /* Centrování bloku */
}
.task-table .radio-label {
    display: block;
    min-height: 1px; /* Jen aby existoval pro klikání */
    height: 1px;     /* Minimalizujeme jeho výšku */
    cursor: pointer;
    margin-bottom: 3px; /* Mezera nad body */
}
.task-table .points-display {
    display: block; /* Zajistí odřádkování */
    font-size: calc(1em - 2px); /* O 2px menší než okolní text */
    color: #555; /* Tmavě šedá barva bodů */
    line-height: 1; /* Menší řádkování pro body */
    margin-top: 2px; /* Malá mezera nad body */
}


.task-table td.task-description-cell {
    /* vertical-align: top; Již inline */
    line-height: 1.4; /* Mírně větší řádkování pro popis */
}
.task-table td.task-description-cell label {
    cursor: pointer;
    font-weight: bold;
    margin-right: 5px;
    display: inline;
}

.task-table td .info-icon {
    display: inline-block;
    cursor: pointer;
    color: #3498db;
    font-weight: bold;
    font-size: 1.1em;
    user-select: none;
    vertical-align: baseline; /* Lepší zarovnání s textem */
}
.task-table td .explanation {
    background-color: #eaf2f8;
    border: 1px solid #aed6f1;
    border-radius: 4px;
    padding: 8px;
    margin-top: 5px;
    font-size: 0.9em;
    color: #2874a6;
}

/* Volitelné: Zvýraznění řádku při najetí myší */
.task-table tbody tr:hover {
    background-color: #eef;
}
/* --- Uklizeno 2026: navigace, mobilní karty a bezpečné formuláře --- */
.main-nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem .8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.nav-logout-form,
.inline-form {
    display: inline;
    margin: 0;
}

.nav-link-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.places-grid,
.task-cards {
    display: grid;
    gap: 1rem;
}

.places-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.place-card,
.task-card,
.last-check-details {
    border: 1px solid #d9dfe5;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.place-card h2,
.task-card legend {
    font-size: 1.08rem;
    font-weight: 700;
}

.place-card dl {
    margin: 0;
}

.place-card dl > div {
    display: grid;
    grid-template-columns: minmax(115px, 1fr) 1.4fr;
    gap: .5rem;
    padding: .25rem 0;
}

.place-card dt {
    font-weight: 600;
}

.place-card dd {
    margin: 0;
}

.place-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .8rem;
}

.place-card.status-overdue {
    border-left: 6px solid #c0392b;
    background: #fff7f6;
}

.place-card.status-never-checked {
    border-left: 6px solid #d39e00;
    background: #fffbeb;
}

.place-card.status-upcoming {
    border-left: 6px solid #2e8b57;
}

.place-card.status-neutral {
    border-left: 6px solid #7f8c8d;
}

.last-check-summary {
    margin: .75rem 0;
}

.info-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    margin-left: .35rem;
    border: 0;
    border-radius: 50%;
    background: #2471a3;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.last-check-details {
    margin: .75rem 0 1rem;
    background: #f7fbff;
}

.resolution-group {
    margin-top: 1.25rem;
    padding: .9rem 1rem .25rem;
    border: 1px solid #cfd8df;
    border-radius: 8px;
    background: #fbfcfd;
}

.resolution-group legend {
    padding: 0 .35rem;
    color: #52616c;
    font-size: .95rem;
    font-weight: 700;
}

.resolution-group .form-group {
    font-size: .92rem;
}

.resolution-group textarea,
.resolution-group select,
.resolution-group input[type="file"] {
    font-size: .95rem;
}

.place-last-check-details {
    margin-top: 1rem;
}

.outbox-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .7rem;
    margin: 1rem 0 1.25rem;
}

.outbox-summary-card {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .7rem .8rem;
    border: 1px solid #d9dfe5;
    border-radius: 7px;
    background: #fff;
}

.outbox-summary-card strong {
    font-size: 1.5rem;
}

.outbox-status {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.outbox-status.status-pending,
.outbox-summary-card.status-pending {
    background: #f7f1d5;
    color: #7a5b00;
}

.outbox-status.status-processing,
.outbox-summary-card.status-processing {
    background: #eaf2f8;
    color: #21618c;
}

.outbox-status.status-retry,
.outbox-summary-card.status-retry {
    background: #fcefd7;
    color: #9a5b00;
}

.outbox-status.status-sent,
.outbox-summary-card.status-sent {
    background: #e8f6ef;
    color: #1e8449;
}

.outbox-status.status-failed,
.outbox-summary-card.status-failed,
.outbox-error {
    background: #fdecea;
    color: #a31f16;
}

.outbox-table small,
.outbox-note {
    color: #52616c;
}

.outbox-error {
    max-width: 260px;
}

.task-card {
    min-width: 0;
}

.task-explanation {
    color: #4b5b68;
    margin-top: 0;
}

.task-status-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.status-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: .6rem;
    border: 2px solid #d9dfe5;
    border-radius: 7px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
}

.status-option:has(input:checked) {
    border-color: #2471a3;
    background: #eaf4fb;
}

.status-option input {
    margin-right: .45rem;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: .18rem .55rem;
    font-weight: 600;
}

.status-not_done,
.status-unknown {
    background: #f1f1f1;
    color: #555;
}

.status-checked_ok {
    background: #e8f6ef;
    color: #1e8449;
}

.status-done {
    background: #eaf2f8;
    color: #21618c;
}

.status-danger {
    display: block;
    color: #a31f16;
}

.is-inactive {
    opacity: .65;
}

.qr-reader {
    width: 100%;
    max-width: 520px;
    margin: 1rem auto;
}

[hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .header-container {
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: .35rem;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        min-height: 44px;
        padding: .45rem .7rem;
        border: 1px solid rgba(255, 255, 255, .45);
        border-radius: 5px;
        background: transparent;
        color: #ecf0f1;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    .menu-toggle:hover,
    .menu-toggle:focus-visible {
        background: rgba(255, 255, 255, .12);
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    .menu-toggle-icon {
        font-size: 1.35rem;
        line-height: 1;
    }

    .main-nav {
        width: 100%;
        margin-top: .35rem;
    }

    .js .main-nav {
        display: none;
    }

    .js .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        display: grid;
        gap: .2rem;
        padding: .4rem;
        border-radius: 6px;
        background: rgba(0, 0, 0, .18);
    }

    .main-nav li,
    .nav-logout-form,
    .main-nav a,
    .nav-link-button {
        width: 100%;
    }

    .main-nav a,
    .nav-link-button {
        min-height: 44px;
        padding: .65rem .75rem;
        text-align: left;
    }

    .main-nav ul li a {
        text-align: left;
    }

    .nav-link-button {
        border-radius: 4px;
    }

    .task-status-options {
        grid-template-columns: 1fr;
    }

    .status-option {
        justify-content: flex-start;
        min-height: 48px;
        text-align: left;
    }

    .place-card dl > div {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .button,
    .button-link {
        min-height: 44px;
    }
}

/* --- Statistiky --- */
.statistics-filter {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    background: #fff;
}

.statistics-presets,
.statistics-filter-actions,
.statistics-location-actions,
.statistics-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

.statistics-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 240px));
    gap: 1rem;
    margin-top: 1rem;
}

.statistics-location-filter {
    margin: 1rem 0;
    padding: .8rem;
    border: 1px solid #cbd4dc;
    border-radius: 6px;
}

.statistics-location-filter legend {
    padding: 0 .4rem;
    font-weight: 700;
}

.statistics-location-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .4rem .8rem;
    margin-top: .75rem;
}

.statistics-location-options label {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    padding: .3rem;
    cursor: pointer;
}

.statistics-location-options input {
    flex: 0 0 auto;
    margin-top: .3rem;
}

.statistics-current-filter {
    margin: 1rem 0;
}

.statistics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: .7rem;
    margin: 1rem 0 1.5rem;
}

.statistics-summary article {
    display: grid;
    gap: .1rem;
    padding: .8rem;
    border: 1px solid #d7dde2;
    border-radius: 7px;
    background: #fff;
    text-align: center;
}

.statistics-summary strong {
    font-size: 1.45rem;
    line-height: 1.2;
}

.statistics-summary span {
    font-size: .86rem;
}

.statistics-summary .summary-done {
    border-color: #8fcf9c;
}

.statistics-summary .summary-checked {
    border-color: #b8c0c7;
}

.statistics-summary .summary-not-done {
    border-color: #e2a3a3;
}

.statistics-section {
    margin: 1.75rem 0;
}

.statistics-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #cfd6dc;
    border-radius: 7px;
    background: #fff;
    overscroll-behavior-inline: contain;
}

.statistics-table {
    width: max-content;
    min-width: 100%;
    border-spacing: 0;
    border-collapse: separate;
    background: #fff;
    font-size: .88rem;
}

.statistics-table th,
.statistics-table td {
    min-width: 118px;
    padding: .55rem .65rem;
    border-right: 1px solid #d7dde2;
    border-bottom: 1px solid #d7dde2;
    text-align: center;
    vertical-align: top;
}

.statistics-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #e9eef2;
    color: #283845;
}

.statistics-table .statistics-row-heading {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    background: #f7f9fa;
    text-align: left;
}

.statistics-table thead .statistics-row-heading {
    z-index: 4;
    background: #e9eef2;
}

.statistics-table .statistics-row-heading small,
.statistics-inactive,
.statistics-historical-name {
    display: block;
    margin-top: .15rem;
    color: #68747d;
    font-size: .75rem;
    font-weight: 400;
}

.statistics-table .statistics-total-column,
.statistics-table tfoot th,
.statistics-table tfoot td {
    background: #eef3f6;
    font-weight: 700;
}

.statistics-table tfoot th,
.statistics-table tfoot td {
    border-bottom: 0;
}

.statistics-employee-name,
.statistics-result-values,
.statistics-place-values {
    display: grid;
    justify-items: center;
    gap: .22rem;
}

.statistics-employee-name span {
    display: block;
    line-height: 1.15;
}

.statistics-value,
.statistics-check-count,
.statistics-duration,
.statistics-nowrap {
    white-space: nowrap;
}

.statistics-value {
    display: inline-block;
    min-width: 92px;
    padding: .13rem .35rem;
    border-radius: 4px;
    line-height: 1.35;
    text-align: center;
}

.statistics-value a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.statistics-value a:hover,
.statistics-value a:focus-visible,
.statistics-check-count a:hover,
.statistics-check-count a:focus-visible {
    text-decoration: underline;
}

.statistics-value-done {
    background: #dcf3e2;
    color: #17652d;
    font-weight: 700;
}

.statistics-value-checked-ok {
    background: #e5e8ea;
    color: #3f4b52;
}

.statistics-value-not-done {
    background: #f9dddd;
    color: #941f1f;
    font-weight: 700;
}

.statistics-value-unknown {
    background: #fff1c7;
    color: #6e5410;
}

.statistics-check-count {
    color: #1f2529;
    font-weight: 700;
}

.statistics-check-count a {
    color: inherit;
    text-decoration: none;
}

.statistics-duration {
    color: #1f2529;
    font-size: .82rem;
}

.statistics-empty {
    color: #7c858c;
}

.statistics-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 1.25rem 0;
    padding: .8rem;
    border: 1px solid #d6dde2;
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
}

.statistics-legend .statistics-value {
    min-width: auto;
}

.statistics-pagination {
    justify-content: center;
    margin: 1rem 0;
}

.statistics-detail-table td,
.statistics-detail-table th {
    vertical-align: top;
}

/* --- Pokyny a vzorové fotografie míst --- */
.required-mark {
    color: #a31f16;
}

.cleaning-observations,
.clean-space-guidance {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #c9d6df;
    border-radius: 8px;
    background: #fff;
}

.cleaning-observations {
    border-left: 5px solid #d39a21;
    background: #fffaf0;
}

.cleaning-observations h2,
.clean-space-guidance h2 {
    margin-bottom: .65rem;
}

.clean-space-guidance-text {
    margin-bottom: 1rem;
}

.location-photo-gallery,
.location-photo-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .8rem;
    margin-top: .8rem;
}

.location-photo-link,
.location-photo-admin-item a {
    display: block;
    border: 1px solid #cfd7dd;
    border-radius: 7px;
    background: #eef2f4;
    overflow: hidden;
}

.location-photo-link img,
.location-photo-admin-item img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.location-photo-link:hover,
.location-photo-link:focus-visible,
.location-photo-admin-item a:hover,
.location-photo-admin-item a:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

.location-photo-admin-item {
    padding: .6rem;
    border: 1px solid #d5dce1;
    border-radius: 7px;
    background: #fff;
}

.location-photo-admin-item label {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .55rem;
    color: #8d231c;
    cursor: pointer;
}

.admin-task-assignment {
    max-height: 320px;
    overflow-y: auto;
    padding: .7rem;
    border: 1px solid #ccd4da;
    border-radius: 5px;
}

.admin-task-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .45rem;
}

.admin-task-item label {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
}

.admin-task-item .task-id {
    color: #68747d;
    font-size: .82rem;
}

.admin-task-item .info-icon {
    flex: 0 0 auto;
    cursor: help;
}

/* --- Generátor QR v administraci lokace --- */
.location-qr-generator {
    margin-top: .8rem;
    padding: .8rem;
    border: 1px solid #cbd5dc;
    border-radius: 7px;
    background: #f7f9fa;
}

.location-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.location-qr-message {
    min-height: 1.5rem;
    margin: .5rem 0;
    color: #34495e;
    font-size: .88rem;
}

.location-qr-url-row {
    margin: 0 0 .75rem;
    color: #34495e;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.location-qr-url-row code {
    font-size: inherit;
}

.location-qr-print-card {
    width: calc(50mm + 12px);
    max-width: 100%;
    padding: 6px;
    border: 1px solid #d6dce1;
    background: #fff;
    text-align: center;
}

.location-qr-preview {
    display: grid;
    width: 50mm;
    max-width: 100%;
    height: 50mm;
    margin: 0 auto;
    place-items: center;
    color: #68747d;
    font-size: .78rem;
}

.location-qr-preview svg {
    display: block;
    width: 50mm;
    max-width: 100%;
    height: 50mm;
}

.location-qr-preview-name {
    width: 50mm;
    max-width: 100%;
    margin: 2mm auto 0;
    color: #111;
    font-size: 8pt;
    line-height: 1.15;
    text-align: center;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: .35rem;
    }

    .logo {
        order: 1;
        margin-right: auto;
    }

    .menu-toggle {
        order: 2;
        margin-left: auto;
    }

    .main-nav {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
    }

    .statistics-filter-grid {
        grid-template-columns: 1fr;
        gap: .4rem;
    }

    .statistics-presets .button,
    .statistics-filter-actions .button {
        flex: 1 1 145px;
    }

    .statistics-location-options {
        grid-template-columns: 1fr;
    }

    .statistics-table .statistics-row-heading {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
    }

    .statistics-table th,
    .statistics-table td {
        min-width: 108px;
        padding: .45rem;
        font-size: .8rem;
    }

    .statistics-value {
        min-width: 86px;
    }
}
