/* =======================================================================
   Globální styly aplikace SBS-NET.cz Servisní Evidence (Responzivní)
   ======================================================================= */

/* 1. Reset a základní nastavení */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333333;
    line-height: 1.6;
    padding-top: 60px; /* Zajišťuje pevný prostor pro zafixovanou hlavičku na desktopu */
}

/* 2. Typografie a odkazy */
h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

a {
    color: #e67e22;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #d35400;
}

/* 3. Společné komponenty (Tlačítka, Formuláře, Upozornění) */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #e67e22; 
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-submit:hover {
    background-color: #d35400;
}

/* Sjednocená tlačítka v tabulce klientů */
.btn-edit, .btn-branch {
    display: inline-block;
    width: 85px;              /* Pevná stejná šířka pro obě tlačítka */
    text-align: center;       /* Vycentrování textu uvnitř */
    padding: 5px 0;           /* Stejné vnitřní odsazení */
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

/* Specifické barvy pro jednotlivá tlačítka */
.btn-branch {
    background-color: #3498db;
    color: white !important;
}
.btn-branch:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #e67e22;
    color: white !important;
}
.btn-edit:hover {
    background-color: #d35400;
}

/* Odsazení mezi tlačítky v buňce */
.actions-cell {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #e67e22; 
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
    outline: none;
}

/* Upozornění (Chyby / Úspěch) */
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #f5c6cb;
    text-align: left;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #c3e6cb;
    text-align: left;
}

/* 4. Styly pro PŘIHLAŠOVACÍ STRÁNKU (index.php) */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 15px; /* Pojistka pro malé displeje */
}

.login-container {
    background: #ffffff;
    padding: 20px 40px 40px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-wrapper {
    margin-bottom: 24px;
    padding: 10px 0;
}

.logo-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

h3.app-subtitle {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 28px !important;
    font-weight: bold;
    color: #2c3e50; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.login-container h2 {
    margin-top: 10px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

/* 5. Layout pro vnitřek aplikace (Nástěnka, Adresář atd.) */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Responzivní tabulky (Zabrání přetečení na mobilech) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2c3e50;
    color: white;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Styly pro vnitřní rozvržení aplikace (Header & Dashboard) */
.main-header {
    position: fixed;            /* Přišpendlí hlavičku trvale navrch okna */
    top: 0;
    left: 0;
    width: 100%;                /* Roztáhne lištu na celou šířku obrazovky */
    z-index: 9999;              /* Zajistí plavání nad veškerým obsahem */
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 10px 20px;
    margin-bottom: 0;           /* Odsazení vyřešeno pomocí padding-top u body */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 40px; /* Kompaktní velikost loga v liště */
    width: auto;
}

.header-brand span {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.btn-logout {
    background-color: #e74c3c;
    color: white !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}

.btn-logout:hover {
    background-color: #c0392b;
}

.welcome-section {
    margin-bottom: 30px;
}

/* Mřížka pro dlaždice nástěnky */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dash-card {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid #e67e22; /* Oranžová linka z loga */
    transition: transform 0.2s, box-shadow 0.2s;
    color: #333 !important;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.dash-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.dash-card p {
    font-size: 14px;
    color: #666;
}

#eventsTable {
        table-layout: auto !important;
        width: 100% !important;
    }
    .desc-content {
        white-space: normal !important;
        word-break: break-word !important;
        min-width: 300px;
    }
    /* Flex rozvržení pro bar s nadpisem a filtrem pracovníka */
    .action-bar-header {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
        flex: 1;
    }
    .action-bar-header h1 {
        margin: 0;
    }

  /* Stylovaný modrý filtr pracovníka */
/* ==========================================================================
   MODERNIZACE FILTRU PRACOVNÍKŮ (.header-worker-filter)
   ========================================================================== */

.header-worker-filter {
    /* Skrytí nativní hnusné šipky prohlížeče */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Elegantní moderní vzhled */
    background-color: #ffffff;
    /* Vlastní stylová šipka přes SVG */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 42px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    min-width: 240px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease-in-out;
    outline: none;
}

/* Stav při najetí myší */
.header-worker-filter:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

/* Stav při kliknutí / aktivaci (Focus) */
.header-worker-filter:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    /* Jemná záře kolem prvku */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.07);
}

/* Stylování možností uvnitř seznamu (podpora se liší dle prohlížeče, ale moderní Chrome/Edge/Firefox to uhladí) */
.header-worker-filter option {
    padding: 12px;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 14px;
}

/* Stylování pro první/výchozí možnost, aby vypadala jako placeholder */
.header-worker-filter option[value="all"] {
    font-weight: bold;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   MODUL EVIDENCE MATERIÁLU – KONTENERY A LIŠTY
   ========================================================================== */

.toggle-form-section {
    display: none;
    margin-bottom: 30px;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.bulk-actions-bar {
    display: none;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #1e88e5;
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   KOMPAKTNÍ FORMULÁŘ A INPUTY
   ========================================================================== */

.compact-form-card {
    max-width: 850px;
    margin: 0 auto 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
}

.compact-grid {
    display: grid;
    grid-template-columns: 5fr 4fr 3fr;
    gap: 12px;
}

.compact-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.compact-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #34495e;
}

.compact-group input, 
.compact-group select, 
.compact-group textarea {
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    transition: all 0.2s ease;
    color: #1e293b;
    background-color: #fff;
}

.compact-group input:focus, 
.compact-group select:focus, 
.compact-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ==========================================================================
   FILTRAČNÍ PANEL / SOUČET HODIN
   ========================================================================== */

.filter-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.date-range-inputs {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.total-hours-box {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #334155;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 13px;
}

/* ==========================================================================
   PRÉMIOVÝ NAŠEPTÁVAČ (AUTOCOMPLETE)
   ========================================================================== */

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

/* Ikona budovy uvnitř inputu */
.autocomplete-wrapper::after {
    content: "🏢";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

.autocomplete-wrapper:focus-within::after {
    opacity: 0.9;
}

/* Kontejner výsledků */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: 6px;
    padding: 6px;
    list-style: none;
    backdrop-filter: blur(8px);
    animation: slideDown 0.15s ease-out;
}

/* Jednotlivá položka v seznamu */
.autocomplete-item {
    padding: 10px 14px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    color: #1e293b;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-item::before {
    content: "•";
    color: #94a3b8;
    font-size: 16px;
    transition: color 0.15s;
}

/* Aktivní stav / Hover položky */
.autocomplete-item:hover, 
.autocomplete-item.active {
    background-color: #edf7ed;
    color: #166534;
    font-weight: 700;
}

.autocomplete-item:hover::before, 
.autocomplete-item.active::before {
    color: #2ecc71;
}

/* Stav, kdy nebyl nalezen žádný výsledek */
.autocomplete-no-results {
    padding: 12px 14px;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    border-radius: 6px;
    text-align: center;
}

/* ==========================================================================
   TLAČÍTKA A ZÁKLADNÍ PRVKY
   ========================================================================== */

.btn-toggle {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-toggle:hover {
    background-color: #27ae60;
}

.btn-bulk-invoice {
    background-color: #1e88e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-bulk-invoice:hover {
    background-color: #1565c0;
}

.btn-red { background-color: #e74c3c !important; }
.btn-red:hover { background-color: #c0392b !important; }
.btn-grey { background-color: #95a5a6 !important; }
.btn-grey:hover { background-color: #7f8c8d !important; }
.style-btn-blue { background-color: #3498db !important; }
.style-btn-blue:hover { background-color: #2980b9 !important; }

.btn-clear-filters {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    height: 38px;
    transition: background-color 0.2s;
}
.btn-clear-filters:hover { background-color: #7f8c8d; }

.search-action-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* ==========================================================================
   RAPIDNÍ ZMENŠENÍ A ZKOMPAKTNĚNÍ TABULKY (service_events.php)
   ========================================================================== */

#eventsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px; /* Menší základní text pro "data-dense" zobrazení */
    line-height: 1.3;
    background: #fff;
}

/* Hlavička tabulky - nízká, profesionální tmavě šedá */
#eventsTable th {
    background-color: #f1f5f9;
    color: #475569;
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}

/* Buňky těla tabulky - maximální úspora výškového místa */
#eventsTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

/* Zebra efekt a hover pro přehlednost v hustých datech */
#eventsTable tbody tr:nth-child(even) {
    background-color: #f8fafc;
}
#eventsTable tbody tr:hover {
    background-color: #f1f5f9;
}

/* Drobnější písmo pro štítky a doplňující info */
.worker-name-span, 
.badge-branch, 
.work-type-cell,
.time-range-cell {
    font-size: 11px;
}

.badge-branch {
    background: #e0f2fe;
    color: #0369a1;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

/* Omezení přetékání a zalamování dlouhých textů popisu */
.description-cell {
    /* Zvýšili jsme maximální šířku, aby popis zabíral hlavní část tabulky */
    max-width: 600px; 
}

.desc-content {
    font-size: 12px;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* V základu vidíš 2 řádky, takže tabulka zůstane nízká */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-line;
}

/* Dynamické rozbalení popisu při najetí myší */
.description-cell:hover .desc-content {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

/* Interní poznámky - nyní mají vlastní sloupec, jsou čisté a přehledné */
.note-cell {
    background: #fef9c3;
    border-left: 2px solid #eab308;
    padding: 2px 6px;
    font-size: 11px;
    color: #713f12;
    border-radius: 3px;
    word-break: break-word; /* Pokud by byla poznámka dlouhá, zalomí se a neroztáhne sloupec */
}

/* Drobná úsporná tlačítka do řádků */
.btn-table-action {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    text-align: center;
    min-width: 65px;
    box-shadow: none !important;
    outline: none !important;
}

.btn-invoice-action {
    background-color: #10b981;
    color: white !important;
}
.btn-invoice-action:hover {
    background-color: #059669;
}

.btn-edit-action {
    background-color: #3b82f6;
    color: white !important;
}
.btn-edit-action:hover {
    background-color: #2563eb;
}

.badge-invoiced {
    background-color: #d1fae5;
    color: #065f46;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: none;
}

/* Minimální checkboxy */
.chk-col {
    width: 30px;
    text-align: center;
    vertical-align: top;
    padding-top: 6px !important;
}

#eventsTable .chk-col input[type="checkbox"] {
    transform: scale(0.9);
    margin: 0;
    cursor: pointer;
}

/* Pomocné šířky sloupců */
.width-95 { width: 95px; }
.width-140 { width: 140px; }
.width-180 { width: 180px; }
.width-150 { width: 150px; }
.width-125 { width: 125px; }
.width-110 { width: 110px; }
.width-80 { width: 80px; }
.width-170 { width: 170px; }
.min-width-200 { min-width: 200px; }
.flex-1 { flex: 1; }
.nowrap { white-space: nowrap; }


* ==========================================================================
   RAPIDNÍ ZMENŠENÍ A ZKOMPAKTNĚNÍ TABULKY (materials.php)
   ========================================================================== */

#materialsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px; /* Menší základní text pro "data-dense" zobrazení */
    line-height: 1.3;
    background: #fff;
}

/* Hlavička tabulky - nízká, profesionální tmavě šedá */
#materialsTable th {
    background-color: #f1f5f9;
    color: #475569;
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}

/* Buňky těla tabulky - maximální úspora výškového místa */
#materialsTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

/* Zebra efekt a hover pro přehlednost v hustých datech */
#materialsTable tbody tr:nth-child(even) {
    background-color: #f8fafc;
}
#materialsTable tbody tr:hover {
    background-color: #f1f5f9;
}


/* ==========================================================================
   7. MODUL SPRÁVY ÚKOLŮ (tasks.php)
   ========================================================================== */
.tasks-form-card {
    max-width: 850px;
    margin: 0 auto 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db; /* Modrá barva pro úkoly */
}

.tasks-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

/* Prioritní odznaky v tabulce úkolů */
.badge-priority {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}
.priority-vysoka { background-color: #f8d7da; color: #721c24; }
.priority-stredni { background-color: #fff3cd; color: #856404; }
.priority-nizka { background-color: #d4edda; color: #155724; }

/* Status odznaky */
.badge-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.status-hotovo { background-color: #2ecc71; color: white; }
.status-v-reseni { background-color: #e67e22; color: white; }
.status-novy { background-color: #95a5a6; color: white; }

/* Styly pro konverzační bubliny */
.chat-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
}
.chat-bubble-me {
    background: #e0f2fe;
    color: #0369a1;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.chat-bubble-other {
    background: #f1f5f9;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
.chat-meta {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 2px;
    display: block;
}

/* ==========================================================================
   Servisní výkazy - Ovládací prvky (service_events.php)
   ========================================================================== */

/* Horní akční lišta (Nadpis + Filtr uživatelů) */
.top-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-left h1 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.top-user-filter {
    height: 38px;
    padding: 0 12px;
    border: 2px solid #3498db;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    background-color: #e8f4fd;
    color: #2980b9;
    outline: none;
    cursor: pointer;
}

.top-user-filter:focus {
    background-color: #fff;
}

/* Sekce filtrů dole */
.filter-section-card {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: bold;
    color: #7f8c8d;
    text-transform: uppercase;
}

.filter-control {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ccd1d9;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
    width: 100%;
}

.work-type-cell {
    white-space: nowrap !important;
}

.badge-weekend-inline {
    background: rgba(211, 84, 0, 0.1);
    color: #d35400;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 4px;
    display: inline-block;
}

/* ==========================================================================
   ANIMACE
   ========================================================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================================================
   6. RESPONSIVE DESIGN (Media Queries)
   ======================================================================= */

/* Pro telefony a menší tablety (šířka pod 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 110px; /* Větší odsazení nahoře na mobilu, protože zalomená fixní lišta je vyšší */
    }

    .login-container {
        padding: 20px 20px 30px 20px; /* Menší vnitřní okraje na mobilu */
    }
    
    h3.app-subtitle {
        font-size: 22px !important; /* Zmenšení textu, aby se vešel na displej */
    }
    
    th, td {
        padding: 8px 10px; /* Kompaktnější tabulky */
        font-size: 14px;
    }
    
    /* Formuláře na celou šířku */
    .form-row {
        display: flex;
        flex-direction: column;
    }

    /* Mobilní úprava pro hlavičku */
    .header-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-user {
        flex-direction: column;
        gap: 5px;
    }

    /* Mobilní úpravy pro modul materiálu a úkolů */
    .action-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-toggle {
        width: 100%;
        text-align: center;
    }

    .compact-grid, 
    .filter-grid,
    .tasks-grid {
        grid-template-columns: 1fr;
    }
}