/**
 * Frontend styles for ToDo plugin
 */

/* ToDo Create Form Styles */
.todo-create-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.todo-create-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.todo-create-form h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.todo-form-field {
    margin-bottom: 20px;
}

.todo-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.todo-form-field input,
.todo-form-field select,
.todo-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.todo-form-field input:focus,
.todo-form-field select:focus,
.todo-form-field textarea:focus {
    outline: none;
    border-color: #007cba;
}

.todo-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.todo-field-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.todo-submit-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.todo-submit-btn:hover {
    background: #005a87;
}

.todo-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ToDo List Styles */
.todo-list-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.todo-list-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.todo-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.todo-filters select {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.todo-filter-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.todo-filter-btn:hover {
    background: #005a87;
}

.todo-list-container {
    margin-bottom: 25px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.todo-item {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.todo-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.1);
}

.todo-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.todo-item-title {
    font-size: 20px;
    color: #333;
    margin: 0;
    flex: 1;
}

.todo-priority {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-priority-low {
    background: #e8f5e8;
    color: #2e7d32;
}

.todo-priority-medium {
    background: #fff3e0;
    color: #f57c00;
}

.todo-priority-high {
    background: #ffebee;
    color: #d32f2f;
}

.todo-item-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.todo-item-meta {
    margin-bottom: 20px;
}

.todo-meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.todo-meta-label {
    font-weight: 600;
    color: #555;
    min-width: 100px;
}

.todo-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.todo-status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.todo-status-in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.todo-status-completed {
    background: #dcfce7;
    color: #16a34a;
}

.todo-status-cancelled {
    background: #fef2f2;
    color: #dc2626;
}

.todo-item-actions {
    border-top: 1px solid #e1e5e9;
    padding-top: 15px;
}

.todo-status-change {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.todo-pagination {
    text-align: center;
    margin-top: 30px;
}

.todo-load-more {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.todo-load-more:hover {
    background: #005a87;
}

.todo-no-items {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Messages */
.todo-form-messages {
    margin-top: 20px;
}

.todo-success {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.todo-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Completion Summary Modal */
.todo-completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.todo-completion-modal.active {
    display: flex;
}

.todo-completion-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.todo-completion-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.todo-completion-summary-field {
    margin-bottom: 20px;
}

.todo-completion-summary-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.todo-completion-summary-field textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.todo-completion-summary-field textarea:focus {
    outline: none;
    border-color: #007cba;
}

.todo-completion-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.todo-completion-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.todo-completion-btn.complete {
    background: #16a34a;
    color: #fff;
}

.todo-completion-btn.complete:hover {
    background: #15803d;
}

.todo-completion-btn.complete:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.todo-completion-btn.cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.todo-completion-btn.cancel:hover {
    background: #e5e7eb;
}

.todo-completion-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Status Update Interface for Assigned Users */
.todo-status-update {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.todo-status-update h5 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 12px;
}

.todo-status-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.todo-status-option {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.todo-status-option:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.todo-status-option.selected {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.todo-status-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.todo-status-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.todo-status-option label {
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    font-size: 16px;
    margin: 0;
}

.todo-status-option-description {
    color: #6b7280;
    font-size: 14px;
    margin-left: 30px;
    margin-bottom: 12px;
}

.todo-reason-field {
    margin-left: 30px;
    display: none;
}

.todo-reason-field.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.todo-reason-field textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
    line-height: 1.5;
}

.todo-reason-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.todo-reason-field textarea:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.todo-reason-field textarea::placeholder {
    color: #9ca3af;
}

.todo-status-submit {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.todo-status-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-status-btn.submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.todo-status-btn.submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.todo-status-btn.submit:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.todo-status-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* Hide status dropdowns for assigned users - they'll use the new interface */
.todo-item[data-user-role="assigned"] .todo-status-change {
    display: none;
}

/* Status update interface is hidden by default, shown only for assigned users */
.todo-item[data-user-role="created"] .todo-status-update {
    display: none;
}

/* Completion Summary Styles */
.todo-completion-summary,
.todo-cancellation-reason {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.todo-cancellation-reason {
    background: #fef2f2;
    border-color: #fecaca;
}

.todo-completion-summary h5,
.todo-cancellation-reason h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-cancellation-reason h5 {
    color: #dc2626;
}

.todo-completion-summary-content,
.todo-cancellation-reason-content {
    color: #6c757d;
    line-height: 1.5;
    font-size: 14px;
}

.todo-cancellation-reason-content {
    color: #991b1b;
}

.todo-completion-summary-content p:last-child,
.todo-cancellation-reason-content p:last-child {
    margin-bottom: 0;
}

/* Admin Comments Display */
.todo-admin-comment {
    background: #e0f2fe;
    border-left: 4px solid #0ea5e9;
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
}

.todo-admin-comment h5 {
    margin: 0 0 8px 0;
    color: #0c4a6e;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-admin-comment-content {
    color: #0c4a6e;
    line-height: 1.6;
}

.todo-admin-comment-content p {
    margin: 0 0 10px 0;
}

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

/* Admin Management Widget Styles */
.todo-admin-wrapper {
    max-width: 100%;
    margin: 20px 0;
}

.todo-admin-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #1f2937;
    font-weight: 600;
}

.todo-admin-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-field {
    flex: 1;
    min-width: 150px;
}

.filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.filter-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.todo-filter-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.todo-filter-btn:hover {
    background: #2563eb;
}

.todo-clear-filters {
    color: #6b7280;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 14px;
}

.todo-clear-filters:hover {
    color: #374151;
    text-decoration: underline;
}

.todo-bulk-actions {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.bulk-action-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bulk-reason-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.bulk-reason-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.bulk-reason-actions {
    display: flex;
    gap: 10px;
}

.todo-bulk-btn,
.todo-confirm-btn,
.todo-cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.todo-bulk-btn {
    background: #6b7280;
    color: white;
}

.todo-bulk-btn:hover {
    background: #4b5563;
}

.todo-confirm-btn {
    background: #dc2626;
    color: white;
}

.todo-confirm-btn:hover {
    background: #b91c1c;
}

.todo-cancel-btn {
    background: #e5e7eb;
    color: #374151;
}

.todo-cancel-btn:hover {
    background: #d1d5db;
}

.todo-admin-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.todo-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.todo-admin-table th,
.todo-admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.todo-admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.todo-admin-table tbody tr:hover {
    background: #f9fafb;
}

.check-column {
    width: 40px;
    text-align: center;
}

.todo-task-info {
    min-width: 200px;
}

.task-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
}

.task-description {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
}

.task-meta {
    font-size: 12px;
    color: #9ca3af;
}

.assigned-user {
    font-weight: 500;
    color: #374151;
}

.status-badge,
.priority-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-in-progress { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.priority-low { background: #f3f4f6; color: #6b7280; }
.priority-medium { background: #fef3c7; color: #92400e; }
.priority-high { background: #fee2e2; color: #991b1b; }

.todo-response {
    max-width: 200px;
}

.response-content {
    font-size: 13px;
    color: #374151;
    cursor: help;
}

.no-response {
    color: #9ca3af;
    font-style: italic;
    font-size: 13px;
}

.admin-comments {
    min-width: 200px;
}

.admin-comment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-comment-input {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.save-comment-btn {
    align-self: flex-start;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-comment-btn:hover {
    background: #2563eb;
}

.todo-actions {
    white-space: nowrap;
}

.cancel-task-btn,
.delete-task-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    transition: background-color 0.2s;
}

.cancel-task-btn {
    background: #f59e0b;
    color: white;
}

.cancel-task-btn:hover {
    background: #d97706;
}

.delete-task-btn {
    background: #dc2626;
    color: white;
}

.delete-task-btn:hover {
    background: #b91c1c;
}

.no-todos {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
}

.todo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.todo-modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.todo-modal-content h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.modal-body p {
    color: #6b7280;
    margin-bottom: 12px;
}

.modal-body textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Task Detail Modal Styles */
.todo-task-detail-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.task-detail-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.task-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.task-detail-section h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span,
.detail-item div {
    color: #1f2937;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.status-management {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
}

.current-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-change {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-change select,
.status-change textarea {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.status-change textarea {
    min-height: 80px;
    resize: vertical;
}

.admin-comment-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-comment-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.current-comment {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-top: 10px;
}

.task-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-entry {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.history-entry:last-child {
    margin-bottom: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6b7280;
}

.history-date {
    font-weight: 500;
}

.history-user {
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.history-content {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.task-responses {
    max-height: 300px;
    overflow-y: auto;
}

.response-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.response-item:last-child {
    margin-bottom: 0;
}

.response-completion {
    border-left: 4px solid #10b981;
}

.response-cancellation {
    border-left: 4px solid #ef4444;
}

.response-item h5 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.response-content {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 8px;
}

.response-date {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.no-history,
.no-responses {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
}

.task-detail-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .todo-create-form,
    .todo-list-wrapper {
        margin: 0 15px;
    }
    
    .todo-create-form {
        padding: 20px;
    }
    
    .todo-item {
        padding: 20px;
    }
    
    .todo-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .todo-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .todo-filters select {
        min-width: auto;
    }
    
    .todo-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .todo-meta-label {
        min-width: auto;
    }
}

/* Multi-user assignment styles */
.todo-multi-user-assignment {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-user-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.todo-user-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.todo-user-checkbox:hover {
    background: rgba(59, 130, 246, 0.1);
}

.todo-user-checkbox-input {
    margin: 0;
    cursor: pointer;
}

.todo-user-checkbox-label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #333;
    flex: 1;
}

.todo-user-checkbox-input:checked + .todo-user-checkbox-label {
    color: #3b82f6;
    font-weight: 500;
}

.todo-primary-assignee {
    padding: 15px;
    background: #e3f2fd;
    border-radius: 4px;
    border-left: 4px solid #2196f3;
}

.todo-primary-assignee label {
    font-weight: 500;
    color: #1976d2;
}

.todo-primary-assignee select {
    margin-top: 5px;
    width: 100%;
}

.todo-primary-assignee .todo-help-text {
    color: #1976d2;
    font-style: italic;
    display: block;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Multi-user display in task lists */
.todo-assigned-users {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.todo-assigned-user {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.todo-assigned-user.primary {
    background: #3b82f6;
    color: white;
}

.todo-assigned-user.primary::before {
    content: "★";
    font-size: 0.8em;
}
