/* Společné styly aplikace – hlavička a drobečková navigace (viz layout.php).
   Styly nezávisí na Bootstrapu ani na proměnných stránek, aby hlavička vypadala všude stejně. */

/* Stránky, které si dříve odsazovaly tělo kvůli vlastní fixní liště,
   mají nyní hlavičku nahoře a lištu filtrů jen přilepenou při rolování. */
body:has(> header.crs-header) { padding-top: 0 !important; margin-top: 0 !important; }
body:has(> header.crs-header) :is(.crs-filter-bar, .filter-bar) { position: sticky; top: 0; }

.crs-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}
.crs-container-fluid { max-width: none; padding: 0 24px; }
@media (max-width: 1399.98px) { .crs-container:not(.crs-container-fluid) { max-width: 1140px; } }
@media (max-width: 1199.98px) { .crs-container:not(.crs-container-fluid) { max-width: 960px; } }
@media (max-width: 991.98px)  { .crs-container:not(.crs-container-fluid) { max-width: 720px; } }
@media (max-width: 767.98px)  { .crs-container:not(.crs-container-fluid) { max-width: 540px; } }
@media (max-width: 575.98px)  { .crs-container, .crs-container-fluid { max-width: none; padding: 0 16px; } }

header.crs-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    padding: 10px 0;
    position: static;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.4;
}
.crs-header-inner {
    display: flex;
    align-items: center;
    gap: 10px 16px;
    flex-wrap: wrap;
}
.crs-header-logo { display: block; flex-shrink: 0; }
.crs-header-logo img { height: 40px; display: block; }
header.crs-header .crs-header-title {
    margin: 0;
    padding: 0 0 0 16px;
    border-left: 1px solid #dee2e6;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    flex: 1 1 200px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.crs-header-actions,
.crs-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.crs-header-actions:not(:has(*)) { display: none; }
.crs-header-actions form { margin: 0; }
.crs-header-user { margin-left: auto; }
.crs-header-username {
    font-size: 0.85rem;
    font-weight: 700;
    color: #495057;
    padding-right: 10px;
    margin-right: 2px;
    border-right: 1px solid #dee2e6;
    white-space: nowrap;
}

.crs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5;
    color: #004687;
    background: #fff;
    border: 1px solid #004687;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}
.crs-btn:hover { background: #004687; color: #fff; }
.crs-btn-dark { color: #212529; border-color: #212529; }
.crs-btn-dark:hover { background: #212529; color: #fff; }
.crs-btn-primary { background: #004687; color: #fff; }
.crs-btn-primary:hover { background: #0056a3; }

.crs-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    margin: 0 0 24px 0;
    font-size: 0.85rem;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.crs-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.crs-breadcrumb li { display: flex; align-items: center; }
.crs-breadcrumb li + li::before {
    content: "›";
    color: #adb5bd;
    padding: 0 8px;
    font-weight: 700;
}
.crs-breadcrumb a {
    color: #004687;
    font-weight: 600;
    text-decoration: none;
}
.crs-breadcrumb a:hover { text-decoration: underline; }
.crs-breadcrumb .crs-current { color: #6c757d; font-weight: 600; }

@media (max-width: 991.98px) {
    .crs-header-username { display: none; }
}
@media (max-width: 767.98px) {
    .crs-btn-label { display: none; }
}
@media (max-width: 575.98px) {
    .crs-header-logo img { height: 32px; }
    header.crs-header .crs-header-title { flex-basis: 100%; order: 3; padding-left: 0; border-left: 0; white-space: normal; }
    .crs-header-user { order: 2; }
    .crs-header-actions { order: 4; flex-basis: 100%; }
}

/* Nápověda ke stránce (tabulka page_helps) */
.crs-help-wrap { margin-bottom: 24px; font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.crs-help {
    position: relative;
    background: #e8f4fd;
    border-left: 5px solid #004687;
    border-radius: 8px;
    padding: 16px 48px 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #212529;
}
.crs-help[hidden], .crs-help-show[hidden] { display: none; }
.crs-help-title { font-weight: 700; color: #004687; font-size: 1rem; margin-bottom: 6px; }
.crs-help-body { font-size: 0.875rem; line-height: 1.6; }
.crs-help-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
}
.crs-help-close:hover { color: #212529; }
.crs-help-show { text-align: right; }
.crs-btn-help { color: #0b7285; border-color: #0b7285; }
.crs-btn-help:hover { background: #0b7285; color: #fff; }

/* Ve vloženém okně a při tisku hlavičku skrýt */
.crs-embedded header.crs-header,
.crs-embedded .crs-breadcrumb,
.crs-embedded .crs-help-wrap { display: none !important; }
@media print {
    header.crs-header,
    .crs-breadcrumb,
    .crs-help-wrap { display: none !important; }
}
