* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --success-color: #16a34a;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Header */
header {
    background-color: var(--card-bg);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .header-left,
header .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
}

.usuario-nombre {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
}

/* Main Content */
.main-content {
    display: flex;
    height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar.colapsado {
    width: 80px;
    padding: 1rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sidebar.colapsado .sidebar-header {
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.colapsado h2 {
    font-size: 0;
}

.btn-volver-proyectos {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-volver-proyectos:hover {
    background-color: var(--bg-color);
}

.sidebar.colapsado .btn-volver-proyectos {
    font-size: 1.5rem;
    padding: 0.75rem;
}

.sidebar.colapsado .btn-volver-proyectos .texto {
    display: none;
}

.btn-volver-proyectos .icono {
    display: none;
}

.sidebar.colapsado .btn-volver-proyectos .icono {
    display: inline;
}

.btn-cambiar-proyecto {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-cambiar-proyecto:hover {
    background-color: var(--primary-hover);
}

.sidebar.colapsado .btn-cambiar-proyecto {
    padding: 0.75rem;
    font-size: 1.5rem;
}

.sidebar.colapsado .btn-cambiar-proyecto .texto {
    display: none;
}

.proyectos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.proyecto-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.proyecto-item:hover {
    background-color: #f3f4f6;
    border-color: var(--primary-color);
}

.proyecto-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sidebar.colapsado .proyecto-item {
    flex-direction: column;
    padding: 0.5rem;
    justify-content: center;
}

.proyecto-icono {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar.colapsado .proyecto-icono {
    font-size: 2rem;
}

.proyecto-info {
    flex: 1;
    min-width: 0;
}

.sidebar.colapsado .proyecto-info {
    display: none;
}

.proyecto-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.proyecto-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proyecto-item.active p {
    color: rgba(255, 255, 255, 0.8);
}

/* Content */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.vista-inicial {
    text-align: center;
    padding: 4rem 2rem;
}

.vista-inicial h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.vista-inicial p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Proyecto View */
.proyecto-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.proyecto-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.proyecto-icono-grande {
    font-size: 3rem;
    line-height: 1;
}

.proyecto-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.descripcion {
    color: var(--text-secondary);
    font-size: 1rem;
}

.proyecto-acciones {
    display: flex;
    gap: 0.5rem;
}

.proyecto-notas {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.proyecto-notas h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.proyecto-notas p {
    white-space: pre-wrap;
    color: var(--text-secondary);
}

/* Casos Section */
.casos-section {
    margin-top: 2rem;
}

.casos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.casos-header h3 {
    font-size: 1.5rem;
}

.casos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.caso-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
}

.caso-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.caso-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.caso-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.caso-estado {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.caso-estado.pendiente {
    background-color: #fef3c7;
    color: #92400e;
}

.caso-estado.en_progreso {
    background-color: #dbeafe;
    color: #1e40af;
}

.caso-estado.completado {
    background-color: #d1fae5;
    color: #065f46;
}

.caso-estado.cancelado {
    background-color: #fee2e2;
    color: #991b1b;
}

.caso-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.caso-emojis {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.caso-tareas {
    margin-top: 1rem;
}

.caso-tareas-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.caso-usuarios {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    display: inline-block;
}

.caso-adjuntos-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 1000px;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: var(--text-primary);
}

.modal h2 {
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Select de emoji en casos */
#emojiCaso {
    font-size: 1.5rem;
    padding: 0.75rem;
    width: 200px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* Emoji Selector */
.emoji-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.emoji-selector input {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
    padding: 0.5rem;
}

.emoji-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.emoji-btn {
    padding: 0.5rem;
    font-size: 1.5rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.emoji-btn:hover {
    background-color: #e5e7eb;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Tareas */
.tareas-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tarea-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.tarea-item input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
}

.tarea-contenido {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tarea-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tarea-emoji {
    width: 50px;
    text-align: center;
    font-size: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.25rem;
    background-color: white;
}

.tarea-emoji:focus {
    outline: 1px solid var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.tarea-texto {
    flex: 1;
    width: 100%;
    border: 1px solid var(--border-color);
    background: white;
    padding: 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
}

.tarea-texto:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.tarea-usuario {
    flex: 1;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: white;
    color: var(--text-secondary);
}

.tarea-usuario:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.tarea-fecha {
    width: auto;
    max-width: 200px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: white;
    color: var(--text-secondary);
}

.tarea-fecha:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.tarea-horas {
    width: 70px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: white;
    color: var(--text-secondary);
    text-align: center;
}

.tarea-horas:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.tarea-item button {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
    flex-shrink: 0;
}

.tarea-item button:hover {
    color: var(--danger-hover);
}

.tarea-item.completada .tarea-texto {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.tarea-item.completada .tarea-fecha {
    opacity: 0.6;
}

/* Estilos para fechas límite */
.tarea-item.fecha-vencida {
    border-left: 4px solid #dc2626;
    background-color: #fef2f2;
}

.tarea-item.fecha-vencida .tarea-fecha {
    color: #dc2626;
    font-weight: 500;
}

.tarea-item.fecha-hoy {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.tarea-item.fecha-hoy .tarea-fecha {
    color: #f59e0b;
    font-weight: 500;
}

.tarea-item.fecha-proxima {
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
}

.tarea-item.fecha-proxima .tarea-fecha {
    color: #3b82f6;
    font-weight: 500;
}

/* No aplicar estilos de fecha si está completada */
.tarea-item.completada.fecha-vencida,
.tarea-item.completada.fecha-hoy,
.tarea-item.completada.fecha-proxima {
    border-left: 4px solid #16a34a;
    background-color: #f0fdf4;
}

/* Adjuntos */
.adjuntos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.adjunto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.adjunto-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.adjunto-nombre {
    font-weight: 500;
    font-size: 0.875rem;
}

.adjunto-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.adjunto-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-adjunto-download {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.btn-adjunto-download:hover {
    background-color: var(--primary-hover);
}

.btn-adjunto-delete {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-adjunto-delete:hover {
    color: var(--danger-hover);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
    }

    .casos-list {
        grid-template-columns: 1fr;
    }

    .proyecto-header {
        flex-direction: column;
        gap: 1rem;
    }

    .proyecto-acciones {
        width: 100%;
    }
}

/* Configuration Tabs */
.config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.config-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.config-tab:hover {
    color: var(--text-primary);
}

.config-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.config-tab-content {
    display: none;
}

.config-tab-content.active {
    display: block;
}

.tab-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Emojis List Config */
.emojis-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.emoji-item {
    position: relative;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-align: center;
    font-size: 2rem;
    transition: all 0.2s;
}

.emoji-item:hover {
    background-color: #f3f4f6;
}

.emoji-item .emoji-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: var(--danger-color);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.emoji-item:hover .emoji-delete {
    opacity: 1;
}

/* Usuarios List Config */
.usuarios-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.usuario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.usuario-item:hover {
    background-color: #f3f4f6;
}

.usuario-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.usuario-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.usuario-acciones {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: var(--border-color);
}

.btn-icon.delete:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* ========== CASOS OLVIDADOS ========== */

.caso-card.caso-olvidado {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.caso-olvidado-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ========== VISTA DE TAREAS GLOBALES ========== */

.vista-tareas {
    padding: 2rem;
    width: 100%;
    overflow-y: auto;
}

.tareas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tareas-header h2 {
    font-size: 1.875rem;
    margin: 0;
}

.tareas-filtros {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filtros-grupo {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.filtros-grupo label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

.filtros-grupo label.filtro-urgente {
    color: #dc2626;
    font-weight: 600;
}

.filtros-grupo input[type="checkbox"] {
    cursor: pointer;
}

.filtros-grupo select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 200px;
}

.tareas-global-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarea-global-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tarea-global-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tarea-global-card.completada {
    opacity: 0.7;
    background-color: #f3f4f6;
}

.tarea-global-card.fecha-vencida {
    border-left: 4px solid var(--danger-color);
}

.tarea-global-card.fecha-hoy {
    border-left: 4px solid #f59e0b;
}

.tarea-global-card.fecha-proxima {
    border-left: 4px solid #eab308;
}

.tarea-global-card.tarea-global-urgente {
    border-left: 4px solid #dc2626;
    background-color: #fef2f2;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.1);
}

.tarea-global-card.tarea-global-urgente:hover {
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.tarea-global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tarea-global-proyecto {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tarea-global-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-facil {
    background-color: #dcfce7;
    color: #166534;
}

.badge-completa {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-urgente {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.tarea-global-contenido {
    margin-bottom: 0.75rem;
}

.tarea-global-contenido p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.tarea-global-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tarea-fecha-badge,
.tarea-horas-badge,
.tarea-usuario-badge {
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-color);
    border-radius: 0.25rem;
}

/* Checkbox para marcar tareas como fáciles */
.tarea-facil-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.tarea-facil {
    cursor: pointer;
}

/* Checkbox para marcar tareas como urgentes (YA) */
.tarea-urgente-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tarea-urgente-check {
    cursor: pointer;
}

/* Tareas urgentes en el modal de caso */
.tarea-item.tarea-urgente {
    border-left: 4px solid #dc2626;
    background-color: #fef2f2;
}

/* ========== MODAL DETALLE DE TAREA ========== */

.detalle-seccion {
    margin-bottom: 1.5rem;
}

.detalle-seccion h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.detalle-texto {
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.detalle-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
}

.detalle-info-grid div {
    font-size: 0.875rem;
}

.detalle-info-grid strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.proyecto-caso-info {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: 0.375rem;
}

.proyecto-caso-info div {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.proyecto-caso-info strong {
    color: var(--text-secondary);
    font-weight: 500;
}
