/* ==========================================================================
   RAPIDNÍ ZMENŠENÍ A ZKOMPAKTNĚNÍ TABULKY (service_events.php)
   ========================================================================== */

#eventsTable {
    width: 100%;
    min-width: 1280px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px; /* Menší základní text pro "data-dense" zobrazení */
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#eventsTable col.events-col--chk { width: 25px; }
#eventsTable col.events-col--date { width: 74px; }
#eventsTable td.events-col-date {
    overflow: visible;
    white-space: nowrap;
}
#eventsTable col.events-col--worker { width: 50px; }
#eventsTable col.events-col--client { width: 210px; }
#eventsTable col.events-col--branch { width: 100px; }
#eventsTable col.events-col--work-type { width: 158px; }
#eventsTable col.events-col--time { width: 80px; }
#eventsTable col.events-col--hours { width: 55px; }
#eventsTable col.events-col--amount { width: 70px; }
#eventsTable col.events-col--description { width: auto; min-width: 0; }
#eventsTable col.events-col--material { width: 80px; }
#eventsTable col.events-col--actions { width: 228px; }
#eventsTable .events-col-client {
    min-width: 0;
    word-break: break-word;
}
#eventsTable .events-col-worker .worker-initials-badge {
    cursor: help;
}
/* events-col--description = zbytek šířky tabulky (+44 px oproti původnímu sloupci Datum 104 px) */

/* Hlavička tabulky - nízká, profesionální tmavě šedá */
#eventsTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 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 var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}
#eventsTable td.work-type-cell {
    overflow: hidden;
}

/* Zebra efekt a hover pro přehlednost v hustých datech */
#eventsTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}
#eventsTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#eventsTable tr.event-row--clickable {
    cursor: pointer;
}

#eventsTable tr.event-row--clickable .worker-initials-badge {
    cursor: pointer;
}

/* Drobnější písmo pro štítky a doplňující info */
.badge-branch, 
.work-type-cell,
.time-range-cell {
    font-size: 11px;
}

.badge-branch {
    background: var(--color-bg-filter-accent);
    color: var(--color-bulk-bar-text);
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

/* Omezení přetékání a zalamování dlouhých textů popisu */
.material-cell {
    max-width: 200px;
    font-size: 13px;
    vertical-align: top;
}

#eventsTable .material-cell {
    max-width: none;
    overflow: hidden;
    font-size: 12px;
    color: var(--color-text-secondary);
}

#eventsTable .material-preview {
    font-size: inherit;
    color: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    white-space: pre-line;
    line-height: 1.55;
}

.material-detail-trigger .material-preview {
    cursor: help;
}

.material-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.4;
}

#eventsTable .description-cell {
    max-width: none;
    width: 100%;
    overflow: hidden;
}

#eventsTable .desc-content {
    font-size: 13px;
}

.description-cell {
    max-width: 600px;
}

.desc-content {
    font-size: 12px;
    color: var(--color-text-secondary);
    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 jen na zařízeních s myší (ne na tabletu po klepnutí) */
@media (hover: hover) and (pointer: fine) {
    .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: var(--color-alert-warning-bg);
    border-left: 2px solid var(--color-alert-warning-border);
    padding: 2px 6px;
    font-size: 11px;
    color: var(--color-alert-warning-text);
    border-radius: 3px;
    word-break: break-word; /* Pokud by byla poznámka dlouhá, zalomí se a neroztáhne sloupec */
}

.transport-info {
    margin-top: 6px;
    background: var(--color-bg-filter-accent);
    border-left: 2px solid var(--color-bulk-bar-border);
    padding: 2px 6px;
    font-size: 11px;
    color: var(--color-bulk-bar-text);
    border-radius: 3px;
}

#eventsTable .note-cell,
#eventsTable .transport-info {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Drobná úsporná tlačítka do řádků */
.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    border: none;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    min-width: 65px;
    min-height: 26px;
    box-sizing: border-box;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.btn-table-action:focus-visible {
    outline: 2px solid var(--color-focus-ring) !important;
    outline-offset: 2px;
}

.btn-edit-action {
    background-color: #3b82f6;
    color: white !important;
}
.btn-edit-action:hover {
    background-color: #2563eb;
}

.btn-detail-action {
    background-color: #64748b;
    color: white !important;
}
.btn-detail-action:hover {
    background-color: #475569;
}

.badge-invoiced {
    background-color: var(--color-alert-success-bg);
    color: var(--color-alert-success-text);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: none;
}

.badge-email-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: none;
}
.badge-email-status--yes {
    background-color: var(--color-bg-filter-accent);
    color: var(--color-bulk-bar-text);
}
.badge-email-status--no {
    background-color: var(--color-bg-header);
    color: var(--color-text-subtle);
}
.work-report-email-cell__meta {
    margin-top: 2px;
    line-height: 1.25;
}

/* 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-80 { width: 80px; }
.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: var(--color-bg-surface);
}

/* Hlavička tabulky - nízká, profesionální tmavě šedá */
#materialsTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    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 var(--color-border);
    box-sizing: border-box;
    color: var(--color-text-primary);
}

/* Zebra efekt a hover pro přehlednost v hustých datech */
#materialsTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}
#materialsTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#materialsTable tr.material-row--clickable {
    cursor: pointer;
}

#materialsTable .actions-cell--inline .btn-table-action {
    min-width: 0;
    width: auto;
    padding: 2px 8px;
}

#materialsTable th.actions-col--header {
    text-align: center;
    min-width: 290px;
    width: 290px;
}

#materialsTable td.actions-col {
    vertical-align: top;
    white-space: nowrap;
    overflow: visible;
    min-width: 290px;
    width: 290px;
}

#materialsTable .actions-col-header {
    display: grid;
    grid-template-columns: minmax(0, 64px) minmax(0, 1fr);
    align-items: center;
    width: 100%;
}

#materialsTable .actions-col-header__label {
    text-align: center;
}

#materialsTable .actions-cell--materials {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
}

#materialsTable .actions-cell--materials-has-status {
    justify-content: center;
    align-items: center;
}

#materialsTable .actions-cell--materials-has-status .actions-cell__status {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

#materialsTable .actions-cell--materials-has-status .actions-cell__buttons {
    flex: 0 0 auto;
}

#materialsTable .actions-cell--materials .actions-cell__buttons {
    display: flex;
    flex: 0 1 auto;
    gap: 4px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: 0;
}

#materialsTable .actions-cell--materials .actions-cell__buttons .post-action-form {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
}

#materialsTable .actions-cell--materials .actions-cell__buttons .btn-table-action {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
    padding: 2px 8px;
    white-space: nowrap;
}

#materialsTable th.col-client,
#materialsTable td.col-client {
    width: 240px;
    min-width: 240px;
    white-space: nowrap;
}

#materialsTable th.col-branch,
#materialsTable td.col-branch {
    white-space: nowrap;
}

#materialsTable .badge-branch--tasks {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* ==========================================================================
   7. MODUL SPRÁVY ÚKOLŮ (tasks.php)
   ========================================================================== */

#tasksTable {
    width: 100%;
    min-width: 1080px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#tasksTable col.tasks-col--date { width: 104px; }
#tasksTable col.tasks-col--scope { width: 128px; }
#tasksTable col.tasks-col--client { width: 210px; }
#tasksTable col.tasks-col--branch { width: 150px; }
#tasksTable col.tasks-col--priority { width: 92px; }
#tasksTable col.tasks-col--actions { width: 200px; }

#tasksTable td.tasks-col-date {
    overflow: visible;
    white-space: nowrap;
}

#tasksTable .tasks-col-client {
    min-width: 0;
    word-break: break-word;
}

#tasksTable .tasks-col-scope {
    vertical-align: top;
}

.badge-task-scope {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-task-scope--global {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.badge-task-scope--personal {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

[data-theme="dark"] .badge-task-scope--global {
    background: rgba(194, 65, 12, 0.22);
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.45);
}

[data-theme="dark"] .badge-task-scope--personal {
    background: rgba(3, 105, 161, 0.25);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.45);
}

.task-scope-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 3px;
    line-height: 1.25;
    word-break: break-word;
}

.task-scope-name--muted {
    color: var(--color-text-muted);
    font-weight: 500;
}

.task-scope-mobile .task-scope-name {
    margin-top: 4px;
}

.task-scope-collaborators {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 2px;
    line-height: 1.3;
    word-break: break-word;
}

#tasksTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tasksTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#tasksTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#tasksTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#tasksTable .description-cell {
    max-width: none;
    width: 100%;
    overflow: hidden;
}

#tasksTable .badge-branch {
    font-size: 11px;
}

#tasksTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   8. MODUL EVIDENCE NEPŘÍTOMNOSTÍ (nepritomnosti.php)
   ========================================================================== */

#nepritomnostiTable {
    width: 100%;
    min-width: 1060px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#nepritomnostiTable col.absence-col--period { width: 250px; }
#nepritomnostiTable col.absence-col--worker { width: 56px; }
#nepritomnostiTable col.absence-col--type { width: 150px; }
#nepritomnostiTable col.absence-col--days { width: 62px; }
#nepritomnostiTable col.absence-col--actions { width: 292px; }

#nepritomnostiTable td.absence-col-period {
    overflow: visible;
    white-space: nowrap;
}

#nepritomnostiTable .absence-col-worker .worker-initials-badge {
    cursor: help;
}

#nepritomnostiTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#nepritomnostiTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#nepritomnostiTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#nepritomnostiTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#nepritomnostiTable .description-cell {
    max-width: none;
    width: 100%;
    overflow: hidden;
}

#nepritomnostiTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   9. MODUL ADRESÁŘ KLIENTŮ (clients.php)
   ========================================================================== */

#clientsTable {
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#clientsTable col.client-col--name { width: 220px; }
#clientsTable col.client-col--ico { width: 100px; }
#clientsTable col.client-col--contact { width: 190px; }
#clientsTable col.client-col--actions { width: 292px; }

#clientsTable .client-col-name {
    min-width: 0;
    word-break: break-word;
}

#clientsTable .client-col-contact {
    min-width: 0;
}

#clientsTable .cell-contact-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

#clientsTable .cell-contact-email {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.25;
    word-break: break-all;
}

#clientsTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#clientsTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#clientsTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#clientsTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#clientsTable .description-cell {
    max-width: none;
    width: 100%;
    overflow: hidden;
}

#clientsTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   10. MODUL SERVISNÍ LISTY (invoices.php)
   ========================================================================== */

#invoicesTable {
    width: 100%;
    min-width: 920px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#invoicesTable col.invoice-col--number { width: 110px; }
#invoicesTable col.invoice-col--issued { width: 130px; }
#invoicesTable col.invoice-col--count { width: 78px; }
#invoicesTable col.invoice-col--amount { width: 100px; }
#invoicesTable col.invoice-col--actions { width: 220px; }

#invoicesTable .invoice-col-company {
    min-width: 0;
    word-break: break-word;
}

#invoicesTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#invoicesTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#invoicesTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#invoicesTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#invoicesTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   11. MODUL SERVISNÍ VÝKAZY (vykazy_prace.php)
   ========================================================================== */

#reportsTable {
    width: 100%;
    min-width: 1040px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#reportsTable col.report-col--number { width: 110px; }
#reportsTable col.report-col--issued { width: 130px; }
#reportsTable col.report-col--count { width: 72px; }
#reportsTable col.report-col--hours { width: 88px; }
#reportsTable col.report-col--email { width: 140px; }
#reportsTable col.report-col--actions { width: 220px; }

#reportsTable .report-col-company {
    min-width: 0;
    word-break: break-word;
}

#reportsTable .work-report-email-cell {
    overflow: visible;
}

#reportsTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#reportsTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#reportsTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#reportsTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#reportsTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   12. MODUL PRACOVNÍ VÝKAZY (pracovni_vykazy.php)
   ========================================================================== */

#pracovniVykazyTable {
    width: 100%;
    min-width: 1020px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#pracovniVykazyTable col.pvykaz-col--number { width: 100px; }
#pracovniVykazyTable col.pvykaz-col--worker { width: 140px; }
#pracovniVykazyTable col.pvykaz-col--period { width: 130px; }
#pracovniVykazyTable col.pvykaz-col--issued { width: 120px; }
#pracovniVykazyTable col.pvykaz-col--events { width: 64px; }
#pracovniVykazyTable col.pvykaz-col--absence { width: 88px; }
#pracovniVykazyTable col.pvykaz-col--hours { width: 78px; }
#pracovniVykazyTable col.pvykaz-col--actions { width: 220px; }

#pracovniVykazyTable .pvykaz-col-worker {
    min-width: 0;
    word-break: break-word;
}

#pracovniVykazyTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pracovniVykazyTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#pracovniVykazyTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#pracovniVykazyTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#pracovniVykazyTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   13. MODUL SPRÁVA UŽIVATELŮ (users.php)
   ========================================================================== */

#usersTable {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    background: var(--color-bg-surface);
}

#usersTable col.user-col--role { width: 84px; }
#usersTable col.user-col--status { width: 72px; }
#usersTable col.user-col--actions { width: 168px; }

#usersTable .user-col-name,
#usersTable .user-col-login {
    min-width: 0;
    word-break: break-word;
}

#usersTable .user-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
}

#usersTable .user-name-row .worker-initials-badge {
    flex: 0 0 auto;
    cursor: help;
}

#usersTable .user-col-login__username {
    display: block;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#usersTable .user-col-login .cell-contact-email {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#usersTable .badge-role-admin,
#usersTable .badge-role-editor,
#usersTable .badge-role-user {
    font-size: 10px;
    padding: 2px 6px;
    white-space: nowrap;
}

#usersTable .status-active,
#usersTable .status-blocked {
    font-size: 11px;
    white-space: nowrap;
}

#usersTable th {
    background-color: var(--color-bg-header);
    color: var(--color-text-table-header);
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 2px solid var(--color-border-table-strong);
    text-align: left;
    white-space: nowrap;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

#usersTable td {
    padding: 4px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
    overflow: hidden;
    color: var(--color-text-primary);
}

#usersTable tbody tr:nth-child(even) {
    background-color: var(--color-bg-zebra);
}

#usersTable tbody tr:hover {
    background-color: var(--color-bg-hover-row);
}

#usersTable .actions-col {
    vertical-align: middle;
    white-space: nowrap;
}

/* 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; }
[data-theme="dark"] .priority-vysoka { background-color: rgba(185, 28, 28, 0.28); color: #fca5a5; }
[data-theme="dark"] .priority-stredni { background-color: rgba(217, 119, 6, 0.28); color: #fcd34d; }
[data-theme="dark"] .priority-nizka { background-color: rgba(21, 128, 61, 0.28); color: #86efac; }

/* 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; }
.badge-status--active { background-color: #d1fae5; color: #047857; }
.badge-status--inactive { background-color: #f1f5f9; color: #64748b; }
[data-theme="dark"] .badge-status--active { background-color: rgba(4, 120, 87, 0.28); color: #6ee7b7; }
[data-theme="dark"] .badge-status--inactive { background-color: var(--color-bg-header); color: var(--color-text-subtle); }
.row-inactive td { opacity: 0.72; }

/* 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;
}
[data-theme="dark"] .chat-bubble-me {
    background: rgba(3, 105, 161, 0.32);
    color: #bae6fd;
}
[data-theme="dark"] .chat-bubble-other {
    background: var(--color-bg-header);
    color: var(--color-text-primary);
}
.chat-meta {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 2px;
    display: block;
}

