/* public/reports/css/incidencias.css */

/* ========================================
   ESTILOS GENERALES
   ======================================== */

.incidencias-container {
    padding: 24px;
}

/* ========================================
   ESTADO VACÍO
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 32px;
    max-width: 400px;
}

/* ========================================
   HEADER DE TABLEROS
   ======================================== */

.tableros-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.tableros-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.tableros-title p {
    color: #6b7280;
    font-size: 16px;
}

/* ========================================
   GRID DE TABLEROS
   ======================================== */

.tableros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.tablero-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tablero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tablero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tablero-nombre {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.tablero-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tablero-card:hover .tablero-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-resolver-incidencia:hover {
    background: #dcfce7;
    color: #16a34a;
}

.tablero-descripcion {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tablero-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tablero-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.tablero-creador {
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   HEADER KANBAN
   ======================================== */

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kanban-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.kanban-title p {
    color: #6b7280;
    margin: 4px 0 0 0;
}

.kanban-actions {
    display: flex;
    gap: 12px;
}

/* ========================================
   TABLERO KANBAN
   ======================================== */

.kanban-board {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 24px;
    min-height: 600px;
}

.kanban-column {
    background: white;
    border-radius: 16px;
    padding: 20px;
    min-width: 320px;
    max-width: 320px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.column-nombre {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.column-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.column-content {
    flex: 1;
    min-height: 400px;
    padding: 8px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.column-content.drag-over {
    background: #f0f9ff;
    border: 2px dashed #0ea5e9;
}

.column-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.btn-add-incidencia {
    width: 100%;
    background: none;
    border: 2px dashed #d1d5db;
    color: #6b7280;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-add-incidencia:hover {
    border-color: #9ca3af;
    color: #374151;
    background: #f9fafb;
}

/* ========================================
   TARJETAS DE INCIDENCIAS
   ======================================== */

.incidencia-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: grab;
    transition: all 0.2s ease;
    border: 1px solid #f3f4f6;
}

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

.incidencia-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

.incidencia-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.incidencia-prioridad {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.prioridad-baja {
    background: #dcfce7;
    color: #16a34a;
}

.prioridad-media {
    background: #fef3c7;
    color: #d97706;
}

.prioridad-alta {
    background: #fee2e2;
    color: #dc2626;
}

.prioridad-critica {
    background: #fecaca;
    color: #b91c1c;
}

.incidencia-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.incidencia-card:hover .incidencia-actions {
    opacity: 1;
}

.incidencia-titulo {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.incidencia-descripcion {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.incidencia-etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.etiqueta {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.incidencia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

.incidencia-asignado {
    display: flex;
    align-items: center;
    gap: 4px;
}

.incidencia-fecha {
    font-size: 11px;
}

/* ========================================
   BOTONES
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-ghost {
    background: none;
    color: #6b7280;
}

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

/* ========================================
   MODALES
   ======================================== */

.modal-large {
    max-width: 800px;
    width: 90%;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* ========================================
   INCIDENCIAS RESUELTAS
   ======================================== */

.resueltas-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.incidencia-resuelta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.incidencia-resuelta-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.incidencia-resuelta-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.incidencia-resuelta-info {
    flex: 1;
}

.incidencia-resuelta-info .incidencia-titulo {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.incidencia-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.incidencia-columna {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.incidencia-fecha {
    color: #059669;
    font-weight: 500;
}

.incidencia-resuelta-card .incidencia-descripcion {
    margin: 0 0 12px 0;
    color: #475569;
    line-height: 1.5;
}

.incidencia-resuelta-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.incidencia-usuarios {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

.incidencia-creador {
    font-weight: 500;
}

.incidencia-asignado {
    color: #7c3aed;
    font-weight: 500;
}

/* Scrollbar personalizado para la lista de resueltas */
.resueltas-list::-webkit-scrollbar {
    width: 6px;
}

.resueltas-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.resueltas-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.resueltas-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    margin-bottom: 20px;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

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

.modal-body {
    padding: 0 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #f3f4f6;
    margin-top: 20px;
}

/* ========================================
   FORMULARIOS
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-input {
    width: calc(100% - 32px);
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

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

.form-input[type="color"] {
    height: 48px;
    padding: 4px;
    cursor: pointer;
}

/* ========================================
   LOADING Y NOTIFICACIONES
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notificacion {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    min-width: 300px;
    border-left: 4px solid;
}

.notificacion-success {
    border-left-color: #10b981;
    color: #065f46;
}

.notificacion-error {
    border-left-color: #ef4444;
    color: #991b1b;
}

.notificacion i {
    font-size: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .incidencias-container {
        padding: 16px;
    }
    
    .tableros-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .tableros-grid {
        grid-template-columns: 1fr;
    }
    
    .kanban-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .kanban-board {
        flex-direction: column;
        gap: 16px;
    }
    
    .kanban-column {
        min-width: auto;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal {
        margin: 16px;
        max-width: none;
    }
}
