/* Estilos personalizados para IlloQue */

/* Logo en el sidebar */
.sidebar-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.sidebar-logo:hover {
    transform: scale(1.05);
}

/* Logo en el navbar */
.navbar-logo {
    max-width: 120px;
    height: auto;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.02);
}

/* Logo en el login */
.login-logo {
    max-width: 200px;
    height: auto;
    transition: all 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

/* Mejoras en el diseño general */
.brand-gradient {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.brand-text {
    color: #28a745;
    font-weight: 600;
}

/* Footer con branding */
.footer-brand {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    text-align: center;
}

.footer-brand img {
    max-width: 100px;
    height: auto;
    opacity: 0.7;
}

/* Sidebar styles */
.sidebar {
    min-height: 100vh !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(5px);
}

/* Asegurar que el texto del sidebar sea blanco */
.sidebar h4,
.sidebar .text-white {
    color: white !important;
}

/* Main content area */
.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Card styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
}

/* Form control focus styles */
.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* ===== RESPONSIVE DESIGN PARA MÓVILES ===== */

/* Ajustes generales para móviles */
@media (max-width: 768px) {
    .sidebar-logo {
        max-width: 120px;
    }
    
    .navbar-logo {
        max-width: 100px;
    }
    
    .login-logo {
        max-width: 150px;
    }
    
    /* Ajustes de padding y márgenes */
    .main-content {
        padding: 10px !important;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    /* Ajustes de botones */
    .btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .btn-sm {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    /* Ajustes de texto */
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.3rem; }
    h3, .h3 { font-size: 1.1rem; }
    h4, .h4 { font-size: 1rem; }
    h5, .h5 { font-size: 0.9rem; }
    h6, .h6 { font-size: 0.8rem; }
}

/* ===== TABLAS RESPONSIVAS PARA MÓVILES ===== */

/* Estilos específicos para tablas en móviles */
@media (max-width: 768px) {
    /* Contenedor de tabla responsive */
    .table-responsive {
        border: none;
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Mejora el scroll en iOS */
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        position: relative;
    }
    
    /* Ajustes de tabla */
    .table {
        font-size: 12px;
        min-width: 800px; /* Ancho mínimo para evitar compresión */
        margin-bottom: 0;
    }
    
    /* Headers de tabla */
    .table thead th {
        font-size: 11px;
        padding: 10px 6px;
        white-space: nowrap;
        vertical-align: middle;
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* Celdas de tabla */
    .table tbody td {
        padding: 8px 6px;
        vertical-align: middle;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Badges en tablas */
    .table .badge {
        font-size: 10px;
        padding: 4px 6px;
        border-radius: 12px;
    }
    
    /* Texto pequeño en tablas */
    .table small {
        font-size: 10px;
        line-height: 1.2;
    }
    
    /* Iconos en tablas */
    .table .fas,
    .table .far {
        font-size: 10px;
        margin-right: 3px;
    }
    
    /* Indicador de scroll horizontal */
    .table-responsive::after {
        content: '← Desliza horizontalmente →';
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.8);
        color: white;
        padding: 5px 10px;
        border-radius: 15px;
        font-size: 10px;
        z-index: 20;
        opacity: 0.8;
        pointer-events: none;
    }
    
    /* Ocultar indicador después de 5 segundos */
    .table-responsive.scroll-indicator-hidden::after {
        display: none;
    }
    
    /* Mejorar hover en móviles */
    .table tbody tr:hover {
        background-color: rgba(0,123,255,0.05);
    }
    
    /* Ajustes específicos para columnas de tiempo */
    .table td:nth-child(8),
    .table td:nth-child(9),
    .table td:nth-child(10) {
        text-align: center;
        font-weight: 500;
        color: #495057;
    }
    
    /* Ajustes para columnas de fechas */
    .table td:nth-child(6),
    .table td:nth-child(7),
    .table td:nth-child(12),
    .table td:nth-child(13) {
        font-size: 10px;
        color: #6c757d;
    }
    
    /* Ajustes específicos para tablas de reportes */
    .table-responsive .table th:nth-child(1), /* Tarea */
    .table-responsive .table td:nth-child(1) {
        min-width: 120px;
        max-width: 150px;
    }
    
    .table-responsive .table th:nth-child(2), /* Proyecto */
    .table-responsive .table td:nth-child(2) {
        min-width: 80px;
        max-width: 100px;
    }
    
    .table-responsive .table th:nth-child(3), /* Responsable */
    .table-responsive .table td:nth-child(3) {
        min-width: 100px;
        max-width: 120px;
    }
    
    .table-responsive .table th:nth-child(4), /* Estado */
    .table-responsive .table td:nth-child(4) {
        min-width: 70px;
        max-width: 80px;
    }
    
    .table-responsive .table th:nth-child(5), /* Prioridad */
    .table-responsive .table td:nth-child(5) {
        min-width: 60px;
        max-width: 70px;
    }
    
    /* Columnas de fechas y tiempo */
    .table-responsive .table th:nth-child(n+6),
    .table-responsive .table td:nth-child(n+6) {
        min-width: 60px;
        max-width: 80px;
        text-align: center;
    }
}

/* ===== AJUSTES ESPECÍFICOS PARA IPHONE ===== */

@media (max-width: 414px) {
    /* iPhone específico */
    .table {
        font-size: 11px;
        min-width: 700px;
    }
    
    .table thead th {
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .table tbody td {
        padding: 6px 4px;
    }
    
    .table .badge {
        font-size: 9px;
        padding: 3px 5px;
    }
    
    .table small {
        font-size: 9px;
    }
    
    /* Mejorar contraste en móviles pequeños */
    .table tbody tr:nth-child(even) {
        background-color: #fafafa;
    }
    
    /* Ajustes de contenedores */
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Ajustes de cards */
    .card-body {
        padding: 12px;
    }
    
    /* Ajustes de filtros */
    .filter-section .row > div {
        margin-bottom: 10px;
    }
    
    .filter-section .form-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .filter-section .form-select,
    .filter-section .form-control {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* Mejorar indicador de scroll */
    .table-responsive::after {
        font-size: 9px;
        padding: 4px 8px;
        right: 5px;
        top: 5px;
    }
}

/* ===== MEJORAS PARA TABLAS COMPLEJAS ===== */

/* Estilos para tablas con muchas columnas */
.table-complex {
    position: relative;
}

.table-complex .table-responsive {
    position: relative;
}

/* Indicador de scroll horizontal */
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table-responsive:hover::after {
    opacity: 1;
}

/* ===== AJUSTES PARA KANBAN EN MÓVILES ===== */

@media (max-width: 768px) {
    .kanban-column {
        min-height: 300px;
        margin-bottom: 15px;
    }
    
    .task-card {
        margin-bottom: 8px;
        padding: 10px;
    }
    
    .task-card .card-title {
        font-size: 14px;
    }
    
    .task-card .card-text {
        font-size: 12px;
    }
}

/* ===== AJUSTES PARA FORMULARIOS EN MÓVILES ===== */

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .form-control,
    .form-select {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    /* Evitar zoom en inputs en iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ===== AJUSTES PARA MODALES EN MÓVILES ===== */

@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 10px 15px;
    }
    
    .modal-title {
        font-size: 16px;
    }
}

/* ===== AJUSTES PARA GRÁFICOS EN MÓVILES ===== */

@media (max-width: 768px) {
    canvas {
        max-height: 200px !important;
    }
    
    .chart-container {
        position: relative;
        height: 200px;
        margin-bottom: 15px;
    }
}

/* ===== AJUSTES PARA NAVEGACIÓN EN MÓVILES ===== */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 16px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .dropdown-menu {
        font-size: 14px;
    }
    
    .dropdown-item {
        padding: 8px 15px;
    }
} 