/* Variables CSS para tema oscuro */
:root {
    --bg-primary: #181c24;
    --bg-secondary: #232a36;
    --bg-card: #232a36;
    --text-primary: #f5f6fa;
    --text-secondary: #b0b8c1;
    --accent-color: #4f8cff;
    --accent-hover: #2563eb;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --border-color: #2c3440;
    --shadow: 0 6px 24px rgba(0,0,0,0.25);
    --shadow-hover: 0 10px 32px rgba(0,0,0,0.35);
    --radius: 14px;
    --transition: 0.25s cubic-bezier(.4,0,.2,1);
    --font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: #181818;
    color: var(--text-primary);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    min-height: 100vh;
    display: flex;
}

/* Ocultar mobile-hamburger por defecto (solo visible en mÃ³viles) */
.mobile-hamburger {
    display: none;
}

/* Sidebar */
.sidebar {
    width: 17vw;
    min-width: 5%;
    max-width: 350px;
    background: linear-gradient(180deg, #252525 0%, #1e1e1e 100%);
    padding: 1.5rem 1rem 1rem 1rem;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: auto;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 60px;
    min-width: 60px;
    padding: 1.5rem 0.5rem 1rem 0.5rem;
}

.sidebar-header {
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 1px;
}

.sidebar-header-text {
    opacity: 1;
    transform: scale(1);
    width: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header-icon {
    opacity: 1;
    transform: scale(1);
    width: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-header {
    opacity: 1;
    transform: scale(1);
    height: auto;
    margin-bottom: 2.5rem;
    justify-content: center;
    gap: 0rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-header-text {
    opacity: 0;
    transform: scale(0.8);
    width: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-header-icon {
    opacity: 0;
    transform: scale(0.8);
    width: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-toggle-btn {
    opacity: 1;
    transform: scale(1);
    width: 32px;
    height: 32px;
    visibility: visible;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 0.5rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 500;
    gap: 0.7rem;
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    transform: translateX(0) scale(1);
}

.sidebar-menu-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.sidebar-menu-link:hover,
.sidebar-menu-link.sidebar-menu-hover {
    color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(79,140,255,0.15);
    background: rgba(79,140,255,0.05);
    border-radius: 8px;
}

.sidebar-menu-link.sidebar-menu-active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    box-shadow: 0 4px 15px rgba(79,140,255,0.3);
    border-radius: 8px;
    transform: translateY(-2px);
}

.sidebar-menu-icon {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-menu-link:hover .sidebar-menu-icon,
.sidebar-menu-link.sidebar-menu-active .sidebar-menu-icon {
    transform: scale(1.05);
}

.sidebar.collapsed .sidebar-menu-text {
    display: none;
}

.sidebar.collapsed .sidebar-menu-link {
    justify-content: center;
    padding: 0.8rem 0.3rem;
}

.sidebar.collapsed .sidebar-menu-link.sidebar-menu-active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    box-shadow: 0 2px 8px rgba(79,140,255,0.3);
    border-radius: 8px;
    transform: translateY(-1px);
}

.sidebar.collapsed .sidebar-menu-link:hover,
.sidebar.collapsed .sidebar-menu-link.sidebar-menu-hover {
    background: rgba(79,140,255,0.1);
    border-radius: 8px;
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 80%;
    max-width: 100vw;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

/* Ajustar main-content cuando sidebar estÃ¡ colapsado */
.sidebar.collapsed ~ .main-content {
    margin-left: 0%;
}

/* Sidebar Toggle - Eliminado, usando solo hamburger */

/* BotÃ³n toggle del sidebar */
.sidebar-toggle-btn {
    display: flex;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(79,140,255,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(79,140,255,0.4);
}

/* Container */
.container {
    background: #181818;
    padding: 0.2rem 1rem;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.7s cubic-bezier(.4,0,.2,1);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0rem;
    gap: 1rem;
}

.page-header h2 {
    margin-bottom: 0;
    flex-shrink: 0;
}

.page-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

/* Estilos para el botÃ³n del carousel minimizado */
.btn-carousel-minimizado {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    margin-top: 23px;
    margin-left: 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    float: left;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
}

.btn-carousel-minimizado:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-carousel-minimizado i {
    color: #ff6b6b;
    font-size: 1rem;
}

.btn-carousel-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.container h2 {
    color: var(--accent-color);
    margin-bottom: 1.7rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 22px;
    float: left;
}

/* Botones */
.btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.7rem;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(79,140,255,0.08);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-hover);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #219150;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    font-size: 1.01rem;
    box-shadow: 0 2px 8px rgba(44,52,64,0.08);
}

th, td {
    padding: 1.1rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--accent-color);
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

tr:hover {
    background: #232a36cc;
}

/* Responsive tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Prioridades */
.prioridad-alta {
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.prioridad-media {
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.prioridad-baja {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(24,28,36,0.85);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s;
}

.modal-content {
    background: var(--bg-card);
    padding: 2.2rem 2rem 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 340px;
    max-width: 95vw;
    position: relative;
    animation: fadeIn 0.5s;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.close {
    color: var(--danger-color);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition);
}

.close:hover {
    color: #fff;
}

/* Formularios */
form {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1.01rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: #232a36;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    box-shadow: 0 1px 4px rgba(44,52,64,0.05);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px #4f8cff33;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

/* Grid de tareas */
.tareas-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    min-width: calc(2 * 300px + 3rem); /* Siempre requiere al menos 2 columnas para scroll */
    cursor: grab;
    transition: cursor 0.2s ease;
}

.tareas-grid.dragging {
    cursor: grabbing !important;
    scroll-behavior: auto;
}

.tareas-grid.dragging * {
    pointer-events: none;
    user-select: none;
}

.tareas-grid.dragging .tarea-card {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.tarea-col {
    min-width: 300px;
    border-radius: 8px;
    padding: 7px;
    position: relative;
}

.tarea-col h4 {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--accent-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79,140,255,0.2);
    position: sticky;
    top: 0;
    z-index: 5;
}

.tarea-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tarea-card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0.2rem 0.5rem 0rem 0.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    transition: box-shadow 0.2s, border-left 0.2s;
    border: 1px solid #e0e0e0;
    border-left-width: 8px;
    background: #1f1f1f;
    color: var(--text-primary);
}
.tarea-card.prioridad-alta {
  border-left: 3px solid #ff4d4f;
}
.tarea-card.prioridad-media {
  border-left: 3px solid #ffa940;
}
.tarea-card.prioridad-baja {
  border-left: 3px solid #52c41a;
}
.tarea-card strong {
  font-size: 1.15rem;
  color: #222;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  display: block;
  max-width: 100%;
}
.tarea-card .acciones {
  margin-top: 0.5rem;
  align-self: flex-end;
}

.tarea-card p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.tarea-card strong {
    color: var(--accent-color);
}

.tarea-precio {
  color: #ff9800;
  font-weight: 600;
  font-size: 1.04em;
  letter-spacing: 0.5px;
}
.tarea-fecha {
  color: #2196f3;
  font-weight: 600;
  font-size: 1.04em;
  letter-spacing: 0.5px;
}

.acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.acciones .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.tarea-card .menu-acciones-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #555;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}
.tarea-card .menu-acciones-dropdown {
    display: none;
    position: absolute;
    top: 36px;
    right: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(60,60,60,0.18), 0 1.5px 4px rgba(0,0,0,0.08);
    min-width: 180px;
    z-index: 10;
    padding: 0.5em 0;
    animation: fadeInMenu 0.18s;
}
.tarea-card .menu-acciones-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 18px;
    border-width: 0 8px 10px 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(0 -1px 1px #e0e0e0);
}
.tarea-card .menu-acciones-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.7em;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.85em 1.3em;
    font-size: 1.07em;
    color: #222;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    border-radius: 6px;
    margin: 0 0.4em;
    margin-bottom: 0.15em;
}
.tarea-card .menu-acciones-dropdown button:last-child {
    margin-bottom: 0;
}
.tarea-card .menu-acciones-dropdown button:hover {
    background: #f3f7fa;
    color: #1976d2;
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* NavegaciÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â³n */
.nav-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* View Toggle Button */
.view-toggle-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius);
    padding: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.view-toggle-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(79,140,255,0.15);
    transform: translateY(-1px);
}

.view-toggle-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 16px rgba(79,140,255,0.25);
}

.view-toggle-btn i {
    font-size: 1.2rem;
    transition: all var(--transition);
}

.view-toggle-btn.active i {
    transform: scale(1.1);
}

.nav-info {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Efectos especiales */
.hoy-efecto {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4) !important;
    animation: pulse 2s infinite;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.hoy-efecto .tarea-count {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    }
}

/* EstadÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â­sticas */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat h3 {
    margin: 0 0 0.5rem 0;
    color: var(--accent-color);
}

.stat p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar { 
        width: 60px; 
        min-width: 60px; 
        background: linear-gradient(180deg, #252525 0%, #1e1e1e 100%);
        position: fixed;
        z-index: 1000;
    }
    .main-content { 
        margin-left: 60px; 
        width: calc(100vw - 60px); 
        padding: 1.2rem 0.5rem; 
    }
    
    /* BotÃ³n toggle visible en tablets */
    .sidebar-toggle-btn {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
    }
    
    /* Tareas en vertical para tablets */
    .tareas-grid {
        display: block !important;
        overflow-x: visible !important;
        min-width: 0 !important;
    }
    .tareas-grid .tarea-col {
        min-width: 0 !important;
        width: 100%;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar { 
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        background: linear-gradient(180deg, #252525 0%, #1e1e1e 100%);
        backdrop-filter: blur(15px);
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 10000;
        transform: translateX(-100%);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        padding: 1rem 0.5rem;
    }
    
    .sidebar.active { 
        transform: translateX(0);
    }
    
    .main-content { 
        margin-left: 0; 
        width: 100vw; 
        padding: 1rem 0.2rem;
        padding-top: 5rem; /* Espacio para el botÃ³n hamburger fijo */
    }
    
    .hamburger { 
        animation: fadeIn 0.3s ease;
    }
    .container { padding: 1.2rem 0.5rem; }
    
    /* Responsive para page-header */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .page-header h2 {
        text-align: center;
        font-size: 1.3rem;
    }
    
    .page-header-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .page-header-title-section {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .btn-carousel-minimizado {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .search-container {
        min-width: 200px;
        max-width: none;
        flex: 1;
    }
    
    .search-input {
        padding: 0.75rem 1rem 0.75rem 2.8rem;
        font-size: 0.95rem;
    }
    
    .search-icon {
        left: 0.8rem;
        font-size: 1rem;
    }
    
    /* Tareas en vertical para mÃ³viles */
    .tareas-grid {
        display: block !important;
        overflow-x: visible !important;
        min-width: 0 !important;
    }
    
    .tareas-grid .tarea-col {
        min-width: 0 !important;
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .tarea-card {
        margin-bottom: 1rem;
        padding: 1.2rem;
    }
    
    /* Mejorar botones en mÃ³viles */
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .view-toggle-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Mejorar experiencia tÃ¡ctil en mÃ³viles */
    .tarea-card {
        touch-action: pan-y;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tarea-card .menu-acciones-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.8rem;
    }
    
    .tarea-card .menu-acciones-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        z-index: 10000;
    }
    
    /* Contador de tareas en mÃ³viles */
    .tarea-col h4 {
        font-size: 0.9rem;
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .tarea-count {
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 0.7rem;
    }
    
    /* Mejorar botones en mÃ³viles */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Mejorar scroll en mÃ³viles */
    .tareas-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* BotÃ³n hamburger en la cabecera para mÃ³viles */
    .mobile-hamburger {
        display: flex;
        width: 40px;
        height: 40px;
        padding: 0.6rem;
        font-size: 1rem;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 10001;
        background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: 0 3px 10px rgba(79,140,255,0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        align-items: center;
        justify-content: center;
    }
    
    .mobile-hamburger:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(79,140,255,0.4);
    }
    
    /* Ocultar botÃ³n toggle interno en mÃ³viles */
    .sidebar-toggle-btn {
        display: none;
    }
    
    /* Mejorar sidebar en mÃ³viles */
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-menu-link {
        min-height: 48px;
        padding: 0.8rem 1rem;
        justify-content: flex-start;
        align-items: center;
        gap: 0.8rem;
        text-align: left;
    }
    
    .sidebar.active .sidebar-menu-link {
        justify-content: flex-start;
        text-align: left;
    }
    
    /* Ocultar texto en sidebar colapsado mÃ³vil */
    .sidebar .sidebar-menu-text {
        display: none;
        opacity: 0;
        width: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar.active .sidebar-menu-text {
        display: block;
        opacity: 1;
        width: auto;
        transition: all 0.3s ease;
    }
    
    /* Ocultar header text en sidebar colapsado mÃ³vil */
    .sidebar .sidebar-header-text {
        display: none;
        opacity: 0;
        width: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar.active .sidebar-header-text {
        display: block;
        opacity: 1;
        width: auto;
        transition: all 0.3s ease;
    }
    
    /* Ocultar header icon en sidebar colapsado mÃ³vil */
    .sidebar .sidebar-header-icon {
        display: none;
        opacity: 0;
        width: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar.active .sidebar-header-icon {
        display: block;
        opacity: 1;
        width: auto;
        transition: all 0.3s ease;
    }
    
    /* Ajustar header en mÃ³vil */
    .sidebar .sidebar-header {
        justify-content: center;
        gap: 0;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .sidebar.active .sidebar-header {
        justify-content: center;
        gap: 0.5rem;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 8px; background: #232a36; }
::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* Overlay del sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* Efecto ripple para botones */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

/* AnimaciÃ³n ripple */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* BotÃ³n toggle con overflow para ripple */
.sidebar-toggle-btn {
    position: relative;
    overflow: hidden;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.9em;
    border-radius: 1em;
    font-size: 0.95em;
    font-weight: 600;
    color: #fff;
    margin-right: 0.3em;
    vertical-align: middle;
    letter-spacing: 0.02em;
}
.badge-alta { background: #e74c3c; }
.badge-media { background: #f39c12; }
.badge-baja { background: #27ae60; }
.badge-success { background: #27ae60; }
.badge-warning { background: #f39c12; }

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 7px;
    margin-bottom: 1.2rem;
    font-size: 1.01rem;
    font-weight: 500;
    background: #232a36;
    color: var(--accent-color);
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(44,52,64,0.08);
}
.alert-info { border-left-color: var(--accent-color); }
.alert-danger { border-left-color: var(--danger-color); color: var(--danger-color); }

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-secondary);
    margin: 2.5rem 0;
}
.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}
.empty-state h3 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Search input */
.search-container {
    position: relative;
    margin-bottom: 0;
    min-width: 280px;
    max-width: 400px;
    margin-top: 20px;
}

.search-input {
    width: 100%;
    padding: 10px 5px 10px 45px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(79,140,255,0.15);
    background: var(--bg-card);
}

.search-input:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 12px rgba(79,140,255,0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 36%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color var(--transition);
    z-index: 2;
}

.search-container:focus-within .search-icon {
    color: var(--accent-hover);
}

#tableResponsiveTareas.horizontal {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.tareas-grid.vertical {
    display: block !important;
    overflow-x: visible !important;
    min-width: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tareas-grid.vertical .tarea-col {
    min-width: 0 !important;
    width: 100%;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.tareas-grid.horizontal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tarea-card[draggable="true"] {
    cursor: grab;
    transition: box-shadow 0.25s, transform 0.25s, opacity 0.25s, border 0.25s;
}
.tarea-card.drag-over {
    outline: none;
    box-shadow: 0 0 0 4px #2196f3cc, 0 8px 32px 0 #2196f344;
    border: 2.5px dashed #2196f3;
    background: linear-gradient(90deg, #e3f2fd 80%, #ffffff 100%);
    z-index: 10;
    position: relative;
    transform: scale(1.04) rotate(-2deg);
    opacity: 0.97;
    animation: dragOverPulse 0.5s infinite alternate;
}
.tarea-card.dragging {
    z-index: 20;
    box-shadow: 0 12px 32px 0 #1976d2cc, 0 2px 8px #1976d244;
    transform: scale(1.07) rotate(2deg);
    border: 2.5px solid #1976d2;
    transition: box-shadow 0.18s, transform 0.18s, opacity 0.18s, border 0.18s;
}
@keyframes dragOverPulse {
    from { box-shadow: 0 0 0 4px #2196f3cc, 0 8px 32px 0 #2196f344; }
    to   { box-shadow: 0 0 0 8px #90caf9cc, 0 12px 40px 0 #2196f344; }
}

.tarea-card.drag-over.prioridad-alta {
    border: 2.5px dashed #e74c3c;
    box-shadow: 0 0 0 6px #e74c3c55, 0 8px 32px 0 #e74c3c33;
    animation: dragOverPulseAlta 0.5s infinite alternate;
}
.tarea-card.drag-over.prioridad-media {
    border: 2.5px dashed #f39c12;
    box-shadow: 0 0 0 6px #f39c1255, 0 8px 32px 0 #f39c1233;
    animation: dragOverPulseMedia 0.5s infinite alternate;
}
.tarea-card.drag-over.prioridad-baja {
    border: 2.5px dashed #27ae60;
    box-shadow: 0 0 0 6px #27ae6055, 0 8px 32px 0 #27ae6033;
    animation: dragOverPulseBaja 0.5s infinite alternate;
}
@keyframes dragOverPulseAlta {
    from { box-shadow: 0 0 0 6px #e74c3c55, 0 8px 32px 0 #e74c3c33; }
    to   { box-shadow: 0 0 0 12px #e74c3c99, 0 12px 40px 0 #e74c3c44; }
}
@keyframes dragOverPulseMedia {
    from { box-shadow: 0 0 0 6px #f39c1255, 0 8px 32px 0 #f39c1233; }
    to   { box-shadow: 0 0 0 12px #f39c1299, 0 12px 40px 0 #f39c1244; }
}
@keyframes dragOverPulseBaja {
    from { box-shadow: 0 0 0 6px #27ae6055, 0 8px 32px 0 #27ae6033; }
    to   { box-shadow: 0 0 0 12px #27ae6099, 0 12px 40px 0 #27ae6044; }
}

.tarea-card .btn-float-play {
  display: none;
  position: absolute;
  bottom: -5%;
  left: 93%;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 34px !important;
  max-height: 34px !important;
  font-size: 1.2em;
  box-shadow: 0 2px 8px rgba(33,150,243,0.13);
  cursor: pointer;
  z-index: 3;
  transition: background 0.18s, transform 0.18s;
  padding: 0;
  line-height: 34px;
}
.tarea-card .btn-float-play:hover {
  background: #1769aa;
  transform: scale(1.08);
}
.tarea-card:hover .btn-float-play {
  display: block;
} 

/* Estilos para badges de admin y usuario */
.admin-badge, .user-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-badge {
    background: #27ae60;
}

.admin-link {
    border-left: 3px solid #e74c3c !important;
}

.user-mode-link {
    border-left: 3px solid #27ae60 !important;
}

.admin-link:hover {
    background: rgba(231, 76, 60, 0.1) !important;
    border-left-color: #e74c3c !important;
}

.user-mode-link:hover {
    background: rgba(39, 174, 96, 0.1) !important;
    border-left-color: #27ae60 !important;
}

/* Separador en sidebar */
.sidebar-menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
    opacity: 0.5;
}

/* Indicador visual cuando admin estÃ¡ en modo usuario */
.admin-mode-indicator {
    position: fixed;
    top: 10px;
    right: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-mode-indicator i {
    font-size: 0.9rem;
}

/* Estilos especÃ­ficos para el sidebar de administraciÃ³n */
.admin-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    border-right: 1px solid #34495e;
}

.admin-sidebar .sidebar-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .sidebar-header-icon {
    color: #f39c12;
}

.admin-sidebar .sidebar-menu-link {
    color: #ecf0f1;
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3498db;
}

.admin-sidebar .sidebar-menu-active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
    color: #3498db;
}

.admin-sidebar .sidebar-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.admin-sidebar .sidebar-menu-icon {
    color: #bdc3c7;
}

.admin-sidebar .sidebar-menu-active .sidebar-menu-icon {
    color: #3498db;
} 

.modal-message-content {
    background: #fff;
    border: 2.5px solid #e0e0e0;
    box-shadow: 0 8px 32px rgba(60,60,60,0.18), 0 2px 8px rgba(0,0,0,0.10);
    border-radius: 18px;
    max-width: 92vw;
    min-width: 280px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em 1.5em 1.5em 1.5em;
    z-index: 10002;
    position: relative;
    animation: modalFadeIn 0.35s cubic-bezier(.4,1.4,.6,1) both;
}
.modal-message-content.success {
    border-color: #43a047;
    box-shadow: 0 8px 32px rgba(67,160,71,0.18), 0 2px 8px rgba(67,160,71,0.10);
}
.modal-message-content.error {
    border-color: #e53935;
    box-shadow: 0 8px 32px rgba(229,57,53,0.18), 0 2px 8px rgba(229,57,53,0.10);
}
.modal-message-content.info {
    border-color: #1976d2;
    box-shadow: 0 8px 32px rgba(25,118,210,0.18), 0 2px 8px rgba(25,118,210,0.10);
}
.modal-message-content.warning {
    border-color: #ffa000;
    box-shadow: 0 8px 32px rgba(255,160,0,0.18), 0 2px 8px rgba(255,160,0,0.10);
}
.modal-message-icon {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-message-content.success .modal-message-icon { color: #43a047; }
.modal-message-content.error .modal-message-icon { color: #e53935; }
.modal-message-content.info .modal-message-icon { color: #1976d2; }
.modal-message-content.warning .modal-message-icon { color: #ffa000; }
.modal-message-content p {
    font-size: 1.18em;
    font-weight: 500;
    text-align: center;
    margin: 0.5em 0 0.2em 0;
    color: #222;
}
.modal-message-content .close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.5em;
    color: #bdbdbd;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}
.modal-message-content .close:hover {
    color: #222;
}
@media (max-width: 600px) {
    .modal-message-content {
        min-width: 90vw;
        font-size: 1.05em;
        padding: 1.2em 0.5em 1em 0.5em;
    }
    .modal-message-content .close {
        top: 8px;
        right: 10px;
    }
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
} 

/* --- DRAG & DROP LIMPIO Y SIN EFECTOS --- */
.drop-indicator {
    pointer-events: none;
    height: 32px;
    margin: 8px 0;
    background: #e0e0e0;
    opacity: 1;
    border-radius: 6px;
    border: 2px dashed #bdbdbd;
    display: block;
}
.tarea-card[draggable="true"] {
    /* Sin efectos visuales extra */
}

/* Tooltips para botones de acciÃ³n */
.link-action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #232a36;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    opacity: 1;
    pointer-events: none;
    z-index: 10;
}
.link-action-btn[title]::after {
    opacity: 0;
    transition: opacity 0.2s;
} 

/* Mejoras visuales para el modal de agregar pÃ¡gina favorita */
#modalPagina .modal-content {
    max-width: 480px;
    min-width: 320px;
    width: 96vw;
    padding: 2.2rem 2rem 1.5rem 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(79,140,255,0.18), 0 2px 8px rgba(0,0,0,0.10);
    background: var(--bg-card);
    margin: 0 auto;
}
#modalPagina .modal-header {
    margin-bottom: 1.5rem;
}
#modalPagina .form-group {
    margin-bottom: 1.2rem;
}
#modalPagina label {
    font-size: 1.05rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
#modalPagina input,
#modalPagina select,
#modalPagina textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(44,52,64,0.05);
}
#modalPagina input:focus,
#modalPagina select:focus,
#modalPagina textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px #4f8cff33;
}
#modalPagina .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.2rem;
}
@media (max-width: 600px) {
    #modalPagina .modal-content {
        max-width: 99vw;
        min-width: 0;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
} 

/* Mejoras visuales para el modal de agregar categorÃ­a */
#modalCategoria .modal-content {
    max-width: 480px;
    min-width: 320px;
    width: 96vw;
    padding: 2.2rem 2rem 1.5rem 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(79,140,255,0.18), 0 2px 8px rgba(0,0,0,0.10);
    background: var(--bg-card);
    margin: 0 auto;
}
#modalCategoria .modal-header {
    margin-bottom: 1.5rem;
}
#modalCategoria .form-group {
    margin-bottom: 1.2rem;
}
#modalCategoria label {
    font-size: 1.05rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
#modalCategoria input,
#modalCategoria select,
#modalCategoria textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(44,52,64,0.05);
}
#modalCategoria input:focus,
#modalCategoria select:focus,
#modalCategoria textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px #4f8cff33;
}
#modalCategoria .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.2rem;
}
@media (max-width: 600px) {
    #modalCategoria .modal-content {
        max-width: 99vw;
        min-width: 0;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
} 

#modalInsertTarea .modal-content {
    max-width: 800px !important;
    width: 100% !important;
} 
  /* Animaciones para AJAX */
  @keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Estilos para botones deshabilitados */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner para botones de carga */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* Mejora de visibilidad para el modal de mensaje */
.modal-message-content {
background: linear-gradient(135deg, #fff 60%, #e3f2fd 100%);
border: 3px solid #1976d2;
box-shadow: 0 8px 32px rgba(25,118,210,0.18), 0 2px 8px rgba(0,0,0,0.12);
border-radius: 18px;
max-width: 90vw;
min-width: 320px;
min-height: 120px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2em 1.5em;
z-index: 10002;
}
@media (max-width: 600px) {
.modal-message-content {
    min-width: 80vw;
    font-size: 1.1em;
    padding: 1.2em 0.5em;
}
}
canvas.confetti-canvas {
z-index: 11000 !important;
pointer-events: none;
position: fixed !important;
}
body > canvas {
z-index: 11000 !important;
pointer-events: none;
position: fixed !important;
}
@media (max-width: 900px) {
.btn-fab {
    display: flex !important;
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 12000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1976d2;
    color: #fff;
    box-shadow: 0 4px 16px rgba(25,118,210,0.18), 0 2px 8px rgba(0,0,0,0.12);
    align-items: center;
    justify-content: center;
    font-size: 2em;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-fab:hover {
    background: #1565c0;
}
#btnNuevaTarea {
    display: none !important;
}
}
/* Modal Nueva Tarea: diseÃ±o compacto y filas personalizadas */
#modalInsertTarea .modal-content {
max-width: 800px;
min-width: 320px;
}
#modalInsertTarea .form-row {
display: flex;
gap: 1.2rem;
align-items: flex-end;
margin-bottom: 0.7rem;
flex-wrap: wrap;
}
#modalInsertTarea .form-row .form-group {
flex: 1 1 0;
margin-bottom: 0;
min-width: 120px;
}
#modalInsertTarea .form-group {
margin-bottom: 0.7rem;
display: flex;
flex-direction: column;
}
#modalInsertTarea label {
margin-bottom: 0.2rem;
font-weight: 500;
}
#modalInsertTarea .form-actions {
margin-top: 1.1rem;
display: flex;
gap: 1rem;
justify-content: flex-end;
}
@media (max-width: 900px) {
#modalInsertTarea .modal-content {
    max-width: 98vw;
    min-width: 0;
}
#modalInsertTarea .form-row {
    flex-direction: column;
    gap: 0.5rem;
}
}
#modalInsertTarea .form-row .form-group.monto-group {
flex: 0 0 30%;
min-width: 100px;
max-width: 240px;
}
#modalInsertTarea .form-row .form-group.nombre-tarea-group {
flex: 1 1 0;
}
@media (max-width: 700px) {
#modalInsertTarea .form-row .form-group.monto-group,
#modalInsertTarea .form-row .form-group.nombre-tarea-group {
    flex: 1 1 0;
    max-width: 100%;
}
}
#modalUpdateTarea .modal-content {
max-width: 800px !important;
width: 100% !important;
}
#modalUpdateTarea .form-row {
display: flex;
gap: 1.2rem;
align-items: flex-end;
margin-bottom: 0.7rem;
flex-wrap: wrap;
}
#modalUpdateTarea .form-row .form-group {
flex: 1 1 0;
margin-bottom: 0;
min-width: 120px;
}
#modalUpdateTarea .form-row .monto-group {
flex: 0 0 30%;
min-width: 100px;
max-width: 240px;
}

#modalUpdateTarea .form-actions {
margin-top: 1.1rem;
display: flex;
gap: 1rem;
justify-content: flex-end;
}
@media (max-width: 700px) {
#modalUpdateTarea .modal-content {
    max-width: 98vw;
    min-width: 0;
}
#modalUpdateTarea .form-row {
    flex-direction: column;
    gap: 0.5rem;
}
#modalUpdateTarea .form-row .form-group,
#modalUpdateTarea .form-row .monto-group {
    flex: 1 1 0;
    max-width: 100%;
}
}
.btn-add-tarea-col {
background: none !important;
border: none !important;
color: #888 !important;
font-weight: 500;
font-size: 1em;
box-shadow: none !important;
padding: 8px 0 4px 0;
margin-top: 10px;
transition: color 0.15s, text-decoration 0.15s;
cursor: pointer;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.btn-add-tarea-col i {
font-size: 1.1em;
}
.btn-add-tarea-col:hover, .btn-add-tarea-col:focus {
color: #2dca70  !important;
background: none !important;
}
#modalInsertTarea input#nombre_tarea:required {
border: 1px solid #c88482;
transition: border 0.2s;
}
#modalInsertTarea input#nombre_tarea:focus:required {
border: 1px solid #c88482;
outline: none;
}
/* Efecto visual para drag & drop activo */
.tarea-card.sortable-chosen {
border: 2.5px solid #1976d2 !important;
box-shadow: 0 0 16px #1976d2, 0 2px 8px rgba(0,0,0,0.12);
background: #393939 !important; /* azul pastel mÃ¡s oscuro */
transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}

/* Indicador de tarea repetitiva */
.tarea-repetitiva-indicator {
position: absolute;
top: 8px;
right: 40px; /* Cambiado de 8px a 40px para dejar espacio al botÃ³n de 3 puntos */
background: linear-gradient(135deg, #ff9800, #f57c00);
color: white;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
z-index: 10;
box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
animation: pulse-repetitiva 2s infinite;
}

@keyframes pulse-repetitiva {
0% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}
50% {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.5);
}
100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}
}

.tarea-repetitiva-indicator:hover {
animation: none;
transform: scale(1.2);
box-shadow: 0 4px 8px rgba(255, 152, 0, 0.6);
}
        /* Animaciones para AJAX */
        @keyframes fadeOut {
            from {
                opacity: 1;
                transform: scale(1);
            }
            to {
                opacity: 0;
                transform: scale(0.8);
            }
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }
        
        @keyframes slideUp {
            from {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            to {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
        }
        
        /* Estilos para botones deshabilitados */
        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        /* Spinner para botones de carga */
        .fa-spin {
            animation: fa-spin 1s infinite linear;
        }
        
        @keyframes fa-spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
            }
        
    /* Mejora de visibilidad para el modal de mensaje */
    .modal-message-content {
        background: linear-gradient(135deg, #fff 60%, #e3f2fd 100%);
        border: 3px solid #1976d2;
        box-shadow: 0 8px 32px rgba(25,118,210,0.18), 0 2px 8px rgba(0,0,0,0.12);
        border-radius: 18px;
        max-width: 90vw;
        min-width: 320px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2em 1.5em;
        z-index: 10002;
    }
        
    @media (max-width: 600px) {
        .modal-message-content {
            min-width: 80vw;
            font-size: 1.1em;
            padding: 1.2em 0.5em;
        }
    }
        
        /* Canvas confetti */
    canvas.confetti-canvas {
        z-index: 11000 !important;
        pointer-events: none;
        position: fixed !important;
    }
        
    body > canvas {
        z-index: 11000 !important;
        pointer-events: none;
        position: fixed !important;
    }
        
        /* Responsive design */
    @media (max-width: 900px) {
        .btn-fab {
            display: flex !important;
            position: fixed;
            right: 18px;
            bottom: 24px;
            z-index: 12000;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #1976d2;
            color: #fff;
            box-shadow: 0 4px 16px rgba(25,118,210,0.18), 0 2px 8px rgba(0,0,0,0.12);
            align-items: center;
            justify-content: center;
                text-decoration: none;
                transition: all 0.3s ease;
            }
            
        .btn-fab:hover {
                transform: scale(1.1);
                box-shadow: 0 6px 20px rgba(25,118,210,0.25);
            }
    }
    
    /* Estilos para SortableJS */
    .sortable-ghost {
        opacity: 0.5;
        background: #f0f0f0;
    }
    
    .sortable-chosen {
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        transform: rotate(2deg);
    }
    
    .sortable-drag {
        opacity: 0.8;
    }
    
    .tarea-card.dragging {
        cursor: grabbing;
    }
    
    .tarea-repetitiva-indicator {
        position: absolute;
        top: 10px;
        right: 20px;
        background: #ff6b6b;
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        z-index: 10;
    }
         /* AnimaciÃ³n para actualizaciÃ³n de fecha en tiempo real */
         @keyframes fadeInOut {
            0% { opacity: 1; }
            50% { opacity: 0.7; background-color: #e8f5e8; }
            100% { opacity: 1; }
        }
        
        .tarea-fecha {
            transition: color 0.3s ease;
        }
        
        .tarea-fecha.actualizada {
            color: #28a745;
            font-weight: bold;
        }
        
        /* Estilos para el selector de fecha */
        .fecha-selector {
            position: relative;
        }
        
        .btn-fecha-selector {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: white;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: all 0.3s ease;
        }
        
        .btn-fecha-selector:hover {
            border-color: #667eea;
            background-color: #f8f9ff;
        }
        
        .btn-fecha-selector:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
        
        .btn-fecha-selector i:first-child {
            color: #667eea;
            margin-right: 8px;
        }
        
        .btn-fecha-selector i:last-child {
            color: #6c757d;
            font-size: 12px;
        }
        
        .btn-fecha-selector.fecha-seleccionada {
            border-color: #667eea;
            background-color: #f8f9ff;
        }
        
        .btn-fecha-selector.fecha-seleccionada i:first-child {
            color: #667eea;
        }
        
        .fecha-selector input[type="date"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        
        .fecha-selector input[type="date"]:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
        
        /* Modal pequeÃ±o */
        .modal-pequeno .modal-content {
            max-width: 400px;
            width: 90%;
        }
        
        /* Opciones de fecha con estilo mejorado */
        .opciones-fecha {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .opcion-fecha {
            display: flex;
            align-items: center;
            padding: 11px 19px;
            border: 2px solid #f1f3f4;
            border-radius: 12px;
            background: transparent;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
            width: 100%;
            position: relative;
            overflow: hidden;
        }
        
        .opcion-fecha::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 1;
        }
        
        .opcion-fecha:hover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.05);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
        }
        
        .opcion-fecha:hover::before {
            opacity: 0.03;
        }
        
        .opcion-fecha.seleccionada {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
            transform: translateY(-1px);
        }
        
        .opcion-fecha.seleccionada::before {
            opacity: 0;
        }
        
        .opcion-fecha i {
            font-size: 20px;
            margin-right: 15px;
            color: #667eea;
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
            width: 24px;
            text-align: center;
        }
        
        .opcion-fecha:hover i {
            color: #667eea;
            transform: scale(1.1);
        }
        
        .opcion-fecha:hover strong {
            color: #ffffff;
        }
        
        .opcion-fecha:hover small {
            color: #ffffff;
        }
        
        .opcion-fecha.seleccionada i {
            color: white;
            transform: scale(1.1);
        }
        
        .opcion-fecha div {
            flex: 1;
            position: relative;
            z-index: 2;
        }
        
        .opcion-fecha strong {
            display: block;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 4px;
            transition: all 0.3s ease;
            color: #ffffff;
        }
        
        .opcion-fecha small {
            display: block;
            font-size: 13px;
            opacity: 0.7;
            transition: all 0.3s ease;
            color: #ffffff;
        }
        
        .opcion-fecha.seleccionada strong {
            font-weight: 700;
        }
        
        .opcion-fecha.seleccionada small {
            opacity: 0.9;
        }
        
        /* Efectos adicionales para las opciones */
        .opcion-fecha::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }
        
        .opcion-fecha:hover::after {
            left: 100%;
        }
        
        /* AnimaciÃ³n de entrada para las opciones */
        .opcion-fecha {
            animation: slideInUp 0.3s ease forwards;
        }
        
        .opcion-fecha:nth-child(1) { animation-delay: 0.1s; }
        .opcion-fecha:nth-child(2) { animation-delay: 0.2s; }
        .opcion-fecha:nth-child(3) { animation-delay: 0.3s; }
        .opcion-fecha:nth-child(4) { animation-delay: 0.4s; }
        .opcion-fecha:nth-child(5) { animation-delay: 0.5s; }
        
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Footer del modal */
        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding-top: 15px;
            border-top: 1px solid #e9ecef;
            margin-top: 15px;
        }
        
        /* Estilos para configuraciÃ³n repetitiva */
        #configuracion_repetitiva {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
            margin-top: 10px;
        }
        
        #configuracion_repetitiva .form-row {
            margin-bottom: 10px;
        }
        
        #configuracion_repetitiva label {
            font-weight: 500;
            color: #495057;
            margin-bottom: 5px;
            display: block;
        }
        
        /* Efecto hover para el checkbox */
        #es_repetitiva:checked + span {
            color: #007bff;
            font-weight: 500;
        }
        
        /* AnimaciÃ³n para mostrar/ocultar configuraciÃ³n */
        #configuracion_repetitiva {
            transition: all 0.3s ease;
        }
        
        /* Estilos para el botÃ³n de repeticiÃ³n */
        .btn-repetir {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
            position: relative;
            overflow: hidden;
        }
        
        .btn-repetir::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }
        
        .btn-repetir:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }
        
        .btn-repetir:hover::before {
            left: 100%;
        }
        
        .btn-repetir:active {
            transform: translateY(0);
        }
        
        /* Estilos para el modal de repeticiÃ³n - igual que los otros modales */
        #modalConfigurarRepeticion .modal-content {
            max-width: 500px;
        }
        
        #modalConfigurarRepeticion label {
            font-weight: 500;
            color: #495057;
        }
        
        #modalConfigurarRepeticion input[type="checkbox"]:checked + span {
            color: #667eea;
            font-weight: 600;
        }
        
        /* Estilos para la secciÃ³n principal del modal */
        #modalConfigurarRepeticion .modal-body > div:first-child {
            margin-bottom: 20px;
        }
        
        #configuracion_repetitiva_modal {
            margin-top: 15px;
        }
        
        #configuracion_repetitiva_modal label {
            font-size: 12px;
            color: #6c757d;
            margin-bottom: 5px;
            display: block;
            font-weight: 500;
        }
        
        #configuracion_repetitiva_modal input,
        #configuracion_repetitiva_modal select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        
        #configuracion_repetitiva_modal input:focus,
        #configuracion_repetitiva_modal select:focus {
            outline: none;
            border-color: #667eea;
        }
        
        /* Estilos para los botones del modal de repeticiÃ³n */
        #modalConfigurarRepeticion .form-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #e9ecef;
            flex-wrap: wrap;
            max-width: 100%;
        }
        
        #modalConfigurarRepeticion .form-actions .btn {
            flex: 1;
            min-width: 0;
            max-width: calc(33.33% - 7px);
            padding: 10px 12px;
            font-size: 12px;
            font-weight: 500;
            border-radius: 6px;
            transition: all 0.3s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        #modalConfigurarRepeticion .form-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        #modalConfigurarRepeticion .form-actions .btn-danger {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            border: none;
            color: white;
        }
        
        #modalConfigurarRepeticion .form-actions .btn-danger:hover {
            background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
        }
        
        #modalConfigurarRepeticion .form-actions .btn-secondary {
            background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
            border: none;
            color: white;
        }
        
        #modalConfigurarRepeticion .form-actions .btn-secondary:hover {
            background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
        }
        
        #modalConfigurarRepeticion .form-actions .btn-primary {
            background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
            border: none;
            color: white;
        }
        
        #modalConfigurarRepeticion .form-actions .btn-primary:hover {
            background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
        }
        
        /* Responsive para los botones */
        @media (max-width: 600px) {
            #modalConfigurarRepeticion .form-actions {
                flex-direction: column;
                gap: 8px;
            }
            
            #modalConfigurarRepeticion .form-actions .btn {
                width: 100%;
                margin: 0;
                max-width: 100%;
                font-size: 13px;
                padding: 12px 15px;
            }
        }
        
        /* Para pantallas muy pequeÃ±as */
        @media (max-width: 400px) {
            #modalConfigurarRepeticion .form-actions .btn {
                font-size: 11px;
                padding: 10px 8px;
            }
        }
        
        /* Estilos para centrar el botÃ³n "Crear Tarea Repetitiva" */
        #btn_configurar_repeticion {
            display: block !important;
            margin: 0 auto !important;
            text-align: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white !important;
            border: none !important;
            padding: 12px 24px !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            transition: all 0.3s ease !important;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
            width: fit-content !important;
        }
        
        #btn_configurar_repeticion:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
        }
           /* Estilos para botones de campos */
           .botones-campos {
            display: flex;
            gap: 12px;
            margin: 20px 0;
            justify-content: flex-start;
        }
        
        .btn-campo {
            display: flex;
            align-items: center;
            padding: 10px 16px;
            border: 1px solid #2c3440;
            border-radius: 8px;
            background: transparent;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 80px;
            gap: 8px;
        }
        
        .btn-campo:hover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.05);
            transform: translateY(-1px);
        }
        
        .btn-campo.activo {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
        }
        
        .btn-campo.seleccionado {
            border-color: #28a745;
            background: rgba(40, 167, 69, 0.1);
            color: #28a745;
        }
        
        .btn-campo.seleccionado i {
            color: #28a745;
        }
        
        .btn-campo.seleccionado span {
            color: #28a745;
            font-weight: 600;
        }
        
        /* Colores especÃ­ficos para prioridad */
        .btn-campo.seleccionado.prioridad-alta i {
            color: #dc3545;
        }
        
        .btn-campo.seleccionado.prioridad-alta span {
            color: #dc3545;
        }
        
        .btn-campo.seleccionado.prioridad-alta {
            border-color: #dc3545;
            background: rgba(220, 53, 69, 0.1);
        }
        
        .btn-campo.seleccionado.prioridad-media i {
            color: #ffc107;
        }
        
        .btn-campo.seleccionado.prioridad-media span {
            color: #ffc107;
        }
        
        .btn-campo.seleccionado.prioridad-media {
            border-color: #ffc107;
            background: rgba(255, 193, 7, 0.1);
        }
        
        .btn-campo.seleccionado.prioridad-baja i {
            color: #28a745;
        }
        
        .btn-campo.seleccionado.prioridad-baja span {
            color: #28a745;
        }
        
        .btn-campo.seleccionado.prioridad-baja {
            border-color: #28a745;
            background: rgba(40, 167, 69, 0.1);
        }
        
        .btn-campo i {
            font-size: 14px;
            color: #6c757d;
            transition: all 0.3s ease;
        }
        
        .btn-campo:hover i {
            color: #667eea;
        }
        
        .btn-campo.activo i {
            color: #667eea;
        }
        
        .btn-campo span {
            font-size: 13px;
            font-weight: 500;
            color: #6c757d;
            transition: all 0.3s ease;
        }
        
        .btn-campo:hover span {
            color: #667eea;
        }
        
        .btn-campo.activo span {
            color: #667eea;
            font-weight: 600;
        }
        
        /* Textarea auto-ajustable */
        #descripcion {
            resize: none;
            overflow: hidden;
            min-height: 40px;
            max-height: 120px;
        }
        
        /* Textarea auto-ajustable para editar tarea */
        #updateTareaDescripcion {
            resize: none;
            overflow: hidden;
            min-height: 40px;
            max-height: 120px;
        }
        
        /* Estilos para SubmenÃºs */
        .has-submenu {
            position: relative;
        }

        .submenu-toggle {
            position: relative;
            justify-content: space-between !important;
        }

        .submenu-arrow {
            font-size: 0.8rem;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            margin-left: auto;
        }

        .submenu-arrow.rotated {
            transform: rotate(180deg);
        }

        .submenu {
            list-style: none;
            padding: 0;
            margin: 0;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            margin-top: 0.5rem;
            margin-left: 1rem;
            margin-right: 0.5rem;
        }

        .submenu.active {
            max-height: 300px;
            padding: 0.5rem 0;
        }

        .submenu-item {
            margin: 0;
        }

        .submenu-link {
            display: flex;
            align-items: center;
            padding: 0.6rem 1rem;
            color: var(--text-secondary);
            text-decoration: none;
            border-radius: 6px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 0.9rem;
            font-weight: 500;
            gap: 0.7rem;
            position: relative;
            overflow: hidden;
            margin: 0.2rem 0.5rem;
            border-left: 3px solid transparent;
        }

        .submenu-link:hover,
        .submenu-link.sidebar-menu-hover {
            color: var(--accent-color);
            background: rgba(79,140,255,0.1);
            border-left-color: var(--accent-color);
            transform: translateX(5px);
        }

        .submenu-link.sidebar-menu-active {
            color: #fff;
            background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
            box-shadow: 0 2px 8px rgba(79,140,255,0.3);
            border-left-color: var(--accent-color);
            transform: translateX(5px);
        }

        .submenu-icon {
            width: 18px;
            text-align: center;
            font-size: 1rem;
            transition: transform 0.3s ease;
            flex-shrink: 0;
        }

        .submenu-link:hover .submenu-icon,
        .submenu-link.sidebar-menu-active .submenu-icon {
            transform: scale(1.05);
        }

        .submenu-text {
            flex: 1;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Estilos para sidebar colapsado */
        .sidebar.collapsed .submenu {
            display: none;
        }

        .sidebar.collapsed .submenu-toggle {
            justify-content: center !important;
        }

        .sidebar.collapsed .submenu-arrow {
            display: none;
        }

        /* Responsive para submenÃºs */
        @media (max-width: 768px) {
            .submenu {
                margin-left: 0.5rem;
                margin-right: 0.2rem;
            }
            
            .submenu-link {
                padding: 0.7rem 1rem;
                font-size: 0.95rem;
            }
            
            .submenu-icon {
                width: 20px;
                font-size: 1.1rem;
            }
        }

        /* AnimaciÃ³n de entrada para submenÃºs */
        @keyframes submenuSlideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .submenu.active {
            animation: submenuSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Efecto de ripple para submenÃºs */
        .submenu-link .ripple-effect {
            background: rgba(79,140,255,0.3);
            border-radius: 50%;
            position: absolute;
            transform: scale(0);
            animation: ripple 0.6s linear;
            pointer-events: none;
        }

        /* Indicador visual para menÃºs con submenÃºs */
        .has-submenu > .sidebar-menu-link {
            border-right: 2px solid transparent;
            transition: border-right-color 0.3s ease;
        }

        .has-submenu > .sidebar-menu-link:hover {
            border-right-color: var(--accent-color);
        }

        .has-submenu > .sidebar-menu-link.sidebar-menu-active {
            border-right-color: var(--accent-color);
        }

        /* =============================================================================
           CAROUSEL DE DESEOS MOTIVACIONALES
           ============================================================================= */
        
        .deseos-motivacionales-carousel {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: var(--radius);
            margin: 0px 10px;
            padding: 20px;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        /* Efecto hover para indicar que es clickeable */
        .deseos-motivacionales-carousel:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        }
        
        /* Indicador visual de que se puede hacer clic */
        /* Agregado para la funcionalidad de minimizaciÃ³n por clic */
        .deseos-motivacionales-carousel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.05);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }
        
        .deseos-motivacionales-carousel:hover::before {
            opacity: 1;
        }
        
        .carousel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            color: white;
        }
        
        .carousel-header h3 {
            font-size: 1.3rem;
            font-weight: 600;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .carousel-header h3 i {
            color: #ff6b6b;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        .carousel-controls {
            display: flex;
            gap: 10px;
        }
        
        .carousel-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .carousel-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }
        
        /* Estilos especÃ­ficos para el botÃ³n de minimizar */
        .carousel-btn.minimize {
            background: rgba(255, 193, 7, 0.2);
            border-color: rgba(255, 193, 7, 0.4);
        }
        
        .carousel-btn.minimize:hover {
            background: rgba(255, 193, 7, 0.3);
            border-color: rgba(255, 193, 7, 0.6);
        }
        
        /* Estado minimizado del carousel - Oculto completamente */
        /* Cuando estÃ¡ minimizado, el carousel se oculta por completo */
        /* y solo se muestra el botÃ³n compacto en el header */
        /* Se usa !important para asegurar que se oculte completamente */
        .deseos-motivacionales-carousel.minimizado {
            display: none !important;
            height: 0;
            margin: 0;
            padding: 0;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        /* BotÃ³n de minimizar cuando estÃ¡ minimizado */
        .deseos-motivacionales-carousel.minimizado .carousel-btn.minimize i {
            transform: rotate(180deg);
        }
        
        /* AnimaciÃ³n suave para la transiciÃ³n */
        .deseos-motivacionales-carousel {
            transition: height 0.3s ease, padding 0.3s ease;
        }
        
        .carousel-container {
            position: relative;
            height: 120px;
            overflow: hidden;
        }
        
        .carousel-slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.5s ease;
        }
        
        .carousel-slide.active {
            opacity: 1;
            transform: translateX(0);
        }
        
        .carousel-slide.prev {
            transform: translateX(-100%);
        }
        
        .deseo-motivacional {
            display: flex;
            align-items: center;
            gap: 20px;
            height: 100%;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .deseo-icono {
            font-size: 2.5rem;
            color: #ff6b6b;
            animation: bounce 2s infinite;
        }
        
        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }
        
        .deseo-info h4 {
            color: white;
            font-size: 1.2rem;
            font-weight: 600;
            margin: 0 0 8px 0;
        }
        
        .dias-restantes {
            color: #ffd700;
            font-size: 1rem;
            margin: 0 0 5px 0;
            font-weight: 500;
        }
        
        .motivacion {
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.9rem;
            margin: 0;
            font-style: italic;
        }
        
        .carousel-indicators {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 15px;
        }
        
        .indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .indicator.active {
            background: white;
            transform: scale(1.2);
        }
        
        .indicator:hover {
            background: rgba(255, 255, 255, 0.6);
        }
        
        /* Estados de prioridad para deseos */
        .deseo-motivacional.prioridad-alta {
            border-left: 4px solid var(--danger-color);
        }
        
        .deseo-motivacional.prioridad-media {
            border-left: 4px solid var(--warning-color);
        }
        
        .deseo-motivacional.prioridad-baja {
            border-left: 4px solid var(--success-color);
        }
        
        /* Responsive para el carousel */
        @media (max-width: 768px) {
            .deseos-motivacionales-carousel {
                margin: 15px 0;
                padding: 15px;
            }
            
            .carousel-header {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .carousel-header h3 {
                font-size: 1.1rem;
            }
            
            .deseo-motivacional {
                flex-direction: column;
                text-align: center;
                gap: 15px;
                height: auto;
                min-height: 120px;
            }
            
            .deseo-icono {
                font-size: 2rem;
            }
            
            .deseo-info h4 {
                font-size: 1.1rem;
            }
        }

        /* BotÃ³n de minimizar cuando estÃ¡ minimizado */
        .deseos-motivacionales-carousel.minimizado .carousel-btn.minimize i {
            transform: rotate(180deg);
        }
        
        /* AnimaciÃ³n suave para la transiciÃ³n */
        .deseos-motivacionales-carousel {
            transition: all 0.3s ease;
        }
        
        /* El carousel minimizado estÃ¡ completamente oculto */
        /* Los estilos de hover y padding no se aplican ya que estÃ¡ oculto */
        
        /* Botón de minimizar sin tooltip */
        .carousel-btn.minimize {
            position: relative;
        }
