/* Estilos Responsive para Vista Móvil */

/* Vista de cards para móviles */
.mobile-cards-container {
    display: none;
}

.data-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.data-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.data-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.data-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.data-card-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.data-card-value {
    color: #333;
    font-size: 0.95rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.data-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    /* margin-top: 0.75rem; */
    /* padding-top: 0.75rem; */
    /* border-top: 1px solid #f0f0f0; */
}

/* Barra de búsqueda */
.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-container .search-input {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
}

.search-container .clear-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    display: none;
    z-index: 2;
    transition: color 0.2s;
}

.search-container .clear-search-btn:hover {
    color: #666;
}

.search-container .clear-search-btn.visible {
    display: block;
}

/* Estilos legacy para compatibilidad */
.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-bar input {
    padding-left: 2.5rem;
}

.search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-bar .clear-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    display: none;
}

.search-bar .clear-search.visible {
    display: block;
}

/* Paginación responsive */
.pagination {
    margin: 1rem 0;
}

.pagination-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.pagination .page-link {
    border-radius: 4px;
    margin: 0 2px;
}

/* Media query para móviles */
@media (max-width: 768px) {

    /* Ocultar tabla y mostrar cards */
    .table-responsive {
        display: none !important;
    }

    .mobile-cards-container {
        display: block !important;
    }

    /* Ajustar botones de acción */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Ajustar paginación */
    .pagination {
        flex-wrap: wrap;
    }

    .pagination .page-item {
        margin: 2px;
    }

    /* Ajustar modales */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Header responsive */
    .navbar-brand {
        font-size: 1rem;
    }

    /* Botón flotante para agregar en móvil */
    .btn-add-mobile {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
}

/* Estilos para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .data-card {
        margin-bottom: 0.75rem;
    }

    .table {
        font-size: 0.9rem;
    }
}

/* Badge de estado mejorado */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Animación de carga para cards */
.data-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
    font-size: 0.9rem;
}