/* Taskering CRM - Komponenty CSS */

/* ===== Quill Editor Fixes ===== */
.ql-tooltip {
    z-index: 9999 !important;
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
}

.ql-tooltip.ql-editing {
    left: 50% !important;
    top: 50% !important;
}

.ql-tooltip input[type=text] {
    width: 250px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

.ql-tooltip a.ql-action,
.ql-tooltip a.ql-remove {
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ql-tooltip a.ql-action:hover {
    background: #e9ecef;
}

.ql-tooltip a.ql-action::after {
    content: 'Uložit' !important;
}

.ql-tooltip a.ql-remove::before {
    content: 'Odstranit' !important;
}

.ql-tooltip::before {
    content: 'Zadejte URL:' !important;
}

.ql-tooltip[data-mode=link]::before {
    content: 'Zadejte odkaz:' !important;
}

/* Overlay za tooltipem */
.ql-tooltip.ql-editing::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
}

/* ===== Progress Bar Komponenty ===== */
.progress-compact {
    width: 100px;
}

.progress-compact .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== Chart Container ===== */
.chart-container {
    height: 300px;
}

.chart-placeholder {
    /* Používá Bootstrap utility třídy: d-flex, flex-column, align-items-center, justify-content-center, h-100, p-4 */
}

.chart-placeholder img {
    opacity: 0.5;
    margin-bottom: 1rem;
}

.chart-placeholder h6 {
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
}

.chart-placeholder p {
    color: var(--bs-secondary);
}

/* ===== Hidden Forms ===== */
.hidden-form {
    display: none;
}

/* ===== Table Progress Bars ===== */
.table-progress {
    width: 100px;
}

.table-progress .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
    min-width: 2rem;
}

/* ===== Responsive Progress Bars ===== */
@media (max-width: 576px) {
    .progress-compact,
    .table-progress {
        width: 80px;
    }
    
    .progress-compact .progress-bar,
    .table-progress .progress-bar {
        font-size: 0.7rem;
    }
}

/* ===== Dashboard Specific Styles ===== */
.dashboard-stats-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-project-table .progress {
    width: 100px;
}

.dashboard-project-table .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== Reports Specific Styles ===== */
.reports-chart-container {
    height: 300px;
    position: relative;
}

.reports-chart-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

/* ===== Moderní Task Items ===== */
.task-item {
    border: 1px solid #f1f5f9 !important;
    margin-bottom: 0.65rem !important;
    border-radius: 10px !important;
    transition: var(--transition, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    border-left: 4px solid #e2e8f0 !important;
    background: white;
}

.task-item:hover {
    background-color: #f8fafc !important;
    transform: translateX(4px);
}

.task-item[data-task-status="completed"] {
    border-left-color: #10b981 !important;
}

.task-item[data-task-status="in_progress"] {
    border-left-color: #f59e0b !important;
}

.task-item[data-task-status="new"] {
    border-left-color: #3b82f6 !important;
}

/* ===== Badge varianty - subtilní ===== */
.bg-success-subtle {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.bg-warning-subtle {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.bg-info-subtle {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

.bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.bg-secondary-subtle {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}


/* ===== Tasks Specific Styles ===== */
.tasks-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.tasks-table .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* ===== Time Records Specific Styles ===== */
.time-records-table .badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.time-records-table .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* ===== Users Specific Styles ===== */
.users-table .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.users-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ===== Projects Specific Styles ===== */
.projects-table .progress {
    width: 100px;
}

.projects-table .progress-bar {
    font-size: 0.75rem;
    line-height: 1;
    min-width: 2rem;
}

.projects-table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ===== Utility Classes for Inline Styles ===== */
.w-100px {
    width: 100px !important;
}

.h-300px {
    height: 300px !important;
}

.d-none {
    display: none !important;
}

/* ===== Print Styles ===== */
@media print {
    .progress-compact,
    .table-progress,
    .dashboard-project-table .progress,
    .projects-table .progress {
        width: 60px !important;
    }
    
    .chart-container,
    .reports-chart-container {
        height: 200px !important;
    }
}

/* ===== Sidebar Rychlé akce ===== */
.sidebar-quick-actions {
    padding: 0 1rem;
}

.sidebar-quick-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s ease;
}

.sidebar-quick-actions .btn:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-quick-actions .btn img {
    opacity: 0.8;
}

.sidebar-quick-actions .btn:hover img {
    opacity: 1;
}

.sidebar-divider {
    margin: 1rem;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

/* ===== Responsivní úpravy pro rychlé akce ===== */
@media (max-width: 768px) {
    .sidebar-quick-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .sidebar-quick-actions .btn img {
        width: 12px;
        height: 12px;
    }
}

/* ===== Messenger styl komentářů ===== */
#commentsContainer {
    padding: 1rem 0;
}

#commentsContainer .d-flex {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Komentář klienta (vlevo) */
#commentsContainer .justify-content-start .bg-light {
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#commentsContainer .justify-content-start .bg-light:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Komentář řešitele/admina (vpravo) */
#commentsContainer .justify-content-end .bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    box-shadow: 0 2px 4px rgba(13,110,253,0.3);
}

#commentsContainer .justify-content-end .bg-primary:hover {
    box-shadow: 0 3px 6px rgba(13,110,253,0.4);
}

/* Odkaz na uživatele v komentáři */
#commentsContainer a:hover {
    text-decoration: underline !important;
}

/* Scrollbar pro kontejner komentářů */
#commentsContainer::-webkit-scrollbar {
    width: 8px;
}

#commentsContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#commentsContainer::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#commentsContainer::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsivní úpravy pro komentáře */
@media (max-width: 768px) {
    #commentsContainer .rounded {
        max-width: 85% !important;
        font-size: 0.9rem;
    }
    
    #commentsContainer small {
        font-size: 0.7rem !important;
    }
}

/* ===== Inbox položky - rozlišení typů ===== */
.inbox-ticket {
    border-left: 3px solid #0d6efd;
}

.inbox-comment {
    border-left: 3px solid #ffc107;
    background-color: #fffbf0;
}

.inbox-comment:hover {
    background-color: #fff8e1;
}

.inbox-item {
    transition: all 0.2s ease;
}

.inbox-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ikony v inbox položkách */
.inbox-item img {
    vertical-align: middle;
}

/* ===== Inline editace - hover efekt ===== */
.hover-edit {
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.hover-edit:hover {
    background-color: #f8f9fa;
    outline: 1px dashed #dee2e6;
}

.hover-edit:hover::after {
    content: ' ✏️';
    font-size: 0.8em;
    opacity: 0.5;
}

/* ===== Travel Orders - Koncepty ===== */
.table .table-warning {
    background-color: #fff3cd !important;
    opacity: 0.85;
}

.table .table-warning:hover {
    background-color: #ffecb5 !important;
    opacity: 1;
}

/* ===== Task Completion Circle ===== */
/* Kulatý prvek pro označení dokončení úkolu - inspirováno Todoist/Asana */
.task-completion-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-completion-circle:hover {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.task-completion-circle.completed {
    border-color: #10b981;
    background-color: #10b981;
}

.task-completion-circle .circle-icon {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    filter: brightness(0) invert(1);
}

.task-completion-circle:hover .circle-icon {
    opacity: 0.5;
}

.task-completion-circle.completed .circle-icon {
    opacity: 1;
}

/* Priority varianty pro completion circle */
.task-completion-circle[data-priority="urgent"] {
    border-color: #dc2626;
}
.task-completion-circle[data-priority="urgent"]:hover {
    background-color: rgba(220, 38, 38, 0.1);
}
.task-completion-circle[data-priority="urgent"].completed {
    background-color: #dc2626;
    border-color: #dc2626;
}

.task-completion-circle[data-priority="high"] {
    border-color: #f97316;
}
.task-completion-circle[data-priority="high"]:hover {
    background-color: rgba(249, 115, 22, 0.1);
}
.task-completion-circle[data-priority="high"].completed {
    background-color: #f97316;
    border-color: #f97316;
}

/* ===== Task Selection (Hromadný výběr) ===== */
/* Zvýraznění vybraného řádku */
.task-row.selected,
.task-item.selected,
.list-group-item.selected {
    background-color: #eff6ff !important;
    border-color: #3b82f6 !important;
}

.task-row.selected td {
    background-color: #eff6ff !important;
}

/* Selection checkbox styling */
.task-select-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.task-select-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* ===== Completed Task Styling ===== */
/* Dokončený úkol - přeškrtnutí a zešednutí */
.task-completed .task-name,
.task-completed .task-title,
.task-row.task-completed td:not(:first-child):not(:nth-child(2)) {
    text-decoration: line-through;
    color: #9ca3af !important;
}

.task-completed {
    opacity: 0.7;
}

.task-completed:hover {
    opacity: 0.9;
}

/* Pro list-group-item */
.list-group-item.task-completed {
    background-color: #f9fafb;
}

.list-group-item.task-completed .task-name,
.list-group-item.task-completed strong {
    text-decoration: line-through;
    color: #9ca3af !important;
}

/* Pro tabulky */
tr.task-completed {
    background-color: #f9fafb !important;
}

tr.task-completed td {
    color: #9ca3af;
}

tr.task-completed td a {
    color: #9ca3af !important;
}

/* ===== Task List Header - Select All ===== */
.task-list-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.task-list-header .select-all-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-list-header label {
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

/* ===== TASK DETAIL - Freelo Style ===== */

/* Task detail hlavní záhlaví - modrý gradient */
.task-detail-header {
    background: linear-gradient(135deg, #7b7ff0 0%, #6F73F3 100%);
    border-radius: 5px 5px 0 0;
    padding: 1.25rem 1.5rem;
    color: white;
    position: relative;
}

.task-detail-header .task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-detail-header .task-checkbox:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

.task-detail-header .task-checkbox.completed {
    background: #4caf50;
    border-color: #4caf50;
}

.task-detail-header .task-checkbox img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    opacity: 0;
    transition: opacity 0.2s;
}

.task-detail-header .task-checkbox.completed img {
    opacity: 1;
}

.task-detail-header .task-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
    flex-grow: 1;
}

.task-detail-header .task-title:hover {
    cursor: pointer;
}

.task-detail-header .task-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-top: 0.5rem;
}

.task-detail-header .task-meta a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.task-detail-header .task-meta a:hover {
    color: #fff;
    text-decoration: underline;
}

.task-detail-header .header-actions {
    display: flex;
    gap: 0.5rem;
}

.task-detail-header .header-actions .btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.task-detail-header .header-actions .btn:hover {
    background: rgba(255,255,255,0.25);
}

.task-detail-header .header-actions .btn img {
    filter: brightness(0) invert(1);
}

/* Task detail kontejner */
.task-detail-container {
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    border-top: none;
}

/* Task detail layout */
.task-detail-layout {
    display: flex;
    min-height: 600px;
}

/* Task detail hlavní oblast */
.task-detail-main {
    flex: 1;
    padding: 1.5rem;
    border-right: 1px solid #e5e7eb;
    max-width: calc(100% - 280px);
}

/* Task detail sidebar */
.task-detail-sidebar {
    width: 280px;
    padding: 1rem;
    background: #fafbfc;
    flex-shrink: 0;
}

/* Sidebar položky */
.task-sidebar-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
}

.task-sidebar-item:last-child {
    border-bottom: none;
}

.task-sidebar-item .sidebar-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 90px;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.task-sidebar-item .sidebar-value {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
}

.task-sidebar-item .sidebar-value .form-select,
.task-sidebar-item .sidebar-value .form-control {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

/* Sidebar avatar stacky */
.avatar-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.avatar-stack .avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
    border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.avatar-stack .avatar-sm img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-stack .avatar-add {
    background: transparent;
    border: 2px dashed #d1d5db;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-stack .avatar-add:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Task detail popis sekce */
.task-description-section {
    margin-bottom: 1.5rem;
}

.task-description-section .section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-description-section .description-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.task-description-section .description-content:hover {
    background: #f3f4f6;
}

.task-description-section .description-empty {
    color: #9ca3af;
    font-style: italic;
}

/* Komunikace sekce */
.task-communication-section {
    margin-top: 1.5rem;
}

.task-communication-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.task-communication-section .section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-communication-section .section-title .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* Komentář v komunikaci */
.comment-item {
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-item .comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-item .comment-body {
    flex: 1;
    min-width: 0;
}

.comment-item .comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.comment-item .comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.comment-item .comment-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.comment-item .comment-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4b5563;
}

.comment-item .comment-content p {
    margin: 0 0 0.5rem 0;
}

.comment-item .comment-content p:last-child {
    margin-bottom: 0;
}

/* Přílohy v komentáři */
.comment-attachments {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    max-width: 280px;
}

.attachment-preview:hover {
    background: #e5e7eb;
    color: #374151;
}

.attachment-preview img.attachment-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.attachment-preview .attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-preview .attachment-size {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Obrázková příloha - náhled */
.attachment-image-preview {
    display: block;
    max-width: 300px;
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.attachment-image-preview:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

.attachment-image-preview img {
    display: block;
    max-width: 100%;
    height: auto;
}

.attachment-image-preview .image-info {
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Formulář pro nový komentář - Freelo style */
.comment-form-freelo {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.comment-form-freelo .comment-form-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-form-freelo .comment-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form-freelo .comment-form-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-form-freelo .comment-form-editor {
    min-width: 0;
}

.comment-form-freelo .editor-box {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form-freelo .editor-box:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.comment-form-freelo .editor-box textarea,
.comment-form-freelo .editor-box .ql-container {
    border: none !important;
    min-height: 100px;
}

.comment-form-freelo .editor-bottom-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.comment-form-freelo .toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form-freelo .toolbar-btn:hover {
    background: #e9ecef;
    color: #333;
}

.comment-form-freelo .toolbar-btn img {
    opacity: 0.6;
}

.comment-form-freelo .attachments-preview {
    padding: 0.5rem 0;
}

.comment-form-freelo .attachments-preview:empty {
    display: none;
}

.comment-form-freelo .attachments-preview .attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: #f0f4f8;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-form-freelo .attachments-preview .attachment-remove {
    cursor: pointer;
    opacity: 0.5;
}

.comment-form-freelo .attachments-preview .attachment-remove:hover {
    opacity: 1;
}

/* Upozornění dostávají */
.comment-form-freelo .notification-recipients {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-form-freelo .recipients-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.comment-form-freelo .recipients-avatars {
    display: flex;
    align-items: center;
}

.comment-form-freelo .recipient-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: -8px;
    border: 2px solid #fff;
    overflow: hidden;
}

.comment-form-freelo .recipient-avatar:first-child {
    margin-left: 0;
}

.comment-form-freelo .recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form-freelo .recipient-avatar.more {
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.7rem;
}

.comment-form-freelo .btn-add-recipient {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px dashed #dee2e6;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form-freelo .btn-add-recipient:hover {
    border-color: #6c757d;
    background: #f8f9fa;
}

.comment-form-freelo .btn-add-recipient img {
    opacity: 0.5;
}

/* Akce pod formulářem */
.comment-form-freelo .comment-actions {
    padding: 0.75rem 0;
}

.comment-form-freelo .action-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

.comment-form-freelo .action-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.comment-form-freelo .action-checkbox input[type="checkbox"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.comment-form-freelo .action-checkbox span {
    color: #6c757d;
}

.comment-form-freelo .action-checkbox input[type="checkbox"]:checked + span {
    color: #333;
    font-weight: 500;
}

/* Tlačítka */
.comment-form-freelo .comment-form-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.comment-form-freelo .comment-form-buttons .btn-success {
    background-color: #4CAF50;
    border-color: #4CAF50;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.comment-form-freelo .comment-form-buttons .btn-success:hover {
    background-color: #43A047;
    border-color: #43A047;
}

.comment-form-freelo .comment-form-buttons .btn-light {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Starý formulář - zachovat pro zpětnou kompatibilitu */
.comment-form {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.comment-form .form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.comment-form .form-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: white;
}

.comment-form .editor-wrapper {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.comment-form .editor-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form .editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.comment-form .editor-toolbar button {
    background: transparent;
    border: none;
    padding: 0.35rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form .editor-toolbar button:hover {
    background: #e5e7eb;
}

.comment-form .editor-toolbar button img {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.comment-form .submit-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form .submit-btn:hover {
    background: #43a047;
}

/* Čas badge v sidebaru */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.time-badge img {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Responsive pro task detail */
@media (max-width: 992px) {
    .task-detail-layout {
        flex-direction: column;
    }
    
    .task-detail-main {
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .task-detail-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .task-sidebar-item {
        flex-direction: column;
    }
    
    .task-sidebar-item .sidebar-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    .task-detail-header {
        padding: 1rem;
    }
    
    .task-detail-header .task-title {
        font-size: 1.1rem;
    }
    
    .task-detail-main {
        padding: 1rem;
    }
    
    .task-detail-sidebar {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .comment-item .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .attachment-image-preview {
        max-width: 100%;
    }
}
