/* Custom Styles for SCRUM Work Plan App */

/* Sortable.js Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #f0f9ff;
}

.sortable-drag {
    opacity: 0.9;
}

/* Full Screen Layout */
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.main-container {
    min-height: 100vh;
    width: 100%;
}

/* Enhanced Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 4px solid #047857;
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 4px solid #b91c1c;
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-left: 4px solid #1d4ed8;
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left: 4px solid #b45309;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Enhanced Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    background: #f8fafc;
    padding: 16px 24px;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Form Enhancements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Enhancements */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.task-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card:hover::before {
    opacity: 1;
}

.task-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

/* Task Title Bar */
body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.task-title-bar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
    margin: -16px -16px 12px -16px;
}

.task-title-bar h4 {
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.task-title-bar .task-controls {
    display: flex;
    gap: 8px;
}

.task-title-bar .task-controls button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.task-title-bar .task-controls button:hover {
    transform: scale(1.1);
}

/* Enhanced spacing for list view */
.task-list-container .task-card {
    margin-bottom: 16px;
}

.task-list-container .task-card:last-child {
    margin-bottom: 0;
}

/* Button Variants */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Activity Items */
.activity-item {
    animation: fadeIn 0.3s ease;
}

.activity-input {
    flex: 1;
}

.activity-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #d1d5db;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.activity-checkbox:checked + .activity-input {
    text-decoration: line-through;
    opacity: 0.6;
    background-color: #f9fafb;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Objective Items */
.objective-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}

.objective-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Canvas Columns */
.canvas-column {
    min-height: 400px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.canvas-column:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Priority Borders */
.priority-high { 
    border-left: 4px solid #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.priority-high:hover {
    box-shadow: 0 20px 25px -5px rgba(239, 68, 68, 0.2), 0 10px 10px -5px rgba(239, 68, 68, 0.1);
}

.priority-medium { 
    border-left: 4px solid #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.priority-medium:hover {
    box-shadow: 0 20px 25px -5px rgba(245, 158, 11, 0.2), 0 10px 10px -5px rgba(245, 158, 11, 0.1);
}

.priority-low { 
    border-left: 4px solid #10b981;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.priority-low:hover {
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.2), 0 10px 10px -5px rgba(16, 185, 129, 0.1);
}

/* Urgency Indicators */
.urgency-high {
    position: relative;
}

.urgency-high::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.urgency-medium::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
}

.urgency-low::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Urgency Backgrounds */
.urgency-high { 
    background: #fef2f2; 
}

.urgency-medium { 
    background: #fffbeb; 
}

.urgency-low { 
    background: #f0fdf4; 
}

/* Responsive Design */
@media (max-width: 768px) {
    .canvas-column {
        min-height: 300px;
    }
    
    .app-container {
        width: 100vw; /* 100% del ancho */
        height: 100vh;
        overflow: auto; /* Permitir desplazamiento en toda la ventana */
        padding-bottom: 80px; /* Margen final para controles del celular */
    }
    
    .main-content {
        width: 100vw; /* 100% del ancho */
        height: auto; /* Altura automática para permitir desplazamiento */
        min-height: calc(100vh - 50px);
    }
    
    .header {
        padding: 0.5rem 1rem;
        height: 50px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .grid.grid-cols-1.lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem; /* Espaciado general */
    }
    
    .lg\\:col-span-1,
    .lg\\:col-span-2 {
        grid-column: span 1;
    }
    
    /* Aumentar padding en las 3 secciones principales */
    .lg\\:col-span-1 .bg-white,
    .lg\\:col-span-2 .bg-white {
        padding: 1.5rem; /* Padding aumentado */
    }
    
    .task-card {
        padding: 1rem; /* Padding aumentado para tarjetas */
    }
    
    /* Ocultar h1 solo en móvil */
    .header h1 {
        display: none !important;
    }
    
    /* Asegurar que los contenedores puedan desplazarse */
    .bg-white.rounded-lg.shadow {
        overflow: auto;
        max-height: 60vh; /* Limitar altura para permitir desplazamiento */
    }
    
    /* Sidebar containers */
    .lg\\:col-span-1 .bg-white {
        max-height: 50vh;
    }
    
    /* Main view container */
    .main-content .bg-white {
        max-height: 70vh;
    }
    
    /* Espacio adicional al final para controles del celular */
    body {
        padding-bottom: 100px; /* Espacio extra para navegación táctil */
    }
}

/* Tailwind MD Classes */
@media (min-width: 768px) {
    .md\:block {
        display: block;
    }
    
    .md\:hidden {
        display: none;
    }
    
    /* Asegurar que h1 sea visible en tablet y PC */
    .header h1 {
        display: block !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Enhancements */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Drag and Drop Visual Feedback */
.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.drop-zone {
    border: 2px dashed #3b82f6;
    background: #eff6ff;
}

/* Status Badge Styles */
.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

/* Priority Badge Styles */
.importance-high {
    background: #fee2e2;
    color: #991b1b;
}

.importance-medium {
    background: #fed7aa;
    color: #9a3412;
}

.importance-low {
    background: #d1fae5;
    color: #065f46;
}

/* Urgency Badge Styles */
.urgency-high-badge {
    background: #fecaca;
    color: #7f1d1d;
}

.urgency-medium-badge {
    background: #fde68a;
    color: #78350f;
}

.urgency-low-badge {
    background: #bbf7d0;
    color: #14532d;
}

/* Calendar Customization */
.fc-event {
    border-radius: 4px;
    border: none;
    font-size: 0.875rem;
}

.fc-event-title {
    font-weight: 500;
}

/* Tab Navigation */
.view-tab {
    transition: all 0.2s ease;
}

.view-tab:hover {
    background: #f9fafb;
}

/* Button Enhancements */
.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Form Enhancements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .task-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
